ota 功能添加 接口对接

This commit is contained in:
yuekuo
2023-03-24 18:35:29 +08:00
parent 35d772a630
commit 8f1c176659
9 changed files with 21922 additions and 667 deletions
+21227 -182
View File
File diff suppressed because it is too large Load Diff
@@ -11,7 +11,8 @@
</div> </div>
</div> </div>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form-model class="formAdd" ref="ruleForm"> <a-form-model class="formAdd" ref="ruleForm" :model="form" >
<!-- :rules="formRules" -->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text-add"> <div class="box-title-text-add">
@@ -22,8 +23,11 @@
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'list'"
:triggerChange="false"/> allowClear
:triggerChange="false"
v-model="form.cxmb"
/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -32,9 +36,14 @@
<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>
<div class="title-text-add-input"> <a-form-model-item class="itemModel">
<span class="title-text-text">中文</span> <a-input
</div> :disabled="disabled"
class="box-input"
:placeholder="$t('pleaseEnter')"
v-model="form.qymc">
</a-input>
</a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@@ -42,9 +51,14 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span> <span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
</div> </div>
<div class="title-text-add-input"> <a-form-model-item class="itemModel">
<span class="title-text-text">中文</span> <a-input
</div> :disabled="disabled"
class="box-input"
:placeholder="$t('pleaseEnter')"
v-model="form.djbh">
</a-input>
</a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@@ -57,7 +71,10 @@
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"
dictCode=" product_category"
allowClear
v-model="form.cplb"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -67,11 +84,12 @@
<span class="title-text-text" :title="$t('noticebatch')">{{$t('noticebatch')}}</span> <span class="title-text-text" :title="$t('noticebatch')">{{$t('noticebatch')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" <a-input
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" class="box-input"
:type="'select'" :placeholder="$t('PleaseSelect')"
:triggerChange="false"/> v-model="form.ggpc">
</a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -81,11 +99,12 @@
<span class="title-text-text" :title="$t('producttrademark')">{{$t('producttrademark')}}</span> <span class="title-text-text" :title="$t('producttrademark')">{{$t('producttrademark')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <a-input
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" class="box-input"
:type="'select'" :placeholder="$t('PleaseSelect')"
:triggerChange="false"/> v-model="form.cpsb">
</a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -95,12 +114,14 @@
<span class="title-text-text" :title="$t('productname')">{{$t('productname')}}</span> <span class="title-text-text" :title="$t('productname')">{{$t('productname')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <a-input
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" class="box-input"
:type="'select'" :placeholder="$t('PleaseSelect')"
:triggerChange="false"/> v-model="form.cpmc">
</a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@@ -109,11 +130,12 @@
<span class="title-text-text" :title="$t('productModel')">{{$t('productModel')}}</span> <span class="title-text-text" :title="$t('productModel')">{{$t('productModel')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <a-input
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" class="box-input"
:type="'select'" :placeholder="$t('PleaseSelect')"
:triggerChange="false"/> v-model="form.cpxh">
</a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -122,23 +144,31 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span> <span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
</div> </div>
<a-form-model-item class="itemModel" style='width: 38%'> <a-form-model-item class="itemModel" style="width: 38%">
<j-dict-select-tag class="box-input" <!-- <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
@change="projectNameChange" @change="projectNameChange"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"
</a-form-model-item> v-model="form.Vehicledynamictype"/> -->
<a-form-model-item class="itemModel" style='width: 40%;margin-left: 20px'> <a-select class="box-input" v-model="form.dllx1" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">
<a-select class="box-input" :placeholder="$t('PleaseSelect')" <a-select-option v-for="(item, key) in projectNameList1"
v-model="formInline.projectNameId">
<a-select-option v-for="(item, key) in projectNameList"
:key="key" :key="key"
:value="item.id"> :value="item">
<span style="display: inline-block;width: 100%" :title=" item.projectName "> {{ item }}
</a-select-option>
</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-option v-for="(item, key) in projectNameList2"
:key="key"
:value="item">
{{ item }}
<!-- <span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}} {{ item.projectName}}
</span> </span> -->
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
@@ -152,9 +182,11 @@
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
dictCode="communication_terminal"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"
v-model="form.txzd"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -166,7 +198,9 @@
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-textarea <a-textarea
:placeholder="$t('pleaseStateTheDistribution')" :placeholder="$t('pleaseStateTheDistribution')"
:rows="4"/> :rows="4"
v-model="form.cdotasj"
/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -174,8 +208,8 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="bootom-button"> <div class="bootom-button">
<a-button style="margin-right:50px">{{$t('preservation')}}</a-button> <a-button style="margin-right:50px" @click="save">{{$t('preservation')}}</a-button>
<a-button type="primary" @click='next'>{{$t('next')}}</a-button> <a-button type="primary" @click="next">{{$t('next')}}</a-button>
</div> </div>
</div> </div>
</template> </template>
@@ -193,15 +227,40 @@
disabled: false, disabled: false,
formInline:{}, formInline:{},
projectNameList:[], projectNameList:[],
formRules:[],
form:{},
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[]
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
next(){ next(){
this.save()
this.$emit('basicInformationForm') this.$emit('basicInformationForm')
}, },
save(){
postAction('/ota/otaBaCxJbxx/add',this.form).then( res => {
console.log(res);
})
},
changeSelect(target){
this.form.Vehicledynamictype2=undefined
if(target =='传统动力汽车'){
this. projectNameList2=['汽油','柴油']
}else if (target =='节能汽车'){
this. projectNameList2=['混合动力','天然气','甲醇','其他']
}else if (target =='新能源汽车'){
this. projectNameList2=['纯电动','插电式混合动力','燃料电池']
}else{
this. projectNameList2=['其他']
}
},
update(){
this.$forceUpdate()
}
} }
} }
</script> </script>
@@ -258,7 +317,11 @@
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
} }
// .itemModel-input{
// width: calc(100% + 10px);
// display: inline-block;
// margin-top: 2px;
// }
.box-input { .box-input {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@@ -274,4 +337,7 @@
.bootom-button{ .bootom-button{
text-align: center!important; text-align: center!important;
} }
// /deep/ .ant-input{
// width: calc(100%+20px);
// }
</style> </style>
@@ -22,16 +22,19 @@
:columns="columns" :columns="columns"
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="functionname" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.gnmc"></a-input>
</span>
<!-- 配置情况--> <!-- 配置情况-->
<span slot="configuration" slot-scope="text,record"> <span slot="configuration" slot-scope="text,record" >
<a-radio-group> <a-radio-group v-model="record.pzqk">
<a-radio :value="1"> {{ $t('yes') }} </a-radio> <a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio> <a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group> </a-radio-group>
</span> </span>
<!-- 可升级--> <!-- 可升级-->
<span slot="whetheritcanbeupgraded" slot-scope="text,record"> <span slot="whetheritcanbeupgraded" slot-scope="text,record">
<a-radio-group> <a-radio-group v-model="record.sfksj">
<a-radio :value="1"> {{ $t('yes') }} </a-radio> <a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio> <a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group> </a-radio-group>
@@ -42,20 +45,53 @@
:disabled="disable" :disabled="disable"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"
v-model="record.jszdhjb"/>
</span> </span>
<!-- 技术参数--> <!-- 技术参数-->
<span slot="technicalparameters" slot-scope="text,record"> <span slot="technicalparameters" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')"></a-input> <a-input :placeholder="$t('ifNot')" v-model="record.sjggcs"></a-input>
</span>
<span slot="functiondescription" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.gnms"></a-input>
</span>
<span slot="applicationconditions" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.sytj"></a-input>
</span>
<span slot="functiondeelectronicscription" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqmc"></a-input>
</span>
<span slot="electroniccontrollerproductionenterprises" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqscqy"></a-input>
</span>
<span slot="electroniccontrollertypeone" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqxh"></a-input>
</span>
<span slot="hardwareversioninformation" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.yjbbxx"></a-input>
</span>
<span slot="softwaredevelopmententerprise" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.yjbbxx"></a-input>
</span>
<span slot="operatingsystemversion" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.rjkfqy"></a-input>
</span>
<span slot="inflammatorydata" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.czxtbbh"></a-input>
</span> </span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation">{{$t('addcontroller')}}</a> <a class="text-operation" @click="addlineAtMid(record)">{{$t('addcontroller')}}</a>
<a class="text-operation">{{$t('delete')}}</a> <a v-if="dataSource.indexOf(record)+1 == dataSource.length" class="text-operation" @click="addlineAtBot">{{$t('addfunction')}}</a>
<a v-if="dataSource.length >1" class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div> <div>
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
<p>注:附件包括测试项目清单、测试报告.测试标准或技术规范</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;支持doc/docx/pdf格式,大小50M以内</p>
</div> </div>
<div class="bootom-button"> <div class="bootom-button">
<a-button style="margin-right:50px">{{$t('preservation')}}</a-button> <a-button style="margin-right:50px">{{$t('preservation')}}</a-button>
@@ -79,8 +115,6 @@
return { return {
dataSource: [ dataSource: [
{ {
key:1,
functionname:'ceshi',
} }
], ],
loading: false, loading: false,
@@ -91,7 +125,8 @@
align: 'left', align: 'left',
dataIndex: 'functionname', dataIndex: 'functionname',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'functionname' },
}, },
{ {
title: this.$t('configuration'), title: this.$t('configuration'),
@@ -130,14 +165,16 @@
align: 'left', align: 'left',
dataIndex: 'functiondescription', dataIndex: 'functiondescription',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'functiondescription' },
}, },
{ {
title: this.$t('applicationconditions'), title: this.$t('applicationconditions'),
align: 'left', align: 'left',
dataIndex: 'applicationconditions', dataIndex: 'applicationconditions',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'applicationconditions' },
}, },
{ {
title: this.$t('controllerparameter'), title: this.$t('controllerparameter'),
@@ -151,63 +188,56 @@
align: 'left', align: 'left',
dataIndex: 'electronic', dataIndex: 'electronic',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'functiondeelectronicscription' },
}, },
{ {
title: this.$t('electroniccontrollerproductionenterprises'), title: this.$t('electroniccontrollerproductionenterprises'),
align: 'left', align: 'left',
dataIndex: 'electroniccontrollerproductionenterprises', dataIndex: 'electroniccontrollerproductionenterprises',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electroniccontrollerproductionenterprises' },
}, },
{ {
title: this.$t('electroniccontrollertype'), title: this.$t('electroniccontrollertype'),
align: 'left', align: 'left',
dataIndex: 'electroniccontrollertypeone', dataIndex: 'electroniccontrollertypeone',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electroniccontrollertypeone' },
}, },
{ {
title: this.$t('hardwareversioninformation'), title: this.$t('hardwareversioninformation'),
align: 'left', align: 'left',
dataIndex: 'hardwareversioninformation', dataIndex: 'hardwareversioninformation',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
}, scopedSlots: { customRender: 'hardwareversioninformation' },
{
title: this.$t('electroniccontrollertype'),
align: 'left',
dataIndex: 'electroniccontrollertype',
ellipsis: true,
width: 170
},
{
title: this.$t('hardwareversioninformation'),
align: 'left',
dataIndex: 'hardwareversioninformationone',
ellipsis: true,
width: 170
}, },
{ {
title: this.$t('softwaredevelopmententerprise'), title: this.$t('softwaredevelopmententerprise'),
align: 'left', align: 'left',
dataIndex: 'softwaredevelopmententerprise', dataIndex: 'softwaredevelopmententerprise',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'softwaredevelopmententerprise' },
}, },
{ {
title: this.$t('operatingsystemversion'), title: this.$t('operatingsystemversion'),
align: 'left', align: 'left',
dataIndex: 'operatingsystemversion', dataIndex: 'operatingsystemversion',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'operatingsystemversion' },
}, },
{ {
title: this.$t('inflammatorydata'), title: this.$t('inflammatorydata'),
align: 'left', align: 'left',
dataIndex: 'inflammatorydata', dataIndex: 'inflammatorydata',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'inflammatorydata' },
}, },
] ]
}, },
@@ -273,6 +303,19 @@
this.fileList.uploadName = attIdList this.fileList.uploadName = attIdList
this.fileList.certifyingmaterials = this.$t('viewFile') this.fileList.certifyingmaterials = this.$t('viewFile')
}, },
//中间加
addlineAtMid(record){
let obj = {}
this.dataSource.splice(this.dataSource.indexOf(record)+1,0,obj)
},
//最后一行加
addlineAtBot(){
let obj={}
this.dataSource.push(obj)
},
deleteData(record){
this.dataSource.splice(this.dataSource.indexOf(record),1)
},
} }
} }
</script> </script>
@@ -234,6 +234,9 @@
:columns="columns" :columns="columns"
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="componentname" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<!-- 可升级--> <!-- 可升级-->
<span slot="systemclass" slot-scope="text,record"> <span slot="systemclass" slot-scope="text,record">
<a-radio-group> <a-radio-group>
@@ -249,10 +252,28 @@
<span slot="architecturetopologydiagram" slot-scope="text,record"> <span slot="architecturetopologydiagram" slot-scope="text,record">
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
</span> </span>
<span slot="controllername" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<span slot="hardwarespecificationmodel" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<span slot="hardwaremanufacturer" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<span slot="softwareversion" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<span slot="softwaredevelopmententerprise" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<span slot="layoutposition" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation">{{$t('addcontroller')}}</a> <a class="text-operation" @click="addlineAtBot" style='width: 73px;margin-right: 50px'>{{$t('addcontroller')}}</a>
<a class="text-operation">{{$t('delete')}}</a> <a class="text-operation" v-if="dataSourceList.length >1" @click="deleteData(record)" >{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div class="bootom-button"> <div class="bootom-button">
@@ -698,9 +719,7 @@ export default {
queryParam: {}, queryParam: {},
dataSourceList: [ dataSourceList: [
{ {
key:1,
systemclass: 'ceshi',
vaule: 2,
} }
], ],
columns: [ columns: [
@@ -709,7 +728,8 @@ export default {
align: 'left', align: 'left',
dataIndex: 'componentname', dataIndex: 'componentname',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'componentname' },
}, },
{ {
title: this.$t('configuration'), title: this.$t('configuration'),
@@ -731,42 +751,48 @@ export default {
align: 'left', align: 'left',
dataIndex: 'controllername', dataIndex: 'controllername',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'controllername' },
}, },
{ {
title: this.$t('hardwarespecificationmodel'), title: this.$t('hardwarespecificationmodel'),
align: 'left', align: 'left',
dataIndex: 'hardwarespecificationmodel', dataIndex: 'hardwarespecificationmodel',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'hardwarespecificationmodel' },
}, },
{ {
title: this.$t('hardwaremanufacturer'), title: this.$t('hardwaremanufacturer'),
align: 'left', align: 'left',
dataIndex: 'hardwaremanufacturer', dataIndex: 'hardwaremanufacturer',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'hardwaremanufacturer' },
}, },
{ {
title: this.$t('softwareversion'), title: this.$t('softwareversion'),
align: 'left', align: 'left',
dataIndex: 'softwareversion', dataIndex: 'softwareversion',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'softwareversion' },
}, },
{ {
title: this.$t('softwaredevelopmententerprise'), title: this.$t('softwaredevelopmententerprise'),
align: 'left', align: 'left',
dataIndex: 'softwaredevelopmententerprise', dataIndex: 'softwaredevelopmententerprise',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'softwaredevelopmententerprise' },
}, },
{ {
title: this.$t('layoutposition'), title: this.$t('layoutposition'),
align: 'left', align: 'left',
dataIndex: 'layoutposition', dataIndex: 'layoutposition',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'layoutposition' },
}, },
] ]
}, },
@@ -853,7 +879,14 @@ export default {
console.log(obj,'2') console.log(obj,'2')
} }
return obj; return obj;
} },
addlineAtBot(){
let obj={}
this.dataSourceList.push(obj)
},
deleteData(record){
this.dataSourceList.splice(this.dataSourceList.indexOf(record),1)
},
} }
} }
</script> </script>
@@ -24,8 +24,10 @@
> >
<span slot="havemeasures" slot-scope="text,record"> <span slot="havemeasures" slot-scope="text,record">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
v-model="record.info"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:dictCode="record.dictCode"
:triggerChange="false"/> :triggerChange="false"/>
</span> </span>
<span slot="certifyingmaterials" slot-scope="text,record"> <span slot="certifyingmaterials" slot-scope="text,record">
@@ -33,7 +35,7 @@
</span> </span>
</a-table> </a-table>
<div class="bootom-button"> <div class="bootom-button">
<a-button class='btn'>{{$t('preservation')}}</a-button> <a-button class='btn' @click="save">{{$t('preservation')}}</a-button>
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
@@ -59,6 +61,7 @@
safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'), safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials: this.$t('uploadattachment'), certifyingmaterials: this.$t('uploadattachment'),
dictCode:'protection_mechanism'
}, },
{ {
key: '2', key: '2',
@@ -66,6 +69,7 @@
safetymeasure: this.$t('failsafmechanism'), safetymeasure: this.$t('failsafmechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials:'', certifyingmaterials:'',
dictCode:'fail_safe_mechanism'
}, },
{ {
key: '3', key: '3',
@@ -73,6 +77,7 @@
safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'), safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials:'', certifyingmaterials:'',
dictCode:'upgrade_failure'
}, },
{ {
key: '4', key: '4',
@@ -80,6 +85,7 @@
safetymeasure: this.$t('informationsecuritymechanism'), safetymeasure: this.$t('informationsecuritymechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials:'', certifyingmaterials:'',
dictCode:'Information_security_mechanism'
}, },
], ],
loading: false, loading: false,
@@ -207,6 +213,16 @@
} }
}) })
}, },
save(){
let obj={}
obj.bhjz = this.dataSource[0].info
obj.fsxjz= this.dataSource[1].info
obj.sjsbcs = this.dataSource[2].info
obj.xxaqjz = this.dataSource[3].info
postAction('/ota/otaBaCxAqcs/add',obj).then(res =>{
console.log(res);
})
},
last(){ last(){
this.$emit('safetyPrecautionsup') this.$emit('safetyPrecautionsup')
}, },
@@ -2,312 +2,322 @@
<div class="box"> <div class="box">
<div class="table-operator"> <div class="table-operator">
<div class="operator-text"> <div class="operator-text">
<a-icon type="import" :rotate="270"/> <a-icon type="import" :rotate="270" />
{{$t('dataimport')}} {{ $t('dataimport') }}
</div> </div>
<div class="operator-text"> <div class="operator-text">
<a-icon type="download"/> <a-icon type="download" />
{{$t('templateDownload')}} {{ $t('templateDownload') }}
</div> </div>
</div> </div>
<a-table <a-table ref="table" size="middle" :pagination="false" :scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="key"
ref="table" bordered :data-source="dataSource" :columns="columns" style="margin-bottom: 20px">
size="middle"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="key"
bordered
:data-source="dataSource"
:columns="columns"
style="margin-bottom: 20px"
>
<span slot="relevantverification" slot-scope="text,record"> <span slot="relevantverification" slot-scope="text,record">
<a-radio-group v-model="record.relevantverification"> <a-radio-group v-model="record.relevantverification">
<a-radio :value="1"> {{ $t('yes') }} </a-radio> <a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio> <a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group> </a-radio-group>
</span> </span>
<span slot="certifyingmaterials" slot-scope="text,record"> <span slot="certifyingmaterials" slot-scope="text,record">
<a-button type="primary" v-model="record.relevantverification">{{$t('uploadattachment')}}</a-button> <a-button type="primary" v-model="record.relevantverification">{{ $t('uploadattachment') }}</a-button>
</span> </span>
</a-table> </a-table>
<div class="bootom-button"> <div class="bootom-button">
<a-button class='btn'>{{$t('preservation')}}</a-button> <a-button class='btn' @click="save">{{ $t('preservation') }}</a-button>
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click="last">{{ $t('last') }}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{ $t('next') }}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
export default { export default {
name: 'upgradeRequirements', name: 'upgradeRequirements',
components:{ components: {
uploadFile uploadFile
}, },
data() { data() {
return { return {
dataSource: [ dataSource: [
{ {
key: '1', key: '1',
onlineupgraderequirements: this.$t('networksecurityrequirements'), onlineupgraderequirements: this.$t('networksecurityrequirements'),
specificrequirements: this.$t('ineffectiveupgrades'), specificrequirements: this.$t('ineffectiveupgrades'),
relevantverification: '', relevantverification: '',
certifyingmaterials:this.$t('uploadattachment'), certifyingmaterials: this.$t('uploadattachment'),
},
{
key: '2',
onlineupgraderequirements:'',
specificrequirements: this.$t('againstunauthorized'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '3',
onlineupgraderequirements:'',
specificrequirements: this.$t('communicationinterfacethathasateastusedastandard'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '4',
onlineupgraderequirements:'',
specificrequirements: this.$t('softwareupgrade'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '5',
onlineupgraderequirements:'',
specificrequirements: this.$t('Ensurethatsoftware'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '6',
onlineupgraderequirements:'',
specificrequirements: this.$t('ifanupgrademayaffectvehiclesafety'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '7',
onlineupgraderequirements:'',
specificrequirements: this.$t('iftheimplementationoftheupgradaffectsdrivingsafety'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '8',
onlineupgraderequirements:'',
specificrequirements: this.$t('ensurethatthevehicleisinasafecondition'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '9',
onlineupgraderequirements:'',
specificrequirements: this.$t('priortotheexecutionoftheupgrade'),
relevantverification: '',
certifyingmaterials:'',
},
{
key: '10',
onlineupgraderequirements:'',
specificrequirements: this.$t('afterperformingtheupgrade'),
relevantverification: '',
certifyingmaterials:'',
},
],
url: {
}, },
queryParam: {}, {
columns: [ key: '2',
{ onlineupgraderequirements: '',
title: this.$t('onlineupgraderequirements'), specificrequirements: this.$t('againstunauthorized'),
align: 'left', relevantverification: '',
dataIndex: 'onlineupgraderequirements', certifyingmaterials: '',
width: 170, },
customRender: (value, row, index) => { {
const obj = { key: '3',
children: '', onlineupgraderequirements: '',
attrs: {}, specificrequirements: this.$t('communicationinterfacethathasateastusedastandard'),
}; relevantverification: '',
if(index === 0){ // 第一行数据开始,跨行合并的长度为数据data的长度 certifyingmaterials: '',
obj.attrs.rowSpan = 2; },
obj.children = this.$t('networksecurityrequirements') {
}else if(index === 2){ // 第一行数据开始,跨行合并的长度为数据data的长度 key: '4',
obj.attrs.rowSpan = 6; onlineupgraderequirements: '',
obj.children = this.$t('upgradefunctionrequirements') specificrequirements: this.$t('softwareupgrade'),
}else if(index === 8){ relevantverification: '',
obj.attrs.rowSpan = 2; certifyingmaterials: '',
obj.children = this.$t('usernotificationrequirement') },
}else{ {
obj.attrs.rowSpan = 0 key: '5',
} onlineupgraderequirements: '',
return obj; specificrequirements: this.$t('Ensurethatsoftware'),
} relevantverification: '',
}, certifyingmaterials: '',
{ },
title: this.$t('specificrequirements'), {
align: 'left', key: '6',
dataIndex: 'specificrequirements', onlineupgraderequirements: '',
}, specificrequirements: this.$t('ifanupgrademayaffectvehiclesafety'),
{ relevantverification: '',
title: this.$t('relevantverification'), certifyingmaterials: '',
align: 'left', },
dataIndex: 'relevantverification', {
scopedSlots: { customRender: 'relevantverification' }, key: '7',
ellipsis: true, onlineupgraderequirements: '',
width: 170 specificrequirements: this.$t('iftheimplementationoftheupgradaffectsdrivingsafety'),
}, relevantverification: '',
{ certifyingmaterials: '',
title: this.$t('certifyingmaterials'), },
align: 'left', {
dataIndex: 'certifyingmaterials', key: '8',
scopedSlots: { customRender: 'certifyingmaterials' }, onlineupgraderequirements: '',
ellipsis: true, specificrequirements: this.$t('ensurethatthevehicleisinasafecondition'),
width: 170, relevantverification: '',
customRender: (value, row, index) => { certifyingmaterials: '',
const child = this.$createElement('button', { },
domProps: { {
innerHTML: value key: '9',
}, onlineupgraderequirements: '',
on: { specificrequirements: this.$t('priortotheexecutionoftheupgrade'),
click: () =>{this.click(row)} relevantverification: '',
} certifyingmaterials: '',
}); },
const obj = { {
children: child, key: '10',
attrs: {}, onlineupgraderequirements: '',
}; specificrequirements: this.$t('afterperformingtheupgrade'),
if(index === 0){ // 第一行数据开始,跨行合并的长度为数据data的长度 relevantverification: '',
obj.attrs.rowSpan = 10; certifyingmaterials: '',
}else{ },
obj.attrs.rowSpan = 0 ],
} url: {
return obj
}
},
],
selectedRowKeys: [],
fileList:{},
}
},
mounted() {
// this.getList()
},
methods: {
click(value){
this.fileList = value
console.log(this.fileList)
if(this.fileList.uploadName){
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
}
this.$refs.uploadFile.visible = true
}, },
uploadSuccess(data) { queryParam: {},
let attIdList = [] columns: [
if (data && data.length > 0) { {
data.map(item => { title: this.$t('onlineupgraderequirements'),
attIdList.push({ align: 'left',
id:item.id, dataIndex: 'onlineupgraderequirements',
fileName:item.fileName width: 170,
}) customRender: (value, row, index) => {
const obj = {
children: '',
attrs: {},
};
if (index === 0) { // 第一行数据开始,跨行合并的长度为数据data的长度
obj.attrs.rowSpan = 2;
obj.children = this.$t('networksecurityrequirements')
} else if (index === 2) { // 第一行数据开始,跨行合并的长度为数据data的长度
obj.attrs.rowSpan = 6;
obj.children = this.$t('upgradefunctionrequirements')
} else if (index === 8) {
obj.attrs.rowSpan = 2;
obj.children = this.$t('usernotificationrequirement')
} else {
obj.attrs.rowSpan = 0
}
return obj;
}
},
{
title: this.$t('specificrequirements'),
align: 'left',
dataIndex: 'specificrequirements',
},
{
title: this.$t('relevantverification'),
align: 'left',
dataIndex: 'relevantverification',
scopedSlots: { customRender: 'relevantverification' },
ellipsis: true,
width: 170
},
{
title: this.$t('certifyingmaterials'),
align: 'left',
dataIndex: 'certifyingmaterials',
scopedSlots: { customRender: 'certifyingmaterials' },
ellipsis: true,
width: 170,
customRender: (value, row, index) => {
const child = this.$createElement('button', {
domProps: {
innerHTML: value
},
on: {
click: () => { this.click(row) }
}
});
const obj = {
children: child,
attrs: {},
};
if (index === 0) { // 第一行数据开始,跨行合并的长度为数据data的长度
obj.attrs.rowSpan = 10;
} else {
obj.attrs.rowSpan = 0
}
return obj
}
},
],
selectedRowKeys: [],
fileList: {},
}
},
mounted() {
// this.getList()
},
methods: {
click(value) {
this.fileList = value
console.log(this.fileList)
if (this.fileList.uploadName) {
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
}
this.$refs.uploadFile.visible = true
},
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push({
id: item.id,
fileName: item.fileName
}) })
}
/** 赋值给当前对应的表单文件 */
this.fileList.uploadName = attIdList
this.fileList.certifyingmaterials = this.$t('viewFile')
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
}) })
let query = {
...queryParam
}
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.getList()
return
}
} else {
}
})
},
last(){
this.$emit('upgradeRequirementsup')
},
next(){
this.$emit('upgradeRequirementsdown')
} }
/** 赋值给当前对应的表单文件 */
this.fileList.uploadName = attIdList
this.fileList.certifyingmaterials = this.$t('viewFile')
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
...queryParam
}
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.getList()
return
}
} else {
}
})
},
save() {
let obj = {}
obj.bhsjb = this.dataSource[0].relevantverification
obj.bhclbb = this.dataSource[1].relevantverification
obj.clgxnl = this.dataSource[2].relevantverification
obj.clsjtj = this.dataSource[3].relevantverification
obj.clsjdl = this.dataSource[4].relevantverification
obj.sjbhaq = this.dataSource[5].relevantverification
obj.sjantj = this.dataSource[6].relevantverification
obj.sjsbaq = this.dataSource[7].relevantverification
obj.sjgg = this.dataSource[8].relevantverification
obj.sjzt = this.dataSource[9].relevantverification
postAction('/ota/otaBaCxZxsjyq/add', obj).then(res => {
console.log(res);
})
},
last() {
this.save()
this.$emit('upgradeRequirementsup')
},
next() {
this.save()
this.$emit('upgradeRequirementsdown')
} }
} }
}
</script> </script>
<style scoped> <style 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;
} }
button{ button {
width: 89px; width: 89px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
background: #00B3BE; background: #00B3BE;
height: 30px; height: 30px;
border: none; border: none;
color: white; color: white;
} }
.bootom-button{ .bootom-button {
text-align: center!important; text-align: center !important;
} }
.btn{
width: 63px !important; .btn {
margin-right:50px; width: 63px !important;
line-height: 1.499; margin-right: 50px;
position: relative; line-height: 1.499;
display: inline-block; position: relative;
font-weight: 400; display: inline-block;
white-space: nowrap; font-weight: 400;
text-align: center; white-space: nowrap;
background-image: none; text-align: center;
border: 1px solid transparent; background-image: none;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015); border: 1px solid transparent;
cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); cursor: pointer;
-webkit-user-select: none; transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
-ms-user-select: none; -webkit-user-select: none;
user-select: none; -ms-user-select: none;
-ms-touch-action: manipulation; user-select: none;
touch-action: manipulation; -ms-touch-action: manipulation;
height: 32px; touch-action: manipulation;
padding: 0 15px; height: 32px;
font-size: 14px; padding: 0 15px;
border-radius: 4px; font-size: 14px;
color: #040B29; border-radius: 4px;
background-color: #fff; color: #040B29;
border-color: #d9d9d9; background-color: #fff;
} border-color: #d9d9d9;
.btn:hover{ }
color: #00B3BE;
border-color: #00B3BE; .btn:hover {
} color: #00B3BE;
border-color: #00B3BE;
}
</style> </style>
@@ -21,32 +21,72 @@
:columns="columns" :columns="columns"
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="sys" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.xtlb"></a-input>
</span>
<!-- 可升级--> <!-- 可升级-->
<span slot="systemclass" slot-scope="text,record"> <span slot="systemclass" slot-scope="text,record">
<a-radio-group> <a-radio-group v-model="record.sfksj">
<a-radio :value="1"> {{ $t('yes') }} </a-radio> <a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio> <a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group> </a-radio-group>
</span> </span>
<!-- 技术参数--> <!-- 技术参数-->
<span slot="technicalparameters" slot-scope="text,record"> <span slot="technicalparameters" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')"></a-input> <a-input :placeholder="$t('ifNot')" v-model="record.sjbgcs"></a-input>
</span> </span>
<!-- 上传附件--> <!-- 上传附件-->
<span slot="architecturetopologydiagram" slot-scope="text,record"> <span slot="architecturetopologydiagram" slot-scope="text,record">
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
</span> </span>
<span slot="electronicController" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqmc"></a-input>
</span>
<span slot="electroniccontrollername" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.aqwzxdj"></a-input>
</span>
<span slot="electroniccontrollerproductionenterprises" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqscqy"></a-input>
</span>
<span slot="electroniccontrollertype" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqxh"></a-input>
</span>
<span slot="hardwareversioninformation" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.yjbbxx"></a-input>
</span>
<span slot="initialsoftwareversionnumber" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.csrjbbh"></a-input>
</span>
<span slot="initialpackageforintegrityinflammatorydata" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.csrjbwzsj"></a-input>
</span>
<span slot="environmentalprotection" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.sjsfyx"></a-input>
</span>
<span slot="operatingsystemtype" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.czxtlx"></a-input>
</span>
<span slot="operatingsystemmanufacturer" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.czxtscqy"></a-input>
</span>
<span slot="operatingsystemversion" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.czxtbbh"></a-input>
</span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record" >
<a class="text-operation">{{$t('addcontroller')}}</a> <a class="text-operation" @click="addlineAtMid(record)">{{$t('addcontroller')}}</a>
<a class="text-operation">{{$t('delete')}}</a> <a v-if="dataSource.indexOf(record)+1 == dataSource.length" class="text-operation" @click="addlineAtBot">{{$t('addsystem')}}</a>
<a v-if="dataSource.length >1" class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div> <div>
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
<p>注:附件包括测试项目清单、测试报告.测试标准或技术规范</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;支持doc/docx/pdf格式,大小50M以内</p>
</div> </div>
<div class="bootom-button"> <div class="bootom-button">
<a-button style="margin-right:50px">{{$t('preservation')}}</a-button> <a-button style="margin-right:50px" @click="save">{{$t('preservation')}}</a-button>
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
@@ -61,15 +101,13 @@
export default { export default {
name: 'upgradedonline', name: 'upgradedonline',
components:{ components:{
uploadFile uploadFile,
}, },
data() { data() {
return { return {
dataSource: [ dataSource: [
{ {
key:1,
systemclass: 'ceshi',
vaule: 2,
} }
], ],
columns: [ columns: [
@@ -78,7 +116,8 @@
align: 'left', align: 'left',
dataIndex: 'systemclass', dataIndex: 'systemclass',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'sys' },
}, },
{ {
title: this.$t('whetheritcanbeupgraded'), title: this.$t('whetheritcanbeupgraded'),
@@ -116,77 +155,88 @@
align: 'left', align: 'left',
dataIndex: 'electronicController', dataIndex: 'electronicController',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electronicController' },
}, },
{ {
title: this.$t('electroniccontrollername'), title: this.$t('electroniccontrollername'),
align: 'left', align: 'left',
dataIndex: 'electroniccontrollername', dataIndex: 'electroniccontrollername',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electroniccontrollername' },
}, },
{ {
title: this.$t('electroniccontrollerproductionenterprises'), title: this.$t('electroniccontrollerproductionenterprises'),
align: 'left', align: 'left',
dataIndex: 'electroniccontrollerproductionenterprises', dataIndex: 'electroniccontrollerproductionenterprises',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electroniccontrollerproductionenterprises' },
}, },
{ {
title: this.$t('electroniccontrollertype'), title: this.$t('electroniccontrollertype'),
align: 'left', align: 'left',
dataIndex: 'electroniccontrollertype', dataIndex: 'electroniccontrollertype',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'electroniccontrollertype' },
}, },
{ {
title: this.$t('hardwareversioninformation'), title: this.$t('hardwareversioninformation'),
align: 'left', align: 'left',
dataIndex: 'hardwareversioninformation', dataIndex: 'hardwareversioninformation',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'hardwareversioninformation' },
}, },
{ {
title: this.$t('initialsoftwareversionnumber'), title: this.$t('initialsoftwareversionnumber'),
align: 'left', align: 'left',
dataIndex: 'initialsoftwareversionnumber', dataIndex: 'initialsoftwareversionnumber',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'initialsoftwareversionnumber' },
}, },
{ {
title: this.$t('initialpackageforintegrityinflammatorydata'), title: this.$t('initialpackageforintegrityinflammatorydata'),
align: 'left', align: 'left',
dataIndex: 'initialpackageforintegrityinflammatorydata', dataIndex: 'initialpackageforintegrityinflammatorydata',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'initialpackageforintegrityinflammatorydata' },
}, },
{ {
title: this.$t('environmentalprotection'), title: this.$t('environmentalprotection'),
align: 'left', align: 'left',
dataIndex: 'environmentalprotection', dataIndex: 'environmentalprotection',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'environmentalprotection' },
}, },
{ {
title: this.$t('operatingsystemtype'), title: this.$t('operatingsystemtype'),
align: 'left', align: 'left',
dataIndex: 'operatingsystemtype', dataIndex: 'operatingsystemtype',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'operatingsystemtype' },
}, },
{ {
title: this.$t('operatingsystemmanufacturer'), title: this.$t('operatingsystemmanufacturer'),
align: 'left', align: 'left',
dataIndex: 'operatingsystemmanufacturer', dataIndex: 'operatingsystemmanufacturer',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'operatingsystemmanufacturer' },
}, },
{ {
title: this.$t('operatingsystemversion'), title: this.$t('operatingsystemversion'),
align: 'left', align: 'left',
dataIndex: 'operatingsystemversion', dataIndex: 'operatingsystemversion',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'operatingsystemversion' },
}, },
] ]
}, },
@@ -198,6 +248,7 @@
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
form:[{}]
} }
}, },
mounted() { mounted() {
@@ -233,9 +284,11 @@
// }) // })
}, },
last(){ last(){
this.save()
this.$emit('upgradedonlineup') this.$emit('upgradedonlineup')
}, },
next(){ next(){
this.save()
this.$emit('upgradedonlinedown') this.$emit('upgradedonlinedown')
}, },
uploadSuccess(data) { uploadSuccess(data) {
@@ -256,6 +309,24 @@
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
}, },
//中间加
addlineAtMid(record){
let obj = {}
this.dataSource.splice(this.dataSource.indexOf(record)+1,0,obj)
},
//最后一行加
addlineAtBot(){
let obj={}
this.dataSource.push(obj)
},
deleteData(record){
this.dataSource.splice(this.dataSource.indexOf(record),1)
},
save(){
postAction('/ota/otaBaCxKsjxtmccs/add',this.dataSource).then(res => {
console.log(res);
})
}
} }
} }
</script> </script>
@@ -7,19 +7,19 @@
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('upgraderegistrationnumber')"> <div class="title-text" :title="$t('upgraderegistrationnumber')">
<span>{{$t('upgraderegistrationnumber')}}</span> <span>{{ $t('upgraderegistrationnumber') }}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('upgraderegistrationnumber')" <a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('upgraderegistrationnumber')"
v-model="queryParam.cpdjbh"></a-input> v-model="queryParam.cpdjbh"></a-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('noticebatch')"> <div class="title-text" :title="$t('noticebatch')">
<span>{{$t('noticebatch')}}</span> <span>{{ $t('noticebatch') }}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('noticebatch')" <a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('noticebatch')"
v-model="queryParam.ggpc"></a-input> v-model="queryParam.ggpc"></a-input>
<!-- <j-multi-select-tag class="box-input" v-model="queryParam.noticebatch"--> <!-- <j-multi-select-tag class="box-input" v-model="queryParam.noticebatch"-->
<!-- :placeholder="$t('PleaseSelect')+$t('noticebatch')"--> <!-- :placeholder="$t('PleaseSelect')+$t('noticebatch')"-->
<!-- :type="'select'"--> <!-- :type="'select'"-->
@@ -29,10 +29,10 @@
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text tree-select"> <div class="box-title-text tree-select">
<div class="title-text" :title="$t('producttrademark')"> <div class="title-text" :title="$t('producttrademark')">
<span>{{$t('producttrademark')}}</span> <span>{{ $t('producttrademark') }}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('producttrademark')" <a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('producttrademark')"
v-model="queryParam.cpsb"></a-input> v-model="queryParam.cpsb"></a-input>
<!-- <j-multi-select-tag class="box-input" v-model="queryParam.producttrademark"--> <!-- <j-multi-select-tag class="box-input" v-model="queryParam.producttrademark"-->
<!-- :placeholder="$t('PleaseSelect')+$t('producttrademark')"--> <!-- :placeholder="$t('PleaseSelect')+$t('producttrademark')"-->
<!-- :type="'select'"--> <!-- :type="'select'"-->
@@ -43,10 +43,10 @@
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('productname')"> <div class="title-text" :title="$t('productname')">
<span>{{$t('productname')}}</span> <span>{{ $t('productname') }}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('productname')" <a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('productname')"
v-model="queryParam.cpmc"></a-input> v-model="queryParam.cpmc"></a-input>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('productname')"--> <!-- <a-select :placeholder="$t('PleaseSelect')+$t('productname')"-->
<!-- class="box-input"--> <!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"--> <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
@@ -65,10 +65,10 @@
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('productModel')"> <div class="title-text" :title="$t('productModel')">
<span>{{$t('productModel')}}</span> <span>{{ $t('productModel') }}</span>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('productModel')" <a-input class="box-input" :placeholder="$t('PleaseEnter') + $t('productModel')"
v-model="queryParam.cpxh"></a-input> v-model="queryParam.cpxh"></a-input>
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.productModel"--> <!-- <j-dict-select-tag class="box-input" v-model="queryParam.productModel"-->
<!-- :placeholder="$t('PleaseSelect')+$t('productModel')"--> <!-- :placeholder="$t('PleaseSelect')+$t('productModel')"-->
<!-- :type="'select'"--> <!-- :type="'select'"-->
@@ -77,91 +77,62 @@
</a-col> </a-col>
</template> </template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{ $t('reset') }}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px"> <a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }} {{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
</a> </a>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="table-operator"> <div class="table-operator">
<div @click="createvehicleandfunctionrecords" <div @click="createvehicleandfunctionrecords" v-has="'regulatoryAndTechnicalAssessment:initiationProcess'"
v-has="'regulatoryAndTechnicalAssessment:initiationProcess'" class="operator-text">
class="operator-text"> <a-icon type="plus" />
<a-icon type="plus"/> {{ $t('createvehicleandfunctionrecords') }}
{{$t('createvehicleandfunctionrecords')}}
</div> </div>
<div @click="citeforrecord" <div @click="citeforrecord" v-has="'regulatoryAndTechnicalAssessment:batchDelete'" class="operator-text">
v-has="'regulatoryAndTechnicalAssessment:batchDelete'" <a-icon type="solution" />
class="operator-text"> {{ $t('citeforrecord') }}
<a-icon type="solution"/>
{{$t('citeforrecord')}}
</div> </div>
<div @click="maintenanceallClick()" <div @click="maintenanceallClick()" v-has="'regulatoryAndTechnicalAssessment:batchDelete'" class="operator-text">
v-has="'regulatoryAndTechnicalAssessment:batchDelete'" <a-icon type="setting" />
class="operator-text"> {{ $t('datamaintenance') }}
<a-icon type="setting"/>
{{$t('datamaintenance')}}
</div> </div>
<div v-has="'regulatoryAndTechnicalAssessment:batchDelete'" <div v-has="'regulatoryAndTechnicalAssessment:batchDelete'" class="operator-text">
class="operator-text"> <ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true"
:accept="'.zip'"/>
</div> </div>
<div @click="handleModule" <div @click="handleModule" v-has="'regulatoryAndTechnicalAssessment:batchDelete'" class="operator-text">
v-has="'regulatoryAndTechnicalAssessment:batchDelete'" <a-icon type="download" />
class="operator-text"> {{ $t('templateDownload') }}
<a-icon type="download"/>
{{$t('templateDownload')}}
</div> </div>
</div> </div>
<div> <div>
<a-table <a-table ref="table" size="middle" :components="drag(columns, 'columns')" :loading="loading" :pagination="false"
ref="table" :scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="id" :data-source="dataSource"
size="middle" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="columns">
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<!-- --> <!-- -->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="viewProcessClick(record)">{{$t('viewProcess')}}</a>--> <!-- <a class="text-operation" @click="viewProcessClick(record)">{{$t('viewProcess')}}</a>-->
<!-- v-if="record.flowStatus == 'Completed'"--> <!-- v-if="record.flowStatus == 'Completed'"-->
<a class="text-operation" <a class="text-operation" @click="detailclick(record)">{{ $t('See') }}</a>
@click="detailclick(record)">{{$t('See')}}</a> <a class="text-operation" @click="maintenanceClick(record)">{{ $t('maintenance') }}</a>
<a class="text-operation" <a class="text-operation" @click="handleExport(record)">{{ $t('export') }}</a>
@click="maintenanceClick(record)">{{$t('maintenance')}}</a> <a class="text-operation" v-has="'regulatoryAndTechnicalAssessment:delete'"
<a class="text-operation" @click="deleteData(record)">{{ $t('delete') }}</a>
@click="handleExport(record)">{{$t('export')}}</a>
<a class="text-operation"
v-has="'regulatoryAndTechnicalAssessment:delete'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div class="page" v-if="dataSource && dataSource.length > 0"> <div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination <a-pagination :show-total="total => $t('total') + ` ${total} ` + $t('strip')" show-quick-jumper show-size-changer
:show-total="total => $t('total')+` ${total} `+$t('strip')" :page-size.sync="pageSize" :total="total" :current="pageNo" @change="pageOnChange"
show-quick-jumper @showSizeChange="SizeChange" />
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div> </div>
</div> </div>
<maintenance @getList="getList" ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef" />
</a-card> </a-card>
</template> </template>
@@ -178,13 +149,14 @@ export default {
maintenance, maintenance,
ImportFile ImportFile
}, },
mixins:[ResizeHeader, ResizeColumnProvide], mixins: [ResizeHeader, ResizeColumnProvide],
data() { data() {
return { return {
//url传参严格按照当前命名 //url传参严格按照当前命名
url: { url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page', list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page',
deleteBatch: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch' deleteBatch: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch',
exportData: ''
}, },
visible: false, visible: false,
loading: false, loading: false,
@@ -383,7 +355,7 @@ export default {
}) })
}, },
// 引用备案 // 引用备案
citeforrecord(){ citeforrecord() {
}, },
// 创建车型 // 创建车型
@@ -416,27 +388,27 @@ export default {
downloadFile(this.url.exportData, text + '.xls', query, this.Deselect) downloadFile(this.url.exportData, text + '.xls', query, this.Deselect)
}, },
// 结束升级 // 结束升级
endUpgrade(){ endUpgrade() {
this.$refs.upgradecompletionRef.addModel() this.$refs.upgradecompletionRef.addModel()
}, },
// 查看 // 查看
detailclick(){ detailclick() {
}, },
// 维护 // 维护
maintenanceClick(row){ maintenanceClick(row) {
this.$refs.maintenanceRef.edit(row) this.$refs.maintenanceRef.edit(row)
}, },
// 数据维护 // 数据维护
maintenanceallClick(){ maintenanceallClick() {
if(this.selectedRowKeys.length < 1){ if (this.selectedRowKeys.length < 1) {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ } else {
this.$refs.maintenanceRef.edit(this.selectedRowKeys) this.$refs.maintenanceRef.edit(this.selectedRowKeys)
} }
}, },
// 模板下载 // 模板下载
handleModule(){ handleModule() {
downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {}) downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {})
}, },
} }
-1
View File
@@ -102,6 +102,5 @@ module.exports = {
} }
} }
}, },
lintOnSave: undefined lintOnSave: undefined
} }