2025-03-10 17:08:02 +08:00
|
|
|
import { FormSchema } from '/@/components/Form';
|
|
|
|
|
|
|
|
// 部门基础表单
|
|
|
|
export function useBasicFormSchema() {
|
|
|
|
const basicFormSchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
field: 'departName',
|
2025-04-17 15:10:01 +08:00
|
|
|
label: '名称',
|
2025-03-10 17:08:02 +08:00
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入机构/部门名称',
|
|
|
|
},
|
|
|
|
rules: [{ required: true, message: '机构名称不能为空' }],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'parentId',
|
2025-04-17 15:10:01 +08:00
|
|
|
label: '上级',
|
2025-03-10 17:08:02 +08:00
|
|
|
component: 'TreeSelect',
|
|
|
|
componentProps: {
|
|
|
|
treeData: [],
|
|
|
|
placeholder: '无',
|
|
|
|
dropdownStyle: { maxHeight: '200px', overflow: 'auto' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orgCode',
|
2025-04-17 15:10:01 +08:00
|
|
|
label: '编码',
|
2025-03-10 17:08:02 +08:00
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入机构编码',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orgCategory',
|
2025-04-17 15:10:01 +08:00
|
|
|
label: '类型',
|
2025-03-10 17:08:02 +08:00
|
|
|
component: 'RadioButtonGroup',
|
|
|
|
componentProps: { options: [] },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'departOrder',
|
|
|
|
label: '排序',
|
|
|
|
component: 'InputNumber',
|
|
|
|
componentProps: {},
|
|
|
|
},
|
2025-04-17 15:10:01 +08:00
|
|
|
{
|
|
|
|
field: 'operationStartTime',
|
|
|
|
label: '运营开始时间',
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
style: {
|
|
|
|
width: '100%',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'operationEndTime',
|
|
|
|
label: '运营到期时间',
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
style: {
|
|
|
|
width: '100%',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'contractStartTime',
|
|
|
|
label: '合同开始时间',
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
style: {
|
|
|
|
width: '100%',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'contractEndTime',
|
|
|
|
label: '合同到期时间',
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
style: {
|
|
|
|
width: '100%',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2025-03-10 17:08:02 +08:00
|
|
|
{
|
|
|
|
field: 'mobile',
|
|
|
|
label: '电话',
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入电话',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'fax',
|
|
|
|
label: '传真',
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入传真',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'address',
|
|
|
|
label: '地址',
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入地址',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'memo',
|
|
|
|
label: '备注',
|
|
|
|
component: 'InputTextArea',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入备注',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
return { basicFormSchema };
|
|
|
|
}
|
|
|
|
|
|
|
|
// 机构类型选项
|
|
|
|
export const orgCategoryOptions = {
|
|
|
|
// 一级部门
|
2025-04-17 15:10:01 +08:00
|
|
|
root: [{ value: '1', label: '机构' }],
|
2025-03-10 17:08:02 +08:00
|
|
|
// 子级部门
|
|
|
|
child: [
|
2025-04-17 15:10:01 +08:00
|
|
|
{ value: '2', label: '区域' },
|
2025-03-10 17:08:02 +08:00
|
|
|
],
|
|
|
|
};
|