diff --git a/yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts b/yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts index e61ebf36d..88ee96197 100644 --- a/yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts +++ b/yudao-ui-admin-vue3/src/api/bpm/userGroup/index.ts @@ -1,5 +1,14 @@ import request from '@/config/axios' -import { UserGroupVO } from './types' + +export type UserGroupVO = { + id: number + name: string + description: string + memberUserIds: number[] + status: number + remark: string + createTime: string +} // 创建用户组 export const createUserGroupApi = async (data: UserGroupVO) => { diff --git a/yudao-ui-admin-vue3/src/api/bpm/userGroup/types.ts b/yudao-ui-admin-vue3/src/api/bpm/userGroup/types.ts deleted file mode 100644 index d0d67ad43..000000000 --- a/yudao-ui-admin-vue3/src/api/bpm/userGroup/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type UserGroupVO = { - id: number - name: string - description: string - memberUserIds: number[] - status: number - remark: string - createTime: string -} diff --git a/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts b/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts index a07a56596..b228ac95f 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts +++ b/yudao-ui-admin-vue3/src/views/bpm/form/form.data.ts @@ -33,7 +33,10 @@ const crudSchemas = reactive({ title: t('common.createTime'), field: 'createTime', formatter: 'formatDate', - isForm: false + isForm: false, + table: { + width: 180 + } } ] }) diff --git a/yudao-ui-admin-vue3/src/views/bpm/group/group.data.ts b/yudao-ui-admin-vue3/src/views/bpm/group/group.data.ts index 1964b1f8b..07f9b6aaf 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/group/group.data.ts +++ b/yudao-ui-admin-vue3/src/views/bpm/group/group.data.ts @@ -1,69 +1,63 @@ -import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' + const { t } = useI18n() // 国际化 // 表单校验 export const rules = reactive({ - name: [required] + name: [required], + description: [required], + memberUserIds: [required], + status: [required] }) // CrudSchema -const crudSchemas = reactive([ - { - label: t('common.index'), - field: 'id', - type: 'index', - form: { - show: false +const crudSchemas = reactive({ + primaryKey: 'id', + primaryType: 'id', + primaryTitle: '编号', + action: true, + columns: [ + { + title: '组名', + field: 'name', + isSearch: true }, - detail: { - show: false - } - }, - { - label: '组名', - field: 'name', - search: { - show: true - } - }, - { - label: '成员', - field: 'memberUserIds' - }, - { - label: '描述', - field: 'description' - }, - { - label: t('common.status'), - field: 'status', - dictType: DICT_TYPE.COMMON_STATUS, - dictClass: 'number' - }, - { - label: '备注', - field: 'remark', - table: { - show: false - } - }, - { - label: t('common.createTime'), - field: 'createTime', - form: { - show: false - } - }, - { - label: t('table.action'), - field: 'action', - width: '240px', - form: { - show: false + { + title: '成员', + field: 'memberUserIds', + table: { + slots: { + default: 'memberUserIds_default' + } + } }, - detail: { - show: false + { + title: '描述', + field: 'description' + }, + { + 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, + isSearch: true, + search: { + show: true, + itemRender: { + name: 'XDataTimePicker' + } + }, + table: { + width: 180 + } } - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/bpm/group/index.vue b/yudao-ui-admin-vue3/src/views/bpm/group/index.vue index ee3355f93..c6d9d484c 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/group/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/group/index.vue @@ -1,172 +1,46 @@ - -