| | |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | |
| | | deadlineTime: { |
| | | label: '领取截止时间', |
| | | minWidth: 180, |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | addDisplay: true, // 新增时不显示 |
| | | minWidth: 200, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "领取截止时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | cancelTime: { |
| | | label: '作废时间', |
| | | minWidth: 180, |
| | |
| | | handleBeforeOpenFunc: (done: Function, type: string) => { |
| | | if (done == 'add') { |
| | | option.value.column.lockerNo.value = '接驳站智能钥匙柜' |
| | | option.value.column.deadlineTime.value =formatDateTime(new Date(Date.now() + 24 * 60 * 60 * 1000)); |
| | | |
| | | |
| | | } |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | |
| | | } |
| | | }) |
| | | |
| | | const formatDateTime = (date) => { |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(date.getDate()).padStart(2, '0'); |
| | | const hours = String(date.getHours()).padStart(2, '0'); |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | }; |
| | | // 在 script setup 部分定义防抖节流函数 |
| | | let debounceTimer: NodeJS.Timeout | null = null; |
| | | let throttleTimer: NodeJS.Timeout | null = null; |
| | | |
| | | // 防抖函数 |
| | | const debounce = (func: Function, delay: number) => { |
| | | return function (...args: any[]) { |