|
@@ -11,41 +11,40 @@
|
|
|
<view class="children-class">{{childreninfo.class}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="icon-box">
|
|
|
- <view class="t-icon t-icon-xuexirenwu"></view>
|
|
|
- <view class="t-icon t-icon-ceshi"></view>
|
|
|
-
|
|
|
- <view style="display: flex; flex-direction: column; align-items: center;">
|
|
|
- <view class="t-icon t-icon-mulu"></view>
|
|
|
- <view class="icon-text">返回</view>
|
|
|
+
|
|
|
+ <!-- 图表列表 -->
|
|
|
+ <!-- 单次考试 -->
|
|
|
+ <view class="chart-container">
|
|
|
+ <view class="chart-name">
|
|
|
+ <view class="t-icon t-icon-xianxingmeishuhuahua"></view>
|
|
|
+ <text class="chart-name-text">最近考试科目分析</text>
|
|
|
+ </view>
|
|
|
+ <view class="charts-box">
|
|
|
+ <qiun-data-charts type="rose" :chartData="roseChartData" :loadingType="4" :tapLegend="true" />
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+ <!-- 学期平均 -->
|
|
|
<view class="chart-container">
|
|
|
<view class="chart-name">
|
|
|
- <view class="t-icon t-icon-shizimao"></view>
|
|
|
- <text class="chart-name-text">科目分析</text>
|
|
|
+ <view class="t-icon t-icon-xianxingyouyong"></view>
|
|
|
+ <text class="chart-name-text">{{semester}} 各科目平均值分析</text>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="charts-box">
|
|
|
- <qiun-data-charts type="rose" :chartData="chartData" :loadingType="4" :tapLegend="true" />
|
|
|
+ <qiun-data-charts type="rose" :chartData="meanChartData" :loadingType="4" :tapLegend="true" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 数据分析模块 -->
|
|
|
- <!-- <view class="data-box">
|
|
|
- <view class="data-box-item" v-bind:style="{background: chartData.series[0].color}">
|
|
|
- <view class="item-text">{{chartData.series[0].name}}</view>
|
|
|
+ <view class="data-box">
|
|
|
+ <view class="data-box-item" style="{background: #0052d4;}">
|
|
|
+ <view class="item-text">您的孩子优势科目为:{{bestSubject.name}}</view>
|
|
|
<view class="item-number">{{chartData.series[0].data/0.01}}%</view>
|
|
|
<view style="display: flex;align-items: center;">
|
|
|
<view class="t-icon t-icon-jiangbei-6"></view>
|
|
|
<view class="icon-text-item">继续加油!</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="data-box-item" v-bind:style="{background: chartData.series[1].color}">
|
|
|
+ <view class="data-box-item" style="{background: #ff5959}">
|
|
|
<view class="item-text">{{chartData.series[1].name}}</view>
|
|
|
<view class="item-number">{{chartData.series[1].data/0.01}}%</view>
|
|
|
<view style="display: flex;align-items: center;">
|
|
@@ -53,7 +52,7 @@
|
|
|
<view class="icon-text-item">继续加油!</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
@@ -63,12 +62,15 @@
|
|
|
|
|
|
export default {
|
|
|
computed:{
|
|
|
- ...mapState('m_children',['childreninfo','semester'])
|
|
|
+ ...mapState('m_children',['childreninfo','semester']),
|
|
|
+ ...mapState('m_chart', ['areaChartData'])
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- chartData: {
|
|
|
+ //最好科目
|
|
|
+ bestSubject: {},
|
|
|
+ roseChartData: {
|
|
|
series: [{
|
|
|
"data": [{
|
|
|
"name": "数学",
|
|
@@ -76,7 +78,7 @@
|
|
|
},
|
|
|
{
|
|
|
"name": "语文",
|
|
|
- "value": 85
|
|
|
+ "value": 86
|
|
|
},
|
|
|
{
|
|
|
"name": "英语",
|
|
@@ -97,11 +99,44 @@
|
|
|
]
|
|
|
}]
|
|
|
},
|
|
|
- //查询参数
|
|
|
- queryObj: {},
|
|
|
-
|
|
|
+ meanChartData: {
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ "data": [{
|
|
|
+ "name": "数学",
|
|
|
+ "value": 97
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "语文",
|
|
|
+ "value": 82
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "英语",
|
|
|
+ "value": 99
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "科学",
|
|
|
+ "value": 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "体育",
|
|
|
+ "value": 77
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "思品",
|
|
|
+ "value": 95
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }]
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
+ onLoad(){
|
|
|
+ // this.getChartData()
|
|
|
+ this.getGradeDetail()
|
|
|
+ },
|
|
|
methods:{
|
|
|
//返回成绩页面
|
|
|
returnList(){
|
|
@@ -109,23 +144,28 @@
|
|
|
url: '/pages/grade/grade'
|
|
|
})
|
|
|
},
|
|
|
- //获取表格数据
|
|
|
- // async getChartData(){
|
|
|
-
|
|
|
- // },
|
|
|
- },
|
|
|
- onLoad(){
|
|
|
- // this.getChartData()
|
|
|
+ //通过map方法返回成绩的数组
|
|
|
+ getGradeDetail(){
|
|
|
+ //获取成绩最好科目
|
|
|
+ this.bestSubject = this.meanChartData.series[0].data.reduce((pre,cur)=>pre.value>cur.value?pre:cur)
|
|
|
+ console.log(this.bestSubject);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .page-box{
|
|
|
+ .page-box {
|
|
|
height: 600rpx;
|
|
|
- background: linear-gradient(#f97f41, #f1f3f5);
|
|
|
- .back{
|
|
|
- padding: 100rpx 0 40rpx 40rpx;
|
|
|
+ background: linear-gradient(#a5c6ff, #f1f3f5);
|
|
|
+
|
|
|
+ .back {
|
|
|
+ padding: 100rpx 0 30rpx 40rpx;
|
|
|
+ .t-icon{
|
|
|
+ width:50rpx;
|
|
|
+ height:50rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.children-box{
|
|
@@ -156,19 +196,8 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .icon-box{
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin: 0 80rpx 20rpx 80rpx;
|
|
|
- padding-top: 60rpx;
|
|
|
- .icon-text{
|
|
|
- font-weight: bold;
|
|
|
- font-size: 26rpx;
|
|
|
- color: #3B4144;
|
|
|
- }
|
|
|
- }
|
|
|
.chart-container {
|
|
|
- margin: 0 20rpx;
|
|
|
+ margin: 40rpx 20rpx 0 20rpx;
|
|
|
padding: 0rpx 10rpx 0rpx 0rpx;
|
|
|
border-radius: 15rpx;
|
|
|
display: flex;
|
|
@@ -198,45 +227,45 @@
|
|
|
height: 550rpx;
|
|
|
}
|
|
|
}
|
|
|
- // .data-box{
|
|
|
- // display: flex;
|
|
|
- // flex-direction: row;
|
|
|
- // align-items: center;
|
|
|
- // flex-wrap: wrap;
|
|
|
- // justify-content: space-between;
|
|
|
- // margin: 20rpx;
|
|
|
- // .data-box-item{
|
|
|
- // display: flex;
|
|
|
- // flex-direction: column;
|
|
|
- // background-color: #FFFFFF;
|
|
|
- // border-radius: 15rpx;
|
|
|
- // width: 340rpx;
|
|
|
- // box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1);
|
|
|
- // .item-text{
|
|
|
- // font-size: 30rpx;
|
|
|
- // font-weight: bold;
|
|
|
- // color: #FFFFFF;
|
|
|
- // margin: 30rpx 0 0 30rpx;
|
|
|
- // }
|
|
|
- // .t-icon{
|
|
|
- // margin-bottom: 30rpx;
|
|
|
- // margin-left: 20rpx;
|
|
|
- // width: 100rpx;
|
|
|
- // height: 100rpx;
|
|
|
- // }
|
|
|
- // .item-number{
|
|
|
- // font-size: 80rpx;
|
|
|
- // margin-left: 30rpx;
|
|
|
- // color: #FFFFFF;
|
|
|
- // font-weight: bold;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+ .data-box{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 20rpx;
|
|
|
+ .data-box-item{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ width: 340rpx;
|
|
|
+ box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1);
|
|
|
+ .item-text{
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFFFFF;
|
|
|
+ margin: 30rpx 0 0 30rpx;
|
|
|
+ }
|
|
|
+ .t-icon{
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ width: 100rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ }
|
|
|
+ .item-number{
|
|
|
+ font-size: 80rpx;
|
|
|
+ margin-left: 30rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .icon-text-item{
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFFFFF;
|
|
|
+ margin-left: 10rpx;
|
|
|
}
|
|
|
- // .icon-text-item{
|
|
|
- // font-size: 30rpx;
|
|
|
- // font-weight: bold;
|
|
|
- // color: #FFFFFF;
|
|
|
- // margin-left: 10rpx;
|
|
|
- // }
|
|
|
</style>
|