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';