|
@@ -102,7 +102,8 @@ import {
|
|
|
dynamicExecute,
|
|
|
dynamicQuery,
|
|
|
dynamicQueryPoint,
|
|
|
- dynamicPointTypeList
|
|
|
+ dynamicPointTypeList,
|
|
|
+ queryEquip, //数据中心设备查询
|
|
|
} from "@/api/scan/request";
|
|
|
export default {
|
|
|
computed: {
|
|
@@ -198,8 +199,44 @@ export default {
|
|
|
this.loading = true;
|
|
|
// 查询对应关系(P1)
|
|
|
dynamicQuery(param, res => {
|
|
|
- this.loading = false;
|
|
|
- this.tableData = res.Content;
|
|
|
+ let dyData = res.Content;
|
|
|
+ let tempArr = dyData.map(t => {
|
|
|
+ if (t.Related == 'True') {
|
|
|
+ t.EquipID = t.TypeCode + t.ProjectId + t.ObjectID;
|
|
|
+ return t.EquipID;
|
|
|
+ }
|
|
|
+ return undefined;
|
|
|
+ }).filter(item => item);
|
|
|
+ if (tempArr.length) {
|
|
|
+ queryEquip({
|
|
|
+ PageSize: this.page.pageSize,
|
|
|
+ Filters: `EquipID in ${JSON.stringify(tempArr)}`,
|
|
|
+ Cascade: [{ Name: "zoneSpaceInBase" }, { Name: 'building' }, { Name: 'floor' }]
|
|
|
+ }, response => {
|
|
|
+ let Data = response.Content;
|
|
|
+ dyData.forEach(item => {
|
|
|
+ Data.forEach(t => {
|
|
|
+ if (t.EquipID == item.EquipID) {
|
|
|
+ item.ObjectLocalName = t.FloorLocalName;
|
|
|
+ item.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
|
|
|
+ item.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
|
|
|
+ item.RoomLocalName = '';
|
|
|
+ if (t.ZoneSpaceBaseIn) {
|
|
|
+ t.ZoneSpaceBaseIn.forEach(it => {
|
|
|
+ item.RoomLocalName += it.RoomLocalName + ',';
|
|
|
+ })
|
|
|
+ item.RoomLocalName = item.RoomLocalName.substring(0, item.RoomLocalName.length - 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.loading = false;
|
|
|
+ this.tableData = dyData;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.loading = false;
|
|
|
+ this.tableData = dyData;
|
|
|
+ }
|
|
|
this.page.total = res.PageSize < 50 ? res.PageSize : res.Total;
|
|
|
});
|
|
|
},
|