Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
cuijiaming
2023-03-27 13:45:31 +08:00
8 changed files with 160 additions and 147 deletions
+1 -1
View File
@@ -1743,7 +1743,7 @@ module.exports = {
afterthesoftwareversionupgraded:'软件版本号升级后', afterthesoftwareversionupgraded:'软件版本号升级后',
beforetheOSversionupgraded:'操作系统版本号升级前', beforetheOSversionupgraded:'操作系统版本号升级前',
aftertheoperatingsystemversionupgraded:'操作系统版本号升级后', aftertheoperatingsystemversionupgraded:'操作系统版本号升级后',
initialpackageforintegrityinflammatorydata:'初始软件包的完整性炎症数据', initialpackageforintegrityinflammatorydata:'初始软件包的完整性验证数据',
upgradepackageintegrityverificationdata:'升级包完整性验证数据', upgradepackageintegrityverificationdata:'升级包完整性验证数据',
upgradepackagesize:'升级包大小', upgradepackagesize:'升级包大小',
differentialupgradeornot:'是否差分升级', differentialupgradeornot:'是否差分升级',
+12 -1
View File
@@ -34,7 +34,7 @@
export default { export default {
name: 'file', name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], props: ['disableds', 'disabled', 'thisFileUploadUrl','accept', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
data() { data() {
return { return {
visible: false, visible: false,
@@ -88,6 +88,16 @@
// let thisFileType = this.thisFileType.replace(/\s+/g, ""); // let thisFileType = this.thisFileType.replace(/\s+/g, "");
console.log(file) console.log(file)
this.fileTypeSatus = true this.fileTypeSatus = true
//根据格式拦截
if(this.accept){
let fileNames = file.name.split('.')
let fileType = fileNames[fileNames.length - 1].toLocaleLowerCase()
let extList = this.accept.split(',')
if (!extList.find((item) => item == fileType)) {
this.$message.error(this.$t('uploadOnly') + this.accept + this.$t('type'))
reject(false)
}
}
if (this.isMultiple) { if (this.isMultiple) {
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) { if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded')) this.$message.warning(this.$t('onlyOnefileUploaded'))
@@ -121,6 +131,7 @@
// }else{ // }else{
// this.fileTypeSatus = false; // this.fileTypeSatus = false;
// } // }
// }
// } // }
this.$message.destroy() this.$message.destroy()
}, },
@@ -22,41 +22,39 @@
:columns="columns" :columns="columns"
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<!-- 配置情况--> <span slot="functionname" slot-scope="text,record">
<span slot="configuration" slot-scope="text,record"> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.gnmc"></a-input>
<a-radio-group>
<a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group>
</span> </span>
<!-- 可升级--> <span slot="upgradedestinationype" slot-scope="text,record">
<span slot="whetheritcanbeupgraded" slot-scope="text,record"> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjmdlx"></a-input>
<a-radio-group>
<a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group>
</span> </span>
<!-- 自动化级别-->
<span slot="drivingautomationlevel" slot-scope="text,record">
<j-dict-select-tag class="box-input"
:disabled="disable"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
</span>
<!-- 升级前-->
<span slot="preupgrade" slot-scope="text,record"> <span slot="preupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjqbgcs"></a-input>
</span> </span>
<!-- 升级后-->
<span slot="afterupgrade" slot-scope="text,record"> <span slot="afterupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjhbgcs"></a-input>
</span> </span>
<span slot="functionalchangedescription" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.gnbgms" ></a-input>
</span>
<span slot="variationofapplicableconditions" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sytjbg"></a-input>
</span>
<span slot="upgradetheelectroniccontrollerinvolved" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjsjkzq"></a-input>
</span>
<span slot="functiondescription" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.gnbgms"></a-input>
</span>
<span slot="applicationconditions" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sytjbg"></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">{{$t('add')}}</a>
<a class="text-operation">{{$t('addfunction')}}</a> <a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
<a class="text-operation">{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div> <div>
@@ -86,8 +84,7 @@ export default {
return { return {
dataSource: [ dataSource: [
{ {
key:1,
functionname:'ceshi',
} }
], ],
loading: false, loading: false,
@@ -98,108 +95,83 @@ export default {
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('upgradedestinationype'),
align: 'left', align: 'left',
dataIndex: 'configuration', dataIndex: 'upgradedestinationype',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'upgradedestinationype' },
},
{
title: this.$t('adjustmentofchangedBulletinparameters'),
align: 'left',
dataIndex: 'adjustmentofchangedBulletinparameters',
ellipsis: true,
width: 170,
children: [
{
title: this.$t('preupgrade'),
align: 'left',
dataIndex: 'preupgrade',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'preupgrade' },
},
{
title: this.$t('afterupgrade'),
align: 'left',
dataIndex: 'afterupgrade',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'afterupgrade' },
},
]
}, },
{ {
title: this.$t('whetheritcanbeupgraded'), title: this.$t('functionalchangedescription'),
align: 'left', align: 'left',
dataIndex: 'whetheritcanbeupgraded', dataIndex: 'functionalchangedescription',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'functionalchangedescription' },
}, },
{ {
title: this.$t('drivingautomationlevel'), title: this.$t('variationofapplicableconditions'),
align: 'left', align: 'left',
dataIndex: 'drivingautomationlevel', dataIndex: 'variationofapplicableconditions',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'variationofapplicableconditions' },
}, },
{ {
title: this.$t('technicalparameters'), title: this.$t('upgradetheelectroniccontrollerinvolved'),
align: 'left', align: 'left',
dataIndex: 'technicalparameters', dataIndex: 'upgradetheelectroniccontrollerinvolved',
ellipsis: true, ellipsis: true,
width: 170 width: 170,
scopedSlots: { customRender: 'upgradetheelectroniccontrollerinvolved' },
}, },
{ {
title: this.$t('functiondescription'), title: this.$t('functiondescription'),
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
},
{
title: this.$t('controllerparameter'),
align: 'left',
dataIndex: 'controllerparameter',
ellipsis: true,
width: 170, width: 170,
children: [ scopedSlots: { customRender: 'applicationconditions' },
{
title: this.$t('electronic'),
align: 'left',
dataIndex: 'electronic',
ellipsis: true,
width: 170
},
{
title: this.$t('electroniccontrollerproductionenterprises'),
align: 'left',
dataIndex: 'electroniccontrollerproductionenterprises',
ellipsis: true,
width: 170
},
{
title: this.$t('electroniccontrollertype'),
align: 'left',
dataIndex: 'electroniccontrollertype',
ellipsis: true,
width: 170
},
{
title: this.$t('hardwareversioninformation'),
align: 'left',
dataIndex: 'hardwareversioninformation',
ellipsis: true,
width: 170
},
{
title: this.$t('softwaredevelopmententerprise'),
align: 'left',
dataIndex: 'softwaredevelopmententerprise',
ellipsis: true,
width: 170
},
{
title: this.$t('operatingsystemversion'),
align: 'left',
dataIndex: 'operatingsystemversion',
ellipsis: true,
width: 170
},
{
title: this.$t('inflammatorydata'),
align: 'left',
dataIndex: 'inflammatorydata',
ellipsis: true,
width: 170
},
]
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
align: 'left', align: 'left',
@@ -216,6 +188,7 @@ export default {
}, },
mounted() { mounted() {
// this.getList() // this.getList()
this.getData()
}, },
methods: { methods: {
// 模板下载 // 模板下载
@@ -250,12 +223,40 @@ export default {
} }
}) })
}, },
getData(){
let otaIdT=localStorage.getItem('otaIdT')
if(otaIdT==null){
otaIdT=''
}
let otaId=localStorage.getItem('otaId')
if(otaId==null){
otaId=''
}
getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
this.dataSource =res.result.list == null ? {} : res.result.list
})
},
save(){
postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{
console.log(res);
this.$message.success(this.$t('SavedSuccessfully'))
})
},
last(){ last(){
this.save()
this.$emit('beupgradedonlineup') this.$emit('beupgradedonlineup')
}, },
next(){ next(){
this.save()
this.$emit('beupgradedonlinedown') this.$emit('beupgradedonlinedown')
}, },
addlineAtBot(){
let obj={}
this.dataSource.push(obj)
},
deleteData(record){
this.dataSource.splice(this.dataSource.indexOf(record),1)
},
uploadSuccess(data) { uploadSuccess(data) {
let attIdList = [] let attIdList = []
if (data && data.length > 0) { if (data && data.length > 0) {
@@ -37,34 +37,28 @@
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjkzqmc" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjkzqmc" ></a-input>
</span> </span>
<span slot="adaptivehardwareversion" slot-scope="text,record"> <span slot="adaptivehardwareversion" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbb"></a-input>
</span> </span>
<span slot="beforethesoftwareversionupgraded" slot-scope="text,record"> <span slot="beforethesoftwareversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqrjbb" ></a-input>
</span> </span>
<span slot="afterthesoftwareversionupgraded" slot-scope="text,record"> <span slot="afterthesoftwareversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhrjbb"></a-input>
</span> </span>
<span slot="beforetheOSversionupgraded" slot-scope="text,record"> <span slot="beforetheOSversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqczxt"></a-input>
</span> </span>
<span slot="aftertheoperatingsystemversionupgraded" slot-scope="text,record"> <span slot="aftertheoperatingsystemversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhczxt"></a-input>
</span>
<span slot="softwaredevelopmententerprise" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc" ></a-input>
</span>
<span slot="initialpackageforintegrityinflammatorydata" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input>
</span> </span>
<span slot="upgradepackageintegrityverificationdata" slot-scope="text,record"> <span slot="upgradepackageintegrityverificationdata" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbyzsj" ></a-input>
</span> </span>
<span slot="upgradepackagesize" slot-scope="text,record"> <span slot="upgradepackagesize" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbdx"></a-input>
</span> </span>
<span slot="differentialupgradeornot" slot-scope="text,record"> <span slot="differentialupgradeornot" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sfcfsj"></a-input>
</span> </span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
@@ -76,7 +70,7 @@
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
</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>
@@ -194,22 +188,7 @@ export default {
width: 170, width: 170,
scopedSlots: { customRender: 'aftertheoperatingsystemversionupgraded' }, scopedSlots: { customRender: 'aftertheoperatingsystemversionupgraded' },
}, },
{
title: this.$t('softwaredevelopmententerprise'),
align: 'left',
dataIndex: 'softwaredevelopmententerprise',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'softwaredevelopmententerprise' },
},
{
title: this.$t('initialpackageforintegrityinflammatorydata'),
align: 'left',
dataIndex: 'initialpackageforintegrityinflammatorydata',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'initialpackageforintegrityinflammatorydata' },
},
{ {
title: this.$t('upgradepackageintegrityverificationdata'), title: this.$t('upgradepackageintegrityverificationdata'),
align: 'left', align: 'left',
@@ -252,6 +231,7 @@ export default {
}, },
mounted() { mounted() {
// this.getList() // this.getList()
this.getData()
}, },
methods: { methods: {
// 模板下载 // 模板下载
@@ -298,10 +278,31 @@ export default {
} }
}) })
}, },
getData(){
let otaIdT=localStorage.getItem('otaIdT')
if(otaIdT==null){
otaIdT=''
}
let otaId=localStorage.getItem('otaId')
if(otaId==null){
otaId=''
}
getAction('/ota/otaBaSjSjxtbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
this.dataSource =res.result.list == null ? {} : res.result.list
})
},
save(){
postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{
console.log(res);
this.$message.success(this.$t('SavedSuccessfully'))
})
},
last(){ last(){
this.save()
this.$emit('upgradedonlineup') this.$emit('upgradedonlineup')
}, },
next(){ next(){
this.save()
this.$emit('upgradedonlinedown') this.$emit('upgradedonlinedown')
}, },
addlineAtBot(){ addlineAtBot(){
@@ -360,10 +360,14 @@ import { message } from 'ant-design-vue'
}) })
}, },
async save(){ save(){
this.$refs.ruleForm.validate(valid=>{ this.$refs.ruleForm.validate(valid=>{
if(valid){ if(valid){
postAction('/ota/otaBaCxJbxx/add',{ otaId:localStorage.getItem('otaId'),...this.form}).then( res => { let otaId = localStorage.getItem('otaId')
if(otaId==null || otaId == undefined){
otaId=''
}
postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => {
if(res.code == 200){ if(res.code == 200){
localStorage.setItem('otaId', res.result.otaId) localStorage.setItem('otaId', res.result.otaId)
this.$message.success(this.$t('SavedSuccessfully')) this.$message.success(this.$t('SavedSuccessfully'))
@@ -45,7 +45,7 @@
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
:dictCode="record.dictCode" :dictCode="'driving_automation_level'"
v-model="record.jszdhjb"/> v-model="record.jszdhjb"/>
</span> </span>
<!-- 技术参数--> <!-- 技术参数-->
@@ -95,7 +95,7 @@
<div style='width: 300px'> <div style='width: 300px'>
<span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('fillincontent')}}</span> <span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('fillincontent')}}</span>
<span class='radio-text'> <span class='radio-text'>
<a-radio-group style='margin-left: 40px;' v-model="query.wlaqyqPz"> <a-radio-group style='margin-left: 40px;' v-model="query.jgld">
<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>
@@ -299,7 +299,7 @@ export default {
}, },
dataSource: [ dataSource: [
{ {
key: 'wlaqyqSl', key: 'jgldSl',
val:'', val:'',
componentname: this.$t('networksecurityrequirements'), componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'), configuration: this.$t('ineffectiveupgrades'),
@@ -307,7 +307,7 @@ export default {
fillincontent:this.$t('yesisselected'), fillincontent:this.$t('yesisselected'),
}, },
{ {
key: 'wlaqyqBzwz', key: 'jgldBzwz',
val:'', val:'',
componentname: this.$t('networksecurityrequirements'), componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'), configuration: this.$t('ineffectiveupgrades'),
@@ -315,7 +315,7 @@ export default {
fillincontent:this.$t('forwardXquantity'), fillincontent:this.$t('forwardXquantity'),
}, },
{ {
key: 'wlaqyqGgxh', key: 'jgldGgxh',
val:'', val:'',
componentname: this.$t('networksecurityrequirements'), componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'), configuration: this.$t('ineffectiveupgrades'),
@@ -323,7 +323,7 @@ export default {
fillincontent:this.$t('yesisselected'), fillincontent:this.$t('yesisselected'),
}, },
{ {
key: 'wlaqyqScqy', key: 'jgldScqy',
val:'', val:'',
componentname: this.$t('networksecurityrequirements'), componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('productionenterprise'), configuration: this.$t('productionenterprise'),
@@ -890,10 +890,6 @@ export default {
this.dataSource.forEach(item=>{ this.dataSource.forEach(item=>{
for(let key in res.result.bj){ for(let key in res.result.bj){
if(Number(res.result.bj[key])!=NaN &&Number(res.result.bj[key])!=0 && key !='id'){
console.log(key);
res.result.bj[key]=Number(res.result.bj[key])
}
if(item.key==key){ if(item.key==key){
item.val=res.result.bj[key] item.val=res.result.bj[key]
} }
@@ -34,7 +34,7 @@
<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" :accept="'.doc,.docx,.pdf'" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>