|
|
|
|
@ -13,14 +13,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="select-item">
|
|
|
|
|
<div class="select-item__label">业务板块</div>
|
|
|
|
|
<el-select size="small" v-model="select.product_type_id" placeholder="选择业务板块" clearable style="width: 200px">
|
|
|
|
|
<el-select collapse-tags multiple size="small" v-model="select.product_type_id" placeholder="选择业务板块" clearable style="width: 200px">
|
|
|
|
|
<el-option v-for="item in types" :value="item.id" :label="item.name" :key="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="select-item">
|
|
|
|
|
<div class="select-item__label">所属区域</div>
|
|
|
|
|
<el-select size="small" v-model="select.area_id" placeholder="选择区域" clearable style="width: 200px">
|
|
|
|
|
<el-select collapse-tags multiple size="small" v-model="select.area_id" placeholder="选择区域" clearable style="width: 200px">
|
|
|
|
|
<el-option v-for="item in areas" :value="item.id" :label="item.value" :key="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
@ -179,12 +179,12 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
async getAreas(){
|
|
|
|
|
this.areas = getAuthAreas(this)
|
|
|
|
|
this.select.area_id = this.areas[0]?.id
|
|
|
|
|
this.select.area_id = this.areas.map(item => item.id)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getTypes(){
|
|
|
|
|
this.types = getAuthTypes(this)
|
|
|
|
|
this.select.product_type_id = this.types[0]?.id
|
|
|
|
|
this.select.product_type_id = this.types.map(item => item.id)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getProducts(){
|
|
|
|
|
@ -230,13 +230,6 @@ export default {
|
|
|
|
|
this.$refs['addSchedule'].isShow = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
beforeRouteEnter(to,from,next){
|
|
|
|
|
next(vm => {
|
|
|
|
|
if(from.path === '/customer/customer'){
|
|
|
|
|
vm.select.product_type_id = typeof to.query.product_type_id === 'string' ? Number(to.query.product_type_id) : ''
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getTypes()
|
|
|
|
|
this.getProducts()
|
|
|
|
|
|