diff --git a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts index 2cbe8a4d3..0119f0e41 100644 --- a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts +++ b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts @@ -117,7 +117,36 @@ const crudSchemas = reactive([ componentProps: { type: 'datetimerange', valueFormat: 'YYYY-MM-DD HH:mm:ss', - defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)] + defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)], + shortcuts: [ + { + text: '近一周', + value: () => { + const end = new Date() + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) + return [start, end] + } + }, + { + text: '近一个月', + value: () => { + const end = new Date() + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) + return [start, end] + } + }, + { + text: '近三个月', + value: () => { + const end = new Date() + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) + return [start, end] + } + } + ] } } },