From b7a7bf193023fffc56cfc544348ba251047aa5f3 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 22 Jul 2024 13:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=99=84=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/scrapManage/scrap/disposition/index.vue | 13 +++++++++++++ .../newPurchase/component/fileView.vue | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sgzb-ui/src/views/scrapManage/scrap/disposition/index.vue b/sgzb-ui/src/views/scrapManage/scrap/disposition/index.vue index fabc08ce..560ebb18 100644 --- a/sgzb-ui/src/views/scrapManage/scrap/disposition/index.vue +++ b/sgzb-ui/src/views/scrapManage/scrap/disposition/index.vue @@ -124,6 +124,14 @@ 查看 + 查看 @@ -345,6 +353,11 @@ export default { ) console.log('数据导出', data) }, + fileTypeJudge(url) { + const file = url.split('.')[1] + const docList = ['doc', 'docx', 'xls', 'xlsx'] + return docList.some((e) => e === file) + }, }, } diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/component/fileView.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/component/fileView.vue index cfe74740..7e4e45af 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/component/fileView.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/component/fileView.vue @@ -9,8 +9,16 @@ :href="`${filePreviewUrl}${row.url}`" target="_blank" :download="row.name" + v-if="fileTypeJudge(row.name)" >查看 + + 查看 + @@ -53,6 +61,13 @@ export default { return tableList || [] }, }, + methods: { + fileTypeJudge(url) { + const file = url.split('.')[1] + const docList = ['doc', 'docx'] + return docList.some((e) => e === file) + }, + }, }