|
@@ -217,7 +217,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
- this.tableOption()
|
|
|
|
|
|
+ // this.tableOption()
|
|
this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
|
|
this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
|
|
this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
|
|
this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
|
|
@@ -274,8 +274,8 @@ export default {
|
|
this.$refs.table.refresh()
|
|
this.$refs.table.refresh()
|
|
},
|
|
},
|
|
onSelectChange (selectedRowKeys, selectedRows) {
|
|
onSelectChange (selectedRowKeys, selectedRows) {
|
|
- this.selectedRowKeys = Array.from(new Set([...selectedRowKeys, ...this.selectedRowKeys]))
|
|
|
|
- this.selectedRows = Array.from(new Set([...selectedRows, ...this.selectedRows]))
|
|
|
|
|
|
+ this.selectedRowKeys = Array.from(new Set([...selectedRowKeys]))
|
|
|
|
+ this.selectedRows = Array.from(new Set([...selectedRows]))
|
|
},
|
|
},
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
@@ -293,17 +293,15 @@ export default {
|
|
this.treeData = res.data
|
|
this.treeData = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- base (record, queryParam = {}) {
|
|
|
|
|
|
+ base (record, keys) {
|
|
this.visible = true
|
|
this.visible = true
|
|
this.modalTitle = '选择设备'
|
|
this.modalTitle = '选择设备'
|
|
- this.extraQueryParam = queryParam
|
|
|
|
if (this.isCreated) {
|
|
if (this.isCreated) {
|
|
- console.log(this.$refs.table)
|
|
|
|
- this.$refs.table.clearSelected()
|
|
|
|
|
|
+ if (keys.length === 0) this.$refs.table.clearSelected()
|
|
this.options.rowSelection.type = this.type
|
|
this.options.rowSelection.type = this.type
|
|
this.handleOk()
|
|
this.handleOk()
|
|
} else {
|
|
} else {
|
|
- this.tableOption()
|
|
|
|
|
|
+ // this.tableOption()
|
|
this.isCreated = true
|
|
this.isCreated = true
|
|
}
|
|
}
|
|
// this.mySelect(this.selectedRowKeys, this.selectedRows)
|
|
// this.mySelect(this.selectedRowKeys, this.selectedRows)
|
|
@@ -319,13 +317,15 @@ export default {
|
|
this.confirmLoading = true
|
|
this.confirmLoading = true
|
|
this.$emit('selected', this.selectedRowKeys, this.selectedRows)
|
|
this.$emit('selected', this.selectedRowKeys, this.selectedRows)
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
|
|
+ this.queryParam = {
|
|
|
|
+ }
|
|
this.visible = false
|
|
this.visible = false
|
|
this.selectedRowKeys = []
|
|
this.selectedRowKeys = []
|
|
this.selectedRows = []
|
|
this.selectedRows = []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mySelect (selectedRowKeys, selectedRows) {
|
|
mySelect (selectedRowKeys, selectedRows) {
|
|
- this.$refs.table.updateSelect([...selectedRowKeys, ...this.selectedRowKeys], [...selectedRows, ...this.selectedRows])
|
|
|
|
|
|
+ this.$refs.table.updateSelect([...selectedRowKeys], [...selectedRows])
|
|
this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
|
|
this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
|
|
}
|
|
}
|
|
}
|
|
}
|