|
@@ -16,7 +16,12 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="toExport">导出报告</el-button>
|
|
|
+ <el-button type="primary" :loading="downloading" @click="toSave"
|
|
|
+ >保存报告</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" :loading="downloading" @click="toExport"
|
|
|
+ >导出报告</el-button
|
|
|
+ >
|
|
|
<el-button type="danger" @click="cancel">退出</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -29,11 +34,11 @@
|
|
|
<div class="part-box part-box-pad">
|
|
|
<table class="table table-tiny">
|
|
|
<tr>
|
|
|
- <td>课程编码</td>
|
|
|
+ <td class="td-bg">课程编码</td>
|
|
|
<td>{{ commonInfo.courseCode }}</td>
|
|
|
- <td>课程名称</td>
|
|
|
+ <td class="td-bg">课程名称</td>
|
|
|
<td>{{ commonInfo.courseName }}</td>
|
|
|
- <td>课程类别</td>
|
|
|
+ <td class="td-bg">课程类别</td>
|
|
|
<td>
|
|
|
<el-input
|
|
|
v-model="courseBasicInfo.courseType"
|
|
@@ -41,7 +46,7 @@
|
|
|
size="small"
|
|
|
></el-input>
|
|
|
</td>
|
|
|
- <td>学分</td>
|
|
|
+ <td class="td-bg">学分</td>
|
|
|
<td>
|
|
|
<el-input-number
|
|
|
v-model="courseBasicInfo.credit"
|
|
@@ -55,7 +60,7 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td>考核方式</td>
|
|
|
+ <td class="td-bg">考核方式</td>
|
|
|
<td>
|
|
|
<el-input
|
|
|
v-model="courseBasicInfo.evaluationMode"
|
|
@@ -63,11 +68,11 @@
|
|
|
size="small"
|
|
|
></el-input>
|
|
|
</td>
|
|
|
- <td>开课时间</td>
|
|
|
+ <td class="td-bg">开课时间</td>
|
|
|
<td>{{ courseBasicInfo.openTime }}</td>
|
|
|
- <td>授课对象</td>
|
|
|
+ <td class="td-bg">授课对象</td>
|
|
|
<td>{{ courseBasicInfo.teachingObject }}</td>
|
|
|
- <td>学时</td>
|
|
|
+ <td class="td-bg">学时</td>
|
|
|
<td>
|
|
|
<el-input-number
|
|
|
v-model="courseBasicInfo.period"
|
|
@@ -81,7 +86,7 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td>选课人数</td>
|
|
|
+ <td class="td-bg">选课人数</td>
|
|
|
<td>
|
|
|
<el-input-number
|
|
|
v-model="courseBasicInfo.selectionCount"
|
|
@@ -93,9 +98,9 @@
|
|
|
style="width: 125px"
|
|
|
></el-input-number>
|
|
|
</td>
|
|
|
- <td>参评人数</td>
|
|
|
+ <td class="td-bg">参评人数</td>
|
|
|
<td>{{ courseBasicInfo.participantCount }}</td>
|
|
|
- <td>课程目标达成度期望值</td>
|
|
|
+ <td class="td-bg">课程目标达成度期望值</td>
|
|
|
<td colspan="3">
|
|
|
<el-select
|
|
|
v-model="courseBasicInfo.courseDegree"
|
|
@@ -112,9 +117,9 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td>任课老师</td>
|
|
|
+ <td class="td-bg">任课老师</td>
|
|
|
<td>{{ courseBasicInfo.teacher }}</td>
|
|
|
- <td>评价负责人</td>
|
|
|
+ <td class="td-bg">评价负责人</td>
|
|
|
<td>
|
|
|
<el-input
|
|
|
v-model="courseBasicInfo.director"
|
|
@@ -122,7 +127,7 @@
|
|
|
size="small"
|
|
|
></el-input>
|
|
|
</td>
|
|
|
- <td>评价参与人</td>
|
|
|
+ <td class="td-bg">评价参与人</td>
|
|
|
<td colspan="3">
|
|
|
<el-input
|
|
|
v-model="courseBasicInfo.participant"
|
|
@@ -219,7 +224,7 @@
|
|
|
<h4 class="part-title">课程考核成绩评价结果</h4>
|
|
|
|
|
|
<table class="table">
|
|
|
- <tr>
|
|
|
+ <tr class="td-bg">
|
|
|
<th>课程目标</th>
|
|
|
<th>评价依据</th>
|
|
|
<th>评价环节</th>
|
|
@@ -297,7 +302,7 @@
|
|
|
>
|
|
|
<el-table-column min-width="120" align="center">
|
|
|
<template slot="header">
|
|
|
- 期末考试({{ target.finalWeight }})
|
|
|
+ 期末考试<br />({{ target.finalWeight | percentFilter }})
|
|
|
</template>
|
|
|
<el-table-column
|
|
|
v-for="dimension in target.finalDimensions"
|
|
@@ -311,14 +316,14 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column min-width="120" align="center">
|
|
|
<template slot="header">
|
|
|
- 平时考试({{ target.usualWeight }})
|
|
|
+ 平时考试<br />({{ target.usualWeight | percentFilter }})
|
|
|
</template>
|
|
|
<el-table-column
|
|
|
v-for="work in target.usualWorks"
|
|
|
:key="`${target.targetId}${work}`"
|
|
|
:label="work"
|
|
|
:prop="`${target.targetId}-usual-${work}`"
|
|
|
- min-width="60"
|
|
|
+ min-width="100"
|
|
|
align="center"
|
|
|
>
|
|
|
</el-table-column>
|
|
@@ -331,13 +336,6 @@
|
|
|
width="100"
|
|
|
></el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
- <div class="chart-box" style="height: 400px; margin-top: 20px">
|
|
|
- <v-chart
|
|
|
- v-if="studentScoreChartOption"
|
|
|
- :option="studentScoreChartOption"
|
|
|
- ></v-chart>
|
|
|
- </div>
|
|
|
</div>
|
|
|
|
|
|
<div slot="footer"></div>
|
|
@@ -345,8 +343,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { reportData } from "./data";
|
|
|
-import { targetReportDetail, exportTargetReport } from "../api";
|
|
|
+// import { reportData } from "./data";
|
|
|
+import {
|
|
|
+ targetReportDetail,
|
|
|
+ exportTargetReport,
|
|
|
+ targetReportSave,
|
|
|
+} from "../api";
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
|
import { calcSum } from "@/plugins/utils";
|
|
|
|
|
@@ -360,9 +362,14 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ percentFilter(val) {
|
|
|
+ return ((val || 0) / 100).toFixed(2);
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- modalIsShow: true,
|
|
|
+ modalIsShow: false,
|
|
|
expectancyList: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
|
|
|
commonInfo: {},
|
|
|
courseBasicInfo: {},
|
|
@@ -376,14 +383,9 @@ export default {
|
|
|
courseTargets: [],
|
|
|
targetColumnCounts: [],
|
|
|
studentScoreTable: [],
|
|
|
- studentScoreChartOption: null,
|
|
|
downloading: false,
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
- // this.initData();
|
|
|
- this.buildData(reportData);
|
|
|
- },
|
|
|
methods: {
|
|
|
cancel() {
|
|
|
this.modalIsShow = false;
|
|
@@ -395,11 +397,11 @@ export default {
|
|
|
this.commonInfo = data.commonInfo;
|
|
|
this.courseBasicInfo = data.courseBasicInfo;
|
|
|
|
|
|
- this.courseTargetValue = data.courseEvaluationResult.targetValue;
|
|
|
- this.courseTargetList = data.courseEvaluationResult.targetList;
|
|
|
+ this.courseTargetValue = data.courseEvaluationResultInfo.targetValue;
|
|
|
+ this.courseTargetList = data.courseEvaluationResultInfo.targetList;
|
|
|
|
|
|
const {
|
|
|
- courseEvaluationSpread: { questionInfo, scoreList },
|
|
|
+ courseEvaluationSpreadInfo: { questionInfo, scoreList },
|
|
|
} = data;
|
|
|
this.parsePaperStructs(questionInfo);
|
|
|
this.parseQuestionInfoTable(questionInfo);
|
|
@@ -407,16 +409,11 @@ export default {
|
|
|
this.courseTargetListChartOption = this.getCourseTargetListChartOption();
|
|
|
|
|
|
const {
|
|
|
- courseEvaluationResultDetail: {
|
|
|
- examStudentList,
|
|
|
- courseTargetList: examStudentTargets,
|
|
|
- },
|
|
|
+ courseEvaluationResultDetailInfo: { examStudentList },
|
|
|
} = data;
|
|
|
|
|
|
this.parseCourseTargets(examStudentList);
|
|
|
this.parseStudentScoreTable(examStudentList);
|
|
|
- this.studentScoreChartOption =
|
|
|
- this.parseStudentScoreChartOption(examStudentTargets);
|
|
|
},
|
|
|
async initData() {
|
|
|
const data = await targetReportDetail({
|
|
@@ -661,6 +658,10 @@ export default {
|
|
|
if (!examStudentList || !examStudentList.length) return;
|
|
|
|
|
|
const targetList = examStudentList[0].targetList;
|
|
|
+ const targetVals = {};
|
|
|
+ this.courseTargetList.forEach((target) => {
|
|
|
+ targetVals[target.targetId] = target.evaluationValue;
|
|
|
+ });
|
|
|
|
|
|
let tColumnCounts = [];
|
|
|
this.courseTargets = targetList.map((target) => {
|
|
@@ -669,7 +670,7 @@ export default {
|
|
|
targetName: target.targetName,
|
|
|
finalWeight: target.finalScore.weight,
|
|
|
usualWeight: target.usualScore.weight,
|
|
|
- evaluationValue: target.evaluationValue,
|
|
|
+ evaluationValue: targetVals[target.targetId],
|
|
|
};
|
|
|
ntarget.finalDimensions = target.finalScore.dimensionList.map(
|
|
|
(item) => item.dimensionCode
|
|
@@ -858,6 +859,22 @@ export default {
|
|
|
};
|
|
|
return options;
|
|
|
},
|
|
|
+ async toSave() {
|
|
|
+ if (this.downloading) return;
|
|
|
+ this.downloading = true;
|
|
|
+
|
|
|
+ const res = await targetReportSave({
|
|
|
+ examId: this.course.examId,
|
|
|
+ courseName: this.course.courseName,
|
|
|
+ courseCode: this.course.courseCode,
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
+ ...this.courseBasicInfo,
|
|
|
+ }).catch(() => {});
|
|
|
+ this.downloading = false;
|
|
|
+
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success("保存成功!");
|
|
|
+ },
|
|
|
async toExport() {
|
|
|
if (this.downloading) return;
|
|
|
this.downloading = true;
|
|
@@ -867,7 +884,6 @@ export default {
|
|
|
examId: this.course.examId,
|
|
|
courseCode: this.course.courseCode,
|
|
|
paperNumber: this.course.paperNumber,
|
|
|
- paperType: this.course.paperType,
|
|
|
};
|
|
|
return exportTargetReport(datas);
|
|
|
}).catch((e) => {
|
|
@@ -881,3 +897,10 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.td-bg {
|
|
|
+ color: #8b8fa1;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+</style>
|