index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  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_top">
  7. <view class="craid">
  8. <view class="craid_data">
  9. <p>HU7412</p>
  10. <span>2023-02-17</span>
  11. </view>
  12. <view class="craid_data">
  13. <p>CTU</p>
  14. <span>12:00:00</span>
  15. </view>
  16. <view class="aircraft"></view>
  17. <view class="craid_data">
  18. <p>CSX</p>
  19. <span>14:23:00</span>
  20. </view>
  21. </view>
  22. <view class="scanning">
  23. <view :class="getFooterClass">
  24. <input class="input" v-model.trim="stratvalue" disabled="true" @tap="locationEntry" type="text"
  25. value=""
  26. placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;"
  27. placeholder="请输入操作位置" />
  28. <view class="log_l"></view>
  29. <view class="log"></view>
  30. </view>
  31. <view :class="getlooterClass">
  32. <input class="input" v-model.trim="endvalue" disabled="true" @tap="baggageEntry" type="text"
  33. value=""
  34. placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;"
  35. placeholder="请输入行李号" />
  36. <view class="log_l"></view>
  37. <view class="log"></view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="content_bootom" :style="{top:dataheight}">
  42. <view class="choice" @touchmove="movetran">
  43. <view :class="action === true ?'handle':'handles'" @tap="clicker">已处理</view>
  44. <view :class="action !== true ?'handle':'handles'" @tap="clicker">未处理</view>
  45. </view>
  46. <scroll-view scroll-y="true" class="scroll-Y">
  47. <view :class="item.types ? 'ups':'up'" v-for="(item, index) in listdate" :key="index"
  48. @touchstart="start" @touchend="(e)=>end(e,item)">
  49. <view class="list" @tap="toDetail">行李编号:{{ item.name }}</view>
  50. <view class="down_up" @tap="up"></view>
  51. <view class="delete">
  52. <view class="log" @click="()=>up(item)"></view>
  53. </view>
  54. </view>
  55. </scroll-view>
  56. <view class="but" v-if="!action" @tap="clickOrder">一键处理</view>
  57. </view>
  58. </view>
  59. <!-- 提示信息和下拉弹窗 -->
  60. <mask-model :headername="headername" :typeShow="typeShow" :tabname="tabname" ref="showMask" btnType="1"
  61. @confirm="confirm" @cancel="cancel" titleColoe="#666666" cancelColor="#666666" confirmColor="#007AFF"
  62. :maskTitle="maskTitle"></mask-model>
  63. </view>
  64. </template>
  65. <script>
  66. import Navs from '../../components/header/navs.vue'
  67. import maskModel from '../../components/mask-model/mask-model.vue'
  68. export default {
  69. data() {
  70. return {
  71. isShow: true,
  72. dataheight: '20.75rem',
  73. scrollTop: 0,
  74. old: {
  75. scrollTop: 0
  76. },
  77. input: '',
  78. main: null,
  79. poll: null,
  80. filter: null,
  81. pusher: null,
  82. intentServer: null,
  83. arr: [],
  84. navname: '分拣',
  85. startcode: '扫码',
  86. stopcode: '扫码',
  87. action: true,
  88. listdate: [{
  89. name: '3880491101',
  90. types: false
  91. },
  92. {
  93. name: '3880491101',
  94. types: false
  95. },
  96. {
  97. name: '3880491101',
  98. types: false
  99. },
  100. {
  101. name: '3880491101',
  102. types: false
  103. },
  104. {
  105. name: '3880491101',
  106. types: false
  107. },
  108. {
  109. name: '3880491101',
  110. types: false
  111. },
  112. {
  113. name: '3880491101',
  114. types: false
  115. },
  116. {
  117. name: '3880491101',
  118. types: false
  119. },
  120. {
  121. name: '3880491101',
  122. types: false
  123. },
  124. {
  125. name: '3880491101',
  126. types: false
  127. },
  128. {
  129. name: '3880491101',
  130. types: false
  131. },
  132. {
  133. name: '3880491101',
  134. types: false
  135. },
  136. {
  137. name: '3880491101',
  138. types: false
  139. }
  140. ],
  141. arr: [], //触发判断
  142. startData: {
  143. clientX: 0,
  144. clientY: 0
  145. },
  146. stratvalue: '', //开始位置
  147. endvalue: '', //结束位置
  148. maskTitle: '该行李不属于当前航班,请选择处理方式。',
  149. tabname: '', //按钮名称
  150. typeShow: true,
  151. headername: '提示信息',
  152. }
  153. },
  154. created(option) {},
  155. onLoad(option) {
  156. this.navname = JSON.parse(decodeURIComponent(option.item))
  157. if (this.navname == '分拣') {
  158. this.tabname = '航班'
  159. }
  160. },
  161. onUnload() {
  162. // this.$refs.showMask.show();
  163. },
  164. onShow() {},
  165. mounted() {
  166. // this.$refs.showMask.show();
  167. // console.log(this.stratvalue.length)
  168. },
  169. computed: {
  170. getFooterClass() {
  171. return this.stratvalue ? 'scanning_cds' : 'scanning_cd'
  172. },
  173. getlooterClass() {
  174. return this.endvalue ? 'scanning_cds' : 'scanning_cd'
  175. }
  176. },
  177. components: {
  178. Navs,
  179. maskModel: maskModel,
  180. },
  181. methods: {
  182. //下拉
  183. up() {
  184. this.typeShow = false
  185. this.maskTitle = '是否确定要拉下该件行李?'
  186. this.headername = '下拉提示'
  187. this.$refs.showMask.show();
  188. },
  189. confirm: function(e) { //确定按钮
  190. console.log('您点击了确定按钮');
  191. },
  192. cancel: function() { //取消按钮
  193. console.log('您点击了取消按钮');
  194. },
  195. toDetail(){
  196. uni.redirectTo({
  197. url: "/pages/detail/index"
  198. })
  199. },
  200. clickOrder() {
  201. uni.redirectTo({
  202. url: "/pages/baggagecheck/index"
  203. })
  204. },
  205. baggageEntry() {
  206. uni.redirectTo({
  207. url: "/pages/baggageEntry/index"
  208. })
  209. },
  210. locationEntry() {
  211. uni.redirectTo({
  212. url: "/pages/locationEntry/index"
  213. })
  214. },
  215. fall() {
  216. uni.switchTab({
  217. url: "/pages/index/index"
  218. })
  219. },
  220. clicker() {
  221. this.action = !this.action
  222. },
  223. movetran(e) {
  224. let arr = uni.getSystemInfoSync().windowHeight;
  225. this.dataheight = (e.changedTouches[0].clientY / 16) + 'rem'
  226. if (e.changedTouches[0].clientY / 16 > 20.75) {
  227. this.dataheight = 20.75 + 'rem'
  228. } else if (e.changedTouches[0].clientY / 16 < 7.3125) {
  229. this.dataheight = 6.3125 + 'rem'
  230. }
  231. },
  232. start(e) {
  233. this.startData.clientX = e.changedTouches[0].clientX;
  234. },
  235. end(e, item) {
  236. const subX = e.changedTouches[0].clientX - this.startData.clientX;
  237. if (subX > 50) {
  238. // console.log('右滑')
  239. item.types = false
  240. } else if (subX < -50) {
  241. item.types = true
  242. // console.log('左滑')
  243. }
  244. },
  245. checkMore(item) {
  246. console.log(item)
  247. }
  248. },
  249. }
  250. </script>
  251. <style lang="scss" scoped>
  252. .app-content {
  253. position: relative;
  254. background: rgb(49, 85, 99);
  255. >.content {
  256. width: 100%;
  257. height: calc(100vh - 5.375rem);
  258. position: relative;
  259. // overflow: hidden;
  260. // background: rgb(49, 85, 99);
  261. >.content_top {
  262. width: 100%;
  263. // background: rgb(49, 85, 99);
  264. padding-bottom: 1.3125rem;
  265. >.craid {
  266. // width: 100%;
  267. height: 5.625rem;
  268. padding: 0 2.5625rem 0 2.5625rem;
  269. display: flex;
  270. justify-content: space-between;
  271. flex-wrap: wrap;
  272. align-items: center;
  273. >.craid_data {
  274. display: flex;
  275. flex-direction: column;
  276. justify-content: center;
  277. align-items: start;
  278. >p {
  279. color: rgb(255, 255, 255);
  280. font-family: Noto Sans SC;
  281. font-size: 18px;
  282. font-weight: 700;
  283. }
  284. >span {
  285. color: rgb(255, 255, 255);
  286. font-family: Noto Sans SC;
  287. font-size: 13px;
  288. font-weight: 500;
  289. }
  290. }
  291. >.aircraft {
  292. width: 1.75rem;
  293. height: 1.75rem;
  294. background: url('../../static/hang.png') no-repeat;
  295. background-size: 100% 100%;
  296. }
  297. }
  298. >.scanning {
  299. height: 12rem;
  300. padding: 0 1.5rem 0 1.5rem;
  301. opacity: 1;
  302. transition: all 3s;
  303. .scanning_cd {
  304. width: 100%;
  305. height: 3rem;
  306. opacity: 1;
  307. transition: all 3s;
  308. background: rgb(59, 103, 123);
  309. margin-top: 1rem;
  310. margin-bottom: .5rem;
  311. border-radius: 4px;
  312. display: flex;
  313. justify-content: center;
  314. align-items: center;
  315. color: rgb(255, 255, 255);
  316. font-family: Noto Sans SC;
  317. font-size: 16px;
  318. >.log {
  319. width: .875rem;
  320. height: .875rem;
  321. background: url('../../static/saoma.png') no-repeat;
  322. background-size: 100% 100%;
  323. margin-left: 1rem;
  324. }
  325. >.log_l {
  326. width: .125rem;
  327. height: 1.3125rem;
  328. margin-left: 4rem;
  329. background: rgb(255, 255, 255);
  330. }
  331. }
  332. .scanning_cds {
  333. width: 100%;
  334. height: 3rem;
  335. opacity: 1;
  336. transition: all 3s;
  337. background: rgb(51, 161, 165);
  338. margin-top: 1rem;
  339. margin-bottom: .5rem;
  340. border-radius: 4px;
  341. display: flex;
  342. justify-content: center;
  343. align-items: center;
  344. color: rgb(255, 255, 255);
  345. font-family: Noto Sans SC;
  346. font-size: 16px;
  347. >.log {
  348. width: .875rem;
  349. height: .875rem;
  350. background: url('../../static/saoma.png') no-repeat;
  351. background-size: 100% 100%;
  352. margin-left: 1rem;
  353. }
  354. >.log_l {
  355. width: .125rem;
  356. height: 1.3125rem;
  357. margin-left: 4rem;
  358. background: rgb(255, 255, 255);
  359. }
  360. }
  361. }
  362. }
  363. >.content_bootom {
  364. width: 100%;
  365. // height: calc(100vh - 20.9375rem - 4.375rem);
  366. padding-bottom: 0;
  367. position: absolute;
  368. bottom: 0;
  369. top: 20.75rem;
  370. border-radius: 6px 6px 0px 0px;
  371. overflow: hidden;
  372. background: rgb(255, 255, 255);
  373. >.choice {
  374. width: 100%;
  375. height: 2.5rem;
  376. display: flex;
  377. background: rgb(240, 241, 243);
  378. >.handle {
  379. width: 50%;
  380. display: flex;
  381. align-items: center;
  382. justify-content: center;
  383. color: rgb(0, 0, 0);
  384. font-family: Noto Sans SC;
  385. font-size: 15px;
  386. font-weight: 700;
  387. border-radius: 6px 6px 0px 0px;
  388. background: rgb(255, 255, 255);
  389. }
  390. >.handles {
  391. width: 50%;
  392. display: flex;
  393. align-items: center;
  394. justify-content: center;
  395. color: rgb(0, 0, 0);
  396. font-family: Noto Sans SC;
  397. font-size: 15px;
  398. font-weight: 700;
  399. }
  400. }
  401. .up {
  402. width: 100%;
  403. display: flex;
  404. align-items: center;
  405. margin-left: 1rem;
  406. border-bottom: 1px solid rgb(238, 238, 238);
  407. // transform: all 3s;
  408. >.down_up {
  409. width: .875rem;
  410. height: .875rem;
  411. background: url('../../static/xia.png') no-repeat;
  412. background-size: 100% 100%;
  413. }
  414. >.list {
  415. width: 97%;
  416. position: relative;
  417. height: 3.75rem;
  418. display: flex;
  419. align-items: center;
  420. transform: all 3s;
  421. right: 0;
  422. color: rgb(0, 0, 0);
  423. font-family: Noto Sans SC;
  424. font-size: 13px;
  425. font-weight: 500;
  426. }
  427. >.delete {
  428. width: 3.75rem;
  429. height: 3.75rem;
  430. background: rgb(237, 101, 101);
  431. display: flex;
  432. align-items: center;
  433. justify-content: center;
  434. position: relative;
  435. right: -3.75rem;
  436. transform: all 3s;
  437. >.log {
  438. width: .875rem;
  439. height: .875rem;
  440. background: url('../../static/vector@1x.png') no-repeat;
  441. background-size: 100% 100%;
  442. }
  443. }
  444. }
  445. .ups {
  446. width: 100%;
  447. display: flex;
  448. align-items: center;
  449. margin-left: 1rem;
  450. border-bottom: 1px solid rgb(238, 238, 238);
  451. // transform: all 3s;
  452. >.down_up {
  453. width: .875rem;
  454. height: .875rem;
  455. position: relative;
  456. right: 1.875rem;
  457. background: url('../../static/xia.png') no-repeat;
  458. background-size: 100% 100%;
  459. }
  460. >.list {
  461. width: 97%;
  462. position: relative;
  463. height: 3.75rem;
  464. display: flex;
  465. align-items: center;
  466. right: 3.75rem;
  467. // right: 0;
  468. color: rgb(0, 0, 0);
  469. font-family: Noto Sans SC;
  470. font-size: 13px;
  471. font-weight: 500;
  472. transform: all 3s;
  473. }
  474. >.delete {
  475. width: 3.75rem;
  476. height: 3.75rem;
  477. background: rgb(237, 101, 101);
  478. display: flex;
  479. align-items: center;
  480. justify-content: center;
  481. position: relative;
  482. right: 1rem;
  483. transform: all 3s;
  484. // right: -3.75rem;
  485. >.log {
  486. width: .875rem;
  487. height: .875rem;
  488. background: url('../../static/vector@1x.png') no-repeat;
  489. background-size: 100% 100%;
  490. }
  491. }
  492. }
  493. .scroll-Y {
  494. // height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
  495. height: calc(100% - 2.5rem - 2.75rem);
  496. }
  497. .but {
  498. width: 20.5625rem;
  499. height: 2.5rem;
  500. 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%);
  501. border-radius: .25rem;
  502. color: rgb(255, 255, 255);
  503. font-family: Noto Sans SC;
  504. font-size: 1rem;
  505. margin: 0 auto;
  506. display: flex;
  507. align-items: center;
  508. justify-content: center;
  509. margin-top: 0.25rem;
  510. margin-bottom: 2.25rem;
  511. }
  512. }
  513. }
  514. }
  515. </style>