eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx
@@ -46,7 +46,24 @@ { title: '保养时间', field: 'planTimeStr', minWidth: 200 minWidth: 200, slots: { default: ({ row }) => { // 判断是否需要显示时间 if (!row.type) return ''; // 获取原始时间字符串 const fullDate = row.planTimeStr; // 根据条件决定显示格式 // 示例条件:如果 status 是某个特定值(例如 'monthly'),则显示 YYYY-MM if (row.type === 'Month') { return fullDate.slice(0, 7); // 截取前 7 个字符,得到 YYYY-MM } // 默认显示完整日期 YYYY-MM-DD return fullDate; } } }, { title: '状态',