|
@@ -12,7 +12,7 @@
|
|
</div>
|
|
</div>
|
|
<a-card size="small" :bordered="false" class="categorySet-cont">
|
|
<a-card size="small" :bordered="false" class="categorySet-cont">
|
|
<div :style="{ height: tableHeight+84.5+'px' }">
|
|
<div :style="{ height: tableHeight+84.5+'px' }">
|
|
- <a-tabs default-active-key="1" @change="handleTabs">
|
|
|
|
|
|
+ <a-tabs v-model="activeKeyVal" @change="handleTabs">
|
|
<a-tab-pane key="1" tab="设置管辖区域" v-if="infoObj.allDealerFlag && infoObj.allDealerFlag!=1">
|
|
<a-tab-pane key="1" tab="设置管辖区域" v-if="infoObj.allDealerFlag && infoObj.allDealerFlag!=1">
|
|
<div class="areaSet-wrap">
|
|
<div class="areaSet-wrap">
|
|
<div class="table-page-search-wrapper newTableSearchName" >
|
|
<div class="table-page-search-wrapper newTableSearchName" >
|
|
@@ -119,12 +119,11 @@ export default {
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: {
|
|
queryParam: {
|
|
hasDetail: 0,
|
|
hasDetail: 0,
|
|
- subareaArea: {
|
|
|
|
- subareaSn: undefined,
|
|
|
|
- subareaAreaSn: undefined
|
|
|
|
- },
|
|
|
|
|
|
+ bizType: undefined,
|
|
|
|
+ bizSn: undefined,
|
|
dealerName: ''
|
|
dealerName: ''
|
|
},
|
|
},
|
|
|
|
+ activeKeyVal: '1',
|
|
infoObj: {},
|
|
infoObj: {},
|
|
newChooseData: {// 区域分区回显
|
|
newChooseData: {// 区域分区回显
|
|
checked: [],
|
|
checked: [],
|
|
@@ -162,11 +161,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 获取用户基本信息
|
|
getBaseInfo () {
|
|
getBaseInfo () {
|
|
const _this = this
|
|
const _this = this
|
|
findById({ id: _this.$route.query.id }).then(res => {
|
|
findById({ id: _this.$route.query.id }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.infoObj = res.data
|
|
_this.infoObj = res.data
|
|
|
|
+ _this.activeKeyVal = '1'
|
|
_this.$nextTick(() => {
|
|
_this.$nextTick(() => {
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
})
|
|
})
|
|
@@ -206,22 +207,30 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleTabs (val) {
|
|
handleTabs (val) {
|
|
|
|
+ this.activeKeyVal = val
|
|
if (val == 2) {
|
|
if (val == 2) {
|
|
this.$refs.setCategory.pageInit()
|
|
this.$refs.setCategory.pageInit()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 所在区域分区查询
|
|
// 所在区域分区查询
|
|
subareaChange (val) {
|
|
subareaChange (val) {
|
|
- this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
|
- this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
|
|
|
+ if (val.length == 1) {
|
|
|
|
+ this.queryParam.bizSn = val[0]
|
|
|
|
+ this.queryParam.bizType = 'subarea'
|
|
|
|
+ } else if (val.length == 2) {
|
|
|
|
+ this.queryParam.bizSn = val[1]
|
|
|
|
+ this.queryParam.bizType = 'subarea_area'
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParam.bizSn = undefined
|
|
|
|
+ this.queryParam.bizType = undefined
|
|
|
|
+ }
|
|
},
|
|
},
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
- subareaArea: {
|
|
|
|
- subareaSn: undefined,
|
|
|
|
- subareaAreaSn: undefined
|
|
|
|
- },
|
|
|
|
- dealerName: ''
|
|
|
|
|
|
+ bizSn: undefined,
|
|
|
|
+ bizType: undefined,
|
|
|
|
+ dealerName: '',
|
|
|
|
+ hasDetail: 0
|
|
}
|
|
}
|
|
if (this.infoObj && this.infoObj.allDealerFlag != 1) {
|
|
if (this.infoObj && this.infoObj.allDealerFlag != 1) {
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.subarea.clearData()
|
|
@@ -230,7 +239,6 @@ export default {
|
|
},
|
|
},
|
|
// 选择区域
|
|
// 选择区域
|
|
async openAreaModal () {
|
|
async openAreaModal () {
|
|
- this.$refs.partQuery.pageInit()
|
|
|
|
const _this = this
|
|
const _this = this
|
|
const checkedArr = []
|
|
const checkedArr = []
|
|
const dataList = await queryAreaScope({ userSn: this.$route.query.sn })
|
|
const dataList = await queryAreaScope({ userSn: this.$route.query.sn })
|
|
@@ -247,6 +255,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.newChooseData.checked = []
|
|
this.newChooseData.checked = []
|
|
}
|
|
}
|
|
|
|
+ this.$refs.partQuery.pageInit()
|
|
_this.$nextTick(() => {
|
|
_this.$nextTick(() => {
|
|
_this.openChooseArea = true
|
|
_this.openChooseArea = true
|
|
})
|
|
})
|
|
@@ -322,19 +331,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
- if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
|
- this.pageInit()
|
|
|
|
- }
|
|
|
|
|
|
+ this.pageInit()
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
- // 如果是新页签打开,则重置当前页面
|
|
|
|
- if (this.$store.state.app.isNewTab) {
|
|
|
|
- this.pageInit()
|
|
|
|
- }
|
|
|
|
- // 仅刷新列表,不重置页面
|
|
|
|
- if (this.$store.state.app.updateList) {
|
|
|
|
- this.pageInit()
|
|
|
|
- }
|
|
|
|
|
|
+ this.pageInit()
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {})
|
|
next(vm => {})
|