ota跳转修改

This commit is contained in:
zyx.net
2023-05-17 09:29:06 +08:00
parent c090ce607d
commit e16f94cd39
6 changed files with 415 additions and 383 deletions
+1
View File
@@ -1834,4 +1834,5 @@ module.exports = {
deliveryTime:'Delivery Time', deliveryTime:'Delivery Time',
expectedDeliveryTime:'Expected Delivery Time', expectedDeliveryTime:'Expected Delivery Time',
changeAuthor:'Change Author', changeAuthor:'Change Author',
requireddataisnull:'Required data is null',
} }
+1
View File
@@ -1935,4 +1935,5 @@ module.exports = {
deliveryTime:'交付时间', deliveryTime:'交付时间',
expectedDeliveryTime:'预计交付时间', expectedDeliveryTime:'预计交付时间',
changeAuthor:'更改作者', changeAuthor:'更改作者',
requireddataisnull:'必填数据为空',
} }
@@ -296,6 +296,10 @@ export default {
} }
}) })
}else{
// let otaflag = 3
this.$message.warning(this.$t('requireddataisnull'))
// localStorage.setItem('otaflag',otaflag)
} }
// else { // else {
// this.form.bapc = undefined // this.form.bapc = undefined
@@ -228,7 +228,16 @@ export default {
} else if(this.oldName == this.$t('informationaboutotherupgradetasks')){ } else if(this.oldName == this.$t('informationaboutotherupgradetasks')){
this.$refs.otherRef.save() this.$refs.otherRef.save()
} }
this.oldName = tab setTimeout(()=>{
let otaflag = localStorage.getItem('otaflag')
if(otaflag){
console.log(otaflag)
this.tabActive = this.$t('upgradetargetmodel')
this.oldName = this.$t('upgradetargetmodel')
}
this.oldName = tab
},1000)
localStorage.removeItem('otaflag')
}, },
handleToggleSearch() { handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus this.toggleSearchStatus = !this.toggleSearchStatus
@@ -20,7 +20,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId"> <a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
<a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id" > <a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id" >
{{ item.value }} {{ item.value }}
</a-select-option> </a-select-option>
@@ -33,15 +33,15 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('theNameOfFirm')">{{$t('theNameOfFirm')}}</span> <span class="title-text-text" :title="$t('theNameOfFirm')">{{$t('theNameOfFirm')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="50" :max-length="50"
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
:title='form.qymc' :title='form.qymc'
disabled disabled
v-model="form.qymc"> v-model="form.qymc">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -51,15 +51,15 @@
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span> <span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="djbh"> <a-form-model-item class="itemModel" prop="djbh">
<a-input <a-input
:max-length="50" :max-length="50"
:disabled="disabled" :disabled="disabled"
:title='form.djbh' :title='form.djbh'
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model.trim="form.djbh"> v-model.trim="form.djbh">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -88,13 +88,13 @@
</div> </div>
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<a-input <a-input
:max-length="500" :max-length="500"
:disabled="disabled" :disabled="disabled"
:title='form.ggpc' :title='form.ggpc'
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="form.ggpc"> v-model="form.ggpc">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -105,13 +105,13 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="50" :max-length="50"
:disabled="disabled" :disabled="disabled"
:title='form.cpsb' :title='form.cpsb'
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="form.cpsb"> v-model="form.cpsb">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -122,13 +122,13 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="50" :max-length="50"
:disabled="disabled" :disabled="disabled"
:title='form.cpmc' :title='form.cpmc'
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="form.cpmc"> v-model="form.cpmc">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -140,13 +140,13 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="50" :max-length="50"
:disabled="disabled" :disabled="disabled"
:title='form.cpxh' :title='form.cpxh'
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model="form.cpxh"> v-model="form.cpxh">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -155,44 +155,44 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text plus3" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span> <span class="title-text-text plus3" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<div style="display:flex;flex-wrap: nowrap;width: 100%;"> <div style="display:flex;flex-wrap: nowrap;width: 100%;">
<div style="width: 90%;margin-right: 20px;"> <div style="width: 90%;margin-right: 20px;">
<!-- <a-select class="box-input" style="width: 100%;" v-model="form.dllx1" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">--> <!-- <a-select class="box-input" style="width: 100%;" v-model="form.dllx1" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">-->
<!-- <a-select-option v-for="(item, key) in projectNameList1"--> <!-- <a-select-option v-for="(item, key) in projectNameList1"-->
<!-- :key="key"--> <!-- :key="key"-->
<!-- :value="item">--> <!-- :value="item">-->
<!-- {{ item }}--> <!-- {{ item }}-->
<!-- </a-select-option>--> <!-- </a-select-option>-->
<!-- </a-select>--> <!-- </a-select>-->
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
:dictCode="'vehicle_dynamic_type'" :dictCode="'vehicle_dynamic_type'"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
@input="changeSelect(form.dllx1)" @input="changeSelect(form.dllx1)"
:triggerChange="false" :triggerChange="false"
v-model="form.dllx1"/> v-model="form.dllx1"/>
</div> </div>
<div style="width: 100%;"> <div style="width: 100%;">
<a-select v-model="form.dllx2" class="box-input" allowClear :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" <a-select-option v-for="(item, key) in projectNameList2"
:key="item.value" :key="item.value"
:value="item.value"> :value="item.value">
{{ item.text }} {{ item.text }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<!-- <j-dict-select-tag class="box-input"--> <!-- <j-dict-select-tag class="box-input"-->
<!-- :disabled="disabled"--> <!-- :disabled="disabled"-->
<!-- :dictCode="dictCodedllx"--> <!-- :dictCode="dictCodedllx"-->
<!-- :placeholder="$t('PleaseSelect')"--> <!-- :placeholder="$t('PleaseSelect')"-->
<!-- :type="'select'"--> <!-- :type="'select'"-->
<!-- :triggerChange="false"--> <!-- :triggerChange="false"-->
<!-- v-model="form.dllx2"/>--> <!-- v-model="form.dllx2"/>-->
</div>
</div> </div>
</div> </a-form-model-item>
</a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@@ -202,12 +202,12 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-multi-select-tag class="box-input" <j-multi-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
:dictCode="'communication_terminal'" :dictCode="'communication_terminal'"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
v-model="form.txzd"/> v-model="form.txzd"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -218,11 +218,11 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-textarea <a-textarea
:max-length="500" :max-length="500"
:placeholder="$t('pleaseStateTheDistribution')" :placeholder="$t('pleaseStateTheDistribution')"
:rows="4" :rows="4"
v-model="form.cdotasj" v-model="form.cdotasj"
/> />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -237,318 +237,323 @@
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index' import ImportFile from '@/components/ImportFileData/index'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
export default { export default {
name: 'basicInformation', name: 'basicInformation',
components:{ components:{
ImportFile ImportFile
}, },
// props:['otaId'], // props:['otaId'],
data() { data() {
return { return {
confirmLoading: false, confirmLoading: false,
disabled: false, disabled: false,
formInline:{}, formInline:{},
projectNameList:[], projectNameList:[],
formRules:[], formRules:[],
flag:'', flag:'',
dictCodedllx:'', dictCodedllx:'',
url: { url: {
exportData: '/ota/otaBaCxJbxx/exportData', exportData: '/ota/otaBaCxJbxx/exportData',
importZipUrl: '/ota/otaBaCxJbxx/importData?otaId=' + localStorage.getItem('otaId'),//导入 importZipUrl: '/ota/otaBaCxJbxx/importData?otaId=' + localStorage.getItem('otaId'),//导入
}, },
form:{ form:{
cxmb:undefined, cxmb:undefined,
txzd:'', txzd:'',
djbh:'', djbh:'',
qymc:'安徽江淮汽车集团股份有限公司', qymc:'安徽江淮汽车集团股份有限公司',
cplb:undefined, cplb:undefined,
cpsb:'', cpsb:'',
ggpc:'', ggpc:'',
cpmc:'', cpmc:'',
cpxh:'', cpxh:'',
dllx1:undefined, dllx1:undefined,
dllx2:undefined, dllx2:undefined,
cdotasj:'', cdotasj:'',
}, },
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'], projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[], projectNameList2:[],
selectList:[], selectList:[],
otaId:'', otaId:'',
rules:{ rules:{
djbh:[ djbh:[
{ {
required: true, required: true,
message:this.$t('registrationnumber')+this.$t('cannotEmpty'), message:this.$t('registrationnumber')+this.$t('cannotEmpty'),
trigger:'blur' trigger:'blur'
} }
] ]
}
} }
}, }
mounted() { },
this.$forceUpdate() mounted() {
this.getSelect() this.$forceUpdate()
this.getData() this.getSelect()
}, this.getData()
methods: { },
changeId(value,option){ methods: {
localStorage.removeItem('otaId') changeId(value,option){
localStorage.removeItem('otaIdT') localStorage.removeItem('otaId')
localStorage.setItem('otaIdT',value) localStorage.removeItem('otaIdT')
localStorage.setItem('otaIdT',value)
this.getData('qiehuan') this.getData('qiehuan')
}, },
// 模板下载 // 模板下载
handleModule() { handleModule() {
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型基本信息' + '.zip', {}) downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型基本信息' + '.zip', {})
}, },
getSelect(){ getSelect(){
getAction('/ota/otaBaCxList/list').then(res=>{ getAction('/ota/otaBaCxList/list').then(res=>{
if(res.code==200){ if(res.code==200){
this.selectList=[] this.selectList=[]
res.result.forEach(item=>{ res.result.forEach(item=>{
let obj={} let obj={}
obj.id=item.id obj.id=item.id
if(item.cpmc==null){ if(item.cpmc==null){
item.cpmc='' item.cpmc=''
} }
if(item.cpxh==null){ if(item.cpxh==null){
item.cpxh='' item.cpxh=''
} }
obj.value=item.cpdjbh+'-'+item.ggpc+'-'+item.cpxh obj.value=item.cpdjbh+'-'+item.ggpc+'-'+item.cpxh
this.selectList.push(obj) this.selectList.push(obj)
}) })
}
})
},
getData(item){
let otaIdT=localStorage.getItem('otaIdT')
if(otaIdT==null){
otaIdT=''
} }
let otaId=localStorage.getItem('otaId') })
if(otaId==null){ },
otaId='' getData(item){
} let otaIdT=localStorage.getItem('otaIdT')
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ if(otaIdT==null){
if(res.code == 200){ otaIdT=''
this.form.qymc=res.result.qymc }
this.form.djbh=res.result.djbh let otaId=localStorage.getItem('otaId')
this.form.cplb=res.result.cplb if(otaId==null){
this.form.ggpc=res.result.ggpc otaId=''
this.form.cpsb=res.result.cpsb }
this.form.cpmc=res.result.cpmc getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
this.form.cpxh=res.result.cpxh if(res.code == 200){
this.form.txzd=res.result.txzd this.form.qymc=res.result.qymc
this.form.txzd=res.result.txzd this.form.djbh=res.result.djbh
this.form.cdotasj=res.result.cdotasj this.form.cplb=res.result.cplb
this.form.id=res.result.id this.form.ggpc=res.result.ggpc
if(this.$route.query.type == 1 && res.result.cxmb == null && !item){ this.form.cpsb=res.result.cpsb
this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh this.form.cpmc=res.result.cpmc
}else { 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 && !item){
this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
}else {
if(this.$route.query.type == 2 && res.result.cxmb == null && !item){ if(this.$route.query.type == 2 && res.result.cxmb == null && !item){
// this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh // this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined
}else{ }else{
this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
} }
}
if(res.result.dllx1 == '' || res.result.dllx1 == null){
res.result.dllx1 = undefined
}
if(res.result.dllx2 == '' || res.result.dllx2 == null){
res.result.dllx2 = undefined
}
if(res.result.cplb == ''){
res.result.cplb = undefined
}
if(res.result.qymc == null){
res.result.qymc = '安徽江淮汽车集团股份有限公司'
}
this.form.dllx1=res.result.dllx1
this.form.dllx2=res.result.dllx2
this.form.cplb=res.result.cplb
this.getDllx2()
// this.changeSelect()
this.$forceUpdate()
}
})
},
next(){
this.$refs.ruleForm.validate(valid=>{
if(valid){
this.save()
setTimeout(()=>{
if(this.flag == 1){
return
}
this.$emit('basicInformationForm')
},1000)
} }
}) if(res.result.dllx1 == '' || res.result.dllx1 == null){
res.result.dllx1 = undefined
}
if(res.result.dllx2 == '' || res.result.dllx2 == null){
res.result.dllx2 = undefined
}
}, if(res.result.cplb == ''){
save(){ res.result.cplb = undefined
this.$refs.ruleForm.validate(valid=>{ }
if(valid){ if(res.result.qymc == null){
let otaId = localStorage.getItem('otaId') res.result.qymc = '安徽江淮汽车集团股份有限公司'
if(otaId==null || otaId == undefined){ }
otaId='' this.form.dllx1=res.result.dllx1
this.form.dllx2=res.result.dllx2
this.form.cplb=res.result.cplb
this.getDllx2()
// this.changeSelect()
this.$forceUpdate()
}
})
},
next(){
this.$refs.ruleForm.validate(valid=>{
if(valid){
this.save()
setTimeout(()=>{
if(this.flag == 1){
return
} }
postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => { this.$emit('basicInformationForm')
if(res.success){ },1000)
this.flag = 2
localStorage.setItem('otaId', res.result.otaId) }
this.$message.success(res.message) })
this.getData()
}else{ },
this.$message.warning(res.message) save(){
this.flag = 1 this.$refs.ruleForm.validate(valid=>{
} if(valid){
}) let otaId = localStorage.getItem('otaId')
if(otaId==null || otaId == undefined){
otaId=''
} }
}) postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => {
}, if(res.success){
changeSelect(target){ this.flag = 2
this.form.dllx2=undefined localStorage.setItem('otaId', res.result.otaId)
let list = [] this.$message.success(res.message)
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => { this.getData()
if (res.success) { }else{
res.result.forEach((item,index) => { this.$message.warning(res.message)
let w = item.value this.flag = 1
let a = w.indexOf("-") localStorage.setItem('otaflag',this.flag)
let l = w.substring(0,a) }
if(target == l){ })
list.push(item) }else{
} // let otaflag = 3
}) this.$message.warning(this.$t('requireddataisnull'))
this.projectNameList2 = list // localStorage.setItem('otaflag',otaflag)
} }
}) })
}, },
getDllx2(){ changeSelect(target){
let list = [] this.form.dllx2=undefined
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => { let list = []
if (res.success) { getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
res.result.forEach((item,index) => { if (res.success) {
let w = item.value res.result.forEach((item,index) => {
let a = w.indexOf("-") let w = item.value
let l = w.substring(0,a) let a = w.indexOf("-")
if(this.form.dllx1==undefined){ let l = w.substring(0,a)
this.projectNameList=[] if(target == l){
} list.push(item)
if(this.form.dllx1 == l){ }
list.push(item) })
} this.projectNameList2 = list
}) }
this.projectNameList2 = list })
} },
}) getDllx2(){
}, let list = []
update(){ getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
this.$forceUpdate() if (res.success) {
} res.result.forEach((item,index) => {
let w = item.value
let a = w.indexOf("-")
let l = w.substring(0,a)
if(this.form.dllx1==undefined){
this.projectNameList=[]
}
if(this.form.dllx1 == l){
list.push(item)
}
})
this.projectNameList2 = list
}
})
},
update(){
this.$forceUpdate()
} }
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import'~@assets/less/common.less'; @import'~@assets/less/common.less';
.box { .box {
padding: 0 24px 24px 24px; padding: 0 24px 24px 24px;
box-sizing: border-box; box-sizing: border-box;
} }
.box-title-text-add { .box-title-text-add {
line-height: 1.4; line-height: 1.4;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.title-text-add { .title-text-add {
width: 114px; width: 114px;
text-align: right; text-align: right;
display: inline-block; display: inline-block;
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
margin-right: 16px; margin-right: 16px;
// overflow: hidden; // overflow: hidden;
// text-overflow: ellipsis; // text-overflow: ellipsis;
// white-space: nowrap; // white-space: nowrap;
height: 42px; height: 42px;
//line-height: 42px; //line-height: 42px;
margin-top: 3px; margin-top: 3px;
} }
.title-text-add-input { .title-text-add-input {
width: 80%; width: 80%;
display: inline-block; display: inline-block;
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
margin-right: 16px; margin-right: 16px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
height: 42px; height: 42px;
//line-height: 42px; //line-height: 42px;
margin-top: 3px; margin-top: 3px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.title-text-text { .title-text-text {
margin-top: 9px; margin-top: 9px;
} }
.itemModel { .itemModel {
width: calc(100% - 130px); width: calc(100% - 130px);
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
} }
// .itemModel-input{ // .itemModel-input{
// width: calc(100% + 10px); // width: calc(100% + 10px);
// display: inline-block; // display: inline-block;
// margin-top: 2px; // margin-top: 2px;
// } // }
.box-input { .box-input {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
height: 38px; height: 38px;
margin-top: 2px; margin-top: 2px;
} }
.formAdd { .formAdd {
margin: 0 auto; margin: 0 auto;
width: 670px; width: 670px;
} }
.bootom-button{ .bootom-button{
text-align: center!important; text-align: center!important;
} }
// /deep/ .ant-input{ // /deep/ .ant-input{
// width: calc(100%+20px); // width: calc(100%+20px);
// } // }
.Required { .Required {
color: red; color: red;
margin-right: 3px; margin-right: 3px;
} }
.plus{ .plus{
margin-top: 5px; margin-top: 5px;
line-height: 1.2; line-height: 1.2;
} }
.plus2{ .plus2{
width: 134px; width: 134px;
margin-top: 5px; margin-top: 5px;
line-height: 1.2; line-height: 1.2;
} }
.plus3{ .plus3{
word-break: break-word; word-break: break-word;
} }
</style> </style>
@@ -7,11 +7,11 @@
<a-icon type="form"/> <a-icon type="form"/>
{{$t('fillintherecord')}} {{$t('fillintherecord')}}
</div> </div>
<!-- <div @click="historicalrecordClick"--> <!-- <div @click="historicalrecordClick"-->
<!-- class="operator-text">--> <!-- class="operator-text">-->
<!-- <a-icon type="copy"/>--> <!-- <a-icon type="copy"/>-->
<!-- {{$t('historicalrecord')}}--> <!-- {{$t('historicalrecord')}}-->
<!-- </div>--> <!-- </div>-->
</div> </div>
<a-tabs class="tabs" v-model="tabActive" @change="callback" @tabClick="tabClick"> <a-tabs class="tabs" v-model="tabActive" @change="callback" @tabClick="tabClick">
<a-tab-pane :key="$t('basicinformationofvehicletype')" :tab="$t('basicinformationofvehicletype')"> <a-tab-pane :key="$t('basicinformationofvehicletype')" :tab="$t('basicinformationofvehicletype')">
@@ -216,7 +216,9 @@ export default {
tabClick(tab,event){ tabClick(tab,event){
this.tabActive=tab this.tabActive=tab
if(this.oldName == this.$t('basicinformationofvehicletype')){ if(this.oldName == this.$t('basicinformationofvehicletype')){
this.$refs.dealtWithRef.save() this.$refs.dealtWithRef.save()
} else if(this.oldName == this.$t('onlineupgraderequirements')){ } else if(this.oldName == this.$t('onlineupgraderequirements')){
this.$refs.doneListRef.save() this.$refs.doneListRef.save()
} else if(this.oldName == this.$t('safetymeasure')){ } else if(this.oldName == this.$t('safetymeasure')){
@@ -230,7 +232,17 @@ export default {
} else if(this.oldName == this.$t('other')){ } else if(this.oldName == this.$t('other')){
this.$refs.otherRef.save() this.$refs.otherRef.save()
} }
this.oldName = tab setTimeout(()=>{
let otaflag = localStorage.getItem('otaflag')
if(otaflag){
console.log(otaflag)
this.tabActive = this.$t('basicinformationofvehicletype')
this.oldName = this.$t('basicinformationofvehicletype')
}
this.oldName = tab
},1000)
localStorage.removeItem('otaflag')
}, },
handleToggleSearch() { handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus this.toggleSearchStatus = !this.toggleSearchStatus
@@ -286,44 +298,44 @@ export default {
}, },
basicInformationForm(){ basicInformationForm(){
this.tabActive = this.$t('onlineupgraderequirements') this.tabActive = this.$t('onlineupgraderequirements')
}, },
upgradeRequirementsup(){ upgradeRequirementsup(){
this.tabActive = this.$t('basicinformationofvehicletype') this.tabActive = this.$t('basicinformationofvehicletype')
}, },
upgradeRequirementsdown(){ upgradeRequirementsdown(){
this.tabActive = this.$t('safetymeasure') this.tabActive = this.$t('safetymeasure')
}, },
safetyPrecautionsup(){ safetyPrecautionsup(){
this.tabActive = this.$t('onlineupgraderequirements') this.tabActive = this.$t('onlineupgraderequirements')
}, },
safetyPrecautionsdown(){ safetyPrecautionsdown(){
this.tabActive = this.$t('upgradedonline') this.tabActive = this.$t('upgradedonline')
}, },
upgradedonlineup(){ upgradedonlineup(){
this.tabActive = this.$t('safetymeasure') this.tabActive = this.$t('safetymeasure')
}, },
upgradedonlinedown(){ upgradedonlinedown(){
this.tabActive = this.$t('beupgradedonline') this.tabActive = this.$t('beupgradedonline')
}, },
beupgradedonlineup(){ beupgradedonlineup(){
this.tabActive = this.$t('upgradedonline') this.tabActive = this.$t('upgradedonline')
}, },
beupgradedonlinedown(){ beupgradedonlinedown(){
this.tabActive = this.$t('recordparameters') this.tabActive = this.$t('recordparameters')
}, },
recordparametersup(){ recordparametersup(){
this.tabActive = this.$t('beupgradedonline') this.tabActive = this.$t('beupgradedonline')
}, },
recordparametersdown(){ recordparametersdown(){
this.tabActive = this.$t('other') this.tabActive = this.$t('other')
}, },
otherup(){ otherup(){
this.tabActive = this.$t('recordparameters') this.tabActive = this.$t('recordparameters')