From 8fb97c73864b8094651fe4408918abfd665fdb66 Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期二, 25 八月 2026 03:16:54 +0800
Subject: [PATCH] 1. 删除知识库详情的时分秒

---
 src/views/collaborativeApproval/knowledgeBase/index.vue |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index 0c31e24..47bd417 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -170,7 +170,7 @@
             {{ currentKnowledge.creator }}
           </el-descriptions-item>
           <el-descriptions-item label="鍒涘缓鏃堕棿">
-            {{ currentKnowledge.createTime }}
+            {{dayjs(currentKnowledge.createTime).format("YYYY-MM-DD")}}
           </el-descriptions-item>
         </el-descriptions>
 
@@ -296,7 +296,7 @@
               <span v-else style="color: #909399">-</span>
             </template>
           </el-table-column>
-          <el-table-column prop="createTime" label="涓婁紶鏃堕棿" width="180" />
+          <el-table-column prop="createTime" label="涓婁紶鏃堕棿" width="120" :formatter="formatDate" />
           <el-table-column label="鎿嶄綔" width="150" align="center">
             <template #default="{ row }">
               <el-button
@@ -386,6 +386,11 @@
 import useUserStore from '@/store/modules/user';
 import { userListNoPageByTenantId } from '@/api/system/user.js';
 import { getToken } from "@/utils/auth";
+import dayjs from "dayjs";
+import { parseDate } from "@/utils/ruoyi";
+
+// 鏃ユ湡鍥炴樉鏍煎紡鍖栵紙YYYY-MM-DD锛�
+const formatDate = (row, column, cellValue) => parseDate(cellValue) || '-';
 
 // 琛ㄥ崟楠岃瘉瑙勫垯
 const rules = {
@@ -555,6 +560,7 @@
     label: "鍒涘缓鏃堕棿",
     prop: "createTime",
     width: 180,
+    dataType:"date"
   },
   {
     dataType: "action",
@@ -1142,11 +1148,24 @@
 
 // ============ 鐭ヨ瘑搴撻棶绛旂浉鍏� ============
 
+// 鐢熸垚UUID鐨刦allback鏂规
+const generateUUID = () => {
+  if (typeof crypto !== 'undefined' && crypto.randomUUID) {
+    return crypto.randomUUID();
+  }
+  // fallback: 鍏煎涓嶆敮鎸� crypto.randomUUID 鐨勭幆澧�
+  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+    const r = Math.random() * 16 | 0;
+    const v = c === 'x' ? r : (r & 0x3 | 0x8);
+    return v.toString(16);
+  });
+};
+
 // 鎵撳紑闂瓟寮圭獥
 const openChatDialog = (row) => {
   currentKnowledgeBase.value = row;
   chatDialogVisible.value = true;
-  memoryId.value = crypto.randomUUID();
+  memoryId.value = generateUUID();
   messages.value = [];
   inputQuestion.value = "";
 };
@@ -1240,7 +1259,7 @@
     }
   ).then(() => {
     messages.value = [];
-    memoryId.value = crypto.randomUUID(); // 閲嶆柊鐢熸垚浼氳瘽ID
+    memoryId.value = generateUUID(); // 閲嶆柊鐢熸垚浼氳瘽ID
     ElMessage.success("瀵硅瘽宸叉竻绌�");
   }).catch(() => {
     // 鐢ㄦ埛鍙栨秷

--
Gitblit v1.9.3