story#6071,编辑车辆页面选择服务逻辑修改
This commit is contained in:
@ -171,36 +171,28 @@ export default {
|
||||
isMultiple: false, // 是否支持多选
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
typeList(newVal){
|
||||
if(newVal == 4){
|
||||
this.isMultiple = true
|
||||
this.typeList[2].disabled=true
|
||||
this.typeList[5].disabled=true
|
||||
this.typeList[6].disabled=true
|
||||
this.typeList[7].disabled=true
|
||||
this.typeList[8].disabled=true
|
||||
this.typeList[9].disabled=true
|
||||
}else{
|
||||
this.isMultiple = false
|
||||
this.typeList[2].disabled=false
|
||||
this.typeList[5].disabled=false
|
||||
this.typeList[6].disabled=false
|
||||
this.typeList[7].disabled=false
|
||||
this.typeList[8].disabled=false
|
||||
this.typeList[9].disabled=false
|
||||
}
|
||||
/*if (newVal == 1 || newVal == 7){
|
||||
let arr = []
|
||||
this.allService.forEach((item)=>{
|
||||
if(!(item.title == '拖车服务' || item.title == '大型车救援')){
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
this.allService = arr
|
||||
}else{
|
||||
this.allService = this.oldAllService
|
||||
}*/
|
||||
watch: {
|
||||
typeList: {
|
||||
handler(newVal) {
|
||||
if (newVal == 4) {
|
||||
this.isMultiple = true;
|
||||
this.$set(this.typeList, 2, { ...this.typeList[2], disabled: true });
|
||||
this.$set(this.typeList, 5, { ...this.typeList[5], disabled: true });
|
||||
this.$set(this.typeList, 6, { ...this.typeList[6], disabled: true });
|
||||
this.$set(this.typeList, 7, { ...this.typeList[7], disabled: true });
|
||||
this.$set(this.typeList, 8, { ...this.typeList[8], disabled: true });
|
||||
this.$set(this.typeList, 9, { ...this.typeList[9], disabled: true });
|
||||
} else {
|
||||
this.isMultiple = false;
|
||||
this.$set(this.typeList, 2, { ...this.typeList[2], disabled: false });
|
||||
this.$set(this.typeList, 5, { ...this.typeList[5], disabled: false });
|
||||
this.$set(this.typeList, 6, { ...this.typeList[6], disabled: false });
|
||||
this.$set(this.typeList, 7, { ...this.typeList[7], disabled: false });
|
||||
this.$set(this.typeList, 8, { ...this.typeList[8], disabled: false });
|
||||
this.$set(this.typeList, 9, { ...this.typeList[9], disabled: false });
|
||||
}
|
||||
},
|
||||
deep: true, // 深度监听
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
|
Reference in New Issue
Block a user