Pārlūkot izejas kodu

设备带数据

YaolongHan 4 gadi atpakaļ
vecāks
revīzija
6b553561b2
2 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. 3 3
      src/components/editview/baseTopoEditer.vue
  2. 2 2
      vue.config.js

+ 3 - 3
src/components/editview/baseTopoEditer.vue

@@ -263,7 +263,7 @@ export default {
         }
         this.scene.addItem(item);
         // 如果为设备则存于vuex中便于联动
-        if (item instanceof SBaseEquipment) {
+        if (item.legendData.properties.type == "BaseEquipment") {
           anchorList = anchorList.concat(item.anchorList);
           this.ADDEQUIPITEM(item);
         }
@@ -282,7 +282,6 @@ export default {
             startAnc.isConnected = true;
             startAnc.parent?.connect("changePos", t, t.changePos);
             t.startAnchor = startAnc || null;
-            console.log("startAnc", startAnc);
           }
         }
         if (t.anchor12d) {
@@ -412,6 +411,7 @@ export default {
     },
     // 手动添加设备
     addEquipmentList(list) {
+      console.log('listlist',list)
       const parse = new PTopoParser();
       list.forEach((item, i) => {
         const x = (i + 1) * 100 + 300;
@@ -460,7 +460,7 @@ export default {
         }
         this.scene.addItem(item);
         // 如果为设备则存于vuex中便于联动
-        if (item instanceof SBaseEquipment) {
+        if (item.legendData.properties.type == "BaseEquipment") {
           this.ADDEQUIPITEM(item);
         }
       });

+ 2 - 2
vue.config.js

@@ -12,12 +12,12 @@ module.exports = {
                 secure: false,
             },
             '/meiku': {
-                target: 'http://60.205.177.43:8080',
+                target: 'http://60.205.177.43:28888',
                 changeOrigin: true,
                 secure: false,
             },
             '/datacenter4': {
-                target: 'http://60.205.177.43:8080',
+                target: 'http://60.205.177.43:28888',
                 changeOrigin: true,
                 secure: false,
             },