meeting_details.vue 4.8 KB

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