guestTravel.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view>
  3. <uni-nav-bar status-bar=true fixed=true left-icon="arrowleft" background-color="#1d5edb" color="#ffffff"
  4. @clickLeft="navigateBack">
  5. <text slot="default" style="text-align: center; flex: 1; font-size: 18px; font-weight: bold;">嘉宾实时行程</text>
  6. </uni-nav-bar>
  7. <view class="guest-container" v-if="guestTravelPoints.length">
  8. <view class="guest-info-header">
  9. <view>
  10. <image :src="guestTravelPoints[0].photoUrl? websiteUrl+guestTravelPoints[0].photo:'../../static/missing-face.png'" mode=""></image>
  11. <text class="guest-name">{{guestTravelPoints[0].applyWay=='en'?guestTravelPoints[0].nameEn:guestTravelPoints[0].name}}</text>
  12. </view>
  13. <view class="legend-list">
  14. <view><text class="legend legend-success"></text> 已完成</view>
  15. <view><text class="legend legend-error"></text> 未完成</view>
  16. <view><text class="legend legend-warning"></text> 待确认</view>
  17. </view>
  18. </view>
  19. <view class="guest-point-list">
  20. <view class="guest-point-list-item" v-for="(item, i) in guestTravelPoints" :key="i">
  21. <text class="status legend" :class="item.travelPointStatus=='0'? 'legend-success': item.travelPointStatus=='1'? 'legend-error': 'legend-warning'"></text>
  22. <view class="guest-right">
  23. <text class="points">{{item.travelPointName}}</text>
  24. <text class="time">{{moment(item.confirmDate).format('YYYY-MM-DD hh:mm:ss')}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="no-data" v-else>
  30. 暂无数据
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data() {
  37. return {
  38. guestBasicData: {},
  39. guestTravelPoints: []
  40. }
  41. },
  42. onLoad(option) {
  43. let that = this;
  44. const eventChannel = this.getOpenerEventChannel();
  45. eventChannel.on('acceptDataFromOpenerPage', function(data) {
  46. that.guestBasicData = data.data;
  47. that.getGuestTravel(data.data.id)
  48. })
  49. },
  50. methods: {
  51. navigateBack(){
  52. uni.navigateBack();
  53. },
  54. getGuestTravel(id){
  55. this.$myRequest({
  56. url: '/meeting/meetingApplys/getGuestTravelPointInfoByGuestId',
  57. data: {
  58. travelPointStatus: '',
  59. guestId: id
  60. }
  61. }).then(res => {
  62. console.log('guestTravelPointInfos',res.data)
  63. this.guestTravelPoints = res.data.guestTravelPointInfos
  64. });
  65. }
  66. }
  67. }
  68. </script>
  69. <style scoped>
  70. .guest-container{
  71. background: #fff;
  72. }
  73. .guest-info-header{
  74. display: flex;
  75. justify-content: space-between;
  76. color: #666;
  77. padding: 20px 20px 0 20px;
  78. line-height: 50px;
  79. }
  80. .guest-info-header image{
  81. width: 50px;
  82. height: 50px;
  83. border-radius: 50%;
  84. vertical-align: middle;
  85. }
  86. .guest-name{
  87. vertical-align: middle;
  88. font-size: 18px;
  89. margin-left: 14px;
  90. }
  91. .guest-point-list{
  92. padding: 0px 20px 20px 20px;
  93. }
  94. .guest-point-list .guest-point-list-item{
  95. height: 40px;
  96. margin-top: 20px;
  97. display: flex;
  98. }
  99. .guest-point-list .status{
  100. display: inline-block;
  101. margin: 15px 18px;
  102. }
  103. .guest-point-list .guest-right{
  104. flex: 1;
  105. display: flex;
  106. background: #ddd;
  107. }
  108. .guest-point-list .points{
  109. display: inline-block;
  110. font-size: 16px;
  111. width: 100px;
  112. text-align: right;
  113. line-height: 40px;
  114. }
  115. .guest-point-list .time{
  116. color: #666;
  117. display: inline-block;
  118. flex: 1;
  119. line-height: 40px;
  120. padding-left: 10px;
  121. }
  122. .legend{
  123. display: inline-block;
  124. width: 10px;
  125. height: 10px;
  126. border-radius: 5px;
  127. margin-right: 10px;
  128. }
  129. .legend-success{
  130. background: #419d34;
  131. }
  132. .legend-error{
  133. background: #dd541a;
  134. }
  135. .legend-warning{
  136. background: #e4c034;
  137. }
  138. .legend-list{
  139. font-size: 14px;
  140. color: #666;
  141. line-height: 20px;
  142. }
  143. .no-data{
  144. text-align: center;
  145. font-size: 18px;
  146. color: #999;
  147. line-height: 100px;
  148. }
  149. </style>