story#6071,编辑车辆页面选择服务逻辑修改
This commit is contained in:
@ -74,8 +74,8 @@
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>车辆类型</span>
|
||||
</div>
|
||||
<select id="mySelect" class="mySelect" v-model="selectedOption">
|
||||
<option v-for="(item,index) in typeList" :key="index" :value="index">{{item}}</option>
|
||||
<select id="mySelect" class="mySelect" v-model="selectedOption" multiple :multiple-limit="isMultiple ? 2 : 1">
|
||||
<option v-for="(item,index) in typeList" :key="index" :value="index" :disabled="!item.disabled ? false : true">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
@ -168,8 +168,41 @@ export default {
|
||||
vehicleFrontPhoto: '', // 车头照
|
||||
vehicleLicenseInfo: {},
|
||||
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
||||
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
|
||||
}*/
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
this.id=this.$route.params?.id
|
||||
const selectElement = document.getElementById('mySelect');
|
||||
|
Reference in New Issue
Block a user