From f29e2aae98bbb52672b67bff99556f3cf64d1bce Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期四, 26 六月 2025 15:45:40 +0800 Subject: [PATCH] feat(eims): 优化设备管理功能和界面 --- eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx | 43 ++++++++++++++++++++++++++++++++++--------- 1 files changed, 34 insertions(+), 9 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 7fd40eb..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', @@ -46,7 +54,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: '鐘舵��', -- Gitblit v1.9.3