From c19b65a66350ac7f3f1dde2d94cb16efdcddc41f Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期六, 22 八月 2026 17:18:08 +0800
Subject: [PATCH] refactor(collaborativeApproval): 统一日期格式化展示
---
src/views/collaborativeApproval/rulesRegulationsManagement/index.vue | 6 +++++-
src/views/collaborativeApproval/knowledgeBase/index.vue | 6 +++++-
src/views/collaborativeApproval/sealManagement/index.vue | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index 05a1d1c..b0c50fb 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -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,10 @@
import useUserStore from '@/store/modules/user';
import { userListNoPageByTenantId } from '@/api/system/user.js';
import { getToken } from "@/utils/auth";
+import { parseDate } from "@/utils/ruoyi";
+
+// 鏃ユ湡鍥炴樉鏍煎紡鍖栵紙YYYY-MM-DD锛�
+const formatDate = (row, column, cellValue) => parseDate(cellValue) || '-';
// 琛ㄥ崟楠岃瘉瑙勫垯
const rules = {
diff --git a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
index 128b7ed..0d03b33 100644
--- a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
+++ b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
@@ -144,7 +144,7 @@
<el-descriptions-item label="鍒嗙被">{{ getCategoryText(currentRegulationDetail.category) }}</el-descriptions-item>
<el-descriptions-item label="鐗堟湰">{{ currentRegulationDetail.version }}</el-descriptions-item>
<el-descriptions-item label="鍙戝竷浜�">{{ currentRegulationDetail.createUserName }}</el-descriptions-item>
- <el-descriptions-item label="鍙戝竷鏃堕棿">{{ currentRegulationDetail.createTime }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戝竷鏃堕棿">{{ formatDate(currentRegulationDetail.createTime) }}</el-descriptions-item>
</el-descriptions>
<div class="mt-20">
<h4>鍒跺害鍐呭</h4>
@@ -235,6 +235,10 @@
addRuleFile,
} from "@/api/collaborativeApproval/rulesRegulationsManagementFile.js";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
+ import { parseDate } from "@/utils/ruoyi";
+
+ // 鏃ユ湡鍥炴樉鏍煎紡鍖栵紙YYYY-MM-DD锛�
+ const formatDate = value => parseDate(value) || "-";
// 鍝嶅簲寮忔暟鎹�
const operationType = ref("add");
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 7be9ef9..5ebe27c 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -118,7 +118,7 @@
<el-descriptions-item label="鐢宠浜�">{{ currentSealDetail.createUserName }}</el-descriptions-item>
<el-descriptions-item label="鎵�灞為儴闂�">{{ currentSealDetail.department }}</el-descriptions-item>
<el-descriptions-item label="鐢ㄥ嵃绫诲瀷">{{ getSealTypeText(currentSealDetail.sealType) }}</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿">{{ currentSealDetail.createTime }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿">{{ formatDate(currentSealDetail.createTime) }}</el-descriptions-item>
<el-descriptions-item label="鐘舵��">
<el-tag :type="getStatusType(currentSealDetail.status)">
{{ getStatusText(currentSealDetail.status) }}
@@ -163,6 +163,10 @@
import AttachmentUploadFile from '@/components/AttachmentUpload/file/index.vue'
import FilePreview from '@/components/filePreview/index.vue'
import download from '@/plugins/download.js'
+import { parseDate } from '@/utils/ruoyi'
+
+// 鏃ユ湡鍥炴樉鏍煎紡鍖栵紙YYYY-MM-DD锛�
+const formatDate = value => parseDate(value) || '-'
// 鍝嶅簲寮忔暟鎹�
// 鐢ㄥ嵃鐢宠鐩稿叧
--
Gitblit v1.9.3