소스 검색

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

李思淳 5 년 전
부모
커밋
b83857f2f5

+ 46 - 0
TEAMModelOS.SDK/Helper/Common/JsonHelper/JsonPatchHelper.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.AspNetCore.JsonPatch;
+using Microsoft.AspNetCore.JsonPatch.Operations;
+namespace System
+{
+    public static class JsonPatchHelper
+    {
+        public static T Add<T>(this T t, string path, object value) where T : class
+        {
+            JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
+            jsonPatch.Operations.Add(new Operation<T>("add", path, null, value));
+            jsonPatch.ApplyTo(t);
+            return t;
+        }
+        public static T Remove<T>(this T t, string path) where T : class
+        {
+            JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
+            jsonPatch.Operations.Add(new Operation<T>("remove", path, null, null));
+            jsonPatch.ApplyTo(t);
+            return t;
+        }
+        public static T Replace<T>(this T t, string path, object value) where T : class
+        {
+            JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
+            jsonPatch.Operations.Add(new Operation<T>("replace", path, null, value));
+            jsonPatch.ApplyTo(t);
+            return t;
+        }
+        public static T Move<T>(this T t, string from, string path) where T : class
+        {
+            JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
+            jsonPatch.Operations.Add(new Operation<T>("move", path, from));
+            jsonPatch.ApplyTo(t);
+            return t;
+        }
+        public static T Copy<T>(this T t, string from, string path) where T : class
+        {
+            JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
+            jsonPatch.Operations.Add(new Operation<T>("copy", path, from));
+            jsonPatch.ApplyTo(t);
+            return t;
+        }
+    }
+}

+ 1 - 0
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -19,6 +19,7 @@
     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" />
     <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.0.0" />
     <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
+    <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="3.1.2" />
     <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
     <PackageReference Include="Microsoft.Azure.CosmosDB.BulkExecutor" Version="2.4.1-preview" />
     <PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="2.9.2" />

+ 156 - 150
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseClassRadar.vue

@@ -1,164 +1,170 @@
 <template>
-  <div>
-    <div :id='echartsId' class='myRadar'></div>
-  </div>
+    <div>
+        <div :id='echartsId' class='myRadar'></div>
+    </div>
 </template>
 
 <script>
-export default {
-  name: 'BaseClassRadar',
-  props: ['echartsId'],
-  data() {
-    return {
-      radarData: []
-    }
-  },
-
-  methods: {
-    drawLine() {
-      let myRadar = this.$echarts.init(
-        document.getElementById(this.echartsId),
-        'chalk'
-      );
-
-      // 指定图表的配置项和数据
-      var option = {
-        title: {
-          text: '75',
-          top:'45%',
-          left:'43%',
-          textStyle:{
-              color:'#fff',
-              lineHeight:40,
-              fontSize:30
-          }
-        },
-        tooltip: {},
-        legend: {
-          bottom: 20,
-          itemWidth: 12,
-          itemHeight: 12,
-          data: [this.$t('totalAnalysis.echarts_text4'), this.$t('totalAnalysis.echarts_text5')],
-          textStyle: {
-            color: '#fff'
-          }
-        },
-        radar: {
-          radius: '60%',
-          splitNumber: 8,
-          axisLine: {
-            lineStyle: {
-              color: '#fff',
-              opacity: 0.2
-            }
-          },
-          splitLine: {
-            lineStyle: {
-              color: '#fff',
-              opacity: 0.2
-            }
-          },
-          splitArea: {
-            areaStyle: {
-              color: 'rgba(255,255,255,.3)',
-              opacity: 1,
-              shadowBlur: 45,
-              shadowColor: 'rgba(0,0,0,.5)',
-              shadowOffsetX: 0,
-              shadowOffsetY: 15
-            }
-          },
-          indicator: [
-            {
-              name: '语文',
-              max: 100
-            },
-            {
-              name: '数学',
-              max: 100
-            },
-            {
-              name: '英语',
-              max: 100
-            },
-            {
-              name: '化学',
-              max: 100
-            },
-            {
-              name: '物理',
-              max: 100
-            },
-            {
-              name: '生物',
-              max: 100
+    export default {
+        name: 'BaseClassRadar',
+        props: ['echartsId'],
+        data() {
+            return {
+                radarData: []
             }
-          ]
         },
-        series: [
-          {
-            name: '高一年级',
-            type: 'radar',
-            symbolSize: 0,
-            areaStyle: {
-              normal: {
-                shadowBlur: 13,
-                shadowColor: 'rgba(0,0,0,.2)',
-                shadowOffsetX: 0,
-                shadowOffsetY: 10,
-                opacity: .4
-              }
+
+        methods: {
+            drawLine() {
+                let myRadar = this.$echarts.init(
+                    document.getElementById(this.echartsId),
+                    'chalk'
+                );
+
+                // 指定图表的配置项和数据
+                var option = {
+                    title: {
+                        text: '75',
+                        subtext: '得分率',
+                        left: 'center',
+                        top: '46.3%',
+                        textStyle: {
+                            color: '#F4F8FA',
+                            fontWeight: 'bold',
+                            fontSize: 34
+                        },
+                        subtextStyle: {
+                            color: '#E7EBEC',
+                            fontWeight: 'normal',
+                            fontSize: 12,
+                            lineHeight: 8
+                        }
+                    },
+                    tooltip: {},
+                    legend: {
+                        bottom: 20,
+                        data: [this.$t('totalAnalysis.echarts_text4'), this.$t('totalAnalysis.echarts_text5')],
+                        textStyle: {
+                            color: '#fff',
+                            padding:[2,0,0,0]
+                        }
+                    },
+                    radar: {
+                        radius: '60%',
+                        splitNumber: 8,
+                        axisLine: {
+                            lineStyle: {
+                                color: '#fff',
+                                opacity: 0.2
+                            }
+                        },
+                        splitLine: {
+                            lineStyle: {
+                                color: '#fff',
+                                opacity: 0.2
+                            }
+                        },
+                        splitArea: {
+                            areaStyle: {
+                                color: 'rgba(255,255,255,.3)',
+                                opacity: 1,
+                                shadowBlur: 45,
+                                shadowColor: 'rgba(0,0,0,.5)',
+                                shadowOffsetX: 0,
+                                shadowOffsetY: 15
+                            }
+                        },
+                        indicator: [
+                            {
+                                name: '语文',
+                                max: 100
+                            },
+                            {
+                                name: '数学',
+                                max: 100
+                            },
+                            {
+                                name: '英语',
+                                max: 100
+                            },
+                            {
+                                name: '化学',
+                                max: 100
+                            },
+                            {
+                                name: '物理',
+                                max: 100
+                            },
+                            {
+                                name: '生物',
+                                max: 100
+                            }
+                        ]
+                    },
+                    series: [
+                        {
+                            name: '高一年级',
+                            type: 'radar',
+                            symbolSize: 0,
+                            areaStyle: {
+                                normal: {
+                                    shadowBlur: 13,
+                                    shadowColor: 'rgba(0,0,0,.2)',
+                                    shadowOffsetX: 0,
+                                    shadowOffsetY: 10,
+                                    opacity: .4
+                                }
+                            },
+                            data: [
+                                {
+                                    value: [
+                                        89,
+                                        65,
+                                        88,
+                                        72,
+                                        90,
+                                        69,
+                                    ],
+                                    name: this.$t('totalAnalysis.echarts_text4')
+                                },
+                                {
+                                    value: [
+                                        78,
+                                        77,
+                                        72,
+                                        70,
+                                        69,
+                                        66,
+                                    ],
+                                    name: this.$t('totalAnalysis.echarts_text5')
+                                }
+                            ]
+                        }
+                    ],
+                    color: ['#7db41b', '#b1eadb'],
+                };
+
+                // 绘制图表
+                myRadar.setOption(option);
+                window.addEventListener('resize', function () {
+                    myRadar.resize()
+                })
             },
-            data: [
-              {
-                value: [
-                  89,
-                  65,
-                  88,
-                  72,
-                  90,
-                  69,
-                ],
-                name: this.$t('totalAnalysis.echarts_text4')
-              },
-              {
-                value: [
-                  78,
-                  77,
-                  72,
-                  70,
-                  69,
-                  66,
-                ],
-                name: this.$t('totalAnalysis.echarts_text5')
-              }
-            ]
-          }
-        ],
-        color: ['#7db41b', '#b1eadb'],
-      };
 
-      // 绘制图表
-          myRadar.setOption(option);
-          window.addEventListener('resize', function () {
-             myRadar.resize()
-          })
-    },
 
-    
-  },
-  mounted() {
-      this.drawLine()
-  }
-};
+        },
+        mounted() {
+            this.drawLine()
+        }
+    };
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->
 <style scoped>
-.myRadar {
-  width: 100%;
-  height: 480px;
-  margin: 0 auto;
-  display: block;
-}
+    .myRadar {
+        width: 100%;
+        height: 480px;
+        margin: 0 auto;
+        display: block;
+    }
 </style>

+ 243 - 231
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGeniusLine.vue

@@ -1,245 +1,257 @@
 <template>
-  <div>
-    <div :id='echartsId' class='myLine'></div>
-  </div>
+    <div>
+        <div :id='echartsId' class='myLine'></div>
+    </div>
 </template>
 
 <script>
-export default {
-  name: 'BaseGeniusLine',
-  props: ['echartsId'],
-  data() {
-    return {
-      radarData: []
-    }
-  },
-
-  methods: {
-    drawLine() {
-      let myLine = this.$echarts.init(
-        document.getElementById(this.echartsId),
-        'chalk'
-      );
-
-      // 指定图表的配置项和数据
-      var option = {
-        color: ['#2adecf'],
-        textStyle: {
-          color: 'rgb(222,222,222)'
-        },
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow'
-          }
-        },
-        grid: {
-          show: false,
-          containLabel: true,
-          height: 360,
-          width: '96%',
-          x2: '2%',
-          tooltip: {
-            show: true,
-            trigger: 'axis', // 触发类型
-            textStyle: {
-              color: '#666'
+    export default {
+        name: 'BaseGeniusLine',
+        props: ['echartsId'],
+        data() {
+            return {
+                radarData: []
             }
-          }
-        },
-        dataZoom: [
-          {
-            show: true,
-            height: 10,
-            xAxisIndex: [0],
-            bottom: 10,
-            start: 0,
-            end: 100,
-            handleIcon:
-              'M512 497.821538m-418.264615 0a418.264615 418.264615 0 1 0 836.52923 0 418.264615 418.264615 0 1 0-836.52923 0Z',
-            handleSize: '160%',
-            handleStyle: {
-              color: '#d3dee5'
-            },
-            textStyle: {
-              color: '#fff'
-            },
-            borderColor: '#90979c'
-          },
-          {
-            type: 'inside',
-            show: true,
-            height: 15,
-            start: 0,
-            end: 100
-          }
-        ],
-        legend: {
-          data: [this.$t('totalAnalysis.echarts_text18'), this.$t('totalAnalysis.echarts_text17')],
-          textStyle: {
-            color: '#FFFFFF'
-          }
         },
-        xAxis: [
-          {
-            data: [
-              '高一1班',
-              '高一2班',
-              '高一3班',
-              '高一4班',
-              '高一5班',
-              '高一6班',
-              '高一7班',
-              '高一8班',
-              '高一9班',
-              '高一10班'
-            ],
-            axisLine: {
-              show: true,
-              lineStyle: {
-                color: '#4e4e4e'
-              }
-            },
-            splitLine: {
-              show: false
-            },
-            axisTick: {
-              show: false
-            },
-            axisLabel: {
-              interval: 0,
-              rotate: 0
-            }
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: this.$t('totalAnalysis.echarts_text18'),
-            axisLine: {
-              show: false
-            },
-            axisTick: {
-              show: false
-            },
-            splitLine: {
-              show: false
-            },
-            axisLabel: {}
-          },
-          {
-            type: 'value',
-            name: this.$t('totalAnalysis.echarts_text17'),
-            axisLine: {
-              show: false
-            },
-            axisTick: {
-              show: false
-            },
-            splitLine: {
-              show: false
-            },
-            axisLabel: {}
-          }
-        ],
-        series: [
-          {
-            name: this.$t('totalAnalysis.echarts_text18'),
-            type: 'bar',
-            barWidth: '20%',
-            itemStyle: {
-              normal: {
-                barBorderRadius: [30, 30, 0, 0],
-                color: this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
-                  {
-                    offset: 0,
-                    color: '#719aff'
-                  },
-                  {
-                    offset: 1,
-                    color: '#51c3ff'
-                  }
-                ])
-              }
-            },
-            data: [140, 110, 100, 90, 80, 70, 50, 40, 30, 20]
-          },
-          {
-            name: this.$t('totalAnalysis.echarts_text17'),
-            type: 'line',
-            yAxisIndex: 1,
-            itemStyle: {
-              normal: {
-                color: '#ffe898',
-                barBorderRadius: [30, 30, 0, 0],
-                lineStyle: {
-                  color: '#ffe898'
-                }
-              }
-            },
-            data: [80, 77, 62, 66, 88, 75, 65, 68, 44, 88],
-            markLine: {
-              symbol: 'none',
-              itemStyle: {
-                normal: {
-                  lineStyle: {
-                    type: 'dashed',
-                    color: 'red'
-                  },
-                  label: {
-                    show: true,
-                    position: 'left'
-                  }
-                }
-              },
-              large: true,
-              effect: {
-                show: false,
-                loop: true,
-                period: 0,
-                scaleSize: 2,
-                color: null,
-                shadowColor: null,
-                shadowBlur: null
-              },
-              data: [
-                [
-                  {
-                    name: '',
-                    xAxis: '',
-                    yAxis: ''
-                  },
-                  {
-                    name: '',
-                    xAxis: '',
-                    yAxis: ''
-                  }
-                ]
-              ]
-            }
-          }
-        ]
-      };
 
-      // 绘制图表
-          myLine.setOption(option);
-          window.addEventListener('resize', function () {
+        methods: {
+            drawLine() {
+                let myLine = this.$echarts.init(
+                    document.getElementById(this.echartsId),
+                    'chalk'
+                );
+
+                // 指定图表的配置项和数据
+                var option = {
+                    color: ['#2adecf'],
+                    textStyle: {
+                        color: 'rgb(222,222,222)'
+                    },
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'shadow'
+                        },
+                        formatter: function (params) {
+                            var results = params[0].name + '<br>';
+                            for (var i = 0; i < params.length; i++) {
+                                if (params[i].seriesType === 'line') {
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '%<br>';
+                                } else {
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '<br>';
+                                }
+
+                            }
+                            return results;
+                        }
+                    },
+                    grid: {
+                        show: false,
+                        containLabel: true,
+                        height: 360,
+                        width: '96%',
+                        x2: '2%',
+                        tooltip: {
+                            show: true,
+                            trigger: 'axis', // 触发类型
+                            textStyle: {
+                                color: '#666'
+                            }
+                        }
+                    },
+                    dataZoom: [
+                        {
+                            show: true,
+                            height: 10,
+                            xAxisIndex: [0],
+                            bottom: 10,
+                            start: 0,
+                            end: 100,
+                            handleIcon:
+                                'M512 497.821538m-418.264615 0a418.264615 418.264615 0 1 0 836.52923 0 418.264615 418.264615 0 1 0-836.52923 0Z',
+                            handleSize: '160%',
+                            handleStyle: {
+                                color: '#d3dee5'
+                            },
+                            textStyle: {
+                                color: '#fff'
+                            },
+                            borderColor: '#90979c'
+                        },
+                        {
+                            type: 'inside',
+                            show: true,
+                            height: 15,
+                            start: 0,
+                            end: 100
+                        }
+                    ],
+                    legend: {
+                        data: [this.$t('totalAnalysis.echarts_text18'), this.$t('totalAnalysis.echarts_text17')],
+                        textStyle: {
+                            color: '#FFFFFF'
+                        }
+                    },
+                    xAxis: [
+                        {
+                            data: [
+                                '高一1班',
+                                '高一2班',
+                                '高一3班',
+                                '高一4班',
+                                '高一5班',
+                                '高一6班',
+                                '高一7班',
+                                '高一8班',
+                                '高一9班',
+                                '高一10班'
+                            ],
+                            axisLine: {
+                                show: true,
+                                lineStyle: {
+                                    color: '#4e4e4e'
+                                }
+                            },
+                            splitLine: {
+                                show: false
+                            },
+                            axisTick: {
+                                show: false
+                            },
+                            axisLabel: {
+                                interval: 0,
+                                rotate: 0
+                            }
+                        }
+                    ],
+                    yAxis: [
+                        {
+                            type: 'value',
+                            name: this.$t('totalAnalysis.echarts_text18'),
+                            axisLine: {
+                                show: false
+                            },
+                            axisTick: {
+                                show: false
+                            },
+                            splitLine: {
+                                show: false
+                            },
+                            axisLabel: {}
+                        },
+                        {
+                            type: 'value',
+                            name: this.$t('totalAnalysis.echarts_text17') + '(%)',
+                            axisLine: {
+                                show: false
+                            },
+                            axisTick: {
+                                show: false
+                            },
+                            splitLine: {
+                                show: false
+                            },
+                            axisLabel: {}
+                        }
+                    ],
+                    series: [
+                        {
+                            name: this.$t('totalAnalysis.echarts_text18'),
+                            type: 'bar',
+                            barWidth: '20%',
+                            itemStyle: {
+                                normal: {
+                                    barBorderRadius: [30, 30, 0, 0],
+                                    color: this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
+                                        {
+                                            offset: 0,
+                                            color: '#719aff'
+                                        },
+                                        {
+                                            offset: 1,
+                                            color: '#51c3ff'
+                                        }
+                                    ])
+                                }
+                            },
+                            data: [140, 110, 100, 90, 80, 70, 50, 40, 30, 20]
+                        },
+                        {
+                            name: this.$t('totalAnalysis.echarts_text17'),
+                            type: 'line',
+                            yAxisIndex: 1,
+                            itemStyle: {
+                                normal: {
+                                    color: '#ffe898',
+                                    barBorderRadius: [30, 30, 0, 0],
+                                    lineStyle: {
+                                        color: '#ffe898'
+                                    }
+                                }
+                            },
+                            data: [80, 77, 62, 66, 88, 75, 65, 68, 44, 88],
+                            markLine: {
+                                symbol: 'none',
+                                itemStyle: {
+                                    normal: {
+                                        lineStyle: {
+                                            type: 'dashed',
+                                            color: 'red'
+                                        },
+                                        label: {
+                                            show: true,
+                                            position: 'left'
+                                        }
+                                    }
+                                },
+                                large: true,
+                                effect: {
+                                    show: false,
+                                    loop: true,
+                                    period: 0,
+                                    scaleSize: 2,
+                                    color: null,
+                                    shadowColor: null,
+                                    shadowBlur: null
+                                },
+                                data: [
+                                    [
+                                        {
+                                            name: '',
+                                            xAxis: '',
+                                            yAxis: ''
+                                        },
+                                        {
+                                            name: '',
+                                            xAxis: '',
+                                            yAxis: ''
+                                        }
+                                    ]
+                                ]
+                            }
+                        }
+                    ]
+                };
+
+                // 绘制图表
+                myLine.setOption(option);
+                window.addEventListener('resize', function () {
                     myLine.resize()
                 })
-    }
-  },
-  mounted() {
-    this.drawLine();
-  }
-};
+            }
+        },
+        mounted() {
+            this.drawLine();
+        }
+    };
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->
 <style scoped>
-.myLine {
-  width: 100%;
-  height: 480px;
-  margin: 0 auto;
-  display: block;
-}
+    .myLine {
+        width: 100%;
+        height: 480px;
+        margin: 0 auto;
+        display: block;
+    }
 </style>

+ 174 - 160
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGradeRadar.vue

@@ -1,175 +1,189 @@
 <template>
-  <div>
-    <div :id='echartsId' class='myRadar'></div>
-  </div>
+    <div>
+        <div :id='echartsId' class='myRadar'></div>
+    </div>
 </template>
 
 <script>
-export default {
-  name: 'BaseGradeRadar',
-  props: ['echartsId'],
-  data() {
-    return {
-      radarData: []
-    }
-  },
-
-  methods: {
-    drawLine() {
-      let myRadar = this.$echarts.init(
-        document.getElementById(this.echartsId),
-        'chalk'
-      );
-
-      // 指定图表的配置项和数据
-      var option = {
-        title: {
-          text: '75',
-          top:'45%',
-          left:'44%',
-          textStyle:{
-              color:'#fff',
-              lineHeight:40,
-              fontSize:36
-          }
-        },
-        tooltip: {},
-        legend: {
-          bottom: 20,
-          itemWidth: 12,
-          itemHeight: 12,
-          data: [this.$t('totalAnalysis.echarts_text1'), this.$t('totalAnalysis.echarts_text2'), this.$t('totalAnalysis.echarts_text3')],
-          textStyle: {
-            color: '#fff'
-          }
-        },
-        radar: {
-          radius: '60%',
-          splitNumber: 8,
-          axisLine: {
-            lineStyle: {
-              color: '#fff',
-              opacity: 0.2
-            }
-          },
-          splitLine: {
-            lineStyle: {
-              color: '#fff',
-              opacity: 0.2
+    export default {
+        name: 'BaseGradeRadar',
+        props: ['echartsId'],
+        data() {
+            return {
+                radarData: []
             }
-          },
-          splitArea: {
-            areaStyle: {
-              color: 'rgba(255,255,255,.3)',
-              opacity: 1,
-              shadowBlur: 45,
-              shadowColor: 'rgba(0,0,0,.5)',
-              shadowOffsetX: 0,
-              shadowOffsetY: 15
-            }
-          },
-          indicator: [
-            {
-              name: '语文',
-              max: 100
-            },
-            {
-              name: '数学',
-              max: 100
-            },
-            {
-              name: '英语',
-              max: 100
-            },
-            {
-              name: '化学',
-              max: 100
-            },
-            {
-              name: '物理',
-              max: 100
-            },
-            {
-              name: '生物',
-              max: 100
-            }
-          ]
         },
-        series: [
-          {
-            name: '高一年级',
-            type: 'radar',
-            symbolSize: 0,
-            areaStyle: {
-              normal: {
-                shadowBlur: 13,
-                shadowColor: 'rgba(0,0,0,.2)',
-                shadowOffsetX: 0,
-                shadowOffsetY: 10,
-                opacity: .4
-              }
-            },
-            data: [
-              {
-                value: [
-                  89,
-                  85,
-                  88,
-                  92,
-                  90,
-                  89,
-                ],
-                name: this.$t('totalAnalysis.echarts_text1')
-              },
-              {
-                value: [
-                  66,
-                  55,
-                  56,
-                  58,
-                  62,
-                  48,
-                ],
-                name: this.$t('totalAnalysis.echarts_text2')
-              },
-              {
-                value: [
-                  78,
-                  77,
-                  72,
-                  70,
-                  69,
-                  66,
-                ],
-                name: this.$t('totalAnalysis.echarts_text3')
-              }
-            ]
-          }
-        ],
-        color: ['#7db41b', '#b1eadb', '#b1aadb'],
-      };
 
-      // 绘制图表
-          myRadar.setOption(option);
-          window.addEventListener('resize', function () {
+        methods: {
+            drawLine() {
+                let myRadar = this.$echarts.init(
+                    document.getElementById(this.echartsId),
+                    'chalk'
+                );
+
+                // 指定图表的配置项和数据
+                var option = {
+                    title: {
+                        text: '75',
+                        subtext:'得分率',
+                        left: 'center',
+                        top:'46.3%',
+                        textStyle: {
+                            color:'#F4F8FA',
+                            fontWeight:'bold',
+                            fontSize: 34
+                        },
+                        subtextStyle:{
+                            color:'#E7EBEC',
+                            fontWeight:'normal',
+                            fontSize: 12,
+                            lineHeight:8
+                        }
+                    },
+                    tooltip: {
+                        //formatter: function (params) {
+                        //    console.log(params)
+                        //}
+                    },
+                    legend: {
+                        itemHeight: 14,
+                        data: [this.$t('totalAnalysis.echarts_text1'), this.$t('totalAnalysis.echarts_text2'), this.$t('totalAnalysis.echarts_text3')],
+                        textStyle: {
+                            color: '#fff',
+                            padding:[5,0,0,0]
+                        },
+                        bottom: "5%",
+                        right:"8%",
+                        orient: 'vertical',
+
+                    },
+                    radar: {
+                        radius: '60%',
+                        splitNumber: 8,
+                        axisLine: {
+                            lineStyle: {
+                                color: '#fff',
+                                opacity: 0.2
+                            }
+                        },
+                        splitLine: {
+                            lineStyle: {
+                                color: '#fff',
+                                opacity: 0.2
+                            }
+                        },
+                        splitArea: {
+                            areaStyle: {
+                                color: 'rgba(255,255,255,.3)',
+                                opacity: 1,
+                                shadowBlur: 45,
+                                shadowColor: 'rgba(0,0,0,.5)',
+                                shadowOffsetX: 0,
+                                shadowOffsetY: 15
+                            }
+                        },
+                        indicator: [
+                            {
+                                name: '语文',
+                                max: 100
+                            },
+                            {
+                                name: '数学',
+                                max: 100
+                            },
+                            {
+                                name: '英语',
+                                max: 100
+                            },
+                            {
+                                name: '化学',
+                                max: 100
+                            },
+                            {
+                                name: '物理',
+                                max: 100
+                            },
+                            {
+                                name: '生物',
+                                max: 100
+                            }
+                        ]
+                    },
+                    series: [
+                        {
+                            name: '高一年级',
+                            type: 'radar',
+                            symbolSize: 0,
+                            areaStyle: {
+                                normal: {
+                                    shadowBlur: 13,
+                                    shadowColor: 'rgba(0,0,0,.2)',
+                                    shadowOffsetX: 0,
+                                    shadowOffsetY: 10,
+                                    opacity: .8
+                                }
+                            },
+                            data: [
+                                {
+                                    value: [
+                                        89,
+                                        85,
+                                        88,
+                                        92,
+                                        90,
+                                        89,
+                                    ],
+                                    name: this.$t('totalAnalysis.echarts_text1')
+                                },
+                                {
+                                    value: [
+                                        66,
+                                        55,
+                                        56,
+                                        58,
+                                        62,
+                                        48,
+                                    ],
+                                    name: this.$t('totalAnalysis.echarts_text2')
+                                },
+                                {
+                                    value: [
+                                        78,
+                                        77,
+                                        72,
+                                        70,
+                                        69,
+                                        66,
+                                    ],
+                                    name: this.$t('totalAnalysis.echarts_text3')
+                                }
+                            ]
+                        }
+                    ],
+                    color: ['#7db41b', '#b1eadb', '#b1aadb'],
+                };
+
+                // 绘制图表
+                myRadar.setOption(option);
+                window.addEventListener('resize', function () {
                     myRadar.resize()
                 })
-    },
+            },
+
 
-    
-  },
-  mounted() {
-      this.drawLine()
-  }
-};
+        },
+        mounted() {
+            this.drawLine()
+        }
+    };
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->
 <style scoped>
-.myRadar {
-  width: 100%;
-  height: 480px;
-  margin: 0 auto;
-  display: block;
-}
+    .myRadar {
+        width: 100%;
+        height: 480px;
+        margin: 0 auto;
+        display: block;
+    }
 </style>

+ 4 - 3
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue

@@ -218,9 +218,10 @@
 
             // 监听变化处理重新渲染
             doRender(data) {
-                if (!data) return
-                this.gradeRate = this.$store.state.totalAnalysis.exerciseData[this.currentExerciseIndex].gradeScoreRate
-                this.areaRate = this.$store.state.totalAnalysis.exerciseData[this.currentExerciseIndex].areaScoreRate
+                let exerciseData = this.$store.state.totalAnalysis.exerciseData
+                if (!data || !exerciseData) return
+                this.gradeRate = exerciseData[this.currentExerciseIndex].gradeScoreRate
+                this.areaRate = exerciseData[this.currentExerciseIndex].areaScoreRate
                 this.drawLine(data,this.currentExerciseIndex)
             }
         },

+ 1 - 1
TEAMModelOS/ClientApp/src/store/module/totalAnalysis.js

@@ -184,7 +184,7 @@ export default {
                 } else {
                     apiTools.totalAnalysis.getAchievementData({ "ExamCode": "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"}).then(res => { // api请求
                         context.commit('getAchievementData', res.result.data) // 提交到vuex保存数据
-                        context.commit('updateCurSubject', res.result.data.average.datas.map(item => item.name)[0]) // 提交到vuex保存数据
+                        context.commit('updateCurSubject', res.result.data.average.datas.map(item => item.name)[2]) // 提交到vuex保存数据
                         console.log("API-Achievement")
                         r(res.result.data)
                     }).catch(err => {

+ 29 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.less

@@ -119,7 +119,7 @@
         }
 
         .select-semester {
-            top: 0;
+            top: 25px;
             right: -50px;
         }
 
@@ -202,6 +202,34 @@
         }
     }
 
+
+    .school-info {
+        height: 60px;
+        width: 100%;
+        color: #fff;
+        margin: 15px auto 45px auto;
+
+        .school-info-box {
+            position: relative;
+            /*background: #444444;*/
+            padding: 20px 0;
+            /*border-radius: 10px;*/
+            .school-info-name {
+                font-size: 26px;
+                font-weight: bold;
+
+                &::before {
+                    content: '';
+                    width: 5px;
+                    height: 20px;
+                    background: #00B2C1;
+                    display: inline-block;
+                    margin-right: 10px;
+                }
+            }
+        }
+    }
+
     .no-data-text {
         width: 100%;
         height: 100%;

+ 53 - 5
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue

@@ -1,16 +1,25 @@
 <template>
     <div class="index-container">
         <vuescroll>
-            <!-- 基本数据统计部分 -->
-            <div class="section">
-                <div class="section-title">
-                    {{$t('totalAnalysis.ti_title1')}}
+            <!--学校名称部分 -->
+            <div class="section school-info">
+                <div class="school-info-box">
+                    <span class="school-info-name">成都青城山学校学情分析仪表盘</span>
                     <div class="select-grade select-semester">
                         <Select v-model="selectSemester">
                             <Option v-for="(item,index) in semesterList" :value="index" :key="index">{{ item }}</Option>
                         </Select>
                     </div>
                 </div>
+
+            </div>
+
+            <!-- 基本数据统计部分 -->
+            <div class="section">
+                <div class="section-title">
+                    {{$t('totalAnalysis.ti_title1')}}
+
+                </div>
                 <div class="section-box">
                     <div class="base-data-item block-item">
                         <div class="item-icon"><Icon type="md-people" /></div>
@@ -63,7 +72,7 @@
                     </div>
                     <div class="exam-data-item block-item">
                         <div class="item-content">
-                            <div class="item-num">16</div>
+                            <div class="item-num">7</div>
                             <div class="item-name">{{$t('totalAnalysis.ti_text6')}}</div>
                         </div>
                     </div>
@@ -226,6 +235,7 @@
                             <span>{{$t('totalAnalysis.echarts_text16')}}: 88%</span>
                         </div>
                     </div>
+                    <Page />
                 </div>
             </div>
             </vuescroll>
@@ -489,5 +499,43 @@
       opacity: 0;
     }
 
+    .list-box .ivu-page-item {
+            background: rgba(40,40,40,.5);
+            border:none;
+        }
+
+            .list-box .ivu-page-item:hover {
+                border-color: #e4eadb;
+            }
+
+        .list-box .ivu-page-item-active {
+            background: #bfbfb9;
+        }
+
+        .list-box .ivu-page-item a {
+            color: #f1f1f1;
+        }
+
+        .list-box .ivu-page-next, .list-box .ivu-page-prev {
+            background: rgba(0,0,0,0);
+            border:none;
+        }
+
+            .list-box .ivu-page-next a, .list-box .ivu-page-prev a {
+                color: #e4eadb;
+            }
+
+            .list-box .ivu-page-next:hover, .list-box .ivu-page-prev:hover {
+                border-color: #e4eadb;
+            }
+
+        .list-box .ivu-page-item-active, .list-box .ivu-page-item:hover a {
+            border-color: #e4eadb;
+        }
+
+            .list-box .ivu-page-item-active a {
+                color: #595959;
+            }
+
 
 </style>

+ 33 - 29
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue

@@ -7,7 +7,7 @@
 
             <span class="btn-back" @click="handleBackTo" ref="btnBack"><Icon type="ios-arrow-back" />{{$t('totalAnalysis.ql_text13')}}</span>
             <Loading :top="300" v-show="dataLoading" type="3"></Loading>
-            <div class="ql-item" v-for="(question,index) in questionList" :key="index">
+            <div class="ql-item" v-for="(question,index) in questionList" :key="index" :ref="'q'+index">
                 <div>
                     <div class="item-question">
                         <p>
@@ -51,7 +51,7 @@
             </div>
         </div>-->
 
-                <!--<Collapse simple @on-change="handleCollapseChange">
+                <Collapse simple @on-change="handleCollapseChange">
                     <Panel :name="index+'answer'">
                         <span>{{$t('totalAnalysis.ql_text9')}}</span>
                         <div class="answerAndExplain" slot="content" style="margin-top:10px;margin-left: 25px;">
@@ -78,7 +78,7 @@
                     </div>
                 </div>
             </Panel>
-                </Collapse>-->
+                </Collapse>
 
             </div>
         </div>
@@ -93,37 +93,37 @@
                     <div class="ql-right-part" v-if="SingleList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text2')}}({{sumArr(SingleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div>
                     <div class="ql-right-part" v-if="MultipleList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text3')}}({{sumArr(MultipleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div>
                     <div class="ql-right-part" v-if="JudgeList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text4')}}({{sumArr(JudgeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div>
                     <div class="ql-right-part" v-if="CompleteList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text5')}}({{sumArr(CompleteList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div>
                     <div class="ql-right-part" v-if="SubjectiveList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text6')}}({{sumArr(SubjectiveList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div>
                     <div class="ql-right-part" v-if="ComposeList.length">
                         <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text7')}}({{sumArr(ComposeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                         <div class="ql-right-items">
-                            <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
+                            <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{questionList.indexOf(item) + 1}}</span>
                         </div>
                     </div><div style="margin-top:30px">注:标红题号为班级易错题目</div>
                 </vuescroll>
@@ -312,12 +312,15 @@
                         }
                     }
                 ],
-                scrollTop: 0
+                scrollTop: 0,
+                fromRoutePath: null
 
             }
         },
         created() {
-            console.log("初次加载")
+            let that = this
+            let parentVm = this.$parent.$parent.$parent
+            parentVm.isShowQuestions = true
             this.$store.dispatch('getExamPaper').then(res => {
                 this.rightTableData = this.$store.state.totalAnalysis.classList
                 this.questionList = res[0].item
@@ -328,6 +331,24 @@
                 this.SubjectiveList = this.questionList.filter(item => item.type === 'Subjective')
                 this.ComposeList = this.questionList.filter(item => item.type === 'Compose')
                 this.dataLoading = false
+
+                // 如果是试题页面过来带有题序 则获取指定题目并进行滚动
+                if (this.$route.query.QIndex) {
+                    this.$nextTick(() => {
+                        let index = +this.$route.query.QIndex - 1
+                        this.handleCollapseChange([index.toString()])
+                        this.activeCollapseIndex.push(index + 'answer')
+                        setTimeout(function () {
+                            that.$refs['indexRef' + index][0].click() //根据路由携带的题序 来触发对应题序的点击事件 完成滚动
+                        },1000)
+                    })
+                } else {
+                    this.$nextTick(() => {
+                        this.$refs.indexRef0[0].click()
+                    })
+                }
+
+
             })
 
             let testScatter = this.$store.state.totalAnalysis.testScatter
@@ -391,8 +412,6 @@
                 let itemIndex = this.questionList.indexOf(item)
                 let questionDom = questionList[itemIndex]
                 let scrollDistance = questionDom.offsetTop + 134 // 相对父级容器高度加上头部高度即为滚动距离
-                console.log(scrollDistance)
-                console.log(questionDom)
                 parentVm.$refs['vs'].scrollTo(
                     {
                         y: scrollDistance
@@ -439,21 +458,6 @@
         },
 
         mounted() {
-            let parentVm = this.$parent.$parent.$parent
-            parentVm.isShowQuestions = true
-            let that = this
-
-
-            if (this.$route.query.QIndex) {
-                let index = +this.$route.query.QIndex - 1
-                let allList = document.getElementsByClassName('ql-right-item')
-                this.handleCollapseChange([index.toString()])
-                this.activeCollapseIndex.push(index + 'answer')
-
-                setTimeout(function() {
-                    that.handleItemClick(that.questionList[index], allList[index])
-                }, 200)
-            }
 
             if (this.getExerciseData) {
                 this.tableData = this.getExerciseData
@@ -493,7 +497,7 @@
                 if (!val) return
                 console.log(val)
                 this.tableData = JSON.parse(JSON.stringify(val))
-                
+
             }
         }
     }

+ 0 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue

@@ -291,8 +291,6 @@
                         hignlightIndexDom[0].style.borderRadius = '50%'
                     }
                 })
-
-                
                 
             },
 

+ 2 - 2
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue

@@ -276,14 +276,14 @@
                         this.$nextTick(() => {
                             this.currentExamItem = existExam
                             this.$store.commit('updateSubjectList', this.currentExamItem.conditions.subject)
-
+                            this.subjectSplitList = this.currentExamItem.conditions.subject
                             this.$refs.examListRef.examIndex = list.indexOf(list.filter(item => item.id === existExam.id)[0])
                         })
                     } else {
                         this.$nextTick(() => {
                             this.currentExamItem = list[0]
                             this.$store.commit('updateSubjectList', this.currentExamItem.conditions.subject)
-
+                            this.subjectSplitList = this.currentExamItem.conditions.subject
                             this.$refs.examListRef.examIndex = 0
                         })
                     }