feat: myresource原型
This commit is contained in:
parent
04c18d2561
commit
584b2135f5
|
@ -0,0 +1,86 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<SearchCom
|
||||
:form="queryParam"
|
||||
:list="queryOptions"
|
||||
@search="handleRefresh"
|
||||
@reset="
|
||||
() => {
|
||||
queryParam = {}
|
||||
handleRefresh()
|
||||
}
|
||||
"></SearchCom>
|
||||
</div>
|
||||
<a-card v-for="(item, index) in dataList" :key="index" style="margin-bottom: 15px;">
|
||||
<div class="flex-center" >
|
||||
<div style="flex: 1;">
|
||||
<h3>{{ item.courseName }}</h3>
|
||||
<div><span style="margin-right: 20px;">下载次数{{ item.rightQuestions }}次</span><span>预览次数:{{ item.submitTime }}次</span></div>
|
||||
</div>
|
||||
<div style="flex: 0 0 200px; text-align: right;">
|
||||
<div @click="handlerDown()" :span="24" style="margin-bottom: 10px;"><a-button type="primary" size="small" >下载</a-button></div>
|
||||
<div @click="handlerPreview()" :span="24"><a-button type="danger" size="small">预览</a-button></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
<div class="flex-center">
|
||||
<a-pagination :default-current="params.pageNum" :total="params.total" />
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SearchCom } from '@/components'
|
||||
import { dictToTree } from '@/utils/util'
|
||||
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
|
||||
|
||||
export default {
|
||||
components: { SearchCom },
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
params: {
|
||||
pageNum: 1,
|
||||
total: 100
|
||||
},
|
||||
queryParam: {
|
||||
name: '', // 课程分类
|
||||
trainWay: ''
|
||||
},
|
||||
queryOptions: [
|
||||
{ type: 'select-dic-tree', placeholder: '课程类别', key: 'trainWay', options: [] }
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.dictionaryDropDown()
|
||||
},
|
||||
mounted () {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList () {
|
||||
|
||||
},
|
||||
handlerDown () {
|
||||
|
||||
},
|
||||
handlerPreview () {},
|
||||
handleRefresh () {
|
||||
this.getList()
|
||||
},
|
||||
// 获取数据词典
|
||||
dictionaryDropDown () {
|
||||
dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
|
||||
this.queryOptions[1].options = dictToTree(res.data, [], 0)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue