|
@@ -156,12 +156,14 @@ import dataSource from "@/components/point/dynamicdata/dataSource";
|
|
|
import locationFlag from "@/components/point/dynamicdata/locationFlag";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import {
|
|
|
- dynamicPendingobjs,
|
|
|
+ // dynamicPendingobjs,
|
|
|
dynamicPendingPoint,
|
|
|
dynamicCreateRelation,
|
|
|
dynamicDeleteRelation,
|
|
|
dynamicPointTypeList,
|
|
|
- dynamicQueryAI
|
|
|
+ dynamicQueryAI,
|
|
|
+ dynamicRelatedObj,
|
|
|
+ partsQuery, //数据中心部件查询
|
|
|
} from "@/api/scan/request";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -390,46 +392,65 @@ export default {
|
|
|
},
|
|
|
//获取待关联实例-右侧
|
|
|
getRightData() {
|
|
|
- let param = {
|
|
|
+ let pa = {
|
|
|
PageNumber: this.rPage.pageNumber,
|
|
|
PageSize: this.rPage.pageSize,
|
|
|
- TypeNameList: [this.typeName]
|
|
|
+ Filters: 'not EquipID isNull'
|
|
|
};
|
|
|
//处理查询条件
|
|
|
if (this.form.ObjectLocalName && this.form.ObjectLocalName.length) {
|
|
|
- param.ObjectLocalName = this.form.ObjectLocalName;
|
|
|
- }
|
|
|
- if (this.form.SubTypeName.length) {
|
|
|
- param.SubTypeNameList = this.form.SubTypeName;
|
|
|
+ pa.Filters += `;EquipLocalName contain "${this.form.ObjectLocalName}"`;
|
|
|
}
|
|
|
+ //TODO
|
|
|
+ // if (this.form.SubTypeName.length) {
|
|
|
+ // param.SubTypeNameList = this.form.SubTypeName;
|
|
|
+ // }
|
|
|
if (this.form.locationVal.length > 0) {
|
|
|
- param.BuildLocalName = this.form.locationVal[0];
|
|
|
+ pa.Filters += `;BuildingId='${this.form.locationVal[0]}'`;
|
|
|
}
|
|
|
if (this.form.locationVal.length > 1) {
|
|
|
- param.FloorLocalName = this.form.locationVal[1];
|
|
|
- }
|
|
|
- if (this.form.locationVal.length > 2) {
|
|
|
- param.SpaceType = this.form.locationVal[2];
|
|
|
+ pa.Filters += `;FloorId='${this.form.locationVal[1]}'`;
|
|
|
}
|
|
|
- if (this.form.locationVal.length > 3) {
|
|
|
- param.RoomLocalName = this.form.locationVal[3];
|
|
|
+ let pa2 = {
|
|
|
+ Filters: `TypeName='${this.typeName}'`
|
|
|
}
|
|
|
- if (!this.form.locationVal.length) {
|
|
|
- delete param.BuildLocalName
|
|
|
- delete param.FloorLocalName
|
|
|
- delete param.SpaceType
|
|
|
- delete param.RoomLocalName
|
|
|
+ if (this.form.SubTypeName.length) {
|
|
|
+ pa2.Filters += `;SubTypeName in ${JSON.stringify(this.form.SubTypeName)}`
|
|
|
}
|
|
|
this.rTableLoading = true;
|
|
|
- dynamicPendingobjs(param, res => {
|
|
|
- this.rPage.total = res.PageSize < 50 ? res.PageSize : res.Total;
|
|
|
- if (this.rPage.pageNumber == 1) {
|
|
|
- this.RtableData = res.Content;
|
|
|
- } else {
|
|
|
- this.RtableData = this.RtableData.concat(res.Content);
|
|
|
+ dynamicRelatedObj(pa2, response => {
|
|
|
+ const tempArr = response.Content.map(t => {
|
|
|
+ return t.TypeCode + t.ProjectId + t.ObjectID
|
|
|
+ })
|
|
|
+ if (tempArr.length) {
|
|
|
+ pa.Filters += `;not EquipID in ${JSON.stringify(tempArr)}`
|
|
|
}
|
|
|
- this.rTableLoading = false;
|
|
|
- });
|
|
|
+ partsQuery(pa, res => {
|
|
|
+ this.rPage.total = res.Total;
|
|
|
+ let tempArr = res.Content.map(t => {
|
|
|
+ t.ObjectID = t.EquipID.substr(12);
|
|
|
+ t.ObjectLocalName = t.EquipLocalName;
|
|
|
+ t.ObjectLocalCode = t.EquipLocalID;
|
|
|
+ // t.SubTypeName = t.EquipCategory ? t.EquipCategory.EquipName : '';
|
|
|
+ // t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '';
|
|
|
+ // t.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '';
|
|
|
+ // t.RoomLocalName = '';
|
|
|
+ // if (t.ZoneSpaceBaseIn) {
|
|
|
+ // t.ZoneSpaceBaseIn.forEach(item => {
|
|
|
+ // t.RoomLocalName += item.RoomLocalName + ',';
|
|
|
+ // })
|
|
|
+ // t.RoomLocalName = t.RoomLocalName.substring(0, t.RoomLocalName.length - 1);
|
|
|
+ // }
|
|
|
+ return t;
|
|
|
+ });
|
|
|
+ if (this.rPage.pageNumber == 1) {
|
|
|
+ this.RtableData = tempArr;
|
|
|
+ } else {
|
|
|
+ this.RtableData = this.RtableData.concat(tempArr);
|
|
|
+ }
|
|
|
+ this.rTableLoading = false;
|
|
|
+ });
|
|
|
+ })
|
|
|
},
|
|
|
//清除对应关系成功
|
|
|
deleteSuc() {
|