gaoluyang
8 天以前 caddfd7efaabf86eb2348ae33d9b7a2281a2b167
src/views/system/user/data.ts
@@ -2,10 +2,10 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemUserApi } from '#/api/system/user';
import { CommonStatusEnum, DICT_TYPE } from '../../../packages/constants/src';
import { getDictOptions } from '../../../packages/effects/hooks/src';
import { $t } from '../../../packages/locales/src';
import { handleTree } from '../../../packages/utils/src';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { $t } from '@vben/locales';
import { handleTree } from '@vben/utils';
import { z } from '#/adapter/form';
import { getDeptList } from '#/api/system/dept';
@@ -26,10 +26,10 @@
    },
    {
      fieldName: 'username',
      label: '用户名称',
      label: '用户账号',
      component: 'Input',
      componentProps: {
        placeholder: '请输入用户名称',
        placeholder: '请输入用户账号(4-30 位数字、字母)',
      },
      rules: 'required',
    },
@@ -72,6 +72,7 @@
      fieldName: 'postIds',
      label: '岗位',
      component: 'ApiSelect',
      rules: 'required',
      componentProps: {
        api: getSimplePostList,
        labelField: 'name',
@@ -203,7 +204,7 @@
    },
    {
      fieldName: 'username',
      label: '用户名称',
      label: '用户账号',
      component: 'Input',
      componentProps: {
        disabled: true,
@@ -240,7 +241,7 @@
      label: '用户数据',
      component: 'Upload',
      rules: 'required',
      help: '仅允许导入 xls、xlsx 格式文件',
      help: '仅允许导入 xls、xlsx 格式文件;请先下载导入模板,按模板列(用户账号、用户昵称、部门、岗位等)填写',
    },
    {
      fieldName: 'updateSupport',
@@ -251,7 +252,7 @@
        unCheckedChildren: '否',
      },
      rules: z.boolean().default(false),
      help: '是否更新已经存在的用户数据',
      help: '勾选后,用户账号已存在的行会更新该用户信息(不会修改其密码)',
    },
  ];
}
@@ -261,10 +262,10 @@
  return [
    {
      fieldName: 'username',
      label: '用户名称',
      label: '用户账号',
      component: 'Input',
      componentProps: {
        placeholder: '请输入用户名称',
        placeholder: '请输入用户账号',
        allowClear: true,
      },
    },
@@ -305,7 +306,7 @@
    },
    {
      field: 'username',
      title: '用户名称',
      title: '用户账号',
      minWidth: 120,
    },
    {
@@ -341,7 +342,7 @@
      field: 'createTime',
      title: '创建时间',
      minWidth: 180,
      formatter: 'formatDateTime',
      formatter: 'formatDate',
    },
    {
      title: '操作',