mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
工具下载
This commit is contained in:
@@ -258,20 +258,21 @@ export default {
|
||||
methods: {
|
||||
downTool(toolInfo) {
|
||||
console.log(toolInfo);
|
||||
toolDown({
|
||||
urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
||||
fileName: toolInfo.name
|
||||
}).then((result) => {
|
||||
const link = document.createElement('a');// 创建a标签
|
||||
let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob); // 创建URL
|
||||
link.setAttribute("download", `${toolInfo.name}`);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
document.body.removeChild(link);
|
||||
})
|
||||
window.open(`/activityApi/xboe/m/boe/tools/url/download?urlStr=${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}&fileName=${toolInfo.name}`)
|
||||
// toolDown({
|
||||
// urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
||||
// fileName: toolInfo.name
|
||||
// }).then((result) => {
|
||||
// const link = document.createElement('a');// 创建a标签
|
||||
// let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
||||
// link.style.display = "none";
|
||||
// link.href = URL.createObjectURL(blob); // 创建URL
|
||||
// link.setAttribute("download", `${toolInfo.name}`);
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// URL.revokeObjectURL(link.href);
|
||||
// document.body.removeChild(link);
|
||||
// })
|
||||
},
|
||||
couresreso() {
|
||||
carouselList().then((res) => {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="contnet">{{ item.name }}</div>
|
||||
<div class="case-info-date portal-time">
|
||||
<i class="el-icon-time" style="margin-right: 5px;"></i>
|
||||
<time-show :time="item.createTime.split(' ')[0]"></time-show>
|
||||
<time-show :time="item.createTime"></time-show>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="author">发布人:{{ createName }}</div>
|
||||
<div class="case-info-date portal-time">
|
||||
<i class="el-icon-time" style="margin-right: 5px;"></i>
|
||||
<time-show :time="createTime.split(' ')[0]"></time-show>
|
||||
<time-show :time="createTime"></time-show>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topTitle">通知内容</div>
|
||||
|
||||
Reference in New Issue
Block a user