修改文档详情的查看文件时的标准分解单

This commit is contained in:
qq787203167
2022-04-15 18:13:48 +08:00
parent 1b47e3e339
commit 901b58a37c
5 changed files with 290 additions and 133 deletions
@@ -222,6 +222,35 @@
</span>
</a-table>
</a-modal>
<a-modal
:title="'查看文件'"
:width="600"
:visible="visibleFile"
:maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
>
<a-table
class="table"
:columns="columnsFile"
:pagination="false"
:scroll="{x:500,y: 400}"
:data-source="dataSourceFile"
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)">
{{$t('See')}}
</a>
<a class="text" @click="download(record)">
{{$t('download')}}
</a>
<a class="text" @click="breakdown(record)">
{{$t('StandardBreakdown')}}
</a>
</span>
</a-table>
</a-modal>
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
</div>
</template>
@@ -241,15 +270,31 @@
getInfo: 'document/bussDocumentLibraryEO/getInfoById',
list: 'log/bussLogEO/page'
},
visibleFile: false,
columnsRelated: [
{
title: '标准名称',
title: this.$t('standardName'),
dataIndex: 'title',
align: 'center',
ellipsis: true,
scopedSlots: { customRender: 'operation' }
}
],
columnsFile: [
{
title: this.$t('fileName'),
dataIndex: 'fileName',
align: 'center',
width: 260,
ellipsis: true
},
{
title: this.$t('operation'),
align: 'center',
width: 130,
scopedSlots: { customRender: 'fileOperation' }
}
],
dataSourceRelated: [],
detailList: [],
visible: false,
@@ -261,6 +306,7 @@
pageSize: 10,
total: 0,
visibleRelated: false,
dataSourceFile: [],
columns: [
{
title: this.$t('ModificationContent'),
@@ -300,13 +346,15 @@
})
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.loading = true
this.visibleFile = true
getAction('sys/common/getFileInfos', { id: item.join(',') }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
this.dataSourceFile = res.result
this.loading = false
} else {
this.$refs.uploadFile.perentHandleFunc()
this.dataSourceFile = []
this.loading = false
}
})
},