Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-10-14 13:50:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9cb211ddd8e47bf6e996871d705542390dc6292
f9cb211d
1 parent
935762bf
fix(教师表单): 允许作业频率和目标数量设置为0并转换为空值
将表单中作业频率和目标数量的最小值从1改为0,并在提交时处理0值转换为空值
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
src/views/teacher/formPage.vue
src/views/teacher/formPage.vue
View file @
f9cb211
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-01-20 10:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-10-14 1
1:32:42
* @LastEditTime: 2025-10-14 1
3:48:57
* @FilePath: /mlaj/src/views/teacher/formPage.vue
* @Description: 教师作业新增表单页面
-->
...
...
@@ -77,7 +77,7 @@
<div class="target-count-container">
<van-stepper
v-model="formData.frequency"
min="
1
"
min="
0
"
max="100"
integer
button-size="24px"
...
...
@@ -95,7 +95,7 @@
<div class="target-count-container">
<van-stepper
v-model="formData.target_number"
min="
1
"
min="
0
"
max="100"
integer
button-size="24px"
...
...
@@ -905,6 +905,9 @@ const handleSubmit = async (values) => {
// 格式化日期为YYYY-MM-DD格式
begin_date: formatDateTime(formData.value.start_time),
end_date: formatDateTime(formData.value.end_time),
// 处理每周期提交数量和目标总数,当值为0时转换为空值
frequency: formData.value.frequency === 0 ? null : formData.value.frequency,
target_number: formData.value.target_number === 0 ? null : formData.value.target_number,
// 添加课程章节选择数据
schedule: selectedChapters.value.map(chapter => ({
id: chapter.id,
...
...
Please
register
or
login
to post a comment