feat(teacher): 优化教师打卡和作业表单页面
- 在打卡页面添加顶部间距并区分打卡和作业按钮功能 - 重构表单页面,根据类型动态显示标题并简化代码结构 - 移除不必要的类型选择字段,默认根据路由参数设置类型
Showing
2 changed files
with
6 additions
and
6 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-05-29 15:34:17 | 2 | * @Date: 2025-05-29 15:34:17 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-06-20 10:40:58 | 4 | + * @LastEditTime: 2025-06-20 10:56:22 |
| 5 | * @FilePath: /mlaj/src/views/teacher/checkinPage.vue | 5 | * @FilePath: /mlaj/src/views/teacher/checkinPage.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -21,13 +21,13 @@ | ... | @@ -21,13 +21,13 @@ |
| 21 | @select="onSelectDay" | 21 | @select="onSelectDay" |
| 22 | @click-subtitle="onClickSubtitle"> | 22 | @click-subtitle="onClickSubtitle"> |
| 23 | </van-calendar> | 23 | </van-calendar> |
| 24 | - <div style="padding: 0 1rem;"> | 24 | + <div style="padding: 0 1rem; margin-top: 1rem;"> |
| 25 | <van-row gutter="15"> | 25 | <van-row gutter="15"> |
| 26 | <van-col span="12"> | 26 | <van-col span="12"> |
| 27 | - <van-button type="primary" block icon="photo" @click="handleAdd">安排打卡</van-button> | 27 | + <van-button type="primary" block icon="photo" @click="handleAdd('checkin')">安排打卡</van-button> |
| 28 | </van-col> | 28 | </van-col> |
| 29 | <van-col span="12"> | 29 | <van-col span="12"> |
| 30 | - <van-button type="primary" block icon="video">设置作业</van-button> | 30 | + <van-button type="primary" block icon="video" @click="handleAdd('homework')">设置作业</van-button> |
| 31 | </van-col> | 31 | </van-col> |
| 32 | </van-row> | 32 | </van-row> |
| 33 | </div> | 33 | </div> |
| ... | @@ -817,12 +817,12 @@ const formatData = (data) => { | ... | @@ -817,12 +817,12 @@ const formatData = (data) => { |
| 817 | return formattedData; | 817 | return formattedData; |
| 818 | } | 818 | } |
| 819 | 819 | ||
| 820 | -const handleAdd = () => { | 820 | +const handleAdd = (type) => { |
| 821 | router.push({ | 821 | router.push({ |
| 822 | path: '/teacher/form', | 822 | path: '/teacher/form', |
| 823 | query: { | 823 | query: { |
| 824 | post_id: route.query.id, | 824 | post_id: route.query.id, |
| 825 | - type: 'image', | 825 | + type: type, |
| 826 | status: 'add', | 826 | status: 'add', |
| 827 | } | 827 | } |
| 828 | }) | 828 | }) | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment