diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index be71517c..8452fba6 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -23,8 +23,6 @@ declare module '@vue/runtime-core' { DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] - ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] - ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] @@ -35,7 +33,6 @@ declare module '@vue/runtime-core' { ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] - ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] @@ -54,7 +51,6 @@ declare module '@vue/runtime-core' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] @@ -62,26 +58,16 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] - ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTableV2: typeof import('element-plus/es')['ElTableV2'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] - ElTag: typeof import('element-plus/es')['ElTag'] - ElTimeline: typeof import('element-plus/es')['ElTimeline'] - ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTransfer: typeof import('element-plus/es')['ElTransfer'] - ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] Error: typeof import('./../components/Error/src/Error.vue')['default'] diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts deleted file mode 100644 index c6945841..00000000 --- a/src/views/system/dept/dept.data.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - sort: [required], - // email: [required], - email: [ - { required: true, message: t('profile.rules.mail'), trigger: 'blur' }, - { - type: 'email', - message: t('profile.rules.truemail'), - trigger: ['blur', 'change'] - } - ], - phone: [ - { - len: 11, - trigger: 'blur', - message: '请输入正确的手机号码' - } - ] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '上级部门', - field: 'parentId', - isTable: false - }, - { - title: '部门名称', - field: 'name', - isSearch: true, - table: { - treeNode: true, - align: 'left' - } - }, - { - title: '负责人', - field: 'leaderUserId', - table: { - slots: { - default: 'leaderUserId_default' - } - } - }, - { - title: '联系电话', - field: 'phone' - }, - { - title: '邮箱', - field: 'email', - isTable: false - }, - { - title: '显示排序', - field: 'sort' - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/dept/form.vue b/src/views/system/dept/form.vue new file mode 100644 index 00000000..fbbcab59 --- /dev/null +++ b/src/views/system/dept/form.vue @@ -0,0 +1,195 @@ + + + diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 3b182e2a..bfd12256 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,174 +1,180 @@