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: [] },
|
|
|
|
},
|
2025-05-30 16:49:16 +08:00
|
|
|
{
|
|
|
|
field: 'province',
|
|
|
|
label: '省份',
|
|
|
|
component: 'Input',
|
|
|
|
slot: 'province',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'city',
|
|
|
|
label: '城市',
|
|
|
|
component: 'Input',
|
|
|
|
slot: 'city',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'district',
|
|
|
|
label: '区县',
|
|
|
|
component: 'Input',
|
|
|
|
slot: 'district',
|
|
|
|
},
|
2025-04-21 15:34:22 +08:00
|
|
|
{
|
2025-04-21 17:07:58 +08:00
|
|
|
field: 'platType',
|
2025-04-21 15:34:22 +08:00
|
|
|
label: '业务平台类型',
|
2025-04-21 17:07:58 +08:00
|
|
|
defaultValue:'ywjg',
|
2025-04-21 15:34:22 +08:00
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
dictCode: 'iz_test_site'
|
|
|
|
},
|
|
|
|
rules:[{
|
|
|
|
required: true,
|
|
|
|
message: '请选择平台类型'
|
|
|
|
}]
|
|
|
|
},
|
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: '请输入备注',
|
|
|
|
},
|
|
|
|
},
|
2025-05-30 16:49:16 +08:00
|
|
|
{
|
|
|
|
field: 'departOrder',
|
|
|
|
label: '排序',
|
|
|
|
component: 'InputNumber',
|
|
|
|
componentProps: {},
|
|
|
|
},
|
2025-05-21 13:43:56 +08:00
|
|
|
{
|
|
|
|
field: 'picUrl',
|
|
|
|
label: '机构图片',
|
|
|
|
component: 'JImageUpload',
|
|
|
|
},
|
2025-03-10 17:08:02 +08:00
|
|
|
];
|
|
|
|
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
|
|
|
],
|
|
|
|
};
|
2025-04-21 14:52:54 +08:00
|
|
|
|
|
|
|
export const tplinkUseFormSchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
field: 'id',
|
|
|
|
label: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orgCode',
|
|
|
|
label: '所属机构',
|
|
|
|
component: 'Input',
|
|
|
|
required: true,
|
|
|
|
dynamicDisabled: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'tumsProjectId',
|
|
|
|
label: '所属项目ID',
|
|
|
|
component: 'Input',
|
|
|
|
required: true,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'tumsProjectName',
|
|
|
|
label: '所属项目',
|
|
|
|
component: 'Input',
|
|
|
|
required: true,
|
|
|
|
dynamicDisabled: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'tumsUsername',
|
|
|
|
label: '用户名',
|
|
|
|
component: 'Input',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'tumsPassword',
|
|
|
|
label: '密码',
|
|
|
|
required: true,
|
|
|
|
component: 'StrengthMeter',
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
message: '请输入登录密码',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern: /^(?!.*(.)\1{2})(?=(?:.*[0-9].*[A-Z])|(?:.*[0-9].*[a-z])|(?:.*[0-9].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[A-Z].*[a-z])|(?:.*[A-Z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[a-z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]))[0-9A-Za-z~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]{8,64}$/,
|
|
|
|
message: '密码由8位数字、大小写字母和特殊符号组成!',
|
|
|
|
},
|
|
|
|
],
|
2025-04-21 16:07:45 +08:00
|
|
|
// dynamicDisabled: ({ values }) => {
|
|
|
|
// return !!values.id;
|
|
|
|
// },
|
2025-04-21 14:52:54 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'tumsRoleId',
|
|
|
|
label: '角色',
|
|
|
|
required: true,
|
|
|
|
component: 'JDictSelectTag',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请选择类型',
|
|
|
|
options: [
|
|
|
|
{ label: '超级管理员', value: '1' },
|
|
|
|
{ label: '项目管理员', value: '2' },
|
|
|
|
{ label: '项目查看员', value: '3' },
|
|
|
|
{ label: '视频监控员', value: '4' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'ftpIp',
|
|
|
|
label: 'FTP地址',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'ftpPort',
|
|
|
|
label: 'FTP端口',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'ftpUsername',
|
|
|
|
label: 'FTP用户',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'ftpPassword',
|
|
|
|
label: 'FTP密码',
|
|
|
|
component: 'InputPassword',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'ftpUploadpath',
|
|
|
|
label: 'FTP上传路径',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
];
|