From 15a40c01ab09810f0f79351f06d6951e305d8ec9 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期二, 10 六月 2025 16:21:43 +0800 Subject: [PATCH] 保养修改 --- src/views/eam/EquipmentMaintenancePlanList.vue | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/views/eam/EquipmentMaintenancePlanList.vue b/src/views/eam/EquipmentMaintenancePlanList.vue index 456f04d..35e1071 100644 --- a/src/views/eam/EquipmentMaintenancePlanList.vue +++ b/src/views/eam/EquipmentMaintenancePlanList.vue @@ -499,11 +499,33 @@ this.queryParam.endTime = '' } else { //鍚庣鎶ヨ繖涓敊rejected value ["2024-03-14T06:26:38.692Z"] - this.queryParam.beginTime = this.ranges[0].format('YYYY-MM-DD') - this.queryParam.endTime = this.ranges[1].format('YYYY-MM-DD') + // var beginTime = this.formattedTime(this.ranges[0]) + // this.queryParam.beginTime = this.ranges[0].format('YYYY-MM-DD') + // this.queryParam.endTime = this.ranges[1].format('YYYY-MM-DD') + this.queryParam.beginTime = this.formattedTime(this.ranges[0]) + this.queryParam.endTime = this.formattedTime(this.ranges[1]) } }, + formattedTime(originalTime) { + + // 鍒涘缓 Date 瀵硅薄 + const date = new Date(originalTime) + + // 妫�鏌� Date 瀵硅薄鏄惁鏈夋晥 + if (isNaN(date.getTime())) return '鏃犳晥鏃堕棿' + + // 鑾峰彇骞淬�佹湀銆佹棩銆佹椂銆佸垎 + 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}` + }, + } } </script> -- Gitblit v1.9.3