From 6c16a58b5b7f38ce9e370eab160b516c058da6e2 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期五, 20 六月 2025 14:19:49 +0800
Subject: [PATCH] feat(eims): 优化点检记录和点检汇总查询

---
 eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue |   12 +++
 eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx  |  104 ++++++++++++++++++----------------
 eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx      |   21 ++++--
 eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue     |    6 +-
 4 files changed, 82 insertions(+), 61 deletions(-)

diff --git a/eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx b/eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx
index 44fef5b..404f8fa 100644
--- a/eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx
+++ b/eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx
@@ -8,54 +8,59 @@
 import { renderDict } from '#/utils/render';
 
 export const querySchema: FormSchemaGetter = () => [
+  // {
+  //   component: 'Input',
+  //   fieldName: 'equName',
+  //   label: '璁惧鍚嶇О'
+  // },
+  // {
+  //   component: 'Input',
+  //   fieldName: 'assetNo',
+  //   label: '璧勪骇缂栧彿'
+  // },
   {
     component: 'Input',
-    fieldName: 'equName',
-    label: '璁惧鍚嶇О'
+    fieldName: 'params.searchValue',
+    label: '鍏抽敭瀛�'
   },
+  // {
+  //   component: 'Select',
+  //   componentProps: {
+  //     options: getDictOptions(DictEnum.EIMS_INSPECT_STATUS)
+  //   },
+  //   fieldName: 'status',
+  //   label: '鐘舵��'
+  // },
   {
-    component: 'Input',
-    fieldName: 'assetNo',
-    label: '璧勪骇缂栧彿'
-  },
-  {
-    component: 'Input',
-    fieldName: 'inspName',
-    label: '鐐规椤�'
-  },
-  {
-    component: 'Select',
-    componentProps: {
-      options: getDictOptions(DictEnum.EIMS_INSPECT_STATUS)
-    },
-    fieldName: 'status',
-    label: '鐘舵��'
+    component: 'RangePicker',
+    fieldName: 'planTime',
+    label: '鐐规鏃ユ湡'
   },
   {
     component: 'Select',
     componentProps: {
       options: getDictOptions(DictEnum.EIMS_INSPECT_RESULT)
     },
-    fieldName: 'maintType',
+    fieldName: 'inspResult',
     label: '鐐规缁撴灉'
-  },
-  {
-    component: 'TreeSelect',
-    // 鍦╠rawer閲屾洿鏂� 杩欓噷涓嶉渶瑕侀粯璁ょ殑componentProps
-    defaultValue: undefined,
-    fieldName: 'inspDept',
-    label: '鐐规閮ㄩ棬'
-  },
-  {
-    component: 'Select',
-    componentProps: {
-      allowClear: true,
-      showSearch: true,
-      getPopupContainer
-    },
-    fieldName: 'inspUser',
-    label: '鐐规浜�'
   }
+  // {
+  //   component: 'TreeSelect',
+  //   // 鍦╠rawer閲屾洿鏂� 杩欓噷涓嶉渶瑕侀粯璁ょ殑componentProps
+  //   defaultValue: undefined,
+  //   fieldName: 'inspDept',
+  //   label: '鐐规閮ㄩ棬'
+  // },
+  // {
+  //   component: 'Select',
+  //   componentProps: {
+  //     allowClear: true,
+  //     showSearch: true,
+  //     getPopupContainer
+  //   },
+  //   fieldName: 'inspUser',
+  //   label: '鐐规浜�'
+  // }
 ];
 
 export const columns: VxeGridProps['columns'] = [
@@ -103,15 +108,20 @@
       }
     }
   },
+  // {
+  //   title: '鐐规绫诲瀷',
+  //   field: 'inspType',
+  //   minWidth: 120,
+  //   slots: {
+  //     default: ({ row }) => {
+  //       return renderDict(row.inspType, DictEnum.EIMS_INSPECT_TYPE);
+  //     }
+  //   }
+  // },
   {
-    title: '鐐规绫诲瀷',
-    field: 'inspType',
-    minWidth: 120,
-    slots: {
-      default: ({ row }) => {
-        return renderDict(row.inspType, DictEnum.EIMS_INSPECT_TYPE);
-      }
-    }
+    title: '鐐规鎻忚堪',
+    field: 'inspDesc',
+    minWidth: 200
   },
   {
     title: '鐐规浜�',
@@ -128,11 +138,7 @@
     field: 'inspTime',
     minWidth: 200
   },
-  {
-    title: '鐐规鎻忚堪',
-    field: 'inspDesc',
-    minWidth: 200
-  },
+
   {
     title: '楠岃瘉浜�',
     field: 'verifyUserName',
diff --git a/eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue b/eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue
index 6f7549b..a33c9e3 100644
--- a/eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue
+++ b/eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue
@@ -30,7 +30,17 @@
   },
   collapsed: true,
   schema: querySchema(),
-  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4'
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
+  handleReset: async () => {
+    // eslint-disable-next-line no-use-before-define
+    const { formApi, reload } = tableApi;
+    await formApi.resetForm();
+    const formValues = formApi.form.values;
+    formApi.setLatestSubmissionValues(formValues);
+    await reload(formValues);
+  },
+  // 鏃ユ湡閫夋嫨鏍煎紡鍖�
+  fieldMappingTime: [['planTime', ['params[beginPlanTime]', 'params[endPlanTime]'], ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59']]]
 };
 
 const gridOptions: VxeGridProps = {
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 fee6672..bd70f6d 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,25 @@
 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',
+    label: '鍏抽敭瀛�'
   },
   {
     component: 'RangePicker',
     fieldName: 'planTime',
-    label: '淇濆吇鏃ユ湡'
+    label: '鐐规鏃ユ湡'
   },
   {
     component: 'Select',
diff --git a/eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue b/eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue
index 9f7a6cf..326139f 100644
--- a/eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue
+++ b/eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue
@@ -33,7 +33,7 @@
   Month = 'Month'
 }
 
-const curViewMode = ref<ViewMode>(ViewMode.Month);
+const curViewMode = ref<ViewMode>(ViewMode.Day);
 const formOptions: VbenFormProps = {
   commonConfig: {
     labelWidth: 80,
@@ -251,8 +251,8 @@
   return tableApi.grid.getCheckboxRecords();
 }
 
-const dayBtn = ref<any>('default');
-const monBtn = ref<any>('primary');
+const dayBtn = ref<any>('primary');
+const monBtn = ref<any>('default');
 
 function queryData(type: ViewMode) {
   // TODO 鏃ヨ鍥惧拰鏈堣鍥惧悗绔凡缁熶竴鏂规硶 鍓嶇鍙垹闄ゆ棩瑙嗗浘澶氫綑閰嶇疆

--
Gitblit v1.9.3