This commit is contained in:
binbin_pan 2024-12-19 21:07:09 +08:00
parent d899df8226
commit a363250b02
1 changed files with 37 additions and 112 deletions

View File

@ -2,53 +2,27 @@
<view class="page">
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
<view class="proj-cont">
<h2 style="margin-bottom: 15rpx">{{ name }}</h2>
<span style="font-size: 12px; color: #b0b0b0">合格标准学习进度达到{{ eligibility }}%</span>
<h2 style="margin: 0 10px 8px">{{ name }}</h2>
<span style="font-size: 15px; color: #b0b0b0; margin: 0 10px">合格标准学习进度达到{{ eligibility }}%</span>
<view class="user-info">
<div style="font-size: 18px">{{ createUserName }}</div>
<div style="font-size: 18px; margin: 0 10px">{{ createUserName }}</div>
<div class="training-content">
<div>培训内容{{ listStageContentNum || '暂无' }}</div>
</div>
<!-- <view class="info-lef">
<view class="avatar">
<image src="/static/eduImg/avatar.jpg"></image>
<div style="font-size: 18px">{{ createUserName }}</div>
</view>
<view style="display: flex; align-items: center">
<l-starRate v-model="starRate" :disabled="true" style="margin-right: 1vw"></l-starRate>
<span style="color: #ffca3e">{{ starRate }}.0</span>
</view>
</view>
<view class="info-rig">
<view class="rig-up">
<view>
培训内容
<span>{{ 'listStageContentNum' }}</span>
</view>
<view style="margin-left: 2vw">
观看记录
<span>28</span>
<uni-icons style="color: #b0b0b0" type="right" size="12"></uni-icons>
</view>
</view>
<view class="rig-dn">
去评分
<uni-icons style="color: #b0b0b0" type="right" size="12"></uni-icons>
</view>
</view> -->
</view>
<!-- <view class="tip">已开启进度同步其他途径的学习进度已自动同步</view> -->
<div v-for="(stageItem, stageIndex) in listStage" :key="stageIndex" :title="stageItem.stageName">
<div class="item-stage" @click="handleShow(stageItem)">
<span>{{ stageItem.stageName }}</span>
<u-icon :name="stageItem.isShow ? 'arrow-down' : 'arrow-up'" size="17" />
<span style="font-size: 18px; margin: 0 10px">{{ stageItem.stageName }}</span>
<u-icon :name="stageItem.isShow ? 'arrow-down' : 'arrow-up'" size="20" />
</div>
<div v-if="stageItem.isShow">
<div v-for="(content, conIndex) in stageItem.listStageContent" :key="conIndex">
<u-collapse :border="false">
<u-collapse-item title="素材" v-if="content.stageType == 1" :border="false">
<u-collapse :border="false" :value="[1]">
<u-collapse-item v-if="content.stageType == 1" :border="false" :name="1">
<text slot="title" class="u-page__item__title__slot-title slot-item-title">素材</text>
<div
class="list-wrapper"
class="list-wrapper u-collapse-content"
v-for="(item, index) in content.studyList"
:key="index"
@click="toggleTheoryLearn(item, content)"
@ -74,9 +48,10 @@
</div>
</div>
</u-collapse-item>
<u-collapse-item title="课程" v-if="content.stageType == 2" :border="false">
<u-collapse-item v-if="content.stageType == 2" :border="false" :name="1">
<text slot="title" class="u-page__item__title__slot-title slot-item-title">课程</text>
<div
class="list-wrapper"
class="list-wrapper u-collapse-content"
v-for="(item, index) in content.studyList"
:key="index"
@click="toggleTheoryLearn(item, content)"
@ -103,8 +78,9 @@
</div>
</u-collapse-item>
<u-collapse-item title="练习" v-if="content.stageType == 3" :border="false">
<div class="list-wrapper" @click="toggleTheoryPrac(content)">
<u-collapse-item v-if="content.stageType == 3" :border="false" :name="1">
<text slot="title" class="u-page__item__title__slot-title slot-item-title">练习</text>
<div class="list-wrapper u-collapse-content" @click="toggleTheoryPrac(content)">
<div class="left-content">
<div class="title">
<u-icon name="/static/images/exercises.png" size="15" />
@ -125,8 +101,9 @@
</div>
</u-collapse-item>
<u-collapse-item title="考试" v-if="content.stageType == 4" :border="false">
<div class="list-wrapper" @click="toggleTheoryExam(content)">
<u-collapse-item v-if="content.stageType == 4" :border="false" :name="1">
<text slot="title" class="u-page__item__title__slot-title slot-item-title">考试</text>
<div class="list-wrapper u-collapse-content" @click="toggleTheoryExam(content)">
<div class="left-content">
<div class="title">
<u-icon name="/static/images/examine.png" size="15" />
@ -157,43 +134,6 @@
</div>
</div>
</view>
<!-- <view class="comment-area">
<h2 style="margin-bottom: 15rpx">最新评论 ({{ commentList.length }})</h2>
<view class="write-cmt">
<u--input
ref="uInput"
placeholder="写评论"
prefixIcon="edit-pen"
prefixIconStyle="font-size: 18px;color: #c0c4cc"
placeholderStyle="font-size: 13px;color: #c0c4cc"
border="none"
maxlength="999"
clearable
/>
</view>
<view class="cmts" v-for="(item, index) in commentList" :key="index">
<view class="cmt-up">
<image :src="item.avatar"></image>
<span>{{ item.username }}</span>
</view>
<view class="cmt-dn">
{{ item.cont }}
</view>
</view>
</view> -->
<!-- <view class="btm-sticky">
<view class="icons">
<view>
<uni-icons style="color: #1989fa; margin-right: 1vw" type="chat-filled" size="24"></uni-icons>
<span>23</span>
</view>
<view>
<uni-icons style="color: #1989fa; margin-right: 1vw" type="hand-up-filled" size="24"></uni-icons>
<span>12</span>
</view>
</view>
<view class="learn-btn">继续学习</view>
</view> -->
</view>
</template>
@ -214,34 +154,6 @@ export default {
learnIconObj: { color: '#1A63AC', size: '18', type: 'calendar' },
pracIconObj: { color: '#38B022', size: '18', type: 'compose' },
listStage: []
// theoryLearnList: [
// { title: '', id: 121, percent: 86 },
// { title: '', id: 122, percent: 42 },
// { title: '', id: 123, percent: 66 },
// { title: '', id: 124, percent: 13 }
// ],
// theoryPracList: [
// { title: '', id: 141, ifPrac: false },
// { title: '', id: 142, ifPrac: true },
// { title: '', id: 143, ifPrac: true },
// { title: '', id: 144, ifPrac: false }
// ],
// theoryExamList: [
// { title: '', id: 161, ifExam: false, time: '00:34:21' },
// { title: '', id: 162, ifExam: true, time: '00:34:21' },
// { title: '', id: 163, ifExam: true, time: '00:34:21' },
// { title: '', id: 164, ifExam: false, time: '00:34:21' }
// ],
// commentList: [
// { username: '', avatar: '/static/eduImg/avatar.jpg', cont: '西' },
// { username: '', avatar: '/static/eduImg/avatar.jpg', cont: '' },
// { username: '', avatar: '/static/eduImg/avatar.jpg', cont: '+3' },
// {
// username: '',
// avatar: '/static/eduImg/avatar.jpg',
// cont: ''
// }
// ]
}
},
onLoad(params) {
@ -416,7 +328,7 @@ export default {
::v-deep .u-cell__body {
padding: 5px !important;
}
::v-deep .u-collapse-item__content__text{
::v-deep .u-collapse-item__content__text {
padding: 0 5px !important;
}
@ -425,10 +337,12 @@ export default {
height: 100vh;
background-color: #f8f8f8;
box-sizing: border-box;
padding: 5vw 5px;
padding: 5vw 10px;
position: relative;
font-style: 20px;
.item-stage {
height: 50px;
margin: 8px 0;
font-size: 16px;
display: flex;
@ -439,13 +353,20 @@ export default {
.proj-cont {
width: 100%;
box-sizing: border-box;
padding: 30rpx 20rpx;
padding: 30rpx 0;
background-color: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
box-shadow: #f4f4f4 2px 2px;
.slot-item-title {
margin-left: 10px;
height: 45px;
line-height: 45px;
font-size: 18px;
}
.user-info {
width: 100%;
/* height: 8vh; */
@ -455,6 +376,7 @@ export default {
margin-bottom: 2vh;
.training-content {
margin: 0 10px;
display: flex;
margin-top: 10px;
white-space: normal;
@ -521,6 +443,8 @@ export default {
}
.list-wrapper {
padding: 10px;
min-height: 90px;
display: flex;
justify-content: space-between;
align-items: center;
@ -528,11 +452,12 @@ export default {
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
font-size: 12px;
color: #b0b0b0;
/* height: 400px; */
background-color: #e6f0fa;
overflow: auto;
.left-content {
font-size: 18px;
width: 50vw;
.title {
display: flex;
@ -540,8 +465,8 @@ export default {
}
.note {
/* width: 130px; */
margin-top: 10px;
font-size: 14px;
margin-top: 15px;
margin-bottom: 10px;
color: #333;
word-wrap: break-word;
}