From f78fae4c3fdc85f2a16530ff054204eefcbbb00d Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 25 八月 2026 18:53:10 +0800
Subject: [PATCH] Merge branch 'dev_天津_建诚恒商贸' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津_建诚恒商贸

---
 src/views/collaborativeApproval/knowledgeBase/index.vue |  109 ++++++++++++++++++++++++++++++++----------------------
 1 files changed, 64 insertions(+), 45 deletions(-)

diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index 0c31e24..7cd9cb3 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -127,11 +127,11 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="浣跨敤娆℃暟" prop="usageCount">
-              <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" />
-            </el-form-item>
-          </el-col>
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="浣跨敤娆℃暟" prop="usageCount">-->
+<!--              <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
         </el-row>
       </el-form>
     </FormDialog>
@@ -163,14 +163,14 @@
               {{ getEfficiencyLabel(currentKnowledge.efficiency) }}
             </el-tag>
           </el-descriptions-item>
-          <el-descriptions-item label="浣跨敤娆℃暟">
-            <el-tag type="info">{{ currentKnowledge.usageCount }} 娆�</el-tag>
-          </el-descriptions-item>
+<!--          <el-descriptions-item label="浣跨敤娆℃暟">-->
+<!--            <el-tag type="info">{{ currentKnowledge.usageCount }} 娆�</el-tag>-->
+<!--          </el-descriptions-item>-->
           <el-descriptions-item label="鍒涘缓浜�">
             {{ currentKnowledge.creator }}
           </el-descriptions-item>
           <el-descriptions-item label="鍒涘缓鏃堕棿">
-            {{ currentKnowledge.createTime }}
+            {{dayjs(currentKnowledge.createTime).format("YYYY-MM-DD")}}
           </el-descriptions-item>
         </el-descriptions>
 
@@ -202,19 +202,19 @@
           <h4>浣跨敤缁熻</h4>
           <div class="usage-stats">
             <el-row :gutter="20">
-              <el-col :span="8">
-                <div class="stat-item">
-                  <div class="stat-number">{{ currentKnowledge.usageCount }}</div>
-                  <div class="stat-label">浣跨敤娆℃暟</div>
-                </div>
-              </el-col>
-              <el-col :span="8">
+<!--              <el-col :span="8">-->
+<!--                <div class="stat-item">-->
+<!--                  <div class="stat-number">{{ currentKnowledge.usageCount }}</div>-->
+<!--                  <div class="stat-label">浣跨敤娆℃暟</div>-->
+<!--                </div>-->
+<!--              </el-col>-->
+              <el-col :span="12">
                 <div class="stat-item">
                   <div class="stat-number">{{ getEfficiencyScore(currentKnowledge.efficiency) }}%</div>
                   <div class="stat-label">鏁堢巼鎻愬崌</div>
                 </div>
               </el-col>
-              <el-col :span="8">
+              <el-col :span="12">
                 <div class="stat-item">
                   <div class="stat-number">{{ getTimeSaved(currentKnowledge.efficiency) }}</div>
                   <div class="stat-label">骞冲潎鑺傜渷鏃堕棿</div>
@@ -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 = {
@@ -528,24 +533,24 @@
       return typeMap[params] || "info";
     }
   },
-  {
-    label: "鏂囦欢鏁伴噺",
-    prop: "fileCount",
-    width: 100,
-    align: "center"
-  },
-  {
-    label: "鍒囩墖鏁伴噺",
-    prop: "totalChunkCount",
-    width: 100,
-    align: "center"
-  },
-  {
-    label: "浣跨敤娆℃暟",
-    prop: "usageCount",
-    width: 100,
-    align: "center"
-  },
+  // {
+  //   label: "鏂囦欢鏁伴噺",
+  //   prop: "fileCount",
+  //   width: 100,
+  //   align: "center"
+  // },
+  // {
+  //   label: "鍒囩墖鏁伴噺",
+  //   prop: "totalChunkCount",
+  //   width: 100,
+  //   align: "center"
+  // },
+  // {
+  //   label: "浣跨敤娆℃暟",
+  //   prop: "usageCount",
+  //   width: 100,
+  //   align: "center"
+  // },
   {
     label: "鍒涘缓浜�",
     prop: "creator",
@@ -555,6 +560,7 @@
     label: "鍒涘缓鏃堕棿",
     prop: "createTime",
     width: 180,
+    dataType:"date"
   },
   {
     dataType: "action",
@@ -577,13 +583,13 @@
           openFilesDialog(row);
         }
       },
-      {
-        name: "闂瓟",
-        type: "text",
-        clickFun: (row) => {
-          openChatDialog(row);
-        }
-      },
+      // {
+      //   name: "闂瓟",
+      //   type: "text",
+      //   clickFun: (row) => {
+      //     openChatDialog(row);
+      //   }
+      // },
       {
         name: "璇︽儏",
         type: "text",
@@ -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