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:'软件版本号升级后',
beforetheOSversionupgraded:'操作系统版本号升级前',
aftertheoperatingsystemversionupgraded:'操作系统版本号升级后',
initialpackageforintegrityinflammatorydata:'初始软件包的完整性炎症数据',
initialpackageforintegrityinflammatorydata:'初始软件包的完整性验证数据',
upgradepackageintegrityverificationdata:'升级包完整性验证数据',
upgradepackagesize:'升级包大小',
differentialupgradeornot:'是否差分升级',
+12 -1
View File
@@ -34,7 +34,7 @@
export default {
name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
props: ['disableds', 'disabled', 'thisFileUploadUrl','accept', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
data() {
return {
visible: false,
@@ -88,6 +88,16 @@
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
console.log(file)
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.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
@@ -121,6 +131,7 @@
// }else{
// this.fileTypeSatus = false;
// }
// }
// }
this.$message.destroy()
},
@@ -22,41 +22,39 @@
:columns="columns"
style="margin-bottom: 20px"
>
<!-- 配置情况-->
<span slot="configuration" slot-scope="text,record">
<a-radio-group>
<a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group>
<span slot="functionname" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.gnmc"></a-input>
</span>
<!-- 可升级-->
<span slot="whetheritcanbeupgraded" slot-scope="text,record">
<a-radio-group>
<a-radio :value="1"> {{ $t('yes') }} </a-radio>
<a-radio :value="2"> {{ $t('not') }} </a-radio>
</a-radio-group>
<span slot="upgradedestinationype" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjmdlx"></a-input>
</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">
<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 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 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">
<a class="text-operation">{{$t('addcontroller')}}</a>
<a class="text-operation">{{$t('addfunction')}}</a>
<a class="text-operation">{{$t('delete')}}</a>
<a class="text-operation" @click="addlineAtBot">{{$t('add')}}</a>
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div>
@@ -86,8 +84,7 @@ export default {
return {
dataSource: [
{
key:1,
functionname:'ceshi',
}
],
loading: false,
@@ -98,108 +95,83 @@ export default {
align: 'left',
dataIndex: 'functionname',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'functionname' },
},
{
title: this.$t('configuration'),
title: this.$t('upgradedestinationype'),
align: 'left',
dataIndex: 'configuration',
dataIndex: 'upgradedestinationype',
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',
dataIndex: 'whetheritcanbeupgraded',
dataIndex: 'functionalchangedescription',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'functionalchangedescription' },
},
{
title: this.$t('drivingautomationlevel'),
title: this.$t('variationofapplicableconditions'),
align: 'left',
dataIndex: 'drivingautomationlevel',
dataIndex: 'variationofapplicableconditions',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'variationofapplicableconditions' },
},
{
title: this.$t('technicalparameters'),
title: this.$t('upgradetheelectroniccontrollerinvolved'),
align: 'left',
dataIndex: 'technicalparameters',
dataIndex: 'upgradetheelectroniccontrollerinvolved',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'upgradetheelectroniccontrollerinvolved' },
},
{
title: this.$t('functiondescription'),
align: 'left',
dataIndex: 'functiondescription',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'functiondescription' },
},
{
title: this.$t('applicationconditions'),
align: 'left',
dataIndex: 'applicationconditions',
ellipsis: true,
width: 170
},
{
title: this.$t('controllerparameter'),
align: 'left',
dataIndex: 'controllerparameter',
ellipsis: true,
width: 170,
children: [
{
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
},
]
scopedSlots: { customRender: 'applicationconditions' },
},
{
title: this.$t('operation'),
align: 'left',
@@ -216,6 +188,7 @@ export default {
},
mounted() {
// this.getList()
this.getData()
},
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(){
this.save()
this.$emit('beupgradedonlineup')
},
next(){
this.save()
this.$emit('beupgradedonlinedown')
},
addlineAtBot(){
let obj={}
this.dataSource.push(obj)
},
deleteData(record){
this.dataSource.splice(this.dataSource.indexOf(record),1)
},
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
@@ -37,34 +37,28 @@
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjkzqmc" ></a-input>
</span>
<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 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 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 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 slot="aftertheoperatingsystemversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></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>
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhczxt"></a-input>
</span>
<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 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 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 slot="operation" slot-scope="text,record">
@@ -76,7 +70,7 @@
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
</div>
<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' @click='next'>{{$t('next')}}</a-button>
</div>
@@ -194,22 +188,7 @@ export default {
width: 170,
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'),
align: 'left',
@@ -252,6 +231,7 @@ export default {
},
mounted() {
// this.getList()
this.getData()
},
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(){
this.save()
this.$emit('upgradedonlineup')
},
next(){
this.save()
this.$emit('upgradedonlinedown')
},
addlineAtBot(){
@@ -360,10 +360,14 @@ import { message } from 'ant-design-vue'
})
},
async save(){
save(){
this.$refs.ruleForm.validate(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){
localStorage.setItem('otaId', res.result.otaId)
this.$message.success(this.$t('SavedSuccessfully'))
@@ -45,7 +45,7 @@
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"
:dictCode="record.dictCode"
:dictCode="'driving_automation_level'"
v-model="record.jszdhjb"/>
</span>
<!-- 技术参数-->
@@ -95,7 +95,7 @@
<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='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="2"> {{ $t('not') }} </a-radio>
</a-radio-group>
@@ -299,7 +299,7 @@ export default {
},
dataSource: [
{
key: 'wlaqyqSl',
key: 'jgldSl',
val:'',
componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'),
@@ -307,7 +307,7 @@ export default {
fillincontent:this.$t('yesisselected'),
},
{
key: 'wlaqyqBzwz',
key: 'jgldBzwz',
val:'',
componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'),
@@ -315,7 +315,7 @@ export default {
fillincontent:this.$t('forwardXquantity'),
},
{
key: 'wlaqyqGgxh',
key: 'jgldGgxh',
val:'',
componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('ineffectiveupgrades'),
@@ -323,7 +323,7 @@ export default {
fillincontent:this.$t('yesisselected'),
},
{
key: 'wlaqyqScqy',
key: 'jgldScqy',
val:'',
componentname: this.$t('networksecurityrequirements'),
configuration: this.$t('productionenterprise'),
@@ -890,10 +890,6 @@ export default {
this.dataSource.forEach(item=>{
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){
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' @click='next'>{{ $t('next') }}</a-button>
</div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
<uploadFile ref="uploadFile" :accept="'.doc,.docx,.pdf'" @uploadSuccess="uploadSuccess"></uploadFile>
</div>
</template>