|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
<!-- 课程收藏页面 --> |
|
|
|
|
<el-tab-pane label="课程收藏" name="first"> |
|
|
|
|
<div class="Container_Cla"> |
|
|
|
|
<div class="item_1" v-for="(item_1, index) in 12" :key="index"> |
|
|
|
|
<div class="item_1" v-for="(item_1, index) in datalist" :key="index"> |
|
|
|
|
<!-- 课程图片盒子 --> |
|
|
|
|
<div class="ClassImg"> |
|
|
|
|
<!-- 更多图片盒子 --> |
|
|
|
@ -10,16 +10,16 @@ |
|
|
|
|
<img src="../../assets/icons/更多.svg" width="100%" height="100%" /> |
|
|
|
|
</div> |
|
|
|
|
<!-- 课程图片 --> |
|
|
|
|
<img src="../../assets/images/kctp.png" /> |
|
|
|
|
<img :src="item_1.img" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="ClaCon"> |
|
|
|
|
<div class="Con"> |
|
|
|
|
<h3>软件项目管理{{ item_1 }}</h3> |
|
|
|
|
<p>讲师:王兴</p> |
|
|
|
|
<h3>{{ item_1.name }}</h3> |
|
|
|
|
<p>讲师:{{ item_1.teacher }}</p> |
|
|
|
|
<p> |
|
|
|
|
<span>32</span> |
|
|
|
|
<span>{{ item_1.classhours }}</span> |
|
|
|
|
学时 | |
|
|
|
|
<span>2.0</span> |
|
|
|
|
<span>{{ item_1.credit }}</span> |
|
|
|
|
学分 |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
@ -27,18 +27,89 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="Page-1"> |
|
|
|
|
<el-pagination v-model:current-page="currentPage4" v-model:page-size="pageSize4" :page-sizes="[1, 2, 3, 4]" |
|
|
|
|
:small="small" :disabled="disabled" :background="background" layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="400" @size-change="handleSizeChange" @current-change="handleCurrentChange" /> |
|
|
|
|
<el-pagination |
|
|
|
|
v-model:current-page="params.current" |
|
|
|
|
v-model:page-size="params.pageSize" |
|
|
|
|
:page-sizes="[6, 8, 12, 15]" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="total" |
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ref } from 'vue' |
|
|
|
|
import { SeCourseFavourControllerService } from '../../../generated/services/SeCourseFavourControllerService' |
|
|
|
|
import { CourseFavourQueryRequest } from 'generated/models/CourseFavourQueryRequest' |
|
|
|
|
|
|
|
|
|
const total = ref(0) |
|
|
|
|
const datalist = ref([ |
|
|
|
|
{ |
|
|
|
|
/** |
|
|
|
|
* 课程学时 |
|
|
|
|
*/ |
|
|
|
|
classhours: '', |
|
|
|
|
/** |
|
|
|
|
* 课程学分 |
|
|
|
|
*/ |
|
|
|
|
credit: '', |
|
|
|
|
id: '', |
|
|
|
|
img: '', |
|
|
|
|
name: '', |
|
|
|
|
/** |
|
|
|
|
* 教师id |
|
|
|
|
*/ |
|
|
|
|
teacher: '', |
|
|
|
|
}, |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 表单信息 |
|
|
|
|
*/ |
|
|
|
|
let params = ref<CourseFavourQueryRequest>({ |
|
|
|
|
current: 1, |
|
|
|
|
pageSize: 12, |
|
|
|
|
sortField: '', |
|
|
|
|
sortOrder: '', |
|
|
|
|
userId: 2, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const getDatalist = async () => { |
|
|
|
|
const res = await SeCourseFavourControllerService.listPostByPageUsingPost( |
|
|
|
|
params.value, |
|
|
|
|
) |
|
|
|
|
datalist.value = res.data.records |
|
|
|
|
console.log('datalist ' + datalist.value[0].name) |
|
|
|
|
total.value = res.data.total |
|
|
|
|
console.log('pages ' + total.value) |
|
|
|
|
console.log('datalist ' + datalist.value[0].img) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getDatalist() |
|
|
|
|
|
|
|
|
|
const handleSizeChange = (size: any) => { |
|
|
|
|
// console.log(size) |
|
|
|
|
params.value.current = 1 |
|
|
|
|
params.value.pageSize = size |
|
|
|
|
// 基于每页条数重新渲染 |
|
|
|
|
getDatalist() |
|
|
|
|
} |
|
|
|
|
const handleCurrentChange = (page: any) => { |
|
|
|
|
console.log(page) |
|
|
|
|
params.value.current = page |
|
|
|
|
// 基于当前页渲染数据 |
|
|
|
|
// getCourseList() |
|
|
|
|
getDatalist() |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.el-pagination { |
|
|
|
|
justify-content: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.example-pagination-block+.example-pagination-block { |
|
|
|
|
.example-pagination-block + .example-pagination-block { |
|
|
|
|
margin-top: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -68,6 +139,7 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Container_Cla { |
|
|
|
|
min-height: 750px; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
display: grid; |
|
|
|
@ -96,7 +168,7 @@ |
|
|
|
|
border-bottom: 1px solid rgb(217, 217, 217); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.ClassImg>img { |
|
|
|
|
.ClassImg > img { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 180px; |
|
|
|
|
} |
|
|
|
@ -104,7 +176,6 @@ |
|
|
|
|
.item_1:hover { |
|
|
|
|
.ClassGd { |
|
|
|
|
display: block; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -131,14 +202,14 @@ |
|
|
|
|
justify-content: space-around; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Con>h3 { |
|
|
|
|
.Con > h3 { |
|
|
|
|
margin-left: 15px; |
|
|
|
|
font-size: 25px; |
|
|
|
|
font-weight: 600; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Con>p { |
|
|
|
|
.Con > p { |
|
|
|
|
margin-left: 15px; |
|
|
|
|
margin-top: 5px; |
|
|
|
|
font-size: 13px; |
|
|
|
@ -146,14 +217,14 @@ |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Con>p>span { |
|
|
|
|
.Con > p > span { |
|
|
|
|
margin-left: 5px; |
|
|
|
|
margin-right: 5px; |
|
|
|
|
color: rgb(94, 188, 231); |
|
|
|
|
font-weight: 600; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Con>button { |
|
|
|
|
.Con > button { |
|
|
|
|
width: 45px; |
|
|
|
|
height: 20px; |
|
|
|
|
font-size: 9px; |
|
|
|
@ -165,4 +236,4 @@ |
|
|
|
|
width: 100%; |
|
|
|
|
justify-content: center; |
|
|
|
|
} |
|
|
|
|
</style > |
|
|
|
|
</style> |
|
|
|
|