online.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="online">
  3. <view class="statistics u-flex u-row-between">
  4. <view class="statistics-item">
  5. <view class="up">已看课程</view>
  6. <view class="down"><text>{{rate.play}}</text> 节</view>
  7. </view>
  8. <view class="statistics-item">
  9. <view class="up">还需观看</view>
  10. <view class="down"><text>{{rate.playNot}}</text> 节</view>
  11. </view>
  12. </view>
  13. <view class="content">
  14. <!-- <u-tabs ref="otabs" :list="onlineTabs" :is-scroll="false" :current="onlineTabIndex" @change="onlineTabChange"></u-tabs> -->
  15. <view class="instructions" v-if="onlineTabIndex==0">
  16. <view class="text">
  17. 培训内容包括单不限于思想政治教育,法律法规政策介绍,就业创业指导,心里引导,求职技巧指导,服务项目指引等。
  18. </view>
  19. <!-- <image src="../../../static/img/instructions-01.png" mode=""></image> -->
  20. <!-- <image src="../../../static/img/instructions-02.png" mode=""></image> -->
  21. <view class="catalog f-padding">
  22. <view
  23. class="catalog-item u-flex"
  24. :class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
  25. v-for="(item,index) in onlineData" :key="item.id+index"
  26. @click="catalogItemClick(item)">
  27. <view class="number">{{index + 1}}.</view>
  28. <view class="name">{{item.adaptName}}</view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- <view class="catalog f-padding" v-if="onlineTabIndex==1">
  33. <view
  34. class="catalog-item u-flex"
  35. :class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
  36. v-for="(item,index) in onlineData" :key="item.id+index"
  37. @click="catalogItemClick(item)">
  38. <view class="number">{{index + 1}}.</view>
  39. <view class="name">{{item.adaptName}}</view>
  40. </view>
  41. </view> -->
  42. </view>
  43. <u-bottom>
  44. <view slot="content" class="status-btn fix-bottom">
  45. 学习状态:{{rate.status|verifyStatusFilter}}
  46. </view>
  47. </u-bottom>
  48. </view>
  49. </template>
  50. <script>
  51. export default{
  52. name: 'onlineTraining',
  53. props:{
  54. onlineData: {
  55. type: Array,
  56. default: function() {
  57. return []
  58. }
  59. },
  60. rate:{
  61. type:Object,
  62. default: function() {
  63. return new Object()
  64. }
  65. }
  66. },
  67. data(){
  68. return{
  69. onlineTabs: [{name: '课程说明'},{name:'课程视频'}],
  70. onlineTabIndex:0,
  71. catalogList:[]
  72. }
  73. },
  74. onLoad(){
  75. },
  76. onShow(){
  77. },
  78. filters: {
  79. verifyStatusFilter(value) {
  80. if (value === 0) {
  81. return '未全部完成';
  82. }else if(value === 1){
  83. return '已全部完成';
  84. }else {
  85. return '未知';
  86. }
  87. },
  88. },
  89. methods:{
  90. onlineTabChange(index){
  91. this.onlineTabIndex = index;
  92. },
  93. catalogItemClick(item){
  94. this.$u.route({
  95. url: 'pages/basicTraining/basicTrainingDetails/basicTrainingDetails',
  96. params: {
  97. id: item.id
  98. }
  99. });
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .online{margin: 24rpx;}
  106. .statistics{text-align: center;background-color: #fff;border-radius: 8rpx;padding: 24rpx;margin-bottom: 24rpx;}
  107. .statistics-item{width: 50%;}
  108. .statistics-item .up{font-size: 30rpx;color: #444;}
  109. .statistics-item .down{color: #969696;}
  110. .statistics-item .down text{font-weight: bold;margin-right: 5rpx;}
  111. .catalog{background-color: #fff;font-size: 36rpx;padding-bottom: 24rpx;}
  112. .catalog-item{margin-bottom: 24rpx;}
  113. .catalog-item.unstudy{}
  114. .catalog-item.studying{color: #e87c7c;}
  115. .catalog-item.studyed{color: #c5c5c5;}
  116. .catalog-item .number{margin-right: 15rpx;}
  117. .content{background-color: #fff;}
  118. .instructions .text{padding: 24rpx;color: #969696;}
  119. .instructions image{width: 100%;}
  120. .status-btn{background-color: #4433d9;color: #fff;margin: 0 24rpx;padding: 24rpx;border-radius: 8rpx;}
  121. // @import './online.scss'
  122. </style>