From cd8f12dd244a5e52901b334b9ce5439f241598cd Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 十一月 2026 15:04:53 +0800
Subject: [PATCH] refactor(app): 移除页面附件上传功能
---
src/pages/srm/tender/form.vue | 42 ------------------------------------------
1 files changed, 0 insertions(+), 42 deletions(-)
diff --git a/src/pages/srm/tender/form.vue b/src/pages/srm/tender/form.vue
index 2ae0c6d..4f1e868 100644
--- a/src/pages/srm/tender/form.vue
+++ b/src/pages/srm/tender/form.vue
@@ -6,8 +6,6 @@
getTenderProject,
updateTenderProject,
updateTenderProjectInfo,
- uploadTenderFile,
- type StorageAttachment,
type TenderProject,
} from "../../../api/srm";
import { useAuth } from "../../../stores/auth";
@@ -43,40 +41,6 @@
}
const partialEditable = () =>
Boolean(id.value && [1, 2].includes(form.tenderStatus || 0));
- async function chooseAttachment() {
- if (!state.accessToken) return;
- uni.chooseFile({
- count: 1,
- extension: ["jpg", "jpeg", "png", "pdf", "doc", "docx"],
- success: async result => {
- const file = result.tempFiles?.[0];
- if (!file?.path) return;
- try {
- const attachment = await uploadTenderFile(
- state.accessToken!,
- file.path
- );
- form.blobIds = [...(form.blobIds || []), attachment.id];
- form.attachmentList = [...(form.attachmentList || []), attachment];
- uni.showToast({ title: "涓婁紶鎴愬姛", icon: "success" });
- } catch (error) {
- uni.showToast({
- title: error instanceof Error ? error.message : "涓婁紶澶辫触",
- icon: "none",
- });
- }
- },
- });
- }
- function removeAttachment(index: number) {
- form.blobIds?.splice(index, 1);
- form.attachmentList?.splice(index, 1);
- }
- function previewAttachment(item: StorageAttachment) {
- const url = item.previewURL || item.url;
- if (url) uni.previewImage({ urls: [url] });
- else uni.showToast({ title: "闄勪欢鍦板潃涓嶅彲鐢�", icon: "none" });
- }
async function save() {
if (!form.tenderNo.trim() || !form.tenderName.trim())
return uni.showToast({ title: "璇峰~鍐欐嫑鏍囩紪鍙峰拰鍚嶇О", icon: "none" });
@@ -200,12 +164,6 @@
</template>
<view class="field column"><text>璧勮川瑕佹眰</text><textarea v-model="form.qualificationRequirements"
placeholder="璇疯緭鍏ヨ祫璐ㄨ姹�" ></textarea></view>
- <view class="attachments">
- <view class="attachmentHead"><text>璧勮川瑕佹眰闄勪欢</text><text @click="chooseAttachment">涓婁紶闄勪欢</text></view>
- <view v-for="(item,index) in form.attachmentList"
- :key="item.id"
- class="attachment"><text @click="previewAttachment(item)">{{item.name||`闄勪欢${index+1}`}}</text><text @click="removeAttachment(index)">鍒犻櫎</text></view>
- </view>
</view>
<button class="save"
:loading="saving"
--
Gitblit v1.9.3