“yueshang” 1 rok pred
rodič
commit
6398fad08f

+ 23 - 23
src/pages/netStructPicture/components/Gsix.vue

@@ -51,6 +51,12 @@ watch(
   () => props.clickCodeInfoCid,
   (newValue) => {
     if (newValue) {
+      console.log("newValue", newValue);
+      if (newValue.childItemCid && newValue.childItemCid.length != 0) {
+        loading.value = true;
+      } else {
+        loading.value = false;
+      }
       CodeInfoCid.value = newValue;
       getDataCid();
     }
@@ -98,7 +104,7 @@ watch(
   () => props.clickCodeValue,
   (newValue) => {
     if (newValue) {
-      loading.value = true;
+      console.log('newValue', newValue)
       isDiffdescUpAdd.value = false; //点击侧边栏的时候站控层的这个先置为空
       isDiffdescUpDel.value = false;
       cClickCode.value = newValue;
@@ -158,7 +164,7 @@ const getData = async () => {
     comptype: "u",
     itemcode: cClickCode.value,
   });
-  if(!res.data||!res.data.length) return loading.value = false;
+  if (!res.data || !res.data.length) return (loading.value = false);
   if (res.data && cClickCode.value != "scd.ied") {
     res.data.forEach((item) => {
       let text;
@@ -169,13 +175,13 @@ const getData = async () => {
   }
   mapList.value = res.data;
   nextTick(() => {
-    if(!middleLine.value) return;
+    if (!middleLine.value) return;
     middleLine.value.style.height = 0;
     middleLine.value.style.height = mianItem.value.scrollHeight + "px";
   });
-  // loading.value = false;
 };
 const getDataCid = () => {
+  dones()
   const cidsnode = CodeInfoCid.value.childItemCid;
   if (cClickCode.value == "scd.ied" && cidsnode && cidsnode.length > 0) {
     //装置基本信息
@@ -325,7 +331,7 @@ const clickUpTypeImgRight = (arr, event, name, list) => {
 };
 const CommunicationS1 = ref([]); //站控层的修改时有新增和修改的数据
 const clickUpTypeImgUpDel = (arr, event) => {
-  if(!arr||!arr[1]||!arr[1].DAI) return;
+  if (!arr || !arr[1] || !arr[1].DAI) return;
   arr[1].DAI.forEach((item1) => {
     let found = false;
     arr[0].DAI.forEach((item2) => {
@@ -359,7 +365,7 @@ const clickUpTypeImgUpAdd = (arr, event) => {
   // //nnerText是展示在左侧的数据,nnerTextRight是展示在右侧的数据,如果nnerTextRight为空,那么同时展示在左侧最下方表示新增
   clickLineResult();
   setTopDiffName(event);
-  if (arr.length && arr.length > 0&& arr[0].P) {
+  if (arr.length && arr.length > 0 && arr[0].P) {
     arr[0].P.forEach((item1) => {
       let foundMatch = false;
 
@@ -642,7 +648,6 @@ const setLeaderlineMain = () => {
       loading.value = false;
     }
   }
-
 };
 //左右两侧点击图片显示的连线
 const setLeaderlines = (types) => {
@@ -801,21 +806,16 @@ const setLeaderlines = (types) => {
             //弹窗打开后使得线条在指定区域中
             hiddenLine2();
           }
-          if (
-              typeof key3 == "string" &&
-              key3.includes("add") &&
-              key3 == key2
-            ) {
-              let line4; //从左往右的线条
-              line4 = new LeaderLine(value3, value2, lineStyleAdd);
-              leaderLineShow.value.push(line4);
-              let lineValue5;
-              lineValue5 = new LeaderLine(sameDom[0], value3, lineStyleAdd);
-              leaderLineShow.value.push(lineValue5);
-              hiddenLine2();
-            }
-            // 又有新增又有修改,站控层===
-          
+          if (typeof key3 == "string" && key3.includes("add") && key3 == key2) {
+            let line4; //从左往右的线条
+            line4 = new LeaderLine(value3, value2, lineStyleAdd);
+            leaderLineShow.value.push(line4);
+            let lineValue5;
+            lineValue5 = new LeaderLine(sameDom[0], value3, lineStyleAdd);
+            leaderLineShow.value.push(lineValue5);
+            hiddenLine2();
+          }
+          // 又有新增又有修改,站控层===
         }
       }
     }
@@ -921,7 +921,7 @@ onMounted(() => {
     ref="mianItem"
     v-loading="loading"
     id="treedomCid"
-    element-loading-text="数据加载中..."
+    element-loading-text="数据加载中,请勿点击..."
   >
     <!-- 左侧 -->
     <div class="left-main" v-if="(leftI && leftI.length) || dataU">

+ 7 - 7
src/pages/netStructPicture/components/inoutControl.vue

@@ -461,7 +461,7 @@ const setLeaderline2 = () => {
   }
   //清除原有的SVG元素
   const lines  =document.getElementById('wrapper')
-  lines.innerHTML=''
+  if(lines) lines.innerHTML='';
   //线条样式
   const startDom = document.getElementById("end");
   //左侧子组件
@@ -474,7 +474,7 @@ const setLeaderline2 = () => {
     if (key.ctrl_type == "smv") {
       line = new LeaderLine(
         endDom,
-        LeaderLine.pointAnchor(startDom, { x: 0, y: rectEnd.top - 232 }),
+        LeaderLine.pointAnchor(startDom, { x:0, y: rectEnd.top - 234 }),
         {
           color: "red",
           size: 2,
@@ -487,7 +487,7 @@ const setLeaderline2 = () => {
     } else {
       line = new LeaderLine(
         endDom,
-        LeaderLine.pointAnchor(startDom, { x: 0, y: rectEnd.top - 232 }),
+        LeaderLine.pointAnchor(startDom, { x: 0, y: rectEnd.top - 234 }),
         {
           color: "#255CE7",
           size: 2,
@@ -508,12 +508,13 @@ const setLeaderline2 = () => {
   for (const [key, value] of domListRightChild2.value) {
     const endDom = value;
     let line;
+    console.log('startDom', startDom.getBoundingClientRect())
     const rectEnd = endDom.getBoundingClientRect();
     const options = key.inputs_cnt.toString();
     LeaderLine.positionByWindowResize = false;
     if (key.ctrl_type == "smv") {
       line = new LeaderLine(
-        LeaderLine.pointAnchor(startDom, { x: "100%", y: rectEnd.top - 232 }),
+        LeaderLine.pointAnchor(startDom, { x: "100%", y: rectEnd.top - 234 }),
         endDom,
         {
           color: "red",
@@ -529,7 +530,7 @@ const setLeaderline2 = () => {
       circelSet("red", options, "right", key);
     } else {
       line = new LeaderLine(
-        LeaderLine.pointAnchor(startDom, { x: "100%", y: rectEnd.top - 232 }),
+        LeaderLine.pointAnchor(startDom, { x: "100%", y: rectEnd.top - 234 }),
         endDom,
         {
           color: "#255CE7",
@@ -711,8 +712,7 @@ onMounted(() => {
     getIedChild();
     getNetworkInfo();
     nextTick(() => {
-      setLine2();
-      newPositionLine2(leaderLines2.value);
+      clickResetLine2();
     });
   }
 });

+ 41 - 26
src/pages/netStructPicture/components/scdTree.vue

@@ -141,7 +141,7 @@
 
         <div
           class="sures sures-success"
-          v-if="!isAnalysis && AnalysisProcess"
+          v-if="!isAnalysis && AnalysisProcess && !isLoadingNew"
           @click="yesAnalysisClick"
         >
           开始对比
@@ -156,29 +156,26 @@
       style="height: 200px"
       append-to-body
       draggable
+      @close="closeExport"
     >
       <template #header>
         <div class="my-header">
           <div class="title">数据导出</div>
         </div>
       </template>
-      <div v-if="!exportLink" class="export-ink">正在导出数据中...</div>
+      <div v-if="!exportLink" class="export-ink">请稍等,正在导出数据中...</div>
       <div v-else class="export-ink">
         数据文件已生成完成,
-        <el-link :href="exportLink" type="primary" class="load">点击立即下载</el-link>
+        <el-link :href="exportLink" type="primary" class="load"
+          >点击立即下载</el-link
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script setup>
-import {
-  ref,
-  onMounted,
-  watch,
-  defineEmits,
-  onUnmounted,
-} from "vue";
+import { ref, onMounted, watch, defineEmits, onUnmounted } from "vue";
 import scdCheck from "@/api/scdCheck/scdCheck";
 import {
   uploadfile,
@@ -214,17 +211,19 @@ const chooseFile = ref("");
 const chooseContrast = ref(null);
 const checkNow = (e) => {
   tipsLoading();
+  if(isLoadingNew.value) return;
   //scd比对
   results();
 };
-const tipsLoading = () =>{
-  // if(lookScdModal.value){
-  //   return ElMessage({
-  //     type: "warning",
-  //     message: "上一条对比正在进行中!",
-  //   });
-  // }
-}
+const tipsLoading = () => {
+  if (isLoadingNew.value) {
+    return ElMessage({
+      type: "warning",
+      message: "正在进行新的对比!",
+    });
+  }
+};
+const isLoadingNew = ref(false); //是否正在进行新的对比,还未结束
 const results = () => {
   lookScdModal.value = true;
   contrast.value = false;
@@ -234,10 +233,16 @@ const results = () => {
   chooseFile.value = "";
   exportLink.value = "";
 };
+//关闭弹窗的时候清楚掉选择的列表
+const closeExport = () => {
+  chooseContrast.value = null;
+  multipleTable.value.clearSelection();
+};
 const exportModal = ref(false);
 const exportLink = ref("");
 const excelPort = () => {
   tipsLoading();
+  if (isLoadingNew.value) return;
   exportLink.value = "";
   if (!chooseContrast.value) {
     return ElMessage({
@@ -257,7 +262,7 @@ const excelPort = () => {
     comp_id: chooseContrast.value.id,
   }).then((res) => {
     if (res.data) {
-      exportLink.value = window.ApiServer + '/' + res.data;
+      exportLink.value = window.ApiServer + "/" + res.data;
     } else {
       ElMessage({
         message: res.msg,
@@ -269,6 +274,7 @@ const excelPort = () => {
 const contrast = ref(false); //是否是重新对比
 const reloadCheck = async () => {
   tipsLoading();
+  if (isLoadingNew.value) return;
   contrast.value = true;
   mesg.value = null;
   //重新比对
@@ -411,13 +417,13 @@ const cancelClick = () => {
   loadingAddError.value = false;
   loadingAdd.value = false;
   AnalysisProcess.value = false;
-  unsubscribe()
+  unsubscribe();
 };
 //点击输入框中的清除按钮
 const clearFile = () => {
   fileList.value = [];
   AnalysisProcess.value = false;
-  unsubscribe()
+  unsubscribe();
 };
 watch(
   () => chooseFile.value,
@@ -444,6 +450,7 @@ const yesAnalysisClick = () => {
         message: "正在进行SCD的一致性比对...请稍候",
         duration: 0,
       });
+      isLoadingNew.value = true;
       let anRes;
       if (mesg.value && !contrast.value) {
         anRes = await compStart({
@@ -470,6 +477,7 @@ const yesAnalysisClick = () => {
           message: "对比完成!",
         });
         ElNotification.closeAll();
+        isLoadingNew.value = false;
         lookScdModal.value = false;
       } else {
         ElMessage({
@@ -482,10 +490,17 @@ const yesAnalysisClick = () => {
 };
 //解析失败或未完成开始对比的点击
 const noAnalysisClick = () => {
-  ElMessage({
-    type: "warning",
-    message: "请上传文件并等待文件解析完成!",
-  });
+  if (isLoadingNew.value) {
+    ElMessage({
+      type: "warning",
+      message: "正在对比中!",
+    });
+  } else {
+    ElMessage({
+      type: "warning",
+      message: "请上传文件并等待文件解析完成!",
+    });
+  }
 };
 const parentData = ref(null);
 const isDelete = ref(true);
@@ -597,7 +612,7 @@ onMounted(async () => {
   display: flex;
   text-align: center;
   justify-content: center;
-  .load{
+  .load {
     margin-left: 10px;
     border-bottom: 1px solid #409eff;
   }

+ 47 - 30
src/pages/netStructPicture/components/scdVisual.vue

@@ -65,10 +65,13 @@
           <el-select
             v-model="queryParams.iedrela"
             placeholder="请输入IED编码或名称"
-            clearable
-            ref="selectRef"
+            multiple
+            filterable
+            remote
+            reserve-keyword
+            :remote-method="remoteMethod"
+            :loading="loadingsearch"
             @clear="showIedList = false"
-            v-if="showIedList"
           >
             <template #header>
               <span class="search-header" v-if="searchIedList.length > 0">
@@ -82,18 +85,19 @@
               :value="dict.node_id"
             ></el-option>
           </el-select>
-          <el-input
+          <!-- <el-input
             ref="selectInputRef"
             v-model="queryParams.iedrela"
             placeholder="请输入IED编码或名称"
+            :suffix-icon="Search"
             clearable
             @change="searchInput"
             v-else
-          />
+          /> -->
         </el-form-item>
       </el-form>
     </div>
-    <el-scrollbar height="54vh"  v-loading="loading" v-if="loadDating">
+    <el-scrollbar height="54vh" v-loading="loading" v-if="loadDating">
       <div
         v-for="(item, index) in voltageLevel"
         :key="index"
@@ -148,7 +152,7 @@ import {
   ref,
   toRefs,
   nextTick,
-  provide
+  provide,
 } from "vue";
 import scdIed from "@/assets/image/instruct/scdIed.png";
 import {
@@ -160,10 +164,12 @@ import {
 import { useDataStore } from "@/store/modules/golbal-data";
 import scdDialogIndex from "./scdDialogIndex";
 import { useRoute } from "vue-router";
+import { Search } from "@element-plus/icons-vue";
 const userStoreCode = useDataStore();
 const route = useRoute();
 // const scdIdValue = 1248000337;
 const scdIdValue = route.query.id;
+const loadingsearch = ref(false); //快捷搜索
 const data = reactive({
   queryParams: {
     scd_id: scdIdValue,
@@ -182,7 +188,9 @@ const reset = () => {
     device_type_id: null, //装置类型
   };
 };
-
+const remoteMethod = (value) => {
+  searchInput(value);
+};
 const areaData = ref([]); //获取间隔
 const allLevel = ref([]); // 获取所有电压
 const all = [{ name: "全部", id: "alls" }];
@@ -203,7 +211,7 @@ const getArea = async () => {
   const levelData = [
     ...new Set(areaRes.data.map((itemlevel) => itemlevel.voltage_level)),
   ];
-  if(!levelData) return;
+  if (!levelData) return;
   levelData.forEach((myLevelItem) => {
     const findData = allLevel.value.find((allItem) => {
       return allItem.id == myLevelItem;
@@ -213,7 +221,7 @@ const getArea = async () => {
     }
   });
   //处理主界面的数据展示
-  if(!voltageLevel.value) return;
+  if (!voltageLevel.value) return;
   voltageLevel.value.forEach((item) => {
     if (item.id == "alls") return;
     item.levelData = [];
@@ -239,24 +247,30 @@ const showIedList = ref(false);
 const searchIedList = ref([]);
 const selectRef = ref(null);
 const searchInput = (value) => {
-  if (value && iedName.value) {
-    showIedList.value = true;
-    searchIedList.value = Object.values(iedName.value).filter((item) => {
-      const lowercaseValue = value.toLowerCase(); //不区分大小写
-      const iedNameLower = item.ied_name ? item.ied_name.toLowerCase() : null;
-      const descLower = item.desc ? item.desc.toLowerCase() : null;
-      return (
-        (iedNameLower !== null && iedNameLower.includes(lowercaseValue)) ||
-        (descLower !== null && descLower.includes(lowercaseValue))
-      );
-    });
-    // 选择框自动展开
-    nextTick(() => {
-      selectRef.value.toggleMenu();
-    });
-  } else {
-    showIedList.value = false;
-  }
+  loadingsearch.value = true;
+  setTimeout(() => {
+    if (value && iedName.value) {
+      loadingsearch.value = false;
+      showIedList.value = true;
+      searchIedList.value = Object.values(iedName.value).filter((item) => {
+        const lowercaseValue = value.toLowerCase(); //不区分大小写
+        const iedNameLower = item.ied_name ? item.ied_name.toLowerCase() : null;
+        const descLower = item.desc ? item.desc.toLowerCase() : null;
+        return (
+          (iedNameLower !== null && iedNameLower.includes(lowercaseValue)) ||
+          (descLower !== null && descLower.includes(lowercaseValue))
+        );
+      });
+
+      // 选择框自动展开
+      // nextTick(() => {
+      //   selectRef.value.toggleMenu();
+      // });
+    } else {
+      showIedList.value = false;
+      searchIedList.value = [];
+    }
+  }, 200);
 };
 const count = ref(0);
 const iedNameData = async () => {
@@ -267,7 +281,7 @@ const iedNameData = async () => {
 };
 const done = (emits) => {
   open.value = emits;
-  reset()
+  reset();
   dialogData.value = [];
 };
 //选择电压
@@ -304,7 +318,7 @@ const changeLevel = async (value, mainValue) => {
   }
 };
 //弹窗=============
-provide('scdId',scdIdValue)
+provide("scdId", scdIdValue);
 onMounted(async () => {
   iedNameData();
   allLevel.value = await userStoreCode.GlobalCodes();
@@ -430,4 +444,7 @@ onMounted(async () => {
     height: 220px;
   }
 }
+:deep(.el-input .el-input__icon) {
+  cursor: pointer;
+}
 </style>

+ 1 - 1
src/pages/netStructPicture/newTitle/SlcCheck.vue

@@ -203,7 +203,7 @@
           <div class="title">数据导出</div>
         </div>
       </template>
-      <div v-if="!exportLink" class="export-ink">正在导出数据中...</div>
+      <div v-if="!exportLink" class="export-ink">请稍等,正在导出数据中...</div>
       <div v-else class="export-ink">
         数据文件已生成完成,
         <el-link :href="exportLink" type="primary" class="load"