提交 d20e86a8 authored 作者: zfl's avatar zfl

提交学员考试笔记

上级 41065bb6
...@@ -136,6 +136,15 @@ export function getTakeDown(id, data) { ...@@ -136,6 +136,15 @@ export function getTakeDown(id, data) {
}) })
} }
//学员笔记
export function takeDownNew(id, data) {
return request({
url: `/student/test_results/takeDownNew/${id}`,
method: 'post',
data
})
}
export function logout() { export function logout() {
return request({ return request({
url: '/vue-element-admin/user/logout', url: '/vue-element-admin/user/logout',
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</div> </div>
</div> </div>
<div> <div>
<el-popover <!-- <el-popover
width="600" width="600"
placement="bottom" placement="bottom"
title="学生笔记:" title="学生笔记:"
...@@ -136,9 +136,9 @@ ...@@ -136,9 +136,9 @@
icon="el-icon-edit" icon="el-icon-edit"
circle circle
></el-button> ></el-button>
</el-popover> </el-popover> -->
<el-popover <!-- <el-popover
width="300" width="300"
placement="bottom-start" placement="bottom-start"
title="学生笔记:" title="学生笔记:"
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
icon="el-icon-edit" icon="el-icon-edit"
circle circle
></el-button> ></el-button>
</el-popover> </el-popover> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -213,6 +213,14 @@ export default { ...@@ -213,6 +213,14 @@ export default {
// console.log(this.statistical_results); // console.log(this.statistical_results);
this.task_id = this.$route.query.id; this.task_id = this.$route.query.id;
}, },
watch: {
"summary_data.remark" : {
handler(){
this.statistical_results = { ...this.summary_data };
this.init();
}
}
},
mounted() { mounted() {
this.init(); this.init();
}, },
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
> >
<el-popover placement="right" trigger="click"> <el-popover placement="right" trigger="click">
<div class="table_box"> <div class="table_box">
<el-row style="padding-bottom:20px">
<el-col :span="24"><el-input v-model="detailed_information.note[e.id]" placeholder="请填写要记录的内容" @blur="saveNote(e.id)"></el-input></el-col>
<!-- <el-col :span="6"><el-button @click="saveNote(e.id)" size="mini" class="note_mobile_box" type="primary" >保存</el-button></el-col> -->
</el-row>
<!-- <div><h3>错误点分析</h3></div> --> <!-- <div><h3>错误点分析</h3></div> -->
<table border="1" cellspacing="0"> <table border="1" cellspacing="0">
<tr> <tr>
...@@ -128,12 +132,10 @@ ...@@ -128,12 +132,10 @@
</tr> </tr>
</table> </table>
</div> </div>
<!-- <span slot="reference"> {{ e.grades_code || '暂无' }}</span> --> <span slot="reference">
<span slot="reference"> {{ detailed_information.test_results[e.id] || '暂无' }}
{{ <i v-if="detailed_information.note && detailed_information.note[e.id]" class="el-icon-edit-outline p_color" ></i>
detailed_information.test_results[e.id] || '暂无' </span>
}}</span
>
</el-popover> </el-popover>
</div> </div>
</div> </div>
...@@ -168,18 +170,18 @@ ...@@ -168,18 +170,18 @@
:summary_data="statistical_results" :summary_data="statistical_results"
></StudentComments> ></StudentComments>
</div> </div>
<div v-show="radio1 == 'summary'"> <div v-if="radio1 == 'summary'">
<!-- :key="new Date().getTime()" -->
<Summary <Summary
v-if="summary_data" v-if="summary_data"
:summary_data="summary_data" :summary_data="summary_data"
:key="new Date().getTime()"
></Summary> ></Summary>
</div> </div>
<div v-show="radio1 == 'general_comment'"> <!-- :key="new Date().getTime()" -->
<div v-if="radio1 == 'general_comment'">
<OverallAppraisal <OverallAppraisal
v-if="appraisal_data" v-if="appraisal_data"
:appraisal_data="appraisal_data" :appraisal_data="appraisal_data"
:key="new Date().getTime()"
></OverallAppraisal> ></OverallAppraisal>
</div> </div>
</el-card> </el-card>
...@@ -197,7 +199,7 @@ ...@@ -197,7 +199,7 @@
<script> <script>
import TestInfo from '@/components/TestInfo/index.vue'; import TestInfo from '@/components/TestInfo/index.vue';
import ImageZoom from '@/components/Image/ImageZoom.vue'; import ImageZoom from '@/components/Image/ImageZoom.vue';
import { viewExamResults } from '@/api/user'; import { viewExamResults, takeDownNew} from '@/api/user';
import { array_conversion } from '@/utils/tool'; import { array_conversion } from '@/utils/tool';
import Summary from './components/summary-view'; import Summary from './components/summary-view';
import StudentComments from './components/student_comments_view.vue'; import StudentComments from './components/student_comments_view.vue';
...@@ -264,11 +266,49 @@ export default { ...@@ -264,11 +266,49 @@ export default {
init() { init() {
this.getTestResultsDetail(); this.getTestResultsDetail();
}, },
saveNote(id){
let data={
note:this.detailed_information.note[id],
test_result_id:id,
};
takeDownNew(this.test_results_id,data).then((res) => {
if(res.code==200){
this.$message.success(res.message);
let remark_ha=this.remark_ha(this.detailed_information.test_results,this.detailed_information.note)
this.statistical_results=null
this.statistical_results = { ...this.detailed_information.statistical_results };
this.statistical_results['remark'] = remark_ha.summary_data_remark
}else{
this.$message.error('记录失败,请刷新页面重新尝试');
}
})
},
remark_ha(test_results,note){
let summary_data_remark=''
let num=0;
for(let i in test_results){
num++
if(!note[i]){
note[i]=null
}else{
summary_data_remark+='第'+num+'题:'+note[i]+"\n";
}
}
return {
note:note,
summary_data_remark:summary_data_remark,
}
},
//考试结果详情 //考试结果详情
getTestResultsDetail() { getTestResultsDetail() {
viewExamResults(this.test_results_id).then((res) => { viewExamResults(this.test_results_id).then((res) => {
console.log('考试结果详情'); console.log('考试结果详情');
console.log(res); console.log(res);
let remark_ha=this.remark_ha(res.test_results,res.note)
res.remark=remark_ha.summary_data_remark
res.note=remark_ha.note
//学员评估 //学员评估
if (res.statistical_results) { if (res.statistical_results) {
this.statistical_results = { ...res.statistical_results }; this.statistical_results = { ...res.statistical_results };
...@@ -325,8 +365,9 @@ export default { ...@@ -325,8 +365,9 @@ export default {
} }
// console.log('二维数据@@@'); // console.log('二维数据@@@');
// console.log(new_arr); // console.log(new_arr);
// console.log(JSON.stringify(new_arr)); // console.log(new_arr);
this.questions_list = new_arr; this.questions_list = new_arr;
this.detailed_information = res; this.detailed_information = res;
}); });
}, },
...@@ -339,7 +380,9 @@ export default { ...@@ -339,7 +380,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/element-variables'; @import '@/styles/element-variables';
.p_color {
color:$--color-primary
}
.table_container { .table_container {
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论