update
1.新增员工时,添加字段
This commit is contained in:
@@ -669,6 +669,33 @@ export const formSchema: (isUpdate: boolean) => FormSchema[] = (isUpdate) => {
|
||||
field: 'liveSpace',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '关爱联络员姓名',
|
||||
field: 'careLiaisonName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '关爱联络员职务',
|
||||
field: 'careLiaisonJob',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '关爱联络员电话',
|
||||
field: 'careLiaisonPhone',
|
||||
component: 'Input',
|
||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
label: '急救人员姓名',
|
||||
field: 'lifeguardName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '急救人员电话',
|
||||
field: 'lifeguardPhone',
|
||||
component: 'Input',
|
||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
const titleType = ref(String);
|
||||
//表单配置
|
||||
const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: formSchema(unref(isUpdate)),
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: { span: 12 },
|
||||
|
||||
Reference in New Issue
Block a user