|
@@ -366,20 +366,37 @@ export default {
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
var basePaperId = examRecordList[0].basePaperId;
|
|
var basePaperId = examRecordList[0].basePaperId;
|
|
var rootOrgName = currentUser.rootOrgName;
|
|
var rootOrgName = currentUser.rootOrgName;
|
|
- var token = currentUser.token;
|
|
|
|
- var key = currentUser.key;
|
|
|
|
- window.location.href =
|
|
|
|
- "http://192.168.10.39:8868" +
|
|
|
|
- "/api/ecs_ques/paper/export/" +
|
|
|
|
- basePaperId +
|
|
|
|
- "/PAPER/" +
|
|
|
|
- rootOrgName +
|
|
|
|
- "/" +
|
|
|
|
- basePaperId +
|
|
|
|
- "/offLine?$key=" +
|
|
|
|
- key +
|
|
|
|
- "&$token=" +
|
|
|
|
- token;
|
|
|
|
|
|
+ this.$http
|
|
|
|
+ .get(
|
|
|
|
+ "/api/ecs_ques/paper/export/" +
|
|
|
|
+ basePaperId +
|
|
|
|
+ "/PAPER/" +
|
|
|
|
+ rootOrgName +
|
|
|
|
+ "/" +
|
|
|
|
+ basePaperId +
|
|
|
|
+ "/offLine",
|
|
|
|
+ {
|
|
|
|
+ responseType: "arraybuffer",
|
|
|
|
+ filename: "utf-8"
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(response => {
|
|
|
|
+ if (response.data) {
|
|
|
|
+ var blob = new Blob([response.data], {
|
|
|
|
+ type: "application/zip"
|
|
|
|
+ });
|
|
|
|
+ var url = URL.createObjectURL(blob);
|
|
|
|
+ var fileName = response.headers["content-disposition"]
|
|
|
|
+ .split(";")[1]
|
|
|
|
+ .replace("filename=", "");
|
|
|
|
+ var a = document.createElement("a");
|
|
|
|
+ a.href = url;
|
|
|
|
+ a.download = decodeURI(fileName);
|
|
|
|
+ a.target = "_blank";
|
|
|
|
+ a.click();
|
|
|
|
+ URL.revokeObjectURL(url);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: "该考生未参加考试",
|
|
message: "该考生未参加考试",
|