online - 副本.vue 3.6 KB

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