Commit 4589a332 authored by 黄奎's avatar 黄奎

页面修改

parent eb9de802
...@@ -318,10 +318,11 @@ export function DeletePaperDetails(data) { ...@@ -318,10 +318,11 @@ export function DeletePaperDetails(data) {
* 题库下载 * 题库下载
* @param {*} data * @param {*} data
*/ */
export function DownLoadBank(data) { export function downLoadBank(data) {
return request({ return request({
url: '/Question/DownLoadBank', url: '/Question/DownLoadBank',
method: 'post', method: 'post',
data data
}) })
} }
\ No newline at end of file
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
import { import {
queryQuestionBankPage, queryQuestionBankPage,
RemoveQuestionBank, RemoveQuestionBank,
DownLoadBank downLoadBank
} from '../../api/question/question'; } from '../../api/question/question';
import { import {
EduDownLoad EduDownLoad
...@@ -157,15 +157,18 @@ ...@@ -157,15 +157,18 @@
let msg = { let msg = {
BankId: item.BankId, BankId: item.BankId,
} }
var fileName = item.BankName + ".doc"; this.loading = true;
this.loading=true; downLoadBank(msg).then(res => {
EduDownLoad( this.loading = false;
"/Question/DownLoadBank", if (res.Code == 1) {
msg, let cApiUrl = process.env.API + res.Data;
fileName, res => { let link = document.createElement('a');
this.loading=false; link.href = cApiUrl;
link.setAttribute("download", item.BankName + ".zip");
document.body.appendChild(link);
link.click();
} }
); })
}, },
research() { research() {
this.getQuestionBankPage(); this.getQuestionBankPage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment