处理人像页面BUG
This commit is contained in:
@@ -7,13 +7,17 @@ import { getPopupContainer } from '@vben/utils';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
|
||||
const rosterTypeOption = getDictOptions(DictEnum.ROSTER_TYPE, true);
|
||||
const userSexOption = getDictOptions(DictEnum.SYS_USER_SEX, true);
|
||||
const certificateOption = getDictOptions(DictEnum.SYS_CERTIFICATE_TYPE, true);
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '人员标签',
|
||||
fieldName: 'rosterType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('roster_type'),
|
||||
options: rosterTypeOption,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -25,7 +29,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.SYS_USER_SEX),
|
||||
options: userSexOption,
|
||||
},
|
||||
fieldName: 'sex',
|
||||
label: '性别',
|
||||
@@ -41,7 +45,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'libCode',
|
||||
},*/
|
||||
{
|
||||
title: '人像名称',
|
||||
title: '人员名称',
|
||||
field: 'imgName',
|
||||
},
|
||||
{
|
||||
@@ -49,7 +53,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'sex',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.sex, 'sys_user_sex');
|
||||
return renderDict(row.sex, DictEnum.SYS_USER_SEX);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -66,7 +70,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'certificateType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.certificateType, 'sys_certificate_type');
|
||||
return renderDict(row.certificateType, DictEnum.SYS_CERTIFICATE_TYPE);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -83,7 +87,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'rosterType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.rosterType, 'roster_type');
|
||||
return renderDict(row.rosterType, DictEnum.ROSTER_TYPE);
|
||||
},
|
||||
},
|
||||
width: 100,
|
||||
@@ -97,11 +101,6 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
];
|
||||
|
||||
const test = getDictOptions('roster_type');
|
||||
test.forEach((item) => {
|
||||
console.log('item', item);
|
||||
});
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
@@ -118,11 +117,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Select',
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
options: getDictOptions('roster_type'),
|
||||
getPopupContainer,
|
||||
options: rosterTypeOption,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '人像名称',
|
||||
label: '人员名称',
|
||||
fieldName: 'imgName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
@@ -133,7 +133,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.SYS_USER_SEX),
|
||||
options: userSexOption,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -152,7 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.SYS_CERTIFICATE_TYPE),
|
||||
options: certificateOption,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user