| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "安装位置", |
| | | prop: "instationLocation", |
| | | width: 150, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "检定单位", |
| | | prop: "unit", |
| | | width: 200, |
| | |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "检定周期(天)", |
| | | prop: "cycle", |
| | | label: "快到期提醒", |
| | | prop: "valid", |
| | | width: 130, |
| | | align:"center" |
| | | align: "center", |
| | | formatData: (cell) => { |
| | | if (!cell) return ""; |
| | | const validDate = new Date(cell); |
| | | const now = new Date(); |
| | | const diffDays = Math.ceil((validDate - now) / (1000 * 60 * 60 * 24)); |
| | | if (diffDays <= 7 && diffDays >= 0) { |
| | | return "⚠️ " + diffDays + "天后到期"; |
| | | } |
| | | return ""; |
| | | } |
| | | }, |
| | | { |
| | | label: "状态", |