update:图表
This commit is contained in:
parent
1f17d4736d
commit
b73b277489
@ -94,7 +94,7 @@ Page({
|
|||||||
enableMarkLine: true,
|
enableMarkLine: true,
|
||||||
background: "#FFFFFF",
|
background: "#FFFFFF",
|
||||||
color: that.data.chartType == 1 ? ["#FFA30C"] : that.data.chartType == 2 ? ["#6CB7FB"] : ["#FF4949"],
|
color: that.data.chartType == 1 ? ["#FFA30C"] : that.data.chartType == 2 ? ["#6CB7FB"] : ["#FF4949"],
|
||||||
padding: [15, 15, 10, 15],
|
padding: [15, 10, 10, 5],
|
||||||
enableScroll: true,
|
enableScroll: true,
|
||||||
// touchMoveLimit: 24,
|
// touchMoveLimit: 24,
|
||||||
legend: {
|
legend: {
|
||||||
@ -118,7 +118,8 @@ Page({
|
|||||||
data: [{
|
data: [{
|
||||||
// min: Math.max(0, that.data.moderateHR - 20),
|
// min: Math.max(0, that.data.moderateHR - 20),
|
||||||
max: that.data.highHR + 20,
|
max: that.data.highHR + 20,
|
||||||
fontSize: 12
|
fontSize: 12,
|
||||||
|
tofix:0
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
extra: {
|
extra: {
|
||||||
@ -129,21 +130,21 @@ Page({
|
|||||||
{
|
{
|
||||||
value: that.data.moderateHR,
|
value: that.data.moderateHR,
|
||||||
lineColor: '#FFA30C',
|
lineColor: '#FFA30C',
|
||||||
showLabel: true,
|
showLabel: false,
|
||||||
labelText: '中强度',
|
labelText: '中强度',
|
||||||
labelFontColor: '#FFA30C',
|
labelFontColor: '#FFA30C',
|
||||||
labelBgColor: '#FFF8EC',
|
// labelBgColor: '#FFF8EC00',
|
||||||
labelBgOpacity: 0.9,
|
labelBgOpacity: 0.9,
|
||||||
labelAlign: 'left',
|
labelAlign: 'center',
|
||||||
labelFontSize: 11
|
labelFontSize: 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: that.data.highHR,
|
value: that.data.highHR,
|
||||||
lineColor: '#FF4949',
|
lineColor: '#FF4949',
|
||||||
showLabel: true,
|
showLabel: false,
|
||||||
labelText: '高强度',
|
labelText: '高强度',
|
||||||
labelFontColor: '#FF4949',
|
labelFontColor: '#FF4949',
|
||||||
labelBgColor: '#FFF0F0',
|
// labelBgColor: '#FFF0F000',
|
||||||
labelBgOpacity: 0.9,
|
labelBgOpacity: 0.9,
|
||||||
labelAlign: 'left',
|
labelAlign: 'left',
|
||||||
labelFontSize: 11
|
labelFontSize: 11
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Page({
|
|||||||
studentNo: '',
|
studentNo: '',
|
||||||
readyFired: false,
|
readyFired: false,
|
||||||
// Tab
|
// Tab
|
||||||
activeTab: 0, // 0=课堂报告 1=体测报告
|
activeTab: 1, // 0=课堂报告 1=体测报告
|
||||||
classroomSubTab: 0, // 0=月 1=季度
|
classroomSubTab: 0, // 0=月 1=季度
|
||||||
// 时间选择
|
// 时间选择
|
||||||
selectedYear: 2026,
|
selectedYear: 2026,
|
||||||
@ -280,7 +280,7 @@ Page({
|
|||||||
tapLegend: true,
|
tapLegend: true,
|
||||||
background: 'rgba(0,0,0,0)',
|
background: 'rgba(0,0,0,0)',
|
||||||
color: ['#4A90E2', '#E74C3C'],
|
color: ['#4A90E2', '#E74C3C'],
|
||||||
padding: [0, 0, 0, 15],
|
padding: [0, 0, 0, 10],
|
||||||
legend: {
|
legend: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
|
|||||||
@ -2,135 +2,8 @@
|
|||||||
<view class="page-wrap" style="padding: 0 30rpx; padding-bottom: 300rpx; box-sizing: border-box;">
|
<view class="page-wrap" style="padding: 0 30rpx; padding-bottom: 300rpx; box-sizing: border-box;">
|
||||||
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f5f8ff 700rpx, #f5f8ff 100%)" title="学生报告" color="#fff" back="{{true}}"></mp-bar>
|
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f5f8ff 700rpx, #f5f8ff 100%)" title="学生报告" color="#fff" back="{{true}}"></mp-bar>
|
||||||
|
|
||||||
<!-- 主 Tab 切换 -->
|
|
||||||
<view class="tab-switcher">
|
|
||||||
<view class="tab-btn {{activeTab === 0 ? 'tab-btn-active' : ''}}" data-tab="0" bind:tap="switchTab">课堂报告</view>
|
|
||||||
<view class="tab-btn {{activeTab === 1 ? 'tab-btn-active' : ''}}" data-tab="1" bind:tap="switchTab">体测报告</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 课堂报告 -->
|
|
||||||
<block wx:if="{{activeTab === 0}}">
|
|
||||||
<!-- 子Tab: 月 / 季度 -->
|
|
||||||
<view class="sub-tab-switcher">
|
|
||||||
<view class="sub-tab-btn {{classroomSubTab === 0 ? 'sub-tab-active' : ''}}" data-tab="0" bind:tap="switchClassroomSubTab">月</view>
|
|
||||||
<view class="sub-tab-btn {{classroomSubTab === 1 ? 'sub-tab-active' : ''}}" data-tab="1" bind:tap="switchClassroomSubTab">季度</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 月报告 -->
|
|
||||||
<block wx:if="{{classroomSubTab === 0}}">
|
|
||||||
<view class="period-selector" bind:tap="openMonthPicker">
|
|
||||||
<text class="period-text">{{selectedYear}}年{{selectedMonth}}月</text>
|
|
||||||
<text class="period-caret">▾</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-section-header-wrap"><view class="stat-section-header">心率统计</view></view>
|
|
||||||
<view class="stat-grid">
|
|
||||||
<view class="stat-card stat-card-1">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">心率范围</text>
|
|
||||||
<text class="stat-card-value">{{monthData.heartRange}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-2">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">平均心率</text>
|
|
||||||
<text class="stat-card-value">{{monthData.avgHeart}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-3">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">中高强度时长</text>
|
|
||||||
<text class="stat-card-value">{{monthData.highDuration}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-4">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">中高时间占比</text>
|
|
||||||
<text class="stat-card-value">{{monthData.highRatio}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="stat-section-header-wrap"><view class="stat-section-header">跳绳统计</view></view>
|
|
||||||
<view class="jump-tip">训练记录统计:仅智能跳绳,不含普通跳绳</view>
|
|
||||||
<view class="jump-summary-wrap">
|
|
||||||
<view class="jump-summary-header">
|
|
||||||
<view class="jump-col">个数</view>
|
|
||||||
<view class="jump-col">时长<text class="jump-unit">(分钟)</text></view>
|
|
||||||
<view class="jump-col">平均速度<text class="jump-unit">(个/分钟)</text></view>
|
|
||||||
</view>
|
|
||||||
<view class="jump-summary-data">
|
|
||||||
<view class="jump-col">{{monthData.jumpTotal}}</view>
|
|
||||||
<view class="jump-col">{{monthData.jumpDuration}}</view>
|
|
||||||
<view class="jump-col">{{monthData.jumpAvgSpeed}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="jump-summary-wrap" style="margin-top:30rpx">
|
|
||||||
<view class="jump-record-item" wx:for="{{monthData.jumpRecords}}" wx:key="index">
|
|
||||||
<view class="jump-record-icon-wrap">
|
|
||||||
<image src="/static/student/train.png" class="jump-record-icon" mode="aspectFit" />
|
|
||||||
</view>
|
|
||||||
<view class="jump-record-main">
|
|
||||||
<view class="jump-record-tag">{{item.type}}</view>
|
|
||||||
<view class="jump-record-detail">{{item.duration}} {{item.count}}个</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<!-- 季度报告 -->
|
|
||||||
<block wx:elif="{{classroomSubTab === 1}}">
|
|
||||||
<view class="period-selector" bind:tap="openQuarterPicker">
|
|
||||||
<text class="period-text">{{selectedYear}}年 第{{selectedQuarter}}季度</text>
|
|
||||||
<text class="period-caret">▾</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-section-header-wrap"><view class="stat-section-header">心率统计</view></view>
|
|
||||||
<view class="stat-grid">
|
|
||||||
<view class="stat-card stat-card-1">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">心率范围</text>
|
|
||||||
<text class="stat-card-value">{{quarterData.heartRange}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-2">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">平均心率</text>
|
|
||||||
<text class="stat-card-value">{{quarterData.avgHeart}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-3">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">中高强度时长</text>
|
|
||||||
<text class="stat-card-value">{{quarterData.highDuration}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-card stat-card-4">
|
|
||||||
<view class="stat-card-bar"></view>
|
|
||||||
<text class="stat-card-label">中高时间占比</text>
|
|
||||||
<text class="stat-card-value">{{quarterData.highRatio}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="stat-section-header-wrap"><view class="stat-section-header">跳绳统计</view></view>
|
|
||||||
<view class="jump-tip">训练记录统计:仅智能跳绳,不含普通跳绳</view>
|
|
||||||
<view class="jump-summary-wrap">
|
|
||||||
<view class="jump-summary-header">
|
|
||||||
<view class="jump-col">个数</view>
|
|
||||||
<view class="jump-col">时长<text class="jump-unit">(分钟)</text></view>
|
|
||||||
<view class="jump-col">平均速度<text class="jump-unit">(个/分钟)</text></view>
|
|
||||||
</view>
|
|
||||||
<view class="jump-summary-data">
|
|
||||||
<view class="jump-col">{{quarterData.jumpTotal}}</view>
|
|
||||||
<view class="jump-col">{{quarterData.jumpDuration}}</view>
|
|
||||||
<view class="jump-col">{{quarterData.jumpAvgSpeed}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="jump-summary-wrap" style="margin-top:30rpx">
|
|
||||||
<view class="jump-record-item" wx:for="{{quarterData.jumpRecords}}" wx:key="index">
|
|
||||||
<view class="jump-record-icon-wrap">
|
|
||||||
<image src="/static/student/train.png" class="jump-record-icon" mode="aspectFit" />
|
|
||||||
</view>
|
|
||||||
<view class="jump-record-main">
|
|
||||||
<view class="jump-record-tag">{{item.type}}</view>
|
|
||||||
<view class="jump-record-detail">{{item.duration}} {{item.count}}个</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</block>
|
|
||||||
|
|
||||||
<!-- 体测报告 -->
|
<!-- 体测报告 -->
|
||||||
<block wx:elif="{{activeTab === 1}}">
|
|
||||||
<view class="fitness-card">
|
<view class="fitness-card">
|
||||||
<view class="fitness-chart-title">体测成绩对比</view>
|
<view class="fitness-chart-title">体测成绩对比</view>
|
||||||
<view class="radar-wrap" style="width:{{radarCWidth}}px;height:{{radarCHeight}}px;">
|
<view class="radar-wrap" style="width:{{radarCWidth}}px;height:{{radarCHeight}}px;">
|
||||||
@ -147,7 +20,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view wx:if="{{fitnessItems.length === 0}}" class="empty-tip">暂无体测数据</view>
|
<view wx:if="{{fitnessItems.length === 0}}" class="empty-tip">暂无体测数据</view>
|
||||||
</block>
|
|
||||||
|
|
||||||
<!-- 成绩弹窗遮罩 -->
|
<!-- 成绩弹窗遮罩 -->
|
||||||
<view class="popup-mask" wx:if="{{showFitnessPopup}}" bind:tap="closeFitnessPopup"></view>
|
<view class="popup-mask" wx:if="{{showFitnessPopup}}" bind:tap="closeFitnessPopup"></view>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user