Kaynağa Gözat

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

zhouj1203@hotmail.com 4 yıl önce
ebeveyn
işleme
dcb5901eb9

+ 2 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/SimpleAnalysis.vue

@@ -30,10 +30,10 @@
                 </span>
             </div>
             <div class="count-box">
-                <span class="count-subject-num">3</span>
+                <span class="count-subject-num">273</span>
                 <span class="count-subject-text">
                     <Icon custom="iconfont icon-class-self" class="count-icon" />
-                    其他
+                    平均分
                 </span>
             </div>
         </div>

+ 63 - 16
TEAMModelOS/ClientApp/src/view/learnactivity/echarts/AvgCompare.vue

@@ -32,22 +32,22 @@ export default {
                 ],
                 legend: {
                     // data: ['语文', '数学', '英语']
-                    right:5,
-                    data:[
+                    right: 5,
+                    data: [
                         {
-                            name:'语文',
-                            textStyle:{
-                                color:'#FFF'
+                            name: '语文',
+                            textStyle: {
+                                color: '#FFF'
                             }
-                        },{
-                            name:'数学',
-                            textStyle:{
-                                color:'#FFF'
+                        }, {
+                            name: '数学',
+                            textStyle: {
+                                color: '#FFF'
                             }
-                        },{
-                            name:'英语',
-                            textStyle:{
-                                color:'#FFF'
+                        }, {
+                            name: '英语',
+                            textStyle: {
+                                color: '#FFF'
                             }
                         }
                     ]
@@ -65,9 +65,9 @@ export default {
                     trigger: 'axis'
                 },
                 grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
+                    left: '0%',
+                    right: '40px',
+                    bottom: '0%',
                     containLabel: true
                 },
                 // toolbox: {
@@ -122,6 +122,30 @@ export default {
                         stack: '总量',
                         barMaxWidth: 30,
                         data: [85, 89, 88, 92, 99]
+                    },
+                    {
+                        name: '总分',
+                        type: 'line',
+                        itemStyle: {
+                            color: '#11C2EE',
+                            width: 2
+                        },
+                        symbol: 'none',
+                        lineStyle: {
+                            type: 'dashed',
+                            width: 0
+                        },
+                        markLine: {
+                            data: [
+                                { type: 'average' }
+                            ],
+                            lineStyle: {
+                                color: '#11C2EE',
+                                type: 'dashed',
+                                width: 2
+                            }
+                        },
+                        data: [272, 271, 273, 279, 273]
                     }
                 ]
             }
@@ -138,6 +162,29 @@ export default {
                 this.progressPie.resize()
             })
         })
+        this.progressPie.on('legendselectchanged', (params) =>{
+            console.log(params)
+            let active = this.option.series.filter(item=>{
+                if(params.selected[item.name]){
+                    return true
+                }else{
+                    return false
+                }
+            })
+            let score = []
+            active.forEach((item)=>{
+                item.data.forEach((scoreItem,index)=>{
+                    if(!score[index]) score[index] = 0
+                    score[index] += scoreItem
+                })
+            })
+            console.log('active',active)
+            console.log('score',score)
+            let len = this.option.series.length
+            this.option.series[len-1].data = score
+            this.progressPie.setOption(this.option)
+
+        });
     },
     watch: {
         pieData: {

+ 2 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/echarts/ScoreMatrix.vue

@@ -47,8 +47,8 @@ export default {
                     {
                         hoverOffset: 5,
                         type: 'pie',
-                        radius: '45%',
-                        center: ['50%', '50%'],
+                        radius: '50%',
+                        center: ['45%', '50%'],
                         selectedMode: 'single',
                         label: {
                             show: true,