index.vue 12 KB

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