From f0ee41a06c70feb12be14b50fc2ba8eeb20a023b Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 23 Sep 2022 09:20:06 +0800 Subject: [PATCH] =?UTF-8?q?pa=20=E6=97=B6=E9=97=B4=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/broadcast/stationHome.vue | 45 +++++++++++++++---- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue b/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue index 57dfc6360..2aa943298 100644 --- a/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue +++ b/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue @@ -427,7 +427,10 @@ export default { if (month < 10) { month = '0' + month; } - const day = new Date().getDate(); + let day = new Date().getDate(); + if (day < 10) { + day = '0' + day; + } this.addModel.startTime = year + '-' + month + '-' + day + ' 00:00:00'; this.addModel.endTime = year + '-' + month + '-' + day + ' 23:59:59'; this.addModel.delayTime = '00:01:00'; @@ -438,10 +441,22 @@ export default { if (month < 10) { month = '0' + month; } - const day = new Date().getDate(); - const hour = new Date().getHours(); - const minute = new Date().getMinutes(); - const second = new Date().getSeconds(); + let day = new Date().getDate(); + if (day < 10) { + day = '0' + day; + } + let hour = new Date().getHours(); + if (hour < 10) { + hour = '0' + hour; + } + let minute = new Date().getMinutes(); + if (minute < 10) { + minute = '0' + minute; + } + let second = new Date().getSeconds(); + if (second < 10) { + second = '0' + second; + } this.addModel.startTime = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second; this.addModel.endTime = ''; this.addModel.delayTime = ''; @@ -452,10 +467,22 @@ export default { if (month < 10) { month = '0' + month; } - const day = new Date().getDate(); - const hour = new Date().getHours(); - const minute = new Date().getMinutes(); - const second = new Date().getSeconds(); + let day = new Date().getDate(); + if (day < 10) { + day = '0' + day; + } + let hour = new Date().getHours(); + if (hour < 10) { + hour = '0' + hour; + } + let minute = new Date().getMinutes(); + if (minute < 10) { + minute = '0' + minute; + } + let second = new Date().getSeconds(); + if (second < 10) { + second = '0' + second; + } this.addModel.startTime = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second; this.addModel.endTime = ''; this.addModel.delayTime = '00:01:00';