|
@@ -1122,7 +1122,6 @@ export default {
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
|
}else if(type == 6){//检查设备
|
|
|
//设备
|
|
|
- this.$set(self,'deviceDialogTableDataList',JSON.parse(JSON.stringify(this.dialogTableList)));
|
|
|
this.deviceResetQueryLeft();
|
|
|
this.deviceResetQueryRight();
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
@@ -1564,9 +1563,15 @@ export default {
|
|
|
let self = this;
|
|
|
let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
|
|
|
leftObj.selectedHazardIds = [];
|
|
|
- for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
- leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+
|
|
|
+ if(self.deviceDialogTableDataList[0]){
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
+ leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ leftObj.selectedHazardIds=self.dialogForm.hazardIds.split(',');
|
|
|
}
|
|
|
+
|
|
|
findDeviceList(leftObj).then(response => {
|
|
|
this.deviceTotalLeft = response.total;
|
|
|
this.deviceTableListLeft = response.rows;
|
|
@@ -1596,8 +1601,12 @@ export default {
|
|
|
let self = this;
|
|
|
let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
|
|
|
rightObj.hazardIds = [];
|
|
|
- for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
- rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+ if(self.deviceDialogTableDataList[0]){
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
+ rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ rightObj.hazardIds=self.dialogForm.hazardIds.split(',');
|
|
|
}
|
|
|
findDeviceList(rightObj).then(response => {
|
|
|
this.deviceTotalRight = response.total;
|