|
@@ -168,6 +168,14 @@
|
|
|
>
|
|
|
成绩导出
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="checkPrivilege('button', 'DownloadScore')"
|
|
|
+ type="success"
|
|
|
+ :disabled="downloading"
|
|
|
+ @click="toDownloadScore"
|
|
|
+ >
|
|
|
+ 成绩下载
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -270,7 +278,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { scoreClassDetailListPage, scoreClassDetailScoreExport } from "../api";
|
|
|
+import {
|
|
|
+ scoreClassDetailListPage,
|
|
|
+ scoreClassDetailScoreExport,
|
|
|
+ scoreClassDetailScoreDownload,
|
|
|
+} from "../api";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
import ScoreReportPreview from "./ScoreReportPreview.vue";
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
@@ -403,6 +415,24 @@ export default {
|
|
|
if (!res) return;
|
|
|
this.$message.success("下载成功!");
|
|
|
},
|
|
|
+ async toDownloadScore() {
|
|
|
+ if (this.downloading) return;
|
|
|
+ this.downloading = true;
|
|
|
+
|
|
|
+ const res = await downloadByApi(() => {
|
|
|
+ return scoreClassDetailScoreDownload({
|
|
|
+ ...this.filter,
|
|
|
+ examId: this.instance.examId,
|
|
|
+ paperNumber: this.instance.paperNumber,
|
|
|
+ });
|
|
|
+ }).catch((e) => {
|
|
|
+ this.$message.error(e || "下载失败,请重新尝试!");
|
|
|
+ });
|
|
|
+ this.downloading = false;
|
|
|
+
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success("下载成功!");
|
|
|
+ },
|
|
|
// img view
|
|
|
async toViewTrack(row) {
|
|
|
this.toMarkTrack(row.studentId);
|