|
@@ -108,6 +108,12 @@
|
|
|
></import-file>
|
|
|
<!-- SetBlueDialog -->
|
|
|
<set-blue-dialog ref="SetBlueDialog" :course="course"> </set-blue-dialog>
|
|
|
+ <!-- select papers -->
|
|
|
+ <sync-paper-dialog
|
|
|
+ ref="SyncPaperDialog"
|
|
|
+ :course="filter"
|
|
|
+ @modified="getList"
|
|
|
+ ></sync-paper-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -116,17 +122,17 @@ import {
|
|
|
endScoreListPage,
|
|
|
endScoreEnable,
|
|
|
endScoreTemplateDownload,
|
|
|
- endScoreSync,
|
|
|
} from "../api";
|
|
|
import ModifyEndScore from "./ModifyEndScore.vue";
|
|
|
import SetBlueDialog from "./SetBlueDialog.vue";
|
|
|
import ImportFile from "@/components/ImportFile.vue";
|
|
|
+import SyncPaperDialog from "./SyncPaperDialog.vue";
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
|
import templateDownload from "@/mixins/templateDownload";
|
|
|
|
|
|
export default {
|
|
|
name: "end-score-manage",
|
|
|
- components: { ModifyEndScore, SetBlueDialog, ImportFile },
|
|
|
+ components: { ModifyEndScore, SetBlueDialog, ImportFile, SyncPaperDialog },
|
|
|
mixins: [templateDownload],
|
|
|
props: {
|
|
|
course: {
|
|
@@ -141,7 +147,6 @@ export default {
|
|
|
filter: {
|
|
|
examId: "",
|
|
|
courseCode: "",
|
|
|
- paperNumber: "",
|
|
|
teachCourseId: "",
|
|
|
},
|
|
|
current: 1,
|
|
@@ -200,14 +205,8 @@ export default {
|
|
|
toImportPaperStruct() {
|
|
|
this.$refs.ImportPaperStruct.open();
|
|
|
},
|
|
|
- async toSync() {
|
|
|
- if (this.syncing) return;
|
|
|
- this.syncing = true;
|
|
|
- const res = await endScoreSync(this.filter).catch(() => {});
|
|
|
- this.syncing = false;
|
|
|
- if (!res) return;
|
|
|
- this.$message.success("操作成功!");
|
|
|
- this.getList();
|
|
|
+ toSync() {
|
|
|
+ this.$refs.SyncPaperDialog.open();
|
|
|
},
|
|
|
toSetBlue() {
|
|
|
this.$refs.SetBlueDialog.open();
|
|
@@ -233,13 +232,7 @@ export default {
|
|
|
this.downloading = true;
|
|
|
|
|
|
const res = await downloadByApi(() => {
|
|
|
- const datas = {
|
|
|
- examId: this.course.examId,
|
|
|
- courseCode: this.course.courseCode,
|
|
|
- paperNumber: this.course.paperNumber,
|
|
|
- teachCourseId: this.course.teachCourseId,
|
|
|
- };
|
|
|
- return endScoreTemplateDownload(datas);
|
|
|
+ return endScoreTemplateDownload(this.filter);
|
|
|
}).catch((e) => {
|
|
|
this.$message.error(e || "下载失败,请重新尝试!");
|
|
|
});
|