From e1b04baf60478e3de9e41e1fc39e1e4346321817 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期五, 29 八月 2025 13:27:31 +0800
Subject: [PATCH] '一些改动'

---
 src/views/system/dept/detail.vue |   43 ++++++-------------------------------------
 1 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/src/views/system/dept/detail.vue b/src/views/system/dept/detail.vue
index ddb1e97..8046cce 100644
--- a/src/views/system/dept/detail.vue
+++ b/src/views/system/dept/detail.vue
@@ -22,48 +22,16 @@
 });
 import EditPen from "~icons/ep/edit-pen";
 import IconParkSolidBack from "~icons/icon-park-solid/back";
+import { message } from "@/utils/message";
 
 const { openDialog } = useDept(ref({}));
-const { openUploadDialog, state, changeDialog } = useDetail();
+const { openUploadDialog, state, changeDialog, getDetailList } = useDetail();
 defineOptions({
   name: "itemdetail"
 });
-const convertFujianToObjects = (fujianStr, fujianNameStr) => {
-  // 鍒嗗壊瀛楃涓蹭负鏁扮粍骞惰繃婊ょ┖鍊�
-  const srcArray = fujianStr.split(",").filter(Boolean);
-  const nameArray = fujianNameStr.split(",").filter(Boolean);
 
-  // 鎻愬彇鏂囦欢鍚庣紑浣滀负valu
-  const getFileExtension = fileName => {
-    const lastDotIndex = fileName.lastIndexOf(".");
-    // 濡傛灉娌℃湁鍚庣紑鎴栨枃浠跺悕浠ョ偣缁撳熬锛岃繑鍥炵┖瀛楃涓�
-    if (lastDotIndex === -1 || lastDotIndex === fileName.length - 1) {
-      return "";
-    }
-    return fileName.slice(lastDotIndex + 1).toLowerCase();
-  };
-
-  // 鏄犲皠涓虹洰鏍囧璞℃暟缁�
-  return srcArray.map((src, index) => {
-    // 纭繚鍚嶇О鏁扮粍鏈夊搴旂储寮曠殑鍏冪礌
-    const name = nameArray[index]?.trim() || `鏈煡鏂囦欢${index + 1}`;
-
-    return {
-      name: name,
-      filePath: src.trim(),
-      fileType: getFileExtension(name)
-    };
-  });
-};
 onMounted(async () => {
-  let res = await getTenderOrderDetail({ id: props.nowID });
-  state.nowInfo = res.result;
-  if (state.nowInfo.fujian) {
-    state.nowInfo.fujianList = convertFujianToObjects(
-      state.nowInfo.fujian,
-      state.nowInfo.fujianName
-    );
-  }
+  getDetailList(props.nowID);
 });
 const backListPage = () => {
   emit("backListPage");
@@ -94,6 +62,7 @@
       break;
     default:
       window.location.href = pdfUrl.filePath;
+      message("姝e湪涓嬭浇锛�");
       break;
   }
 };
@@ -217,8 +186,8 @@
                         class="flex items-center cursor-pointer"
                         @click="
                           previewPdf({
-                            name: state.nowInfo.zhaobiaowenjian,
-                            filePath: state.nowInfo.zhaobiaowenjianName,
+                            name: state.nowInfo.zhaobiaowenjianName,
+                            filePath: state.nowInfo.zhaobiaowenjian,
                             fileType: 'pdf'
                           })
                         "

--
Gitblit v1.9.1