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-06-24 11:50:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc6427056284107b4bf7fe6d8c9a803c7f972526
bc642705
1 parent
9697f0a2
refactor(views): 移除学生评分显示并优化表单页面标题逻辑
移除学生详情页面的评分显示,避免信息重复 重构表单页面,使用计算属性动态显示作业/打卡相关文本
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
src/views/teacher/formPage.vue
src/views/teacher/studentPage.vue
src/views/teacher/formPage.vue
View file @
bc64270
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-01-20 10:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-2
3 11:54:22
* @LastEditTime: 2025-06-2
4 11:46:49
* @FilePath: /mlaj/src/views/teacher/formPage.vue
* @Description: 教师作业新增表单页面
-->
...
...
@@ -18,7 +18,7 @@
<van-field
v-model="formData.homework_name"
name="homework_name"
placeholder="请输入作业名称(必填)
"
:placeholder="`请输入${pageTitle === '设置作业' ? '作业' : '打卡'}名称(必填)`
"
required
:border="false"
class="homework-name-field"
...
...
@@ -31,7 +31,7 @@
v-model="formData.description"
name="description"
type="textarea"
placeholder="请输入作业要求和说明
"
:placeholder="`请输入${pageTitle === '设置作业' ? '作业' : '打卡'}要求和说明`
"
:border="false"
rows="4"
class="description-field"
...
...
@@ -40,10 +40,10 @@
<!-- 作业设置 -->
<div class="mb-6">
<h3 class="section-title">
作业设置
</h3>
<h3 class="section-title">
{{ pageTitle }}
</h3>
<van-row gutter="10">
<van-col span="12">
<label class="setting-label">
作业
频次</label>
<label class="setting-label">
{{ pageTitle === '设置作业' ? '作业' : '打卡' }}
频次</label>
<van-field
v-model="formData.frequency"
is-link
...
...
@@ -324,7 +324,12 @@ import { useTitle } from '@vueuse/core';
const $route = useRoute();
const $router = useRouter();
useTitle($route.query.type === 'homework' ? '设置作业' : '安排打卡');
const pageTitle = computed(() => {
return $route.query.type === 'homework' ? '设置作业' : '安排打卡';
});
useTitle(pageTitle);
const type = ref('');
...
...
src/views/teacher/studentPage.vue
View file @
bc64270
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-06-19 17:12:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-2
0 11:41:22
* @LastEditTime: 2025-06-2
3 14:08:43
* @FilePath: /mlaj/src/views/teacher/studentPage.vue
* @Description: 学生详情页面
-->
...
...
@@ -168,7 +168,7 @@
<van-icon name="star-o" size="16" color="#f59e0b" class="mr-2" />
<span class="text-sm text-gray-600 mr-3">评分:</span>
<van-rate v-model="evaluation.score" :size="16" color="#ffd21e" void-color="#eee" readonly />
<
span class="text-sm text-gray-500 ml-2">({{ evaluation.score }}/5)</span
>
<
!-- <span class="text-sm text-gray-500 ml-2">({{ evaluation.score }}/5)</span> --
>
</div>
</div>
</van-list>
...
...
Please
register
or
login
to post a comment