From dab59f7624a2fb8d4114bb67b554ff09d91f810c Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 10 四月 2025 13:07:36 +0800 Subject: [PATCH] Merge branch 'radio-frequency-cable' of http://114.132.189.42:9002/r/lims-ruoyi-before into radio-frequency-cable --- src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue | 30 ++++++++---------------------- 1 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue index 8dc8ee0..4a21f75 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, @@ -108,7 +106,7 @@ value: 0 }, { - label: '瀛e害妫�楠�', + label: '鍙潬鎬ф楠�', value: 1 }, ], @@ -154,16 +152,7 @@ // 涓嬭浇 handleDown(row) { downFile({ id: row.id, }).then(res => { - if (res.code === 200) { - let url = ''; - if (res.data.type == 1) { - url = this.javaApi + '/img/' + res.data.fileUrl - this.$download.saveAs(url, row.fileName); - } else { - url = this.javaApi + '/word/' + res.data.fileUrl - this.$download.saveAs(url, row.fileName); - } - } + this.$download.saveAs(res.data.fileUrl, row.fileName); }).catch(error => { }) @@ -173,6 +162,8 @@ if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); this.getFileList() + } else { + this.$message.error(response.msg); } }, beforeUpload(file) { @@ -204,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