From 9a61e46d96536f3299e57f7259ae1c9972256ec6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 九月 2025 09:42:09 +0800
Subject: [PATCH] 1. 隐藏未完成的账户匹配页面 2. 根据第三方新的接口文档修改接口url地址
---
src/utils/time-util.js | 48 ++++++++++++++++++++++++++++++++++++------------
1 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/src/utils/time-util.js b/src/utils/time-util.js
index 9f62dcb..e126941 100644
--- a/src/utils/time-util.js
+++ b/src/utils/time-util.js
@@ -1,31 +1,55 @@
-import dayjs from "dayjs";
+import dayjs from 'dayjs';
export default {
format(date, template) {
- return dayjs(date).format(template)
+ return dayjs(date).format(template);
},
- formatH(date){
+ formatH(date) {
if (date) {
- return this.format(date, 'HH:mm:ss')
+ return this.format(date, 'HH:mm:ss');
} else {
- return '--:--:--'
+ return '--:--:--';
}
},
- formatYMD(date){
+ formatYM(date) {
if (date) {
- return this.format(date, 'YYYY-MM-DD')
+ return this.format(date, 'YYYY-MM');
} else {
- return '----/--/--'
+ return '----/--';
}
},
- formatYMDH(date){
+ formatYMD(date) {
if (date) {
- return this.format(date, 'YYYY-MM-DD HH:mm:ss')
+ return this.format(date, 'YYYY-MM-DD');
} else {
- return '----/--/-- --:--:--'
+ return '----/--/--';
}
},
-}
\ No newline at end of file
+
+ formatYMDH(date) {
+ if (date) {
+ return this.format(date, 'YYYY-MM-DD HH:mm:ss');
+ } else {
+ return '----/--/-- --:--:--';
+ }
+ },
+
+ formatDateFromExcel(num, format) {
+ const old = num - 1;
+ const t = Math.round((old - Math.floor(old)) * 24 * 60 * 60);
+ const time = new Date(1900, 0, old, 0, 0, t);
+ const year = time.getFullYear();
+ const month = time.getMonth() + 1;
+ const date = time.getDate();
+ return dayjs(
+ year +
+ format +
+ (month < 10 ? '0' + month : month) +
+ format +
+ (date < 10 ? '0' + date : date)
+ );
+ }
+};
--
Gitblit v1.9.3