171 lines
4.0 KiB
Vue
171 lines
4.0 KiB
Vue
<template>
|
|
<view class="main-content">
|
|
<headers :showBack="false" :themeType="true">
|
|
<view class="top-diy">
|
|
<view class="headerBack" @click="returnBack">
|
|
<u-icon name="arrow-left" color="#ffffff" size="40"></u-icon>
|
|
</view>
|
|
<text>教育计划</text>
|
|
</view>
|
|
</headers>
|
|
<view class="index-boxs" v-if="educationList.length">
|
|
<view class="index-box" @click="goDetail(item)" v-for="(item,index) in educationList" :key="index">
|
|
<image src="/static/exam/courseImg.png"></image>
|
|
<view class="course-title">
|
|
<text>科目类型:{{item.subjectName}}</text>
|
|
</view>
|
|
<view class="course-title">
|
|
<text>培训计划名称:{{item.trainName}}</text>
|
|
</view>
|
|
<view class="course-title">
|
|
<text>剩余考试次数:{{item.examCount}}</text>
|
|
</view>
|
|
<view class="text-boxs">
|
|
<text class="text">教育主题:{{item.title}}</text>
|
|
<!-- <text class="text1">培训有效期限:{{item.trainBeginTime}}-{{item.trainEndTime}}</text> -->
|
|
</view>
|
|
<view class="text-boxs">
|
|
<text class="text">培训有效期限:{{item.trainBeginTime}}-{{item.trainEndTime}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="placeholderBox" v-else>
|
|
<image src="/static/exam/noCourseData.png" class="noDataImg" style="width: 180rpx; height: 160rpx;"></image>
|
|
<!-- <view class="text">
|
|
暂无数据
|
|
</view> -->
|
|
</view>
|
|
<footersExam :activeTab="activeIndex"></footersExam>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import footersExam from '@/components/footers/footersExam.vue'
|
|
export default {
|
|
components: {
|
|
footersExam
|
|
},
|
|
data() {
|
|
return {
|
|
title: 'Hello',
|
|
activeIndex: 0,
|
|
educationList: [],
|
|
userInfo: {}
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.userInfo = JSON.parse(uni.getStorageSync("userInfo"))
|
|
},
|
|
onShow() {
|
|
this.getDataList();
|
|
},
|
|
methods: {
|
|
getDataList() {
|
|
var that = this
|
|
let requestData = {
|
|
workerId: this.userInfo.id
|
|
}
|
|
this.sendRequest({
|
|
url: "xmgl/workerExam/trainList",
|
|
data: requestData,
|
|
header: {
|
|
},
|
|
method: 'post',
|
|
success(res) {
|
|
console.log('视频分组列表', res)
|
|
that.educationList = res.result;
|
|
}
|
|
})
|
|
},
|
|
returnBack() {
|
|
uni.redirectTo({
|
|
url: `/pages/personLocation/index/index`
|
|
});
|
|
},
|
|
goDetail(item) {
|
|
let transportData = {
|
|
courseId: item.courseId,
|
|
examPaperId: item.examPaperId,
|
|
trainRecordId: item.id,
|
|
trainId: item.trainId,
|
|
examDuration: item.examDuration
|
|
}
|
|
uni.navigateTo({
|
|
url: `/pages/personLocation/exam/studydetails/studydetails?transportData=` + JSON.stringify(transportData)
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.main-content {
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
.top-diy {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
|
|
.headerBack {
|
|
position: absolute;
|
|
left: 3%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.index-boxs {
|
|
height: calc(100vh - 220rpx);
|
|
overflow-y: scroll;
|
|
padding: 0rpx 35rpx;
|
|
padding-top: 58rpx;
|
|
.index-box {
|
|
width: 100%;
|
|
background-color: white;
|
|
box-shadow: 4rpx 4rpx 8rpx 2rpx rgba(81, 129, 246, 0.12);
|
|
border-radius: 10rpx;
|
|
padding-bottom: 16rpx;
|
|
margin-bottom: 30rpx;
|
|
>image {
|
|
width: 100%;
|
|
height: 187.62rpx;
|
|
}
|
|
|
|
.course-title {
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #000000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin: 8rpx 20rpx 0rpx 20rpx;
|
|
}
|
|
|
|
.text-boxs {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin: 16rpx 20rpx 0rpx 20rpx;
|
|
|
|
.text {
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
font-weight: 400;
|
|
font-size: 24rpx;
|
|
color: #747994;
|
|
}
|
|
|
|
.text1 {
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
font-weight: 400;
|
|
font-size: 18rpx;
|
|
color: #747994;
|
|
margin-right: 36rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |