动力类型可删,回显正确
This commit is contained in:
+28
-2
@@ -156,7 +156,7 @@
|
||||
<span class="title-text-text plus3" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: 38%">
|
||||
<a-select class="box-input" v-model="form.dllx1" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">
|
||||
<a-select class="box-input" v-model="form.dllx1" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">
|
||||
<a-select-option v-for="(item, key) in projectNameList1"
|
||||
:key="key"
|
||||
:value="item">
|
||||
@@ -165,7 +165,7 @@
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item class="itemModel" style="width: 40%;margin-left:20px">
|
||||
<a-select v-model="form.dllx2" class="box-input" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select v-model="form.dllx2" class="box-input" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select-option v-for="(item, key) in projectNameList2"
|
||||
:key="key"
|
||||
:value="item">
|
||||
@@ -326,6 +326,7 @@ import { message } from 'ant-design-vue'
|
||||
this.form.cpxh=res.result.cpxh
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.cdotasj=res.result.cdotasj
|
||||
this.form.id=res.result.id
|
||||
if(this.$route.query.type == 1 && res.result.cxmb == null){
|
||||
this.form.cxmb = this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh
|
||||
@@ -338,8 +339,14 @@ import { message } from 'ant-design-vue'
|
||||
if(res.result.dllx2 == null){
|
||||
res.result.dllx2 = undefined
|
||||
}
|
||||
|
||||
if(res.result.cplb == null){
|
||||
res.result.cplb = undefined
|
||||
}
|
||||
this.form.dllx1=res.result.dllx1
|
||||
this.form.dllx2=res.result.dllx2
|
||||
this.form.cplb=res.result.cplb
|
||||
this.getDllx2()
|
||||
// this.changeSelect()
|
||||
this.$forceUpdate()
|
||||
}
|
||||
@@ -366,6 +373,7 @@ import { message } from 'ant-design-vue'
|
||||
if(otaId==null || otaId == undefined){
|
||||
otaId=''
|
||||
}
|
||||
|
||||
postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => {
|
||||
if(res.code == 200){
|
||||
localStorage.setItem('otaId', res.result.otaId)
|
||||
@@ -387,6 +395,24 @@ import { message } from 'ant-design-vue'
|
||||
}else{
|
||||
this. projectNameList2=['其他']
|
||||
}
|
||||
},
|
||||
getDllx2(){
|
||||
if(this.form.dllx1==undefined){
|
||||
this.projectNameList=[]
|
||||
}
|
||||
if(this.form.dllx1=='传统动力汽车'){
|
||||
this. projectNameList2=['汽油','柴油']
|
||||
}
|
||||
if(this.form.dllx1=='节能汽车'){
|
||||
this. projectNameList2=['混合动力','天然气','甲醇','其他']
|
||||
}
|
||||
if(this.form.dllx1=='新能源汽车'){
|
||||
this. projectNameList2=['纯电动','插电式混合动力','燃料电池']
|
||||
}
|
||||
if(this.form.dllx1=='其他'){
|
||||
this. projectNameList2=['其他']
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
update(){
|
||||
|
||||
Reference in New Issue
Block a user