diff --git a/.gitignore b/.gitignore index 0b05e6a63fc87385c1aa6705768dbd1724535b60..ba12c39606b0daabe943e1eaddd9bdd9cafa6e45 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ dist-ssr *.local /dist* *-lock.* -pnpm-debug +pnpm-debug \ No newline at end of file diff --git a/src/views/system/dept/dept.data.ts b/src/views/system/dept/dept.data.ts deleted file mode 100644 index c694584196e107a92e48e46fe5025a681a645bbc..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..8d9405f3917dd4260573003586f2282b9265efc6 --- /dev/null +++ b/src/views/system/dept/form.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 4e70070f79bf9f35437f77704e3403d81e716173..de561a1faf125670ae48cbaed37cdd47d3841a39 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,172 +1,175 @@