Переглянути джерело

'调试绑定的设备详情接口'

zhangyu 4 роки тому
батько
коміт
93cc7e72bf
1 змінених файлів з 19 додано та 8 видалено
  1. 19 8
      src/components/floorMap/index.vue

+ 19 - 8
src/components/floorMap/index.vue

@@ -55,7 +55,7 @@ import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
 import canvasFun from '@/components/floorMap/canvasFun'
 import { readGroup, queryStatis } from '@/api/public'
-import { queryShops } from '@/api/equipmentList.js'
+import { queryShops, queryAsset } from '@/api/equipmentList.js'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { mapGetters, mapActions } from 'vuex'
 import { SImageItem, SImageShowType, SGraphItem } from '@saga-web/graph/lib'
@@ -123,23 +123,34 @@ export default {
             this.showBtnWell = false;
             this.visible = false;
             this.activeItem = null;
-            console.log("handleClickLegendItem",item)
             if (item.data.AttachObjectIds && item.data.AttachObjectIds.length) {
                 const e = events[0];
                 const equipIds = [];
                 this.activeItem = item;
                 item.data.AttachObjectIds.forEach(v => {
                     if (v.type == "Image") {
-                        // if(v.id) { equipIds.push(v.id) }
-                        this.tabData.tableData.push(v);
+                        if(v.id) { equipIds.push(v.id) }
+                        // this.tabData.tableData.push(v);
                     } else if (v.type == "Zone") {
                         this.tabData.pointData.push(v);
                     }
                 })
-                // getEquipDeatil({  }).then(res => {
-
-                // })
-                this.activeName = this.tabData.tableData.length?"equip":"point";
+                if (equipIds.length) {
+                    let data = {
+                        plazaId: this.$store.state.plazaId,
+                        page: 1,
+                        size: equipIds.length
+                    }
+                    let postParams = {
+                        assetnumList: equipIds
+                    }
+                    queryAsset({ data, postParams }).then(res => {
+                        this.tabData.tableData = res.data.data;
+                        this.activeName = this.tabData.tableData.length?"equip":"point";
+                    })
+                } else {
+                    this.activeName = "point"
+                }
                 this.popoverPosition.top = `${e.clientY}px`;
                 this.popoverPosition.left = `${e.clientX}px`;
                 this.$nextTick(() => {