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:
@@ -73,28 +73,27 @@
|
||||
</div>
|
||||
<ul>
|
||||
<li v-for="(item, index) in courseList.toolList" :key="index"
|
||||
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList">
|
||||
<router-link to='/grateful/toolDown'>
|
||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index == 1">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index == 2">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 3">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 4">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 5">
|
||||
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
||||
</router-link>
|
||||
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList"
|
||||
@click="downTool(item)">
|
||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index == 1">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index == 2">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 3">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 4">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 5">
|
||||
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -185,7 +184,7 @@
|
||||
import apiCourseStudy from "@/api/modules/courseStudy.js";
|
||||
import courseImage from "@/components/Course/courseImage.vue";
|
||||
import { toScore, formatUserNumber } from "@/utils/tools.js";
|
||||
import { saveOpinion, noticeList, courselList, toolList, carouselList } from '@/api/modules/grateful.js'
|
||||
import { saveOpinion, noticeList, courselList, toolList, carouselList, toolDown } from '@/api/modules/grateful.js'
|
||||
export default {
|
||||
name: "Grateful",
|
||||
components: {
|
||||
@@ -242,6 +241,23 @@ export default {
|
||||
this.getToolData()
|
||||
},
|
||||
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);
|
||||
})
|
||||
},
|
||||
couresreso() {
|
||||
carouselList().then((res) => {
|
||||
console.log(res);
|
||||
@@ -486,6 +502,7 @@ export default {
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
z-index: 999;
|
||||
cursor: pointer;
|
||||
|
||||
.content {
|
||||
width: 152px;
|
||||
|
||||
Reference in New Issue
Block a user