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

页面修改

parent 967b05b9
......@@ -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 @@
SetEducationContractCopy
} from '../../api/sale/contract'
import {
downloadLocalFile
} from '../../api/common/common'
import eduinfoForm from '../../components/sale/eduinfo-form';
export default {
meta: {
......@@ -330,15 +334,8 @@
GetDownLoadEducationContract(msg).then(res => {
if (res.Code == 1) {
console.log(res,'数据');
let sign='123';
let urlObj = this.domainManager();
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();
let sign='123.pdf';
downloadLocalFile(sign,res.Data);
}
})
},
......
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