meeting_details.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="container uni-container">
  3. <view class="padding-bottom flex direction-column align-center justify-center ">
  4. <uni-row class="padding-tb">
  5. <uni-col :span="24">
  6. <u--image
  7. :src="meetingEnd == '1' ? SignINExpired : siginIn != '1' ? signOne : signIned"
  8. width="234rpx"
  9. height="128px"
  10. @click="signInClick"
  11. >
  12. <template v-slot:loading>
  13. <u-loading-icon color="red"></u-loading-icon>
  14. </template>
  15. <view slot="error" style="font-size: 24rpx;">加载失败</view>
  16. </u--image>
  17. <text v-if="meetingEnd == 1" style="font-weight:bold; padding-left: 51rpx;;color: #8d8d8d;font-size: 32rpx;">
  18. 会议已结束
  19. </text>
  20. <text
  21. v-else-if="siginIn != '1'"
  22. style="font-weight:bold; padding-left: 51rpx;;color: #4cb2b6;font-size: 32rpx;"
  23. >
  24. 点击签到
  25. </text>
  26. <text
  27. v-else-if="siginIn == '1'"
  28. style="font-weight:bold; padding-left: 65rpx;;color: #f7c41e;font-size: 32rpx;"
  29. >
  30. 已签到
  31. </text>
  32. </uni-col>
  33. </uni-row>
  34. <uni-row class="padding-bottom">
  35. <uni-col :span="24">
  36. <text>{{ formData.name }}</text>
  37. </uni-col>
  38. </uni-row>
  39. </view>
  40. <view class="flex direction-column justify-center">
  41. <uni-row class="demo-uni-row padding-tb-sm border-bottom border-top" :gutter="20" width="100%">
  42. <uni-col :span="12">
  43. <view class="flex direction-column border-right">
  44. <text class="padding-bottom">会议名称</text>
  45. <text style="font-weight: bold;font-size: 30upx;">{{ formData.meetingName }}</text>
  46. </view>
  47. </uni-col>
  48. <uni-col :span="12">
  49. <view class="flex direction-column align-center ">
  50. <text class="padding-bottom">会议主题</text>
  51. <text style="font-weight: bold;font-size: 30upx;">{{ formData.meetingSubject }}</text>
  52. </view>
  53. </uni-col>
  54. </uni-row>
  55. <uni-row class="demo-uni-row padding-tb-sm border-bottom" :gutter="20" width="100%">
  56. <uni-col :span="12">
  57. <view class="flex direction-column border-right">
  58. <text class="padding-bottom">会议时间</text>
  59. <text style="font-weight: bold;font-size: 30upx;">{{ formData.meetingStartTime }}</text>
  60. --
  61. <br />
  62. <text style="font-weight: bold;font-size: 30upx;">{{ formData.meetingEndTime }}</text>
  63. </view>
  64. </uni-col>
  65. <uni-col :span="12">
  66. <view class="flex direction-column align-center ">
  67. <text class="padding-bottom">会议类型</text>
  68. <text style="font-weight: bold;font-size: 30upx;">{{ formData.meetingType }}</text>
  69. </view>
  70. </uni-col>
  71. </uni-row>
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. import {
  77. getMeeting, // 查询会议列表
  78. getMeetingSign, //会议签到
  79. getMeet
  80. } from '@/api/meeting';
  81. let that = null;
  82. import config from '@/config'
  83. const baseUrlImg=config.baseUrlImg
  84. export default {
  85. data() {
  86. return {
  87. formData: {},
  88. formData2: {
  89. id: '',
  90. siginIn: '1',
  91. status: 0,
  92. userId: this.$store.state.user.id
  93. // "orgId":1
  94. },
  95. siginIn: '',
  96. status: '',
  97. signOne: `${baseUrlImg}/metting/sign.png`,
  98. signIned: `${baseUrlImg}/metting/Signed.png`,
  99. SignINExpired: `${baseUrlImg}/metting/SignINExpired.png`,
  100. IsSign: false,
  101. FinalTime: 0,
  102. meetingEnd: '',
  103. pageSize: 20,
  104. // 当前页
  105. pageNo: 1
  106. };
  107. },
  108. onshow() {
  109. },
  110. //目的页面接收
  111. //这里用onshow()也可以
  112. onLoad: function(options) {
  113. var data = options.id;
  114. // this.getData(data);
  115. that = this;
  116. const eventChannel = this.getOpenerEventChannel();
  117. // eventChannel.emit('acceptDataFromOpenedPage', {
  118. // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
  119. eventChannel.on('acceptDataFromOpenerPage', function(val) {
  120. console.log('传送到当前页面的数据 ', val);
  121. that.formData = val;
  122. that.formData2.id = val.meetingDetailDOList[0].id;
  123. // 签到流程判断
  124. var Time = new Date(that.formData.meetingEndTime);
  125. that.FinalTime = Time.getTime();
  126. var currentTime = new Date().getTime();
  127. // 判断结束时间是否小于当前时间 小于则判断是否已经签到
  128. if (that.FinalTime < currentTime) {
  129. // 1 表示显示过期图片
  130. that.meetingEnd = '1';
  131. } else {
  132. const id = that.formData2.id;
  133. getMeet({id:id}).then(res=>{
  134. that.siginIn = res.data.siginIn;
  135. })
  136. }
  137. });
  138. // this.getData();/
  139. },
  140. methods: {
  141. signInClick() {
  142. var SignJson = JSON.stringify(this.formData2);
  143. getMeetingSign(SignJson).then(res => {
  144. // console.log(res);
  145. // this.siginIn='1'
  146. if (res.code==0 ){
  147. this.siginIn='1'
  148. }
  149. });
  150. }
  151. }
  152. };
  153. </script>
  154. <style>
  155. .sign-in {
  156. height: 400rpx;
  157. }
  158. .border-bottom {
  159. border-bottom: 1px solid #cbd5e1;
  160. }
  161. .border-top {
  162. border-top: 1px solid #cbd5e1;
  163. }
  164. .border-right {
  165. border-right: 1px solid #cbd5e1;
  166. }
  167. </style>