gaoluyang
3 天以前 534533425b15b183cea60fa162d9884e5d3c6243
src/views/basicData/mdm/unit/data.ts
@@ -119,7 +119,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',
@@ -128,4 +128,28 @@
      slots: { default: 'actions' },
    },
  ];
}
/** 计量单位导入的表单 */
export function useImportFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'file',
      label: '单位数据',
      component: 'Upload',
      rules: 'required',
      help: '仅允许导入 xls、xlsx 格式文件',
    },
    {
      fieldName: 'updateSupport',
      label: '是否覆盖',
      component: 'Switch',
      componentProps: {
        checkedChildren: '是',
        unCheckedChildren: '否',
      },
      rules: z.boolean().default(false),
      help: '是否更新已经存在的单位数据',
    },
  ];
}