|
@@ -1,137 +1,142 @@
|
|
|
<template>
|
|
|
- <div class="recognize-perform-chart">
|
|
|
- <h4>{{$t('studentWeb.exam.chart.recognizePerformance')}}</h4>
|
|
|
- <apexchart height="380" type="radar" :options="chartOptions" :series="series2"></apexchart>
|
|
|
- </div>
|
|
|
+ <div class="recognize-perform-chart">
|
|
|
+ <div id="filed" style="width: 306px; height: 400px"></div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import ApexCharts from "vue-apexcharts";
|
|
|
export default {
|
|
|
- name: "RecognizePerformChart",
|
|
|
- components: {
|
|
|
- apexchart: ApexCharts
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- series2: [
|
|
|
- {
|
|
|
- name:this.$t('studentWeb.exam.chart.me'),
|
|
|
- //data: [80, 50, 30, 40, 100, 70]
|
|
|
- data: [0,0,0,0,0,0]
|
|
|
- },
|
|
|
- {
|
|
|
- name: this.$t('studentWeb.exam.chart.participantClass'),
|
|
|
- //data: [20, 30, 40, 80, 42, 80]
|
|
|
- data:[0,0,0,0,0,0]
|
|
|
+ name: "RecognizePerformChart",
|
|
|
+ props: {
|
|
|
+ filed: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
}
|
|
|
- ],
|
|
|
-
|
|
|
- chartOptions: {
|
|
|
- chart: {
|
|
|
- height: 480,
|
|
|
- type: "radar",
|
|
|
- toolbar: {
|
|
|
- show: false
|
|
|
- }
|
|
|
- },
|
|
|
- plotOptions: {
|
|
|
- radar: {
|
|
|
- polygons: {
|
|
|
- strokeColor: "#e8e8e8",
|
|
|
- strokeWidth: 2,
|
|
|
- fill: {
|
|
|
- colors: ["#f8f8f8", "#fff"]
|
|
|
- }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ cfps: [], //班级
|
|
|
+ fps: [], //个人
|
|
|
+ type: true, //个人的类型
|
|
|
+ categories: [
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level1"),
|
|
|
+ max: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level2"),
|
|
|
+ max: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level3"),
|
|
|
+ max: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level4"),
|
|
|
+ max: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level5"),
|
|
|
+ max: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.$t("evaluation.level6"),
|
|
|
+ max: 1
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setMap() {
|
|
|
+ let myChart = this.$echarts.init(document.getElementById("filed"))
|
|
|
+ let option = {
|
|
|
+ color: ["#5470C6", "#91CC75"],
|
|
|
+ title: {
|
|
|
+ text: this.$t('studentWeb.exam.chart.recognizePerformance'),
|
|
|
+ left: 'left',
|
|
|
+ textStyle: {
|
|
|
+ // fontWeight: "normal",
|
|
|
+ fontSize: "14",
|
|
|
+ }
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data: ["个人", "班级"],
|
|
|
+ bottom: 0,
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ padding: [4, 12],
|
|
|
+ },
|
|
|
+ radar: {
|
|
|
+ // shape: 'circle',
|
|
|
+ indicator: this.categories
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'Budget vs spending',
|
|
|
+ type: 'radar',
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: this.filed.fps,
|
|
|
+ name: '个人'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: this.filed.cfps,
|
|
|
+ name: '班级'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- fill: {
|
|
|
- opacity: 0.5,
|
|
|
- colors: ["rgba(0, 173, 108, 0.82)", "rgba(0, 0, 0, 0.25)"]
|
|
|
- },
|
|
|
- stroke: {
|
|
|
- show: false,
|
|
|
- width: 2,
|
|
|
- colors: ["rgba(0, 173, 108, 0.82)", "rgba(0, 0, 0, 0.25)"],
|
|
|
- dashArray: 0
|
|
|
- },
|
|
|
- markers: {
|
|
|
- size: 2,
|
|
|
- colors: ["rgba(0, 173, 108, 0.82)", "rgba(0, 0, 0, 0.25)"],
|
|
|
- hover: {
|
|
|
- size: 2
|
|
|
- }
|
|
|
+ myChart.setOption(option)
|
|
|
},
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.setMap()
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
|
|
|
- tooltip: {
|
|
|
- custom: function({ series, seriesIndex, dataPointIndex }) {
|
|
|
- return (
|
|
|
- '<div class="arrow_box"><span>' +
|
|
|
- series[seriesIndex][dataPointIndex] +
|
|
|
- " point</span>" +
|
|
|
- "</div>"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- style: {
|
|
|
- fontSize: "16px",
|
|
|
- fontFamily: undefined
|
|
|
- },
|
|
|
- xaxis: {
|
|
|
- type: "category",
|
|
|
- //categories: localStorage.getItem('lang')=='tw'?["知識", "理解", "應用", "分析", "綜合", "評鑑"]:["Knowledge", "Understanding", "Application", "Analysis", "Integration", "Evaluation"],
|
|
|
- // categories: ["知识", "理解", "应用", "分析", "综合", "评鉴"],
|
|
|
- categories: [
|
|
|
- this.$t("evaluation.level1"),
|
|
|
- this.$t("evaluation.level2"),
|
|
|
- this.$t("evaluation.level3"),
|
|
|
- this.$t("evaluation.level4"),
|
|
|
- this.$t("evaluation.level5"),
|
|
|
- this.$t("evaluation.level6")
|
|
|
- ],
|
|
|
- labels: {
|
|
|
- style: {
|
|
|
- colors: ["#000", "#000", "#000", "#000", "#000", "#000"],
|
|
|
- fontSize: "12px",
|
|
|
- fontFamily: "Helvetica, Arial, sans-serif",
|
|
|
- fontWeight: 500
|
|
|
+<style lang="less" scoped>
|
|
|
+.recognize-perform-chart {
|
|
|
+ width: 100%;
|
|
|
+ margin: auto;
|
|
|
+ margin-bottom: 50px;
|
|
|
+ padding: 15px 40px 0px 40px;
|
|
|
+ height: 420px;
|
|
|
+ color: rgba(0, 0, 0, 0.726);
|
|
|
+
|
|
|
+ .typeAll{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ &>div:first-child{
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .typeDef{
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 12px;
|
|
|
+
|
|
|
+
|
|
|
+ &>span:first-of-type{
|
|
|
+ display: inline-block;
|
|
|
+ background: #ccc;
|
|
|
+ height: 12px;
|
|
|
+ width: 20px;
|
|
|
+ margin-right: 5px;
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- dataLabels: {
|
|
|
- enabled: false
|
|
|
- },
|
|
|
- legend: {
|
|
|
- markers: {
|
|
|
- width: 20,
|
|
|
- height: 12,
|
|
|
- strokeWidth: 0,
|
|
|
- strokeColor: "#fff",
|
|
|
- fillColors: ["rgba(0, 173, 108, 0.82)", "rgba(0, 0, 0, 0.25)"],
|
|
|
- radius: 4,
|
|
|
- customHTML: undefined,
|
|
|
- onClick: undefined,
|
|
|
- offsetX: 0,
|
|
|
- offsetY: 0
|
|
|
- }
|
|
|
- },
|
|
|
- title: {
|
|
|
- text: ""
|
|
|
}
|
|
|
- }
|
|
|
- };
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-.recognize-perform-chart {
|
|
|
- width: 100%;
|
|
|
- margin: auto;
|
|
|
- margin-bottom: 50px;
|
|
|
- padding: 15px 40px 0px 40px;
|
|
|
- height: 420px;
|
|
|
- color: rgba(0, 0, 0, 0.726);
|
|
|
+ .activeBg{
|
|
|
+ background-color: #00ad6cd1 !important;
|
|
|
+ // color: white;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|