liyangzheng hai 1 ano
pai
achega
3100961d23

+ 28 - 26
src/pages/components/draw/DrawDesigns.vue

@@ -124,26 +124,26 @@ export default {
             coolName.value = newVal
         })
         watch(() => props.coolObj, (newVal) => {
-          setTimeout(() => {
-            loading.value = true
-            copyObj.value = newVal
-            modelId.value = copyObj.value.id
-            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
-                console.log('watchRender');
-                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' } })
+            setTimeout(() => {
+                loading.value = true
+                copyObj.value = newVal
+                modelId.value = copyObj.value.id
+                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
+                    console.log('watchRender');
+                    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' } })
+                        }
                     }
-                }
-            }, { immediate: true })
-          }, 3000);
+                }, { immediate: true })
+            }, 3000);
         })
         watch(() => props.svOrGoose, (newVal) => {
             numCase.value = newVal
@@ -225,7 +225,8 @@ export default {
         function lastRender() {
             loading.value = true
             modelId.value = route.query.modelid
-            cid.getModelInfo({ id: modelId.value, pageno: 1, pagesize: 20 }).then(res => {
+            console.log(modelId.value, 'modelid')
+            cid.getModelInfo({ id: modelId.value - 0, 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);
@@ -401,12 +402,12 @@ export default {
                     endText.value = end.text.value//结束文本
                     startTarget.value = start.properties
                     endTarget.value = end.properties
-                    console.log(copyColor.value,'copy');
-                    console.log(data,'data');
-                    if(copyColor.value == '#255CE7'){
+                    console.log(copyColor.value, 'copy');
+                    console.log(data, 'data');
+                    if (copyColor.value == '#255CE7') {
                         lf.value.graphModel.updateText(data.data.id, "GOOSE");
                         console.log('修改了goose');
-                    }else if(copyColor.value == 'orange'){
+                    } else if (copyColor.value == 'orange') {
                         lf.value.graphModel.updateText(data.data.id, "SV");
                         console.log('修改了sv');
                     }
@@ -435,9 +436,9 @@ export default {
                 lf.value.extension.dndPanel.setPatternItems(needMap.value);
                 lf.value.render();
                 lastRender()
-                setTimeout(()=>{
+                setTimeout(() => {
                     loading.value = false
-                },10000)
+                }, 10000)
             })
         })
         function abilityBack(data) {
@@ -503,6 +504,7 @@ export default {
 :deep(.lf-element-text) {
     color: black;
 }
+
 /* :deep(.lf-dndpanel){
     w
 } */

+ 5 - 3
src/pages/system/modalComp/DelLine.vue

@@ -2,10 +2,12 @@
     <div>
         <div>
             <el-dialog v-model="dialogVisible" title="删除信息" width="30%" @close="closes" :close-on-click-modal="false">
-                <h3 style="text-align: center;">
-                    <el-icon style="color: red;">
+                <div style="display: flex;justify-content:center;align-items: center;">
+                    <el-icon style="color: red;font-size: 40px;display: block;">
                         <WarningFilled />
-                    </el-icon>确定删除该信息?</h3>
+                    </el-icon>
+                    <span style="display: block;">是否确认删除该信息?</span>
+                </div>
                 <template #footer>
                     <span class="dialog-footer">
                         <el-button @click="cancels">取消</el-button>