|
@@ -43,10 +43,23 @@
|
|
|
</div>
|
|
|
<div v-if="modalIsShow">
|
|
|
<!-- base info -->
|
|
|
- <div class="page-head">
|
|
|
+ <div class="page-head box-justify">
|
|
|
<h2>
|
|
|
<span>课程基本情况</span>
|
|
|
</h2>
|
|
|
+ <el-select
|
|
|
+ v-if="dataList.length > 1"
|
|
|
+ v-model="curReportId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="reportChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(row, index) in dataList"
|
|
|
+ :key="index"
|
|
|
+ :label="row.teachClassName"
|
|
|
+ :value="row.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="part-box part-box-pad">
|
|
|
<table class="table table-tiny">
|
|
@@ -443,6 +456,7 @@ import {
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
|
import { calcSum, toPrecision } from "@/plugins/utils";
|
|
|
import timeMixin from "@/mixins/timeMixin";
|
|
|
+import { omit } from "lodash";
|
|
|
|
|
|
export default {
|
|
|
name: "detail-target-statistics",
|
|
@@ -467,6 +481,8 @@ export default {
|
|
|
modalIsShow: false,
|
|
|
expectancyList: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
|
|
|
modalForm: {},
|
|
|
+ dataList: [],
|
|
|
+ curReportId: "",
|
|
|
commonInfo: {},
|
|
|
courseBasicInfo: {},
|
|
|
paperStructs: [],
|
|
@@ -479,6 +495,7 @@ export default {
|
|
|
targetColumnCounts: [],
|
|
|
studentScoreTable: [],
|
|
|
courseSuggest: [],
|
|
|
+ targetSuggestsMap: {},
|
|
|
downloading: false,
|
|
|
};
|
|
|
},
|
|
@@ -527,22 +544,11 @@ export default {
|
|
|
this.commonInfo = data.commonInfo;
|
|
|
this.courseBasicInfo = data.courseBasicInfo;
|
|
|
|
|
|
- const courseSuggest = data.courseSuggest
|
|
|
- ? JSON.parse(data.courseSuggest)
|
|
|
- : [];
|
|
|
- const targetSuggestsMap = {};
|
|
|
- courseSuggest.forEach((item) => {
|
|
|
- targetSuggestsMap[item.targetId] = {
|
|
|
- finishPoints: item.finishPoints,
|
|
|
- requirementPoints: item.requirementPoints,
|
|
|
- courseSuggest: item.courseSuggest,
|
|
|
- };
|
|
|
- });
|
|
|
const courseTargetScatterMap = data.courseTargetScatterMap || {};
|
|
|
|
|
|
this.courseSuggest = data.courseEvaluationResultInfo.targetList.map(
|
|
|
(target) => {
|
|
|
- const suggest = targetSuggestsMap[target.targetId] || {};
|
|
|
+ const suggest = this.targetSuggestsMap[target.targetId] || {};
|
|
|
const finishPoints = suggest.finishPoints || "";
|
|
|
const requirementPoints = suggest.requirementPoints || "";
|
|
|
const courseSuggest = suggest.courseSuggest || "";
|
|
@@ -592,19 +598,50 @@ export default {
|
|
|
this.parseStudentScoreTable(examStudentList);
|
|
|
},
|
|
|
async initData() {
|
|
|
- this.resetData();
|
|
|
-
|
|
|
await this.checkChange();
|
|
|
const data = await targetStatisticsDetail({
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
+ examId: this.course.examId,
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
});
|
|
|
- this.buildData(data);
|
|
|
+ this.dataList = data || [];
|
|
|
+ this.curReportId = this.dataList[0].id;
|
|
|
+
|
|
|
+ this.reportChange();
|
|
|
+ },
|
|
|
+ async reportChange() {
|
|
|
+ this.resetData();
|
|
|
+
|
|
|
+ const rowData = this.dataList.find(
|
|
|
+ (item) => item.id === this.curReportId
|
|
|
+ );
|
|
|
+ if (!rowData) return;
|
|
|
+
|
|
|
+ const courseSuggest = this.courseSuggest.length
|
|
|
+ ? this.courseSuggest
|
|
|
+ : rowData.courseSuggest
|
|
|
+ ? JSON.parse(rowData.courseSuggest)
|
|
|
+ : [];
|
|
|
+
|
|
|
+ const targetSuggestsMap = {};
|
|
|
+ courseSuggest.forEach((item) => {
|
|
|
+ targetSuggestsMap[item.targetId] = {
|
|
|
+ finishPoints: item.finishPoints,
|
|
|
+ requirementPoints: item.requirementPoints,
|
|
|
+ courseSuggest: item.courseSuggest,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.targetSuggestsMap = targetSuggestsMap;
|
|
|
+
|
|
|
+ this.buildData(rowData);
|
|
|
},
|
|
|
async checkChange() {
|
|
|
const res = await targetStatisticsChangeCheck({
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
+ examId: this.course.examId,
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
report: true,
|
|
|
});
|
|
|
|
|
@@ -869,7 +906,7 @@ export default {
|
|
|
color: ["#556dff", "#f59a23"],
|
|
|
title: {
|
|
|
text: `${targetName}个体达成情况`,
|
|
|
- top: "center",
|
|
|
+ left: "center",
|
|
|
},
|
|
|
grid: {
|
|
|
left: 40,
|
|
@@ -1097,11 +1134,17 @@ export default {
|
|
|
if (this.downloading) return;
|
|
|
this.downloading = true;
|
|
|
|
|
|
+ const courseSuggest = this.courseSuggest.map((item) =>
|
|
|
+ omit(item, ["chartOption"])
|
|
|
+ );
|
|
|
+
|
|
|
const res = await targetStatisticsSave({
|
|
|
+ id: this.curReportId,
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
+ examId: this.course.examId,
|
|
|
...this.courseBasicInfo,
|
|
|
- courseSuggest: JSON.stringify(this.courseSuggest),
|
|
|
+ courseSuggest: JSON.stringify(courseSuggest),
|
|
|
}).catch(() => {});
|
|
|
this.downloading = false;
|
|
|
|
|
@@ -1119,6 +1162,7 @@ export default {
|
|
|
|
|
|
const res = await downloadByApi(() => {
|
|
|
const datas = {
|
|
|
+ id: this.curReportId,
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
};
|
|
@@ -1137,6 +1181,7 @@ export default {
|
|
|
|
|
|
const res = await downloadByApi(() => {
|
|
|
const datas = {
|
|
|
+ id: this.curReportId,
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
};
|