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

This commit is contained in:
高嵩
2023-03-25 21:05:31 +08:00
5 changed files with 75 additions and 47 deletions
@@ -271,13 +271,15 @@
}, },
getData(){ getData(){
let otaIdT=localStorage.getItem('otaIdT') let otaIdT=localStorage.getItem('otaIdT')
console.log('!!!',otaIdT);
if(otaIdT==null){ if(otaIdT==null){
otaIdT='' otaIdT=''
} }
if(localStorage.getItem('otaId') == null){ let otaId=localStorage.getItem('otaId')
return if(otaId==null){
}else{ otaId=''
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{ }
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.form=res.result this.form=res.result
if(res.result.dllx1 == null ){ if(res.result.dllx1 == null ){
@@ -290,7 +292,6 @@
} }
}) })
}
}, },
next(){ next(){
@@ -30,7 +30,11 @@
:triggerChange="false"/> :triggerChange="false"/>
</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" @click="clickButtonToUpload(record.zmcl,record.key)" v-model="record.zmcl">
{{ (record.zmcl === 'null' || record.zmcl === '' ||
record.zmcl == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
}}
</a-button>
</span> </span>
</a-table> </a-table>
<div class="bootom-button"> <div class="bootom-button">
@@ -63,6 +67,7 @@ import ImportFile from '@/components/ImportFileData/index'
dataSource: [ dataSource: [
{ {
key: '1', key: '1',
zmcl:'',
aspect: this.$t('upgradepacketprotectionmeasures'), aspect: this.$t('upgradepacketprotectionmeasures'),
safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'), safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
@@ -71,6 +76,7 @@ import ImportFile from '@/components/ImportFileData/index'
}, },
{ {
key: '2', key: '2',
zmcl:'',
aspect: this.$t('otaupgradedsecuritymeasuresforvehicles'), aspect: this.$t('otaupgradedsecuritymeasuresforvehicles'),
safetymeasure: this.$t('failsafmechanism'), safetymeasure: this.$t('failsafmechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
@@ -80,6 +86,7 @@ import ImportFile from '@/components/ImportFileData/index'
{ {
key: '3', key: '3',
aspect: '', aspect: '',
zmcl:'',
safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'), safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials:'', certifyingmaterials:'',
@@ -88,6 +95,7 @@ import ImportFile from '@/components/ImportFileData/index'
{ {
key: '4', key: '4',
aspect: '', aspect: '',
zmcl:'',
safetymeasure: this.$t('informationsecuritymechanism'), safetymeasure: this.$t('informationsecuritymechanism'),
relevantverification: 'havemeasures', relevantverification: 'havemeasures',
certifyingmaterials:'', certifyingmaterials:'',
@@ -160,11 +168,13 @@ import ImportFile from '@/components/ImportFileData/index'
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
queryParam: {} type:'',
queryParam: {},
fileList: {},
} }
}, },
mounted() { mounted() {
this.getList() // this.getList()
this.getData() this.getData()
}, },
methods: { methods: {
@@ -180,13 +190,32 @@ import ImportFile from '@/components/ImportFileData/index'
getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{ getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.dataSource[0].info = Number(res.result.bhjz) this.dataSource[0].info = Number(res.result.bhjz)
this.dataSource[1].info =Number(res.result.fsxjz) this.dataSource[1].info =Number(res.result.fsxjz)
this.dataSource[2].info= Number(res.result.sjsbcs) this.dataSource[2].info= Number(res.result.sjsbcs)
this.dataSource[3].info=Number(res.result.xxaqjz) this.dataSource[3].info=Number(res.result.xxaqjz)
this.fileList.uploadName = res.result.zmclList
this.fileList.certifyingmaterials = this.$t('viewFile')
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
this.$forceUpdate()
this.loading = false
} }
}) })
}, },
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')
},
click(value){ click(value){
this.fileList = value this.fileList = value
console.log(this.fileList) console.log(this.fileList)
@@ -196,20 +225,6 @@ import ImportFile from '@/components/ImportFileData/index'
this.$refs.uploadFile.visible = true 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() { getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => { Object.keys(queryParam).forEach(val => {
@@ -222,7 +237,7 @@ import ImportFile from '@/components/ImportFileData/index'
pageSize: this.pageSize, pageSize: this.pageSize,
...queryParam ...queryParam
} }
this.loading = true // this.loading = true
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
@@ -243,6 +258,7 @@ import ImportFile from '@/components/ImportFileData/index'
obj.fsxjz= this.dataSource[1].info obj.fsxjz= this.dataSource[1].info
obj.sjsbcs = this.dataSource[2].info obj.sjsbcs = this.dataSource[2].info
obj.xxaqjz = this.dataSource[3].info obj.xxaqjz = this.dataSource[3].info
obj.zmclList = this.fileList.uploadName
postAction('/ota/otaBaCxAqcs/add',obj).then(res =>{ postAction('/ota/otaBaCxAqcs/add',obj).then(res =>{
console.log(res); console.log(res);
}) })
@@ -221,6 +221,13 @@ export default {
this.dataSource[7].relevantverification=Number(res.result.sjsbaq) this.dataSource[7].relevantverification=Number(res.result.sjsbaq)
this.dataSource[8].relevantverification=Number(res.result.sjgg) this.dataSource[8].relevantverification=Number(res.result.sjgg)
this.dataSource[9].relevantverification=Number(res.result.sjzt) this.dataSource[9].relevantverification=Number(res.result.sjzt)
this.fileList.uploadName = res.result.zmclList
this.$nextTick(() => {
this.fileList.certifyingmaterials = this.$t('viewFile')
})
this.fileList.certifyingmaterials = this.$t('viewFile')
console.log(this.fileList)
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
this.$forceUpdate() this.$forceUpdate()
}) })
@@ -281,6 +288,7 @@ export default {
obj.sjsbaq = this.dataSource[7].relevantverification obj.sjsbaq = this.dataSource[7].relevantverification
obj.sjgg = this.dataSource[8].relevantverification obj.sjgg = this.dataSource[8].relevantverification
obj.sjzt = this.dataSource[9].relevantverification obj.sjzt = this.dataSource[9].relevantverification
obj.zmclList = this.fileList.uploadName
postAction('/ota/otaBaCxZxsjyq/add', obj).then(res => { postAction('/ota/otaBaCxZxsjyq/add', obj).then(res => {
console.log(res); console.log(res);
}) })
@@ -14,11 +14,11 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<!-- <span class="Required">*</span>--> <span class="Required">*</span>
<span class="title-text-text" :title="$t('recordstatus')"> <span class="title-text-text" :title="$t('recordstatus')">
{{$t('recordstatus')}}</span> {{$t('recordstatus')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="recordstatus"> <a-form-model-item class="itemModel" prop="bazt">
<j-dict-select-tag class="box-input" v-model="formInline.bazt" <j-dict-select-tag class="box-input" v-model="formInline.bazt"
:placeholder="$t('PleaseSelect')+$t('recordstatus')" :placeholder="$t('PleaseSelect')+$t('recordstatus')"
:type="'select'" :type="'select'"
@@ -29,11 +29,11 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<!-- <span class="Required">*</span>--> <span class="Required">*</span>
<span class="title-text-text" :title="$t('filingtime')"> <span class="title-text-text" :title="$t('filingtime')">
{{$t('filingtime')}}</span> {{$t('filingtime')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="filingtime"> <a-form-model-item class="itemModel" prop="batjsj">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')" :placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'batjsj'})" @change="dateChange({db_field_name:'batjsj'})"
@@ -80,20 +80,20 @@ export default {
bz:'', bz:'',
}, },
rules: { rules: {
// listConfirmation: [ bazt: [
// { {
// required: true, required: true,
// message: this.$t('confirmationOfRegulationsList') + this.$t('cannotEmpty'), message: this.$t('recordstatus') + this.$t('cannotEmpty'),
// trigger: 'change' trigger: 'change'
// } }
// ], ],
// legalTaskConfirmation: [ batjsj: [
// { {
// required: true, required: true,
// message: this.$t('regulatoryTaskConfirmation') + this.$t('cannotEmpty'), message: this.$t('filingtime') + this.$t('cannotEmpty'),
// trigger: 'change' trigger: 'change'
// } }
// ], ],
// designDeadline: [ // designDeadline: [
// { // {
// required: true, // required: true,
@@ -363,13 +363,16 @@ export default {
if ( this.selectedRowKeys.length > 1){ if ( this.selectedRowKeys.length > 1){
this.$message.warning(this.$t('OnlyOneSelected')) this.$message.warning(this.$t('OnlyOneSelected'))
}else{ }else{
localStorage.removeItem('otaIdt') localStorage.removeItem('otaIdT')
localStorage.removeItem('otaId') localStorage.removeItem('otaId')
localStorage.setItem('otaIdt',this.selectedRowKeys[0]) localStorage.setItem('otaIdT',this.selectedRowKeys[0])
this.$router.push({ if(localStorage.getItem('otaIdT')!=null){
this.$router.push({
path: '/vehicleinformation', path: '/vehicleinformation',
query: {} query: {}
}) })
}
} }
} }