“yueshang” 1 год назад
Родитель
Сommit
8fc132fcc9

+ 0 - 0
src/assets/icon/real_icon/b_get4.png → src/assets/image/CID/b_get4.png


+ 0 - 0
src/assets/icon/real_icon/b_go5.png → src/assets/image/CID/b_go5.png


+ 0 - 0
src/assets/icon/real_icon/b_goose2.png → src/assets/image/CID/b_goose2.png


+ 0 - 0
src/assets/icon/real_icon/b_navicat16.png → src/assets/image/CID/b_navicat16.png


+ 0 - 0
src/assets/icon/real_icon/b_navicat_plus17.png → src/assets/image/CID/b_navicat_plus17.png


+ 0 - 0
src/assets/icon/real_icon/b_pole6.png → src/assets/image/CID/b_pole6.png


+ 0 - 0
src/assets/icon/real_icon/b_report14.png → src/assets/image/CID/b_report14.png


+ 0 - 0
src/assets/icon/real_icon/b_setting15.png → src/assets/image/CID/b_setting15.png


+ 0 - 0
src/assets/icon/real_icon/b_speed9.png → src/assets/image/CID/b_speed9.png


+ 0 - 0
src/assets/icon/real_icon/b_stand1.png → src/assets/image/CID/b_stand1.png


+ 0 - 0
src/assets/icon/real_icon/b_stknum11.png → src/assets/image/CID/b_stknum11.png


+ 0 - 0
src/assets/icon/real_icon/b_sv3.png → src/assets/image/CID/b_sv3.png


+ 0 - 0
src/assets/icon/real_icon/b_wifi7.png → src/assets/image/CID/b_wifi7.png


+ 0 - 0
src/assets/icon/real_icon/bb10.png → src/assets/image/CID/bb10.png


+ 0 - 0
src/assets/icon/real_icon/btn8.png → src/assets/image/CID/btn8.png


+ 0 - 0
src/assets/icon/real_icon/del7__device_ip.png → src/assets/image/CID/del.png


+ 0 - 0
src/assets/icon/real_icon/modify7_device_ip.png → src/assets/image/CID/modify.png


+ 0 - 0
src/assets/icon/real_icon/newly7_device_ip.png → src/assets/image/CID/newly.png


BIN
src/assets/image/CID/橙色.png


+ 241 - 125
src/pages/netStructPicture/components/CidTree.vue

@@ -19,7 +19,10 @@
           :key="index"
           @click="tagClick(item, index)"
         >
-          {{ item.desc }}
+          <span v-if="!OpensclTrue">{{
+            `(${item.ied_name})${item.desc}`
+          }}</span>
+          <span v-else>{{ `(${item.ied_name})${item.ied_desc}` }}</span>
         </div>
       </div>
       <div class="setting">
@@ -29,136 +32,229 @@
           highlight-current
           @node-click="handleNodeClick"
         >
-        <template #default="{ node }">
-          <span class="label" :class="{'tree-label':node.expanded}">{{ node.label }}</span>
-        </template>
-      </el-tree>
+          <template #default="{ node }">
+            <span class="label" :class="{ 'tree-label': node.expanded }">{{
+              node.label
+            }}</span>
+          </template>
+        </el-tree>
       </div>
     </div>
   </div>
 </template>
 
-<script>
+<script setup>
 import { ref, onMounted, toRefs, watch } from "vue";
 import cid from "@/api/cid/cid";
 import scdCheck from "@/api/scdCheck/scdCheck";
 import { stringify } from "uuid";
-export default {
-  props: {
-    nowScdId: {
-      type: Number || String,
-      required: true,
-    },
+import { useRoute } from "vue-router";
+const route = useRoute();
+const props = defineProps({
+  nowScdId: {
+    type: Number || String,
+    required: true,
   },
-  setup(props, { emit }) {
-    let tagList = ref([]);
-    let tagChoose = ref(0);
-    let treeData = ref([
-      {
-        label: "通信参数部分",
-        children: [
-          {
-            label: "站控层通信参数",
-          },
-          {
-            label: "GOOSE通信参数",
-          },
-          {
-            label: "SV通信参数",
-          },
-        ],
-      },
-      {
-        label: "测点信息部分",
-        children: [
-          {
-            label: "信息部分-1",
-          },
-        ],
-      },
-      {
-        label: "回路配置",
-        children: [
-          {
-            label: "回路配置-1",
-          },
-        ],
-      },
-      {
-        label: "建模信息",
-        children: [
-          {
-            label: "建模信息-1",
-          },
-        ],
-      },
-    ]);
-    let needName = ref("");
-    let defaultProps = ref({
-      label: "label",
-      children: "children",
+  OpensclTrue: {
+    type: Boolean,
+    default: false,
+  },
+  iedRelation: {
+    type: Object,
+    default: () => {},
+  },
+});
+const emit = defineEmits(["treeBack"]);
+let tagList = ref([]);
+let tagChoose = ref(0);
+let treeData = ref([
+  {
+    label: "装置信息",
+    num: 1,
+    children: [
+      {
+        label: "基本信息",
+        num: 1,
+      },
+    ],
+  },
+  {
+    label: "通信参数",
+    num: 3,
+    children: [
+      {
+        label: "通信接入点",
+        num: 2,
+      },
+      {
+        label: "站控层通信参数",
+        num: 1,
+      },
+      {
+        label: "GOOSE 通信参数",
+        num: 0,
+      },
+      {
+        label: "SV 通信参数",
+        num: 0,
+      },
+    ],
+  },
+  {
+    label: "测点",
+    num: 409,
+    children: [
+      {
+        label: "遥信",
+        num: 97,
+      },
+      {
+        label: "遥控",
+        num: 14,
+      },
+      {
+        label: "遥测",
+        num: 2,
+      },
+      {
+        label: "遥脉",
+        num: 0,
+      },
+      {
+        label: "定值",
+        num: 296,
+      },
+    ],
+  },
+  {
+    label: "回路配置",
+    children: [
+      {
+        label: "回路配置-1",
+      },
+    ],
+  },
+  {
+    label: "回路配置",
+    num: 205,
+    children: [
+      {
+        label: "发布虚端子",
+        num: 109,
+      },
+      {
+        label: "定阅虚端子",
+        num: 96,
+      },
+      {
+        label: "虚回路信息",
+        num: 96,
+      },
+    ],
+  },
+  {
+    label: "建模信息",
+    num: 116,
+    children: [
+      {
+        label: "数据集",
+        num: 0,
+      },
+      {
+        label: "数据集成员",
+        num: 109,
+      },
+      {
+        label: "GOOSE控制块",
+        num: 0,
+      },
+      {
+        label: "SV控制块",
+        num: 0,
+      },
+      {
+        label: "报告控制块",
+        num: 7,
+      },
+      {
+        label: "日志控制块",
+        num: 0,
+      },
+    ],
+  },
+]);
+let needName = ref("");
+let defaultProps = ref({
+  label: "label",
+  children: "children",
+});
+let scdId = ref(""); //传递的scdid
+watch(
+  () => props.nowScdId,
+  (newVal) => {
+    scdId.value = newVal;
+  }
+);
+watch(
+  () => props.iedRelation,
+  (newValue) => {
+    if (newValue) {
+      console.log('first', newValue)
+      tagList.value =newValue;
+    }
+  
+  }
+);
+const reload = () => {
+  scdId.value = props.nowScdId;
+  if (!props.OpensclTrue) {
+    cid.getAll({ scd_id: scdId.value - 0, ied_name: "" }).then((res) => {
+      tagList.value = res.data;
     });
-    let scdId = ref(""); //传递的scdid
-    watch(
-      () => props.nowScdId,
-      (newVal) => {
-        scdId.value = newVal;
+  }
+};
+const tagClick = (row, num) => {
+  tagChoose.value = num;
+  cid
+    .findFile({
+      scd_id: scdId.value - 0,
+      ied_name: row.desc,
+      pageno: 1,
+      pagesize: 10,
+      station_id: route.query.stationId,
+    })
+    .then((res) => {});
+  scdCheck
+    .lookCheck({
+      pageindex: 1,
+      pagesize: 10,
+      station_id: route.query.stationId,
+      scd_id: scdId.value - 0,
+      is_checkin: 2,
+      ied_name: row.ied_name,
+    })
+    .then((res) => {
+      let fileInfo;
+      if (res.data) {
+        fileInfo = res.data.filter((item) => item.scd_id == scdId.value);
+        console.log("res", fileInfo);
+        if (fileInfo.length > 0) {
+          emit("treeBack", row, fileInfo[0]);
+        }
       }
-    );
-    function reload() {
-      scdId.value = props.nowScdId;
-      cid.getAll({ scd_id: scdId.value - 0, ied_name: "" }).then((res) => {
-        tagList.value = res.data;
-      });
-    }
-    function tagClick(row, num) {
-      tagChoose.value = num;
-      cid
-        .findFile({
-          scd_id: scdId.value - 0,
-          ied_name: row.desc,
-          pageno: 1,
-          pagesize: 10,
-          station_id: 861,
-        })
-        .then((res) => {
-          console.log(res, "文件");
-        });
-      scdCheck
-        .lookCheck({
-          pageindex: 1,
-          pagesize: 10,
-          station_id: 861,
-          scd_id: scdId.value - 0,
-          is_checkin: 2,
-          ied_name: row.ied_name,
-        })
-        .then((res) => {
-          //   let a = res.data.filter((item) => item.type_name == "CID");
-          //   if (a.length > 0) {
-          //     needName.value = a[0].file_name;
-          //     emit("treeBack", needName.value, a[0].id);
-          //   }
-        });
-    }
-    function handleNodeClick(e) {
-      console.log(e, "eee");
-    }
-    onMounted(() => {
-      reload();
+      //   let a = res.data.filter((item) => item.type_name == "CID");
+      //   if (a.length > 0) {
+      //     needName.value = a[0].file_name;
+      //     emit("treeBack", needName.value, a[0].id);
+      //   }
     });
-    return {
-      tagList, //标签数据
-      tagChoose, //标签点击事件
-      treeData, //树形数据
-      tagClick, //tag点击事件
-      defaultProps, //树形默认展示
-      handleNodeClick, //树形点击事件
-      needName, //返回父组件的名称
-      scdId, //传递的scdid
-    };
-  },
 };
+const handleNodeClick = (e) => {
+  console.log(e, "eee");
+};
+onMounted(() => {
+  reload();
+});
 </script>
 
 <style scoped lang="scss">
@@ -189,7 +285,7 @@ h3 {
 }
 .tagBox {
   width: 92%;
-  height: 50%;
+  height: 45%;
   overflow-y: auto;
   margin: 8px 16px 0px 16px;
 }
@@ -203,13 +299,33 @@ h3 {
 }
 .setting {
   width: 92%;
-  height: 50%;
+  height: 45%;
+  overflow-y: auto;
   border-top: 1px solid #a3ade0;
   margin: 2px auto;
-  :deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .label){
-    color: #134BEA;
-    border: 1px solid #255CE7;
-    padding:5px 8px;
+  .label {
+    padding: 5px 8px;
+  }
+  :deep(.el-tree--highlight-current .el-tree-node) {
+    margin: 5px 0;
+    color: #1a2447;
+  }
+  :deep(
+      .el-tree--highlight-current
+        .el-tree-node.is-current
+        > .el-tree-node__content
+    ) {
+    background: transparent;
+  }
+  :deep(
+      .el-tree--highlight-current
+        .el-tree-node.is-current
+        > .el-tree-node__content
+        .label
+    ) {
+    color: #134bea;
+    border: 1px solid #255ce7;
+    background: #f6f9ff;
   }
 }
 .titles {
@@ -230,7 +346,7 @@ h3 {
 .clicktag {
   color: #255ce7;
 }
-.tree-label{
-  color: #134BEA;
+.tree-label {
+  color: #134bea;
 }
 </style>

+ 22 - 12
src/pages/netStructPicture/components/ScdNow.vue

@@ -63,7 +63,7 @@
             <img :src="newlyPng" alt="" class="icons" />
             <span style="color: #134bea">新增({{ iedVer.i.list.length }})</span>
           </p>
-          <p id="editId" @click="lookEdit">
+          <p id="editId" @click="lookEdit(iedVer.u.list)">
             <img :src="modifyPng" alt="" class="icons" />
             <span style="color: #ffcb11">修改({{ iedVer.u.list.length }})</span>
           </p>
@@ -86,6 +86,7 @@
       :scdView="scdView"
       :delScdId="delScdId"
     ></dialog-index>
+    <scl-update :openScl="openScl" @doneScl="doneScl" :iedRelationData="iedRelationData"></scl-update>
     <div id="wrapperscd"></div>
   </div>
 </template>
@@ -101,7 +102,8 @@ import {
 } from "vue";
 import LeaderLine from "../../../../public/leader-line.min.js";
 import dialogIndex from "./dialogIndex.vue";
-import jiantouPng from "@/assets/image/scdcheck/jiantou.png";
+import SclUpdate from "./SclUpdate.vue";
+import jiantouPSclUpdateng from "@/assets/image/scdcheck/jiantou.png";
 import modifyPng from "@/assets/image/scdcheck/modify.png";
 import newlyPng from "@/assets/image/scdcheck/newly.png";
 import delPng from "@/assets/image/scdcheck/del.png";
@@ -249,27 +251,30 @@ const lookAddOrDel = async (comData, del) => {
   }
   // 获取对象的所有键,并存入数组
   let keys = Object.keys(iedDetail);
-  // 对键进行排序===
+  // 对键进行排序按a,b,c===
   keys.sort();
   for (let key of keys) {
     iedRelationData.value[key] = iedDetail[key];
   }
+  console.log('iedRelationData.value', iedRelationData.value)
   if (del == "del" && clickRowData.value.target_id) {
     delScdId.value = clickRowData.value.target_id;
-  } else {
+  } else if(del == 'add'){
     delScdId.value = route.query.id;
   }
   // 对键进行排序===
-  const iedRes = await scdIedRelation({
+  if(del !='edit'){
+    const iedRes = await scdIedRelation({
     scd_id: delScdId.value,
     ied_name: comData[0].ied_name,
     reset: 1,
   });
-  checkDialogData.value = iedRes.data[comData[0].ied_name];
-  openBig.value = true;
+    checkDialogData.value = iedRes.data?iedRes.data[comData[0].ied_name]:null;
+    openBig.value = true;
+  }
 };
 const lookAdd = async (comData) => {
-  lookAddOrDel(comData);
+  lookAddOrDel(comData,'add');
   // lookType.value = 1;
   // emit("nowBack", lookType.value);
 };
@@ -307,11 +312,16 @@ watch(
     }
   }
 );
-const lookEdit = () => {
-  lookType.value = 2;
-  emit("nowBack", lookType.value);
+const openScl = ref(false)
+const lookEdit = (comData) => {
+  openScl.value = true;
+  lookAddOrDel(comData, "edit");
+  // emit("nowBack", lookType.value);
 };
-
+//关闭scl修改弹窗
+const doneScl = ()=>{
+  openScl.value = false;
+}
 onMounted(() => {});
 onBeforeUnmount(() => {
   // lineList.value.forEach((item) => item.remove());

+ 123 - 0
src/pages/netStructPicture/components/SclUpdate.vue

@@ -0,0 +1,123 @@
+
+<script setup>
+import { ref, defineEmits, watch, onMounted } from "vue";
+import CidTree from "./CidTree.vue";
+import Gsix from "./Gsix.vue";
+import { useRoute } from "vue-router";
+let route = useRoute();
+const props = defineProps({
+  openScl: {
+    type: Boolean,
+    default: false,
+  },
+  iedRelationData: {
+    type: Object,
+    default: () => { },
+  },
+});
+const OpensclTrue = ref(false);
+const emit = defineEmits(["doneScl"]);
+const iedRelation = ref(null);
+watch(
+  () => props.iedRelationData,
+  (newValue) => {
+    console.log('iedRelationscllll', newValue)
+    iedRelation.value = newValue;
+  }
+);
+let nowScdId = ref(null); //路由传参的scdid
+watch(
+  () => props.openScl,
+  (newValue) => {
+    if(newValue){
+        OpensclTrue.value = newValue;
+    }
+  }
+);
+const cancelClick = () => {
+  OpensclTrue.value = false;
+  emit("doneScl");
+};
+const treeBack = (data, val) => {};
+onMounted(() => {
+  nowScdId.value = route.query.id;
+});
+</script>
+
+<template>
+  <div>
+    <el-dialog
+      @close="cancelClick"
+      v-model="OpensclTrue"
+      width="93vw"
+      append-to-body
+      draggable
+      top="5vh"
+      style="height: 92vh"
+    >
+      <template #header>
+        <div class="my-header">
+          <div class="title">一致性对比结果</div>
+        </div>
+      </template>
+      <div class="right-main">
+        <CidTree :nowScdId="nowScdId" @treeBack="treeBack" :OpensclTrue="OpensclTrue" :iedRelation="iedRelation"></CidTree>
+        <div class="right-title">
+          <div class="abBox">
+            <div>
+              <span style="border-right: 1px solid #516380; padding-right: 30px"
+                >基准文件:
+                <span style="color: #09162c">{{ newChicken }}</span></span
+              >
+            </div>
+            <div style="padding-left: 30px">
+              <span
+                >对比文件:<span style="color: #09162">{{ upName }}</span></span
+              >
+            </div>
+          </div>
+          <Gsix
+            :activeName="activeName"
+            :activeNav="activeNav"
+            :backName="backName"
+            :mustVal="mustVal"
+            :arrName="arrName"
+            :upName="upName"
+          ></Gsix>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.my-header {
+  border-bottom: 1px solid #a3ade0;
+  font-size: 16px;
+  color: #1a2447;
+
+  .title {
+    padding-bottom: 15px;
+  }
+}
+.right-main {
+  display: flex;
+  .right-title {
+    width: 85%;
+    margin: 20px 0 0 16px;
+    background: #f7f8fb;
+  }
+  .abBox {
+  width: 95%;
+  height: 40px;
+  position: relative;
+  margin: 10px auto;
+  display: flex;
+  font-size: 14px;
+  background: #fff;
+  justify-content: center;
+  align-items: center;
+  color: #516380;
+}
+}
+</style>

+ 21 - 9
src/pages/netStructPicture/index.vue

@@ -69,7 +69,7 @@
               >
                 <template #trigger>
                   <el-button
-                    style="border-bottom: 1px solid #255CE7;color: #255CE7;"
+                    style="border-bottom: 1px solid #255ce7; color: #255ce7"
                     type="text"
                     plain
                     >上传CID</el-button
@@ -193,7 +193,7 @@ watch(
 );
 const reload = () => {
   nowScdId.value = route.query.id;
-  nowStation.value = route.query.station;
+  nowStation.value = route.query.stationId;
 };
 //虚端子关系====
 const isOpen = ref(false);
@@ -214,10 +214,14 @@ const handleClick = (val) => {
   activeName.value = val.props.name;
   clickNavCode.value = "";
 };
-const treeBack = (data, ids) => {
-  backName.value = data;
+//点击树返回的信息,
+const clickAttachment = ref(null); //拿到file-type上传文件
+const treeBack = (data, val) => {
+  console.log("data", val.file_type);
+  backName.value = data; //返回的点击行的信息
   arrName.value = data;
-  backId.value = ids;
+  backId.value = val.id;
+  clickAttachment.value = val;
 };
 const closeX = () => {
   activeName.value = "first";
@@ -226,21 +230,29 @@ const closeX = () => {
 const nowUpload = (file, e) => {
   upFile.value = file.file;
   upName.value = file.file.name;
+  const clickAtt = clickAttachment.value ? clickAttachment.value.file_type : "";
   cid
     .fileUpload({
       station_id: nowStation.value - 0,
       file: upFile.value,
-      data_type: "cid",
+      attachment_type: clickAtt,
+      ied_name: backName.value.ied_name,
     })
     .then((res) => {
       if (res.code == 0) {
-        let idp = `${file.file.uid},${backId.value}`;
+        let idp = `${route.query.name},${res.data.fileid}`;
         ElMessage({
           type: "success",
           message: "上传成功!",
         });
         scdCheck
-          .scdStart({ type: "cid", station_id: nowStation.value - 0, ids: idp })
+          .scdStart({
+            type: "CID",
+            station_id: route.query.stationId,
+            source_scd_id: route.query.id,
+            station_id: nowStation.value - 0,
+            ids: idp,
+          })
           .then((res) => {});
       }
     });
@@ -401,7 +413,7 @@ $height: 40px;
 .uploadBox {
   position: absolute;
   top: 0px;
-  right:32px;
+  right: 32px;
 }
 
 .scdCheck {

+ 14 - 5
src/pages/netStructPicture/newTitle/SlcCheck.vue

@@ -183,6 +183,7 @@
               layout="sizes,prev, pager, next, jumper"
               :total="tableData.count"
               background
+              @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
             />
           </div>
@@ -298,7 +299,7 @@ const reload = () => {
     slc.getErrorByLevel({ scd_id: scdid.value }), //获取错误,告警,提示统计数据levelData
     slc.getScdByIdFromMission({
       pageno: 1,
-      pagesize: 20,
+      pagesize:pagesize.value,
       scd_id: scdid.value,
     }), //获取表格的全部数据resultList
     slc.getScdByIdTree({ scd_id: scdid.value }), //获取侧边栏树的数据treeList
@@ -356,16 +357,20 @@ const buildTree = (data, parentId) => {
   return result;
 };
 //点击右侧分页
-const handleCurrentChange = async (val) => {
-  tableData.value = null;
+const handleCurrentChange =  (val) => {
+ 
   pageindex.value = val;
+  common()
+};
+const common =async () =>{
+  tableData.value = null;
   tableLoading.value = true;
   const nodeName = clickTreeData.value ? clickTreeData.value.datatype : "";
   const nodeId = clickTreeData.value ? clickTreeData.value.id : "";
   const levels = levelClick.value ? levelClick.value : "";
   const res = await slc.getScdByIdFromMission({
     pageno: pageindex.value,
-    pagesize: 20,
+    pagesize: pagesize.value,
     scd_id: scdid.value,
     node_name: nodeName,
     node_id: nodeId,
@@ -375,7 +380,7 @@ const handleCurrentChange = async (val) => {
     tableLoading.value = false;
   }
   tableData.value = res;
-};
+}
 //点击全部、错误等
 const levelClick = ref("");
 const clickStatistics = (level) => {
@@ -466,6 +471,10 @@ const lineNoClick = async (val) => {
   });
   lineNoData.value = res.data;
 };
+const handleSizeChange = (val) =>{
+  pagesize.value = val;
+  common()
+}
 onMounted(() => {
   reload();
 });