From 8ccadce62956850bbbd2a4e7202c4f8cb1caa0a4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 三月 2025 11:16:28 +0800
Subject: [PATCH] 设备档案修改
---
src/views/CNAS/resourceDemand/device/component/files.vue | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/files.vue b/src/views/CNAS/resourceDemand/device/component/files.vue
index bb72b97..785a8f7 100644
--- a/src/views/CNAS/resourceDemand/device/component/files.vue
+++ b/src/views/CNAS/resourceDemand/device/component/files.vue
@@ -175,7 +175,7 @@
<el-table-column fixed="right" label="鎿嶄綔" min-width="180">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleAttachmentClick(scope.row)">涓嬭浇闄勪欢</el-button>
- <el-button type="text" size="small" @click="handleViewClick(scope.row)">鏌ョ湅</el-button>
+ <el-button type="text" size="small" @click="handleViewClick(scope.row)">缂栬緫</el-button>
<el-button type="text" size="small" @click="handleDeleteClick(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -341,7 +341,7 @@
</el-row>
</span>
</el-dialog>
- <el-dialog title="娣诲姞璁惧闄勪欢" top="5vh" v-if="dialogVisible1" :visible.sync="dialogVisible1" width="40%">
+ <el-dialog title="璁惧闄勪欢" top="5vh" v-if="dialogVisible1" :visible.sync="dialogVisible1" width="40%">
<el-form ref="form" :model="addFile" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -618,18 +618,7 @@
handleAttachmentClick(row) {
console.log(row)
if (row.fileName) {
- let state = /\.(jpg|jpeg|png|gif)$/i.test(row.fileName)
- if (state) {
- let url = this.javaApi + '/img/' + row.fileName;
- fileDownload.downloadIamge(url, row.fileName)
- } else {
- const url = this.javaApi + '/word/' + row.fileName
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
- this.$message.success('涓嬭浇鎴愬姛')
- }
+ this.$download.downloadFileFromUrl(row.fileName)
} else {
this.$message.warning('鏈笂浼犳枃浠讹紒')
}
--
Gitblit v1.9.3