bpm:完善用户组的列表
parent
fe6adf693b
commit
9d9590212f
@ -1,9 +0,0 @@
|
|||||||
export type UserGroupVO = {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
memberUserIds: number[]
|
|
||||||
status: number
|
|
||||||
remark: string
|
|
||||||
createTime: string
|
|
||||||
}
|
|
||||||
@ -1,69 +1,63 @@
|
|||||||
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
|
import { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
// 表单校验
|
// 表单校验
|
||||||
export const rules = reactive({
|
export const rules = reactive({
|
||||||
name: [required]
|
name: [required],
|
||||||
|
description: [required],
|
||||||
|
memberUserIds: [required],
|
||||||
|
status: [required]
|
||||||
})
|
})
|
||||||
|
|
||||||
// CrudSchema
|
// CrudSchema
|
||||||
const crudSchemas = reactive<CrudSchema[]>([
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
{
|
primaryKey: 'id',
|
||||||
label: t('common.index'),
|
primaryType: 'id',
|
||||||
field: 'id',
|
primaryTitle: '编号',
|
||||||
type: 'index',
|
action: true,
|
||||||
form: {
|
columns: [
|
||||||
show: false
|
{
|
||||||
|
title: '组名',
|
||||||
|
field: 'name',
|
||||||
|
isSearch: true
|
||||||
},
|
},
|
||||||
detail: {
|
{
|
||||||
show: false
|
title: '成员',
|
||||||
}
|
field: 'memberUserIds',
|
||||||
},
|
table: {
|
||||||
{
|
slots: {
|
||||||
label: '组名',
|
default: 'memberUserIds_default'
|
||||||
field: 'name',
|
}
|
||||||
search: {
|
}
|
||||||
show: true
|
},
|
||||||
}
|
{
|
||||||
},
|
title: '描述',
|
||||||
{
|
field: 'description'
|
||||||
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
|
|
||||||
},
|
},
|
||||||
detail: {
|
{
|
||||||
show: false
|
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)
|
||||||
|
|||||||
Loading…
Reference in New Issue