index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <view class="app-content">
  3. <img :src="icon" alt="" class="tuku">
  4. <Nav :navname.sync="navname" :navtype="false" :index="index" @clear="clear" :flightNo="searchFlightNo"></Nav>
  5. <flightInfo :flightDetail="flightDetail" @toFlight="toFlight"></flightInfo>
  6. <!-- <view class="times">
  7. <p>{{ newData }}</p>{{ newDataday }}
  8. </view> -->
  9. <view class="content">
  10. <!-- <view class="card" v-if="APP_SORT" @tap="clickOrder('SORT')">
  11. <view class="icon iconfont icon-check-in"></view>
  12. <p>值机</p>
  13. </view> -->
  14. <view class="card" v-if="APP_SORT" @tap="clickOrder('SORT')">
  15. <view class="icon iconfont icon-huiyuan"></view>
  16. <p>分拣</p>
  17. </view>
  18. <view class="card" v-if="APP_LOAD" @tap="clickOrder('LOAD')">
  19. <view class="icon iconfont icon-zhuangche"></view>
  20. <p>装车</p>
  21. </view>
  22. <view class="card" v-if="APP_INFL" @tap="clickOrder('INFL')">
  23. <view class="icon iconfont icon-zhuangjidan"></view>
  24. <p>装机</p>
  25. </view>
  26. <view class="card" v-if="APP_UNLOAD" @tap="clickOrder('UNLOAD')">
  27. <view class="icon iconfont icon-xieji"></view>
  28. <p>卸机</p>
  29. </view>
  30. <view class="card" v-if="APP_ARRIVED" @tap="clickOrder('ARRIVED')">
  31. <view class="icon iconfont icon--landing"></view>
  32. <p>到达</p>
  33. </view>
  34. <view class="card" v-if="APP_EXTRACT" @tap="clickOrder('extract')">
  35. <view class="icon iconfont icon-icon-test-copy"></view>
  36. <p>提取</p>
  37. </view>
  38. <view class="card" v-if="APP_EXTRACT" @tap="clickOrder('express')">
  39. <view class="icon iconfont icon-kuaisuyunxing01"></view>
  40. <p>速运/改签</p>
  41. </view>
  42. <view class="card" v-if="APP_Abnormal" @tap="clickOrder('abnormal')">
  43. <view class="icon iconfont icon-hanglidiushi"></view>
  44. <p>异常登记</p>
  45. </view>
  46. <view class="card" v-if="APP_SORT" @tap="clickOrder('delisting')">
  47. <view class="icon iconfont icon-check-in"></view>
  48. <p>脱牌</p>
  49. </view>
  50. <view class="card" v-if="APP_SORT" @tap="clickOrder('RETURN')">
  51. <view class="icon iconfont icon-xieji"></view>
  52. <p>退运</p>
  53. </view>
  54. <view class="card_no">
  55. </view>
  56. <view class="card_no">
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import Nav from '../../components/header/nav.vue'
  63. import flightInfo from '@/components/flightInfo/flightInfo.vue'
  64. import {
  65. Format
  66. } from '@/components/utils/validate'
  67. export default {
  68. data() {
  69. return {
  70. btnArr:[
  71. {
  72. type:"SORT",
  73. name:"分拣",
  74. },
  75. {
  76. type:"LOAD",
  77. name:"装车",
  78. },
  79. {
  80. type:"INFL",
  81. name:"装机",
  82. },
  83. {
  84. type:"UNLOAD",
  85. name:"卸机",
  86. },
  87. {
  88. type:"ARRIVED",
  89. name:"到达",
  90. },
  91. {
  92. type:"extract",
  93. name:"提取",
  94. },
  95. {
  96. type:"abnormal",
  97. name:"异常登记",
  98. },
  99. ],
  100. APP_SORT: false,
  101. APP_LOAD: false,
  102. APP_INFL: false,
  103. APP_UNLOAD: false,
  104. APP_ARRIVED: false,
  105. APP_EXTRACT: false,
  106. APP_Abnormal: false,
  107. input: '',
  108. main: null,
  109. poll: null,
  110. filter: null,
  111. pusher: null,
  112. intentServer: null,
  113. timeShow: true,
  114. arr: [],
  115. navname: '首页',
  116. icon: 'static/beijing.png',
  117. newData: '',
  118. newDataday: '',
  119. index: 0,
  120. flightDetail: null,
  121. flightNO: null,
  122. airportName: null,
  123. flightDate: null,
  124. outAirport :null,
  125. landAirport :null,
  126. searchFlightNo: ""
  127. }
  128. },
  129. created(option) {
  130. let authList = this.$storage.getJson('authList');
  131. authList.map(item => {
  132. switch (item.auth_ident) {
  133. case "APP_SORT":
  134. this.APP_SORT = true;
  135. break;
  136. case "APP_LOAD":
  137. this.APP_LOAD = true;
  138. break;
  139. case "APP_INFL":
  140. this.APP_INFL = true;
  141. break;
  142. case "APP_UNLOAD":
  143. this.APP_UNLOAD = true;
  144. break;
  145. case "APP_ARRIVED":
  146. this.APP_ARRIVED = true;
  147. break;
  148. case "APP_EXTRACT":
  149. this.APP_EXTRACT = true;
  150. break;
  151. case "APP_Abnormal_registration":
  152. this.APP_Abnormal = true;
  153. break;
  154. default:
  155. break;
  156. }
  157. })
  158. },
  159. onLoad(option) {},
  160. onUnload() {
  161. uni.$off("scancodemsg");
  162. },
  163. onShow() {
  164. uni.$on("scancodemsg", (data) => {
  165. if (data.msg.length > 9) {
  166. uni.navigateTo({
  167. url: "/pages/detail/index?luggageNum=" + data.msg
  168. })
  169. }
  170. });
  171. if (this.$storage.get('airport')) {
  172. this.index = this.$storage.get('airport')
  173. }
  174. if (this.$storage.get('flightDate')) {
  175. this.flightDate = this.$storage.get('flightDate')
  176. }
  177. if (this.$storage.getJson('searchData')) {
  178. this.flightDetail = this.$storage.getJson('searchData')
  179. this.flightNO = this.flightDetail.carrierFlights
  180. this.searchFlightNo = this.flightDetail.carrierFlights
  181. this.flightDate = this.flightDetail.carrierFlightsDate
  182. this.outAirport = this.flightDetail.outAirport
  183. this.landAirport = this.flightDetail.landAirport
  184. }
  185. },
  186. onHide() {
  187. uni.$off("scancodemsg");
  188. },
  189. mounted() {
  190. this.datatime()
  191. },
  192. beforeDestroy() {
  193. // console.log(this.arr[0],this.arr[1])
  194. },
  195. components: {
  196. Nav,
  197. flightInfo
  198. },
  199. methods: {
  200. toFlight() {
  201. uni.navigateTo({
  202. url: "/pages/flightdetails/index"
  203. })
  204. },
  205. clear() {
  206. this.$storage.remove('searchData')
  207. this.flightDetail = null
  208. this.flightNO = null
  209. this.searchFlightNo = ""
  210. this.flightDate = null
  211. },
  212. datatime() {
  213. setInterval(() => {
  214. this.newDataday = Format("yyyy/MM/dd", new Date());
  215. this.newData = Format("hh:mm", new Date());
  216. }, 1000);
  217. },
  218. clickOrder(data) {
  219. if (data == "extract") { //提取
  220. uni.navigateTo({
  221. url: "/pages/extract/index"
  222. })
  223. }
  224. else if(data == "express"){//速运改签
  225. uni.navigateTo({
  226. url: "/pages/express/index?airport=" + this.airportName
  227. })
  228. }
  229. else if (data == "abnormal") { //异常行李
  230. uni.navigateTo({
  231. url: "/pages/abnormal/index?airport=" + this.airportName
  232. })
  233. }else if (data == "delisting") { //脱牌行李
  234. uni.navigateTo({
  235. url: "/pages/delisting/index?airport=" + this.airportName
  236. })
  237. } else {
  238. uni.navigateTo({
  239. url: "/pages/sorting/index?item=" + data + "&flightNO=" + this.flightNO + "&date="+this.flightDate+ "&outAirport="+this.outAirport+ "&landAirport="+this.landAirport
  240. })
  241. }
  242. }
  243. },
  244. }
  245. </script>
  246. <style lang="scss" scoped>
  247. .app-content {
  248. position: relative;
  249. >.tuku {
  250. position: absolute;
  251. z-index: -1;
  252. width: 100%;
  253. top: 0;
  254. }
  255. >.fight {
  256. padding: 0 1.75rem 0 1.75rem;
  257. // height: 3.75rem;
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-around;
  261. margin-top: 1.375rem;
  262. background: #000;
  263. width: 20rem;
  264. box-sizing: border-box;
  265. margin-left: 2rem;
  266. .fight_center {
  267. width: 3rem;
  268. display: flex;
  269. flex-direction: column;
  270. align-items: center;
  271. justify-content: center;
  272. color: rgb(255, 255, 255);
  273. font-family: Noto Sans SC;
  274. font-size: 16px;
  275. line-height: 24px;
  276. font-weight: 700;
  277. >.aircraft {
  278. width: 1.75rem;
  279. height: 1.75rem;
  280. background: url('../../static/hang.png') no-repeat;
  281. background-size: 100% 100%;
  282. }
  283. }
  284. >.fight_card {
  285. display: flex;
  286. flex-direction: column;
  287. align-items: start;
  288. justify-content: center;
  289. >p {
  290. color: rgb(255, 255, 255);
  291. font-family: Noto Sans SC;
  292. font-size: 16px;
  293. line-height: 24px;
  294. font-weight: 700;
  295. }
  296. >span {
  297. color: rgb(255, 255, 255);
  298. font-family: Noto Sans SC;
  299. font-size: 11px;
  300. font-weight: 500;
  301. }
  302. }
  303. }
  304. >.times {
  305. width: 100%;
  306. height: 2.6875rem;
  307. display: flex;
  308. align-items: center;
  309. justify-content: center;
  310. color: rgb(255, 255, 255);
  311. font-family: Noto Sans SC;
  312. font-size: 18px;
  313. font-weight: 700;
  314. margin-top: 10px;
  315. p {
  316. margin-right: .625rem;
  317. }
  318. }
  319. .content {
  320. padding: 0 10px 0 10px;
  321. display: flex;
  322. justify-content: space-around;
  323. flex-wrap: wrap;
  324. .card {
  325. width: 6.5rem;
  326. height: 6.5rem;
  327. /* 卡片渐变 */
  328. background: linear-gradient(188.06deg, rgba(65.49, 109.04, 128.64, 1.00) 3.551%, rgba(38, 68.32, 81.96, 1.00) 110.878%);
  329. box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  330. border-radius: 4px;
  331. margin-bottom: 10px;
  332. display: flex;
  333. flex-direction: column;
  334. justify-content: center;
  335. align-items: center;
  336. .iconfont {
  337. font-family: iconfont;
  338. font-size: 38px;
  339. color: #fff;
  340. margin-bottom: 5px;
  341. }
  342. >p {
  343. color: rgb(255, 255, 255);
  344. font-family: Noto Sans SC;
  345. font-size: 16px;
  346. font-weight: 500;
  347. // margin-bottom: .375rem;
  348. // line-height: 1.6875rem;
  349. }
  350. >span {
  351. color: rgb(255, 255, 255);
  352. font-family: Noto Sans SC;
  353. font-size: 13px;
  354. font-weight: 500;
  355. line-height: 1.1875rem;
  356. }
  357. }
  358. .card_no {
  359. width: 6.5rem;
  360. height: 6.5rem;
  361. }
  362. }
  363. }
  364. </style>