|
@@ -54,7 +54,7 @@
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.dealer.dealerSn"
|
|
|
+ :rowKey="(record) => record.dealerSn"
|
|
|
rowKeyName="dealerSn"
|
|
|
:row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: pageType=='viewDealers'?!!record.subareaAreaSn: !!record.chooseId} }) }"
|
|
|
@rowSelection="rowSelectionFun"
|
|
@@ -121,6 +121,7 @@ export default {
|
|
|
subareaAreaSn: undefined
|
|
|
},
|
|
|
userSn: '',
|
|
|
+ pageFlag: false,
|
|
|
chooseInfo: [],
|
|
|
tableHeight: 0,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -139,15 +140,17 @@ export default {
|
|
|
const chooseData = []
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ data.list[i].dealerSn = data.list[i].dealer.dealerSn
|
|
|
// 回显选中数据
|
|
|
const flag = _this.chooseInfo.includes(data.list[i].dealer.dealerSn)
|
|
|
if (flag) {
|
|
|
chooseData.push(data.list[i])
|
|
|
}
|
|
|
}
|
|
|
- console.log('111111:', chooseData)
|
|
|
- console.log('222222:', _this.chooseInfo)
|
|
|
- _this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
|
|
|
+ if (!this.pageFlag) {
|
|
|
+ this.pageFlag = true
|
|
|
+ _this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -192,7 +195,6 @@ export default {
|
|
|
},
|
|
|
searchForm (flag) {
|
|
|
this.$refs.table.refresh(flag)
|
|
|
- this.$refs.table.clearSelected()
|
|
|
this.spinning = false
|
|
|
},
|
|
|
subareaChange (val) {
|
|
@@ -220,7 +222,8 @@ export default {
|
|
|
this.$refs.areaList.clearData()
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
- this.$refs.table.clearSelected()
|
|
|
+ // this.$refs.table.clearSelected()
|
|
|
+ this.pageFlag = false
|
|
|
},
|
|
|
clearTable () {
|
|
|
this.rowSelectionInfo = null
|