index.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <view class="app-content">
  3. <!-- <img src="../../static/beijing.png" alt="" class="tuku"> -->
  4. <Navs :navname.sync="navname" @fall="fall"></Navs>
  5. <view class="content">
  6. <view class="content_bootom" style="top:0">
  7. <scroll-view scroll-y="true" class="scroll-Y">
  8. <view class="up" v-for="(item, index) in listdata" :key="index">
  9. <view class="list" @tap="toDetail(item.luggageNum)">
  10. <p>行李编号:{{ item.luggageNum }}</p>
  11. </view>
  12. <view :class="item.exception_type != null?'error':'normal'">{{item.exception_type!=null?item.exception_name:"正常"}}</view>
  13. </view>
  14. </scroll-view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import Navs from '../../components/header/navs.vue'
  21. export default {
  22. data() {
  23. return {
  24. isShow: true,
  25. navname: '异常行李',
  26. action: true,
  27. listdata:[],
  28. exceptionList:[
  29. {
  30. "type":null,
  31. "name":"非异常行李"
  32. },
  33. {
  34. "type":"DPR",
  35. "name":"破损"
  36. },
  37. {
  38. "type":"AHL",
  39. "name":"少收"
  40. },
  41. {
  42. "type":"OHD",
  43. "name":"多收"
  44. }
  45. ],
  46. exceptionNameList:["非异常行李","破损","少收","多收"],
  47. airport:null
  48. }
  49. },
  50. created(option) {},
  51. onLoad(option) {
  52. this.airport = option.airport
  53. this.getluggageList(this.$storage.get("airportName"))
  54. },
  55. onUnload() {
  56. uni.$off("scancodemsg");
  57. },
  58. onShow() {
  59. uni.$on("scancodemsg", (data) => {
  60. if (data.msg.length > 9) {
  61. uni.navigateTo({
  62. url: "/pages/baggagecheck/index?luggageNum="+data.msg
  63. })
  64. }
  65. });
  66. },
  67. onHide() {
  68. },
  69. mounted() {
  70. },
  71. computed: {
  72. },
  73. components: {
  74. Navs,
  75. },
  76. methods: {
  77. async getluggageList(airport){
  78. let data = {
  79. "serviceId": 3006,
  80. "dataContent": [{
  81. "outAirport": airport
  82. }],
  83. "event": "0"
  84. }
  85. await this.$http.httpPost('/openApi/query', data).then(res => {
  86. console.log(res)
  87. if (res.code == "0") {
  88. res.returnData.map(item => {
  89. this.exceptionList.map(item2 => {
  90. if(item.exception_type == item2.type){
  91. item["exception_name"] = item2.name
  92. }
  93. })
  94. })
  95. this.listdata = res.returnData;
  96. }
  97. })
  98. },
  99. toDetail(luggageNum){
  100. this.currentLuggageNum = luggageNum;
  101. uni.navigateTo({
  102. url: "/pages/detail/index?luggageNum="+this.currentLuggageNum
  103. })
  104. },
  105. fall() {
  106. uni.navigateBack({
  107. delta:1
  108. })
  109. }
  110. },
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .app-content {
  115. position: relative;
  116. background: rgb(49, 85, 99);
  117. >.content {
  118. width: 100%;
  119. height: calc(100vh - 5.375rem);
  120. position: relative;
  121. // overflow: hidden;
  122. // background: rgb(49, 85, 99);
  123. >.content_top {
  124. width: 100%;
  125. // background: rgb(49, 85, 99);
  126. padding-bottom: 1.3125rem;
  127. >.craid {
  128. // width: 100%;
  129. height: 5.625rem;
  130. padding: 0 2.5625rem 0 2.5625rem;
  131. display: flex;
  132. justify-content: space-between;
  133. flex-wrap: wrap;
  134. align-items: center;
  135. >.craid_data {
  136. display: flex;
  137. flex-direction: column;
  138. justify-content: center;
  139. align-items: start;
  140. >p {
  141. color: rgb(255, 255, 255);
  142. font-family: Noto Sans SC;
  143. font-size: 18px;
  144. font-weight: 700;
  145. }
  146. >span {
  147. color: rgb(255, 255, 255);
  148. font-family: Noto Sans SC;
  149. font-size: 13px;
  150. font-weight: 500;
  151. }
  152. }
  153. >.aircraft {
  154. width: 1.75rem;
  155. height: 1.75rem;
  156. background: url('../../static/hang.png') no-repeat;
  157. background-size: 100% 100%;
  158. }
  159. }
  160. >.scanning {
  161. height: 12rem;
  162. padding: 0 1.5rem 0 1.5rem;
  163. opacity: 1;
  164. transition: all 3s;
  165. .scanning_cd {
  166. width: 100%;
  167. height: 3rem;
  168. opacity: 1;
  169. transition: all 3s;
  170. background: rgb(59, 103, 123);
  171. margin-top: 1rem;
  172. margin-bottom: .5rem;
  173. border-radius: 4px;
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. color: rgb(255, 255, 255);
  178. font-family: Noto Sans SC;
  179. font-size: 16px;
  180. >.log {
  181. width: .875rem;
  182. height: .875rem;
  183. background: url('../../static/saoma.png') no-repeat;
  184. background-size: 100% 100%;
  185. margin-left: 1rem;
  186. }
  187. >.log_l {
  188. width: .125rem;
  189. height: 1.3125rem;
  190. margin-left: 4rem;
  191. background: rgb(255, 255, 255);
  192. }
  193. }
  194. .scanning_cds {
  195. width: 100%;
  196. height: 3rem;
  197. opacity: 1;
  198. transition: all 3s;
  199. background: rgb(51, 161, 165);
  200. margin-top: 1rem;
  201. margin-bottom: .5rem;
  202. border-radius: 4px;
  203. display: flex;
  204. justify-content: center;
  205. align-items: center;
  206. color: rgb(255, 255, 255);
  207. font-family: Noto Sans SC;
  208. font-size: 16px;
  209. >.log {
  210. width: .875rem;
  211. height: .875rem;
  212. background: url('../../static/saoma.png') no-repeat;
  213. background-size: 100% 100%;
  214. margin-left: 1rem;
  215. }
  216. >.log_l {
  217. width: .125rem;
  218. height: 1.3125rem;
  219. margin-left: 4rem;
  220. background: rgb(255, 255, 255);
  221. }
  222. }
  223. }
  224. }
  225. >.content_bootom {
  226. width: 100%;
  227. // height: calc(100vh - 20.9375rem - 4.375rem);
  228. padding-bottom: 0;
  229. position: absolute;
  230. bottom: 0;
  231. top: 20.75rem;
  232. // border-radius: 6px 6px 0px 0px;
  233. overflow: hidden;
  234. background: rgb(255, 255, 255);
  235. padding: 0 10px;
  236. box-sizing: border-box;
  237. .up {
  238. width: 100%;
  239. display: flex;
  240. align-items: center;
  241. justify-content: space-between;
  242. margin-left: 1rem;
  243. border-bottom: 1px solid rgb(238, 238, 238);
  244. // transform: all 3s;
  245. >.down_up {
  246. width: .875rem;
  247. height: .875rem;
  248. background: url('../../static/xia.png') no-repeat;
  249. background-size: 100% 100%;
  250. }
  251. >.error{
  252. width: 60px;
  253. color:red
  254. }
  255. >.normal{
  256. width: 60px;
  257. color:#4682b4
  258. }
  259. >.list {
  260. width: 70%;
  261. position: relative;
  262. height: 3.75rem;
  263. display: flex;
  264. align-items: center;
  265. transform: all 3s;
  266. right: 0;
  267. color: rgb(0, 0, 0);
  268. font-family: Noto Sans SC;
  269. font-size: 13px;
  270. font-weight: 500;
  271. }
  272. >.delete {
  273. width: 3.75rem;
  274. height: 3.75rem;
  275. background: rgb(237, 101, 101);
  276. display: flex;
  277. align-items: center;
  278. justify-content: center;
  279. position: relative;
  280. right: -3.75rem;
  281. transform: all 3s;
  282. >.log {
  283. width: .875rem;
  284. height: .875rem;
  285. background: url('../../static/vector@1x.png') no-repeat;
  286. background-size: 100% 100%;
  287. }
  288. }
  289. }
  290. .scroll-Y {
  291. // height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
  292. height: calc(100% - 2.5rem - 2.75rem);
  293. }
  294. .but {
  295. width: 20.5625rem;
  296. height: 2.5rem;
  297. background: linear-gradient(179.10deg, rgba(51, 161, 165, 1.00) 11.326%, rgba(59, 111, 142, 1.00) 119.032%, rgba(59, 111, 142, 1.00) 119.032%, rgba(59, 111, 142, 1.00) 119.032%);
  298. border-radius: .25rem;
  299. color: rgb(255, 255, 255);
  300. font-family: Noto Sans SC;
  301. font-size: 1rem;
  302. margin: 0 auto;
  303. display: flex;
  304. align-items: center;
  305. justify-content: center;
  306. margin-top: 0.25rem;
  307. margin-bottom: 2.25rem;
  308. }
  309. }
  310. }
  311. }
  312. </style>