|
|
|
@ -10,23 +10,24 @@ |
|
|
|
<view class="user_section"> |
|
|
|
<view class="box"> |
|
|
|
<view class="left"> |
|
|
|
<image class="pic" :src="$util.img(studentsInfo.header)"></image> |
|
|
|
<view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)"> |
|
|
|
<image class="pic" :src="$util.img(studentsInfo.customerResources.member.headimg)"></image> |
|
|
|
<!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)"> |
|
|
|
<view class="btn">即将到期</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="item"> |
|
|
|
<view class="name">{{studentsInfo.name}}</view> |
|
|
|
<view class="age"> |
|
|
|
{{studentsInfo.age}}岁 |
|
|
|
<!-- {{formatAgeMonth(studentsInfo.age)}} --> |
|
|
|
{{studentsInfo.customerResources.age}}岁 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="item">--> |
|
|
|
<!-- <view class="title">家长姓名:黄大呢</view>--> |
|
|
|
<!-- </view>--> |
|
|
|
<view class="item"> |
|
|
|
<view class="title">电话:{{studentsInfo.phone}}</view> |
|
|
|
<view class="title">电话:{{studentsInfo.customerResources.phone_number}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -111,10 +112,10 @@ |
|
|
|
:key="k" @click="openViewPhysicalExamination(v)" |
|
|
|
> |
|
|
|
<view class="top"> |
|
|
|
<view class="title">综合评分:{{v.score}}</view> |
|
|
|
<view class="title">综合评分:{{v.calculateChildHealthScore}}</view> |
|
|
|
<!-- <view class="hint">打败了99%学员</view>--> |
|
|
|
</view> |
|
|
|
<view class="bottom">测试时间:{{v.create_time}}</view> |
|
|
|
<view class="bottom">测试时间:{{$util.formatToDateTime(v.created_at, 'Y-m-d')}}</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
@ -133,7 +134,7 @@ |
|
|
|
<script> |
|
|
|
import memberApi from '@/api/member.js'; |
|
|
|
import AQTabber from "@/components/AQ/AQTabber.vue" |
|
|
|
|
|
|
|
import apiRoute from '@/api/apiRoute.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -157,14 +158,13 @@ export default { |
|
|
|
page:1,//当前页码 |
|
|
|
limit:10,//每页返回数据条数 |
|
|
|
total:10,//数据总条数 |
|
|
|
students_id: '',//学员id |
|
|
|
user_id: '',//学员id |
|
|
|
}, |
|
|
|
surveyList:[],//体测报告列表 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
this.students_id = options.students_id//学生id |
|
|
|
this.filteredData.students_id = options.students_id//学生id |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.init()//初始化 |
|
|
|
@ -174,14 +174,26 @@ export default { |
|
|
|
async init(){ |
|
|
|
//获取学生详情 |
|
|
|
await this.getStudentsInfo() |
|
|
|
this.getSurveyList() |
|
|
|
await this.getSurveyList() |
|
|
|
}, |
|
|
|
formatAgeMonth(input) { |
|
|
|
let str = String(input); |
|
|
|
// 分割小数点前后部分 |
|
|
|
let [yearPart, monthPart] = str.split('.'); |
|
|
|
// 如果没有小数部分,默认为 0 |
|
|
|
if (!monthPart) { |
|
|
|
monthPart = '00'; |
|
|
|
} |
|
|
|
// 如果是 00,则显示为 0 |
|
|
|
monthPart = monthPart === '00' ? '0' : monthPart; |
|
|
|
return `${yearPart}岁${monthPart}月`; |
|
|
|
}, |
|
|
|
//获取学生详情 |
|
|
|
async getStudentsInfo(){ |
|
|
|
let data = { |
|
|
|
students_id:this.students_id |
|
|
|
} |
|
|
|
let res = await memberApi.jlStudentsInfo(data) |
|
|
|
let res = await apiRoute.jlStudentsInfo(data) |
|
|
|
if (res.code != 1){ |
|
|
|
uni.showToast({ |
|
|
|
title: res.msg, |
|
|
|
@ -192,7 +204,8 @@ export default { |
|
|
|
|
|
|
|
this.studentsInfo = res.data//学生信息 |
|
|
|
|
|
|
|
this.assignmentsList = res.data.assignments_list//作业列表 |
|
|
|
this.assignmentsList = res.data.physical_test//作业列表 |
|
|
|
this.filteredData.user_id = res.data.user_id |
|
|
|
|
|
|
|
}, |
|
|
|
// 检查 expire_time 是否大于等于当前时间 5 天 |
|
|
|
@ -253,7 +266,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
//学员-体测列表 |
|
|
|
let res = await memberApi.surveyList(data) |
|
|
|
let res = await apiRoute.physicalTest(data) |
|
|
|
this.loading = false |
|
|
|
this.isReachedBottom = false; |
|
|
|
if (res.code != 1){ |
|
|
|
@ -264,10 +277,10 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.surveyList = this.surveyList.concat(res.data.list.data); // 使用 concat 方法 将新数据追加到数组中 |
|
|
|
this.surveyList = this.surveyList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中 |
|
|
|
|
|
|
|
console.log('列表',this.surveyList) |
|
|
|
this.filteredData.total = res.data.list.total |
|
|
|
this.filteredData.total = res.data.total |
|
|
|
this.filteredData.page++ |
|
|
|
}, |
|
|
|
|
|
|
|
|