From b6d533f17a997e58133b825c5bbcc5ed3f2e5579 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期二, 01 七月 2025 13:19:33 +0800
Subject: [PATCH] fix(eims): 修复计划生成逻辑
---
eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx | 48 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx b/eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx
index e4de7f4..d39145f 100644
--- a/eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx
+++ b/eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx
@@ -10,20 +10,28 @@
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
+ // {
+ // component: 'Input',
+ // fieldName: 'title',
+ // label: '鏍囬'
+ // },
+ // {
+ // component: 'Input',
+ // fieldName: 'assetNo',
+ // label: '璧勪骇缂栧彿'
+ // },
{
component: 'Input',
- fieldName: 'title',
- label: '鏍囬'
- },
- {
- component: 'Input',
- fieldName: 'assetNo',
- label: '璧勪骇缂栧彿'
+ fieldName: 'params.searchValue',
+ componentProps: {
+ placeholder: '璇疯緭鍏ヨ澶囧悕绉版垨璧勪骇缂栧彿'
+ },
+ label: '鍏抽敭瀛�'
},
{
component: 'RangePicker',
fieldName: 'planTime',
- label: '淇濆吇鏃ユ湡'
+ label: '鐐规鏃ユ湡'
},
{
component: 'Select',
@@ -44,9 +52,26 @@
fixed: 'left'
},
{
- title: '淇濆吇骞存湀',
- field: 'planTime',
- minWidth: 120
+ title: '淇濆吇鏃堕棿',
+ field: 'planTimeStr',
+ 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: '鐘舵��',
@@ -54,6 +79,7 @@
minWidth: 80,
slots: {
default: ({ row }) => {
+ if (!row.status) return '';
return renderDict(row.status, DictEnum.EIMS_INSPECT_STATUS);
}
}
--
Gitblit v1.9.3