diff --git a/src/views/system/post/form.vue b/src/views/system/post/form.vue index 065aecaf..d5d65dd1 100644 --- a/src/views/system/post/form.vue +++ b/src/views/system/post/form.vue @@ -1,81 +1,96 @@ diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index c5a13e1e..321b5ae3 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -1,71 +1,192 @@ - diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts deleted file mode 100644 index 4926bcc6..00000000 --- a/src/views/system/post/post.data.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - name: [required], - code: [required], - sort: [required] -}) - -// 增删改查 CrudSchema 配置 -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '岗位编号', - action: true, - columns: [ - { - title: '岗位名称', - field: 'name', - isSearch: true - }, - { - title: '岗位编码', - field: 'code', - isSearch: true - }, - { - title: '岗位顺序', - field: 'sort', - form: { - component: 'InputNumber' - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '备注', - field: 'remark', - isTable: false - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - table: { - width: 180 - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas)