|
@@ -8,130 +8,32 @@
|
|
|
<div class="close" @click="close">
|
|
|
<img src="@/img/useDialogConfirm/close.png" />
|
|
|
</div>
|
|
|
- <div class="chooseCon">
|
|
|
+ <div class="chooseCon" v-loading="loading">
|
|
|
<img class="imgMid" src="@/img/cloudTextbooks/shu.png" />
|
|
|
- <div class="chooseBox">
|
|
|
- <div class="leftOperate">
|
|
|
- <img src="@/img/cloudTextbooks/left.png" />
|
|
|
- </div>
|
|
|
- <div class="chooseList"></div>
|
|
|
- </div>
|
|
|
- <div class="chooseBox">
|
|
|
- <div class="rightOperate">
|
|
|
- <img src="@/img/cloudTextbooks/right.png" />
|
|
|
+ <div class="chooseBox" v-for="(listDetails, index) in listDetailData" :key="index">
|
|
|
+ <div
|
|
|
+ class="operate"
|
|
|
+ v-show="(index === 0 && pageNum !== 0) || (index === 1 && listData.length > pageNum + 1)"
|
|
|
+ @click="handlePage(index === 0 ? 'prev' : 'next')"
|
|
|
+ >
|
|
|
+ <img :src="require(`@/img/cloudTextbooks/${index === 0 ? 'left' : 'right'}.png`)" />
|
|
|
</div>
|
|
|
<div class="chooseList">
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play disabled">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
+ <div class="listItem" v-for="item in listDetails" :key="item.id">
|
|
|
<div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
+ <template v-if="item.lockFlag">
|
|
|
<img src="@/img/cloudTextbooks/jy.png" />
|
|
|
</template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
- <img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
<template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
- </div>
|
|
|
- <div class="play">查看</div>
|
|
|
- </div>
|
|
|
- <div class="listItem">
|
|
|
- <div class="img">
|
|
|
- <template v-if="false">
|
|
|
<img src="@/img/cloudTextbooks/bf.png" />
|
|
|
- <img src="@/img/cloudTextbooks/xm.png" />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img src="@/img/cloudTextbooks/jy.png" />
|
|
|
+ <!-- <img src="@/img/cloudTextbooks/xm.png" /> -->
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="nameCon">
|
|
|
- <div class="name">第一课</div>
|
|
|
- <div class="text">已使用5次</div>
|
|
|
+ <div class="name">{{ item.name }}</div>
|
|
|
+ <div class="text" v-if="item.useNum ?? false">已使用{{ item.useNum }}次</div>
|
|
|
</div>
|
|
|
- <div class="play">查看</div>
|
|
|
+ <div class="play" :class="{ disabled: item.lockFlag }" @click="item.lockFlag === true || handlePaly(item.id)">查看</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -140,19 +42,31 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+import { useDataDetailList } from "./useData"
|
|
|
+const { handleGetDetailList, loading, listDetailData, listData, pageNum, handlePage } = useDataDetailList()
|
|
|
+import router from "@/router"
|
|
|
+
|
|
|
const props = defineProps<{
|
|
|
modalData: {
|
|
|
- id: number
|
|
|
+ id: string
|
|
|
}
|
|
|
}>()
|
|
|
-
|
|
|
const emits = defineEmits<{
|
|
|
(e: "onClose"): void
|
|
|
}>()
|
|
|
|
|
|
+handleGetDetailList(props.modalData.id)
|
|
|
+
|
|
|
function close() {
|
|
|
emits("onClose")
|
|
|
}
|
|
|
+
|
|
|
+function handlePaly(id: string) {
|
|
|
+ emits("onClose")
|
|
|
+ router.push({
|
|
|
+ path: "/coursewarePlay/" + id
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -178,6 +92,7 @@ function close() {
|
|
|
left: 50%;
|
|
|
top: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
|
+ z-index: 1;
|
|
|
}
|
|
|
.chooseBox {
|
|
|
width: 50%;
|
|
@@ -188,18 +103,25 @@ function close() {
|
|
|
padding: 5px;
|
|
|
position: relative;
|
|
|
&:nth-child(2) {
|
|
|
- &:hover .leftOperate {
|
|
|
+ .operate {
|
|
|
+ left: -30px;
|
|
|
+ border-radius: 6px 0px 0px 6px;
|
|
|
+ }
|
|
|
+ &:hover .operate {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
- &:last-child {
|
|
|
+ &:nth-child(3) {
|
|
|
margin-left: 10px;
|
|
|
- &:hover .rightOperate {
|
|
|
+ .operate {
|
|
|
+ right: -30px;
|
|
|
+ border-radius: 0px 6px 6px 0px;
|
|
|
+ }
|
|
|
+ &:hover .operate {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
- .leftOperate,
|
|
|
- .rightOperate {
|
|
|
+ .operate {
|
|
|
width: 30px;
|
|
|
height: 68px;
|
|
|
background: #fffefb;
|
|
@@ -216,14 +138,6 @@ function close() {
|
|
|
background-color: #edeff0;
|
|
|
}
|
|
|
}
|
|
|
- .leftOperate {
|
|
|
- left: -30px;
|
|
|
- border-radius: 6px 0px 0px 6px;
|
|
|
- }
|
|
|
- .rightOperate {
|
|
|
- right: -30px;
|
|
|
- border-radius: 0px 6px 6px 0px;
|
|
|
- }
|
|
|
.chooseList {
|
|
|
width: 100%;
|
|
|
height: 100%;
|