From a417f4a8ccca4f533b24093e3ee0498fbe84950b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 13 May 2024 15:29:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=201.=E4=BF=AE=E5=A4=8Dreport=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=E6=95=B0=E6=8D=AE=E4=B8=8D=E6=98=AF=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B2.Time=20Limit?= =?UTF-8?q?=E9=80=89=E6=8B=A9customize=E6=97=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BC=80=E5=A7=8B/=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/rightBox/report/ReportBox.vue | 12 +++--------- src/views/report/Report.vue | 15 +++++++++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/components/rightBox/report/ReportBox.vue b/src/components/rightBox/report/ReportBox.vue index c77d8401..ac866f82 100644 --- a/src/components/rightBox/report/ReportBox.vue +++ b/src/components/rightBox/report/ReportBox.vue @@ -292,15 +292,9 @@ export default { if (time.getTime() > new Date()) { return true } - if (startTime.value !== '' && startTime.value > time) { - return true - } } const startDisabledDate = (time) => { - if (time.getTime() > new Date()) { - return true - } - if (endTime.value !== '' && endTime.value < time) { + if (time.getTime() > (new Date()).getTime()) { return true } } @@ -323,14 +317,14 @@ export default { } const startTimeValidator = (rule, value, callback) => { const form = proxy.$refs.reportForm - if (form.model && form.model.config && form.model.config.endTime) { + if (proxy.endTime || (proxy.editObject && proxy.editObject.config && proxy.editObject.config.endTime)) { form.validateField('config.endTime', () => null) } callback() } const endTimeValidator = (rule, value, callback) => { let validate = true - if (startTime.value !== '' && value <= startTime.value) { + if (startTime.value !== '' && endTime.value <= startTime.value) { validate = false } return validate diff --git a/src/views/report/Report.vue b/src/views/report/Report.vue index 491bd5e3..15302eb4 100644 --- a/src/views/report/Report.vue +++ b/src/views/report/Report.vue @@ -317,10 +317,17 @@ export default { type: 'warning' }).catch(() => {}) } else { - const curRecord = this.batchDeleteObjs[0] - this.initConfig(curRecord) - this.object = curRecord - this.rightBox.show = true + axios.get(`${this.url}/${this.batchDeleteObjs[0].id}`).then(response => { + if (response.status === 200) { + const curRecord = response.data.data + if (curRecord.config) { + curRecord.config = JSON.parse(curRecord.config) + } + this.initConfig(curRecord) + this.object = curRecord + this.rightBox.show = true + } + }) } }, initConfig (u) {