144 lines
3.4 KiB
Vue
144 lines
3.4 KiB
Vue
<template>
|
|
<view class="main-content">
|
|
<headers :showBack="true" :themeType="true">
|
|
<view class="headerName">
|
|
培训计划
|
|
</view>
|
|
</headers>
|
|
<view class="list-box" :style="{height: btnAuth?'calc(100vh - 114px)':'100vh'}" v-if="dataList.length">
|
|
<view class="list-box-item" @click="toDetail(item)" v-for="(item,index) in dataList" :key="index">
|
|
<view class="item-flex">
|
|
<text>培训计划名称: </text>
|
|
<text>{{item.name}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>科目类型: </text>
|
|
<text>{{item.subjectName}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>课件名称: </text>
|
|
<text>{{item.courseName}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>教育主题: </text>
|
|
<text>{{item.title}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>考试试卷: </text>
|
|
<text>{{item.paperName}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>重考次数: </text>
|
|
<text>{{item.examNum}}</text>
|
|
</view>
|
|
<view class="item-flex">
|
|
<text>培训有效时间: </text>
|
|
<text style="font-size: 24rpx;">{{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>
|
|
<view class="btn-operate" @click="toAdd" v-if="btnAuth">
|
|
<button type="primary"
|
|
>创建培训计划</button>
|
|
</view>
|
|
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import levitatedsphere from "@/components/levitatedsphere/levitatedsphere.vue"
|
|
export default {
|
|
data() {
|
|
return {
|
|
dataList: [],
|
|
projectSn:"",
|
|
btnAuth: true
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.btnAuth = this.checkBtnPermission({key: 'trainPlan_add', menuPath: '/project/examSystem2/trainPlan'})
|
|
this.projectSn = JSON.parse(uni.getStorageSync("userInfo")).sn
|
|
this.getDataList();
|
|
},
|
|
methods: {
|
|
//获取列表数据
|
|
getDataList() {
|
|
let that = this;
|
|
this.sendRequest({
|
|
url: 'exam/train/list',
|
|
method: 'post',
|
|
data: {
|
|
projectSn: this.projectSn
|
|
},
|
|
success: res => {
|
|
if (res.code == 200) {
|
|
that.dataList = res.result
|
|
}
|
|
}
|
|
})
|
|
},
|
|
toDetail(obj){
|
|
uni.navigateTo({
|
|
url: './details?obj=' + JSON.stringify(obj)
|
|
})
|
|
},
|
|
toAdd(){
|
|
uni.navigateTo({
|
|
url: './addPlan'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.main-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
.list-box {
|
|
height: calc(100vh - 220rpx);
|
|
overflow-y: scroll;
|
|
padding: 40rpx 18rpx 20rpx 18rpx;
|
|
&-item {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(198, 220, 255, 0.2) 100%);
|
|
box-shadow: 0px 8rpx 30rpx -8rpx rgba(42, 60, 106, 0.24);
|
|
border-radius: 34rpx;
|
|
margin-bottom: 30rpx;
|
|
padding: 26rpx 30rpx;
|
|
|
|
.item-flex {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
text {
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
font-weight: 400;
|
|
font-size: 28rpx;
|
|
color: #000000;
|
|
}
|
|
text:nth-child(1){
|
|
margin-right: 10rpx;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
.item-flex:not(:last-child) {
|
|
margin-bottom: 14rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.btn-operate{
|
|
width: 90%;
|
|
position: fixed;
|
|
bottom: 2%;
|
|
left: 5%;
|
|
z-index: 10;
|
|
}
|
|
</style> |