index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <template>
  2. <view class="app-content">
  3. <!-- <img src="../../static/beijing.png" alt="" class="tuku"> -->
  4. <Nav :navname.sync="navname" @fall="fall"></Nav>
  5. <view class="content">
  6. <view class="content_top">
  7. <view class="craid">
  8. <view class="name">
  9. <p>航班号</p>
  10. <span>HU7412</span>
  11. </view>
  12. <view class="name">
  13. <p>目的站</p>
  14. <span>CSX</span>
  15. </view>
  16. <view class="name">
  17. <p>航班日期</p>
  18. <span>2023-2-17</span>
  19. </view>
  20. <view class="name">
  21. <p>预计起飞时间</p>
  22. <span>12:00:00</span>
  23. </view>
  24. </view>
  25. <view class="scanning">
  26. <view class="scanning_cd">
  27. <view class="log"></view>
  28. <view class="name">初始位置{{startcode}}</view>
  29. </view>
  30. <view class="scanning_cd">
  31. <view class="log"></view>
  32. <view class="name">结束位置{{stopcode}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="content_bootom" :style="{top:dataheight}">
  37. <view class="choice" @touchmove="movetran">
  38. <view :class="action === true ?'handle':'handles'" @tap="clicker">已处理</view>
  39. <view :class="action !== true ?'handle':'handles'" @tap="clicker">未处理</view>
  40. </view>
  41. <scroll-view scroll-y="true" class="scroll-Y">
  42. <view :class="item.types ? 'ups':'up'" v-for="(item, index) in listdate" :key="index" @touchstart="start" @touchend="(e)=>end(e,item)">
  43. <view class="list">行李编号:{{ item.name }}</view>
  44. <view class="delete"><view class="log" @click="()=>checkMore(item)"></view></view>
  45. </view>
  46. </scroll-view>
  47. <view class="but">手动登记</view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import Nav from '../../components/header/nav.vue'
  54. export default {
  55. data() {
  56. return {
  57. isShow: true,
  58. dataheight: '20.75rem',
  59. scrollTop: 0,
  60. old: {
  61. scrollTop: 0
  62. },
  63. input: '',
  64. main: null,
  65. poll: null,
  66. filter:null,
  67. pusher:null,
  68. intentServer:null,
  69. arr: [],
  70. navname: '分拣',
  71. startcode: '扫码',
  72. stopcode: '扫码',
  73. action: true,
  74. listdate: [{
  75. name: '3880491101',
  76. types: false
  77. },
  78. {
  79. name: '3880491101',
  80. types: false
  81. },
  82. {
  83. name: '3880491101',
  84. types: false
  85. },
  86. {
  87. name: '3880491101',
  88. types: false
  89. },
  90. {
  91. name: '3880491101',
  92. types: false
  93. },
  94. {
  95. name: '3880491101',
  96. types: false
  97. },
  98. {
  99. name: '3880491101',
  100. types: false
  101. },
  102. {
  103. name: '3880491101',
  104. types: false
  105. },
  106. {
  107. name: '3880491101',
  108. types: false
  109. },
  110. {
  111. name: '3880491101',
  112. types: false
  113. },
  114. {
  115. name: '3880491101',
  116. types: false
  117. },
  118. {
  119. name: '3880491101',
  120. types: false
  121. },
  122. {
  123. name: '3880491101',
  124. types: false
  125. }],
  126. arr: [],//触发判断
  127. startData: {
  128. clientX: 0,
  129. clientY: 0
  130. },
  131. }
  132. },
  133. created(option) {
  134. },
  135. onLoad(){
  136. },
  137. onUnload() {
  138. },
  139. onShow() {
  140. },
  141. mounted() {
  142. },
  143. components: {
  144. Nav
  145. },
  146. methods: {
  147. fall () {
  148. uni.switchTab({
  149. url: "/pages/index/index"
  150. })
  151. },
  152. clicker () {
  153. this.action = !this.action
  154. },
  155. movetran (e) {
  156. let arr = uni.getSystemInfoSync().windowHeight;
  157. this.dataheight = (e.changedTouches[0].clientY/16) + 'rem'
  158. if (e.changedTouches[0].clientY/16 > 20.75) {
  159. this.dataheight = 20.75 + 'rem'
  160. } else if (e.changedTouches[0].clientY/16 < 7.3125) {
  161. this.dataheight = 7.3125 + 'rem'
  162. }
  163. },
  164. start(e) {
  165. this.startData.clientX = e.changedTouches[0].clientX;
  166. },
  167. end (e,item) {
  168. const subX = e.changedTouches[0].clientX - this.startData.clientX;
  169. if (subX > 50) {
  170. // console.log('右滑')
  171. item.types = false
  172. } else if (subX < -50) {
  173. item.types = true
  174. // console.log('左滑')
  175. }
  176. },
  177. checkMore (item) {
  178. console.log(item)
  179. }
  180. },
  181. }
  182. </script>
  183. <style lang="scss" scoped>
  184. .app-content{
  185. position: relative;
  186. background: rgb(49, 85, 99);
  187. >.content{
  188. width: 100%;
  189. height: calc(100vh - 4.375rem);
  190. position: relative;
  191. // overflow: hidden;
  192. // background: rgb(49, 85, 99);
  193. >.content_top{
  194. width: 100%;
  195. // background: rgb(49, 85, 99);
  196. padding-bottom: 1.3125rem;
  197. >.craid{
  198. width: 100%;
  199. height: 40%;
  200. display: flex;
  201. justify-content: space-around;
  202. flex-wrap: wrap;
  203. >.name{
  204. width: 50%;
  205. display: flex;
  206. align-items: flex-start;
  207. flex-direction: column;
  208. justify-content: center;
  209. >p{
  210. margin-left: 3.125rem;
  211. color: rgb(255, 255, 255);
  212. font-family: Noto Sans SC;
  213. font-size: .875rem;
  214. margin-bottom: 10px;
  215. }
  216. >span{
  217. margin-left: 3.125rem;
  218. color: rgb(255, 255, 255);
  219. font-family: Noto Sans SC;
  220. font-size: 1.125rem;
  221. }
  222. }
  223. }
  224. >.scanning{
  225. height: 12rem;
  226. padding: 0 1.5rem 0 1.5rem;
  227. opacity: 1;
  228. transition: all 3s;
  229. >.scanning_cd{
  230. width: 100%;
  231. height: 5.5rem;
  232. opacity: 1;
  233. transition: all 3s;
  234. background: rgb(37, 121, 160);
  235. margin-top: 1rem;
  236. margin-bottom: .5rem;
  237. border-radius: 4px;
  238. display: flex;
  239. justify-content: center;
  240. align-items: center;
  241. color: rgb(255, 255, 255);
  242. font-family: Noto Sans SC;
  243. font-size: 16px;
  244. >.log{
  245. width: .875rem;
  246. height: .875rem;
  247. background: url('../../static/saoma.png') no-repeat;
  248. background-size: 100% 100%;
  249. margin-right: .75rem;
  250. }
  251. }
  252. }
  253. }
  254. >.content_bootom{
  255. width: 100%;
  256. // height: calc(100vh - 20.9375rem - 4.375rem);
  257. padding-bottom: 0;
  258. position: absolute;
  259. bottom: 0;
  260. top: 20.75rem;
  261. border-radius: 6px 6px 0px 0px;
  262. overflow: hidden;
  263. background: rgb(255, 255, 255);
  264. >.choice{
  265. width: 100%;
  266. height: 2.5rem;
  267. display: flex;
  268. background: rgb(240, 241, 243);
  269. >.handle{
  270. width: 50%;
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. color: rgb(0, 0, 0);
  275. font-family: Noto Sans SC;
  276. font-size: 15px;
  277. font-weight: 700;
  278. border-radius: 6px 6px 0px 0px;
  279. background: rgb(255, 255, 255);
  280. }
  281. >.handles{
  282. width: 50%;
  283. display: flex;
  284. align-items: center;
  285. justify-content: center;
  286. color: rgb(0, 0, 0);
  287. font-family: Noto Sans SC;
  288. font-size: 15px;
  289. font-weight: 700;
  290. }
  291. }
  292. .up{
  293. width: 100%;
  294. display: flex;
  295. margin-left: 1rem;
  296. border-bottom: 1px solid rgb(238, 238, 238);
  297. // transform: all 3s;
  298. >.list{
  299. width: 100%;
  300. position: relative;
  301. height: 3.75rem;
  302. display: flex;
  303. align-items: center;
  304. transform: all 3s;
  305. right: 0;
  306. color: rgb(0, 0, 0);
  307. font-family: Noto Sans SC;
  308. font-size: 13px;
  309. font-weight: 500;
  310. }
  311. >.delete{
  312. width: 3.75rem;
  313. height: 3.75rem;
  314. background: rgb(237, 101, 101);
  315. display: flex;
  316. align-items: center;
  317. justify-content: center;
  318. position: relative;
  319. right: -3.75rem;
  320. transform: all 3s;
  321. >.log{
  322. width: .875rem;
  323. height: .875rem;
  324. background: url('../../static/vector@1x.png') no-repeat;
  325. background-size: 100% 100%;
  326. }
  327. }
  328. }
  329. .ups{
  330. width: 100%;
  331. display: flex;
  332. margin-left: 1rem;
  333. border-bottom: 1px solid rgb(238, 238, 238);
  334. // transform: all 3s;
  335. >.list{
  336. width: 100%;
  337. position: relative;
  338. height: 3.75rem;
  339. display: flex;
  340. align-items: center;
  341. right: 3.75rem;
  342. // right: 0;
  343. color: rgb(0, 0, 0);
  344. font-family: Noto Sans SC;
  345. font-size: 13px;
  346. font-weight: 500;
  347. transform: all 3s;
  348. }
  349. >.delete{
  350. width: 3.75rem;
  351. height: 3.75rem;
  352. background: rgb(237, 101, 101);
  353. display: flex;
  354. align-items: center;
  355. justify-content: center;
  356. position: relative;
  357. right: 1rem;
  358. transform: all 3s;
  359. // right: -3.75rem;
  360. >.log{
  361. width: .875rem;
  362. height: .875rem;
  363. background: url('../../static/vector@1x.png') no-repeat;
  364. background-size: 100% 100%;
  365. }
  366. }
  367. }
  368. .scroll-Y {
  369. height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
  370. }
  371. .but{
  372. width: 20.5625rem;
  373. height: 2.75rem;
  374. background: linear-gradient(177.56deg, rgba(54.04,157.79,205.96,1) -33.78%,rgba(59.83,102.58,194.93,1) 173%);
  375. border-radius: .25rem;
  376. color: rgb(255, 255, 255);
  377. font-family: Noto Sans SC;
  378. font-size: 1rem;
  379. margin: 0 auto;
  380. display: flex;
  381. align-items: center;
  382. justify-content: center;
  383. margin-top: 2.25rem;
  384. margin-bottom: 2.25rem;
  385. }
  386. }
  387. }
  388. }
  389. </style>