From 5e6aea30840206d6bc86291b4649651b2ac01897 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 24 八月 2022 15:57:30 +0800
Subject: [PATCH] 1.提交   新增开报工的维修人员   备注等

---
 src/utils/global.js |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/src/utils/global.js b/src/utils/global.js
index 9470685..81c59db 100644
--- a/src/utils/global.js
+++ b/src/utils/global.js
@@ -24,7 +24,7 @@
   return option
 }
 
-// 鏃堕棿澶勭悊鍑芥暟
+// 鏃堕棿澶勭悊鍑芥暟  骞存湀鏃�
 export function handleDatetime(value) {
   const data = new Date(value)
   const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1
@@ -32,6 +32,25 @@
   return data.getFullYear() + '-' + month + '-' + date
 }
 
+// 浜嬩欢澶勭悊鍑芥暟  鏃跺垎绉�
+// 鑾峰彇褰撳墠鏃堕棿
+export function handleDatetime2(value) {
+  const dt = new Date(value)
+  const wk = dt.getDay()
+  const y = dt.getFullYear()
+  const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+  const d = (dt.getDate() + '').padStart(2, '0')
+
+  const hh = (dt.getHours() + '').padStart(2, '0')
+  const mm = (dt.getMinutes() + '').padStart(2, '0')
+  const ss = (dt.getSeconds() + '').padStart(2, '0')
+  const weeks = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�']
+  const week = weeks[wk]
+
+  // return `${y}-${m}-${d}  ${hh}:${mm}:${ss}   ${week}`
+  return `${y}-${m}-${d}  ${hh}:${mm}:${ss}`
+}
+
 // 鑾峰彇瑙勫垯鐢熸垚鐨勭紪鐮�
 export async function getNewEncodingRules(encode) {
   const res = await NewEncodingRules({ rightcode: encode })

--
Gitblit v1.9.3