From 51e5f620708fe900b4278222824d0155aea528f7 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 十一月 2026 14:59:33 +0800
Subject: [PATCH] refactor(app): 移除页面附件上传功能
---
src/pages/bpm/process-instance/detail.vue | 51 ---------------------------------------------------
1 files changed, 0 insertions(+), 51 deletions(-)
diff --git a/src/pages/bpm/process-instance/detail.vue b/src/pages/bpm/process-instance/detail.vue
index 8497eed..316e96c 100644
--- a/src/pages/bpm/process-instance/detail.vue
+++ b/src/pages/bpm/process-instance/detail.vue
@@ -4,7 +4,6 @@
import { getSimpleDictDataList, type DictData } from "../../../api/crm";
import {
approveTask,
- chooseBpmFile,
copyTask,
delegateTask,
getApprovalDetail,
@@ -17,7 +16,6 @@
signCreateTask,
signDeleteTask,
transferTask,
- uploadBpmFile,
type BpmApprovalDetail,
type BpmApprovalNode,
type BpmDept,
@@ -550,43 +548,6 @@
});
}
- /* ---------- 闄勪欢涓婁紶 ---------- */
-
- const uploading = ref(false);
-
- async function chooseAttachment() {
- if (!state.accessToken || uploading.value) return;
- let files: Array<{ path: string; name?: string }> = [];
- try {
- files = await chooseBpmFile(9);
- } catch (error) {
- const msg = error instanceof Error ? error.message : "";
- if (msg && !/cancel/i.test(msg)) toast(msg);
- return;
- }
- if (!files.length) return;
- uploading.value = true;
- uni.showLoading({ title: "涓婁紶涓��", mask: true });
- try {
- for (const file of files) {
- const saved = await uploadBpmFile(state.accessToken, file.path);
- if (saved.url) operationAttachments.value = [...operationAttachments.value, saved.url];
- }
- toast("涓婁紶鎴愬姛");
- } catch (error) {
- toast(error instanceof Error ? error.message : "涓婁紶澶辫触");
- } finally {
- uploading.value = false;
- uni.hideLoading();
- }
- }
-
- const operationAttachments = ref<string[]>([]);
-
- function removeAttachment(index: number) {
- operationAttachments.value = operationAttachments.value.filter((_, i) => i !== index);
- }
-
onLoad(async query => {
processInstanceId.value = query?.id ? String(query.id) : "";
taskId.value = query?.taskId ? String(query.taskId) : "";
@@ -811,18 +772,6 @@
class="modal-textarea"
placeholder="璇疯緭鍏ュ鎵规剰瑙�"
/>
- </view>
-
- <!-- 闄勪欢 -->
- <view class="modal-field">
- <text class="modal-label">闄勪欢</text>
- <view class="attach-list">
- <view v-for="(url, index) in operationAttachments" :key="url" class="attach-item">
- <text class="attach-name">闄勪欢 {{ index + 1 }}</text>
- <text class="attach-remove" @click="removeAttachment(index)">鍒犻櫎</text>
- </view>
- </view>
- <button class="attach-btn" :loading="uploading" @click="chooseAttachment">娣诲姞闄勪欢</button>
</view>
<view class="modal-actions">
--
Gitblit v1.9.3