From d2e47d836d3ff31827ad15bc9ac61a5573229a7c Mon Sep 17 00:00:00 2001 From: zhangxiaolong Date: Mon, 11 Apr 2022 16:01:36 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3=E5=8F=8A=E5=85=B6=E5=AE=83?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightBox/administration/backupsBox.vue | 28 ++---- .../common/table/settings/backupsTable.vue | 98 +++++-------------- .../src/components/page/config/backups.vue | 57 ++++++++++- 3 files changed, 85 insertions(+), 98 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue b/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue index d4b9fb6ac..eb0e221df 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue @@ -316,6 +316,7 @@ export default { } this.editBackup.nums = nums; } else if (this.editBackup.type == 4) { + const nums = []; this.editBackup.nums = []; this.editBackup.checkDays.forEach((e, i) => { @@ -441,15 +442,17 @@ export default { this.checkDay = []; if (this.editBackup.type == 3) { this.editBackup.nums.forEach((e) => { - checkdays.push(e - 1); - if (e === -1) { - checkdays.push(6); + if (e == -1 ) { + checkdays.push(6); + }else{ + checkdays.push(e - 1); + } }); this.$set(this.editBackup, "checkDay", checkdays); } else if (this.editBackup.type == 4) { this.editBackup.nums.forEach((e) => { - if (e === -1) { + if (e == -1) { checkdays.push(31); } else { checkdays.push(e - 1); @@ -474,23 +477,6 @@ export default { } }, }, - "editBackup.checkDay": { - deep: true, - handler(n) { - n.forEach((e, i) => { - if (e === 6) { - this.editBackup.checkDay[i] = -1; - } - }); - const nums = []; - this.editBackup.nums = []; - this.editBackup.checkDay.forEach((e, i) => { - nums.push(Number(i) + 1); - }); - - this.editBackup.nums = nums; - }, - }, "editBackup.datepicker": { deep: true, handler(n) { diff --git a/nezha-fronted/src/components/common/table/settings/backupsTable.vue b/nezha-fronted/src/components/common/table/settings/backupsTable.vue index 5e94f2c83..7084bec2c 100644 --- a/nezha-fronted/src/components/common/table/settings/backupsTable.vue +++ b/nezha-fronted/src/components/common/table/settings/backupsTable.vue @@ -65,7 +65,7 @@