Quellcode durchsuchen

修改虚端子关系表的bug,输入输出控制块 点击的bug

“yueshang” vor 1 Jahr
Ursprung
Commit
fecf758c85

+ 4 - 1
src/pages/netStructPicture/components/CidTree.vue

@@ -102,7 +102,7 @@ const props = defineProps({
     default: "",
   },
 });
-const emit = defineEmits(["treeBack", "clickCode", "treeBackDefalut"]);
+const emit = defineEmits(["treeBack", "clickCode", "treeBackDefalut","isloadingEv"]);
 let tagList = ref(props.iedRelation);
 const loading = ref(true);
 let tagChoose = ref("");
@@ -341,10 +341,13 @@ const addChildItems = (node, data) => {
 const reload = () => {
   if (!props.OpensclTrue) {
     //网络结构体点击CID一致性校核打开获取的装置列表
+    emit("isloadingEv",true)
     cid.getAll({ scd_id: route.query.id, ied_name: "" }).then((res) => {
+      if(!res.data) return;
       tagList.value = res.data;
       tagChoose.value = res.data ? Object.keys(res.data)[0] : "";
       clickTage.value = res.data ? Object.values(res.data)[0] : "";
+      emit("isloadingEv",false)
       emit("treeBack", clickTage.value);
     });
   }

+ 5 - 4
src/pages/netStructPicture/components/Gsix.vue

@@ -727,6 +727,7 @@ const setLeaderlines = (types) => {
     (types == "UpLeft" && domListUpLeft.value) ||
     (types == "UpLeftBasic" && cClickCode.value == "scd.ied")
   ) {
+    console.log('4444444', 4444444)
     const startDom =
       types == "UpLeft"
         ? domListUpLeft.value
@@ -849,7 +850,7 @@ const setLeaderlines = (types) => {
 };
 //滚动时重定位线条
 const newPositionLine2 = (diffline) => {
-  document.getElementById("wrapper").addEventListener(
+  document.getElementById("wrapperGsix").addEventListener(
     "scroll",
     AnimEvent.add(() => {
       leaderLineMain.value.forEach((line) => {
@@ -884,9 +885,9 @@ const newPositionLine2 = (diffline) => {
   // );
 };
 const removeLine2 = () => {
-  const elmWrapper = document.getElementById("wrapper");
+  const elmWrapper = document.getElementById("wrapperGsix");
   if (elmWrapper) {
-    elmWrapper.querySelectorAll("#wrapper .leader-line").forEach((node) => {
+    elmWrapper.querySelectorAll("#wrapperGsix .leader-line").forEach((node) => {
       // elmWrapper.removeChild(node);
       node.remove();
     });
@@ -1399,7 +1400,7 @@ onMounted(() => {
         </div>
       </div>
     </div>
-    <div id="wrapper"></div>
+    <div id="wrapperGsix"></div>
     <div id="dilogwrapper"></div>
   </div>
 </template>

+ 34 - 19
src/pages/netStructPicture/components/VirtualTable.vue

@@ -24,6 +24,7 @@
             collapse-tags
             @change="changeLevel"
             @visible-change="visibleChange"
+            @remove-tag="removeTag"
             clearable
           >
             <el-option
@@ -35,16 +36,17 @@
           </el-select>
         </el-form-item>
         <el-form-item label="装置名称">
-          <el-input v-model="queryParams.ied_name" clearable></el-input>
+          <el-input v-model="queryParams.ied_name" clearable @change="onSubmitIedName"></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="onSubmit">搜索</el-button>
-          <el-button @click="reset">重置</el-button>
+          <!-- <el-button type="primary" @click="onSubmit">搜索</el-button>
+          <el-button @click="reset">重置</el-button> -->
           <el-button @click="exportAll" class="daochu">导出全部</el-button>
         </el-form-item>
       </el-form>
     </div>
-    <div class="table-data">
+    <div class="table-data" v-loading="loading"
+    element-loading-text="数据加载中">
       <el-table
         :data="tableList"
         stripe
@@ -100,7 +102,7 @@ const { queryParams } = toRefs(data);
 const reset = () => {
   queryParams.value = {
     scd_id: scdIdValue,
-    area_id: null, //间隔
+    area_id: [], //间隔
     ied_name: null, //装置名称
   };
   chooseInterval.value = null;
@@ -117,42 +119,52 @@ const emit = defineEmits(["sclBack"]);
 let needScdName = ref(""); //需要的scd名称
 let needFlashName = ref(""); //需要的变电站名称
 let tableList = ref([]); //crc效验结果表格数据
+const loading = ref(true);
 const getData = async () => {
   tableList.value = [];
-  let loading = ElLoading.service({
-    lock: true,
-    text: "正在查询数据",
-    background: "rgba(0, 0, 0, 0.7)",
-  });
+  // let loading = ElLoading.service({
+  //   lock: true,
+  //   text: "正在查询数据",
+  //   background: "rgba(0, 0, 0, 0.7)",
+  // });
   const data = await fcdaList({
     scd_id: scdIdValue,
     area_ids: chooseInterval.value,
     ied_name: queryParams.value.ied_name,
   });
-  if (!data|| !data.data) return loading.close();
-  data.data.forEach(item=>{
-    if(item.doi_addr) tableList.value.push(item);
-  })
-  loading.close();
+  if (!data || !data.data) return loading.value=false;
+  data.data.forEach((item) => {
+    if (item.doi_addr) tableList.value.push(item);
+  });
+  loading.value=false;
 };
 const chooseInterval = ref(null); //间隔下拉框选中的数据
 const changeLevel = (e) => {
-  chooseInterval.value = null;
   chooseInterval.value = e ? e.join() : null;
+  console.log('first', chooseInterval.value)
 };
+const removeTag = (e)=>{
+  onSubmit()
+}
 //间隔下拉框关闭时触发
 const visibleChange = (visible) => {
   if (visible == false) {
-    console.log("queryParams.area_id", visible, chooseInterval.value);
+    queryParams.value.ied_name = null;
+    onSubmit()
   }
 };
 const tables = ref(null);
+const onSubmitIedName = () =>{
+  queryParams.value.area_id = [];
+  chooseInterval.value = null;
+  onSubmit()
+}
 const onSubmit = () => {
+  getData();
   nextTick(() => {
-    if(!tables.value) return
+    if (!tables.value) return;
     tables.value.setScrollTop(0);
   });
-  getData();
 };
 const closeX = () => {
   emit("sclBack", 2);
@@ -268,4 +280,7 @@ em {
   color: #255ce7;
   background: #f6f9ff;
 }
+:deep(.el-select .el-input) {
+  width: 340px;
+}
 </style>

+ 2 - 0
src/pages/netStructPicture/components/dialogIndex.vue

@@ -184,6 +184,8 @@ const clickNav = (navIndex, name) => {
   //点击导航栏事件
   inoutName.value = name;
   activeNavName.value = name;
+  isPhoto.value = 'photo';
+  inoutItemNavIndex.value = '';
   activeNav.value = navIndex;
 };
 const activeLeft = ref(null);

+ 10 - 2
src/pages/netStructPicture/index.vue

@@ -40,6 +40,7 @@
           <CidTree
             @treeBack="treeBack"
             @clickCode="clickCode"
+            @isloadingEv="isloadingEv"
             :allCidStart="allCidStart"
             :upName="upName"
           ></CidTree>
@@ -150,7 +151,7 @@
       ></SlcCheck>
       <!-- 虚端子关系图 -->
       <div v-if="clickNavCode == 'virtual'">
-        <virtual-table  @sclBack="sclBack"></virtual-table>
+        <virtual-table @sclBack="sclBack"></virtual-table>
       </div>
     </div>
   </div>
@@ -316,7 +317,14 @@ const nowUpload = (file, e) => {
     })
     .catch((err) => {});
 };
-
+const isloadingEv = (value) => {
+  console.log('value', value)
+  if (value==false) {
+    isCidLoading.value = false;
+  } else {
+    isCidLoading.value = true;
+  }
+};
 const handleRemove = (file, e) => {};
 const fileSuccess = (files, e) => {
   mustVal.value = true;

+ 1 - 1
src/utils/linesPosition.js

@@ -1,6 +1,6 @@
 
 export function  hiddenLine2(){
-    const elmWrapper = document.getElementById("wrapper");
+    const elmWrapper = document.getElementById("wrapperGsix");
     if(!elmWrapper) return;
     // 移动 line
     document.body.querySelectorAll("body>.leader-line").forEach((node) => {