myOnlineSignup.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="">
  3. <view class="offline-signup-list" v-if="tableData.length && meetingInfoArray.length">
  4. <view class="offline-signup-list-item" v-for="(item, index) in tableData" :key="index">
  5. <view class="conference-title">{{ array2Obj(item.meetingId, $i18n.locale=='en'?'meetingNameEn':'meetingName') }}</view>
  6. <view class="signup-info">
  7. <view>
  8. <text class="signup-info-label">{{$i18n.locale=='en'?'ApplyName':'报名人员:'}}</text>
  9. <text class="signup-info-value">{{item.name}}</text></view>
  10. <view>
  11. <text class="signup-info-label">{{$i18n.locale=='en'?'ApplyDate':'报名时间:'}}</text>
  12. <text class="signup-info-value">{{moment(item.createDate).format('YYYY-MM-DD HH:mm')}}</text>
  13. </view>
  14. <view>
  15. <text class="signup-info-label">{{$i18n.locale=='en'?'MeetingDate':'会议时间:'}}</text>
  16. <text class="signup-info-value">
  17. {{moment(array2Obj(item.meetingId, 'meetingStartDate')).format('YYYY-MM-DD')}} ~ {{moment(array2Obj(item.meetingId, 'meetingEndDate')).format('YYYY-MM-DD')}}
  18. </text>
  19. </view>
  20. </view>
  21. <view class="approval-state">{{$i18n.locale=='en'? 'Registered': '报名成功'}}</view>
  22. </view>
  23. </view>
  24. <view class="nodata-box" v-else>
  25. <image src="@/static/img/public/7.png" mode=""></image>
  26. <text>{{$i18n.locale=='en'? 'No Data': '暂无数据'}}</text>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. tableData: [],
  35. meetingInfoArray: [],
  36. userId: JSON.parse(uni.getStorageSync('user')).id,
  37. }
  38. },
  39. mounted() {
  40. // console.log(JSON.parse(uni.getStorageSync('user')))
  41. this.getMeetingInfo();
  42. this.getApplyHistory();
  43. },
  44. methods: {
  45. array2Obj(id, attr){
  46. let targetConference = this.meetingInfoArray.filter(item=>{
  47. return id==item.id;
  48. })
  49. // console.log('targetConference',targetConference)
  50. return targetConference[0][attr];
  51. },
  52. async getMeetingInfo() {
  53. const res = await this.$myRequest({
  54. url: '/meeting/meetingBasicInfos/'
  55. });
  56. this.meetingInfoArray = res.data.meetingBasicInfos;
  57. // console.log('this.meetingInfoArray', this.tableData)
  58. },
  59. async getApplyHistory(){
  60. await this.$myRequest({
  61. url: '/meeting/meetingApplyOnlines',
  62. data: {
  63. pageNo: '',
  64. // auditStatusDict: '',
  65. createBy: this.userId
  66. }
  67. }).then(res => {
  68. this.tableData = res.data.meetingApplyOnlines || [];
  69. // console.log('lllllllllll',res)
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style scoped>
  76. .offline-signup-list{
  77. padding-top: 10px;
  78. }
  79. .offline-signup-list-item{
  80. background: #FFFFFF;
  81. color: #666;
  82. padding: 10px;
  83. position: relative;
  84. overflow: hidden;
  85. margin-top: 10px;
  86. }
  87. .conference-title{
  88. width: 80%;
  89. font-size: 18px;
  90. font-weight: bold;
  91. padding: 16px 0;
  92. }
  93. .signup-info{
  94. padding: 0 10px;
  95. }
  96. .signup-info-label{
  97. color: #999;
  98. padding-right: 10px;
  99. line-height: 30px;
  100. }
  101. .approval-state{
  102. position: absolute;
  103. top: 0;
  104. right: -100px;
  105. font-size: 14px;
  106. color: #FFFFFF;
  107. line-height: 28px;
  108. width: 200px;
  109. text-align: center;
  110. font-weight: bold;
  111. transform: rotate(45deg) translate(-10px, 30px);
  112. transform-origin: 50% 50%;
  113. background: #03b6b3;
  114. box-shadow: 0 4px 4px #5ddedd;
  115. }
  116. .nodata-box{
  117. text-align: center;
  118. padding-top: 50px;
  119. }
  120. .nodata-box image{
  121. width: 60%;
  122. /* height: 200px; */
  123. }
  124. .nodata-box text{
  125. display: block;
  126. font-size: 20px;
  127. color: #CCE6FF;
  128. line-height: 40px;
  129. }
  130. </style>