Browse Source

refactor(student): 重构学生体测列表页面

- 修改物理考试列表的参数传递方式
- 更新物理考试列表的 API 调用
- 优化物理考试列表的数据显示
- 添加详细的体测数据展示
- 调整页面样式布局
master
liutong 10 months ago
parent
commit
285f14fd0c
  1. 8
      pages/student/index/index.vue
  2. 105
      pages/student/index/physical_examination.vue

8
pages/student/index/index.vue

@ -46,7 +46,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="more" @click="physical_examination(memberIndexData)">更多</view> <view class="more" @click="physical_examination()">更多</view>
</view> </view>
<view class="upcomin-classes"> <view class="upcomin-classes">
@ -333,10 +333,10 @@
}) })
}, },
// //
physical_examination(e){ physical_examination(){
let students_id = e.students_id let resource_id = this.member_info.id
uni.navigateTo({ uni.navigateTo({
url: `/pages/student/index/physical_examination?students_id=${students_id}` url: `/pages/student/index/physical_examination?resource_id=${resource_id}`
}) })
}, },
// //

105
pages/student/index/physical_examination.vue

@ -11,33 +11,85 @@
> >
<view class="item" v-for="(v,k) in tableList" :key="k"> <view class="item" v-for="(v,k) in tableList" :key="k">
<view class="date">{{$util.formatToDateTime(v.create_time, 'Y-m-d')}}</view> <view class="date">{{$util.formatToDateTime(v.created_at, 'Y-m-d')}}</view>
<view class="content"> <view class="content">
<view class="circle-container"> <view class="circle-container">
<view class="card-con-txt1-left"> <view class="card-con-txt1-left">
<image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image> <image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image>
</view> </view>
<view class="card-con-txt1-left-txt">{{v.score}}</view> <view class="card-con-txt1-left-txt">{{v.calculateChildHealthScore}}</view>
<view class="card-con-txt1-left-txt top1">综合评分</view> <view class="card-con-txt1-left-txt top1">综合评分</view>
</view> </view>
<view style="height: 170rpx;"></view> <view style="height: 170rpx;"></view>
<view style="display: flex;justify-content: space-around;"> <view style="display: flex;justify-content: space-around;">
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view> <view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{(v.height * 100)}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{(v.height)}}</view>
</view> </view>
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view> <view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{v.weight}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{v.weight}}</view>
</view> </view>
</view> </view>
<view class="coach-message"> <!-- <view class="coach-message">-->
<view> <!-- <view>-->
<image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image> <!-- <image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image>-->
<!-- </view>-->
<!-- <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="li">
<view class="li_title">坐位体前屈</view>
<view class="li_content">测试结果{{v.seated_forward_bend}}</view>
</view>
<view class="li">
<view class="li_title">仰卧卷腹</view>
<view class="li_content">测试结果{{v.sit_ups}}</view>
</view>
<view class="li">
<view class="li_title">九十度仰卧撑</view>
<view class="li_content">测试结果{{v.push_ups}}</view>
</view>
<view class="li">
<view class="li_title">火烈鸟平衡测试</view>
<view class="li_content">测试结果{{v.flamingo_balance}}</view>
</view>
<view class="li">
<view class="li_title">三十秒双脚连续跳</view>
<view class="li_content">测试结果{{v.thirty_sec_jump}}</view>
</view>
<view class="li">
<view class="li_title">立定跳远</view>
<view class="li_content">测试结果{{v.standing_long_jump}}</view>
</view>
<view class="li">
<view class="li_title">4乘10m灵敏折返跑</view>
<view class="li_content">测试结果{{v.agility_run}}</view>
</view>
<view class="li">
<view class="li_title">走平衡木</view>
<view class="li_content">测试结果{{v.balance_beam}}</view>
</view>
<view class="li">
<view class="li_title">网球掷远</view>
<view class="li_content">测试结果{{v.tennis_throw}}</view>
</view>
<view class="li">
<view class="li_title">十米往返跑</view>
<view class="li_content">测试结果{{v.ten_meter_shuttle_run}}</view>
</view>
</view> </view>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>
</view> </view>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view> </view>
</view> </view>
@ -60,14 +112,14 @@ export default {
page: 1,// page: 1,//
limit: 10,// limit: 10,//
total: 10,// total: 10,//
students_id: '',//id resource_id: '',//id
}, },
tableList: [],// tableList: [],//
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.students_id = options.students_id//id this.filteredData.resource_id = options.resource_id//id
}, },
onShow() { onShow() {
this.init() this.init()
@ -116,7 +168,7 @@ export default {
} }
//- //-
let res = await apiRoute.surveyList(data) let res = await apiRoute.xy_physicalTest(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1) { if (res.code != 1) {
@ -127,10 +179,10 @@ export default {
return return
} }
this.tableList = this.tableList.concat(res.data.list.data); // 使 concat this.tableList = this.tableList.concat(res.data.data); // 使 concat
// console.log('',this.tableList) // console.log('',this.tableList)
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },
} }
@ -150,6 +202,33 @@ export default {
flex-direction: column; flex-direction: column;
.item{ .item{
margin-bottom: 40rpx; margin-bottom: 40rpx;
.content{
.list_box{
font-size: 30rpx;
text-align: center;
margin-top: 120rpx;
.ul{
padding: 0 20rpx;
display: flex;
flex-wrap: wrap; /* 允许换行 */
justify-content: space-between;
align-items: center;
gap: 20rpx;
.li{
width: 48%; /* 每个列表项占宽度的48%,留出一些间距 */
display: flex;
flex-direction: column;
gap: 5rpx;
.li_title{
text-align: left;
}
.li_content{
text-align: left;
}
}
}
}
}
} }
} }

Loading…
Cancel
Save