diff --git a/jero-web/src/components/ImportFileData/index.vue b/jero-web/src/components/ImportFileData/index.vue index 23e53b99c..d2126df9b 100644 --- a/jero-web/src/components/ImportFileData/index.vue +++ b/jero-web/src/components/ImportFileData/index.vue @@ -120,6 +120,25 @@ }) } else { if (this.isTrue) { + let {message} = info.file.response + let {name} = info.file + let content = [] + if (message) { + message = message.split('
') + message.forEach(res => { + if (res) { + content.push( < div > {res} < /div>) + } + }) + } + this.$warning({ + title: name, + content: ( + < div > + {content} + < /div> + ) + }) if(info.file.response.result != null && info.file.response.result.otaId){ localStorage.setItem('otaId', info.file.response.result.otaId) } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index 59f30073b..19e6f6876 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -176,7 +176,8 @@ export default { disabled: false, form: { qymc: '安徽江淮汽车集团股份有限公司', - bapc: undefined + bapc: undefined, + cxmb: undefined }, url: { exportData: '/ota/otaBaSjSjmbcx/exportData', @@ -206,7 +207,7 @@ export default { handleModule() { downloadFile('ota/otaBaSjSjmbcx/exportTemplate', '升级目标车型' + '.zip', {}) }, - getData() { + getData(item) { let otaIdT = localStorage.getItem('otaIdT') if (otaIdT == null) { otaIdT = '' @@ -232,15 +233,15 @@ export default { this.form = res.result this.form.otaId='' - // if (this.$route.query.type == 1 && res.result.cxmb == null) { - // this.form.cxmb = this.form.babh + '-' + this.form.bapc + '-' + this.form.cpxh - // } else { - // if (this.$route.query.type == 2 && res.result.cxmb == null) { - // this.form.cxmb = this.form.babh + '-' + this.form.bapc + '-' + this.form.cpxh - // } else { - // this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined - // } - // } + if (this.$route.query.type == 1 && res.result.cxmb == null && !item) { + this.form.cxmb = this.form.babh + '-' + this.form.bapc + '-' + this.form.cpxh + } else { + if (this.$route.query.type == 2 && res.result.cxmb == null && !item) { + this.form.cxmb = this.form.babh + '-' + this.form.bapc + '-' + this.form.cpxh + } else { + this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined + } + } if (res.result.dllx1 == null || res.result.dllx1 == "") { this.form.dllx1 = undefined @@ -249,9 +250,9 @@ export default { if (res.result.dllx2 == null || res.result.dllx2 == "") { this.form.dllx2 = undefined } - if (res.result.cxmb == null || res.result.cxmb == "") { - this.form.cxmb = undefined - } + // if (res.result.cxmb == null || res.result.cxmb == "") { + // this.form.cxmb = undefined + // } if (res.result.bapc == null || res.result.bapc == "") { this.form.bapc = undefined } @@ -265,14 +266,15 @@ export default { this.$refs.ruleForm.validate(valid => { if (valid) { let otaId = localStorage.getItem('otaId') - if (otaId == null|| otaId == undefined) { - otaId = '' - } + if (otaId == null || otaId == undefined) { + otaId = '' + } this.selectListPc.map(item => { if (item.id == this.form.bapc) { this.form.bapc = item.ggpc } }) + this.form.otaId = otaId postAction('/ota/otaBaSjSjmbcx/add', { otaId: otaId, ...this.form }).then(res => { if (res.code == 200) { localStorage.setItem('otaId', res.result.otaId) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index 15b86d0c6..69c67a94f 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -241,6 +241,7 @@ import { message } from 'ant-design-vue' formInline:{}, projectNameList:[], formRules:[], + flag:'', url: { exportData: '/ota/otaBaCxJbxx/exportData', importZipUrl: '/ota/otaBaCxJbxx/importData?otaId=' + localStorage.getItem('otaId'),//导入 @@ -310,7 +311,7 @@ import { message } from 'ant-design-vue' } }) }, - getData(){ + getData(item){ let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ otaIdT='' @@ -332,10 +333,10 @@ import { message } from 'ant-design-vue' this.form.txzd=res.result.txzd this.form.cdotasj=res.result.cdotasj this.form.id=res.result.id - if(this.$route.query.type == 1 && res.result.cxmb == null){ + if(this.$route.query.type == 1 && res.result.cxmb == null && !item){ this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh }else { - if(this.$route.query.type == 2 && res.result.cxmb == null){ + if(this.$route.query.type == 2 && res.result.cxmb == null && !item){ this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh }else{ this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined @@ -370,6 +371,9 @@ import { message } from 'ant-design-vue' if(valid){ this.save() setTimeout(()=>{ + if(this.flag == 1){ + return + } this.$emit('basicInformationForm') },1000) @@ -385,11 +389,14 @@ import { message } from 'ant-design-vue' otaId='' } postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => { - if(res.code == 200){ + if(res.success){ localStorage.setItem('otaId', res.result.otaId) - this.$message.success(this.$t('SavedSuccessfully')) + this.$message.success(res.message) this.getData() - } + }else{ + this.$message.warning(res.message) + this.flag = 1 + } }) } }) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index 8b14c8175..40ce2ea96 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -766,7 +766,7 @@ export default { queryParam: {}, dataSourceList: [ { - bjmc:'车端OTA升级功能模块' + bjmc:'' } ], columns: [ @@ -878,7 +878,7 @@ export default { if(res.result.kzq.length == 0){ this.dataSourceList=[ { - bjmc:'车端OTA升级功能模块' + bjmc:'' } ] }else{ @@ -981,7 +981,7 @@ export default { }, addlineAtBot(){ let obj={} - obj.bjmc='车端OTA升级功能模块' + obj.bjmc='' this.dataSourceList.push(obj) this.$forceUpdate() },