上传附件修改
This commit is contained in:
+31
-16
@@ -30,7 +30,11 @@
|
||||
:triggerChange="false"/>
|
||||
</span>
|
||||
<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>
|
||||
</a-table>
|
||||
<div class="bootom-button">
|
||||
@@ -63,6 +67,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
dataSource: [
|
||||
{
|
||||
key: '1',
|
||||
zmcl:'',
|
||||
aspect: this.$t('upgradepacketprotectionmeasures'),
|
||||
safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'),
|
||||
relevantverification: 'havemeasures',
|
||||
@@ -71,6 +76,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
zmcl:'',
|
||||
aspect: this.$t('otaupgradedsecuritymeasuresforvehicles'),
|
||||
safetymeasure: this.$t('failsafmechanism'),
|
||||
relevantverification: 'havemeasures',
|
||||
@@ -80,6 +86,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
{
|
||||
key: '3',
|
||||
aspect: '',
|
||||
zmcl:'',
|
||||
safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'),
|
||||
relevantverification: 'havemeasures',
|
||||
certifyingmaterials:'',
|
||||
@@ -88,6 +95,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
{
|
||||
key: '4',
|
||||
aspect: '',
|
||||
zmcl:'',
|
||||
safetymeasure: this.$t('informationsecuritymechanism'),
|
||||
relevantverification: 'havemeasures',
|
||||
certifyingmaterials:'',
|
||||
@@ -160,7 +168,9 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
queryParam: {}
|
||||
type:'',
|
||||
queryParam: {},
|
||||
fileList: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -183,11 +193,29 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
this.dataSource[1].info =Number(res.result.fsxjz)
|
||||
this.dataSource[2].info= Number(res.result.sjsbcs)
|
||||
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){
|
||||
this.fileList = value
|
||||
console.log(this.fileList)
|
||||
@@ -197,20 +225,6 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
|
||||
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 => {
|
||||
@@ -244,6 +258,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
obj.fsxjz= this.dataSource[1].info
|
||||
obj.sjsbcs = this.dataSource[2].info
|
||||
obj.xxaqjz = this.dataSource[3].info
|
||||
obj.zmclList = this.fileList.uploadName
|
||||
postAction('/ota/otaBaCxAqcs/add',obj).then(res =>{
|
||||
console.log(res);
|
||||
})
|
||||
|
||||
@@ -221,6 +221,13 @@ export default {
|
||||
this.dataSource[7].relevantverification=Number(res.result.sjsbaq)
|
||||
this.dataSource[8].relevantverification=Number(res.result.sjgg)
|
||||
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()
|
||||
})
|
||||
|
||||
@@ -281,6 +288,7 @@ export default {
|
||||
obj.sjsbaq = this.dataSource[7].relevantverification
|
||||
obj.sjgg = this.dataSource[8].relevantverification
|
||||
obj.sjzt = this.dataSource[9].relevantverification
|
||||
obj.zmclList = this.fileList.uploadName
|
||||
postAction('/ota/otaBaCxZxsjyq/add', obj).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user