|
@@ -376,6 +376,8 @@ export default {
|
|
disabled: false,
|
|
disabled: false,
|
|
// 是否已选
|
|
// 是否已选
|
|
disabledChecked: false,
|
|
disabledChecked: false,
|
|
|
|
+ ///被选中数据是否加载完
|
|
|
|
+ isLoad: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -395,9 +397,11 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
- this.form.programList = JSON.parse(JSON.stringify(val));
|
|
|
|
- this.form.programList = this.form.programList.filter((i) => i);
|
|
|
|
- this.$message.success("操作成功!");
|
|
|
|
|
|
+ if (this.isLoad) {
|
|
|
|
+ this.form.programList = JSON.parse(JSON.stringify(val));
|
|
|
|
+ this.form.programList = this.form.programList.filter((i) => i);
|
|
|
|
+ this.$message.success("操作成功!");
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
//是否展示排序
|
|
//是否展示排序
|
|
@@ -456,6 +460,26 @@ export default {
|
|
this.tableData = res.data.records;
|
|
this.tableData = res.data.records;
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
+
|
|
|
|
+ this.isLoad = false;
|
|
|
|
+ if (this.form.programList.length > 0) {
|
|
|
|
+ var temp = [];
|
|
|
|
+ for (var i = 0; i < this.tableData.length; i++) {
|
|
|
|
+ for (var j = 0; j < this.form.programList.length; j++) {
|
|
|
|
+ if (this.form.programList[j].id === this.tableData[i].id) {
|
|
|
|
+ temp.push(this.tableData[i]);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (temp.length > 0) {
|
|
|
|
+ temp.forEach((item) => {
|
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(item, true);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.isLoad = true;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|