liyangzheng 1 жил өмнө
parent
commit
e47399d152

+ 9 - 0
src/api/flow/flow.js

@@ -81,6 +81,14 @@ function excelInData(data) {
         },
     })
 }
+// 导入前删除所有端子
+function delAll(data){
+    return request({
+        url:`/admin/model/fcda/delall`,
+        method:"post",
+        data
+    })
+}
 export default {
     getModelOn,
     saveModelOn,
@@ -89,4 +97,5 @@ export default {
     saveModelAndIed,
     getByModelAndIed,
     excelInData,
+    delAll,
 }

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

@@ -118,25 +118,31 @@ export default {
             coolName.value = newVal
         })
         watch(() => props.coolObj, (newVal) => {
-            loading.value = true//打开加载动画
-            copyObj.value = newVal
-            modelId.value = copyObj.value.id//模型id
-            setTimeout(() => {
-                cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).then(res => {
-                    if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
-                    const origiondata = JSON.parse(res.data[0].relation_json)
-                    lf.value.render(origiondata);//渲染模型图
-                    loading.value = false//关闭加载动画
-                    for (let index = 0; index < origiondata.edges.length; index++) {
-                        const element = origiondata.edges[index];
-                        if (element.properties != null && element.properties["issv"] === 'SV') {
-                            let lineStyle = lf.value.getEdgeModelById(element.id)//.getEdgeStyle();
-                            // console.log(lineStyle)
-                            lineStyle.setProperties({ svEdge: { stroke: 'orange' } })
+            if (route.query.modelid != '' && route.query.modelid != null && route.query.modelid != undefined) {
+                console.log('路由跳转watch');
+                return
+            } else {
+                console.log('普通watch');
+                loading.value = true//打开加载动画
+                copyObj.value = newVal
+                modelId.value = copyObj.value.id//模型id
+                setTimeout(() => {
+                    cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).then(res => {
+                        if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
+                        const origiondata = JSON.parse(res.data[0].relation_json)
+                        lf.value.render(origiondata);//渲染模型图
+                        loading.value = false//关闭加载动画
+                        for (let index = 0; index < origiondata.edges.length; index++) {
+                            const element = origiondata.edges[index];
+                            if (element.properties != null && element.properties["issv"] === 'SV') {
+                                let lineStyle = lf.value.getEdgeModelById(element.id)//.getEdgeStyle();
+                                // console.log(lineStyle)
+                                lineStyle.setProperties({ svEdge: { stroke: 'orange' } })
+                            }
                         }
-                    }
-                })
-            }, 1000);
+                    })
+                }, 2000);
+            }
         })
         watch(() => props.svOrGoose, (newVal) => {
             numCase.value = newVal
@@ -261,8 +267,8 @@ export default {
             numCase.value = props.svOrGoose//判断sv或者goose类型
             copyColor.value = props.lineMenuColor//颜色
             setTimeout(() => {
-                cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).then(res => {
-                    console.log(res.data, 'res.data');
+                cid.getModelInfo({ id: copyObj.value.id ? copyObj.value.id : route.query.modelid - 0, pageno: 1, pagesize: 20 }).then(res => {
+                    emit("drawCor",res.data)
                     const filteredArray = res.data[0].ied_type.filter(param => param !== null)
                     needMap.value = filteredArray.map(item => {
                         return {
@@ -412,6 +418,7 @@ export default {
                         }
                     })
                     lf.value.on('node:dbclick', function (data, e, position) {//双击打开弹窗
+                        console.log(data, 'datas');
                         iedType.value = data.data.properties.ied_type
                         abModal.value = true
                     })
@@ -456,7 +463,6 @@ export default {
                     lf.value.extension.dndPanel.setPatternItems(needMap.value);
                     lf.value.render();
                     if (route.query.modelid != '' && route.query.modelid != null && route.query.modelid != undefined) {
-                        console.log(456789);
                         lastRender()
                     }
                     setTimeout(() => {

+ 25 - 1
src/pages/components/drawModal/AbilityModal.vue

@@ -9,6 +9,7 @@
                 <el-button style="height: 30px;" type="primary" plain>Excel上传</el-button>
             </el-upload>
             <el-button style="height: 30px;" type="success" plain @click="downloadFile">模板下载</el-button>
+            <el-button style="height: 30px;" type="danger" plain @click="clearAll">清除所有端子</el-button>
             <el-table :data="tableData" style="width: 100%;height: calc(100vh - 600px);">
                 <el-table-column label="序号" width="100">
                     <template #default="scope">
@@ -85,7 +86,6 @@ export default {
         })
         // 初始化函数
         function reload() {
-            console.log(portExcel, 'excel');
             dialogVisible.value = props.abModal
             modelIds.value = props.modelId
             iedTypes.value = props.iedType
@@ -192,6 +192,29 @@ export default {
             delFcda.value = row.id
             delModal.value = true
         }
+        // 清除所有端子
+        function clearAll() {
+            const loading = ElLoading.service({
+                lock: true,
+                text: "删除数据中",
+                background: "rgba(0, 0, 0, 0.7)",
+            });
+            flow.delAll({
+                model_id: modelIds.value - 0
+            }).then(res => {
+                setTimeout(() => {
+                    flow.getModelAndIed({//获取所有功能
+                        model_id: modelIds.value - 0,
+                        ied_type: iedTypes.value
+                    }).then(res => {
+                        if (res.code == 0) {
+                            loading.close()
+                            tableData.value = res.data
+                        }
+                    })
+                }, 5000);
+            })
+        }
         // 确认删除功能
         function firmSure() {
 
@@ -229,6 +252,7 @@ export default {
             upTemplate,//文件上传
             downloadFile,
             portExcel,//需要被下载的excel文件
+            clearAll,//清除所有端子
         }
     },
     components: {

+ 127 - 53
src/pages/components/drawModal/LineDouble.vue

@@ -9,10 +9,11 @@
                     margin: 25px auto;
                     padding-bottom: 10px;
                     ">{{ startTxt }}</h1>
-                    <div style="height: calc(100vh - 520px);overflow-y: auto;">
+                    <div style="height: calc(100vh - 520px);">
                         <div style="margin-bottom: 10px;" v-for="(item, index) in curList" @click="setIndex(item, index)">
                             <span :class="index == leftIndex ? 'result' : 'anther'">{{ index + 1 }}</span>
-                            <span :class="index == leftIndex ? 'results' : 'anthers'">{{ item.fcda_name }}</span>
+                            <span :class="index == leftIndex ? 'results' : 'anthers'" :id="item.id">{{ item.fcda_name
+                            }}</span>
                         </div>
                     </div>
                 </div>
@@ -27,30 +28,21 @@
                     margin: 25px auto;
                     padding-bottom: 10px;
                     ">{{ endTxt }}</h1>
-                    <div style="height: calc(100vh - 520px);overflow-y: auto;">
-                        <!-- <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;"
-                                    @click="toggleVisibility(index)">
-                                    <svg v-show="isVisible(item)" t="1704938867254" class="icon" viewBox="0 0 1024 1024"
-                                        version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4269" width="40" height="40">
-                                        <path
-                                            d="M392.533333 806.4L85.333333 503.466667l59.733334-59.733334 247.466666 247.466667L866.133333 213.333333l59.733334 59.733334L392.533333 806.4z"
-                                            fill="#2B5AE5" p-id="4270"></path>
-                                    </svg>
-                                </span>
-                                <span style="display: block;" :class="getClass(index)">{{ item.fcda_name
-                                }}</span>
-                            </div>
+                    <div style="height: calc(100vh - 520px);">
+                        <div v-for="(item, index) in outList" :id="item.id">
+                            <el-checkbox-group v-model="checkList" @change="checkChange">
+                                <el-checkbox :label="item.id" :key="item.id">
+                                    {{ item.fcda_name }}
+                                </el-checkbox>
+                            </el-checkbox-group>
+                        </div>
+                        <!-- <div style="margin-bottom: 10px;" v-for="(item, index) in outList" @click="setIndex(item, index)" :id="item.id">
+                            <span class="result">{{ index + 1 }}</span>
+                            <span class="results">{{ item.fcda_name }}</span>
                         </div> -->
-                        <el-checkbox-group v-model="checkList" @change="checkChange">
-                            <el-checkbox v-for="(item, index) in outList" :label="item.id" :key="item.id">
-                                {{ item.fcda_name }}
-                            </el-checkbox>
-                        </el-checkbox-group>
                     </div>
                 </div>
+                <div id="wrapper"></div>
             </div>
             <template #footer>
                 <span class="dialog-footer">
@@ -59,13 +51,15 @@
                 </span>
             </template>
         </el-dialog>
+
     </div>
 </template>
 
 <script>
-import { ref, onMounted, watch, toRefs, computed } from 'vue';
+import { ref, onMounted, watch, toRefs, computed, onBeforeUnmount } from 'vue';
 import flow from '@/api/flow/flow';
 import { ElMessage } from 'element-plus';
+import LeaderLine from "../../../../public/leader-line.min.js";
 export default {
     props: {
         ldModal: {
@@ -121,6 +115,7 @@ export default {
         let arrNew = ref([])//新的存储fdcdids
         let gv = ref('')
         let pastLoading = ref(false)
+        let leaderLineList = ref([])//组件leader-line数据,以方便离开组件时清除画线
         watch(() => props.modelId, (newVal) => {
             modelIds.value = newVal
         })
@@ -149,6 +144,8 @@ export default {
             await flow.getModelAndIed({
                 model_id: modelIds.value - 0,
                 ied_type: starts.value.ied_type,
+                sv_or_goose: gv.value,
+                in_or_out: "输出"
             }).then(res => {
                 if (res.code == 0) {
                     curList.value = res.data
@@ -162,9 +159,31 @@ export default {
             await flow.getModelAndIed({
                 model_id: modelIds.value - 0,
                 ied_type: ends.value.ied_type,
+                sv_or_goose: gv.value,
+                in_or_out: "接收"
             }).then(res => {
                 if (res.code == 0) {
                     outList.value = res.data
+                    setTimeout(() => {
+                        res.data.map((item, index) => {
+                            let line = {
+                                start: item.from_fcda_id,
+                                ending: item.id
+                            }
+                            let starts = document.getElementById(line.start)
+                            let ends = document.getElementById(line.ending)
+                            leaderLineList.value.push(new LeaderLine(starts, ends, {
+                                color: "black",//连接线颜色
+                                size: 2,//连接线宽度
+                                path: "straight",//连接线样式
+                                startSocket: "right",//开始链接元素位置
+                                endSocket: "left",//结束链接元素位置
+                                endPlug: 'arrow3',//结束箭头
+                                endPlugSize: 2,//结束箭头size
+                            }))
+                            hiddenLine()
+                        })
+                    }, 1000)
                 } else {
                     ElMessage({
                         message: res.msg,
@@ -175,6 +194,7 @@ export default {
         }
         // 关闭模态框
         function closeModal() {
+            removeLine3()
             dialogVisible.value = false
             emit("lineBack", dialogVisible.value)
         }
@@ -197,6 +217,7 @@ export default {
                         message: "关联成功!"
                     })
                     dialogVisible.value = false
+                    removeLine3()
                     emit("lineBack", dialogVisible.value)
                 } else {
                     ElMessage({
@@ -274,48 +295,86 @@ export default {
                             loading.value = false
                         }
                     })
-                }else{
+                } else {
                     ElMessage({
-                        type:"info",
-                        message:"您还没有配置装置"
+                        type: "info",
+                        message: "您还没有配置装置"
                     })
                     loading.value = false
                 }
             }
+            // 循环curList获取应该链接的元素
+            // for (let index = 0; index < curList.value.length; index++) {
+            //     flow.getModelOn({
+            //         model_id: modelIds.value - 0,
+            //         from_fcda_id: curList.value[index].id - 0
+            //     }).then(res => {
+            //         if (res.data != null) {
+            //             // 连线出发元素
+            //             let startCire = res.data[0].from_fcda_id
+            //             // 获取连线开始元素节点
+            //             let startTime = document.getElementById(startCire)
+            //             // 连线结束元素
+            //             let endCire = res.data.map(item => {
+            //                 return item.to_fcda_id
+            //             })
+            //             // 获取连接结束元素节点
+            //             const divElements = endCire.map(id => document.getElementById(id))
+            //             if (divElements.length > 1) {
+            //                 divElements.map((item, index) => {
+            //                     leaderLineList.value.push(new LeaderLine(startTime, divElements[index], {
+            //                         color: "black",//连接线颜色
+            //                         size: 2,//连接线宽度
+            //                         path: "straight",//连接线样式
+            //                         startSocket: "right",//开始链接元素位置
+            //                         endSocket: "left",//结束链接元素位置
+            //                         endPlug: 'arrow3',//结束箭头
+            //                         endPlugSize: 2,//结束箭头size
+            //                     }))
+            //                     hiddenLine()
+            //                 })
+            //             }
+
+            //         }
+            //     })
+            // }
         }
-        // function isVisible(item) {
-        //     if (together.value.length > 0) {
-        //         loading.value = false
-        //         return together.value.some((togetherItem) => togetherItem.to_fcda_id === item.id);
-        //     }
-        // };
-        // // 设置多选span的class
-        // function getClass(index) {
-        //     const item = outList.value[index];
-        //     return visibleItems.value.includes(item) ? 'results' : 'anthers';
-        // }
-        // // 获取fcda_ids
-        // function toggleVisibility(index) {
-        //     const item = outList.value[index];
-        //     const itemIndex = visibleItems.value.findIndex((i) => i === item);
-        //     if (itemIndex === -1) {
-        //         visibleItems.value.push(item);
-        //     } else {
-        //         visibleItems.value.splice(itemIndex, 1);
-        //     }
-        //     fcdaIds.value = visibleItems.value.map((item, index) => {
-        //         return item.id
-        //     }).join(",")
-        // };
         function checkChange(e) {
             fcdaIds.value = e.join(",")
         }
+        //弹窗打开后使得线条在指定区域中
+        function hiddenLine() {
+            const elmWrapper = document.getElementById("wrapper");
+            // 移动 line
+            document.body.querySelectorAll("body .leader-line").forEach((node) => {
+                elmWrapper.appendChild(node);
+            });
+            elmWrapper.style.transform = "none";
+            var rectWrapper = elmWrapper.getBoundingClientRect();
+            // Move to the origin of coordinates as the document
+            elmWrapper.style.transform = `translate(${(rectWrapper.left + window.scrollY) * -1
+                }px, ${(rectWrapper.top + window.scrollX) * -1}px)`;
+        };
+        // 稳定leader-line函数
+        function removeLine3() {
+            leaderLineList.value = [];
+            const elmWrapper = document.getElementById("wrapper");
+            if (elmWrapper) {
+                document.body.querySelectorAll("#wrapper .leader-line").forEach((node) => {
+                    elmWrapper.removeChild(node);
+                });
+            }
+        };
         onMounted(async () => {
             await reload()
             pastLoading.value = true
             setIndex()
             pastLoading.value = false
         })
+        onBeforeUnmount(() => {
+            leaderLineList.value.forEach(line => line.remove());//离开当前组件时清除连线
+            removeLine3()
+        })
         return {
             dialogVisible,//模态框开关
             reload,//初始化函数
@@ -347,6 +406,9 @@ export default {
             arrNew,//新的存储ids
             gv,
             pastLoading,//maxbox加载动画
+            leaderLineList,//组件库leader-line数据,以方便离开组件时清除画线
+            hiddenLine,//使leader-line显示在模态框内
+            removeLine3,// 稳定leader-line函数
         }
     }
 }
@@ -360,11 +422,12 @@ export default {
     display: flex;
     justify-content: space-around;
     align-items: center;
+    overflow-y: auto;
 }
 
 .leftBox {
     width: 33%;
-    height: calc(100vh - 420px);
+    /* height: calc(100vh - 420px); */
     text-align: center;
     background-color: #F7F8FB;
     border: 2px dashed #A3ADE0;
@@ -381,7 +444,7 @@ export default {
 
 .rightBox {
     width: 33%;
-    height: calc(100vh - 420px);
+    /* height: calc(100vh - 420px); */
     text-align: center;
     background-color: #EDF3FF;
     border: 2px dashed #A3ADE0;
@@ -476,4 +539,15 @@ export default {
     line-height: 42px !important;
     text-align: center;
 }
+
+.leader-line {
+    z-index: 3000;
+}
+
+#wrapper {
+    width: 0;
+    height: 0;
+    position: relative;
+    /* Origin of coordinates for lines, and scrolled content (i.e. not `absolute`) */
+}
 </style>

+ 34 - 38
src/pages/netStructPicture/components/virtualRelation.vue

@@ -4,12 +4,7 @@
     <!-- 关联图 -->
     <div class="main-cont" id="treedom3">
       <div class="main-left">
-        <div
-          v-for="(item, index) in leftList"
-          :key="index"
-          class="conts"
-          @click="clickImg(item)"
-        >
+        <div v-for="(item, index) in leftList" :key="index" class="conts" @click="clickImg(item)">
           <div class="cont-title">
             <img :src="devicePng" alt="" class="img-item" />
             <div class="cont-item">
@@ -17,11 +12,7 @@
               <div>{{ item.ref_ied_name }}</div>
             </div>
           </div>
-          <div
-            v-for="(cItem, index2) in item.titleItems"
-            :key="index2"
-            :ref="(el) => setdomLeftChild3(el, cItem)"
-          >
+          <div v-for="(cItem, index2) in item.titleItems" :key="index2" :ref="(el) => setdomLeftChild3(el, cItem)">
             <div class="text-midle">
               <div>
                 {{
@@ -43,12 +34,7 @@
           </div>
         </div>
         <div class="middle-item">
-          <div
-            class="midle-cont"
-            v-for="(item, index) in svInfo"
-            :key="index"
-            :ref="(el) => setdomMiddle3(el, item)"
-          >
+          <div class="midle-cont" v-for="(item, index) in svInfo" :key="index" :ref="(el) => setdomMiddle3(el, item)">
             <div style="margin: 0 4px" v-if="!item.isDecollate">
               {{ item.no }}
             </div>
@@ -69,12 +55,7 @@
       </div>
       <!-- 右侧 -->
       <div class="main-right">
-        <div
-          v-for="(item, index) in rightList"
-          :key="index"
-          class="conts"
-          @click="clickImg(item)"
-        >
+        <div v-for="(item, index) in rightList" :key="index" class="conts" @click="clickImg(item)">
           <div class="cont-title">
             <img :src="devicePng" alt="" class="img-item" />
             <div class="cont-item">
@@ -82,11 +63,7 @@
               <div>{{ item.ref_ied_name }}</div>
             </div>
           </div>
-          <div
-            v-for="(cItem, index2) in item.titleItems"
-            :key="index2"
-            :ref="(el) => setdomRightChild3(el, cItem)"
-          >
+          <div v-for="(cItem, index2) in item.titleItems" :key="index2" :ref="(el) => setdomRightChild3(el, cItem)">
             <div class="text-midle">
               <div>{{ `${cItem.attr_int_addr}` }}</div>
               <div>{{ cItem.do_target_desc }}</div>
@@ -112,7 +89,7 @@ const route = useRoute();
 const props = defineProps({
   checkData: {
     type: Object,
-    default: () => {},
+    default: () => { },
   },
   isOpen: {
     type: Boolean,
@@ -120,7 +97,7 @@ const props = defineProps({
   },
   iedRelation: {
     type: Object,
-    default: () => {},
+    default: () => { },
   },
   delScdId: {
     type: String,
@@ -178,10 +155,10 @@ let tagList = ref(null); //左侧更改的设备列表
 //得到中间的子版块数据
 const getNetworkInfo3 = async () => {
   let svResInfo;
-    svResInfo = await getMiddleinputs({
-      scd_id: scdIdValue,
-      ied_name: props.checkData.ied_name,
-    });
+  svResInfo = await getMiddleinputs({
+    scd_id: scdIdValue,
+    ied_name: props.checkData.ied_name,
+  });
   const data = {
     attr_ld_inst: "",
     attr_ln_class: "",
@@ -341,9 +318,8 @@ const hiddenLine = () => {
   elmWrapper.style.transform = "none";
   var rectWrapper = elmWrapper.getBoundingClientRect();
   // Move to the origin of coordinates as the document
-  elmWrapper.style.transform = `translate(${
-    (rectWrapper.left + window.scrollY) * -1
-  }px, ${(rectWrapper.top + window.scrollX) * -1}px)`;
+  elmWrapper.style.transform = `translate(${(rectWrapper.left + window.scrollY) * -1
+    }px, ${(rectWrapper.top + window.scrollX) * -1}px)`;
 };
 const setLine = () => {
   if (listData3.value) {
@@ -423,10 +399,12 @@ watch(
   width: 48px;
   height: 48px;
 }
+
 @mixin left-and-right {
   display: flex;
   flex-direction: column;
 }
+
 .main-cont {
   display: flex;
   justify-content: space-evenly;
@@ -436,37 +414,45 @@ watch(
 .leader-line {
   z-index: 3000;
 }
+
 .main-left {
   display: flex;
   @include left-and-right;
 }
+
 .main-middle {
   box-sizing: border-box;
   border: 2px dashed #98a8ff;
   background: #edf3ff;
   margin: 0 60px;
+
   img {
     @include img-size;
   }
+
   .middle-item {
     @include left-and-right;
     align-items: center;
     cursor: pointer;
   }
+
   .cont-title {
     display: flex;
     align-items: center;
     margin: 12px 14px 5px 14px;
     border-bottom: 1px solid #a3ade0;
   }
+
   .middle-title {
     color: #ffcb11;
     margin-left: 8px;
   }
 }
+
 .main-right {
   display: flex;
   @include left-and-right;
+
   .img-item {
     @include img-size;
   }
@@ -479,6 +465,7 @@ watch(
   cursor: pointer;
   background: #f7f8fb;
   padding: 12px;
+
   .cont-title {
     display: flex;
     align-items: center;
@@ -486,14 +473,17 @@ watch(
     padding: 12px;
     border-bottom: 1px solid #a3ade0;
   }
+
   .cont-item {
     color: #1a2447;
     margin-left: 6px;
     vertical-align: middle;
   }
+
   .ied-desc {
     color: #255ce7;
   }
+
   .ied-desc-title {
     color: #134bea;
   }
@@ -504,6 +494,7 @@ watch(
     display: block;
   }
 }
+
 .midle-cont {
   display: flex;
   border: 1px solid #7484ab;
@@ -512,6 +503,7 @@ watch(
   margin-bottom: 8px;
   color: #1a2447;
 }
+
 .ied-desc-child,
 .midlestyle {
   @include left-and-right;
@@ -521,16 +513,20 @@ watch(
   color: #1a2447;
   flex: 1;
 }
+
 .omit {
   font-weight: bold;
   letter-spacing: 8px;
   font-size: 15px;
 }
+
 #wrapper {
   width: 0;
   height: 0;
-  position: relative; /* Origin of coordinates for lines, and scrolled content (i.e. not `absolute`) */
+  position: relative;
+  /* Origin of coordinates for lines, and scrolled content (i.e. not `absolute`) */
 }
+
 .text-midle {
   text-align: center;
   width: 94%;

+ 22 - 11
src/pages/system/components/InsideModule.vue

@@ -2,7 +2,7 @@
     <div>
         <div class="bigBox">
             <div style="text-align: center;">
-                <h2 style="font-size: 20px;">{{ needName }}</h2>
+                <h2 style="font-size: 20px;">{{ flashLevel }}- {{ linkStyle }} -{{ needName }}</h2>
             </div>
             <div style="display: flex;justify-content: flex-start;align-items: center;height: 93%;">
                 <div style="height: 100%;width: calc(100% - 0px);position: relative;">
@@ -68,7 +68,7 @@
                         <!-- 建议使用这个 -->
                         <DrawDesigns ref="designsRef" :lineMenuColor="lineMenuColor" :needObj="needObj" :fatX="fatX"
                             :fatY="fatY" :nowLook="nowLook" :needId="needId" :needName="needName" :coolObj="coolObj"
-                            :svOrGoose="svOrGoose" @backxy="backxy"></DrawDesigns>
+                            :svOrGoose="svOrGoose" @backxy="backxy" @drawCor="drawCor"></DrawDesigns>
                     </div>
                 </div>
             </div>
@@ -122,6 +122,8 @@ export default {
         let needName = ref('')
         let coolObj = ref({})
         let svOrGoose = ref(1)//0为sv,1为goose
+        let flashLevel = ref("")//抬头显示的电压等级
+        let linkStyle = ref("")//抬头显示的接线方式
         watch(() => props.tfType, (newVal) => {
             nowLook.value = newVal
         })
@@ -131,23 +133,23 @@ export default {
         watch(() => props.lineId, (newVal) => {
             needId.value = newVal
         })
-        watch(() => props.setName, (newVal) => {
-            needName.value = newVal
-        })
+        // watch(() => props.setName, (newVal) => {
+        //     needName.value = newVal
+        // })
         watch(() => props.setId, (newVal) => {
             coolObj.value = newVal
+            console.log(coolObj.value, 'insidewatch');
         })
         function searchModule() {
             needObj.value = props.insideNeed
             needId.value = props.lineId
             nowLook.value = result
-            if(props.setName){
-                needName.value = props.setName
-            }else{
-                needName.value = route.query.modelname
-            }
+            // if(props.setName){
+            //     needName.value = props.setName
+            // }else{
+            //     needName.value = route.query.modelname
+            // }
             coolObj.value = props.setId//模型整个数据
-            console.log(props.setId,'insideon');
         }
         function svClick() {
             lineMenuColor.value = 'orange'
@@ -189,6 +191,12 @@ export default {
             fatX.value = x
             fatY.value = y
         }
+        // 返回需要抬头显示数据
+        function drawCor(row) {
+            needName.value = row[0].model_name
+            flashLevel.value = row[0].voltage_level_name
+            linkStyle.value = row[0].line_link_style_name
+        }
         onMounted(() => {
             searchModule()
         })
@@ -216,6 +224,9 @@ export default {
             needName,
             coolObj,
             svOrGoose,//0为sv,1为goose
+            drawCor,
+            flashLevel,
+            linkStyle,
         }
     },
     components: {