|
@@ -56,7 +56,7 @@
|
|
size="small"
|
|
size="small"
|
|
:rowKey="(record) => record.dealerSn"
|
|
:rowKey="(record) => record.dealerSn"
|
|
rowKeyName="dealerSn"
|
|
rowKeyName="dealerSn"
|
|
- :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !!record.subareaAreaSn } }) }"
|
|
|
|
|
|
+ :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: pageType=='viewDealers'?!!record.subareaAreaSn: !!record.chooseId} }) }"
|
|
@rowSelection="rowSelectionFun"
|
|
@rowSelection="rowSelectionFun"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
@@ -138,7 +138,7 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
_this.chooseInfo.forEach(con => {
|
|
_this.chooseInfo.forEach(con => {
|
|
if (data.list[i].dealerSn == con) {
|
|
if (data.list[i].dealerSn == con) {
|
|
- data.list[i].subareaAreaSn = con
|
|
|
|
|
|
+ data.list[i].chooseId = con
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -165,8 +165,8 @@ export default {
|
|
arr.splice(5, 0, { title: '当前所属区域', scopedSlots: { customRender: 'areas' }, width: '30%', align: 'center' })
|
|
arr.splice(5, 0, { title: '当前所属区域', scopedSlots: { customRender: 'areas' }, width: '30%', align: 'center' })
|
|
arr.splice(6, 0, { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' })
|
|
arr.splice(6, 0, { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' })
|
|
} else {
|
|
} else {
|
|
- arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text&&text[0] || '--' }})
|
|
|
|
- arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text&&text[1] || '--' }})
|
|
|
|
|
|
+ arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text && text[0] || '--' } })
|
|
|
|
+ arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text && text[1] || '--' } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
},
|
|
},
|
|
@@ -208,10 +208,11 @@ export default {
|
|
subareaAreaSn: undefined
|
|
subareaAreaSn: undefined
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(this.pageType!='viewDealers'){
|
|
|
|
|
|
+ if (this.pageType != 'viewDealers') {
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.subarea.clearData()
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs.areaList.clearData()
|
|
}
|
|
}
|
|
- this.$refs.areaList.clearData()
|
|
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.clearSelected()
|
|
this.$refs.table.clearSelected()
|
|
},
|
|
},
|
|
@@ -263,6 +264,9 @@ export default {
|
|
mounted () {
|
|
mounted () {
|
|
this.pageInit()
|
|
this.pageInit()
|
|
},
|
|
},
|
|
|
|
+ activated () {
|
|
|
|
+ this.pageInit()
|
|
|
|
+ },
|
|
watch: {
|
|
watch: {
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
this.setTableH()
|
|
this.setTableH()
|