Compare commits

...

2 Commits

  1. 6
      pages/coach/job/add.vue
  2. 12
      pages/coach/my/index.vue
  3. 9
      pages/coach/my/teaching_management_info.vue
  4. 6
      pages/coach/student/info.vue
  5. 55
      pages/coach/student/physical_examination.vue

6
pages/coach/job/add.vue

@ -84,7 +84,7 @@
</view>
<view>
<fui-textarea required flexStart label="作业" placeholder="请输入内容" v-model="formData.content_text"></fui-textarea>
<fui-textarea required flexStart label="作业" placeholder="请输入内容" v-model="formData.description"></fui-textarea>
</view>
<view class="submet_btn" @click="submetForm">提交</view>
@ -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()

12
pages/coach/my/index.vue

@ -18,7 +18,7 @@
<view class="btn"></view>
<!-- <view class="btn">切换身份</view>-->
<!-- <view class="btn" @click="openViewArrivalStatistics()">到课率统计</view> -->
<view class="btn">到课率统计</view>
<!-- <view class="btn">到课率统计</view> -->
<view class="btn"></view>
</view>
</view>
@ -77,8 +77,8 @@
<view></view>
</view>
<!-- <view class="item" @click="openViewMyAttendance()"> -->
<view class="item">
<!-- <view class="item"> -->
<view class="item" @click="openViewMyAttendance()">
<view>我的考勤</view>
<view></view>
</view>
@ -201,9 +201,9 @@ export default {
//-
openViewMyAttendance(){
this.$navigateTo({
url: '/pages/common/my_attendance'
})
this.$navigateTo({
url: `/pages/common/my_attendance`
})
},
}
}

9
pages/coach/my/teaching_management_info.vue

@ -7,19 +7,19 @@
{{arrayInfo.update_time}}
</view>
<view class="url_style" v-if="arrayInfo.type == 1 && empty(arrayInfo.url)">
<view class="url_style" v-if="arrayInfo.type == 1 && arrayInfo.url">
<video style="margin: auto;" :src="arrayInfo.url" :enable-progress-gesture="true"
:show-fullscreen-btn="true" :show-play-btn="true" @error="onVideoError" @play="onPlay"
@pause="onPause" />
</view>
<view class="url_image_style" v-if="arrayInfo.type == 3 && empty(arrayInfo.url)">
<view class="url_image_style" v-if="arrayInfo.type == 3 && arrayInfo.url">
<image :src="arrayInfo.url" mode="aspectFill" @click="clickPreviewImage(arrayInfo.url)"
style="width: 80%;margin: auto;">
</image>
</view>
<view class="url_file_style" v-if="arrayInfo.type == 2 && empty(arrayInfo.url)">
<view class="url_file_style" v-if="arrayInfo.type == 2 && arrayInfo.url">
<a style="cursor: pointer;color: blue;" @click="previewFile(arrayInfo.url)">素材文件</a>
</view>
@ -62,6 +62,9 @@
});
},
async previewFile(url) {
console.log(url)
try {
// 1.
const {

6
pages/coach/student/info.vue

@ -10,7 +10,7 @@
<view class="user_section">
<view class="box">
<view class="left">
<image class="pic" :src="$util.img(studentsInfo.customerResources.member.headimg)"></image>
<image class="pic" :src="studentsInfo.customerResources.member.headimg"></image>
<!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)">
<view class="btn">即将到期</view>
</view> -->
@ -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

55
pages/coach/student/physical_examination.vue

@ -29,7 +29,7 @@
<!-- <view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>-->
<!-- </view>-->
<view class="list_box">
<view class="ul">
<!-- <view class="ul">
<view class="li">
<view class="li_title">坐位体前屈</view>
<view class="li_content">测试结果{{surveyInfo.seated_forward_bend}}</view>
@ -79,6 +79,9 @@
<view class="li_title">十米往返跑</view>
<view class="li_content">测试结果{{surveyInfo.ten_meter_shuttle_run}}</view>
</view>
</view> -->
<view v-for="(item,index) in surveyInfo.physical_test_report">
<view style="color: blue;" @click="previewFile(item)">{{surveyInfo.created_at}}体测报告{{index}}</view>
</view>
</view>
</view>
@ -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);
}
});
});
}
}
}
</script>
@ -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;

Loading…
Cancel
Save