优化工作量编辑

This commit is contained in:
Vectorune
2025-11-11 12:13:53 +08:00
parent ad59aaef2d
commit faf44eb8da

View File

@ -44,8 +44,8 @@ const EditDataManageDrawer = props => {
// 提交编辑表单
const onSubmit = (values) => {
// 拼接ID用于后端识别更新对象
const updateData = { ...values, id: initialValues.id };
commonAxios.put('/api/v1/workload/update', updateData).then(response => {
const updateData = { ...values, id: initialValues.id, stuffNumber: initialValues.stuffNumber };
commonAxios.put('/api/v1/workload/updateWordload', updateData).then(response => {
const result = response.data.data || false;
if (result) {
messageApi.success('编辑工作量信息成功');
@ -118,7 +118,7 @@ const EditDataManageDrawer = props => {
name="actualClassSize"
rules={[
{ required: true, message: '请输入学生数' },
{ type: 'number', message: '请输入数字' }
//{ type: 'number', message: '请输入数字' }
]}
>
<Input type="number" placeholder="请输入学生数"/>
@ -135,7 +135,7 @@ const EditDataManageDrawer = props => {
name="totalClassHours"
rules={[
{ required: true, message: '请输入工作量' },
{ type: 'number', message: '请输入数字' }
//{ type: 'number', message: '请输入数字' }
]}
>
<Input type="number" placeholder="请输入工作量"/>