|
@@ -25,7 +25,7 @@
|
|
|
<div class="query-item">
|
|
|
<label>设备标识关键字</label>
|
|
|
<el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" class="input-with-select">
|
|
|
- <el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="queryLeftTable"></el-button>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
@@ -78,7 +78,7 @@
|
|
|
<div class="query-item">
|
|
|
<label>设备实例关键字</label>
|
|
|
<el-input placeholder="请输入设备实例关键字" v-model="form.EquipLocalName" class="input-with-select">
|
|
|
- <el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="queryRightTable"></el-button>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
pageNumber: 1,
|
|
|
pageSize: 50,
|
|
|
total: 0
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -237,7 +237,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- let param = { Related: false };
|
|
|
//对象类型
|
|
|
this.getTypeNames();
|
|
|
},
|
|
@@ -267,11 +266,11 @@ export default {
|
|
|
selectAI(i, l) {
|
|
|
//i 索引 l 左侧AI or 右侧AI
|
|
|
if (l == "l") {
|
|
|
- this.leftRecoList[i].checked = !this.leftRecoList[i].checked;
|
|
|
+ this.leftRecoList[i].checked = true;
|
|
|
this.lArray = [];
|
|
|
this.lArray.push(this.leftRecoList[i]);
|
|
|
} else {
|
|
|
- this.rightRecoList[i].checked = !this.rightRecoList[i].checked;
|
|
|
+ this.rightRecoList[i].checked = true;
|
|
|
this.rArray = [];
|
|
|
this.rArray.push(this.rightRecoList[i]);
|
|
|
}
|
|
@@ -292,7 +291,8 @@ export default {
|
|
|
this.showPlus = false;
|
|
|
}, 800);
|
|
|
//重新获取数据
|
|
|
- this.refresh();
|
|
|
+ this.queryLeftTable();
|
|
|
+ this.queryRightTable();
|
|
|
},
|
|
|
//表格中的选中事件
|
|
|
leftSelectionChange(selection) {
|
|
@@ -301,25 +301,35 @@ export default {
|
|
|
rightSelectionChange(selection) {
|
|
|
this.rArray = selection;
|
|
|
},
|
|
|
+ //查询左侧列表
|
|
|
+ queryLeftTable() {
|
|
|
+ this.lPage.pageNumber = 1;
|
|
|
+ this.getLeftData();
|
|
|
+ },
|
|
|
+ //查询右侧列表
|
|
|
+ queryRightTable() {
|
|
|
+ this.rPage.pageNumber = 1;
|
|
|
+ this.getRightData();
|
|
|
+ },
|
|
|
//获取待关联点位-左侧
|
|
|
getLeftData() {
|
|
|
let param = {
|
|
|
PageNumber: this.lPage.pageNumber,
|
|
|
PageSize: this.lPage.pageSize,
|
|
|
- TypeName: this.curType
|
|
|
+ TypeNameList: [this.curType]
|
|
|
};
|
|
|
//处理查询条件(目前只是单个查,需后台支持)
|
|
|
if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
|
|
|
param.EquipmentMark = this.form.EquipmentMark;
|
|
|
}
|
|
|
if (this.form.SubTypeName.length) {
|
|
|
- param.SubTypeName = this.form.SubTypeName.toString();
|
|
|
+ param.SubTypeNameList = this.form.SubTypeName;
|
|
|
}
|
|
|
if (this.form.LocationFlag.length) {
|
|
|
- param.LocationFlag = this.form.LocationFlag.toString();
|
|
|
+ param.LocationFlagList = this.form.LocationFlag;
|
|
|
}
|
|
|
if (this.form.Datasource.length) {
|
|
|
- param.Datasource = this.form.Datasource.toString();
|
|
|
+ param.DatasourceList = this.form.Datasource;
|
|
|
}
|
|
|
this.lTableLoading = true;
|
|
|
dynamicPendingPoint(param, res => {
|
|
@@ -337,24 +347,24 @@ export default {
|
|
|
let param = {
|
|
|
PageNumber: this.rPage.pageNumber,
|
|
|
PageSize: this.rPage.pageSize,
|
|
|
- TypeName: this.curType
|
|
|
+ TypeNameList: [this.curType]
|
|
|
};
|
|
|
//处理查询条件(目前只是单个查,需后台支持)
|
|
|
if (this.form.EquipLocalName && this.form.EquipLocalName.length) {
|
|
|
param.EquipLocalName = this.form.EquipLocalName;
|
|
|
}
|
|
|
if (this.form.SubTypeName.length) {
|
|
|
- param.SubTypeName = this.form.SubTypeName.toString();
|
|
|
+ param.SubTypeNameList = this.form.SubTypeName;
|
|
|
+ }
|
|
|
+ if (this.locationVal.length == 1) {
|
|
|
+ param.BuildLocalName = this.locationVal[0];
|
|
|
+ } else if (this.locationVal.length == 2) {
|
|
|
+ param.FloorLocalName = this.locationVal[1];
|
|
|
+ } else if (this.locationVal.length == 3) {
|
|
|
+ param.RoomLocalName = this.locationVal[2];
|
|
|
+ } else if (this.locationVal.length == 4) {
|
|
|
+ param.SpaceType = this.locationVal[3];
|
|
|
}
|
|
|
- // if (this.locationVal.length == 1) {
|
|
|
- // param.BuildLocalName = this.locationVal[0];
|
|
|
- // } else if (this.locationVal.length == 2) {
|
|
|
- // param.FloorLocalName = this.locationVal[1];
|
|
|
- // } else if (this.locationVal.length == 3) {
|
|
|
- // param.RoomLocalName = this.locationVal[2];
|
|
|
- // } else if (this.locationVal.length == 4) {
|
|
|
- // param.SpaceType = this.locationVal[3];
|
|
|
- // }
|
|
|
this.rTableLoading = true;
|
|
|
dynamicPendingobjs(param, res => {
|
|
|
this.rPage.total = res.Total;
|
|
@@ -366,17 +376,11 @@ export default {
|
|
|
this.rTableLoading = false;
|
|
|
});
|
|
|
},
|
|
|
- //刷新列表
|
|
|
- refresh() {
|
|
|
- this.lPage.pageNumber = 1;
|
|
|
- this.rPage.pageNumber = 1;
|
|
|
- this.getLeftData();
|
|
|
- this.getRightData();
|
|
|
- },
|
|
|
//清除对应关系成功
|
|
|
deleteSuc() {
|
|
|
this.num--;
|
|
|
- this.refresh();
|
|
|
+ this.queryLeftTable();
|
|
|
+ this.queryRightTable();
|
|
|
},
|
|
|
//所在位置修改
|
|
|
changeLocation(val) {
|