From c53c25c26e543b99699b9d2e9464abf78a7e0c9e Mon Sep 17 00:00:00 2001 From: Dong Xia Date: Fri, 17 Feb 2023 09:46:27 +0000 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E8=8E=B7=E5=8F=96=E5=AE=A1?= =?UTF-8?q?=E8=AE=A1=E6=97=A5=E5=BF=97=E8=8C=83=E5=9B=B4=E4=B8=BA30?= =?UTF-8?q?=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dong Xia --- src/pages/audit/index.vue | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/pages/audit/index.vue b/src/pages/audit/index.vue index a525dbf..aa1412a 100644 --- a/src/pages/audit/index.vue +++ b/src/pages/audit/index.vue @@ -144,6 +144,25 @@ export default { calendarChange(val) { this.dates = val }, + disabledDate(current) { + if (this.dates.length === 0) return false + const disabledDate = this.dates[0] && Math.abs(dayjs(current).diff(this.dates[0], 'day')) > 30 + return disabledDate + }, + computedTime(key = 3) { + // 一天的时间戳 + const oneTimestamp = 24 * 60 * 60 * 1000 + // 现在的时间 + let nowTimestamp = new Date() + // 开始时间 + let startTime = parseTime(nowTimestamp - oneTimestamp * key) + // 结束时间 + let endTime = parseTime(nowTimestamp) + this.timeRange = [startTime, endTime] + this.isActive = key + this.open = false + this.getAuditList() + }, getAuditList() { this.loading = true const param = { -- Gitee