资源库文件下载

This commit is contained in:
18571350067 2021-12-29 16:03:42 +08:00
parent 50baf8b2aa
commit 04d8301124
1 changed files with 16 additions and 9 deletions

View File

@ -12,7 +12,13 @@
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.PageNum) || 1">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="dow(record)">下载</a>
<!-- <a href="javascript:;" @click="dow(record)">下载</a> -->
<a-popover title="资源下载">
<template slot="content">
<a style="display: block;margin-bottom:15px" v-for="(item,index) in record.videoList" :href="item.path" :key="index">{{item.name}}</a>
</template>
<span style="color:#1890ff">下载</span>
</a-popover>
<a-divider type="vertical" />
<a href="javascript:;" @click="edit(record)">编辑</a>
<a-divider type="vertical" />
@ -38,12 +44,12 @@ export default {
},
data() {
return {
file: [],
queryParam: { classify: '' },
queryOptions: [
{ type: 'select-dic-tree', placeholder: '课件类别', key: 'classify', options: [] },
],
queryOptions: [{ type: 'select-dic-tree', placeholder: '课件类别', key: 'classify', options: [] }],
loadData: (parameter) => {
return resource(Object.assign(parameter, this.queryParam)).then((res) => {
console.log('res', res)
return res
})
},
@ -64,7 +70,6 @@ export default {
dictionaryDropDown() {
//
dictionaryDropDown({ dictionaryCode: '0009' }).then((res) => {
console.log('课件类别----', res)
this.queryOptions[0].options = dictToTree(res.data, [], 0)
})
},
@ -84,9 +89,11 @@ export default {
query: { coursewareId: record.id, type: record.type, ifResources: 1 },
})
},
//
dow() {},
showFile() {
//
// this.file =
},
//
del(record) {