From 93e6b6b0b5922fb57233f3ee59de2bf59ceebf1b Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期五, 12 八月 2022 19:11:11 +0800
Subject: [PATCH] 对接

---
 src/views/goalManagement/targetDecompositionYear/component/Dailog.vue |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue b/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
index a9a2932..6f1c6b2 100644
--- a/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
+++ b/src/views/goalManagement/targetDecompositionYear/component/Dailog.vue
@@ -96,11 +96,27 @@
 						if (res.data.code == 200) {
 							form.value = res.data.data;
 							formUp.targetDivideDetailList = form.value.targetDivideDetailList;
+							for(let i=0;i<formUp.targetDivideDetailList.length;i++){
+								formUp.targetDivideDetailList[i].makeDate=timeC(formUp.targetDivideDetailList[i].makeDate)
+							}
 						} else {
 							ElMessage.error(res.data.msg);
 						}
 					});
 			}
+		};
+		const timeC = (timestamp: any) => {
+			let a = new Date(timestamp).getTime();
+			const date = new Date(a);
+			const Y = date.getFullYear() + '-';
+			const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+			const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '  ';
+			const h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+			const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
+			const s = date.getSeconds(); // 秒
+			const dateString = Y + M + D + h + m +`:${s}`;
+			// console.log('dateString', dateString); // > dateString 2021-07-06 14:23
+			return dateString;
 		};
 		const onNumber = (val: object) => {
 			form.value = val;
@@ -209,6 +225,7 @@
 		// 	return result;
 		// };
 		return {
+			timeC,
 			index,
 			timeDate,
 			arr,

--
Gitblit v1.9.2