feat(eims): 优化设备管理功能和界面
- 在 EimsFixtureImportVo 中添加备注字段- 调整维护计划生成工单的条件,从 10 天改为 1 天
- 在检验记录和检验状态页面的搜索框中添加占位符
- 优化移动端维护状态页面的计划时间提醒逻辑
| | |
| | | |
| | | const now = dayjs() |
| | | const planDate = dayjs(planTime) |
| | | const diffDays = planDate.diff(now, 'day') |
| | | |
| | | // 获取计划日期所在月份的最后一天 |
| | | const planMonthEnd = planDate.endOf('month') |
| | | |
| | | // 计算当前日期与计划月月底的差值(天数) |
| | | const diffDays = planMonthEnd.diff(now, 'day') |
| | | |
| | | if (diffDays < 0) { |
| | | // 超过计划时间,红色背景 |
| | | // 已经过了计划月的月底,红色背景 |
| | | return 'card-overdue' |
| | | } else if (diffDays <= 3) { |
| | | // 距离计划时间三天以内,黄色背景 |
| | | // 距离计划月月底3天以内,红色背景 |
| | | return 'card-overdue' |
| | | } else if (diffDays <= 10) { |
| | | // 距离计划月月底10天以内,黄色背景 |
| | | return 'card-urgent' |
| | | } else { |
| | | // 正常状态,背景颜色不变 |
| | |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'params.searchValue', |
| | | componentProps: { |
| | | placeholder: '请输入设备名称或资产编号' |
| | | }, |
| | | label: '关键字' |
| | | }, |
| | | // { |
| | |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'params.searchValue', |
| | | componentProps: { |
| | | placeholder: '请输入设备名称或资产编号' |
| | | }, |
| | | label: '关键字' |
| | | }, |
| | | { |
| | |
| | | @ColumnWidth(15) |
| | | private String power; |
| | | |
| | | |
| | | @ExcelProperty("备注") |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | Date oldNext = planVo.getMaintNextTime(); |
| | | int day = DateUtils.differentDays(today, oldNext); |
| | | // 如果计划生成工单日期大于今天则不生成工单 |
| | | if (day >= 10) { |
| | | if (day >= 1) { |
| | | continue; |
| | | } |
| | | |