From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期二, 29 四月 2025 13:25:29 +0800 Subject: [PATCH] Merge branch 'dev' into dev_tides --- src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue index ef642c2..bfbebb4 100644 --- a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue +++ b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue @@ -23,14 +23,12 @@ </template> <script> -import ValueTable from "@/components/Table/value-table.vue"; -import file from "@/utils/file"; import limsTable from "@/components/Table/lims-table.vue"; -import { delfile, downFile, getFileList } from "@/api/business/rawMaterialOrder"; +import { delFile, downFile, getFileList } from "@/api/business/rawMaterialOrder"; export default { name: "filesLookVisible", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: { limsTable, ValueTable }, + components: { limsTable }, props: { filesDialogVisible: { type: Boolean, @@ -154,7 +152,7 @@ // 涓嬭浇 handleDown(row) { downFile({ id: row.id, }).then(res => { - this.$download.downloadFileFromUrl(res.data.fileUrl, row.fileName); + this.$download.saveAs(res.data.fileUrl, row.fileName); }).catch(error => { }) @@ -164,6 +162,8 @@ if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); this.getFileList() + } else { + this.$message.error(response.msg); } }, beforeUpload(file) { @@ -195,14 +195,9 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - delfile({ id: row.id }).then(res => { - if (res.code === 500) { - return - } + delFile({ id: row.id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛') - this.getList() - }).catch(e => { - this.$message.error('鍒犻櫎澶辫触') + this.getFileList() }) }).catch(() => { }) } -- Gitblit v1.9.3