From 99fe3d6ca9c9085e1fd8075552a2f48cb90ab29f Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期五, 28 八月 2026 23:18:24 +0800
Subject: [PATCH] 1. 删除知识库详情的时分秒
---
src/views/collaborativeApproval/knowledgeBase/index.vue | 43 +++++++++++++++++++++++++++++++------------
1 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index 0c31e24..f79944c 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>
@@ -282,21 +282,21 @@
<el-table :data="fileList" style="margin-top: 20px" border>
<el-table-column prop="fileName" label="鏂囦欢鍚�" show-overflow-tooltip />
<el-table-column prop="fileType" label="鏂囦欢绫诲瀷" width="100" />
- <el-table-column label="鍚戦噺鍖栫姸鎬�" width="120">
- <template #default="{ row }">
- <el-tag :type="getStatusType(row.vectorStatus)">
- {{ getStatusText(row.vectorStatus) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column prop="chunkCount" label="鍒囩墖鏁�" width="100" align="center" />
+<!-- <el-table-column label="鍚戦噺鍖栫姸鎬�" width="120">-->
+<!-- <template #default="{ row }">-->
+<!-- <el-tag :type="getStatusType(row.vectorStatus)">-->
+<!-- {{ getStatusText(row.vectorStatus) }}-->
+<!-- </el-tag>-->
+<!-- </template>-->
+<!-- </el-table-column>-->
+<!-- <el-table-column prop="chunkCount" label="鍒囩墖鏁�" width="100" align="center" />-->
<el-table-column label="閿欒淇℃伅" width="200" show-overflow-tooltip>
<template #default="{ row }">
<span v-if="row.vectorError" style="color: #f56c6c">{{ row.vectorError }}</span>
<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