Commit 0444a6c6 authored by 黄奎's avatar 黄奎

页面修改

parent 967b05b9
...@@ -205,6 +205,17 @@ export function UploadFileToTencent(uploadConfig, fileFullPath, fileObj, uploadL ...@@ -205,6 +205,17 @@ export function UploadFileToTencent(uploadConfig, fileFullPath, fileObj, uploadL
}); });
} }
/***
* 本地文件下载
*/
export function downloadLocalFile(fileName, filePath) {
const a = document.createElement('a');
a.setAttribute('download', '');
var url = process.env.API;
a.setAttribute('href', url + '/file/DownloadFileForPdf?fileName=' + fileName + '&fPath=' + filePath);
a.click();
}
/** /**
* 获取省市区 * 获取省市区
*/ */
......
...@@ -123,6 +123,10 @@ ...@@ -123,6 +123,10 @@
SetEducationContractCopy SetEducationContractCopy
} from '../../api/sale/contract' } from '../../api/sale/contract'
import {
downloadLocalFile
} from '../../api/common/common'
import eduinfoForm from '../../components/sale/eduinfo-form'; import eduinfoForm from '../../components/sale/eduinfo-form';
export default { export default {
meta: { meta: {
...@@ -330,15 +334,8 @@ ...@@ -330,15 +334,8 @@
GetDownLoadEducationContract(msg).then(res => { GetDownLoadEducationContract(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
console.log(res,'数据'); console.log(res,'数据');
let sign='123'; let sign='123.pdf';
let urlObj = this.domainManager(); downloadLocalFile(sign,res.Data);
const a = document.createElement('a');
a.setAttribute('download', '');
var url = window.location.host;
a.setAttribute('href', url + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.Data);
a.click();
} }
}) })
}, },
......
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