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, // 选中数组