소스 검색

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

zhouj1203@hotmail.com 3 년 전
부모
커밋
e6ec65587e

+ 31 - 13
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/KeyPerformChart.vue

@@ -13,6 +13,12 @@ export default {
             default: () => {
                 return undefined
             }
+        },
+        isTeacher: {
+            type: Boolean,
+            default: () => {
+                return false
+            }
         }
     },
     data() {
@@ -20,6 +26,8 @@ export default {
             categories: [],
             ckps: [], //班级
             kps: [], //个人
+            akps: [], //所有班级
+            echartsData: [],
         }
     },
     methods: {
@@ -33,7 +41,7 @@ export default {
             })
             let myChart = this.$echarts.init(document.getElementById("knowledge"))
             let option = {
-                color: ["#5470C6", "#91CC75"],
+                color: ["#5470C6", "#91CC75", '#00905a'],
                 title: {
                     text: this.$t('studentWeb.exam.chart.keyPointPerformance'),
                     left: 'left',
@@ -43,7 +51,7 @@ export default {
                     }
                 },
                 legend: {
-                    data: [this.$t("studentWeb.exam.chart.me"), this.$t("studentWeb.exam.chart.participantClass")],
+                    data: [this.$t("studentWeb.exam.chart.me"), this.$t("studentWeb.exam.chart.participantClass"), this.$t("studentWeb.exam.chart.allClass")],
                     bottom: 0,
                 },
                 tooltip: {
@@ -58,17 +66,8 @@ export default {
                     {
                         name: 'Budget vs spending',
                         type: 'radar',
-                        data: [
-                            {
-                                value: this.kps,
-                                name: this.$t("studentWeb.exam.chart.me")
-                            },
-                            {
-                                value: this.ckps,
-                                name: this.$t("studentWeb.exam.chart.participantClass")
-                            }
-                        ]
-                    }
+                        data: this.echartsData
+                    },
                 ],
             }
             myChart.setOption(option)
@@ -76,14 +75,33 @@ export default {
         getFiled() {
             let kps = []
             let ckps = []
+            let akps = []
             if (this.knowledge.kn) {
                 this.knowledge.kn.map((item, index) => {
                     kps.push(this.knowledge.kps[index] ? this.knowledge.kps[index].toFixed(2) : 0)
                     ckps.push(this.knowledge.ckps[index] ? this.knowledge.ckps[index].toFixed(2) : 0)
+                    akps.push(this.knowledge.akps[index] ? this.knowledge.akps[index].toFixed(2) : 0)
                 })
             }
             this.kps = kps
             this.ckps = ckps
+            this.akps = akps
+            this.echartsData = [
+                {
+                    value: this.kps,
+                    name: this.$t("studentWeb.exam.chart.me")
+                },
+                {
+                    value: this.ckps,
+                    name: this.$t("studentWeb.exam.chart.participantClass")
+                },
+            ]
+            if(this.isTeacher) {
+                this.echartsData.push({
+                    value: this.akps,
+                    name: this.$t("studentWeb.exam.chart.allClass")
+                })
+            }
         },
     },
     mounted() {

+ 30 - 12
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/RecognizePerformChart.vue

@@ -13,6 +13,12 @@ export default {
             default: () => {
                 return undefined
             }
+        },
+        isTeacher: {
+            type: Boolean,
+            default: () => {
+                return false
+            }
         }
     },
     data() {
@@ -45,13 +51,15 @@ export default {
             ],
             cfps: [], //班级
             fps: [], //个人
+            afps: [], //所有班级
+            echartsData: [],
         }
     },
     methods: {
         setMap() {
             let myChart = this.$echarts.init(document.getElementById("filed"))
             let option = {
-                color: ["#5470C6", "#91CC75"],
+                color: ["#5470C6", "#91CC75", '#00905a'],
                 title: {
                     text: this.$t('studentWeb.exam.chart.recognizePerformance'),
                     left: 'left',
@@ -61,7 +69,7 @@ export default {
                     }
                 },
                 legend: {
-                    data: [this.$t("studentWeb.exam.chart.me"), this.$t("studentWeb.exam.chart.participantClass")],
+                    data: [this.$t("studentWeb.exam.chart.me"), this.$t("studentWeb.exam.chart.participantClass"), this.$t("studentWeb.exam.chart.allClass")],
                     bottom: 0,
                 },
                 tooltip: {
@@ -76,16 +84,7 @@ export default {
                     {
                         name: 'Budget vs spending',
                         type: 'radar',
-                        data: [
-                            {
-                                value: this.fps,
-                                name: this.$t("studentWeb.exam.chart.me")
-                            },
-                            {
-                                value: this.cfps,
-                                name: this.$t("studentWeb.exam.chart.participantClass")
-                            }
-                        ]
+                        data: this.echartsData
                     }
                 ],
             }
@@ -94,14 +93,33 @@ export default {
         getFiled() {
             let fps = []
             let cfps = []
+            let afps = []
             if (this.filed.fs) {
                 this.filed.fs.map((item, index) => {
                     fps.push(this.filed.fps[index] ? this.filed.fps[index].toFixed(2) : 0)
                     cfps.push(this.filed.cfps[index] ? this.filed.cfps[index].toFixed(2) : 0)
+                    afps.push(this.filed.afps[index] ? this.filed.afps[index].toFixed(2) : 0)
                 })
             }
             this.fps = fps
             this.cfps = cfps
+            this.afps = afps
+            this.echartsData = [
+                {
+                    value: this.fps,
+                    name: this.$t("studentWeb.exam.chart.me")
+                },
+                {
+                    value: this.cfps,
+                    name: this.$t("studentWeb.exam.chart.participantClass")
+                },
+            ]
+            if(this.isTeacher) {
+                this.echartsData.push({
+                    value: this.afps,
+                    name: this.$t("studentWeb.exam.chart.allClass")
+                })
+            }
         },
     },
     mounted() {

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js

@@ -574,6 +574,7 @@ export default {
             score: 'Score',
             keyPointPerformance: 'Key concept Performance Distribution',
             me: 'Personal',
+            allClass: '所有班級',
             participantClass: 'Whole Class',
             participantAverage: 'Whole School',
             recognizePerformance: 'Cognitive Level Radar Chart'

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js

@@ -574,6 +574,7 @@ export default {
             score: '分',
             keyPointPerformance: '知识点得分率雷达图',
             me: '个人',
+            allClass: '所有班级',
             participantClass: '全班',
             participantAverage: '全校',
             recognizePerformance: '认知层次雷达图'

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js

@@ -574,6 +574,7 @@ export default {
             score: '分',
             keyPointPerformance: '知識點表現分佈圖',
             me: '個人',
+            allClass: '所有班級',
             participantClass: '全班',
             participantAverage: '全校',
             recognizePerformance: '認知層次雷達圖'

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

@@ -50,7 +50,7 @@
             <i-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" :xxl="12">
                 <Card v-if="knowledge.kn && knowledge.kn.length">
                     <!-- <KeyPointPerformChart :knowledge="knowledge"></KeyPointPerformChart> -->
-                    <KeyPerformChart :knowledge="knowledge"></KeyPerformChart>
+                    <KeyPerformChart :knowledge="knowledge" :isTeacher="true"></KeyPerformChart>
                 </Card>
                 <Card v-else>
                     <div class="no-data">
@@ -61,7 +61,7 @@
             </i-col>
             <i-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" :xxl="12">
                 <Card>
-                    <RecognizePerformChart :filed="filed"></RecognizePerformChart>
+                    <RecognizePerformChart :filed="filed" :isTeacher="true"></RecognizePerformChart>
                 </Card>
             </i-col>
         </Row>