|
|
@ -4,100 +4,91 @@ import { origanizemanage } from '/@/api/origanizemanage'; |
|
|
|
export const formConfig = (disabled) => { |
|
|
|
return ref([ |
|
|
|
{ |
|
|
|
field: 'field111', |
|
|
|
component: 'NsChildForm', |
|
|
|
label: '账号', |
|
|
|
field: 'accountNo', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
title: '用户信息', |
|
|
|
schemas: [ |
|
|
|
{ |
|
|
|
label: '账号', |
|
|
|
field: 'accountNo', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入账号', |
|
|
|
maxLength: 20, |
|
|
|
disabled, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入账号', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '姓名', |
|
|
|
field: 'realName', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入姓名', |
|
|
|
maxLength: 20, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入姓名', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '性别', |
|
|
|
field: 'sex', |
|
|
|
component: 'NsRadioGroup', |
|
|
|
defaultValue: '男', |
|
|
|
componentProps: { |
|
|
|
radioType: 'radio', |
|
|
|
options: [ |
|
|
|
{ label: '男', value: '男' }, |
|
|
|
{ label: '女', value: '女' }, |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '手机号', |
|
|
|
field: 'telephone', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入手机号', |
|
|
|
maxLength: 11, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入正确手机号格式', |
|
|
|
pattern: /^[1][3-9][0-9]{9}$/, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '邮箱', |
|
|
|
field: 'email', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入邮箱', |
|
|
|
maxLength: 30, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, |
|
|
|
message: '请输入正确的邮箱格式', |
|
|
|
trigger: 'blur', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '组织关系', |
|
|
|
field: 'orgName', |
|
|
|
component: 'NsInput', |
|
|
|
defaultValue: JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgName, |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
maxLength: 30, |
|
|
|
}, |
|
|
|
}, |
|
|
|
placeholder: '请输入账号', |
|
|
|
maxLength: 20, |
|
|
|
disabled, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入账号', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '姓名', |
|
|
|
field: 'realName', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入姓名', |
|
|
|
maxLength: 20, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入姓名', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '性别', |
|
|
|
field: 'sex', |
|
|
|
component: 'NsRadioGroup', |
|
|
|
defaultValue: '男', |
|
|
|
componentProps: { |
|
|
|
radioType: 'radio', |
|
|
|
options: [ |
|
|
|
{ label: '男', value: '男' }, |
|
|
|
{ label: '女', value: '女' }, |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '手机号', |
|
|
|
field: 'telephone', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入手机号', |
|
|
|
maxLength: 11, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: '请输入正确手机号格式', |
|
|
|
pattern: /^[1][3-9][0-9]{9}$/, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '邮箱', |
|
|
|
field: 'email', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
|
placeholder: '请输入邮箱', |
|
|
|
maxLength: 30, |
|
|
|
}, |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, |
|
|
|
message: '请输入正确的邮箱格式', |
|
|
|
trigger: 'blur', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '组织关系', |
|
|
|
field: 'orgName', |
|
|
|
component: 'NsInput', |
|
|
|
defaultValue: JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgName, |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
maxLength: 30, |
|
|
|
}, |
|
|
|
}, |
|
|
|
]); |
|
|
|
}; |
|
|
|
const options = ref([]); |
|
|
|