提交 c6ae7a56 authored 作者: Yroc's avatar Yroc

'学生端优化完善'

上级 3a73cbf1
......@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-21 18:18:47
* @Last Modified time: 2023-04-19 19:19:24
*/
import request from '@/utils/request'
......@@ -127,6 +127,15 @@ export function getTobaccoList() {
})
}
//学员笔记
export function getTakeDown(id, data) {
return request({
url: `/student/test_results/takeDown/${id}`,
method: 'post',
data
})
}
export function logout() {
return request({
url: '/vue-element-admin/user/logout',
......
......@@ -200,11 +200,11 @@ export default {
.el-icon-caret-bottom {
position: absolute;
top: 20px;
top: 22px;
}
.el-icon-caret-top {
position: absolute;
top: 13px;
top: 15px;
}
.table_box {
......
......@@ -135,11 +135,11 @@ export default {
.el-icon-caret-bottom {
position: absolute;
top: 56px;
top: 58px;
}
.el-icon-caret-top {
position: absolute;
top: 49px;
top: 51px;
}
.table_box {
......
......@@ -193,11 +193,11 @@ export default {
position: relative;
.el-icon-caret-bottom {
position: absolute;
top: 15px;
top: 17px;
}
.el-icon-caret-top {
position: absolute;
top: 8px;
top: 10px;
}
.table_head_box {
padding: 10px 15px;
......@@ -217,7 +217,7 @@ export default {
top: 8px;
}
.table_head_box {
padding: 10px 15px 10px 0px;
padding: 10px 10px;
white-space: nowrap;
}
}
......
......@@ -3,11 +3,12 @@
* @Author: AnthonyD
* @Date: 2023-03-27 15:09:40
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-18 17:17:37
* @Last Modified time: 2023-04-20 10:49:14
*/
</script><template>
<div>
<el-row>
<!-- 错误方位/区域 -->
<!-- 南北方正确/错误率 -->
<el-col
:span="8"
:xs="24"
......@@ -41,7 +42,7 @@
<AnalyseModule :module_data="wrong_group_list"> </AnalyseModule>
</div>
</el-col>
<!-- 错误等组 -->
<!-- 错误正副组 -->
<el-col
:span="8"
:xs="24"
......@@ -60,7 +61,10 @@
v-if="wrong_color_list"
>
<div class="centenr_container">
<AnalyseModule :module_data="wrong_color_list" v-if="wrong_color_list">
<AnalyseModule
:module_data="wrong_color_list"
v-if="wrong_color_list"
>
</AnalyseModule>
</div>
</el-col>
......@@ -90,17 +94,33 @@
</div>
</el-col>
</el-row>
<div>
<div class="module_header">
学员笔记:<el-button
class="save_box"
type="primary"
@click="getStudentTakeDown"
>保存</el-button
>
</div>
<div style="padding: 0 10px; box-sizing: border-box">
<el-input type="textarea" v-model="remark" :rows="6"> </el-input>
</div>
</div>
</div>
</template>
<script>
import AnalyseModule from '@/components/AnalyseModule/index.vue';
import { getTakeDown } from '@/api/user';
import { toPercent, countOccurrences } from '@/utils/tool';
export default {
props: ['summary_data'],
name: '',
data() {
return {
//区域区域数据
//南北方正确/错误率
area_score_list: null,
//错误部位
wrong_position_list: null,
......@@ -114,19 +134,36 @@ export default {
wrong_iso_groups_list: null,
///眼光稳定性
eye_stability_list: null,
//试题id
task_id: null,
//学员笔记
remark: null,
};
},
components: { AnalyseModule },
created() {
this.statistical_results = { ...this.summary_data };
console.log(this.statistical_results);
this.task_id = this.$route.query.id;
},
mounted() {
this.init();
},
methods: {
//学员笔记
getStudentTakeDown() {
getTakeDown(this.task_id, { remark: this.remark }).then((res) => {
console.log('上传回调');
console.log(res);
if (res.code == 200) {
this.$message.success('保存成功');
}
});
},
init() {
//烟草区域
this.remark = this.statistical_results.remark;
//南北方正确/错误率
this.area_score_list = this.changeAreaScore(
this.statistical_results.AreaScore
);
......@@ -147,7 +184,7 @@ export default {
this.statistical_results.WrongGroup
);
//错误等组
//错误正副组
this.wrong_iso_groups_list = this.changeWrongIsoGroup(
this.statistical_results.WrongIsogroup
);
......@@ -157,9 +194,9 @@ export default {
);
},
//区域得分
//南北方正确/错误率
changeAreaScore(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let labers = [
{ label: '总分', key: 'assemble' },
......@@ -170,7 +207,7 @@ export default {
type: 'bar',
chart_id: 'bar_chart1',
color: '#E6A23C',
title: '突出区域的烟草识别',
title: '南北方正确/错误率',
labers,
keys,
raw_data: datas,
......@@ -178,7 +215,7 @@ export default {
},
//错误部位
changeWrongPosition(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let list = [];
let labers = [
......@@ -207,7 +244,7 @@ export default {
},
//错误颜色
changeWrongColor(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let list = [];
let labers = [
......@@ -236,7 +273,7 @@ export default {
},
//错误等级
changeErrorLevel(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let list = [];
let labers = [
......@@ -265,7 +302,7 @@ export default {
},
//错误组别
changeWrongGroup(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let list = [];
let labers = [
......@@ -292,9 +329,9 @@ export default {
list,
};
},
//错误等组
//错误正副组
changeWrongIsoGroup(datas) {
if (!datas) return false;
if (datas.length == 0) return false;
let keys = Object.keys(datas);
let list = [];
let labers = [
......@@ -316,14 +353,15 @@ export default {
type: 'table',
chart_id: 'wrong_group',
color: '#529B2E',
title: '错误等组',
title: '错误正副组',
labers,
list,
};
},
//眼光稳定性
changeEyeStability(datas) {
if (!datas) return false;
console.log(datas);
if (datas.title.length <= 0) return false;
let list = [];
let labers = [
{ label: '题号', key: 'title' },
......@@ -387,4 +425,24 @@ export default {
width: calc(100% - 20px);
margin: 0 auto;
}
.module_header {
width: 100%;
box-sizing: border-box;
padding: 15px 0 15px 10px;
font-size: 20px;
color: #333;
vertical-align: -15%;
}
.module_header::after {
content: '';
height: 0;
clear: both;
display: block;
visibility: baseline;
}
.save_box {
float: right;
margin-right: 10px;
}
</style>
......@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-13 09:56:01
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-18 19:00:30
* @Last Modified time: 2023-04-19 19:42:44
*/
</script>
<template>
......@@ -270,7 +270,11 @@ export default {
console.log('考试结果详情');
console.log(res);
//学员评估
this.statistical_results = res.statistical_results;
if (res.statistical_results) {
this.statistical_results = { ...res.statistical_results };
this.statistical_results['remark'] = res.remark;
}
// this.statistical_results = res.statistical_results;
//本次培训总评
if (res.Round_cultivate) {
this.appraisal_data = { ...res.Round_cultivate.review_content };
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论