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: {
|
methods: {
|
||||||
downTool(toolInfo) {
|
downTool(toolInfo) {
|
||||||
console.log(toolInfo);
|
console.log(toolInfo);
|
||||||
toolDown({
|
window.open(`/activityApi/xboe/m/boe/tools/url/download?urlStr=${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}&fileName=${toolInfo.name}`)
|
||||||
urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
// toolDown({
|
||||||
fileName: toolInfo.name
|
// urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
||||||
}).then((result) => {
|
// fileName: toolInfo.name
|
||||||
const link = document.createElement('a');// 创建a标签
|
// }).then((result) => {
|
||||||
let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
// const link = document.createElement('a');// 创建a标签
|
||||||
link.style.display = "none";
|
// let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
||||||
link.href = URL.createObjectURL(blob); // 创建URL
|
// link.style.display = "none";
|
||||||
link.setAttribute("download", `${toolInfo.name}`);
|
// link.href = URL.createObjectURL(blob); // 创建URL
|
||||||
document.body.appendChild(link);
|
// link.setAttribute("download", `${toolInfo.name}`);
|
||||||
link.click();
|
// document.body.appendChild(link);
|
||||||
URL.revokeObjectURL(link.href);
|
// link.click();
|
||||||
document.body.removeChild(link);
|
// URL.revokeObjectURL(link.href);
|
||||||
})
|
// document.body.removeChild(link);
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
couresreso() {
|
couresreso() {
|
||||||
carouselList().then((res) => {
|
carouselList().then((res) => {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<div class="contnet">{{ item.name }}</div>
|
<div class="contnet">{{ item.name }}</div>
|
||||||
<div class="case-info-date portal-time">
|
<div class="case-info-date portal-time">
|
||||||
<i class="el-icon-time" style="margin-right: 5px;"></i>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<div class="author">发布人:{{ createName }}</div>
|
<div class="author">发布人:{{ createName }}</div>
|
||||||
<div class="case-info-date portal-time">
|
<div class="case-info-date portal-time">
|
||||||
<i class="el-icon-time" style="margin-right: 5px;"></i>
|
<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>
|
</div>
|
||||||
<div class="topTitle">通知内容</div>
|
<div class="topTitle">通知内容</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user