From cc281717bbe49a2429a31d0fb10f6adac6d5f773 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 三月 2025 16:39:05 +0800
Subject: [PATCH] 导出方法修改
---
src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
index 5946df7..1bea84b 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentAcceptance.vue
@@ -63,7 +63,7 @@
pageDeviceAcceptance,
getDeviceAcceptanceFileList,
delDeviceAcceptanceFileList,
- exportUseRecord,
+ exportDeviceAcceptance,
delDeviceAcceptance,
} from '@/api/cnas/resourceDemand/device.js'
export default {
@@ -177,7 +177,6 @@
this.tableLoading = true
getDeviceAcceptanceFileList({ acceptanceId: this.acceptanceId }).then(res => {
this.tableLoading = false
- if (res.code === 201) return
this.tableData = res.data
}).catch(err => {
this.tableLoading = false
@@ -197,17 +196,7 @@
},
// 涓嬭浇
upload(row) {
- let url = '';
- if (row.type == 1) {
- url = this.javaApi + '/img/' + row.fileUrl
- file.downloadIamge(url, row.fileName)
- } else {
- url = this.javaApi + '/word/' + row.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
- }
+ this.$download.saveAs(row.fileUrl, row.fileName)
},
// 鍒犻櫎
delete(row) {
@@ -219,7 +208,6 @@
this.tableLoading = true
delDeviceAcceptanceFileList({ acceptanceFileId: row.acceptanceFileId }).then(res => {
this.tableLoading = false
- if (res.code === 201) return
this.$message.success('鍒犻櫎鎴愬姛')
this.searchTableList()
}).catch(err => {
@@ -272,11 +260,10 @@
// 瀵煎嚭
handleDownOne(id) {
this.outLoading = true
- exportUseRecord({ acceptanceId: id }).then(res => {
+ exportDeviceAcceptance({ acceptanceId: id }).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '璁惧楠屾敹.doc')
- this.$message.success('瀵煎嚭鎴愬姛')
})
},
// 鍒犻櫎
--
Gitblit v1.9.3