feat(property): 人员管理增加人员标签功能
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -5,31 +5,16 @@ import { DictEnum } from '@vben/constants';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { personLibList } from '#/api/sis/personLib';
|
||||
import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model';
|
||||
import { renderDict } from '#/utils/render'
|
||||
import { log } from 'console'
|
||||
|
||||
let libArr: PersonLibVO[] = [];
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '图片库',
|
||||
fieldName: 'libId',
|
||||
component: 'ApiSelect',
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
resultField: 'list', // 根据API返回结构调整
|
||||
labelField: 'libName',
|
||||
valueField: 'id',
|
||||
// immediate: true,
|
||||
api: async () => {
|
||||
if (!libArr || libArr.length == 0) {
|
||||
const params: PersonLibQuery = {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
};
|
||||
const res = await personLibList(params);
|
||||
libArr = res.rows;
|
||||
}
|
||||
return libArr;
|
||||
},
|
||||
options: getDictOptions('roster_type'),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -63,6 +48,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '性别',
|
||||
field: 'sex',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.sex, 'sys_user_sex')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
@@ -75,6 +65,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '证件类型',
|
||||
field: 'certificateType',
|
||||
slots:{
|
||||
default: ({row}) =>{
|
||||
return renderDict(row.certificateType, 'sys_certificate_type')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '证件号码',
|
||||
@@ -84,6 +79,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '出生日期',
|
||||
field: 'birthDate',
|
||||
},
|
||||
{
|
||||
title: '人员标签',
|
||||
field: 'rosterType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.rosterType, 'roster_type')
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
@@ -93,29 +98,19 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
];
|
||||
|
||||
const test = getDictOptions('roster_type');
|
||||
test.forEach(item => {
|
||||
console.log('item',item)
|
||||
});
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '图片库',
|
||||
fieldName: 'libIds',
|
||||
component: 'ApiSelect',
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
resultField: 'list', // 根据API返回结构调整
|
||||
labelField: 'libName',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
// immediate: true,
|
||||
api: async () => {
|
||||
if (!libArr || libArr.length == 0) {
|
||||
const params: PersonLibQuery = {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
};
|
||||
const res = await personLibList(params);
|
||||
libArr = res.rows;
|
||||
}
|
||||
return libArr;
|
||||
},
|
||||
options: getDictOptions('roster_type'),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user