l本校老师删除标识错误修复、

This commit is contained in:
Qi 2025-06-03 23:07:18 +08:00
parent 13504e167b
commit 205d11df74
4 changed files with 136 additions and 137 deletions

View File

@ -39,7 +39,7 @@ export const columns: BasicColumn[] = [
{
title: '宿舍人员信息',
align: 'center',
dataIndex: 'dormitorydata',
dataIndex: 'rowUser',
width: 300,
},
];

View File

@ -1,6 +1,6 @@
<template>
<div style="min-height: 400px">
<BasicForm @register="registerForm"></BasicForm>
<BasicForm @register="registerForm" />
<div style="width: 100%; text-align: center" v-if="!formDisabled">
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary"> </a-button>
</div>
@ -16,9 +16,9 @@
import { saveOrUpdate } from '../CeesLocalTeacher.api';
export default defineComponent({
name: "CeesLocalTeacherForm",
name: 'CeesLocalTeacherForm',
components: {
BasicForm
BasicForm,
},
props: {
formData: propTypes.object.def({}),
@ -29,7 +29,7 @@
labelWidth: 150,
schemas: getBpmFormSchema(props.formData),
showActionButtonGroup: false,
baseColProps: {span: 24}
baseColProps: { span: 24 },
});
const formDisabled = computed(() => {
@ -44,18 +44,18 @@
async function initFormData() {
let params = { id: props.formData.dataId };
const data = await defHttp.get({ url: queryByIdUrl, params });
formData = {...data}
formData = { ...data };
//
await setFieldsValue(formData);
//
await setProps({disabled: formDisabled.value})
await setProps({ disabled: formDisabled.value });
}
async function submitForm() {
let data = getFieldsValue();
let params = Object.assign({}, formData, data);
console.log('表单数据', params)
await saveOrUpdate(params, true)
console.log('表单数据', params);
await saveOrUpdate(params, true);
}
initFormData();
@ -64,7 +64,7 @@
registerForm,
formDisabled,
submitForm,
}
}
};
},
});
</script>

View File

@ -18,7 +18,7 @@
//labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: {span: 24}
baseColProps: { span: 24 },
});
//
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
@ -33,7 +33,7 @@
});
}
//
setProps({ disabled: !data?.showFooter })
setProps({ disabled: !data?.showFooter });
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
@ -57,10 +57,10 @@
<style lang="less" scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%
width: 100%;
}
:deep(.ant-calendar-picker) {
width: 100%
width: 100%;
}
</style>

View File

@ -277,19 +277,13 @@ export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
// {
// label: '用户ID',
// field: 'userId',
// component: 'Input',
// dynamicRules: ({ model, schema }) => {
// return [{ required: true, message: '请输入用户ID!' }];
// },
// },
{
label: '姓名',
field: 'userName',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入姓名!' }];
},
},
@ -298,6 +292,8 @@ export const formSchema: FormSchema[] = [
field: 'identityId',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [
{ required: true, message: '请输入身份证!' },
{
@ -320,7 +316,7 @@ export const formSchema: FormSchema[] = [
label: '年龄',
field: 'age',
component: 'InputNumber',
dynamicDisabled: true,
dynamicDisabled: false,
},
{
label: '性别',
@ -332,7 +328,7 @@ export const formSchema: FormSchema[] = [
{ label: '女', value: 1 },
],
},
dynamicDisabled: true,
dynamicDisabled: false,
},
{
label: '学科',
@ -347,23 +343,18 @@ export const formSchema: FormSchema[] = [
],
},
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请选择学科!' }];
},
},
//{
// label: '用户专业id',
// field: 'userMajorId',
// component: 'Input',
// dynamicRules: ({ model, schema }) => {
// return [{ required: true, message: '请输入用户专业id!' }];
// },
//},
{
label: '手机号',
field: 'phone',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入手机号!' }];
},
},
@ -372,6 +363,8 @@ export const formSchema: FormSchema[] = [
field: 'jobTitle',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入职称!' }];
},
},
@ -380,6 +373,8 @@ export const formSchema: FormSchema[] = [
field: 'office',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入办公位!' }];
},
},
@ -388,6 +383,8 @@ export const formSchema: FormSchema[] = [
field: 'workName',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入单位名称!' }];
},
},
@ -404,6 +401,8 @@ export const formSchema: FormSchema[] = [
field: 'pyCard',
component: 'Input',
dynamicRules: ({ model, schema }) => {
// 当身份证为7个0时取消验证
if (model.identityId === '0000000') return [];
return [{ required: true, message: '请输入银行卡号!' }];
},
},