认证清单-添加 上传文件后查看,上传的文件不回显
This commit is contained in:
+10
-3
@@ -179,7 +179,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="deliverableTemplate">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('deliverableTemplate',index)">
|
||||
@click="clickButtonToUpload('deliverableTemplate',index,true)">
|
||||
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
|
||||
||
|
||||
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
@@ -719,12 +719,19 @@
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
clickButtonToUpload(item, index) {
|
||||
clickButtonToUpload(item, index,isTrue) {
|
||||
this.numIndex = index
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
let ids = ''
|
||||
console.log(index)
|
||||
if (isTrue){
|
||||
ids = this.formInline.dataList[index][item]
|
||||
}else{
|
||||
ids = this.formInline[item]
|
||||
}
|
||||
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="$t('edit')"
|
||||
:maskClosable="false"
|
||||
@@ -18,12 +19,10 @@
|
||||
<span class="title-text-text" :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="serialNumber">
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.serialNumber"
|
||||
:disabled="true"
|
||||
<a-input @click.native="serialNumberClick"
|
||||
class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"/>
|
||||
v-model="formInline.serialNumber"></a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -135,14 +134,20 @@
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<codeNumber ref="codeNumber" @regulation="regulation" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import codeNumber from './codeNumber'
|
||||
|
||||
export default {
|
||||
name:'editModel',
|
||||
props: ['url'],
|
||||
components:{
|
||||
codeNumber
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -215,6 +220,9 @@ export default {
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
serialNumberClick(){
|
||||
this.$refs.codeNumber.add()
|
||||
},
|
||||
editModel(item) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -261,6 +269,14 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
regulation(item,data) {
|
||||
this.formInline.serialNumber = item
|
||||
this.formInline.bussDocumentLibraryId = data
|
||||
this.$nextTick(()=>{
|
||||
this.formInline = {... this.formInline}
|
||||
this.$refs.ruleForm.validateField(['serialNumber'])
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user