From 3114bfec4e2278bdd394eb9e74dd9506f42232b2 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 05 十一月 2026 16:11:27 +0800
Subject: [PATCH] 1. 完成项目管理全流程优化,补充阶段推进、汇报统计及生命周期记录。 2. 完成业务与项目数据关联,支持查看项目进度、详情及相关附件。 3. 完成采购审批流程接入,支持配置审批人员及采购业务审批。 4. 精简用户、角色、部门、菜单和字典,完善操作日志及附件下载。
---
src/components/FileUpload/index.vue | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue
index 242b485..229cd7c 100644
--- a/src/components/FileUpload/index.vue
+++ b/src/components/FileUpload/index.vue
@@ -20,11 +20,10 @@
<!-- 鏂囦欢鍒楄〃 -->
<transition-group ref="uploadListRef" class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
- <el-link :href="getFileUrl(file.url)" :underline="false" target="_blank">
- <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
- </el-link>
- <div class="ele-upload-list__item-content-action">
- <el-link :underline="false" @click="handleDelete(index)" type="danger" v-if="!disabled"> 鍒犻櫎</el-link>
+ <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
+ <div class="ele-upload-list__item-content-action">
+ <el-link :underline="false" @click="downloadFile(file)" type="primary"> 涓嬭浇</el-link>
+ <el-link :underline="false" @click="handleDelete(index)" type="danger" v-if="!disabled"> 鍒犻櫎</el-link>
</div>
</li>
</transition-group>
@@ -87,9 +86,18 @@
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + props.action); // 涓婁紶鏂囦欢鏈嶅姟鍣ㄥ湴鍧�
const headers = ref({ Authorization: "Bearer " + getToken() });
const fileList = ref([]);
-const showTip = computed(
+const showTip = computed(
() => props.isShowTip && (props.fileType || props.fileSize)
-);
+);
+
+const downloadFile = file => {
+ const url = file?.url || "";
+ if (!url) {
+ proxy.$modal.msgWarning("鏂囦欢鍦板潃鏃犳晥");
+ return;
+ }
+ proxy.$download.resource(url);
+};
watch(
() => props.modelValue,
--
Gitblit v1.9.3