车间能级提升-智能设备管理系统
baoshiwei
2025-06-20 6c16a58b5b7f38ce9e370eab160b516c058da6e2
feat(eims): 优化点检记录和点检汇总查询
已修改4个文件
143 ■■■■■ 文件已修改
eims-ui/apps/web-antd/src/views/eims/insp-record/data.tsx 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
eims-ui/apps/web-antd/src/views/eims/insp-record/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
eims-ui/apps/web-antd/src/views/eims/insp-st/data.tsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
eims-ui/apps/web-antd/src/views/eims/insp-st/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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',
    // 在drawer里更新 这里不需要默认的componentProps
    defaultValue: undefined,
    fieldName: 'inspDept',
    label: '点检部门'
  },
  {
    component: 'Select',
    componentProps: {
      allowClear: true,
      showSearch: true,
      getPopupContainer
    },
    fieldName: 'inspUser',
    label: '点检人'
  }
  // {
  //   component: 'TreeSelect',
  //   // 在drawer里更新 这里不需要默认的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',
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 = {
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',
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 日视图和月视图后端已统一方法 前端可删除日视图多余配置