liyangzheng 1 rok pred
rodič
commit
212c022921

+ 19 - 4
src/pages/components/drawModal/LineDouble.vue

@@ -26,7 +26,7 @@
                     padding-bottom: 10px;
                     ">{{ endTxt }}</h1>
                     <div>
-                        <div style="margin-bottom: 10px;" v-for="(item, index) in curList">
+                        <div style="margin-bottom: 10px;" v-for="(item, index) in outList">
                             <div
                                 style="width: 80%;display: flex;justify-content: space-around;align-items: center;margin: 0 auto;">
                                 <span style="display: block;border: 1px solid #2B5AE5;width: 42px;height: 42px;"
@@ -98,7 +98,8 @@ export default {
         let modelIds = ref("")//本组件的模型id
         let startTxt = ref("")//本组件开始文本
         let endTxt = ref("")//本组件结束文本
-        let curList = ref([])//渲染list
+        let curList = ref([])//箭头开始list
+        let outList = ref([])//箭头结束list
         let numStatus = ref(0)//判断goose还是sv
         let visibleItems = ref([])//选择的数组
         let fcdaIds = ref("")//需要的fcda_ids
@@ -138,6 +139,19 @@ export default {
                     })
                 }
             })
+            flow.getModelAndIed({
+                model_id: modelIds.value - 0,
+                ied_type: ends.value.ied_type,
+            }).then(res => {
+                if(res.code == 0){
+                    outList.value = res.data
+                }else{
+                    ElMessage({
+                        message:res.msg,
+                        type:"error"
+                    })
+                }
+            })
         }
         // 关闭模态框
         function closeModal() {
@@ -185,7 +199,7 @@ export default {
         })
         // 获取fcda_ids
         function toggleVisibility(index) {
-            const item = curList.value[index];
+            const item = outList.value[index];
             const itemIndex = visibleItems.value.findIndex((i) => i === item);
             if (itemIndex === -1) {
                 visibleItems.value.push(item);
@@ -203,7 +217,7 @@ export default {
         }
         // 设置多选span的class
         function getClass(index) {
-            const item = curList.value[index];
+            const item = outList.value[index];
             return visibleItems.value.includes(item) ? 'results' : 'anthers';
         }
         onMounted(() => {
@@ -231,6 +245,7 @@ export default {
             setIndex,//下标选择函数
             getClass,//设置多选span的class函数
             leftFcda,//左侧单选的fcdaid
+            outList,//箭头指向端list
         }
     }
 }