|
@@ -68,11 +68,14 @@ export default {
|
|
|
|
|
|
const filename = `${this.title}.pdf`;
|
|
|
const res = await downloadByApi(() => {
|
|
|
- return scoreReportExport({
|
|
|
- // examId: this.instance.examId,
|
|
|
- // paperNumber: this.instance.paperNumber,
|
|
|
- htmlContent: this.$refs.reportRef.getTemp(),
|
|
|
- });
|
|
|
+ const formData = new FormData();
|
|
|
+ const htmlFile = new File(
|
|
|
+ [this.$refs.reportRef.getTemp()],
|
|
|
+ `${Date.now()}.html`,
|
|
|
+ { type: "text/html" }
|
|
|
+ );
|
|
|
+ formData.append("file", htmlFile);
|
|
|
+ return scoreReportExport(formData);
|
|
|
}, filename).catch((e) => {
|
|
|
this.$message.error(e || "下载失败,请重新尝试!");
|
|
|
});
|