hookehuyr

refactor(views): 移除学生评分显示并优化表单页面标题逻辑

移除学生详情页面的评分显示,避免信息重复
重构表单页面,使用计算属性动态显示作业/打卡相关文本
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2025-01-20 10:00:00 3 * @Date: 2025-01-20 10:00:00
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2025-06-23 11:54:22 5 + * @LastEditTime: 2025-06-24 11:46:49
6 * @FilePath: /mlaj/src/views/teacher/formPage.vue 6 * @FilePath: /mlaj/src/views/teacher/formPage.vue
7 * @Description: 教师作业新增表单页面 7 * @Description: 教师作业新增表单页面
8 --> 8 -->
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 <van-field 18 <van-field
19 v-model="formData.homework_name" 19 v-model="formData.homework_name"
20 name="homework_name" 20 name="homework_name"
21 - placeholder="请输入作业名称(必填)" 21 + :placeholder="`请输入${pageTitle === '设置作业' ? '作业' : '打卡'}名称(必填)`"
22 required 22 required
23 :border="false" 23 :border="false"
24 class="homework-name-field" 24 class="homework-name-field"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 v-model="formData.description" 31 v-model="formData.description"
32 name="description" 32 name="description"
33 type="textarea" 33 type="textarea"
34 - placeholder="请输入作业要求和说明" 34 + :placeholder="`请输入${pageTitle === '设置作业' ? '作业' : '打卡'}要求和说明`"
35 :border="false" 35 :border="false"
36 rows="4" 36 rows="4"
37 class="description-field" 37 class="description-field"
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
40 40
41 <!-- 作业设置 --> 41 <!-- 作业设置 -->
42 <div class="mb-6"> 42 <div class="mb-6">
43 - <h3 class="section-title">作业设置</h3> 43 + <h3 class="section-title">{{ pageTitle }}</h3>
44 <van-row gutter="10"> 44 <van-row gutter="10">
45 <van-col span="12"> 45 <van-col span="12">
46 - <label class="setting-label">作业频次</label> 46 + <label class="setting-label">{{ pageTitle === '设置作业' ? '作业' : '打卡' }}频次</label>
47 <van-field 47 <van-field
48 v-model="formData.frequency" 48 v-model="formData.frequency"
49 is-link 49 is-link
...@@ -324,7 +324,12 @@ import { useTitle } from '@vueuse/core'; ...@@ -324,7 +324,12 @@ import { useTitle } from '@vueuse/core';
324 324
325 const $route = useRoute(); 325 const $route = useRoute();
326 const $router = useRouter(); 326 const $router = useRouter();
327 -useTitle($route.query.type === 'homework' ? '设置作业' : '安排打卡'); 327 +
328 +const pageTitle = computed(() => {
329 + return $route.query.type === 'homework' ? '设置作业' : '安排打卡';
330 +});
331 +
332 +useTitle(pageTitle);
328 333
329 const type = ref(''); 334 const type = ref('');
330 335
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2025-06-19 17:12:19 3 * @Date: 2025-06-19 17:12:19
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2025-06-20 11:41:22 5 + * @LastEditTime: 2025-06-23 14:08:43
6 * @FilePath: /mlaj/src/views/teacher/studentPage.vue 6 * @FilePath: /mlaj/src/views/teacher/studentPage.vue
7 * @Description: 学生详情页面 7 * @Description: 学生详情页面
8 --> 8 -->
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
168 <van-icon name="star-o" size="16" color="#f59e0b" class="mr-2" /> 168 <van-icon name="star-o" size="16" color="#f59e0b" class="mr-2" />
169 <span class="text-sm text-gray-600 mr-3">评分:</span> 169 <span class="text-sm text-gray-600 mr-3">评分:</span>
170 <van-rate v-model="evaluation.score" :size="16" color="#ffd21e" void-color="#eee" readonly /> 170 <van-rate v-model="evaluation.score" :size="16" color="#ffd21e" void-color="#eee" readonly />
171 - <span class="text-sm text-gray-500 ml-2">({{ evaluation.score }}/5)</span> 171 + <!-- <span class="text-sm text-gray-500 ml-2">({{ evaluation.score }}/5)</span> -->
172 </div> 172 </div>
173 </div> 173 </div>
174 </van-list> 174 </van-list>
......