|
@@ -18,16 +18,27 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:loading="downloading"
|
|
|
+ icon="el-icon-download"
|
|
|
@click="toExportNormalScore"
|
|
|
>导出平时成绩</el-button
|
|
|
>
|
|
|
- <el-button type="primary" :loading="downloading" @click="toSave"
|
|
|
- >保存报告</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" :loading="downloading" @click="toExport"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :loading="downloading"
|
|
|
+ icon="el-icon-download"
|
|
|
+ @click="toExport"
|
|
|
>导出报告</el-button
|
|
|
>
|
|
|
- <el-button type="danger" @click="cancel">退出</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :loading="downloading"
|
|
|
+ icon="el-icon-document-checked"
|
|
|
+ @click="toSave"
|
|
|
+ >保存报告</el-button
|
|
|
+ >
|
|
|
+ <el-button class="btn-back" @click="cancel">
|
|
|
+ 返回<i class="el-icon-arrow-right"></i>
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="modalIsShow">
|
|
@@ -355,7 +366,7 @@
|
|
|
</div>
|
|
|
<div class="part-box part-box-pad">
|
|
|
<div
|
|
|
- v-for="item in targetSuggests"
|
|
|
+ v-for="item in courseSuggest"
|
|
|
:key="item.targetId"
|
|
|
class="target-suggest mb-4"
|
|
|
>
|
|
@@ -453,7 +464,7 @@ export default {
|
|
|
courseTargets: [],
|
|
|
targetColumnCounts: [],
|
|
|
studentScoreTable: [],
|
|
|
- targetSuggests: [],
|
|
|
+ courseSuggest: [],
|
|
|
downloading: false,
|
|
|
};
|
|
|
},
|
|
@@ -479,7 +490,7 @@ export default {
|
|
|
this.clearSetTs();
|
|
|
|
|
|
this.addSetTime(async () => {
|
|
|
- await this.toSave();
|
|
|
+ await this.toSave(true);
|
|
|
this.openAutoSave();
|
|
|
}, 1 * 60 * 1000);
|
|
|
},
|
|
@@ -495,25 +506,25 @@ export default {
|
|
|
this.courseTargets = [];
|
|
|
this.targetColumnCounts = [];
|
|
|
this.studentScoreTable = [];
|
|
|
- this.targetSuggests = [];
|
|
|
+ this.courseSuggest = [];
|
|
|
this.downloading = false;
|
|
|
},
|
|
|
buildData(data) {
|
|
|
this.commonInfo = data.commonInfo;
|
|
|
this.courseBasicInfo = data.courseBasicInfo;
|
|
|
|
|
|
- const targetSuggests = data.targetSuggests
|
|
|
- ? JSON.stringify(data.targetSuggests)
|
|
|
+ const courseSuggest = data.courseSuggest
|
|
|
+ ? JSON.parse(data.courseSuggest)
|
|
|
: [];
|
|
|
const targetSuggestsMap = {};
|
|
|
- targetSuggests.forEach((item) => {
|
|
|
+ courseSuggest.forEach((item) => {
|
|
|
targetSuggestsMap[item.targetId] = {
|
|
|
finishPoints: item.finishPoints,
|
|
|
requirementPoints: item.requirementPoints,
|
|
|
courseSuggest: item.courseSuggest,
|
|
|
};
|
|
|
});
|
|
|
- this.targetSuggests = data.courseEvaluationResultInfo.targetList.map(
|
|
|
+ this.courseSuggest = data.courseEvaluationResultInfo.targetList.map(
|
|
|
(target) => {
|
|
|
const suggest = targetSuggestsMap[target.targetId] || {};
|
|
|
const finishPoints = suggest.finishPoints || "";
|
|
@@ -956,7 +967,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async toSave() {
|
|
|
+ async toSave(autoSave = false) {
|
|
|
if (this.downloading) return;
|
|
|
this.downloading = true;
|
|
|
|
|
@@ -964,13 +975,17 @@ export default {
|
|
|
cultureProgramId: this.course.cultureProgramId,
|
|
|
courseId: this.course.courseId,
|
|
|
...this.courseBasicInfo,
|
|
|
- targetSuggests: JSON.stringify(this.targetSuggests),
|
|
|
+ courseSuggest: JSON.stringify(this.courseSuggest),
|
|
|
}).catch(() => {});
|
|
|
this.downloading = false;
|
|
|
|
|
|
if (!res) return;
|
|
|
this.$message.success("保存成功!");
|
|
|
- this.initData();
|
|
|
+ if (autoSave) {
|
|
|
+ this.openAutoSave();
|
|
|
+ } else {
|
|
|
+ this.initData();
|
|
|
+ }
|
|
|
},
|
|
|
async toExport() {
|
|
|
if (this.downloading) return;
|