From 707512d5519e701ddcaf0912a768929998e22e58 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 28 十月 2026 15:27:23 +0800
Subject: [PATCH] fix(date): 页面展示的时间统一只到年月日
---
src/views/collaborativeApproval/notificationManagement/summary/index.vue | 8
src/views/energyManagement/energyCockpit/index.vue | 4
src/views/index.vue | 6
src/views/collaborativeApproval/rulesRegulationsManagement/index.vue | 2
src/views/personnelManagement/attendanceCheckin/index.vue | 2
src/views/officeProcessAutomation/ReimburseManage/shared/finReimbursementMappers.js | 6
src/views/energyManagement/meterCollection/index.vue | 2
src/views/procurementManagement/thePaymentLedger/index.vue | 3
src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue | 10
src/views/fileManagement/document/attachmentManager.vue | 2
src/views/reportAnalysis/safetyDashboard/components/center-top.vue | 2
src/views/collaborativeApproval/sealManagement/index.vue | 2
src/views/productionManagement/workOrderManagement/index.vue | 8
src/views/equipmentManagement/gasTank/simple.vue | 2
src/views/basicData/customerFile/index.vue | 2
src/views/collaborativeApproval/planTemplate/index.vue | 6
src/views/monitor/job/log.vue | 2
src/views/qualityManagement/visualization/qualityDashboard.vue | 2
src/views/equipmentManagement/ledger/index.vue | 2
src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/components/DetailPanel.vue | 4
src/views/equipmentManagement/upkeep/index.vue | 6
src/views/salesManagement/deliveryLedger/index.vue | 4
src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue | 4
src/views/equipmentManagement/operationManagement/index.vue | 6
src/views/personnelManagement/employeeRecord/index.vue | 2
src/views/aiIndustrialBrain/index.vue | 2
src/views/salesManagement/strategyControl/index.vue | 2
src/views/system/user/profile/index.vue | 2
src/views/productionManagement/safetyMonitoring/index.vue | 4
src/views/productionPlan/productionPlan/components/PIMTable.vue | 11 +
src/views/safeProduction/safeWorkApproval/components/approvalDia.vue | 8
src/views/salesManagement/salesQuotation/index.vue | 4
src/views/energyManagement/gasManagement/index.vue | 2
src/layout/components/NotificationCenter/index.vue | 4
src/main.js | 19 ++
src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue | 4
src/views/monitorManagement/videoMonitor/index.vue | 2
src/utils/index.js | 18 --
src/views/collaborativeApproval/officeSupplies/index.vue | 6
src/views/collaborativeApproval/notificationManagement/meetDraft/index.vue | 2
src/views/reportAnalysis/dataDashboard/index0.vue | 2
src/views/collaborativeApproval/noticeManagement/index.vue | 2
src/views/productionManagement/workOrder/index.vue | 8
src/views/system/appVersion/index.vue | 4
src/views/reportAnalysis/qualityAnalysis/components/center-center.vue | 2
src/utils/ruoyi.js | 3
src/views/salesManagement/returnOrder/components/detailDia.vue | 2
src/views/safeProduction/emergencyPlanReview/index.vue | 2
src/views/salesManagement/salesLedger/index.vue | 13 -
src/views/personnelManagement/selfService/index.vue | 2
src/views/safeProduction/accidentReportingRecord/index.vue | 4
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue | 10
src/views/fileManagement/bookshelf/detail.vue | 2
src/views/procurementManagement/purchaseReturnOrder/index.vue | 8
src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/index.vue | 2
src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/components/DetailPanel.vue | 6
src/views/collaborativeApproval/knowledgeBase/index.vue | 2
src/views/qualityManagement/afterSalesTraceability/index.vue | 2
src/views/chatHome/chatHomeIndex/MobileChat.vue | 4
src/views/collaborativeApproval/reportGeneration/index.vue | 4
src/views/monitor/job/index.vue | 2
src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/index.vue | 2
src/components/PIMTable/PIMTable.vue | 11 +
src/views/basicData/customerFileOpenSea/index.vue | 2
src/views/officeProcessAutomation/SysAdmin/user-manage/profile/index.vue | 2
src/components/QRCodeGenerator/index.vue | 2
src/views/equipmentManagement/inspectionManagement/index.vue | 2
src/views/collaborativeApproval/customerVisit/index.vue | 2
src/views/collaborativeApproval/notificationManagement/meetIndex/index.vue | 4
src/views/monitorManagement/areaControl/index.vue | 4
src/views/equipmentManagement/deviceInfo/index.vue | 4
src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js | 6
src/utils/dateDisplay.js | 32 ++++
src/views/officeProcessAutomation/EnterpriseNews/news-manage/components/NewsDetailPanel.vue | 2
src/views/projectManagement/Management/projectDetail.vue | 12
src/views/personnelManagement/monthlyStatistics/index.vue | 2
src/views/safeProduction/hazardousMaterialsControl/index.vue | 4
src/views/reportAnalysis/dataDashboard/components/basic/center-top.vue | 2
src/views/safeProduction/dangerInvestigation/index.vue | 6
79 files changed, 203 insertions(+), 173 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 74615af..20e599e 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -178,15 +178,19 @@
class="cell link"
style="width: 100%"
@click="goLink(scope.row, item.linkMethod)">
- <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
+ <span v-if="!item.formatData">{{
+ toDateOnly(scope.row[item.prop])
+ }}</span>
</div>
<!-- 榛樿绾睍绀烘暟鎹� -->
<div v-else
class="cell"
style="width: 100%">
- <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
+ <span v-if="!item.formatData">{{
+ toDateOnly(scope.row[item.prop])
+ }}</span>
<span v-else>{{
- formatters(scope.row[item.prop], item.formatData)
+ toDateOnly(formatters(scope.row[item.prop], item.formatData))
}}</span>
</div>
</template>
@@ -204,6 +208,7 @@
import pagination from "./Pagination.vue";
import { computed, ref, inject, getCurrentInstance } from "vue";
import { ElMessage } from "element-plus";
+ import { toDateOnly } from "@/utils/dateDisplay";
// 鑾峰彇鍏ㄥ眬鐨� uploadHeader
const { proxy } = getCurrentInstance();
diff --git a/src/components/QRCodeGenerator/index.vue b/src/components/QRCodeGenerator/index.vue
index fd44f44..8715fc0 100644
--- a/src/components/QRCodeGenerator/index.vue
+++ b/src/components/QRCodeGenerator/index.vue
@@ -96,7 +96,7 @@
<p><strong>鍐呭锛�</strong>{{ form.content }}</p>
<p><strong>绫诲瀷锛�</strong>{{ form.type === 'qrcode' ? '浜岀淮鐮�' : '闃蹭吉鐮�' }}</p>
<p><strong>灏哄锛�</strong>{{ form.size }}x{{ form.size }}px</p>
- <p><strong>鐢熸垚鏃堕棿锛�</strong>{{ generateTime }}</p>
+ <p><strong>鐢熸垚鏃堕棿锛�</strong>{{ formatDateOnly(generateTime) }}</p>
</div>
</div>
<div class="code-actions">
diff --git a/src/layout/components/NotificationCenter/index.vue b/src/layout/components/NotificationCenter/index.vue
index 66f489a..3ecaf0d 100644
--- a/src/layout/components/NotificationCenter/index.vue
+++ b/src/layout/components/NotificationCenter/index.vue
@@ -32,7 +32,7 @@
<div class="notification-content-wrapper">
<div class="notification-title">{{ item.noticeTitle }}</div>
<div class="notification-detail">{{ item.noticeContent }}</div>
- <div class="notification-time">{{ item.createTime }}</div>
+ <div class="notification-time">{{ formatDateOnly(item.createTime) }}</div>
</div>
<div class="notification-action">
<el-button type="primary"
@@ -64,7 +64,7 @@
<div class="notification-content-wrapper">
<div class="notification-title">{{ item.noticeTitle }}</div>
<div class="notification-detail">{{ item.noticeContent }}</div>
- <div class="notification-time">{{ item.createTime }}</div>
+ <div class="notification-time">{{ formatDateOnly(item.createTime) }}</div>
</div>
</div>
</div>
diff --git a/src/main.js b/src/main.js
index 025ff14..3314296 100644
--- a/src/main.js
+++ b/src/main.js
@@ -58,6 +58,7 @@
import PageHeader from "@/components/PageHeader/index.vue";
import { getToken } from "@/utils/auth";
+import { toDateOnly } from "@/utils/dateDisplay";
import {
calculateTaxExclusiveTotalPrice,
summarizeTable,
@@ -81,6 +82,9 @@
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.javaApi = __BASE_API__;
+// 灞曠ず鐢ㄦ棩鏈燂細甯︽椂鍒嗙鐨勫彧淇濈暀骞存湀鏃�
+app.config.globalProperties.formatDateOnly = toDateOnly;
+app.config.globalProperties.toDateOnly = toDateOnly;
app.config.globalProperties.HaveJson = (val) => {
return JSON.parse(JSON.stringify(val));
};
@@ -116,4 +120,19 @@
});
app._context.components.ElDialog.props.closeOnClickModal.default = false;
+// 鍒楄〃鏃堕棿缁熶竴鍙睍绀哄勾鏈堟棩锛氭湭鍗曠嫭閰嶇疆 formatter 鐨勮〃鏍煎垪璧拌繖閲�
+const tableColumnFormatter =
+ app._context.components.ElTableColumn?.props?.formatter;
+if (tableColumnFormatter) {
+ const formatCell = (row, column, cellValue) => toDateOnly(cellValue);
+ if (typeof tableColumnFormatter === "function") {
+ app._context.components.ElTableColumn.props.formatter = {
+ type: Function,
+ default: formatCell,
+ };
+ } else {
+ tableColumnFormatter.default = formatCell;
+ }
+}
+
app.mount("#app");
diff --git a/src/utils/dateDisplay.js b/src/utils/dateDisplay.js
new file mode 100644
index 0000000..9524f63
--- /dev/null
+++ b/src/utils/dateDisplay.js
@@ -0,0 +1,32 @@
+/**
+ * 灞曠ず鐢ㄧ殑鏃ユ湡澶勭悊锛氬甫鏃跺垎绉掔殑鏃ユ湡鏃堕棿鍙繚鐣欏勾鏈堟棩锛�
+ * 鏈潵灏辨槸鏃ユ湡銆佹椂闂存垨鍏跺畠鍐呭鐨勫�煎師鏍疯繑鍥炪��
+ */
+const DATE_TIME_PATTERN =
+ /^(\d{4})[-/骞碷(\d{1,2})[-/鏈圿(\d{1,2})鏃�?[ T]\d{1,2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?$/;
+
+function pad2(value) {
+ return String(value).padStart(2, "0");
+}
+
+export function toDateOnly(value) {
+ if (value == null || value === "") return value;
+
+ if (value instanceof Date) {
+ if (Number.isNaN(value.getTime())) return value;
+ return `${value.getFullYear()}-${pad2(value.getMonth() + 1)}-${pad2(
+ value.getDate()
+ )}`;
+ }
+
+ if (typeof value !== "string") {
+ // 鏁板瓧銆佸璞$瓑鍘熸牱杩斿洖锛屼氦缁欐覆鏌撳眰鎸夊師鏈夋柟寮忓鐞�
+ return value;
+ }
+
+ const text = value.trim();
+ const matched = text.match(DATE_TIME_PATTERN);
+ if (!matched) return value;
+
+ return `${matched[1]}-${pad2(matched[2])}-${pad2(matched[3])}`;
+}
diff --git a/src/utils/index.js b/src/utils/index.js
index 809593f..5e99216 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -1,25 +1,11 @@
import { parseTime } from "./ruoyi";
/**
- * 琛ㄦ牸鏃堕棿鏍煎紡鍖�
+ * 琛ㄦ牸鏃堕棿鏍煎紡鍖栵紙椤甸潰灞曠ず鍙繚鐣欏勾鏈堟棩锛�
*/
export function formatDate(cellValue) {
if (cellValue == null || cellValue == "") return "";
- var date = new Date(cellValue);
- var year = date.getFullYear();
- var month =
- date.getMonth() + 1 < 10
- ? "0" + (date.getMonth() + 1)
- : date.getMonth() + 1;
- var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
- var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
- var minutes =
- date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
- var seconds =
- date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
- return (
- year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds
- );
+ return parseTime(cellValue, "{y}-{m}-{d}");
}
/**
diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js
index 0d72c1a..8dc53c8 100644
--- a/src/utils/ruoyi.js
+++ b/src/utils/ruoyi.js
@@ -8,7 +8,8 @@
if (arguments.length === 0 || !time) {
return null
}
- const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
+ // 椤甸潰灞曠ず缁熶竴鍙埌骞存湀鏃ワ紝闇�瑕佹椂鍒嗙鏃舵樉寮忎紶鍏� pattern
+ const format = pattern || '{y}-{m}-{d}'
let date
if (typeof time === 'object') {
date = time
diff --git a/src/views/aiIndustrialBrain/index.vue b/src/views/aiIndustrialBrain/index.vue
index 4afafa5..03d86ce 100644
--- a/src/views/aiIndustrialBrain/index.vue
+++ b/src/views/aiIndustrialBrain/index.vue
@@ -4,7 +4,7 @@
<header class="brain-head">
<div class="head-date">
<p>{{ weekLabel }}</p>
- <p>{{ dateLabel }}</p>
+ <p>{{ formatDateOnly(dateLabel) }}</p>
</div>
<div class="head-title">
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index c565a69..8dbae6f 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -457,7 +457,7 @@
<el-col :span="12">
<div class="info-item">
<span class="info-label">缁存姢鏃堕棿锛�</span>
- <span class="info-value">{{ detailForm.maintenanceTime }}</span>
+ <span class="info-value">{{ formatDateOnly(detailForm.maintenanceTime) }}</span>
</div>
</el-col>
</el-row>
diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index 0a9305c..d56a8d8 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/index.vue
@@ -523,7 +523,7 @@
<el-col :span="12">
<div class="info-item">
<span class="info-label">缁存姢鏃堕棿锛�</span>
- <span class="info-value">{{ detailForm.maintenanceTime }}</span>
+ <span class="info-value">{{ formatDateOnly(detailForm.maintenanceTime) }}</span>
</div>
</el-col>
</el-row>
diff --git a/src/views/chatHome/chatHomeIndex/MobileChat.vue b/src/views/chatHome/chatHomeIndex/MobileChat.vue
index adeb5e7..c22979e 100644
--- a/src/views/chatHome/chatHomeIndex/MobileChat.vue
+++ b/src/views/chatHome/chatHomeIndex/MobileChat.vue
@@ -7,7 +7,7 @@
<div class="info-time">
<img :src="item.headImg" alt="" />
<span>{{ item.name }}</span>
- <span>{{ item.time }}</span>
+ <span>{{ formatDateOnly(item.time) }}</span>
</div>
<div class="chat-text" v-if="item.chatType == 0">
<template v-if="isSend && index === chatList.length - 1">
@@ -30,7 +30,7 @@
<div class="chat-me" v-else>
<div class="info-time">
<span>{{ item.name }}</span>
- <span>{{ item.time }}</span>
+ <span>{{ formatDateOnly(item.time) }}</span>
<img :src="item.headImg" alt="" />
</div>
<div class="chat-text" v-if="item.chatType == 0">
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 5943178..c5e0a59 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -69,8 +69,8 @@
<el-descriptions-item label="鎶ヤ环鍗曞彿">{{ currentQuotation.quotationNo }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ currentQuotation.customer }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍛�">{{ currentQuotation.salesperson }}</el-descriptions-item>
- <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ currentQuotation.quotationDate }}</el-descriptions-item>
- <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ currentQuotation.validDate }}</el-descriptions-item>
+ <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ formatDateOnly(currentQuotation.quotationDate) }}</el-descriptions-item>
+ <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ formatDateOnly(currentQuotation.validDate) }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentQuotation.paymentMethod }}</el-descriptions-item>
<el-descriptions-item label="鎶ヤ环鎬婚"
:span="2">
@@ -129,8 +129,8 @@
<el-descriptions-item label="渚涘簲鍟嗗悕绉�">{{ currentPurchase.supplierName }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ currentPurchase.projectName }}</el-descriptions-item>
<el-descriptions-item label="閿�鍞悎鍚屽彿">{{ currentPurchase.salesContractNo }}</el-descriptions-item>
- <el-descriptions-item label="绛捐鏃ユ湡">{{ currentPurchase.executionDate }}</el-descriptions-item>
- <el-descriptions-item label="褰曞叆鏃ユ湡">{{ currentPurchase.entryDate }}</el-descriptions-item>
+ <el-descriptions-item label="绛捐鏃ユ湡">{{ formatDateOnly(currentPurchase.executionDate) }}</el-descriptions-item>
+ <el-descriptions-item label="褰曞叆鏃ユ湡">{{ formatDateOnly(currentPurchase.entryDate) }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentPurchase.paymentMethod }}</el-descriptions-item>
<el-descriptions-item label="鍚堝悓閲戦"
:span="2">
@@ -190,7 +190,7 @@
<el-descriptions-item label="鍙戣揣璁㈠崟鍙�">{{ currentDelivery.shippingInfo.shippingNo || '--' }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ currentDelivery.shippingInfo.customerName || '--' }}</el-descriptions-item>
<el-descriptions-item label="鍙戣揣绫诲瀷">{{ currentDelivery.shippingInfo.type || '--' }}</el-descriptions-item>
- <el-descriptions-item label="鍙戣揣鏃ユ湡">{{ currentDelivery.shippingInfo.shippingDate || '--' }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戣揣鏃ユ湡">{{ formatDateOnly(currentDelivery.shippingInfo.shippingDate || '--') }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳鐘舵��">{{ currentDelivery.shippingInfo.status || '--' }}</el-descriptions-item>
<el-descriptions-item label="鍙戣揣杞︾墝鍙�">{{ currentDelivery.shippingInfo.shippingCarNumber || '--' }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/collaborativeApproval/customerVisit/index.vue b/src/views/collaborativeApproval/customerVisit/index.vue
index 68396eb..7b7f705 100644
--- a/src/views/collaborativeApproval/customerVisit/index.vue
+++ b/src/views/collaborativeApproval/customerVisit/index.vue
@@ -93,7 +93,7 @@
</div>
<div class="info-item">
<span class="info-label">鎷滆鏃堕棿</span>
- <span class="info-value">{{ detailForm.purposeDate || '-' }}</span>
+ <span class="info-value">{{ formatDateOnly(detailForm.purposeDate || '-') }}</span>
</div>
<div class="info-item">
<span class="info-label">鎷滆鍦扮偣</span>
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index 870b5db..33952c9 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 }}
+ {{ formatDateOnly(currentKnowledge.createTime) }}
</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/collaborativeApproval/noticeManagement/index.vue b/src/views/collaborativeApproval/noticeManagement/index.vue
index a36b950..1f9bce9 100644
--- a/src/views/collaborativeApproval/noticeManagement/index.vue
+++ b/src/views/collaborativeApproval/noticeManagement/index.vue
@@ -60,7 +60,7 @@
</div>
<div class="card-info">
<span class="creator">{{ notice.createUserName }}</span>
- <span class="expiration" v-if="notice.expirationDate">鎴鏃ユ湡锛歿{ notice.expirationDate }}</span>
+ <span class="expiration" v-if="notice.expirationDate">鎴鏃ユ湡锛歿{ formatDateOnly(notice.expirationDate) }}</span>
</div>
</div>
<div class="card-remark" v-if="notice.remark">
diff --git a/src/views/collaborativeApproval/notificationManagement/meetDraft/index.vue b/src/views/collaborativeApproval/notificationManagement/meetDraft/index.vue
index 11d1774..12e63d2 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetDraft/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetDraft/index.vue
@@ -83,7 +83,7 @@
<el-descriptions-item label="浼氳鏃堕棿" :span="2">
{{ formatDateTime(currentDraft.meetingTime) }}
</el-descriptions-item>
- <el-descriptions-item label="鍒涘缓鏃堕棿">{{ currentDraft.createTime }}</el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿">{{ formatDateOnly(currentDraft.createTime) }}</el-descriptions-item>
</el-descriptions>
<div class="content-section mt-20">
diff --git a/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue b/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
index dea9495..193aaff 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
@@ -102,9 +102,7 @@
{{ getStatusText(currentMeeting.status) }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{
- currentMeeting.createTime
- }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{ formatDateOnly(currentMeeting.createTime) }}</el-descriptions-item>
<el-descriptions-item style="max-height: 400px" label="浼氳璇存槑" :span="2"
label-class-name="nowrap-label">{{ currentMeeting.description }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/collaborativeApproval/notificationManagement/meetIndex/index.vue b/src/views/collaborativeApproval/notificationManagement/meetIndex/index.vue
index 235faa3..0293af3 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetIndex/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetIndex/index.vue
@@ -50,7 +50,7 @@
>
<div v-if="cell.type === 'meeting'" class="meeting-content">
<div class="meeting-title">{{ cell.meeting.title }}</div>
- <div class="meeting-time">{{ cell.startTime }}-{{ cell.endTime }}</div>
+ <div class="meeting-time">{{ formatDateOnly(cell.startTime) }}-{{ formatDateOnly(cell.endTime) }}</div>
</div>
<div v-else class="free-content">
绌洪棽
@@ -73,7 +73,7 @@
<el-descriptions :column="1" border>
<el-descriptions-item label="浼氳涓婚">{{ currentMeeting.title }}</el-descriptions-item>
<el-descriptions-item label="浼氳瀹�">{{ currentMeeting.room }}</el-descriptions-item>
- <el-descriptions-item label="浼氳鏃堕棿">{{ currentMeeting.time }}</el-descriptions-item>
+ <el-descriptions-item label="浼氳鏃堕棿">{{ formatDateOnly(currentMeeting.time) }}</el-descriptions-item>
<el-descriptions-item label="涓绘寔浜�">{{ currentMeeting.host }}</el-descriptions-item>
<el-descriptions-item label="鍙備細浜烘暟">{{ currentMeeting.participants }}浜�</el-descriptions-item>
<el-descriptions-item label="浼氳璇存槑">{{ currentMeeting.description }}</el-descriptions-item>
diff --git a/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue b/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
index a3ae223..e892c46 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
@@ -100,9 +100,7 @@
{{ getStatusText(currentMeeting.status) }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{
- currentMeeting.createTime
- }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{ formatDateOnly(currentMeeting.createTime) }}</el-descriptions-item>
<el-descriptions-item style="max-height: 400px" label="浼氳璇存槑" :span="2"
label-class-name="nowrap-label">{{ currentMeeting.description }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/collaborativeApproval/notificationManagement/summary/index.vue b/src/views/collaborativeApproval/notificationManagement/summary/index.vue
index 9f3fc7f..04fead2 100644
--- a/src/views/collaborativeApproval/notificationManagement/summary/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/summary/index.vue
@@ -86,9 +86,7 @@
{{ getStatusText(currentMeeting.status) }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{
- currentMeeting.createTime
- }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿" label-class-name="nowrap-label">{{ formatDateOnly(currentMeeting.createTime) }}</el-descriptions-item>
<el-descriptions-item style="max-height: 400px" label="浼氳璇存槑" :span="2"
label-class-name="nowrap-label">{{ currentMeeting.description }}</el-descriptions-item>
</el-descriptions>
@@ -332,7 +330,9 @@
// 鏍煎紡鍖栨棩鏈熸椂闂�
const formatDateTime = (dateTime) => {
if (!dateTime) return ''
- return dateTime.replace(' ', '\n')
+ const matched = String(dateTime).match(/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})/)
+ if (!matched) return dateTime
+ return `${matched[1]}-${matched[2].padStart(2, '0')}-${matched[3].padStart(2, '0')}`
}
// 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
diff --git a/src/views/collaborativeApproval/officeSupplies/index.vue b/src/views/collaborativeApproval/officeSupplies/index.vue
index a2d1c6d..adb9856 100644
--- a/src/views/collaborativeApproval/officeSupplies/index.vue
+++ b/src/views/collaborativeApproval/officeSupplies/index.vue
@@ -239,11 +239,11 @@
{{ getStatusText(currentDetail.status) }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿">{{ currentDetail.applyTime }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿">{{ formatDateOnly(currentDetail.applyTime) }}</el-descriptions-item>
<el-descriptions-item label="瀹℃壒浜�">{{ currentDetail.approval || '-' }}</el-descriptions-item>
- <el-descriptions-item label="瀹℃壒鏃堕棿">{{ currentDetail.approvalTime || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="瀹℃壒鏃堕棿">{{ formatDateOnly(currentDetail.approvalTime || '-') }}</el-descriptions-item>
<el-descriptions-item label="瀹℃壒鎰忚" :span="2">{{ currentDetail.approvalOpinions || '-' }}</el-descriptions-item>
- <el-descriptions-item label="鍙戞斁鏃堕棿">{{ currentDetail.issueTime || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戞斁鏃堕棿">{{ formatDateOnly(currentDetail.issueTime || '-') }}</el-descriptions-item>
<el-descriptions-item label="鍙戞斁浜�">{{ currentDetail.issueUser || '-' }}</el-descriptions-item>
</el-descriptions>
</el-dialog>
diff --git a/src/views/collaborativeApproval/planTemplate/index.vue b/src/views/collaborativeApproval/planTemplate/index.vue
index fa2bfd9..8ff6fd9 100644
--- a/src/views/collaborativeApproval/planTemplate/index.vue
+++ b/src/views/collaborativeApproval/planTemplate/index.vue
@@ -144,7 +144,7 @@
<div class="plan-meta">
<div class="meta-item">
<el-icon><Calendar /></el-icon>
- <span>{{ plan.startDate }} - {{ plan.endDate }}</span>
+ <span>{{ formatDateOnly(plan.startDate) }} - {{ formatDateOnly(plan.endDate) }}</span>
</div>
<div class="meta-item">
<el-icon><User /></el-icon>
@@ -302,8 +302,8 @@
<el-descriptions-item label="璁″垝鎻忚堪">{{ currentPlanDetail.description }}</el-descriptions-item>
<el-descriptions-item label="璁″垝绾у埆">{{ getCurrentLevelText(currentPlanDetail.level) }}</el-descriptions-item>
<el-descriptions-item label="鏃堕棿鍛ㄦ湡">{{ getCurrentPeriodText(currentPlanDetail.period) }}</el-descriptions-item>
- <el-descriptions-item label="寮�濮嬫椂闂�">{{ currentPlanDetail.startDate }}</el-descriptions-item>
- <el-descriptions-item label="缁撴潫鏃堕棿">{{ currentPlanDetail.endDate }}</el-descriptions-item>
+ <el-descriptions-item label="寮�濮嬫椂闂�">{{ formatDateOnly(currentPlanDetail.startDate) }}</el-descriptions-item>
+ <el-descriptions-item label="缁撴潫鏃堕棿">{{ formatDateOnly(currentPlanDetail.endDate) }}</el-descriptions-item>
<el-descriptions-item label="璐熻矗浜�">{{ currentPlanDetail.assignee }}</el-descriptions-item>
<el-descriptions-item label="浼樺厛绾�">{{ getPriorityText(currentPlanDetail.priority) }}</el-descriptions-item>
<el-descriptions-item label="鏍囩">{{ currentPlanDetail.tags.join(', ') }}</el-descriptions-item>
diff --git a/src/views/collaborativeApproval/reportGeneration/index.vue b/src/views/collaborativeApproval/reportGeneration/index.vue
index c160ad7..c74b934 100644
--- a/src/views/collaborativeApproval/reportGeneration/index.vue
+++ b/src/views/collaborativeApproval/reportGeneration/index.vue
@@ -65,8 +65,8 @@
<el-descriptions :column="2" border>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ reportData.projectInfo.name }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰缁忕悊">{{ reportData.projectInfo.manager }}</el-descriptions-item>
- <el-descriptions-item label="寮�濮嬫椂闂�">{{ reportData.projectInfo.startDate }}</el-descriptions-item>
- <el-descriptions-item label="缁撴潫鏃堕棿">{{ reportData.projectInfo.endDate }}</el-descriptions-item>
+ <el-descriptions-item label="寮�濮嬫椂闂�">{{ formatDateOnly(reportData.projectInfo.startDate) }}</el-descriptions-item>
+ <el-descriptions-item label="缁撴潫鏃堕棿">{{ formatDateOnly(reportData.projectInfo.endDate) }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鐘舵��">
<el-tag :type="getStatusType(reportData.projectInfo.status)">
{{ reportData.projectInfo.status }}
diff --git a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
index f7ba9d9..2b173b0 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="鍙戝竷鏃堕棿">{{ formatDateOnly(currentRegulationDetail.createTime) }}</el-descriptions-item>
</el-descriptions>
<div class="mt-20">
<h4>鍒跺害鍐呭</h4>
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index a06f6d5..fcd4da5 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="鐢宠鏃堕棿">{{ formatDateOnly(currentSealDetail.createTime) }}</el-descriptions-item>
<el-descriptions-item label="鐘舵��">
<el-tag :type="getStatusType(currentSealDetail.status)">
{{ getStatusText(currentSealDetail.status) }}
diff --git a/src/views/energyManagement/energyCockpit/index.vue b/src/views/energyManagement/energyCockpit/index.vue
index 9281e37..01f3428 100644
--- a/src/views/energyManagement/energyCockpit/index.vue
+++ b/src/views/energyManagement/energyCockpit/index.vue
@@ -4,7 +4,7 @@
<div class="page-header">
<h2>鑳芥簮椹鹃┒鑸�</h2>
<div class="header-info">
- <span class="update-time">鏈�鍚庢洿鏂帮細{{ lastUpdateTime }}</span>
+ <span class="update-time">鏈�鍚庢洿鏂帮細{{ formatDateOnly(lastUpdateTime) }}</span>
<el-button type="primary" size="small" @click="refreshData">
<el-icon><Refresh /></el-icon>
鍒锋柊鏁版嵁
@@ -202,7 +202,7 @@
<div class="abnormal-content">
<div class="abnormal-title">{{ item.title }}</div>
<div class="abnormal-desc">{{ item.description }}</div>
- <div class="abnormal-time">{{ item.time }}</div>
+ <div class="abnormal-time">{{ formatDateOnly(item.time) }}</div>
</div>
<div class="abnormal-action">
<el-button link size="small" @click="handleAbnormal(item)">澶勭悊</el-button>
diff --git a/src/views/energyManagement/gasManagement/index.vue b/src/views/energyManagement/gasManagement/index.vue
index a9b9abe..a3c655e 100644
--- a/src/views/energyManagement/gasManagement/index.vue
+++ b/src/views/energyManagement/gasManagement/index.vue
@@ -4,7 +4,7 @@
<div class="page-header">
<h2>鐢ㄦ皵绠$悊绯荤粺</h2>
<div class="header-info">
- <span class="update-time">鏈�鍚庢洿鏂帮細{{ lastUpdateTime }}</span>
+ <span class="update-time">鏈�鍚庢洿鏂帮細{{ formatDateOnly(lastUpdateTime) }}</span>
<el-button type="primary" size="small" @click="refreshData">
<el-icon><Refresh /></el-icon>
鍒锋柊鏁版嵁
diff --git a/src/views/energyManagement/meterCollection/index.vue b/src/views/energyManagement/meterCollection/index.vue
index dfa5617..00800c7 100644
--- a/src/views/energyManagement/meterCollection/index.vue
+++ b/src/views/energyManagement/meterCollection/index.vue
@@ -174,7 +174,7 @@
<el-col :span="12">
<div class="detail-item">
<label>鏈�鍚庢洿鏂版椂闂�:</label>
- <span>{{ currentMeter.lastUpdateTime }}</span>
+ <span>{{ formatDateOnly(currentMeter.lastUpdateTime) }}</span>
</div>
</el-col>
</el-row>
diff --git a/src/views/equipmentManagement/deviceInfo/index.vue b/src/views/equipmentManagement/deviceInfo/index.vue
index de162cc..003bf67 100644
--- a/src/views/equipmentManagement/deviceInfo/index.vue
+++ b/src/views/equipmentManagement/deviceInfo/index.vue
@@ -35,11 +35,11 @@
<div class="maintenance-info">
<div class="maintenance-item">
<span class="label">鏈�鍚庣淮鎶わ細</span>
- <span class="value">{{ deviceInfo.updateTime }}</span>
+ <span class="value">{{ formatDateOnly(deviceInfo.updateTime) }}</span>
</div>
<div class="maintenance-item">
<span class="label">涓嬫缁存姢锛�</span>
- <span class="value">{{ deviceInfo.createTime }}</span>
+ <span class="value">{{ formatDateOnly(deviceInfo.createTime) }}</span>
</div>
<div class="maintenance-item">
<span class="label">缁存姢鐘舵�侊細</span>
diff --git a/src/views/equipmentManagement/gasTank/simple.vue b/src/views/equipmentManagement/gasTank/simple.vue
index 4cb2d76..dd3d2af 100644
--- a/src/views/equipmentManagement/gasTank/simple.vue
+++ b/src/views/equipmentManagement/gasTank/simple.vue
@@ -119,7 +119,7 @@
<div class="maintenance-list">
<div class="maintenance-item" v-for="record in maintenanceRecords" :key="record.id">
<div class="record-header">
- <span class="record-date">{{ record.date }}</span>
+ <span class="record-date">{{ formatDateOnly(record.date) }}</span>
<el-tag :type="record.type === 'inspection' ? 'primary' : 'success'" size="small">
{{ record.type === 'inspection' ? '妫�楠�' : '缁存姢' }}
</el-tag>
diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index 8c0d52c..e50e8fc 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -197,7 +197,7 @@
formatData: cell => {
if (!cell) return "-";
try {
- return dayjs(cell).format("YYYY-MM-DD HH:mm:ss");
+ return dayjs(cell).format("YYYY-MM-DD");
} catch {
return cell;
}
diff --git a/src/views/equipmentManagement/ledger/index.vue b/src/views/equipmentManagement/ledger/index.vue
index af10532..9d406d6 100644
--- a/src/views/equipmentManagement/ledger/index.vue
+++ b/src/views/equipmentManagement/ledger/index.vue
@@ -127,7 +127,7 @@
<el-descriptions-item label="鍚◣鎬讳环">{{ detailData.taxIncludingPriceTotal }}</el-descriptions-item>
<el-descriptions-item label="绋庣巼(%)">{{ detailData.taxRate }}</el-descriptions-item>
<el-descriptions-item label="涓嶅惈绋庢�讳环">{{ detailData.unTaxIncludingPriceTotal }}</el-descriptions-item>
- <el-descriptions-item label="褰曞叆鏃ユ湡">{{ detailData.createTime }}</el-descriptions-item>
+ <el-descriptions-item label="褰曞叆鏃ユ湡">{{ formatDateOnly(detailData.createTime) }}</el-descriptions-item>
<el-descriptions-item label="棰勮杩愯鏃堕棿">{{ detailData.planRuntimeTime ? dayjs(detailData.planRuntimeTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
<el-descriptions-item label="璁惧鍥剧墖" :span="2">
<div v-if="detailData.storageBlobVOs && detailData.storageBlobVOs.length > 0" style="display: flex; gap: 10px; flex-wrap: wrap;">
diff --git a/src/views/equipmentManagement/operationManagement/index.vue b/src/views/equipmentManagement/operationManagement/index.vue
index 99c3bd1..bf8c419 100644
--- a/src/views/equipmentManagement/operationManagement/index.vue
+++ b/src/views/equipmentManagement/operationManagement/index.vue
@@ -74,7 +74,7 @@
align="center"
>
<template #default="scope">
- {{ scope.row.planRuntimeTime || '-' }}
+ {{ formatDateOnly(scope.row.planRuntimeTime || '-') }}
</template>
</el-table-column>
<el-table-column
@@ -84,7 +84,7 @@
align="center"
>
<template #default="scope">
- {{ scope.row.startRuntimeTime || '-' }}
+ {{ formatDateOnly(scope.row.startRuntimeTime || '-') }}
</template>
</el-table-column>
<el-table-column
@@ -94,7 +94,7 @@
align="center"
>
<template #default="scope">
- {{ scope.row.endRuntimeTime || '-' }}
+ {{ formatDateOnly(scope.row.endRuntimeTime || '-') }}
</template>
</el-table-column>
<el-table-column
diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index 245a162..2f83a33 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -348,8 +348,7 @@
prop: "registrationDate",
label: "鐧昏鏃ユ湡",
minWidth: 100,
- formatData: cell =>
- cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+ formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : "-"),
},
{
fixed: "right",
@@ -408,8 +407,7 @@
label: "瀹為檯淇濆吇鏃ユ湡",
align: "center",
prop: "maintenanceActuallyTime",
- formatData: cell =>
- cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+ formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : "-"),
},
{
label: "淇濆吇缁撴灉",
diff --git a/src/views/fileManagement/bookshelf/detail.vue b/src/views/fileManagement/bookshelf/detail.vue
index 5d7d3ac..2dcd6b2 100644
--- a/src/views/fileManagement/bookshelf/detail.vue
+++ b/src/views/fileManagement/bookshelf/detail.vue
@@ -16,7 +16,7 @@
<el-descriptions :column="2" border>
<el-descriptions-item label="鍥句功缂栧彿">{{ current.docNumber }}</el-descriptions-item>
<el-descriptions-item label="鍥句功鍚嶇О">{{ current.docName }}</el-descriptions-item>
- <el-descriptions-item label="鍏ュ簱鏃堕棿">{{ current.createTime }}</el-descriptions-item>
+ <el-descriptions-item label="鍏ュ簱鏃堕棿">{{ formatDateOnly(current.createTime) }}</el-descriptions-item>
<!-- <el-descriptions-item label="褰撳墠浣嶇疆">{{ current.currentLocation }}</el-descriptions-item> -->
<el-descriptions-item label="鐘舵��">{{ current.docStatus }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/fileManagement/document/attachmentManager.vue b/src/views/fileManagement/document/attachmentManager.vue
index f3c0504..4686e81 100644
--- a/src/views/fileManagement/document/attachmentManager.vue
+++ b/src/views/fileManagement/document/attachmentManager.vue
@@ -39,7 +39,7 @@
</el-table-column>
<el-table-column label="涓婁紶鏃堕棿" prop="uploadTime" width="160" align="center">
<template #default="scope">
- {{ formatDate(scope.row.uploadTime) }}
+ {{ formatDateOnly(formatDate(scope.row.uploadTime)) }}
</template>
</el-table-column>
<el-table-column label="鐘舵��" prop="status" width="80" align="center">
diff --git a/src/views/index.vue b/src/views/index.vue
index 5a76883..bea3477 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -13,7 +13,7 @@
</div>
</div>
<div class="welcome-meta">
- <div class="meta-time digital-number">{{ nowTime }}</div>
+ <div class="meta-time digital-number">{{ formatDateOnly(nowTime) }}</div>
<div class="meta-tip">MES / MOM 鐢熶骇杩愯惀椹鹃┒鑸�</div>
</div>
</section>
@@ -222,7 +222,7 @@
<li v-for="item in todoList" :key="item.id" class="todo-item">
<div class="todo-head">
<span class="todo-no">寰呭姙缂栧彿锛歿{ item.approveId }}</span>
- <span class="todo-time">{{ item.approveTime }}</span>
+ <span class="todo-time">{{ formatDateOnly(item.approveTime) }}</span>
</div>
<div class="todo-desc">閮ㄩ棬锛歿{ item.approveDeptName }}</div>
<div class="todo-desc">浜嬬敱锛歿{ item.approveReason }}</div>
@@ -289,7 +289,7 @@
</div>
<div class="plan-meta">
<span>璁″垝 {{ item.planQty }}</span>
- <span>浜ゆ湡 {{ item.deliveryDate }}</span>
+ <span>浜ゆ湡 {{ formatDateOnly(item.deliveryDate) }}</span>
</div>
</li>
</ul>
diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue
index ee291a4..d16b8c7 100644
--- a/src/views/monitor/job/index.vue
+++ b/src/views/monitor/job/index.vue
@@ -242,7 +242,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="浠诲姟鍒嗙粍锛�">{{ jobGroupFormat(form) }}</el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿锛�">{{ form.createTime }}</el-form-item>
+ <el-form-item label="鍒涘缓鏃堕棿锛�">{{ formatDateOnly(form.createTime) }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="cron琛ㄨ揪寮忥細">{{ form.cronExpression }}</el-form-item>
diff --git a/src/views/monitor/job/log.vue b/src/views/monitor/job/log.vue
index b425e45..940d558 100644
--- a/src/views/monitor/job/log.vue
+++ b/src/views/monitor/job/log.vue
@@ -142,7 +142,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="浠诲姟鍒嗙粍锛�">{{ form.jobGroup }}</el-form-item>
- <el-form-item label="鎵ц鏃堕棿锛�">{{ form.createTime }}</el-form-item>
+ <el-form-item label="鎵ц鏃堕棿锛�">{{ formatDateOnly(form.createTime) }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="璋冪敤鏂规硶锛�">{{ form.invokeTarget }}</el-form-item>
diff --git a/src/views/monitorManagement/areaControl/index.vue b/src/views/monitorManagement/areaControl/index.vue
index 1dd5a36..fe4bafb 100644
--- a/src/views/monitorManagement/areaControl/index.vue
+++ b/src/views/monitorManagement/areaControl/index.vue
@@ -66,8 +66,8 @@
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="鐩爣鍖哄煙">{{ accessResult.zone.name }}</el-descriptions-item>
- <el-descriptions-item label="鏈�杩戝煿璁�">{{ accessResult.person.training.lastDate }}</el-descriptions-item>
- <el-descriptions-item label="閫傚矖璇佹湁鏁堟湡">{{ accessResult.person.training.expireDate }}</el-descriptions-item>
+ <el-descriptions-item label="鏈�杩戝煿璁�">{{ formatDateOnly(accessResult.person.training.lastDate) }}</el-descriptions-item>
+ <el-descriptions-item label="閫傚矖璇佹湁鏁堟湡">{{ formatDateOnly(accessResult.person.training.expireDate) }}</el-descriptions-item>
<el-descriptions-item label="鍑嗗叆缁撴灉">
<el-tag :type="accessResult.allowed ? 'success' : 'danger'">{{ accessResult.allowed ? '鍏佽杩涘叆' : '绂佹杩涘叆' }}</el-tag>
</el-descriptions-item>
diff --git a/src/views/monitorManagement/videoMonitor/index.vue b/src/views/monitorManagement/videoMonitor/index.vue
index b78c7f5..3ef9eb0 100644
--- a/src/views/monitorManagement/videoMonitor/index.vue
+++ b/src/views/monitorManagement/videoMonitor/index.vue
@@ -341,7 +341,7 @@
<el-descriptions :column="1" border size="small">
<el-descriptions-item label="鎶撴媿鏃堕棿">
<el-icon><Clock /></el-icon>
- {{ currentSnapshot.time }}
+ {{ formatDateOnly(currentSnapshot.time) }}
</el-descriptions-item>
<el-descriptions-item label="宸ュ彿">
<el-icon><User /></el-icon>
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
index edd5d52..eaf8f4c 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
@@ -50,7 +50,7 @@
<el-descriptions-item label="鍙戣揣璁㈠崟鍙�">{{ detailData.shippingInfo.shippingNo || "--" }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ detailData.shippingInfo.customerName || "--" }}</el-descriptions-item>
<el-descriptions-item label="鍙戣揣绫诲瀷">{{ detailData.shippingInfo.type || "--" }}</el-descriptions-item>
- <el-descriptions-item label="鍙戣揣鏃ユ湡">{{ detailData.shippingInfo.shippingDate || "--" }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戣揣鏃ユ湡">{{ formatDateOnly(detailData.shippingInfo.shippingDate || "--") }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳鐘舵��">{{ detailData.shippingInfo.status || "--" }}</el-descriptions-item>
<el-descriptions-item label="鍙戣揣杞︾墝鍙�">{{ detailData.shippingInfo.shippingCarNumber || "--" }}</el-descriptions-item>
</el-descriptions>
@@ -78,8 +78,8 @@
<el-descriptions-item label="渚涘簲鍟嗗悕绉�">{{ detailData.supplierName || "--" }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ detailData.projectName || "--" }}</el-descriptions-item>
<el-descriptions-item label="閿�鍞悎鍚屽彿">{{ detailData.salesContractNo || "--" }}</el-descriptions-item>
- <el-descriptions-item label="绛捐鏃ユ湡">{{ detailData.executionDate || "--" }}</el-descriptions-item>
- <el-descriptions-item label="褰曞叆鏃ユ湡">{{ detailData.entryDate || "--" }}</el-descriptions-item>
+ <el-descriptions-item label="绛捐鏃ユ湡">{{ formatDateOnly(detailData.executionDate || "--") }}</el-descriptions-item>
+ <el-descriptions-item label="褰曞叆鏃ユ湡">{{ formatDateOnly(detailData.entryDate || "--") }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ detailData.paymentMethod || "--" }}</el-descriptions-item>
<el-descriptions-item label="鍚堝悓閲戦" :span="2">
<span style="font-size: 18px; color: #e6a23c; font-weight: bold;">
@@ -115,8 +115,8 @@
<el-descriptions-item label="鎶ヤ环鍗曞彿">{{ detailData.quotationNo || "--" }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ detailData.customer || "--" }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍛�">{{ detailData.salesperson || "--" }}</el-descriptions-item>
- <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ detailData.quotationDate || "--" }}</el-descriptions-item>
- <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ detailData.validDate || "--" }}</el-descriptions-item>
+ <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ formatDateOnly(detailData.quotationDate || "--") }}</el-descriptions-item>
+ <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ formatDateOnly(detailData.validDate || "--") }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ detailData.paymentMethod || "--" }}</el-descriptions-item>
<el-descriptions-item label="鎶ヤ环鎬婚" :span="2">
<span style="font-size: 18px; color: #e6a23c; font-weight: bold;">
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js b/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
index 4eda9de..ff02425 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
@@ -159,16 +159,16 @@
if (val == null || val === "") return "";
if (Array.isArray(val) && val.length >= 3) {
const [y, m, d, h = 0, min = 0, s = 0] = val;
- return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss");
+ return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD");
}
if (typeof val === "number") {
const d = val > 1e12 ? dayjs(val) : dayjs.unix(val);
- return d.isValid() ? d.format("YYYY-MM-DD HH:mm:ss") : "";
+ return d.isValid() ? d.format("YYYY-MM-DD") : "";
}
const s = String(val).trim();
if (!s) return "";
const parsed = dayjs(s.includes("T") ? s : s.replace(/-/g, "/"));
- return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : s;
+ return parsed.isValid() ? parsed.format("YYYY-MM-DD") : s;
}
export function formatDisplayTime(val) {
diff --git a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/components/NewsDetailPanel.vue b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/components/NewsDetailPanel.vue
index 1124472..a460139 100644
--- a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/components/NewsDetailPanel.vue
+++ b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/components/NewsDetailPanel.vue
@@ -22,7 +22,7 @@
<el-descriptions-item label="缂栬緫鏉冮檺">{{ publishRoleLabel(row.editorRole) }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳瑙掕壊">{{ publishRoleLabel(row.reviewerRole) }}</el-descriptions-item>
<el-descriptions-item label="鍙戝竷浜�">{{ row.publisherName || "鈥�" }}</el-descriptions-item>
- <el-descriptions-item label="鍙戝竷鏃堕棿">{{ row.publishTime || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戝竷鏃堕棿">{{ formatDateOnly(row.publishTime || "鈥�") }}</el-descriptions-item>
<el-descriptions-item label="褰撳墠鐗堟湰">v{{ row.versionNo || 1 }}</el-descriptions-item>
<el-descriptions-item label="闇�闃呰纭">
{{ row.requireReadConfirm ? "鏄�" : "鍚�" }}
diff --git a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/components/DetailPanel.vue b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/components/DetailPanel.vue
index 4db16a7..cd8c46f 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/components/DetailPanel.vue
+++ b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/components/DetailPanel.vue
@@ -6,7 +6,7 @@
<el-tag :type="statusTagType(row.approvalResult)" size="small">{{ statusLabel(row.approvalResult) }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="璐圭敤绫诲瀷">{{ expenseCategoryLabel(row.expenseCategory) }}</el-descriptions-item>
- <el-descriptions-item label="鐢宠鏃堕棿">{{ row.applyTime || row.createTime || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鏃堕棿">{{ formatDateOnly(row.applyTime || row.createTime || "鈥�") }}</el-descriptions-item>
<el-descriptions-item label="鍛樺伐缂栧彿">{{ row.employeeNo || row.applicantNo || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="鍛樺伐濮撳悕">{{ row.employeeName || row.applicantName || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="鎶ラ攢鍘熷洜" :span="2">{{ row.reimburseReason || "鈥�" }}</el-descriptions-item>
@@ -17,7 +17,7 @@
<el-descriptions-item v-if="row.rejectReason" label="椹冲洖鍘熷洜" :span="2">
<span class="reject-text">{{ row.rejectReason }}</span>
</el-descriptions-item>
- <el-descriptions-item label="鍒涘缓鏃堕棿" :span="2">{{ row.createTime || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿" :span="2">{{ formatDateOnly(row.createTime || "鈥�") }}</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">鎶ラ攢鏄庣粏</el-divider>
diff --git a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/index.vue b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/index.vue
index 661c990..8359cde 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/index.vue
+++ b/src/views/officeProcessAutomation/ReimburseManage/cost-reimburse/index.vue
@@ -200,7 +200,7 @@
size="small"
style="width: 100%"
/>
- <span v-else>{{ row.invoiceDate || "鈥�" }}</span>
+ <span v-else>{{ formatDateOnly(row.invoiceDate || "鈥�") }}</span>
</template>
</el-table-column>
<el-table-column label="璐圭敤绉戠洰" width="130">
diff --git a/src/views/officeProcessAutomation/ReimburseManage/shared/finReimbursementMappers.js b/src/views/officeProcessAutomation/ReimburseManage/shared/finReimbursementMappers.js
index 2525f70..6c65f28 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/shared/finReimbursementMappers.js
+++ b/src/views/officeProcessAutomation/ReimburseManage/shared/finReimbursementMappers.js
@@ -292,14 +292,12 @@
};
}
-/** 鍒楄〃/璇︽儏鏃堕棿灞曠ず锛圛SO 鈫� YYYY-MM-DD HH:mm:ss锛� */
+/** 鍒楄〃/璇︽儏鏃堕棿灞曠ず锛圛SO 鈫� YYYY-MM-DD锛岄〉闈笉灞曠ず鏃跺垎绉掞級 */
export function formatReimbursementDateTime(val) {
if (val == null || val === "") return "";
const d = dayjs(val);
if (!d.isValid()) return String(val);
- const raw = String(val);
- const hasTime = raw.includes("T") || /:\d{2}/.test(raw);
- return hasTime ? d.format("YYYY-MM-DD HH:mm:ss") : d.format("YYYY-MM-DD");
+ return d.format("YYYY-MM-DD");
}
/** 鎺ュ彛琛� 鈫� 宸梾鎶ラ攢鍒楄〃琛岋紙鍏煎 useTravelReimburse 瀛楁锛� */
diff --git a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/components/DetailPanel.vue b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/components/DetailPanel.vue
index df8cf8e..e25a370 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/components/DetailPanel.vue
+++ b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/components/DetailPanel.vue
@@ -8,8 +8,8 @@
<el-descriptions-item label="鍛樺伐缂栧彿">{{ row.employeeNo || row.applicantNo || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="鍛樺伐濮撳悕">{{ row.employeeName || row.applicantName || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="鎶ラ攢鍘熷洜" :span="2">{{ row.reimburseReason || "鈥�" }}</el-descriptions-item>
- <el-descriptions-item label="鍑哄樊寮�濮�">{{ row.travelStartTime || "鈥�" }}</el-descriptions-item>
- <el-descriptions-item label="鍑哄樊缁撴潫">{{ row.travelEndTime || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鍑哄樊寮�濮�">{{ formatDateOnly(row.travelStartTime || "鈥�") }}</el-descriptions-item>
+ <el-descriptions-item label="鍑哄樊缁撴潫">{{ formatDateOnly(row.travelEndTime || "鈥�") }}</el-descriptions-item>
<el-descriptions-item label="鍑哄樊鍦�">{{ row.departurePlace || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="鐩殑鍦�">{{ row.destination || "鈥�" }}</el-descriptions-item>
<el-descriptions-item label="閰掑簵鏍囧噯">{{ row.hotelStandard != null ? `${row.hotelStandard} 鍏�/鏅歚 : "鈥�" }}</el-descriptions-item>
@@ -25,7 +25,7 @@
<el-descriptions-item v-if="row.rejectReason" label="椹冲洖鍘熷洜" :span="2">
<span class="reject-text">{{ row.rejectReason }}</span>
</el-descriptions-item>
- <el-descriptions-item label="鍒涘缓鏃堕棿" :span="2">{{ row.createTime || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿" :span="2">{{ formatDateOnly(row.createTime || "鈥�") }}</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">鎶ラ攢鏄庣粏</el-divider>
diff --git a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/index.vue b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/index.vue
index e2b5977..a1caf77 100644
--- a/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/index.vue
+++ b/src/views/officeProcessAutomation/ReimburseManage/travel-reimburse/index.vue
@@ -274,7 +274,7 @@
size="small"
style="width: 100%"
/>
- <span v-else>{{ row.invoiceDate || "鈥�" }}</span>
+ <span v-else>{{ formatDateOnly(row.invoiceDate || "鈥�") }}</span>
</template>
</el-table-column>
<el-table-column label="璐圭敤绉戠洰" width="130">
diff --git a/src/views/officeProcessAutomation/SysAdmin/user-manage/profile/index.vue b/src/views/officeProcessAutomation/SysAdmin/user-manage/profile/index.vue
index 719a028..83d3e6e 100644
--- a/src/views/officeProcessAutomation/SysAdmin/user-manage/profile/index.vue
+++ b/src/views/officeProcessAutomation/SysAdmin/user-manage/profile/index.vue
@@ -35,7 +35,7 @@
</li>
<li class="list-group-item">
<svg-icon icon-class="date" />鍒涘缓鏃ユ湡
- <div class="pull-right">{{ state.user.createTime }}</div>
+ <div class="pull-right">{{ formatDateOnly(state.user.createTime) }}</div>
</li>
</ul>
</div>
diff --git a/src/views/personnelManagement/attendanceCheckin/index.vue b/src/views/personnelManagement/attendanceCheckin/index.vue
index 168a71d..7d2c870 100644
--- a/src/views/personnelManagement/attendanceCheckin/index.vue
+++ b/src/views/personnelManagement/attendanceCheckin/index.vue
@@ -12,7 +12,7 @@
<div class="attendance-actions">
<div class="time-block">
<div class="label">褰撳墠鏃堕棿</div>
- <div class="value">{{ nowTime }}</div>
+ <div class="value">{{ formatDateOnly(nowTime) }}</div>
</div>
<el-button type="primary"
size="large"
diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index 66b71b3..37bd856 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/index.vue
@@ -54,7 +54,7 @@
:total="page.total"
>
<template #positiveDate="{ row }">
- <span :class="getPositiveDateClass(row.positiveDate)">{{ row.positiveDate }}</span>
+ <span :class="getPositiveDateClass(row.positiveDate)">{{ formatDateOnly(row.positiveDate) }}</span>
</template>
</PIMTable>
</div>
diff --git a/src/views/personnelManagement/monthlyStatistics/index.vue b/src/views/personnelManagement/monthlyStatistics/index.vue
index ff4395c..6261add 100644
--- a/src/views/personnelManagement/monthlyStatistics/index.vue
+++ b/src/views/personnelManagement/monthlyStatistics/index.vue
@@ -100,7 +100,7 @@
<el-descriptions-item label="宸ヨ祫鏈堜唤">{{ issueRecordRow.salaryMonth }}</el-descriptions-item>
<el-descriptions-item label="宸ヨ祫鎬婚">{{ formatAmount(issueRecordRow.totalSalary) }}</el-descriptions-item>
<el-descriptions-item label="鍙戞斁閾惰">{{ issueRecordRow.payBank || "-" }}</el-descriptions-item>
- <el-descriptions-item label="鍙戞斁鏃堕棿">{{ issueRecordRow.payTime || "-" }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戞斁鏃堕棿">{{ formatDateOnly(issueRecordRow.payTime || "-") }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳浜�">{{ issueRecordRow.auditUserName || "-" }}</el-descriptions-item>
<el-descriptions-item label="澶囨敞" :span="2">{{ issueRecordRow.remark || "-" }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/personnelManagement/selfService/index.vue b/src/views/personnelManagement/selfService/index.vue
index 647f149..6a00016 100644
--- a/src/views/personnelManagement/selfService/index.vue
+++ b/src/views/personnelManagement/selfService/index.vue
@@ -114,7 +114,7 @@
<el-descriptions-item label="宸ュ彿">{{ profile.employeeId }}</el-descriptions-item>
<el-descriptions-item label="閮ㄩ棬">{{ profile.department }}</el-descriptions-item>
<el-descriptions-item label="鑱屼綅">{{ profile.position }}</el-descriptions-item>
- <el-descriptions-item label="鍏ヨ亴鏃ユ湡">{{ profile.hireDate }}</el-descriptions-item>
+ <el-descriptions-item label="鍏ヨ亴鏃ユ湡">{{ formatDateOnly(profile.hireDate) }}</el-descriptions-item>
<el-descriptions-item label="鑱旂郴鐢佃瘽">{{ profile.phone }}</el-descriptions-item>
<el-descriptions-item label="閭">{{ profile.email }}</el-descriptions-item>
<el-descriptions-item label="鍦板潃">{{ profile.adress }}</el-descriptions-item>
diff --git a/src/views/procurementManagement/purchaseReturnOrder/index.vue b/src/views/procurementManagement/purchaseReturnOrder/index.vue
index 2b73253..e65ff7a 100644
--- a/src/views/procurementManagement/purchaseReturnOrder/index.vue
+++ b/src/views/procurementManagement/purchaseReturnOrder/index.vue
@@ -120,12 +120,8 @@
<el-descriptions-item label="鍒涘缓浜�">{{
detailData.createUserName || "--"
}}</el-descriptions-item>
- <el-descriptions-item label="鍒涘缓鏃堕棿">{{
- detailData.createTime || "--"
- }}</el-descriptions-item>
- <el-descriptions-item label="鏈�杩戞洿鏂版椂闂�">{{
- detailData.updateTime || "--"
- }}</el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿">{{ formatDateOnly(detailData.createTime || "--") }}</el-descriptions-item>
+ <el-descriptions-item label="鏈�杩戞洿鏂版椂闂�">{{ formatDateOnly(detailData.updateTime || "--") }}</el-descriptions-item>
<el-descriptions-item label="澶囨敞" :span="3">{{
detailData.remark || "--"
}}</el-descriptions-item>
diff --git a/src/views/procurementManagement/thePaymentLedger/index.vue b/src/views/procurementManagement/thePaymentLedger/index.vue
index 4031ea7..dae778f 100644
--- a/src/views/procurementManagement/thePaymentLedger/index.vue
+++ b/src/views/procurementManagement/thePaymentLedger/index.vue
@@ -55,8 +55,7 @@
{
label: "鐧昏鏃ユ湡",
prop: "registrationtDate",
- formatData: cell =>
- cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+ formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : "-"),
},
]);
const tableData = ref([]);
diff --git a/src/views/productionManagement/safetyMonitoring/index.vue b/src/views/productionManagement/safetyMonitoring/index.vue
index 12922e7..60285a7 100644
--- a/src/views/productionManagement/safetyMonitoring/index.vue
+++ b/src/views/productionManagement/safetyMonitoring/index.vue
@@ -132,7 +132,7 @@
<h4>绯荤粺鏃ュ織</h4>
<div class="log-container">
<div class="log-item" v-for="log in systemLogs" :key="log.id">
- <span class="log-time">{{ log.time }}</span>
+ <span class="log-time">{{ formatDateOnly(log.time) }}</span>
<span class="log-content">{{ log.content }}</span>
</div>
</div>
@@ -204,7 +204,7 @@
<div class="blockchain-details">
<el-descriptions :column="2" border>
<el-descriptions-item label="浜嬩欢ID">{{ currentEvent.id }}</el-descriptions-item>
- <el-descriptions-item label="鏃堕棿鎴�">{{ currentEvent.timestamp }}</el-descriptions-item>
+ <el-descriptions-item label="鏃堕棿鎴�">{{ formatDateOnly(currentEvent.timestamp) }}</el-descriptions-item>
<el-descriptions-item label="浣嶇疆">{{ currentEvent.location }}</el-descriptions-item>
<el-descriptions-item label="浜嬩欢绫诲瀷">{{ currentEvent.type }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 7b93c29..fe34cfd 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -117,11 +117,11 @@
</div> -->
<div class="info-item">
<span class="info-label">璁″垝寮�濮嬫椂闂�</span>
- <span class="info-value">{{ transferCardRowData.planStartTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.planStartTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">璁″垝缁撴潫鏃堕棿</span>
- <span class="info-value">{{ transferCardRowData.planEndTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.planEndTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">澶囨敞</span>
@@ -147,11 +147,11 @@
</div>
<div class="info-item">
<span class="info-label">瀹為檯寮�濮嬫椂闂�</span>
- <span class="info-value">{{ transferCardRowData.actualStartTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.actualStartTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">瀹為檯缁撴潫鏃堕棿</span>
- <span class="info-value">{{ transferCardRowData.actualEndTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.actualEndTime) }}</span>
</div>
</div>
</div>
diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index b721de6..efc3d7d 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -62,11 +62,11 @@
</div>
<div class="info-item">
<span class="info-label">璁″垝寮�濮嬫椂闂�</span>
- <span class="info-value">{{ transferCardRowData.planStartTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.planStartTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">璁″垝缁撴潫鏃堕棿</span>
- <span class="info-value">{{ transferCardRowData.planEndTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.planEndTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">澶囨敞</span>
@@ -91,11 +91,11 @@
</div>
<div class="info-item">
<span class="info-label">瀹為檯寮�濮嬫椂闂�</span>
- <span class="info-value">{{ transferCardRowData.actualStartTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.actualStartTime) }}</span>
</div>
<div class="info-item">
<span class="info-label">瀹為檯缁撴潫鏃堕棿</span>
- <span class="info-value">{{ transferCardRowData.actualEndTime }}</span>
+ <span class="info-value">{{ formatDateOnly(transferCardRowData.actualEndTime) }}</span>
</div>
</div>
</div>
diff --git a/src/views/productionPlan/productionPlan/components/PIMTable.vue b/src/views/productionPlan/productionPlan/components/PIMTable.vue
index 5f5eea5..06cfb80 100644
--- a/src/views/productionPlan/productionPlan/components/PIMTable.vue
+++ b/src/views/productionPlan/productionPlan/components/PIMTable.vue
@@ -183,16 +183,20 @@
class="cell link"
style="width: 100%"
@click="goLink(scope.row, item.linkMethod)">
- <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
+ <span v-if="!item.formatData">{{
+ toDateOnly(scope.row[item.prop])
+ }}</span>
</div>
<!-- 榛樿绾睍绀烘暟鎹� -->
<div v-else
class="cell"
:class="item.className || ''"
style="width: 100%">
- <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
+ <span v-if="!item.formatData">{{
+ toDateOnly(scope.row[item.prop])
+ }}</span>
<span v-else>{{
- formatters(scope.row[item.prop], item.formatData)
+ toDateOnly(formatters(scope.row[item.prop], item.formatData))
}}</span>
</div>
</template>
@@ -210,6 +214,7 @@
import pagination from "../../../../components/PIMTable/Pagination.vue";
import { ref, inject, getCurrentInstance } from "vue";
import { ElMessage } from "element-plus";
+ import { toDateOnly } from "@/utils/dateDisplay";
// 鑾峰彇鍏ㄥ眬鐨� uploadHeader
const { proxy } = getCurrentInstance();
diff --git a/src/views/projectManagement/Management/projectDetail.vue b/src/views/projectManagement/Management/projectDetail.vue
index be670cb..916a60f 100644
--- a/src/views/projectManagement/Management/projectDetail.vue
+++ b/src/views/projectManagement/Management/projectDetail.vue
@@ -25,7 +25,7 @@
<el-descriptions-item label="瀹㈡埛ID">{{ info.clientId ?? '-' }}</el-descriptions-item>
<el-descriptions-item label="鐖堕」鐩�">{{ parentProjectLabel }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰绫诲瀷">{{ projectTypeLabel }}</el-descriptions-item>
- <el-descriptions-item label="绔嬮」鏃ユ湡">{{ info.establishTime || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="绔嬮」鏃ユ湡">{{ formatDateOnly(info.establishTime || '-') }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鏉ユ簮">{{ info.source || '-' }}</el-descriptions-item>
<el-descriptions-item label="绔嬮」浜�">{{ info.managerName || '-' }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍛�">{{ info.salesmanName || '-' }}</el-descriptions-item>
@@ -40,11 +40,11 @@
<dict-tag :options="plan_status" :value="String(info.stage ?? '')" />
</el-descriptions-item>
<el-descriptions-item label="棰勮宸ユ湡(澶�)">{{ estimatedDays }}</el-descriptions-item>
- <el-descriptions-item label="璁″垝寮�濮嬫棩鏈�">{{ info.planStartTime || '-' }}</el-descriptions-item>
- <el-descriptions-item label="璁″垝瀹屾垚鏃ユ湡">{{ info.planEndTime || '-' }}</el-descriptions-item>
- <el-descriptions-item label="瀹為檯寮�濮嬫棩鏈�">{{ info.actualStartTime || '-' }}</el-descriptions-item>
- <el-descriptions-item label="瀹為檯瀹屾垚鏃ユ湡">{{ info.actualEndTime || '-' }}</el-descriptions-item>
- <el-descriptions-item label="璁㈠崟鏃ユ湡">{{ info.orderDate || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="璁″垝寮�濮嬫棩鏈�">{{ formatDateOnly(info.planStartTime || '-') }}</el-descriptions-item>
+ <el-descriptions-item label="璁″垝瀹屾垚鏃ユ湡">{{ formatDateOnly(info.planEndTime || '-') }}</el-descriptions-item>
+ <el-descriptions-item label="瀹為檯寮�濮嬫棩鏈�">{{ formatDateOnly(info.actualStartTime || '-') }}</el-descriptions-item>
+ <el-descriptions-item label="瀹為檯瀹屾垚鏃ユ湡">{{ formatDateOnly(info.actualEndTime || '-') }}</el-descriptions-item>
+ <el-descriptions-item label="璁㈠崟鏃ユ湡">{{ formatDateOnly(info.orderDate || '-') }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰閲戦">{{ info.orderAmount ?? '-' }}</el-descriptions-item>
<el-descriptions-item label="澶囨敞" :span="4">{{ info.remark || '-' }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/qualityManagement/afterSalesTraceability/index.vue b/src/views/qualityManagement/afterSalesTraceability/index.vue
index 8cd4856..ca133a0 100644
--- a/src/views/qualityManagement/afterSalesTraceability/index.vue
+++ b/src/views/qualityManagement/afterSalesTraceability/index.vue
@@ -123,7 +123,7 @@
<el-table-column label="鑱旂郴鏂瑰紡" prop="contact" width="140" />
<el-table-column label="鍙嶉鏃堕棿" prop="feedbackTime" width="160">
<template #default="scope">
- <span>{{ scope.row.feedbackTime }}</span>
+ <span>{{ formatDateOnly(scope.row.feedbackTime) }}</span>
</template>
</el-table-column>
<el-table-column label="闂鎻忚堪" prop="problemDesc" show-overflow-tooltip />
diff --git a/src/views/qualityManagement/visualization/qualityDashboard.vue b/src/views/qualityManagement/visualization/qualityDashboard.vue
index 57462b7..b244e1f 100644
--- a/src/views/qualityManagement/visualization/qualityDashboard.vue
+++ b/src/views/qualityManagement/visualization/qualityDashboard.vue
@@ -19,7 +19,7 @@
</div>
<div class="right">
<el-tag :type="statusTagType(item.status)" size="small">{{ statusLabel(item.status) }}</el-tag>
- <span class="time">{{ item.time }}</span>
+ <span class="time">{{ formatDateOnly(item.time) }}</span>
</div>
</div>
</div>
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/center-top.vue b/src/views/reportAnalysis/dataDashboard/components/basic/center-top.vue
index be5f913..81b4312 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/center-top.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/center-top.vue
@@ -67,7 +67,7 @@
>
<div class="todo-title">鐢宠绫诲瀷锛歿{ item.approveTypeName }}</div>
<div class="todo-division">鐢宠閮ㄩ棬锛歿{ item.approveDeptName }}</div>
- <div class="todo-time">{{ item.approveTime }}</div>
+ <div class="todo-time">{{ formatDateOnly(item.approveTime) }}</div>
</div>
</div>
diff --git a/src/views/reportAnalysis/dataDashboard/index0.vue b/src/views/reportAnalysis/dataDashboard/index0.vue
index ff92e41..e9920f7 100644
--- a/src/views/reportAnalysis/dataDashboard/index0.vue
+++ b/src/views/reportAnalysis/dataDashboard/index0.vue
@@ -172,7 +172,7 @@
<div style="display: flex;justify-content: space-between;align-items: center;">
<div class="todo-title">寰呭姙缂栧彿锛歿{item.approveId}}</div>
<div class="todo-division">閮ㄩ棬锛歿{item.approveDeptName}}</div>
- <div class="todo-time">{{item.approveTime}}</div>
+ <div class="todo-time">{{ formatDateOnly(item.approveTime) }}</div>
</div>
<div class="todo-division">寰呭姙浜嬬敱锛歿{item.approveReason}}</div>
</div>
diff --git a/src/views/reportAnalysis/qualityAnalysis/components/center-center.vue b/src/views/reportAnalysis/qualityAnalysis/components/center-center.vue
index 8d28f7a..704822b 100644
--- a/src/views/reportAnalysis/qualityAnalysis/components/center-center.vue
+++ b/src/views/reportAnalysis/qualityAnalysis/components/center-center.vue
@@ -16,7 +16,7 @@
</div>
<div class="warn-text" :title="item.title">{{ item.title }}</div>
<div class="warn-action" @click.stop="openWarning(item)">鏌ョ湅</div>
- <div class="warn-date">{{ item.date }}</div>
+ <div class="warn-date">{{ formatDateOnly(item.date) }}</div>
</div>
</div>
</div>
diff --git a/src/views/reportAnalysis/safetyDashboard/components/center-top.vue b/src/views/reportAnalysis/safetyDashboard/components/center-top.vue
index 278490a..c055197 100644
--- a/src/views/reportAnalysis/safetyDashboard/components/center-top.vue
+++ b/src/views/reportAnalysis/safetyDashboard/components/center-top.vue
@@ -59,7 +59,7 @@
</div>
<div class="event-meta">
<span>{{ item.location || '鈥�' }}</span>
- <span>{{ item.eventTime }}</span>
+ <span>{{ formatDateOnly(item.eventTime) }}</span>
</div>
</li>
</ul>
diff --git a/src/views/safeProduction/accidentReportingRecord/index.vue b/src/views/safeProduction/accidentReportingRecord/index.vue
index 5a6c345..5ca1db2 100644
--- a/src/views/safeProduction/accidentReportingRecord/index.vue
+++ b/src/views/safeProduction/accidentReportingRecord/index.vue
@@ -224,7 +224,7 @@
<span>{{ currentKnowledge.accidentName }}</span>
</el-descriptions-item>
<el-descriptions-item label="浜嬫晠鍙戠敓鏃堕棿">
- {{ currentKnowledge.happenTime }}
+ {{ formatDateOnly(currentKnowledge.happenTime) }}
</el-descriptions-item>
<el-descriptions-item label="浜嬫晠鍙戠敓鍦扮偣">
{{ currentKnowledge.happenLocation }}
@@ -245,7 +245,7 @@
{{ currentKnowledge.createUserName }}
</el-descriptions-item>
<el-descriptions-item label="涓婃姤鏃堕棿">
- {{ currentKnowledge.createTime }}
+ {{ formatDateOnly(currentKnowledge.createTime) }}
</el-descriptions-item>
</el-descriptions>
<div class="detail-section">
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index a278058..e2959e4 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -296,7 +296,7 @@
<span class="detail-title">{{ form.createUserName }}</span>
</el-descriptions-item>
<el-descriptions-item label="涓婃姤鏃堕棿">
- <span class="detail-title">{{ form.createTime }}</span>
+ <span class="detail-title">{{ formatDateOnly(form.createTime) }}</span>
</el-descriptions-item>
<el-descriptions-item label="鏁存敼璐d换浜�">
<span class="detail-title">{{ form.rectifyUserName }}</span>
@@ -305,7 +305,7 @@
<span class="detail-title">{{ form.rectifyUserMobile }}</span>
</el-descriptions-item>
<el-descriptions-item label="鏁存敼瀹屾垚鏈熼檺">
- <span class="detail-title">{{ form.rectifyTime }}</span>
+ <span class="detail-title">{{ formatDateOnly(form.rectifyTime) }}</span>
</el-descriptions-item>
</el-descriptions>
<div class="classtitle"
@@ -320,7 +320,7 @@
<span class="detail-title">{{ form2.rectifyMeasures }}</span>
</el-descriptions-item>
<el-descriptions-item label="瀹為檯鏁存敼瀹屾垚鏃堕棿">
- <span class="detail-title">{{ form2.rectifyActualTime }}</span>
+ <span class="detail-title">{{ formatDateOnly(form2.rectifyActualTime) }}</span>
</el-descriptions-item>
</el-descriptions>
<div class="classtitle"
diff --git a/src/views/safeProduction/emergencyPlanReview/index.vue b/src/views/safeProduction/emergencyPlanReview/index.vue
index 1850c18..d97d05c 100644
--- a/src/views/safeProduction/emergencyPlanReview/index.vue
+++ b/src/views/safeProduction/emergencyPlanReview/index.vue
@@ -187,7 +187,7 @@
<span>{{ currentKnowledge.planCode }}</span>
</el-descriptions-item>
<el-descriptions-item label="鍙戝竷鐢熸晥鏃堕棿">
- {{ currentKnowledge.publishTime }}
+ {{ formatDateOnly(currentKnowledge.publishTime) }}
</el-descriptions-item>
<el-descriptions-item label="鏍稿績璐d换浜�">
{{ currentKnowledge.coreResponsorUserName }}
diff --git a/src/views/safeProduction/hazardousMaterialsControl/index.vue b/src/views/safeProduction/hazardousMaterialsControl/index.vue
index e43b4f6..8327f0f 100644
--- a/src/views/safeProduction/hazardousMaterialsControl/index.vue
+++ b/src/views/safeProduction/hazardousMaterialsControl/index.vue
@@ -178,7 +178,7 @@
<span>{{ form.applyPurpose }}</span>
</el-descriptions-item>
<el-descriptions-item label="棰嗙敤鏃堕棿">
- <span>{{ form.applyTime }}</span>
+ <span>{{ formatDateOnly(form.applyTime) }}</span>
</el-descriptions-item>
<el-descriptions-item label="棰嗙敤鏁伴噺">
<span>{{ form.applyQty }}</span>
@@ -192,7 +192,7 @@
</el-descriptions-item>
<el-descriptions-item v-if="dialogType === 'view' && form.returnTime"
label="褰掕繕鏃堕棿">
- <span>{{ form.returnTime }}</span>
+ <span>{{ formatDateOnly(form.returnTime) }}</span>
</el-descriptions-item>
<el-descriptions-item v-if="dialogType === 'view' && form.returnUserId"
label="褰掕繕鎯呭喌璇存槑">
diff --git a/src/views/safeProduction/safeWorkApproval/components/approvalDia.vue b/src/views/safeProduction/safeWorkApproval/components/approvalDia.vue
index 8d40a2e..0db2b84 100644
--- a/src/views/safeProduction/safeWorkApproval/components/approvalDia.vue
+++ b/src/views/safeProduction/safeWorkApproval/components/approvalDia.vue
@@ -98,8 +98,8 @@
<el-descriptions-item label="鎶ヤ环鍗曞彿">{{ currentQuotation.quotationNo }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ currentQuotation.customer }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍛�">{{ currentQuotation.salesperson }}</el-descriptions-item>
- <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ currentQuotation.quotationDate }}</el-descriptions-item>
- <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ currentQuotation.validDate }}</el-descriptions-item>
+ <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ formatDateOnly(currentQuotation.quotationDate) }}</el-descriptions-item>
+ <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ formatDateOnly(currentQuotation.validDate) }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentQuotation.paymentMethod }}</el-descriptions-item>
<el-descriptions-item label="鎶ヤ环鎬婚"
:span="2">
@@ -158,8 +158,8 @@
<el-descriptions-item label="渚涘簲鍟嗗悕绉�">{{ currentPurchase.supplierName }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ currentPurchase.projectName }}</el-descriptions-item>
<el-descriptions-item label="閿�鍞悎鍚屽彿">{{ currentPurchase.salesContractNo }}</el-descriptions-item>
- <el-descriptions-item label="绛捐鏃ユ湡">{{ currentPurchase.executionDate }}</el-descriptions-item>
- <el-descriptions-item label="褰曞叆鏃ユ湡">{{ currentPurchase.entryDate }}</el-descriptions-item>
+ <el-descriptions-item label="绛捐鏃ユ湡">{{ formatDateOnly(currentPurchase.executionDate) }}</el-descriptions-item>
+ <el-descriptions-item label="褰曞叆鏃ユ湡">{{ formatDateOnly(currentPurchase.entryDate) }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentPurchase.paymentMethod }}</el-descriptions-item>
<el-descriptions-item label="鍚堝悓閲戦"
:span="2">
diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
index 59814ec..107e064 100644
--- a/src/views/salesManagement/deliveryLedger/index.vue
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -278,9 +278,7 @@
<el-descriptions-item label="鍙戣揣绫诲瀷">{{
detailRow.type || "--"
}}</el-descriptions-item>
- <el-descriptions-item label="鍙戣揣鏃ユ湡">{{
- detailRow.shippingDate || "--"
- }}</el-descriptions-item>
+ <el-descriptions-item label="鍙戣揣鏃ユ湡">{{ formatDateOnly(detailRow.shippingDate || "--") }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳鐘舵��">{{
getApprovalStatusText(detailRow.status)
}}</el-descriptions-item>
diff --git a/src/views/salesManagement/returnOrder/components/detailDia.vue b/src/views/salesManagement/returnOrder/components/detailDia.vue
index fc42832..947e6dc 100644
--- a/src/views/salesManagement/returnOrder/components/detailDia.vue
+++ b/src/views/salesManagement/returnOrder/components/detailDia.vue
@@ -15,7 +15,7 @@
<el-descriptions-item v-if="String(detail.shippingType) === '1'" label="鍙戣揣杞︾墝鍙�">{{ detail.truckPlateNo || "--" }}</el-descriptions-item>
<!-- <el-descriptions-item label="椤圭洰鍚嶇О">{{ detail.projectName }}</el-descriptions-item> -->
<el-descriptions-item label="鍒跺崟浜�">{{ detail.maker }}</el-descriptions-item>
- <el-descriptions-item label="鍒跺崟鏃堕棿">{{ detail.makeTime }}</el-descriptions-item>
+ <el-descriptions-item label="鍒跺崟鏃堕棿">{{ formatDateOnly(detail.makeTime) }}</el-descriptions-item>
<el-descriptions-item label="閫�璐у師鍥�">{{ detail.returnReason }}</el-descriptions-item>
<el-descriptions-item label="閫�娆炬�婚">{{ detail.refundAmount }}</el-descriptions-item>
</el-descriptions>
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index a4cc295..c4c124e 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -148,7 +148,7 @@
<template #default="scope">
<div>
<div v-if="scope.row.shippingDate">
- {{ scope.row.shippingDate }}
+ {{ formatDateOnly(scope.row.shippingDate) }}
</div>
<el-tag v-else type="info">- </el-tag>
</div>
@@ -938,7 +938,7 @@
<div class="info-row">
<div>
<span class="label">鍙戣揣鏃ユ湡锛�</span>
- <span class="value">{{ formatDate(item.createTime) }}</span>
+ <span class="value">{{ formatDateOnly(formatDate(item.createTime)) }}</span>
</div>
<div>
<span class="label">鍙戣揣杞︾墝鍙凤細</span>
@@ -2533,17 +2533,14 @@
// 鏍煎紡鍖栨棩鏈�
const formatDate = (dateString) => {
if (!dateString) return getCurrentDate();
- return dayjs(dateString).format("YYYY/MM/DD HH:mm:ss");
+ return dayjs(dateString).format("YYYY/MM/DD");
};
-// 鏍煎紡鍖栨棩鏈熸椂闂�
+// 鏍煎紡鍖栨棩鏈燂紙鎵撳嵃鐢紝涓嶅睍绀烘椂鍒嗙锛�
const formatDateTime = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
- const hours = String(date.getHours()).padStart(2, "0");
- const minutes = String(date.getMinutes()).padStart(2, "0");
- const seconds = String(date.getSeconds()).padStart(2, "0");
- return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;
+ return `${year}/${month}/${day}`;
};
// 璁$畻浜у搧鎬绘暟閲�
const getTotalQuantity = (products) => {
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index fce764f..d02500a 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -260,8 +260,8 @@
<el-descriptions-item label="鎶ヤ环鍗曞彿">{{ currentQuotation.quotationNo }}</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{ currentQuotation.customer }}</el-descriptions-item>
<el-descriptions-item label="涓氬姟鍛�">{{ currentQuotation.salesperson }}</el-descriptions-item>
- <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ currentQuotation.quotationDate }}</el-descriptions-item>
- <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ currentQuotation.validDate }}</el-descriptions-item>
+ <el-descriptions-item label="鎶ヤ环鏃ユ湡">{{ formatDateOnly(currentQuotation.quotationDate) }}</el-descriptions-item>
+ <el-descriptions-item label="鏈夋晥鏈熻嚦">{{ formatDateOnly(currentQuotation.validDate) }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentQuotation.paymentMethod }}</el-descriptions-item>
<!-- <el-descriptions-item label="鎶ヤ环鐘舵��">-->
<!-- <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
diff --git a/src/views/salesManagement/strategyControl/index.vue b/src/views/salesManagement/strategyControl/index.vue
index dbdae38..837ccf9 100644
--- a/src/views/salesManagement/strategyControl/index.vue
+++ b/src/views/salesManagement/strategyControl/index.vue
@@ -63,7 +63,7 @@
</el-table-column>
<el-table-column prop="validPeriod" label="鏈夋晥鏈�" width="200">
<template #default="scope">
- {{ scope.row.startDate }} 鑷� {{ scope.row.endDate }}
+ {{ formatDateOnly(scope.row.startDate) }} 鑷� {{ formatDateOnly(scope.row.endDate) }}
</template>
</el-table-column>
<el-table-column prop="status" label="鐘舵��" width="80">
diff --git a/src/views/system/appVersion/index.vue b/src/views/system/appVersion/index.vue
index 6ff9ae6..5980ce9 100644
--- a/src/views/system/appVersion/index.vue
+++ b/src/views/system/appVersion/index.vue
@@ -12,12 +12,12 @@
<el-table-column label="鐗堟湰鍙�" prop="version" align="center" width="120"/>
<el-table-column label="鍒涘缓鏃堕棿" prop="createTime" align="center" width="170">
<template #default="scope">
- <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
+ <span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="鏇存柊鏃堕棿" prop="updateTime" align="center" width="170">
<template #default="scope">
- <span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
+ <span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="鍒涘缓浜�" prop="createUser" align="center" width="100"/>
diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index d27c25b..15e9d8b 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -35,7 +35,7 @@
</li>
<li class="list-group-item">
<svg-icon icon-class="date" />鍒涘缓鏃ユ湡
- <div class="pull-right">{{ state.user.createTime }}</div>
+ <div class="pull-right">{{ formatDateOnly(state.user.createTime) }}</div>
</li>
</ul>
</div>
--
Gitblit v1.9.3