mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 23:06:45 +08:00
修改
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { toolList } from '../../api/modules/grateful';
|
||||
import { toolList, toolDown } from '../../api/modules/grateful';
|
||||
export default {
|
||||
data: () => {
|
||||
return {
|
||||
@@ -73,10 +73,22 @@ export default {
|
||||
this.total = total
|
||||
}
|
||||
},
|
||||
downLoad({ filePath }) {
|
||||
if (!filePath) return;
|
||||
console.log(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath);
|
||||
window.open(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath)
|
||||
downLoad(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);
|
||||
})
|
||||
},
|
||||
getPic(index) {
|
||||
return this.webBaseUrl + "/images/listblue0" + (index + 1) + ".png";
|
||||
@@ -139,7 +151,7 @@ export default {
|
||||
}
|
||||
|
||||
.modules-list {
|
||||
// min-height: 555px;
|
||||
min-height: 682px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
|
||||
@@ -151,8 +163,8 @@ export default {
|
||||
|
||||
|
||||
.toolEvery {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
Reference in New Issue
Block a user