From b6026ba41d45b803f7b33f9309c29e88357c9b21 Mon Sep 17 00:00:00 2001
From: LLL <15374889135@163.com>
Date: Fri, 13 Jun 2025 16:50:08 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/coach/job/add.vue | 6 +--
pages/coach/my/index.vue | 12 ++---
pages/coach/my/teaching_management_info.vue | 9 ++--
pages/coach/student/info.vue | 6 ++-
pages/coach/student/physical_examination.vue | 55 ++++++++++++++++++--
5 files changed, 71 insertions(+), 17 deletions(-)
diff --git a/pages/coach/job/add.vue b/pages/coach/job/add.vue
index 52f610c..6fa5823 100644
--- a/pages/coach/job/add.vue
+++ b/pages/coach/job/add.vue
@@ -84,7 +84,7 @@
-
+
提交
@@ -115,7 +115,7 @@ const rules = [
msg: ["请选择课程"]
},
{
- name: "content_text",
+ name: "description",
rule: ["required"],
msg: ["请输入作业内容"]
},
@@ -156,7 +156,7 @@ export default {
course_id_name: '',//课程id(中文名字)
content_type: '1',//作业类型(单选)|1图片,2视频
- content_text: '',//文字作业内容
+ description: '',//文字作业内容
class_id: '',//班级id(下拉)
classes_id_name: '',//班级id(中文名字)
diff --git a/pages/coach/my/index.vue b/pages/coach/my/index.vue
index ff88060..8a11a15 100644
--- a/pages/coach/my/index.vue
+++ b/pages/coach/my/index.vue
@@ -18,7 +18,7 @@
- 到课率统计
+
@@ -77,8 +77,8 @@
-
-
+
+
我的考勤
@@ -201,9 +201,9 @@ export default {
//跳转页面-我的考勤
openViewMyAttendance(){
- this.$navigateTo({
- url: '/pages/common/my_attendance'
- })
+ this.$navigateTo({
+ url: `/pages/common/my_attendance`
+ })
},
}
}
diff --git a/pages/coach/my/teaching_management_info.vue b/pages/coach/my/teaching_management_info.vue
index 171cd05..dcc7306 100644
--- a/pages/coach/my/teaching_management_info.vue
+++ b/pages/coach/my/teaching_management_info.vue
@@ -7,19 +7,19 @@
{{arrayInfo.update_time}}
-
+
-
+
-
+
素材文件
@@ -62,6 +62,9 @@
});
},
async previewFile(url) {
+
+ console.log(url)
+
try {
// 1. 下载文件到本地
const {
diff --git a/pages/coach/student/info.vue b/pages/coach/student/info.vue
index 9540b1d..42ffaee 100644
--- a/pages/coach/student/info.vue
+++ b/pages/coach/student/info.vue
@@ -10,7 +10,7 @@
-
+
@@ -276,8 +276,10 @@ export default {
})
return
}
+
+ console.log(res,111)
- this.surveyList = this.surveyList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
+ this.surveyList = this.surveyList.concat(res.data.physical_test.data); // 使用 concat 方法 将新数据追加到数组中
console.log('列表',this.surveyList)
this.filteredData.total = res.data.total
diff --git a/pages/coach/student/physical_examination.vue b/pages/coach/student/physical_examination.vue
index f711e61..84a847e 100644
--- a/pages/coach/student/physical_examination.vue
+++ b/pages/coach/student/physical_examination.vue
@@ -29,7 +29,7 @@
-
+
+
+ {{surveyInfo.created_at}}体测报告{{index}}
@@ -123,6 +126,51 @@
}
this.surveyInfo = res.data
},
+
+ async previewFile(url) {
+
+ console.log(url)
+
+ try {
+ // 1. 下载文件到本地
+ const {
+ tempFilePath
+ } = await this.downloadFile(url);
+
+ // 2. 打开文件
+ await uni.openDocument({
+ filePath: tempFilePath,
+ showMenu: true,
+ success: () => {
+ console.log('打开文档成功');
+ }
+ });
+ } catch (err) {
+ uni.showToast({
+ title: '预览失败',
+ icon: 'none'
+ });
+ console.error('预览失败:', err);
+ }
+ },
+ downloadFile(url) {
+ return new Promise((resolve, reject) => {
+ uni.downloadFile({
+ url,
+ success: (res) => {
+ if (res.statusCode === 200) {
+ resolve(res);
+ } else {
+ reject(new Error('下载失败'));
+ }
+ },
+ fail: (err) => {
+ reject(err);
+ }
+ });
+ });
+ }
+
}
}
@@ -207,8 +255,9 @@
.list_box{
font-size: 30rpx;
- text-align: center;
- margin-top: 120rpx;
+ // text-align: center;
+ margin-left: 50rpx;
+ margin-top: 20rpx;
.ul{
padding: 0 20rpx;
display: flex;