From fbed2160811e67c6037ca399d1987e7a1fa77def Mon Sep 17 00:00:00 2001 From: czx <28353131@qq.com> Date: Thu, 28 Jan 2021 16:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E6=82=A3=E6=8A=A5=E9=A4=90=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BF=AB=E6=8D=B7=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/fantang/mealsStatistics/index.vue | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/fantang/mealsStatistics/index.vue b/ruoyi-ui/src/views/fantang/mealsStatistics/index.vue index 648c0e65f..02bd413f9 100644 --- a/ruoyi-ui/src/views/fantang/mealsStatistics/index.vue +++ b/ruoyi-ui/src/views/fantang/mealsStatistics/index.vue @@ -4,9 +4,12 @@ + placeholder="选择报餐日期" + @change="handleQuery" + :picker-options="pickerOptions"> @@ -165,6 +168,32 @@ export default { components: {}, data() { return { + pickerOptions: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + shortcuts: [{ + text: '今天', + onClick(picker) { + picker.$emit('pick', new Date()); + } + }, { + text: '明天', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() + 3600 * 1000 * 24); + picker.$emit('pick', date); + } + }, { + text: '一周前', + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', date); + } + }] + }, + // 遮罩层 loading: true, // 选中数组