liyangzheng 1 rok pred
rodič
commit
4010787611
80 zmenil súbory, kde vykonal 959 pridanie a 84 odobranie
  1. 11 3
      src/api/cid/cid.js
  2. 9 0
      src/api/scd.js
  3. 51 0
      src/api/scdCheck/scdCheck.js
  4. 16 0
      src/api/systemRow.js
  5. BIN
      src/assets/icon/cilce_gray.png
  6. BIN
      src/assets/icon/clice_blue.png
  7. BIN
      src/assets/icon/real_icon/APP-ID(1).png
  8. BIN
      src/assets/icon/real_icon/APP-ID(2).png
  9. BIN
      src/assets/icon/real_icon/APP-ID.png
  10. BIN
      src/assets/icon/real_icon/CircleWavy(1).png
  11. BIN
      src/assets/icon/real_icon/CircleWavy(2).png
  12. BIN
      src/assets/icon/real_icon/CircleWavy.png
  13. BIN
      src/assets/icon/real_icon/VLAN-ID(1).png
  14. BIN
      src/assets/icon/real_icon/VLAN-ID(2).png
  15. BIN
      src/assets/icon/real_icon/VLAN-ID.png
  16. BIN
      src/assets/icon/real_icon/Vector(1).png
  17. BIN
      src/assets/icon/real_icon/Vector(2).png
  18. BIN
      src/assets/icon/real_icon/Vector.png
  19. BIN
      src/assets/icon/real_icon/bb.png
  20. BIN
      src/assets/icon/real_icon/btn.png
  21. BIN
      src/assets/icon/real_icon/ferch_blue.png
  22. BIN
      src/assets/icon/real_icon/ferch_red.png
  23. BIN
      src/assets/icon/real_icon/ferch_yellow.png
  24. BIN
      src/assets/icon/real_icon/get.png
  25. BIN
      src/assets/icon/real_icon/go.png
  26. BIN
      src/assets/icon/real_icon/goose.png
  27. BIN
      src/assets/icon/real_icon/ied_squer.png
  28. BIN
      src/assets/icon/real_icon/iedip_blue.png
  29. BIN
      src/assets/icon/real_icon/iedip_red.png
  30. BIN
      src/assets/icon/real_icon/iedip_yellow.png
  31. BIN
      src/assets/icon/real_icon/macip_blue.png
  32. BIN
      src/assets/icon/real_icon/macip_red.png
  33. BIN
      src/assets/icon/real_icon/macip_yellow.png
  34. BIN
      src/assets/icon/real_icon/maxTime_blue.png
  35. BIN
      src/assets/icon/real_icon/maxTime_red.png
  36. BIN
      src/assets/icon/real_icon/maxTime_yellow.png
  37. BIN
      src/assets/icon/real_icon/minTime_blue.png
  38. BIN
      src/assets/icon/real_icon/minTime_red.png
  39. BIN
      src/assets/icon/real_icon/minTime_yellow.png
  40. BIN
      src/assets/icon/real_icon/navicat.png
  41. BIN
      src/assets/icon/real_icon/navicat_plus.png
  42. BIN
      src/assets/icon/real_icon/noip_blue.png
  43. BIN
      src/assets/icon/real_icon/noip_red.png
  44. BIN
      src/assets/icon/real_icon/noip_yellow.png
  45. BIN
      src/assets/icon/real_icon/pole.png
  46. BIN
      src/assets/icon/real_icon/report.png
  47. BIN
      src/assets/icon/real_icon/setting.png
  48. BIN
      src/assets/icon/real_icon/speed.png
  49. BIN
      src/assets/icon/real_icon/stand.png
  50. BIN
      src/assets/icon/real_icon/stknum.png
  51. BIN
      src/assets/icon/real_icon/sv.png
  52. BIN
      src/assets/icon/real_icon/vlan_blue.png
  53. BIN
      src/assets/icon/real_icon/vlan_red.png
  54. BIN
      src/assets/icon/real_icon/vlan_yellow.png
  55. BIN
      src/assets/icon/real_icon/wifi.png
  56. BIN
      src/assets/icon/real_icon/实回路信息.png
  57. BIN
      src/assets/icon/real_icon/数据集.png
  58. BIN
      src/assets/icon/real_icon/数据集成员.png
  59. BIN
      src/assets/icon/real_icon/遥信.png
  60. BIN
      src/assets/icon/real_icon/遥控.png
  61. BIN
      src/assets/icon/real_icon/遥测.png
  62. BIN
      src/assets/icon/real_icon/遥脉.png
  63. BIN
      src/assets/image/squer_crc.png
  64. BIN
      src/assets/image/squer_ied.png
  65. BIN
      src/assets/image/squer_scd.png
  66. 21 3
      src/pages/components/draw/DrawDesigns.vue
  67. 6 0
      src/pages/login/LoginNow.vue
  68. 3 3
      src/pages/netStructPicture/components/CidTree.vue
  69. 24 28
      src/pages/netStructPicture/components/Gsix.vue
  70. 310 0
      src/pages/netStructPicture/components/scdMap.vue
  71. 126 0
      src/pages/netStructPicture/components/scdTree.vue
  72. 103 13
      src/pages/netStructPicture/index.vue
  73. 20 0
      src/pages/netStructPicture/modalCom/AddNum.vue
  74. 155 0
      src/pages/netStructPicture/modalCom/LookScd.vue
  75. 8 0
      src/pages/netStructPicture/utils/image.js
  76. 7 3
      src/pages/system/SystemPage.vue
  77. 12 1
      src/pages/system/components/InsideModule.vue
  78. 12 10
      src/pages/system/components/SetModule.vue
  79. 60 18
      src/pages/system/modalComp/AddNode.vue
  80. 5 2
      src/utils/request.js

+ 11 - 3
src/api/cid/cid.js

@@ -27,13 +27,13 @@ function fileUpload(data) {
         method: "post",
         data,
         headers: {
-            'Content-Type': 'multipart/form-data',
+            'content-Type': 'multipart/form-data',
         },
     })
 }
 function saveMap(data){
     return request({
-        url:`/admin/sysmodel/save`,
+        url:`/admin/sysmodel/save`,//保存画图
         method:"post",
         data,
         headers:{
@@ -41,10 +41,18 @@ function saveMap(data){
         }
     })
 }
+function findFile(data){
+    return request({
+        url:`/attachment/list`,
+        method:"get",
+        params:data
+    })
+}
 export default {
     getAll,
     getIntent,
     portExcel,
     fileUpload,
-    saveMap
+    saveMap,
+    findFile,
 }

+ 9 - 0
src/api/scd.js

@@ -23,8 +23,17 @@ function getIedMiddle(data){
         params:data
     })
 }
+// 获取scd详细信息
+function scdReal(data){
+    return request({
+        url:`/screen/scd/info`,
+        method:"get",
+        params:data,
+    })
+}
 export default {
     getAllScd,
     getScdMiddle,
     getIedMiddle,
+    scdReal,
 }

+ 51 - 0
src/api/scdCheck/scdCheck.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+function scdStart(data){//开始对比
+    return request({
+        url:`/scd_check_tools/comp/start`,
+        method:"post",
+        data,
+    })
+}
+function switchIed(data){//指定装置差异对比结果分类统计
+    return request({
+        url:`/scd_check_tools/comp/iedstat/type`,
+        method:"get",
+        params:data,
+    })
+}
+function flashStation(data){
+    return request({
+        url:`/scd_check_tools/comp/list`,//获取指定变电站的差异对比记录列表
+        method:"get",
+        params:data
+    })
+}
+function scdResult(data){
+    return request({
+        url:`/scd_check_tools/comp/result`,//获取指定差异对比的详细结果列表
+        method:"get",
+        params:data
+    })
+}
+function scdAll(data){
+    return request({
+        url:`/scd_check_tools/comp/stat/result`,//获取scd差异对比结果概览统计
+        method:"get",
+        params:data
+    })
+}
+function scdTree(data){
+    return request({
+        url:`/scd_check_tools/comp/tree`,//获取SCD校验对象树
+        method:"get",
+        params:data
+    })
+}
+export default{
+    scdStart,
+    switchIed,
+    flashStation,
+    scdResult,
+    scdAll,
+    scdTree,
+}

+ 16 - 0
src/api/systemRow.js

@@ -37,10 +37,26 @@ function delRow(data) {//删除字典
         data
     })
 }
+function scdLockNow(data){//文件差异对比
+    return request({
+        url:`/scd_check_tools/comp/start`,
+        method:"post",
+        data,
+    })
+}
+function portExcel(data){
+    return request({
+        url:`expTableData`,
+        method:"post",
+        data,
+    })
+}
 export default {
     getAllRow,
     getRowById,
     getChildren,
     saveRow,
     delRow,
+    scdLockNow,
+    portExcel,
 }

BIN
src/assets/icon/cilce_gray.png


BIN
src/assets/icon/clice_blue.png


BIN
src/assets/icon/real_icon/APP-ID(1).png


BIN
src/assets/icon/real_icon/APP-ID(2).png


BIN
src/assets/icon/real_icon/APP-ID.png


BIN
src/assets/icon/real_icon/CircleWavy(1).png


BIN
src/assets/icon/real_icon/CircleWavy(2).png


BIN
src/assets/icon/real_icon/CircleWavy.png


BIN
src/assets/icon/real_icon/VLAN-ID(1).png


BIN
src/assets/icon/real_icon/VLAN-ID(2).png


BIN
src/assets/icon/real_icon/VLAN-ID.png


BIN
src/assets/icon/real_icon/Vector(1).png


BIN
src/assets/icon/real_icon/Vector(2).png


BIN
src/assets/icon/real_icon/Vector.png


BIN
src/assets/icon/real_icon/bb.png


BIN
src/assets/icon/real_icon/btn.png


BIN
src/assets/icon/real_icon/ferch_blue.png


BIN
src/assets/icon/real_icon/ferch_red.png


BIN
src/assets/icon/real_icon/ferch_yellow.png


BIN
src/assets/icon/real_icon/get.png


BIN
src/assets/icon/real_icon/go.png


BIN
src/assets/icon/real_icon/goose.png


BIN
src/assets/icon/real_icon/ied_squer.png


BIN
src/assets/icon/real_icon/iedip_blue.png


BIN
src/assets/icon/real_icon/iedip_red.png


BIN
src/assets/icon/real_icon/iedip_yellow.png


BIN
src/assets/icon/real_icon/macip_blue.png


BIN
src/assets/icon/real_icon/macip_red.png


BIN
src/assets/icon/real_icon/macip_yellow.png


BIN
src/assets/icon/real_icon/maxTime_blue.png


BIN
src/assets/icon/real_icon/maxTime_red.png


BIN
src/assets/icon/real_icon/maxTime_yellow.png


BIN
src/assets/icon/real_icon/minTime_blue.png


BIN
src/assets/icon/real_icon/minTime_red.png


BIN
src/assets/icon/real_icon/minTime_yellow.png


BIN
src/assets/icon/real_icon/navicat.png


BIN
src/assets/icon/real_icon/navicat_plus.png


BIN
src/assets/icon/real_icon/noip_blue.png


BIN
src/assets/icon/real_icon/noip_red.png


BIN
src/assets/icon/real_icon/noip_yellow.png


BIN
src/assets/icon/real_icon/pole.png


BIN
src/assets/icon/real_icon/report.png


BIN
src/assets/icon/real_icon/setting.png


BIN
src/assets/icon/real_icon/speed.png


BIN
src/assets/icon/real_icon/stand.png


BIN
src/assets/icon/real_icon/stknum.png


BIN
src/assets/icon/real_icon/sv.png


BIN
src/assets/icon/real_icon/vlan_blue.png


BIN
src/assets/icon/real_icon/vlan_red.png


BIN
src/assets/icon/real_icon/vlan_yellow.png


BIN
src/assets/icon/real_icon/wifi.png


BIN
src/assets/icon/real_icon/实回路信息.png


BIN
src/assets/icon/real_icon/数据集.png


BIN
src/assets/icon/real_icon/数据集成员.png


BIN
src/assets/icon/real_icon/遥信.png


BIN
src/assets/icon/real_icon/遥控.png


BIN
src/assets/icon/real_icon/遥测.png


BIN
src/assets/icon/real_icon/遥脉.png


BIN
src/assets/image/squer_crc.png


BIN
src/assets/image/squer_ied.png


BIN
src/assets/image/squer_scd.png


+ 21 - 3
src/pages/components/draw/DrawDesigns.vue

@@ -12,6 +12,7 @@ import LogicFlow from "@logicflow/core";
 import cid from '@/api/cid/cid'
 import systemRow from '@/api/systemRow';
 import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
 import { DndPanel, SelectionSelect, Group, Menu, MiniMap, regeister, Snapshot, lfJson2Xml, lfXml2Json } from "@logicflow/extension";
 import "@logicflow/core/dist/style/index.css";
 import "@logicflow/extension/lib/style/index.css";
@@ -44,9 +45,14 @@ export default {
         needName: {
             type: String,
             required: true
+        },
+        coolObj: {
+            type: Object,
+            required: true
         }
     },
     setup(props, { emit }) {
+        let router = useRouter()
         const container = ref();
         const lf = ref();
         let needColor = props.lineMenuColor
@@ -63,6 +69,7 @@ export default {
         let coolId = ref('')
         let coolObj = ref({})
         let coolName = ref('')
+        let copyObj = ref({})//整个模型属性
         watch(() => props.lineMenuColor, (newVal) => {
             copyColor.value = newVal
         })
@@ -89,6 +96,9 @@ export default {
         watch(() => props.needName, (newVal) => {
             coolName.value = newVal
         })
+        watch(() => props.coolObj, (newVal) => {
+            copyObj.value = newVal
+        })
         function blue() {
             lf.value.setTheme({
                 baseEdge: {
@@ -117,7 +127,6 @@ export default {
             // lf.value.getSnapshot()//保存为图片
             const xml = lfJson2Xml(lf.value.getGraphData());
             const data = lfXml2Json(lf.value.getGraphData())
-            console.log(xml, 's');
             if (props.nowLook == null) {
                 ElMessage({
                     type: "error",
@@ -127,7 +136,7 @@ export default {
             } else {
                 cid.saveMap(
                     {
-                        id: coolObj.value.id - 0,
+                        id: copyObj.value.id - 0,
                         model_name: coolName.value,
                         vol_id: coolObj.value.id - 0,
                         line_link_style: coolId.value - 0,
@@ -135,7 +144,14 @@ export default {
                         area_type: "116329",
                     }
                 ).then(res => {
-                    console.log(res, 'saveMap');
+                    if (res.code == 0) {
+                        ElMessage({
+                            type: "success",
+                            message: "保存成功!",
+                            duration: 2000,
+                        })
+                        window.location.reload()
+                    }
                 })
             }
         }
@@ -168,6 +184,7 @@ export default {
             coolObj.value = props.needObj
             coolId.value = props.needId
             coolName.value = props.needName
+            copyObj.value = props.coolObj
             systemRow.getChildren({ code: "area_type" }).then(res => {
                 console.log(res, 'sss');
             })
@@ -305,6 +322,7 @@ export default {
             needMap,
             coolId,
             coolName,
+            copyObj,
         }
     },
 }

+ 6 - 0
src/pages/login/LoginNow.vue

@@ -97,6 +97,12 @@ export default {
             windowEx.Min()
         }
         onMounted(() => {
+            // window.onload = function () {
+            //     // 设置定时器,在 5000 毫秒(即 5 秒)后执行刷新操作
+            //     setTimeout(function () {
+            //         location.reload(); // 执行页面刷新
+            //     }, 100); // 5000 毫秒 = 5 秒
+            // };
         })
         return {
             encryptPassword,

+ 3 - 3
src/pages/netStructPicture/components/CidTree.vue

@@ -77,8 +77,8 @@ export default {
         function tagClick(row, num) {
             tagChoose.value = num
             needName.value = row.desc
-            cid.getIntent({scd_id:324000088,ied_name:row.desc}).then(res=>{
-                // console.log(res,'网络');
+            cid.findFile({scd_id:316000086,ied_name:row.desc,pageno:1,pagesize:10,station_id:861}).then(res=>{
+                console.log(res,'文件');
             })
             emit('treeBack',needName.value)
         }
@@ -86,7 +86,7 @@ export default {
             console.log(e,'eee');
         }
         onMounted(() => {
-            cid.getAll({ scd_id: 324000088, ied_name: "" }).then(res => {
+            cid.getAll({ scd_id: 316000086, ied_name: "" }).then(res => {
                 tagList.value = res.data
             })
         })

+ 24 - 28
src/pages/netStructPicture/components/Gsix.vue

@@ -15,7 +15,6 @@
                     <img style="width: 80px;height: 80px;border: 1px dashed gray;" src="../../../assets/image/goose.png"
                         alt="">
                     <p>GOOSE通信参数</p>
-
                 </div>
                 <div class="mainDiv" id="mainTwo">
                     <img style="width: 80px;height: 80px;border: 1px dashed gray;" src="../../../assets/image/goose.png"
@@ -46,7 +45,7 @@
                 </div>
             </div>
         </div>
-        <div id="rightBox" >
+        <div id="rightBox">
             <!-- 右左 -->
             <div id="topRight">
                 <div class="tightDiv" id="ditOne">
@@ -93,7 +92,7 @@
                 <div id="upFile">
                     <img style="width: 80px;height: 80px;border: 1px dashed gray;" src="../../../assets/image/squer.png"
                         alt="">
-                    <p class="" style="">上传文件名称</p>
+                    <p class="" style="">{{ antherName }}</p>
                 </div>
             </div>
         </div>
@@ -124,14 +123,26 @@ export default {
         mustVal: {
             type: Boolean,
             required: true
+        },
+        arrName: {
+            type: String,
+            required: true
+        },
+        upName: {
+            type: String,
+            required: true
         }
     },
     setup(props, { emit }) {
         let leaderLines = [];//控制线条显示
         let iedName = ref('')
-        watch(() => props.backName, (newVal) => {
+        let antherName = ref('')
+        watch(() => props.arrName, (newVal) => {
             iedName.value = newVal
         })
+        watch(() => props.upName, (newVal) => {
+            antherName.value = newVal
+        })
         // 判断增删改角标
         function checkType(type) {
             if (type == 'zeng') {
@@ -143,6 +154,8 @@ export default {
             }
         }
         onMounted(() => {
+            iedName.value = props.arrName
+            antherName.value = props.upName
             let goose = document.getElementById('goose')//左盒子开始元素
             let mainOne = document.getElementById('mainOne')//左盒子中部上半区元素
             let mainTwo = document.getElementById('mainTwo')//左盒子中部中间元素
@@ -166,7 +179,7 @@ export default {
             leaderLines.push(new LeaderLine(goose, mainOne, { color: 'gray', size: 2, path: "grid" }))//左连中
             leaderLines.push(new LeaderLine(goose, mainTwo, { color: 'gray', size: 2, path: "grid" }))//左连中
             leaderLines.push(new LeaderLine(goose, mainThree, { color: 'gray', size: 2, path: "grid" }))//左连中
-            leaderLines.push(new LeaderLine(mainTwo, botOne, { color: 'orange', size: 2, path: "grid", endLabel: "装置IP",startSocket: "center", }))//中连右
+            leaderLines.push(new LeaderLine(mainTwo, botOne, { color: 'orange', size: 2, path: "grid", endLabel: "装置IP", startSocket: "center", }))//中连右
             leaderLines.push(new LeaderLine(mainTwo, botTwo, { color: 'orange', size: 2, path: "grid", endLabel: "掩码", startLabel: "修改" }))//中连右
             leaderLines.push(new LeaderLine(mainTwo, botThree, { color: 'orange', size: 2, path: "grid", endLabel: '网关' }))//中连右
             // 右部分连线
@@ -180,26 +193,6 @@ export default {
             leaderLines.push(new LeaderLine(fitThree, ditFour, { color: 'red', size: 2, path: "grid" }))//中连左
             leaderLines.push(new LeaderLine(mainThree, ditFour, { color: 'red', size: 2, path: "grid", startLabel: "删除", endLabel: "MAC地址" }))//中连左
             leaderLines.push(new LeaderLine(mainThree, ditFive, { color: 'red', size: 2, path: "grid", endLabel: "VLAN-IP" }))//中连左
-            // 子元素连线
-            // leaderLines.push(new LeaderLine(botOne, ditOne, {
-            //         color: "orange",//连接线颜色
-            //         size: 10,//连接线宽度
-            //         path: "grid",//连接线样式
-            //         startSocket: "center",//开始链接元素位置
-            //         endSocket: "center",//结束链接元素位置
-            //         dash: {
-            //             // 绘制线的长度 'auto'=size*2
-            //             len: 1,
-            //             // 绘制线之间的间隙 'auto'=size
-            //             gap: 6,
-            //             // 线条滚动 true 是(或者{duration: 1000, timing: 'linear'},详见动画选项), false 否(默认)
-            //             animation: {
-            //                 duration: 800,//动画速度
-            //                 timing: "linear",
-            //             },
-            //         },//动画开启
-            //         endPlug:'behind',
-            // }))
             //  公共连线
             // 连线开始点样式 
             // disc 圆形 , square 方形 , arrow1 箭头1 , arrow2 箭头2 , arrow3 箭头3 , 
@@ -237,6 +230,7 @@ export default {
         return {
             iedName,
             checkType,
+            antherName,
         }
     }
 }
@@ -249,9 +243,12 @@ h2 {
     padding: 0;
     margin: 0;
 }
-p,h2{
+
+p,
+h2 {
     font-size: 12px;
 }
+
 .bigBox {
     width: 99%;
     height: 96%;
@@ -421,5 +418,4 @@ p,h2{
     position: absolute;
     top: -5px;
     right: 0px;
-}
-</style>
+}</style>

+ 310 - 0
src/pages/netStructPicture/components/scdMap.vue

@@ -0,0 +1,310 @@
+<template>
+    <div>
+        <div class="fileBox">
+            <div>
+                <span style="border-right: 1px solid black;padding-right: 200px;">基准文件:{{ chicken }}</span>
+            </div>
+            <div>
+                <span>对比文件:{{ kun }}</span>
+            </div>
+        </div>
+        <div class="mapBox">
+            <div class="scdBox">
+                <div>
+                    <img src="../../../assets/image/squer_scd.png" alt="">
+                    <p>SCD版本</p>
+                </div>
+                <div>
+                    <div id="oldScd">
+                        <img src="../../../assets/icon/cilce_gray.png" alt="">
+                        <span>V1.1.0</span>
+                    </div>
+                    <div id="newScd">
+                        <img src="../../../assets/icon/clice_blue.png" alt="">
+                        <span>V1.1.1</span>
+                    </div>
+                </div>
+            </div>
+            <div class="crcBox">
+                <div>
+                    <img src="../../../assets/image/squer_crc.png" alt="">
+                    <p>CRC</p>
+                </div>
+                <div>
+                    <div id="oldCrc">
+                        <img src="../../../assets/icon/cilce_gray.png" alt="">
+                        <span>1000000111100000</span>
+                    </div>
+                    <div id="newCrc">
+                        <img src="../../../assets/icon/clice_blue.png" alt="">
+                        <span>1000000111100022</span>
+                    </div>
+                </div>
+            </div>
+            <div class="iedBox">
+                <div id="oldIed">
+                    <img src="../../../assets/image/squer_ied.png" alt="">
+                    <p>IED</p>
+                </div>
+                <div id="newIed">
+                    <p id="addId">
+                        <el-icon style="color: #1D48E8;font-size: 18px;display: block;">
+                            <CirclePlus />
+                        </el-icon>
+                        <span style="display: block;color: #1D48E8;">新增(5)</span>
+                    </p>
+                    <p id="editId">
+                        <el-icon style="color: #FECC2A;font-size: 18px;display: block;">
+                            <EditPen />
+                        </el-icon>
+                        <span style="display: block;color: #FECC2A;">修改(10)</span>
+                    </p>
+                    <p id="delId">
+                        <el-icon style="color: red;font-size: 18px;display: block;">
+                            <Delete />
+                        </el-icon>
+                        <span style="display: block;color: red;">删除(2)</span>
+                    </p>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { ref, onMounted, toRefs, watch, onBeforeUnmount } from 'vue';
+import LeaderLine from '../../../../public/leader-line.min.js';
+import scdCheck from '@/api/scdCheck/scdCheck'
+import image from "../utils/image"
+export default {
+    props: {
+        antherBack: {
+            type: Array,
+            required: true
+        },
+    },
+    setup(props, { emit }) {
+        let arrNew = ref([])
+        let chicken = ref('')
+        let kun = ref('')
+        let lineList = []//线条显示
+        watch(() => props.antherBack, (newVal) => {
+            arrNew.value = newVal//监听传递数据变化
+            if (arrNew.value.length == 1) {
+                chicken.value = arrNew.value[0].scd_name
+            }
+            if (arrNew.value.length == 2) {
+                chicken.value = arrNew.value[0].scd_name
+                kun.value = arrNew.value[1].scd_name
+            }
+        })
+        function lastList() {//初始化数据
+            arrNew.value = props.antherBack
+            if (arrNew.value.length == 1) {
+                chicken.value = arrNew.value[0].scd_name
+            }
+            if (arrNew.value.length == 2) {
+                chicken.value = arrNew.value[0].scd_name
+                kun.value = arrNew.value[1].scd_name
+            }
+        }
+        function lineWrite() {
+            let oldScd = document.getElementById("oldScd")
+            let newScd = document.getElementById("newScd")
+            let oldCrc = document.getElementById("oldCrc")
+            let newCrc = document.getElementById("newCrc")
+            let oldIed = document.getElementById("oldIed")
+            let newIed = document.getElementById("newIed")
+            let addId = document.getElementById("addId")
+            let editId = document.getElementById('editId')
+            let delId = document.getElementById("delId")
+            lineList.push(new LeaderLine(oldScd, newScd, {
+                color: "blue",//连接线颜色
+                size: 10,//连接线宽度
+                path: "straight",//连接线样式
+                startSocket: "bottom",//开始链接元素位置
+                endSocket: "top",//结束链接元素位置
+                dash: {
+                    // 绘制线的长度 'auto'=size*2
+                    len: 1,
+                    // 绘制线之间的间隙 'auto'=size
+                    gap: 6,
+                    // 线条滚动 true 是(或者{duration: 1000, timing: 'linear'},详见动画选项), false 否(默认)
+                    animation: {
+                        duration: 800,//动画速度
+                        timing: "linear",
+                    },
+                },//动画开启
+                endPlug: 'arrow3',//结束箭头
+                endPlugSize: 0.5,//结束箭头size
+            }))
+            lineList.push(new LeaderLine(oldCrc, newCrc, {
+                color: "blue",//连接线颜色
+                size: 10,//连接线宽度
+                path: "straight",//连接线样式
+                startSocket: "bottom",//开始链接元素位置
+                endSocket: "top",//结束链接元素位置
+                dash: {
+                    // 绘制线的长度 'auto'=size*2
+                    len: 1,
+                    // 绘制线之间的间隙 'auto'=size
+                    gap: 6,
+                    // 线条滚动 true 是(或者{duration: 1000, timing: 'linear'},详见动画选项), false 否(默认)
+                    animation: {
+                        duration: 800,//动画速度
+                        timing: "linear",
+                    },
+                },//动画开启
+                endPlug: 'arrow3',//结束箭头
+                endPlugSize: 0.5,//结束箭头size
+            }))
+            lineList.push(new LeaderLine(oldIed, addId, {
+                color: "gray",//连接线颜色
+                size: 2,//连接线宽度
+                path: "grid",//连接线样式
+                startSocket: "bottom",//开始链接元素位置
+                endSocket: "left",//结束链接元素位置
+                endPlug: 'disc',//结束箭头
+                endPlugSize: 2,//结束箭头size
+            }))
+            lineList.push(new LeaderLine(oldIed, editId, {
+                color: "gray",//连接线颜色
+                size: 2,//连接线宽度
+                path: "grid",//连接线样式
+                startSocket: "bottom",//开始链接元素位置
+                endSocket: "left",//结束链接元素位置
+                endPlug: 'disc',//结束箭头
+                endPlugSize: 2,//结束箭头size
+            }))
+            lineList.push(new LeaderLine(oldIed, delId, {
+                color: "gray",//连接线颜色
+                size: 2,//连接线宽度
+                path: "grid",//连接线样式
+                startSocket: "bottom",//开始链接元素位置
+                endSocket: "left",//结束链接元素位置
+                endPlug: 'disc',//结束箭头
+                endPlugSize: 2,//结束箭头size
+            }))
+        }
+        onMounted(() => {
+            lastList()
+            // lineWrite()
+            setTimeout(()=>{
+                lineWrite()
+            },1000)
+        })
+        onBeforeUnmount(() => {
+            lineList.forEach(line => line.remove());//清除连线
+        })
+        return {
+            chicken,//基准文件
+            kun,//对比文件
+            arrNew,//传递数组
+            lastList,//初始化数据
+            lineList,//线条显示
+            lineWrite,//画线函数
+        }
+    }
+}
+</script>
+
+<style>
+p {
+    margin: 0;
+    padding: 0;
+}
+
+.fileBox {
+    width: 90%;
+    height: calc(100vh - 900px);
+    background-color: white;
+    margin: 10px auto;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+}
+
+.mapBox {
+    width: 90%;
+    height: calc(100vh - 350px);
+    margin: 0 auto;
+    display: flex;
+    justify-content: space-around;
+    align-items: flex-start;
+}
+
+.scdBox {
+    width: 33%;
+    height: auto;
+    text-align: center;
+    /* border: 1px solid red; */
+}
+
+.crcBox {
+    width: 33%;
+    height: auto;
+    text-align: center;
+    /* border: 1px solid red; */
+}
+
+.iedBox {
+    width: 33%;
+    height: auto;
+    text-align: center;
+    /* border: 1px solid red; */
+    position: relative;
+}
+
+#newIed {
+    position: absolute;
+    top: 100px;
+    right: 0px;
+}
+
+#oldScd {
+    margin-bottom: 40px;
+}
+
+#oldCrc {
+    margin-bottom: 40px;
+}
+
+#addId {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 112px;
+    height: 40px;
+    border: 1px dashed #1D48E8;
+    background-color: rgb(239, 243, 255);
+    border-radius: 5px;
+    margin-bottom: 20px;
+    cursor: pointer;
+}
+
+#editId {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 112px;
+    height: 40px;
+    border: 1px dashed #FECC2A;
+    background-color: rgb(255, 251, 242);
+    border-radius: 5px;
+    margin-bottom: 20px;
+    cursor: pointer;
+}
+
+#delId {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 112px;
+    height: 40px;
+    border: 1px dashed red;
+    background-color: rgb(255, 236, 236);
+    border-radius: 5px;
+    margin-bottom: 20px;
+    cursor: pointer;
+}
+</style>

+ 126 - 0
src/pages/netStructPicture/components/scdTree.vue

@@ -0,0 +1,126 @@
+<template>
+    <div>
+        <div class="btnBox">
+            <el-button type="primary" plain @click="checkNow">
+                <el-icon>
+                    <Plus />
+                </el-icon>
+                新的比对</el-button>
+            <el-button type="primary" plain @click="reloadCheck">
+                <el-icon>
+                    <RefreshLeft />
+                </el-icon>
+                重新比对</el-button>
+            <el-button type="primary" plain @click="excelPort">
+                <el-icon>
+                    <DocumentAdd />
+                </el-icon>
+                导出所有结果</el-button>
+        </div>
+        <div class="tableBox">
+            <el-table ref="multipleTableRef" :data="tableList" style="width: 100%;height: calc(100vh - 320px);" stripe
+                @selection-change="handleSelectionChange" @select-all="chooseAll">
+                <el-table-column type="selection" width="55" />
+                <el-table-column label="对比scd" width="190" :show-overflow-tooltip="true">
+                    <template #default="scope">{{ scope.row.name }}</template>
+                </el-table-column>
+                <el-table-column property="CREATED_TIME" label="时间" width="auto" :show-overflow-tooltip="true" />
+                <el-table-column fixed="right" label="操作" width="120">
+                    <template #default="scope">
+                        <el-button link type="primary" size="small" @click="searchScdCheck(scope.row)"><el-icon>
+                                <View />
+                            </el-icon>查看</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+        <div>
+            <LookScd v-if="lookScdModal" :lookScdModal="lookScdModal" :aktType="aktType" @lookScdBack="lookScdBack"></LookScd>
+        </div>
+    </div>
+</template>
+
+<script>
+import { ref, onMounted, toRefs, watch, nextTick } from 'vue';
+import scdCheck from '@/api/scdCheck/scdCheck'
+import scd from '@/api/scd';
+import systemRow from '@/api/systemRow';
+import { ElMessage } from 'element-plus';
+import LookScd from '../modalCom/LookScd.vue';
+export default {
+    setup(props, { emit }) {
+        let tableList = ref([])
+        let multipleTableRef = ref()
+        let alreadyTriggered = ref(false)
+        let scdid = ref([])
+        const loading = ref(false)
+        let lookScdArr = ref([])
+        let lookScdModal = ref(false)
+        function handleSelectionChange(e) {//复选
+        }
+        function chooseAll(e) {//全选
+        }
+        function checkNow() {//scd比对
+            lookScdModal.value = true
+        }
+        function excelPort() {//导出excel
+            systemRow.portExcel({
+                code: "scd-comp-result"
+            }).then(res => {
+                console.log(res, 'port');
+                if (res.data) {
+                    return
+                } else {
+                    ElMessage({
+                        message: res.msg,
+                        type: "info"
+                    })
+                }
+            })
+        }
+        function reloadCheck() {//重新比对
+            checkNow()
+        }
+        function searchScdCheck(row){//查看scd对比
+            scdCheck.scdResult({comp_id:row.id}).then(res=>{
+                console.log(res,'对比详细');
+            })
+        }
+        function lookScdBack(data,row) {//选择scd文件模态框返回数据
+            lookScdModal.value = data
+            lookScdArr.value = row
+            emit('scdTreeBack',lookScdArr.value)
+        }
+        function aktType(){//初始化数据
+            scdCheck.flashStation({ station_id: 861 }).then(res => {//获取差异纪录列表
+                tableList.value = res.data
+            })
+        }
+        onMounted(() => {
+            aktType()
+        })
+        return {
+            tableList,//表格内容
+            handleSelectionChange,//表格复选
+            chooseAll,//表格全选
+            multipleTableRef,//表格ref
+            alreadyTriggered,//控制开关
+            scdid,//选择的scd文件数组
+            checkNow,//开始比对
+            loading,//正在加载
+            excelPort,//导出excel
+            reloadCheck,//重新比对
+            lookScdModal,//查看scd文件的模态框开关
+            lookScdBack,//选择scd文件模态框返回函数
+            searchScdCheck,//表格查看按钮
+            lookScdArr,
+            aktType,//初始化数据
+        }
+    },
+    components: {
+        LookScd,
+    }
+}
+</script>
+
+<style scoped></style>

+ 103 - 13
src/pages/netStructPicture/index.vue

@@ -9,7 +9,7 @@
       </div>
       <div class="mostHead" v-if="activeName == 'first' && activeNav == 0">
         <h2 style="display: inline-block;margin-right: 2px;font-size: 20px;">CID文件一次性检测</h2>
-        <el-button type="primary" plain>结果导出Excel</el-button>
+        <el-button type="primary" plain @click="portExcel">结果导出Excel</el-button>
         <span class="closeX" @click="closeX">×</span>
       </div>
       <el-tab-pane label="网络结构图" name="first">
@@ -24,16 +24,16 @@
             <div class="abBox">
               <div>
                 <span style="border-right: 1px solid black;padding-right: 300px;font-size: 12px;">
-                  基准文件:asfsdgagdgf.cid
+                  基准文件:{{ arrName }}
                 </span>
               </div>
               <div>
                 <span style="font-size: 12px;">
-                  对比文件:asfsdgagdgf.cid
+                  对比文件:{{ upName }}
                 </span>
               </div>
               <div class="uploadBox">
-                <el-upload ref="upload" class="upload-demo" :http-request="nowUpload" :limit="1"
+                <el-upload ref="upload" class="upload-demo" :http-request="nowUpload" :limit="2"
                   element-loading-text="上传中..." element-loading-background="rgba(255, 255, 255, 0.8)"
                   :on-remove="handleRemove" :on-change="fileSuccess" :show-file-list="false">
                   <template #trigger>
@@ -42,7 +42,23 @@
                 </el-upload>
               </div>
             </div>
-            <Gsix :activeName="activeName" :activeNav="activeNav" :backName="backName" :mustVal="mustVal"></Gsix>
+            <Gsix :activeName="activeName" :activeNav="activeNav" :backName="backName" :mustVal="mustVal"
+              :arrName="arrName" :upName="upName"></Gsix>
+          </div>
+        </div>
+        <div class="scdCheck" v-if="activeName == 'first' && activeNav == 1">
+          <div class="mostHead" v-if="activeName == 'first' && activeNav == 1">
+            <h2 style="display: inline-block;margin-right: 2px;font-size: 20px;">SCD文件一次性检测</h2>
+            <span class="closeX" @click="closeX">×</span>
+          </div>
+          <!-- 内容 -->
+          <div style="width: 100%;display: flex;justify-content: space-around;align-items: center;margin-top: 5px;">
+            <div class="treeBtn">
+              <scdTree @scdTreeBack="scdTreeBack"></scdTree>
+            </div>
+            <div class="scdMap">
+              <scdMap :antherBack="antherBack"></scdMap>
+            </div>
           </div>
         </div>
       </el-tab-pane>
@@ -53,12 +69,16 @@
   
 
 <script setup>
-import { ref } from "vue";
+import { ref, watch, onMounted } from "vue";
 import netWork from "./components/netWork";
 import CidTree from "./components/CidTree.vue";
 import Gsix from "./components/Gsix.vue";
+import scdTree from "./components/scdTree.vue";
+import scdMap from "./components/scdMap.vue"
 import { useRoute } from 'vue-router';
 import cid from "@/api/cid/cid";
+import { ElMessage } from "element-plus";
+import systemRow from "@/api/systemRow";
 const activeName = ref("first");//默认展示网络结构图
 const navtopData = ref([
   { name: "CID一致性校核" },
@@ -70,7 +90,17 @@ const navtopData = ref([
 const activeNav = ref(null);
 const backName = ref('')//树组件返回名称
 let mustVal = ref(false)
-let fileWater = ref({})//文件流
+let fileWater = ref({})//基准文件流
+let fileCase = ref({})//对比文件流
+let upName = ref('')//上传的文件名称
+let arrName = ref('')//基准的文件名称
+let fileArr = ref([])//一对文件
+let antherBack = ref([])
+watch(() => antherBack.value, (newVal) => {
+  antherBack.value = newVal
+}, {
+  deep: true
+})
 const clickNav = (navIndex) => {  //点击导航栏事件
   activeNav.value = navIndex;
 }
@@ -88,18 +118,57 @@ const closeX = () => {
   activeNav.value = null
 }
 const nowUpload = (file, e) => {
-  console.log(file.file, '上传');
-  fileWater.value = file.file
-  cid.fileUpload({ station_id: 1, file: file.file }).then(res => {
-    console.log(res, '文件上传');
-  })
+  if (fileArr.value.length == 2) {
+    ElMessage({
+      type: "error",
+      message: "已经有两个对比文件了!"
+    })
+
+  } else {
+    fileArr.value.push(file.file)
+    fileWater.value = fileArr.value[0]//基准文件
+    arrName.value = fileArr.value[0].name
+    cid.fileUpload({ station_id: 1, file: fileWater.value }).then(res => {
+      console.log(res, '文件上传1');
+    })
+    if (fileArr.value.length == 2) {
+      upName.value = fileArr.value[1].name//对比文件
+      fileCase.value = fileArr.value[1]
+      cid.fileUpload({ station_id: 1, file: fileCase.value }).then(res => {
+        console.log(res, '文件上传2');
+      })
+      systemRow.scdLockNow({
+        type: "cid",
+        station_id: 1,
+        ids: fileCase.value.uid + ',' + fileWater.value.uid
+      }).then(res => {
+        console.log(res, '对比');
+      })
+    }
+  }
 }
 const handleRemove = (file, e) => {
   console.log(file, e, '删除');
 }
 const fileSuccess = (file, e) => {
   mustVal.value = true
-
+}
+function scdTreeBack(data) {
+  antherBack.value = data
+}
+const portExcel = () => {
+  systemRow.portExcel({
+    code: "scd-comp-result"
+  }).then(res => {
+    if (res.data) {
+      return
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: "info"
+      })
+    }
+  })
 }
 </script>
 
@@ -208,4 +277,25 @@ $height: 40px;
   top: 0px;
   right: -100px;
 }
+
+.scdCheck {
+  width: 97.5%;
+  height: calc(100vh - 205px);
+  margin-left: 20px;
+  margin-top: 5px;
+  // border: 1px solid red;
+}
+
+.treeBtn {
+  width: 35%;
+  height: calc(100vh - 205px);
+  // border: 1px solid rebeccapurple;
+}
+
+.scdMap {
+  width: 65%;
+  height: calc(100vh - 205px);
+  // border: 1px solid teal;
+  background-color: #F6F8FA;
+}
 </style>

+ 20 - 0
src/pages/netStructPicture/modalCom/AddNum.vue

@@ -0,0 +1,20 @@
+<template>
+    <div>
+        
+    </div>
+</template>
+
+<script>
+import { ref,onMounted,toRefs,watch } from 'vue';
+export default {
+    setup () {
+        
+
+        return {}
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 155 - 0
src/pages/netStructPicture/modalCom/LookScd.vue

@@ -0,0 +1,155 @@
+<template>
+    <div>
+        <el-dialog v-model="dialogVisible" title="选择SCD文件" width="40%" @close="handleClose">
+            <div class="misBox" v-if="loading" v-loading="loading" element-loading-text="正在比对中,为防止误操作将禁止页面点击"
+                element-loading-background="rgba(122, 122, 122, 0.8)">
+            </div>
+            <el-table ref="multipleTableRef" :data="tableList" style="width: 100%;height: calc(100vh - 520px);" stripe
+                @selection-change="handleSelectionChange" @select-all="chooseAll">
+                <el-table-column type="selection" width="55" />
+                <el-table-column label="比对scd" width="auto" :show-overflow-tooltip="true">
+                    <template #default="scope">{{ scope.row.scd_name }}</template>
+                </el-table-column>
+                <el-table-column property="CREATED_TIME" label="时间" width="auto" :show-overflow-tooltip="true" />
+                <!-- <el-table-column fixed="right" label="操作" width="120">
+                    <template #default>
+                        <el-button link type="primary" size="small"><el-icon>
+                                <View />
+                            </el-icon>查看</el-button>
+                    </template>
+                </el-table-column> -->
+            </el-table>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button @click="cancels">取消</el-button>
+                    <el-button type="primary" @click="sureLook">
+                        确定
+                    </el-button>
+                </span>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { ref, onMounted, toRefs, watch } from 'vue';
+import scd from '@/api/scd';
+import scdCheck from '@/api/scdCheck/scdCheck'
+import { ElMessage } from 'element-plus';
+export default {
+    props: {
+        lookScdModal: {
+            type: Boolean,
+            required: true
+        },
+        aktType:{
+            type:Function,
+            required:true
+        }
+    },
+    setup(props, { emit }) {
+        let dialogVisible = ref(false)//模态框开关
+        let tableList = ref([])//表格数据
+        let alreadyTriggered = ref(false)//全选开关
+        let scdid = ref([])//表格选择的scd数组
+        let multipleTableRef = ref()
+        let loading = ref(false)//loading动画
+        function handleClose() {//模态框关闭方法
+            dialogVisible.value = false
+            emit("lookScdBack", dialogVisible.value)
+        }
+        function lastLook() {//确定
+            if (scdid.value.length < 2) {
+                ElMessage({
+                    type: 'warning',
+                    message: "请选择两个scd文件后点击"
+                })
+            } else {
+                loading.value = true
+                let idArr = scdid.value.map(item => {
+                    return item.id
+                })
+                // idArr = idArr.toString(idArr)
+                scdCheck.scdStart({
+                    type: 'scd',
+                    station_id: 861,
+                    source_scd_id: idArr[0] - 0,
+                    target_scd_id: idArr[1] - 0,
+                    comp_id: 0
+                }).then(res => {
+                    if (res.code == 0) {
+                        loading.value = false
+                        props.aktType()
+                        dialogVisible.value = false
+                        emit("lookScdBack", dialogVisible.value,scdid.value)
+                    }
+                })
+            }
+        }
+        function motType() {//初始化数据
+            dialogVisible.value = props.lookScdModal
+            scd.getAllScd({ stationid: 861, pageno: 1, pagesize: 20 }).then(res => {//获取所有scd文件
+                tableList.value = res.data
+            })
+        }
+        function handleSelectionChange(e) {//复选
+            if (e.length > 2 && !alreadyTriggered.value) {
+                alreadyTriggered.value = true;
+                let select = e.slice(0, 2);
+                ElMessage({
+                    type: "warning",
+                    message: "默认只会留存前两个选中的scd",
+                });
+                setTimeout(() => {
+                    alreadyTriggered.value = false;
+                }, 100);
+            } else {
+                scdid.value = e
+            }
+        }
+        function chooseAll(e) {//全选
+            if (e.length > 2) {
+                ElMessage({
+                    type: "warning",
+                    message: "默认只会选中前两个SCD文件,请手动选择"
+                })
+                let select = e.slice(2)
+                select.forEach((item) => {
+                    //取消选择超出的项
+                    multipleTableRef.value.toggleRowSelection(item, false);
+                });
+                scdid.value = e
+            }
+        }
+        onMounted(() => {
+            motType()
+        })
+        return {
+            dialogVisible,
+            handleClose,//模态框大关闭
+            sureLook: lastLook,//确认按钮
+            cancels: handleClose,//取消
+            motType,//初始化数据
+            tableList,//表格数据
+            handleSelectionChange,
+            chooseAll,
+            alreadyTriggered,
+            scdid,//选择的scd文件数组
+            multipleTableRef,
+            loading,
+        }
+    }
+}
+</script>
+
+<style scoped>
+.misBox {
+    width: 100vw;
+    height: 100vh;
+    position: fixed;
+    top: 0;
+    right: 0;
+    /* background-color: rgba(255, 255, 255, 0.5); */
+    z-index: 200 !important;
+}
+</style>

+ 8 - 0
src/pages/netStructPicture/utils/image.js

@@ -0,0 +1,8 @@
+import scds from '../../../assets/image/squer_scd.png'
+import crcs from '../../../assets/image//squer_crc.png'
+import ieds from '../../../assets/image//squer_ied.png'
+export default{
+    scds,
+    crcs,
+    ieds,
+}

+ 7 - 3
src/pages/system/SystemPage.vue

@@ -22,7 +22,8 @@
                 <!-- 切换box -->
                 <div class="changeBox">
                     <LitLine v-if="selectIndex == 0"></LitLine>
-                    <InsideModule v-if="selectIndex == 1 && ourNum == 1" :tfType="tfType" :insideNeed="insideNeed" :lineId="lineId" :setName="setName"></InsideModule>
+                    <InsideModule v-if="selectIndex == 1 && ourNum == 1" :tfType="tfType" :insideNeed="insideNeed"
+                        :lineId="lineId" :setName="setName" :setId="setId"></InsideModule>
                     <SetModule v-if="selectIndex == 1 && ourNum == 0" @backNum="backNum" :fuckList="fuckList"></SetModule>
                 </div>
             </div>
@@ -64,6 +65,7 @@ export default {
         let insideNeed = ref({})//画图返回数据
         let lineId = ref()//linetree返回id
         let setName = ref('')//setmodule返回name
+        let setId = ref('')
         function tagChange(row, num) {//标签切换
             selectIndex.value = num
             if (num == 1) {
@@ -74,13 +76,14 @@ export default {
                 tag.isSelected = tag.id === row.id;
             });
         }
-        function listBack(data,id) {
+        function listBack(data, id) {
             fuckList.value = data
             lineId.value = id
         }
-        function backNum(data,name) {
+        function backNum(data, name, row) {
             ourNum.value = data
             setName.value = name
+            setId.value = row
         }
         function mtBack(data, row) {
             insideNeed.value = row
@@ -102,6 +105,7 @@ export default {
             insideNeed,
             lineId,
             setName,
+            setId,
         }
     },
     components: {

+ 12 - 1
src/pages/system/components/InsideModule.vue

@@ -47,7 +47,8 @@
                     <div class="tableBox">
                         <!-- 建议使用这个 -->
                         <DrawDesigns ref="designsRef" :lineMenuColor="lineMenuColor" :needObj="needObj" :fatX="fatX"
-                            :fatY="fatY" :nowLook="nowLook" :needId="needId" :needName="needName" @backxy="backxy"></DrawDesigns>
+                            :fatY="fatY" :nowLook="nowLook" :needId="needId" :needName="needName" :coolObj="coolObj"
+                            @backxy="backxy"></DrawDesigns>
                     </div>
                 </div>
             </div>
@@ -80,6 +81,10 @@ export default {
         setName: {
             type: String,
             required: true
+        },
+        setId: {
+            type: Object,
+            required: true
         }
     },
     setup(props, { emit }) {
@@ -93,6 +98,7 @@ export default {
         let needObj = ref({})
         let needId = ref('')
         let needName = ref('')
+        let coolObj = ref({})
         watch(() => props.tfType, (newVal) => {
             nowLook.value = newVal
         })
@@ -105,11 +111,15 @@ export default {
         watch(() => props.setName, (newVal) => {
             needName.value = newVal
         })
+        watch(() => props.setId, (newVal) => {
+            coolObj.value = newVal
+        })
         function searchModule() {
             needObj.value = props.insideNeed
             needId.value = props.lineId
             nowLook.value = result
             needName.value = props.setName
+            coolObj.value = props.setId//模型整个数据
         }
         function svClick() {
             lineMenuColor.value = '#255CE7'
@@ -173,6 +183,7 @@ export default {
             needObj,
             needId,
             needName,
+            coolObj,
         }
     },
     components: {

+ 12 - 10
src/pages/system/components/SetModule.vue

@@ -2,19 +2,19 @@
     <div>
         <div class="bigBox">
             <div style="text-align: center;">
-                <h2>间隔管理</h2>
+                <h2>模型管理</h2>
             </div>
             <div class="btnBox">
                 <el-button type="primary" plain @click="addNode"><el-icon>
                         <Plus />
-                    </el-icon>添加间隔</el-button>
+                    </el-icon>添加模型</el-button>
             </div>
             <div class='tableBox'>
                 <el-table :data="tableData" style="width: 100%" :stripe="true" @selection-change="tableChange">
                     <el-table-column type="selection" width="55" />
-                    <el-table-column fixed prop="model_name" label="间隔名称" width="auto" />
+                    <el-table-column fixed prop="model_name" label="模型名称" width="auto" />
                     <el-table-column prop="voltage_level_name" label="电压等级" width="auto" />
-                    <el-table-column prop="ied_types" label="间隔类型" width="auto" />
+                    <el-table-column prop="ied_types" label="模型类型" width="auto" />
                     <el-table-column fixed="right" label="操作" width="180">
                         <template #default="scope">
                             <el-button link type="primary" size="small" @click=""><el-icon>
@@ -28,7 +28,7 @@
                 </el-table>
             </div>
             <div>
-                <AddNode v-if="nodeMos" :nodeMos="nodeMos" @addBack="addBack"></AddNode>
+                <AddNode v-if="nodeMos" :nodeMos="nodeMos" :goMap="goMap" :needRow="needRow" @addBack="addBack"></AddNode>
             </div>
         </div>
     </div>
@@ -55,7 +55,8 @@ export default {
         ])
         let nodeMos = ref(false)//添加间隔模态框
         let kisNum = ref(0)
-        let { goMap } = toRefs(props)
+        let needRow = ref({})
+        // let { goMap } = toRefs(props)
         watch(()=>props.fuckList,(newVal)=>{
             tableData.value = newVal
         })
@@ -68,7 +69,7 @@ export default {
         function addNode() {
             nodeMos.value = true
         }
-        function cacl(row) {
+        function goMap(row) {
             kisNum.value = 1
             if (kisNum.value == 0) {
                 ElMessage({
@@ -77,8 +78,8 @@ export default {
                     duration: 1500
                 })
             }
-            console.log(row,'setmodule');
-            emit("backNum", kisNum.value,row.model_name)
+            needRow.value = row
+            emit("backNum", kisNum.value,row.model_name,needRow.value)
         }
         function addBack(data) {
             nodeMos.value = data
@@ -90,10 +91,11 @@ export default {
             tableData,
             tableChange,
             kisNum,
-            goMap: cacl,
+            goMap,
             nodeMos,
             addNode,
             addBack,
+            needRow,
         }
     },
     components: {

+ 60 - 18
src/pages/system/modalComp/AddNode.vue

@@ -2,16 +2,27 @@
     <div>
         <el-dialog v-model="dialogVisible" title="添加间隔" width="30%" @close="closes">
             <!--  -->
-            <el-form ref="ruleFormRef" :model="ruleForm" label-width="120px" class="demo-ruleForm" status-icon>
-                <el-form-item label="间隔名称" prop="name">
+            <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="120px" class="demo-ruleForm"
+                status-icon>
+                <el-form-item label="模型名称" prop="name">
+                    <el-input v-model="ruleForm.name"></el-input>
+                </el-form-item>
+                <el-form-item label="电压等级">
+                    <el-select @change="flashCase" v-model="ruleForm.flashName" placeholder="请选择间隔">
+                        <template v-for="(item, index) in flashLel">
+                            <el-option :label="item.name" :value="item.id" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="接线方式">
                     <el-select @change="moduleChange" v-model="ruleForm.linkStyle" placeholder="请选择间隔">
                         <template v-for="(item, index) in moduleList">
                             <el-option :label="item.name" :value="item.id" />
                         </template>
                     </el-select>
                 </el-form-item>
-                <el-form-item label="内置模型">
-                    <el-select @change="flashChange"  v-model="ruleForm.moduleId" placeholder="请选择内置模型">
+                <el-form-item label="模型类型">
+                    <el-select @change="flashChange" v-model="ruleForm.moduleId" placeholder="请选择内置模型">
                         <template v-for="(item, index) in selectList">
                             <el-option :label="item.name" :value="item.id" />
                         </template>
@@ -31,25 +42,39 @@
 </template>
 
 <script>
-import { ref, onMounted, toRefs, reactive } from 'vue';
+import { ref, onMounted, toRefs, reactive, watch } from 'vue';
 import systemRow from '@/api/systemRow';
 import litLine from '@/api/litLine';
+import cid from '@/api/cid/cid';
+import { ElMessage } from 'element-plus';
 export default {
     props: {
         nodeMos: {
             type: Boolean,
             required: true,
+        },
+        goMap: {
+            type: Function,
+            required: true
+        },
+        needRow: {
+            type: Object,
+            require: true
         }
     },
     setup(props, { emit }) {
         let dialogVisible = ref(false)//模态框显示
         let result = props.nodeMos
         let ruleForm = ref({
-            linkStyle: "",
-            moduleId: []
+            name: "",//模型名称
+            linkStyle: "",//接线方式
+            moduleId: '',//模型类型
+            flashName: ''//电压等级
         })
         let selectList = ref([])
         let moduleList = ref([])
+        let flashLel = ref([])
+        let coolRow = ref({})
         let rules = reactive({
             name: [
                 { required: true, message: '请输入名称', trigger: 'blur' },
@@ -60,18 +85,23 @@ export default {
                 }
             ]
         })
+        watch(() => props.needRow, (newVal) => {
+            coolRow.value = newVal
+        })
         function lineList() {
             dialogVisible.value = result
         }
         function searchFlashLel() {
-            systemRow.getChildren({ code: "ied_type" }).then(res => {
+            systemRow.getChildren({ code: "area_type" }).then(res => {
                 selectList.value = res.data
-                // console.log(selectList.value, 'select');
+            })
+            systemRow.getChildren({ code: "voltage_level" }).then(res => {
+                flashLel.value = res.data
             })
             litLine.getAllLine({ pageno: 1, pagesize: 10 }).then(res => {
                 moduleList.value = res.data
-                // console.log(moduleList.value,'module');
             })
+            coolRow.value = props.needRow
         }
         function flashChange(e) {
             ruleForm.value.moduleId = e
@@ -79,21 +109,30 @@ export default {
         function moduleChange(e) {
             ruleForm.value.linkStyle = e
         }
+        function flashCase(e) {
+            ruleForm.value.flashName = e
+        }
         function getBack() {
             dialogVisible.value = false
             emit("addBack", dialogVisible.value)
         }
         function getSure() {
-            litLine.addModule(
-                {
-                    linkstyle_id: ruleForm.value.linkStyle - 0,
-                    model_id: ruleForm.value.moduleId - 0
+            cid.saveMap({
+                model_name: ruleForm.value.name,
+                vol_id: ruleForm.value.flashName - 0,
+                line_link_style: ruleForm.value.linkStyle - 0,
+                area_type: ruleForm.value.moduleId - 0,
+            }).then(res => {
+                if (res.code == 0) {
+                    ElMessage({
+                        type:"success",
+                        message:"添加成功",
+                        duration:2000
+                    })
+                    dialogVisible.value = false
+                    emit("addBack", dialogVisible.value)
                 }
-            ).then(res => {
-                console.log(res, 'adddddddd');
             })
-            dialogVisible.value = false
-            emit("addBack", dialogVisible.value)
         }
         onMounted(() => {
             lineList()
@@ -112,6 +151,9 @@ export default {
             sureClick: getSure,
             moduleChange,
             moduleList,
+            flashLel,
+            flashCase,
+            coolRow,
         }
     }
 }

+ 5 - 2
src/utils/request.js

@@ -7,7 +7,10 @@ import router from '@/router'
 const service = axios.create({
     // baseURL: window.STATIC_CONFIG.proxyUrl, // url = base url + request url
     baseURL: "http://8.142.173.95:9527/api",
-    timeout: 15000 // request timeout
+    timeout: 15000, // request timeout
+    headers:{
+        "Content-Type":"application/x-www-form-urlencoded"
+    }
 })
 
 // 请求前拦截
@@ -51,7 +54,7 @@ service.interceptors.request.use(
             config.headers.auth_time = now
             config.headers.auth_nonce = nonce
             config.headers.sign = signs
-            config.headers['content-type'] = 'application/x-www-form-urlencoded'
+            // config.headers['content-type'] = 'application/x-www-form-urlencoded'
             return config
         } else {
             return config