|
@@ -82,7 +82,7 @@
|
|
|
ref="ImportEndScore"
|
|
|
title="导入期末成绩"
|
|
|
:upload-url="upload.score.uploadUrl"
|
|
|
- :upload-data="filter"
|
|
|
+ :upload-data="uploadData"
|
|
|
:format="['xls', 'xlsx']"
|
|
|
:download-handle="downloadHandle"
|
|
|
:download-filename="upload.score.dfilename"
|
|
@@ -96,7 +96,7 @@
|
|
|
ref="ImportPaperStruct"
|
|
|
title="导入试卷结构"
|
|
|
:upload-url="upload.paper.uploadUrl"
|
|
|
- :upload-data="filter"
|
|
|
+ :upload-data="uploadData"
|
|
|
:format="['xls', 'xlsx']"
|
|
|
:download-handle="() => downloadTemplate('paperStruct')"
|
|
|
:download-filename="upload.paper.dfilename"
|
|
@@ -104,7 +104,29 @@
|
|
|
:uploading="uploading"
|
|
|
@upload-success="uploadSuccess"
|
|
|
@upload-error="uploadError"
|
|
|
- ></import-file>
|
|
|
+ >
|
|
|
+ <template #bodyfoot>
|
|
|
+ <div class="mt-1">
|
|
|
+ <div class="box-justify mb-2">
|
|
|
+ <div></div>
|
|
|
+ <el-button type="danger" @click="toClearStruct">清除</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="part-box part-box-pad">
|
|
|
+ <el-table :data="structList" border height="300">
|
|
|
+ <el-table-column
|
|
|
+ prop="mainNumber"
|
|
|
+ label="大题号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="subNumber"
|
|
|
+ label="小题号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="score" label="小题满分"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </import-file>
|
|
|
<!-- SetBlueDialog -->
|
|
|
<set-blue-dialog ref="SetBlueDialog" :course="course"> </set-blue-dialog>
|
|
|
<!-- select papers -->
|
|
@@ -121,6 +143,8 @@ import {
|
|
|
endScoreListPage,
|
|
|
endScoreEnable,
|
|
|
endScoreTemplateDownload,
|
|
|
+ endScorePaperPositiveDetail,
|
|
|
+ endScorePaperStructClear,
|
|
|
} from "../../api";
|
|
|
import ModifyEndScore from "./ModifyEndScore.vue";
|
|
|
import SetBlueDialog from "./SetBlueDialog.vue";
|
|
@@ -128,6 +152,7 @@ import ImportFile from "@/components/ImportFile.vue";
|
|
|
import SyncPaperDialog from "./SyncPaperDialog.vue";
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
|
import templateDownload from "@/mixins/templateDownload";
|
|
|
+import { pickByNotNull } from "@/plugins/utils";
|
|
|
|
|
|
export default {
|
|
|
name: "end-score-manage",
|
|
@@ -168,11 +193,18 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
downloading: false,
|
|
|
+ structList: [],
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ uploadData() {
|
|
|
+ return pickByNotNull(this.filter);
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.filter = this.$objAssign(this.filter, this.course);
|
|
|
this.toPage(1);
|
|
|
+ this.getBlueDetail();
|
|
|
},
|
|
|
methods: {
|
|
|
async getList() {
|
|
@@ -199,6 +231,36 @@ export default {
|
|
|
this.current = page;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ async getBlueDetail() {
|
|
|
+ const res = await endScorePaperPositiveDetail({
|
|
|
+ cultureProgramId: this.course.cultureProgramId,
|
|
|
+ courseId: this.course.courseId,
|
|
|
+ examId: this.course.examId,
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
+ });
|
|
|
+ this.structList = res || [];
|
|
|
+ },
|
|
|
+ async toClearStruct() {
|
|
|
+ const confirm = await this.$confirm(
|
|
|
+ `清除会清除掉导入试卷结构及成绩和蓝图设置,确定要清除吗?`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).catch(() => {});
|
|
|
+ if (confirm !== "confirm") return;
|
|
|
+
|
|
|
+ const res = await endScorePaperStructClear({
|
|
|
+ cultureProgramId: this.course.cultureProgramId,
|
|
|
+ courseId: this.course.courseId,
|
|
|
+ examId: this.course.examId,
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
+ }).catch(() => {});
|
|
|
+ if (!res) return;
|
|
|
+
|
|
|
+ this.$message.success("清除成功!");
|
|
|
+ this.getBlueDetail();
|
|
|
+ },
|
|
|
toImportEndScore() {
|
|
|
this.$refs.ImportEndScore.open();
|
|
|
},
|
|
@@ -223,6 +285,7 @@ export default {
|
|
|
const msg = `${data.success},错误:${data.error}`;
|
|
|
this.$message.success(msg);
|
|
|
this.getList();
|
|
|
+ this.getBlueDetail();
|
|
|
},
|
|
|
uploadError() {
|
|
|
this.importing = false;
|