diff --git a/src/api/index.js b/src/api/index.js
index f6737ac..6c0d5a0 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -345,6 +345,7 @@ export default {
exportDataInBatchesApplicant: `${host}occupationlab/occupationlab/activity/applicant/exportDataInBatches`,
// 数据看板
+ curriculumListForBeforeLogin: `nakadai/nakadai/curriculum/curriculumListForBeforeLogin`,
academicLeadersRanking: `occupationlab/occupationlab/data/kanban/academicLeadersRanking`,
getTheMostUsedCoursesInOurSchool: `occupationlab/occupationlab/data/kanban/getTheMostUsedCoursesInOurSchool`,
examStatistics: `occupationlab/occupationlab/data/kanban/examStatistics`,
@@ -354,6 +355,7 @@ export default {
monthlyAverageOnlineTime: `occupationlab/occupationlab/data/kanban/monthlyAverageOnlineTime`,
courseRankings: `occupationlab/occupationlab/data/kanban/courseRankings`,
platformLoginStatistics: `users/users/user/platformLoginStatistics`,
+ activityRanking: `occupationlab/occupationlab/data/kanban/activityRanking`,
// 产品中心
productCategoryList: `nakadai/productClassification/productCategoryList`,
diff --git a/src/pages/account/redirect/index.vue b/src/pages/account/redirect/index.vue
index 107e8bf..0f0aa13 100644
--- a/src/pages/account/redirect/index.vue
+++ b/src/pages/account/redirect/index.vue
@@ -38,7 +38,7 @@ export default {
this.setCustomer(res.customer)
this.setCustomerName(res.customerName)
- const path = '/station/list' // 默认路径
+ const path = '/product/list' // 默认路径
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => {
const list = res.permissionMenu[0].children
this.$router.push(list.find(e => e.path === path) ? path : list[0].path)
diff --git a/src/pages/achievement/teach/index.vue b/src/pages/achievement/teach/index.vue
index 8cd2fef..3627079 100644
--- a/src/pages/achievement/teach/index.vue
+++ b/src/pages/achievement/teach/index.vue
@@ -23,11 +23,11 @@
实验最高分
-
{{ peopleNum }}
+
{{ maxScore }}
实验最低分
-
{{ avgScore }}
+
{{ minScore }}
@@ -35,7 +35,18 @@
- 错误率分析
+ 错误率分析
+
+
+ 错误率最高:{{ max.judgmentName }}
+ 参加考试{{ max.peopleNum }}人 | 共{{ max.errorTotal }}人做错,错误率{{ max.errorRate }}%
+
+
+ 错误率最低:{{ min.judgmentName }}
+ 参加考试{{ min.peopleNum }}人 | 共{{ min.errorTotal }}人做错,错误率{{ min.errorRate }}%
+
+
+
@@ -117,6 +128,11 @@ export default {
total: 0,
peopleNum: 0, // 总人数
avgScore: 0, // 平均分
+ maxScore: 0,
+ minScore: 0,
+ errorAnalysis: {},
+ max: {},
+ min: {},
token: util.local.get(Setting.tokenKey),
};
},
@@ -154,28 +170,23 @@ export default {
}).catch(err => {})
},
// 获取表格数据
- getData() {
- // 考核
- if (this.permissions) {
- this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}`).then(res => {
- this.listDataAll = res.page.records
- this.total = res.page.total
- this.avgScore = (+res.avgScore).toFixed(2)
- this.peopleNum = res.peopleNum
- this.handlePage()
- this.getChart()
- }).catch(err => {})
- } else {
- // 练习
- this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyword=${this.keyword}`).then(res => {
- this.listDataAll = res.page.records
- this.total = res.page.total
- this.avgScore = (+res.avgScore).toFixed(2)
- this.peopleNum = res.peopleNum
- this.handlePage()
- this.getChart()
- }).catch(res => {})
- }
+ async getData() {
+ // 考核和练习调不同接口
+ const res = this.permissions ?
+ await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}`) :
+ await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyword=${this.keyword}`)
+ this.listDataAll = res.page.records
+ this.total = res.page.total
+ this.avgScore = (+res.avgScore).toFixed(2)
+ this.peopleNum = res.peopleNum
+ this.maxScore = res.maxScore
+ this.minScore = res.minScore
+ this.errorAnalysis = res.errorAnalysis
+ this.max = res.highestErrorRate
+ this.min = res.minimumErrorRate
+ this.handlePage()
+ this.getChart()
+ this.errorChart()
},
initData() {
this.$refs.table.clearSelection();
@@ -303,6 +314,101 @@ export default {
color: ["#8191fd"]
}]
});
+ },
+ // 错误率统计图
+ errorChart() {
+ const data = this.errorAnalysis.scoringPointList
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ },
+ grid: {
+ left: '5%',
+ right: '5%',
+ top: '25%',
+ bottom: '15%'
+ },
+ dataZoom: [//滑动条
+ {
+ // xAxisIndex: 0,//这里是从X轴的0刻度开始
+ show: true,//是否显示滑动条,不影响使用
+ type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件
+ start: 0, // 从头开始。
+ end: 50, // 一次性展示6个。
+ xAxisIndex: [0],
+ bottom: -10,
+ // handleStyle: {
+ // borderWidth: 0
+ // }
+
+ }
+ ],
+ xAxis: [{
+ type: 'category',
+ axisLine: {
+ lineStyle: {
+ color: '#57617B'
+ }
+ },
+ axisLabel: {
+ interval: 0,
+ textStyle: {
+ color: '#333',
+ },
+ // rotate: 60
+ },
+ data: data.map(e => e.judgmentName)
+ }],
+ yAxis: [
+ {
+ type: 'value',
+ name: '错误率',
+ nameGap: 10,
+ axisLine: {
+ lineStyle: {
+ color: '#333'
+ }
+ },
+ axisLabel: {
+ margin: 10,
+ textStyle: {
+ fontSize: 12,
+ color: '#333'
+ },
+ formatter: '{value}%'
+ },
+ }
+ ],
+ series: [{
+ name: '错误率',
+ type: 'bar',
+ barWidth: 25,
+ axisLabel: {
+ margin: 10,
+ textStyle: {
+ fontSize: 12,
+ color: '#333'
+ },
+ formatter: '{value}%'
+ },
+ itemStyle: {
+ normal: {
+ barBorderRadius: [10, 10, 0, 0],
+ color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
+ offset: 0,
+ color: "#009AFD"
+ }, {
+ offset: 0.8,
+ color: "#33DAFF"
+ }], false),
+ shadowColor: 'rgba(0, 0, 0, 0.1)',
+ }
+ },
+ data: data.map(e => e.errorRate)
+ }
+ ]
+ }
+ echarts.init(document.querySelector(`#chart1`)).setOption(option)
}
}
};
@@ -328,6 +434,9 @@ export default {
}
}
+.chart {
+ height: 300px;
+}
.stat {
display: flex;
@@ -370,7 +479,18 @@ export default {
.chart {
flex: 1;
- height: 300px;
}
}
+.wrong {
+ // padding-left: 25%;
+ .line {
+ display: flex;
+ justify-content: center;
+ margin-bottom: 10px;
+ .jud-name {
+ width: 400px;
+ margin-right: 100px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/pages/activity/list/index.vue b/src/pages/activity/list/index.vue
index 69a33b7..5a9e97f 100644
--- a/src/pages/activity/list/index.vue
+++ b/src/pages/activity/list/index.vue
@@ -86,7 +86,7 @@
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
- :active-text="scope.row.isOpen ? '关' : '开'"
+ :active-text="scope.row.schoolOpen ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"
>
diff --git a/src/pages/screen/index.vue b/src/pages/screen/index.vue
index c8db9fa..3d757a3 100644
--- a/src/pages/screen/index.vue
+++ b/src/pages/screen/index.vue
@@ -247,7 +247,7 @@
-
+
@@ -274,20 +274,20 @@
名次 |
姓名 |
- 班级 |
+ {{ token ? '班级' : '学校' }} |
练习次数 |
平均分 |
-
+
{{ i + 1 }} |
{{ item.userName }} |
- {{ item.className }} |
+ {{ token ? item.className : item.schoolName }} |
{{ item.practiceNumber }} |
{{ item.avgScore }} |
@@ -295,6 +295,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 活跃度排行榜
+
+
+
+
+
+ 名次 |
+ {{ token ? '班级' : '学校' }} |
+ 活跃指数 |
+
+
+
+
+
+
+
+
+ {{ i + 1 }} |
+ {{ token ? item.className : item.schoolName }} |
+ {{ item.activityIndex }} |
+
+
+
+
+
@@ -307,6 +351,7 @@ import Setting from '@/setting'
export default {
data() {
return {
+ token: Util.local.get(Setting.tokenKey),
time: 0,
times: [
{
@@ -324,6 +369,7 @@ export default {
courses: [],
popularCourses: [],
achs: [],
+ actives: [],
examChart: null
}
},
@@ -381,6 +427,11 @@ export default {
})
this.achs = list
}).catch(res => {})
+
+ // 活跃度排行榜
+ this.$post(this.api.activityRanking).then(({ list }) => {
+ this.actives = list
+ }).catch(res => {})
this.scrollTable()
},
// 切换时间单位
@@ -453,7 +504,7 @@ export default {
}).catch(res => {})
},
// 获取图标数据并渲染
- renderChart() {
+ async renderChart() {
const animateChart = (chart, option, data, num = 6) => {
// 每次向后滚动一个,最后一个从头开始。
if (option.dataZoom[0].endValue == data.length ) {
@@ -650,9 +701,24 @@ export default {
color2: 'rgba(156, 163, 2, 0.4)'
}
]
- this.$get(this.api.schoolCourse).then(({ data }) => {
- const courseList = data
- const ids = data.map(e => e.cid)
+ // 登录前登录后调的课程接口不一样
+ const cousrseRes = this.token ?
+ await this.$get(this.api.schoolCourse) :
+ await this.$post(this.api.curriculumListForBeforeLogin, {
+ pageNum: 1,
+ pageSize: 100,
+ supplierId: '1,2,3,4',
+ curriculumName: '',
+ categoryId: '',
+ curriculumType: '',
+ professionalCategoryId: '',
+ professionalId: '',
+ })
+ if (cousrseRes) {
+ const courseList = this.token ?
+ cousrseRes.data :
+ cousrseRes.page.records
+ const ids = courseList.map(e => e.cid)
times.map(e => {
e.cid = ids
})
@@ -801,7 +867,7 @@ export default {
// animateChart(chart[1], option, times)
// }, 5000)
}).catch(res => {})
- }).catch(err => {})
+ }
// 月人均在线学习时长情况
const date = new Date()
@@ -1018,12 +1084,16 @@ export default {
scrollTable() {
const dom = this.$refs.popularCourses
const dom1 = this.$refs.ach
+ const dom2 = this.$refs.active
setInterval(() => {
dom.scrollTop += 1
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0
dom1.scrollTop += 1
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0
+
+ dom2.scrollTop += 1
+ if (dom2.clientHeight + dom2.scrollTop === dom2.scrollHeight) dom2.scrollTop = 0
}, 30)
}
}