89 lines
2.3 KiB
TypeScript
89 lines
2.3 KiB
TypeScript
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
import { listApi } from '/@/views/archive/healthClock/clockQuestionnaire/questionsClassify/questionsClassify.api';
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
|
|
export const columns: BasicColumn[] = [
|
|
{
|
|
title: '模板名称',
|
|
dataIndex: 'templateName',
|
|
},
|
|
{
|
|
title: '用户类别',
|
|
dataIndex: 'classType',
|
|
customRender: ({ text }) => {
|
|
return render.renderDict(text, 'punch_user_class');
|
|
},
|
|
},
|
|
{
|
|
title: '模板状态',
|
|
dataIndex: 'templateStatus',
|
|
customRender: ({ text }) => {
|
|
return render.renderDict(text, 'valid_status');
|
|
},
|
|
},
|
|
];
|
|
|
|
export const searchSchema: FormSchema[] = [
|
|
{
|
|
label: '模板名称',
|
|
field: 'templateName',
|
|
component: 'JInput',
|
|
},
|
|
{
|
|
label: '用户类别',
|
|
field: 'classType',
|
|
component: 'JDictSelectTag',
|
|
componentProps: {
|
|
dictCode: 'punch_user_class',
|
|
},
|
|
},
|
|
];
|
|
|
|
export const formSchema: FormSchema[] = [
|
|
{
|
|
label: '模板名称',
|
|
field: 'templateName',
|
|
component: 'Input',
|
|
required: true,
|
|
},
|
|
{
|
|
label: '用户类别',
|
|
field: 'classType',
|
|
component: 'JDictSelectTag',
|
|
componentProps: {
|
|
dictCode: 'punch_user_class',
|
|
getPopupContainer: () => document.body,
|
|
},
|
|
required: true,
|
|
},
|
|
{
|
|
label: '模板状态',
|
|
field: 'templateStatus',
|
|
// component: 'RadioGroup',
|
|
component: 'JDictSelectTag',
|
|
componentProps: {
|
|
dictCode: 'valid_status',
|
|
type: 'radio',
|
|
getPopupContainer: () => document.body,
|
|
},
|
|
},
|
|
{
|
|
label: '问题分类',
|
|
field: 'classId',
|
|
component: 'ApiTreeSelect',
|
|
componentProps: () => {
|
|
return {
|
|
api: listApi,
|
|
multiple: true,
|
|
treeCheckable: true,
|
|
getPopupContainer: () => document.body,
|
|
fieldNames: {
|
|
label: 'className',
|
|
value: 'id',
|
|
key: 'id',
|
|
},
|
|
};
|
|
},
|
|
},
|
|
];
|