Branch_d40a2540
yujialong 2 years ago
parent cb1a853ba3
commit bad2c7bb35
  1. 2
      src/api/index.js
  2. 2
      src/pages/account/redirect/index.vue
  3. 172
      src/pages/achievement/teach/index.vue
  4. 2
      src/pages/activity/list/index.vue
  5. 88
      src/pages/screen/index.vue

@ -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`,

@ -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)

@ -23,11 +23,11 @@
</div>
<div class="item">
<p class="name">实验最高分</p>
<p class="val">{{ peopleNum }}</p>
<p class="val">{{ maxScore }}</p>
</div>
<div class="item">
<p class="name">实验最低分</p>
<p class="val">{{ avgScore }}</p>
<p class="val">{{ minScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
@ -35,7 +35,18 @@
</el-card>
<el-card shadow="hover" class="m-b-20">
<h6>错误率分析</h6>
<h6 style="font-size: 16px">错误率分析</h6>
<div class="wrong">
<div class="line">
<span class="jud-name">错误率最高{{ max.judgmentName }}</span>
<span>参加考试{{ max.peopleNum }}&emsp;&emsp;{{ max.errorTotal }}人做错错误率{{ max.errorRate }}%</span>
</div>
<div class="line">
<span class="jud-name">错误率最低{{ min.judgmentName }}</span>
<span>参加考试{{ min.peopleNum }}&emsp;&emsp;{{ min.errorTotal }}人做错错误率{{ min.errorRate }}%</span>
</div>
</div>
<div class="chart" id="chart1"></div>
</el-card>
<el-card shadow="hover" class="m-b-20">
@ -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,//X0
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;
}
}
}
</style>

@ -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)"
></el-switch>
</template>

@ -247,7 +247,7 @@
</ul>
</div>
</div>
<div class="item" style="height: 630px">
<div class="item" style="height: 300px">
<div class="t_line_box">
<i class="t_l_line"></i>
<i class="l_t_line"></i>
@ -274,20 +274,20 @@
<tr>
<th width="20%">名次</th>
<th width="20%">姓名</th>
<th width="20%">班级</th>
<th width="20%">{{ token ? '班级' : '学校' }}</th>
<th width="20%">练习次数</th>
<th width="20%">平均分</th>
</tr>
</thead>
</table>
</div>
<div class="main_table" ref="ach" style="max-height: 520px;margin-top: 0;overflow: hidden">
<div class="main_table" ref="ach" style="max-height: 220px;margin-top: 0;overflow: hidden">
<table>
<tbody>
<tr v-for="(item, i) in achs" :key="i">
<td width="20%">{{ i + 1 }}</td>
<td width="20%">{{ item.userName }}</td>
<td width="20%">{{ item.className }}</td>
<td width="20%">{{ token ? item.className : item.schoolName }}</td>
<td width="20%">{{ item.practiceNumber }}</td>
<td width="20%">{{ item.avgScore }}</td>
</tr>
@ -295,6 +295,50 @@
</table>
</div>
</div>
<div class="item" style="height: 300px">
<div class="t_line_box">
<i class="t_l_line"></i>
<i class="l_t_line"></i>
</div>
<div class="t_line_box">
<i class="t_r_line"></i>
<i class="r_t_line"></i>
</div>
<div class="t_line_box">
<i class="l_b_line"></i>
<i class="b_l_line"></i>
</div>
<div class="t_line_box">
<i class="r_b_line"></i>
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_7.png" alt="">
活跃度排行榜
</div>
<div class="main_table">
<table>
<thead>
<tr>
<th width="20%">名次</th>
<th width="20%">{{ token ? '班级' : '学校' }}</th>
<th width="20%">活跃指数</th>
</tr>
</thead>
</table>
</div>
<div class="main_table" ref="active" style="max-height: 220px;margin-top: 0;overflow: hidden">
<table>
<tbody>
<tr v-for="(item, i) in actives" :key="i">
<td width="20%">{{ i + 1 }}</td>
<td width="20%">{{ token ? item.className : item.schoolName }}</td>
<td width="20%">{{ item.activityIndex }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@ -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)
}
}

Loading…
Cancel
Save