flightInfo.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <template>
  2. <view class="flightBox">
  3. <view class="flight" v-if="flightDetail">
  4. <view class="top">
  5. <view class="flightNo">
  6. {{flightDetail.carrierFlights}}
  7. </view>
  8. <view class="flightNo">
  9. {{flightDetail.carrierFlightsDate}}
  10. </view>
  11. </view>
  12. <view class="flightInfo" @tap="toFlight()">
  13. <view class="fight_card start">
  14. <p>{{flightDetail.outAirport}}</p>
  15. <span>{{flightDetail.scheduleTakeOffTime?flightDetail.scheduleTakeOffTime:"-"}}</span>
  16. </view>
  17. <view class="fight_center">
  18. <view class="type">
  19. {{flightDetail.normalState}}
  20. </view>
  21. <view class="aircraft"></view>
  22. </view>
  23. <view class="fight_card end">
  24. <p>{{flightDetail.landAirport}}</p>
  25. <span>{{flightDetail.scheduleLandInTime?flightDetail.scheduleLandInTime:"-"}}</span>
  26. </view>
  27. </view>
  28. <view class="foot" v-if="isSite!=''">
  29. <view :class="isSite=='LOAD'?'setSite':'containerNo'">
  30. <view class="">
  31. 位置:{{site}}
  32. </view>
  33. <view class="" @click="showBox('site')">
  34. <uni-icons type="compose" color="#fff" size="24"></uni-icons>
  35. </view>
  36. </view>
  37. <view class="passenger_cabin" v-if="isSite=='LOAD'">
  38. <view class="">
  39. 仓位:{{passenger_cabin}}
  40. </view>
  41. <view class="" @click="showBox('passenger_cabin')">
  42. <uni-icons type="compose" color="#fff" size="24"></uni-icons>
  43. </view>
  44. </view>
  45. <view class="containerNo" v-if="isSite=='LOAD'">
  46. <view class="">
  47. 容器:{{containerNo}}
  48. </view>
  49. <view class="" @click="showBox('containerNo')">
  50. <uni-icons type="compose" color="#fff" size="24"></uni-icons>
  51. </view>
  52. </view>
  53. <view class="luggageNo">
  54. <view class="">
  55. 录入行李:{{luggageNo}}
  56. </view>
  57. <view class="" @click="showBox('luggageNo')">
  58. <uni-icons type="compose" color="#fff" size="24"></uni-icons>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="flight" v-else>
  64. <view class="noMore">
  65. 暂无航班信息
  66. </view>
  67. </view>
  68. <view class="">
  69. <uni-popup ref="inputDialog" type="dialog">
  70. <uni-popup-dialog ref="inputClose" mode="input" title="请扫描或输入" value="" placeholder="请输入内容"
  71. @confirm="dialogInputConfirm"></uni-popup-dialog>
  72. </uni-popup>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. name: "flifgtInfo",
  79. data() {
  80. return {
  81. type:""
  82. };
  83. },
  84. props: {
  85. flightDetail: {
  86. type: Object,
  87. default: null
  88. },
  89. isSite: {
  90. type: String,
  91. default: ''
  92. },
  93. site: {
  94. type: String,
  95. default: "-"
  96. },
  97. containerNo: {
  98. type: String,
  99. default: ""
  100. },
  101. passenger_cabin: {
  102. type: String,
  103. default: ""
  104. },
  105. luggageNo: {
  106. type: String,
  107. default: ""
  108. },
  109. },
  110. methods: {
  111. toFlight: function() {
  112. this.$emit("toFlight", true)
  113. },
  114. showBox: function(val) {
  115. this.type = val;
  116. this.$refs.inputDialog.open()
  117. },
  118. dialogInputConfirm:function(val){
  119. this.$emit('setVal',val,this.type)
  120. this.$refs.inputDialog.close()
  121. }
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. .flightBox {
  127. width: 100%;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. padding: 1rem 15px 1rem 15px;
  132. box-sizing: border-box;
  133. >.flight {
  134. width: 100%;
  135. min-height: 96px;
  136. background: rgba(0, 0, 0, 0.25);
  137. border-radius: 5px;
  138. padding: 5px 10px;
  139. .top {
  140. height: 26px;
  141. width: 100%;
  142. display: flex;
  143. align-items: center;
  144. justify-content: space-between;
  145. border-bottom: 1px solid #333;
  146. .flightNo {
  147. color: rgb(255, 255, 255);
  148. font-family: Noto Sans SC;
  149. font-size: 16px;
  150. line-height: 24px;
  151. font-weight: 700;
  152. }
  153. .fightDate {
  154. color: rgb(255, 255, 255);
  155. font-family: Noto Sans SC;
  156. font-size: 16px;
  157. line-height: 24px;
  158. font-weight: 700;
  159. }
  160. }
  161. .flightInfo {
  162. width: 100%;
  163. display: flex;
  164. align-items: center;
  165. justify-content: space-around;
  166. height: 70px;
  167. >.fight_card {
  168. width: 33.3%;
  169. display: flex;
  170. flex-direction: column;
  171. align-items: flex-start;
  172. justify-content: center;
  173. >p {
  174. color: rgb(255, 255, 255);
  175. font-family: Noto Sans SC;
  176. font-size: 16px;
  177. line-height: 24px;
  178. font-weight: 700;
  179. }
  180. >span {
  181. color: rgb(255, 255, 255);
  182. font-family: Noto Sans SC;
  183. font-size: 13px;
  184. font-weight: 500;
  185. }
  186. }
  187. .end {
  188. display: flex;
  189. flex-direction: column;
  190. align-items: flex-end;
  191. justify-content: center;
  192. }
  193. .fight_center {
  194. width: 33.3%;
  195. display: flex;
  196. flex-direction: column;
  197. align-items: center;
  198. justify-content: center;
  199. color: rgb(255, 255, 255);
  200. font-family: Noto Sans SC;
  201. font-size: 16px;
  202. line-height: 24px;
  203. font-weight: 700;
  204. >.aircraft {
  205. width: 1.75rem;
  206. height: 1.75rem;
  207. background: url('../../static/hang.png') no-repeat;
  208. background-size: 100% 100%;
  209. }
  210. }
  211. }
  212. .foot {
  213. border-top: 1px solid #333;
  214. width: 100%;
  215. padding: 5px;
  216. color: #fff;
  217. display: flex;
  218. flex-direction: row;
  219. flex-wrap: wrap;
  220. justify-content: space-between;
  221. box-sizing: border-box;
  222. .setSite {
  223. width: 50%;
  224. display: flex;
  225. flex-direction: row;
  226. justify-content: space-between;
  227. padding: 5px 0;
  228. box-sizing: border-box;
  229. }
  230. .containerNo {
  231. width: 100%;
  232. display: flex;
  233. flex-direction: row;
  234. justify-content: space-between;
  235. padding: 5px 0;
  236. box-sizing: border-box;
  237. }
  238. .passenger_cabin {
  239. width: 45%;
  240. display: flex;
  241. flex-direction: row;
  242. justify-content: space-between;
  243. padding: 5px 0;
  244. box-sizing: border-box;
  245. }
  246. .luggageNo {
  247. width: 100%;
  248. display: flex;
  249. flex-direction: row;
  250. justify-content: space-between;
  251. padding: 5px 0;
  252. box-sizing: border-box;
  253. }
  254. }
  255. .noMore {
  256. display: flex;
  257. align-items: center;
  258. justify-content: center;
  259. color: rgb(255, 255, 255);
  260. font-family: Noto Sans SC;
  261. font-size: 16px;
  262. line-height: 24px;
  263. font-weight: 700;
  264. min-height: 96px;
  265. }
  266. }
  267. }
  268. </style>