|
|
|
<template>
|
|
|
|
<view class="navTab">
|
|
|
|
<!-- <u-search v-model='keyware' placeholder='输入搜索内容' :actionStyle="customActionStyle"
|
|
|
|
showAction="true" actionText="搜索" :animation="false" @custom='seacrhko'></u-search> -->
|
|
|
|
<div class="sign_list" v-for="(item, key) of signuplist" :key="key">
|
|
|
|
<view style="display:flex;margin:0 12px 8px 0;justify-content: space-between;align-items: flex-end;">
|
|
|
|
<view class="rightb">
|
|
|
|
{{ item.trainClassName }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="fline"></view>
|
|
|
|
<view @click="catCourse(item)"
|
|
|
|
style="display: flex;justify-content: space-between;margin: 19px 15px 0 15px;align-items: center;">
|
|
|
|
<view style="color:#333333FF;font-size:13px;line-height:27px;">
|
|
|
|
<p>班级名称:{{ item.trainClassName }}</p>
|
|
|
|
<!-- start_time -->
|
|
|
|
<p v-if="item.trainStartTime">
|
|
|
|
开课日期:{{ item.trainStartTime.slice(0, 4) }}年{{ item.trainStartTime.slice(5, 7) }}月{{
|
|
|
|
item.trainStartTime.slice(8, 10) }}日
|
|
|
|
</p>
|
|
|
|
<p v-if="item.trainEndTime">
|
|
|
|
结课时间:{{ item.trainEndTime.slice(0, 4) }}年{{ item.trainEndTime.slice(5, 7) }}月{{
|
|
|
|
item.trainEndTime.slice(8, 10) }}日
|
|
|
|
</p>
|
|
|
|
</view>
|
|
|
|
<div v-if="item.status == 1" class="sign_sataus"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 2" class="sign_sataus"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 3" class="sign_sataus" style="background: #FBA02A;"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 4" class="sign_sataus" style="background: #28D17CFF;"> 开课中 </div>
|
|
|
|
<div v-if="item.status == 5" class="sign_sataus" style="background: #FE5555FF;"> 已结束 </div>
|
|
|
|
</view>
|
|
|
|
<view class="endClass">
|
|
|
|
<view class="reportUrl" @click="uploadReport('cat')">{{ item.reportName }}</view>
|
|
|
|
<view v-show="reportShow(item)" class="uploadBtn" @click="uploadReport">{{ item.reportName ?
|
|
|
|
'覆盖上传报告' : '上传结课报告' }}</view>
|
|
|
|
</view>
|
|
|
|
</div>
|
|
|
|
<view v-if="signuplist.length > 0">
|
|
|
|
<view v-for="(item, key) of signuplist" class="sign_list" :key="key">
|
|
|
|
<view style="display:flex;margin:0 12px 8px 0;justify-content: space-between;align-items: flex-end;">
|
|
|
|
<view class="rightb">
|
|
|
|
{{ item.trainClassName }}
|
|
|
|
</view>
|
|
|
|
<p v-if="item.registrationTime" style="font-size:24rpx;color: #808080;">报名时间:{{ dateFormat(new
|
|
|
|
Date(item.registrationTime)) }} </p>
|
|
|
|
</view>
|
|
|
|
<view class="fline"></view>
|
|
|
|
<view @click="catCourse(item)"
|
|
|
|
style="display: flex;justify-content: space-between;margin: 19px 15px 0 15px;align-items: center;">
|
|
|
|
<view style="color:#333333FF;font-size:13px;line-height:27px;">
|
|
|
|
<p>班级名称:{{ item.trainClassName }}</p>
|
|
|
|
<!-- start_time -->
|
|
|
|
<p v-if="item.trainStartTime">
|
|
|
|
开课日期:{{ item.trainStartTime.slice(0, 4) }}年{{ item.trainStartTime.slice(5, 7) }}月{{
|
|
|
|
item.trainStartTime.slice(8, 10) }}日
|
|
|
|
</p>
|
|
|
|
<p v-if="item.trainEndTime">
|
|
|
|
结课时间:{{ item.trainEndTime.slice(0, 4) }}年{{ item.trainEndTime.slice(5, 7) }}月{{
|
|
|
|
item.trainEndTime.slice(8, 10) }}日
|
|
|
|
</p>
|
|
|
|
</view>
|
|
|
|
<div v-if="item.status == 1" class="sign_sataus"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 2" class="sign_sataus"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 3" class="sign_sataus" style="background: #FBA02A;"> 未开课 </div>
|
|
|
|
<div v-if="item.status == 4" class="sign_sataus" style="background: #28D17CFF;"> 开课中 </div>
|
|
|
|
<div v-if="item.status == 5" class="sign_sataus" style="background: #FE5555FF;"> 已结束 </div>
|
|
|
|
</view>
|
|
|
|
<view class="endClass">
|
|
|
|
<view class="reportUrl" @click="uploadReport('cat')">{{ item.reportName }}</view>
|
|
|
|
<view v-show="reportShow(item)" class="uploadBtn" @click="uploadReport">{{ item.reportName ?
|
|
|
|
'覆盖上传报告' : '上传结课报告' }}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view v-else style="font-size:46rpx;font-weight: bold;color: #9D9D9D; text-align:center;margin-top:100px">
|
|
|
|
<img style="width: 338rpx;height: 254rpx;" src="../../index/testtraining/noregister.png" alt="">
|
|
|
|
<view>暂无报名信息</view>
|
|
|
|
</view>
|
|
|
|
<view style="height:10px;"></view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
const endDay = 2
|
|
|
|
import { dateFormat } from '@/utils/util.js'
|
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
reportShow(v) {
|
|
|
|
return function (val) {
|
|
|
|
const nowTime = new Date().getTime()
|
|
|
|
const endTime = new Date(val.trainEndTime).getTime()
|
|
|
|
const sub = (endTime - nowTime) / (1000 * 60 * 60 * 24)
|
|
|
|
// console.log(sub);
|
|
|
|
if (sub < endDay) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
keyware: '',
|
|
|
|
customActionStyle: {
|
|
|
|
color: '#808080', // 按钮颜色
|
|
|
|
fontSize: '16px' // 按钮字体大小
|
|
|
|
// 其他样式属性
|
|
|
|
},
|
|
|
|
signuplist: [],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
let wxUserInfo = uni.getStorageSync('wxUserInfo');
|
|
|
|
// ${wxUserInfo.phonenumber}
|
|
|
|
if (wxUserInfo) {
|
|
|
|
// let phone='15802995503';
|
|
|
|
this.http.quickGet(`/train/myTrainingList`, true).then(res => {
|
|
|
|
console.log('报名信息--', res)
|
|
|
|
this.signuplist = res.data.rows
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
dateFormat,
|
|
|
|
seacrhko() {
|
|
|
|
|
|
|
|
},
|
|
|
|
// onlineClass() {
|
|
|
|
// uni.navigateTo({
|
|
|
|
// url: `/pages/index/onlineTestCourse/onlineCourseInfo`
|
|
|
|
// })
|
|
|
|
// },
|
|
|
|
signupdetails(id) {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: `/pages/index/testtraining/signup?issueId=${id}&type=1`
|
|
|
|
})
|
|
|
|
},
|
|
|
|
catCourse(state) {
|
|
|
|
console.log(state);
|
|
|
|
// if(state.status == '4'){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: `/pages/personal/myCourse/myCourse?id=${state.trainClassId}&name=${state.trainClassName}`
|
|
|
|
})
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
uploadReport(val) {
|
|
|
|
console.log(val);
|
|
|
|
const url = 'https://www.bjkeyware.com'
|
|
|
|
uni.showModal({
|
|
|
|
title: `请登录PC端${(val === 'cat') ? '查看' : '上传'}`,
|
|
|
|
content: 'PC端网址:' + url,
|
|
|
|
showCancel: false,
|
|
|
|
confirmText: '复制网址',
|
|
|
|
success: function (res) {
|
|
|
|
if (res.confirm) {
|
|
|
|
uni.setClipboardData({
|
|
|
|
data: url,
|
|
|
|
success: function () {
|
|
|
|
uni.showToast({
|
|
|
|
title: '复制成功',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
fail: function () {
|
|
|
|
uni.showToast({
|
|
|
|
title: '复制失败',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
})
|
|
|
|
console.log('用户点击确定')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.navTab {
|
|
|
|
padding: 2vh 13px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.endClass {
|
|
|
|
color: #1F80F2;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
font-size: 24rpx;
|
|
|
|
line-height: 49rpx;
|
|
|
|
margin: 30rpx 0;
|
|
|
|
padding: 25rpx;
|
|
|
|
border-top: 1px solid #99999936;
|
|
|
|
;
|
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
.reportUrl {}
|
|
|
|
|
|
|
|
.uploadBtn {
|
|
|
|
margin-left: 30rpx;
|
|
|
|
background: #EAF3FD;
|
|
|
|
border-radius: 20rpx;
|
|
|
|
border: 1px solid #AAD1FE;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sign_list {
|
|
|
|
width: 100%;
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 10px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
// padding-bottom: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rightb {
|
|
|
|
/* width: 183rpx; */
|
|
|
|
padding: 0 20rpx;
|
|
|
|
height: 54rpx;
|
|
|
|
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
|
|
|
|
border-radius: 9px 0px 46px 0px;
|
|
|
|
color: #FFFFFF;
|
|
|
|
font-size: .8rem;
|
|
|
|
line-height: 54rpx;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.fline {
|
|
|
|
width: 100%;
|
|
|
|
height: 1rpx;
|
|
|
|
border: 1px solid #999999;
|
|
|
|
opacity: 0.15;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sign_sataus {
|
|
|
|
width: 75px;
|
|
|
|
height: 28px;
|
|
|
|
background: #A8AEB6;
|
|
|
|
border-radius: 13px;
|
|
|
|
font-size: 14px;
|
|
|
|
color: #FFFFFF;
|
|
|
|
line-height: 28px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|