|
@@ -53,7 +53,9 @@
|
|
|
/>
|
|
|
</view>
|
|
|
<view class="left_content">
|
|
|
- <view class="left_num">{{ record.height_absorbed }}<text class="textLil text-gray">%</text></view>
|
|
|
+ <view class="left_num">{{ record.height_absorbed }}
|
|
|
+ <text class="textLil text-gray">%</text>
|
|
|
+ </view>
|
|
|
<view class="left_text">高专注力<br/> 占比</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -64,7 +66,9 @@
|
|
|
<view>专注力维持区间</view>
|
|
|
</view>
|
|
|
<view class="detail">
|
|
|
- <view class="detail_num">{{ record.interfere }}<text class="textLil text-gray">次</text></view>
|
|
|
+ <view class="detail_num">{{ record.interfere }}
|
|
|
+ <text class="textLil text-gray">次</text>
|
|
|
+ </view>
|
|
|
<view>受干扰次数</view>
|
|
|
</view>
|
|
|
<view class="detail">
|
|
@@ -72,14 +76,18 @@
|
|
|
<view>专注力最大爆发值</view>
|
|
|
</view>
|
|
|
<view class="detail">
|
|
|
- <view class="detail_num">{{ record.start }}<text class="textLil text-gray">秒</text></view>
|
|
|
+ <view class="detail_num">{{ record.start }}
|
|
|
+ <text class="textLil text-gray">秒</text>
|
|
|
+ </view>
|
|
|
<view>专注力启动时长</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 平均专注力 -->
|
|
|
<view class="margin_right ">
|
|
|
- <view class="right_num">{{ record.att_average_big }}<text class="text-sm">{{ record.att_average_lil }}</text></view>
|
|
|
+ <view class="right_num">{{ record.att_average_big }}
|
|
|
+ <text class="text-sm">{{ record.att_average_lil }}</text>
|
|
|
+ </view>
|
|
|
<view class="right_text">平均专注力</view>
|
|
|
</view>
|
|
|
|
|
@@ -130,19 +138,19 @@
|
|
|
<view class="title">专注力数值曲线</view>
|
|
|
</view>
|
|
|
<view class="label">
|
|
|
- <view>
|
|
|
- <view class="dot dot-Att"></view>
|
|
|
- <text class="name">Att(专注度)</text>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view class="dot dot-Med"></view>
|
|
|
- <text class="name">Med(放松度)</text>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view class="dot dot-Amp"></view>
|
|
|
- <text class="name">Amp(和谐度)</text>
|
|
|
- </view>
|
|
|
+ <view>
|
|
|
+ <view class="dot dot-Att"></view>
|
|
|
+ <text class="name">Att(专注度)</text>
|
|
|
</view>
|
|
|
+ <view>
|
|
|
+ <view class="dot dot-Med"></view>
|
|
|
+ <text class="name">Med(放松度)</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="dot dot-Amp"></view>
|
|
|
+ <text class="name">Amp(和谐度)</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="chart chart_line">
|
|
@@ -159,12 +167,12 @@
|
|
|
<van-tabs
|
|
|
:active="0"
|
|
|
color="#6858C4"
|
|
|
- type="card"
|
|
|
@change="changeMin"
|
|
|
+ :swipe-threshold="4"
|
|
|
>
|
|
|
<van-tab
|
|
|
:name="index"
|
|
|
- :title="(5*index)+'-'+(5*(index+1)) + '分钟'"
|
|
|
+ :title="(2*index)+'-'+(2*(index+1)) + '分钟'"
|
|
|
v-for="(section,index) in data_section"
|
|
|
:key="index"
|
|
|
></van-tab>
|
|
@@ -242,9 +250,27 @@
|
|
|
canvasId="demo-canvas-a1"
|
|
|
/>
|
|
|
</view>
|
|
|
+ <view
|
|
|
+ class="section_container"
|
|
|
+ v-if="is_cut"
|
|
|
+ >
|
|
|
+ <van-tabs
|
|
|
+ :active="0"
|
|
|
+ color="#6858C4"
|
|
|
+ @change="changeABMin"
|
|
|
+ :swipe-threshold="4"
|
|
|
+ >
|
|
|
+ <van-tab
|
|
|
+ :name="index"
|
|
|
+ :title="(2*index)+'-'+(2*(index+1)) + '分钟'"
|
|
|
+ v-for="(section,index) in data_section"
|
|
|
+ :key="index"
|
|
|
+ ></van-tab>
|
|
|
+ </van-tabs>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- Delta/theta脑波变化曲线图 -->
|
|
|
- <view class="absorbed_change ">
|
|
|
+ <view class="absorbed_change ">
|
|
|
<view class="bar">
|
|
|
<view class="interfere_title_wrap">
|
|
|
<view class="line"></view>
|
|
@@ -269,6 +295,25 @@
|
|
|
canvasId="demo-canvas-a2"
|
|
|
/>
|
|
|
</view>
|
|
|
+ <view
|
|
|
+ class="section_container"
|
|
|
+ v-if="is_cut"
|
|
|
+ >
|
|
|
+ <van-tabs
|
|
|
+ :active="0"
|
|
|
+ color="#6858C4"
|
|
|
+ @change="changeDTMin"
|
|
|
+ :swipe-threshold="4"
|
|
|
+
|
|
|
+ >
|
|
|
+ <van-tab
|
|
|
+ :name="index"
|
|
|
+ :title="(2*index)+'-'+(2*(index+1)) + '分钟'"
|
|
|
+ v-for="(section,index) in data_section"
|
|
|
+ :key="index"
|
|
|
+ ></van-tab>
|
|
|
+ </van-tabs>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<van-toast id="van-toast"/>
|
|
@@ -442,6 +487,7 @@ export default {
|
|
|
$this.record["att_average_string"] = $this.record["att_average"].toString();
|
|
|
$this.record["att_average_lil"] = $this.record["att_average_string"].substring($this.record["att_average_string"].indexOf("."));
|
|
|
|
|
|
+ let $play_time = $this.record.play_time;
|
|
|
$this.record.play_time = formatSeconds($this.record.play_time);
|
|
|
$this.record.start_time = timestampToTimeS($this.record.start_time);
|
|
|
$this.record.height_absorbed = Math.ceil(
|
|
@@ -469,22 +515,32 @@ export default {
|
|
|
$pie_charts.setOption($pie_option);
|
|
|
|
|
|
//5分钟阶段
|
|
|
- let $five_min = 5 * 60;
|
|
|
- $this.is_cut = $this.record.play_time > $five_min;
|
|
|
+ let $min = 2 * 60;
|
|
|
+ $this.is_cut = $play_time > $min;
|
|
|
+ console.log($this.is_cut)
|
|
|
if ($this.is_cut) {
|
|
|
//截断得数量
|
|
|
$this.data_section = Math.ceil(
|
|
|
- $this.record.play_time / $five_min
|
|
|
+ $play_time / $min
|
|
|
);
|
|
|
+ let $e = {
|
|
|
+ mp: {
|
|
|
+ detail: {
|
|
|
+ name: 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.changeMin($e)
|
|
|
+ this.changeABMin($e)
|
|
|
+ this.changeDTMin($e)
|
|
|
+ } else {
|
|
|
+ //处理 专注度 和 放松度的值
|
|
|
+ $this.get_game_line($this.record.line, $this.record.line_med, $this.record.amp)
|
|
|
+ // 处理 alpha beta
|
|
|
+ $this.get_game_ab($this.record.low_alpha, $this.record.high_alpha, $this.record.low_beta, $this.record.high_beta)
|
|
|
+ // // 处理 delta theta
|
|
|
+ $this.get_game_dt($this.record.delta, $this.record.theta)
|
|
|
}
|
|
|
- //处理 专注度 和 放松度的值
|
|
|
- $this.get_game_line($this.record.line, $this.record.line_med, $this.record.amp)
|
|
|
- // 处理 alpha beta
|
|
|
- console.log($this.record.alpha, $this.record.theta)
|
|
|
- $this.get_game_ab($this.record.low_alpha, $this.record.high_alpha, $this.record.low_beta, $this.record.high_beta)
|
|
|
- // // 处理 delta theta
|
|
|
- console.log($this.record.beta, $this.record.delta)
|
|
|
- $this.get_game_dt($this.record.delta, $this.record.theta)
|
|
|
|
|
|
|
|
|
},
|
|
@@ -495,32 +551,8 @@ export default {
|
|
|
}, 800);
|
|
|
},
|
|
|
get_game_line($line_data, $line_med_data, $line_amp_data) {
|
|
|
- let $option = {};
|
|
|
- setTimeout(() => {
|
|
|
- if ($this.is_cut) {
|
|
|
- //需要截断数据
|
|
|
- let $more_than_count = $line_data.length % $this.data_section;
|
|
|
- let i = 0;
|
|
|
- //根据多出来的数 删除结尾得数量
|
|
|
- for (i = 0; i < $more_than_count; i++) {
|
|
|
- $line_data.pop();
|
|
|
- }
|
|
|
-
|
|
|
- $this.data_lines = [];
|
|
|
- //获取每一组得数据长度
|
|
|
- let $item_len = $line_data.length / $this.data_section;
|
|
|
- for (i = 0; i < $this.data_section; i++) {
|
|
|
- $this.data_lines.push(
|
|
|
- $line_data.slice(i * $item_len, (i + 1) * $item_len)
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- $option = util.getLineOption($this.data_lines[0], $line_med_data, $line_amp_data);
|
|
|
- } else {
|
|
|
- $option = util.getLineOption($line_data, $line_med_data, $line_amp_data);
|
|
|
- }
|
|
|
- att_charts.setOption($option);
|
|
|
- }, 800);
|
|
|
+ let $option = util.getLineOption($line_data, $line_med_data, $line_amp_data);
|
|
|
+ att_charts.setOption($option);
|
|
|
},
|
|
|
get_game_ab($line_alphaL, $line_alphaH, $line_betaL, $line_betaH) {
|
|
|
let $option = {};
|
|
@@ -540,8 +572,39 @@ export default {
|
|
|
// 切换时间查看线 数据
|
|
|
changeMin($e) {
|
|
|
let $index = $e.mp.detail.name;
|
|
|
- let $option = util.getLineOption($this.data_lines[$index], [0]);
|
|
|
- att_charts.setOption($option);
|
|
|
+ // 0-2 2-4 4-6
|
|
|
+ // 0 1 2
|
|
|
+ let $start = $index * 120
|
|
|
+ let $end = ($index + 1) * 120
|
|
|
+ let $line_data = $this.record.line.slice($start, $end);
|
|
|
+ let $med_data = $this.record.line_med.slice($start, $end);
|
|
|
+ let $amp_data = $this.record.amp.slice($start, $end);
|
|
|
+ $this.get_game_line($line_data, $med_data, $amp_data)
|
|
|
+ },
|
|
|
+ // 切换时间查看线 数据
|
|
|
+ changeABMin($e) {
|
|
|
+ let $index = $e.mp.detail.name;
|
|
|
+ // 0-2 2-4 4-6
|
|
|
+ // 0 1 2
|
|
|
+ let $start = $index * 120
|
|
|
+ let $end = ($index + 1) * 120
|
|
|
+ console.log($start, $end)
|
|
|
+ let low_alpha = $this.record.low_alpha.slice($start, $end);
|
|
|
+ let high_alpha = $this.record.high_alpha.slice($start, $end);
|
|
|
+ let low_beta = $this.record.low_beta.slice($start, $end);
|
|
|
+ let high_beta = $this.record.high_beta.slice($start, $end);
|
|
|
+ $this.get_game_ab(low_alpha, high_alpha, low_beta, high_beta)
|
|
|
+ },
|
|
|
+ // 切换时间查看线 数据
|
|
|
+ changeDTMin($e) {
|
|
|
+ let $index = $e.mp.detail.name;
|
|
|
+ // 0-2 2-4 4-6
|
|
|
+ // 0 1 2
|
|
|
+ let $start = $index * 120
|
|
|
+ let $end = ($index + 1) * 120
|
|
|
+ let delta = $this.record.delta.slice($start, $end);
|
|
|
+ let theta = $this.record.theta.slice($start, $end);
|
|
|
+ $this.get_game_dt(delta, theta)
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -691,9 +754,9 @@ image.boy {
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
color: #676767;
|
|
|
- z-index:999;
|
|
|
+ z-index: 999;
|
|
|
margin-top: -100px;
|
|
|
- margin-left:5px
|
|
|
+ margin-left: 5px
|
|
|
}
|
|
|
|
|
|
.margin-tb .margin_left .left_content .left_num {
|
|
@@ -825,7 +888,7 @@ image.boy {
|
|
|
border-radius: 10px;
|
|
|
}
|
|
|
|
|
|
-.chart_line{
|
|
|
+.chart_line {
|
|
|
/* box-shadow: 0px 6px 11px #dadada; */
|
|
|
background: #f3f3f3;
|
|
|
}
|
|
@@ -880,7 +943,7 @@ image.boy {
|
|
|
box-shadow: 0px 6px 11px #dadada;
|
|
|
}
|
|
|
|
|
|
-.divide_line{
|
|
|
+.divide_line {
|
|
|
width: 360px;
|
|
|
height: 1px;
|
|
|
background: #E5E5E5;
|
|
@@ -1086,12 +1149,12 @@ image.boy {
|
|
|
font-size: 10px;
|
|
|
}
|
|
|
|
|
|
-.label_up{
|
|
|
+.label_up {
|
|
|
color: #9a95b7;
|
|
|
font-size: 10px;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
- width:270px
|
|
|
+ width: 270px
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1107,9 +1170,11 @@ image.boy {
|
|
|
.dot-Att {
|
|
|
background: #FAB615;
|
|
|
}
|
|
|
+
|
|
|
.dot-Med {
|
|
|
background: #40FF31;
|
|
|
}
|
|
|
+
|
|
|
.dot-Amp {
|
|
|
background: #D4327A;
|
|
|
}
|
|
@@ -1121,21 +1186,22 @@ image.boy {
|
|
|
background: #FFE838;
|
|
|
}
|
|
|
|
|
|
-.dot-Low-Alpha{
|
|
|
+.dot-Low-Alpha {
|
|
|
background: #38FF49;
|
|
|
}
|
|
|
|
|
|
-.dot-High-Alpha{
|
|
|
+.dot-High-Alpha {
|
|
|
background: #00AD0E;
|
|
|
}
|
|
|
|
|
|
-.dot-Low-Beta{
|
|
|
+.dot-Low-Beta {
|
|
|
background: #0060F1;
|
|
|
}
|
|
|
|
|
|
-.dot-High-Beta{
|
|
|
+.dot-High-Beta {
|
|
|
background: #00CCFF;
|
|
|
}
|
|
|
+
|
|
|
/* .dot-Beta {
|
|
|
background: #00CCFF;
|
|
|
} */
|