|
@@ -78,7 +78,6 @@ export default {
|
|
|
type: String,
|
|
|
default: "read"
|
|
|
},
|
|
|
- //默认值
|
|
|
list: {
|
|
|
type: [Array]
|
|
|
}
|
|
@@ -90,7 +89,6 @@ export default {
|
|
|
systemList: [],
|
|
|
allData: [],
|
|
|
multipleSelection: [],
|
|
|
- changeData: [],
|
|
|
iframeSrc: "",
|
|
|
iframeShow: false,
|
|
|
buildId: 'all', //查询条件
|
|
@@ -153,43 +151,27 @@ export default {
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
- if (this.changeData.length) {
|
|
|
- this.multipleSelection = this.changeData
|
|
|
- this.changeData = []
|
|
|
- }
|
|
|
},
|
|
|
-
|
|
|
//设置默认
|
|
|
toggleSelection(rows) {
|
|
|
- if (rows) {
|
|
|
- rows.forEach(row => {
|
|
|
- this.$refs.multipleTable.toggleRowSelection(row);
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ if (rows.length&&this.list.length) {
|
|
|
+ rows.map(row => {
|
|
|
+ this.list.map(t => {
|
|
|
+ if(row.SysID == t.SysID){
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ //确认
|
|
|
getChange() {
|
|
|
this.createRelatSys()
|
|
|
this.$emit("change", this.multipleSelection)
|
|
|
this.dialog.systemType = false
|
|
|
this.multipleSelection = []
|
|
|
},
|
|
|
-
|
|
|
- //设置默认选中项
|
|
|
- getSelected(list, all) {
|
|
|
- let map = []
|
|
|
- if (all && all.length && list && list.length) {
|
|
|
- all.map((item, index) => {
|
|
|
- list.map(child => {
|
|
|
- if (item.id == child.id) {
|
|
|
- this.$refs.multipleTable.toggleRowSelection(item)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
//点击详情
|
|
|
lookDeatils(infos) {
|
|
|
this.iframeSrc =
|
|
@@ -224,7 +206,7 @@ export default {
|
|
|
queryLinkSys(param, res => {
|
|
|
this.allData = res.Content
|
|
|
this.tableData = res.Content
|
|
|
- this.multipleSelection = []
|
|
|
+ this.toggleSelection(res.Content)
|
|
|
})
|
|
|
},
|
|
|
//添加设备关联系统关系
|