illegalParking.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="car">
  3. <view class="cartop">
  4. <view class="topa flexc">
  5. <image :src="reset" class="resetimg" @click="getReset"></image>
  6. <picker mode="date" @change='bindDateChangea'>
  7. <view class="chekt flexc">
  8. <view>{{cxrq|| "选择日期"}}</view>
  9. <image :src="up"></image>
  10. </view>
  11. </picker>
  12. <view class="search flexc">
  13. <image :src="search"></image>
  14. <!-- confirm-type="search" @confirm="getConfirm" -->
  15. <input placeholder="请输入车牌号进行搜索" v-model="text"/>
  16. <view class="btn" @click="getConfirm">搜索</view>
  17. </view>
  18. </view>
  19. <view class="tabtop flexc">
  20. <view class="tabt" :class="ttopval==ite.val?'act':''" v-for="(ite,idx) in ttoplist" :key="idx" @click="getTabtop(ite.val)">{{ite.tit}}</view>
  21. </view>
  22. <!-- <view class="tablst flexc">
  23. <view class="tabs" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
  24. </view> -->
  25. </view>
  26. <!-- 列表 -->
  27. <view class="carlists mt12">
  28. <car-list :datainfo="list" :topval="ttopval" :wtdt="wtdt" type='carpark'></car-list>
  29. </view>
  30. <view class="fbtn" @click="getCheck">违停登记</view>
  31. <loading></loading>
  32. </view>
  33. </template>
  34. <script>
  35. import config from '@/config'
  36. const baseUrl = config.baseUrl
  37. import carList from "@/work/components/car/list.vue"
  38. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  39. export default{
  40. components:{carList},
  41. data(){
  42. return{
  43. reset:require('@/work/static/car/reset.png'),
  44. up:require('@/work/static/car/up.png'),
  45. car:require('@/work/static/car/car.png'),
  46. cara:require('@/work/static/car/cara.png'),
  47. carb:require('@/work/static/car/carb.png'),
  48. search:require('@/work/static/car/search.png'),
  49. cxrq:"",
  50. text:'',
  51. list:[{tit:'皖A IC520',type:1,heiflag:false},{tit:'晋E KD783',type:2,heiflag:true},],
  52. pageSize: 10,
  53. pageNum: 1,
  54. reachflag: true,
  55. wtdt:'暂无数据',
  56. ttopval:'0',
  57. ttoplist:[{tit:'全部',val:0},{tit:'小区车辆',val:1},{tit:'外来车辆',val:2}],
  58. }
  59. },
  60. onLoad: function() {
  61. },
  62. // 上拉触底加载更多触发事件
  63. onReachBottom() {
  64. if (this.reachflag) {
  65. this.pageNum++
  66. this.getDataFn()
  67. }
  68. },
  69. methods:{
  70. checkPermi, checkRole,
  71. getCheck(){
  72. this.$tab.navigateTo("/work/pages/car/illegalcheck")
  73. },
  74. getTabtop(val){
  75. this.ttopval=val
  76. },
  77. getConfirm(){
  78. this.getrefreshData()
  79. },
  80. getReset(){
  81. this.cxrq='';
  82. this.text='';
  83. this.getrefreshData()
  84. },
  85. getrefreshData(){
  86. this.pageNum=1;
  87. this.list=[];
  88. this.reachflag=true;
  89. this.getDataFn()
  90. },
  91. getTabFn(val){
  92. this.tabval=val
  93. },
  94. bindDateChangea(e){
  95. var val=e.detail.value;
  96. this.cxrq=val;
  97. },
  98. getDataFn(){
  99. var params={
  100. pageSize:this.pageSize,
  101. pageNum: this.pageNum,
  102. }
  103. params.noticeType=this.tabidx
  104. getNoticeList(params).then(res=>{
  105. if(res.code==200){
  106. if (res.rows.length < this.pageSize) {
  107. this.reachflag = false
  108. this.wtdt = '到底了~';
  109. } else {
  110. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  111. if (num < res.total) {
  112. this.reachflag = true
  113. this.wtdt = ''
  114. } else {
  115. this.reachflag = false
  116. this.wtdt = '到底了~';
  117. }
  118. }
  119. if (this.pageNum == 1) {
  120. this.list = res.rows;
  121. } else {
  122. this.list = this.list.concat(res.rows)
  123. }
  124. }else{
  125. this.$toast(res.msg)
  126. }
  127. })
  128. },
  129. }
  130. }
  131. </script>
  132. <style>
  133. page{background: #F3F3F0;}
  134. </style>
  135. <style lang="scss" scoped>
  136. .car{padding: 206rpx 0 108rpx;}
  137. .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
  138. .topa{padding: 20rpx ;
  139. .resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
  140. .chekt{min-width: 180rpx;
  141. view{font-weight: 500;font-size: 26rpx;color: #272727;flex: 1;}
  142. image{width: 24rpx;height: 16rpx;margin-left: 18rpx;flex: 0 0 auto;}
  143. }
  144. .search{flex: 1;margin-left: 16rpx;height: 64rpx;background: #EEEEEE;border-radius: 32rpx;border: 2rpx solid #E6E6E6;padding-left: 24rpx;box-sizing: border-box;
  145. image{width: 32rpx;height: 34rpx;margin-right: 22rpx;flex: 0 0 auto;}
  146. input{flex: 1;font-size: 26rpx;color: #272727;}
  147. .btn{width: 100rpx;height: 64rpx;background: #3565ED;border-radius: 32rpx;flex: 0 0 auto;font-weight: bold;text-align: center;line-height: 64rpx;
  148. font-size: 26rpx;
  149. color: #FFFFFF;}
  150. }
  151. }
  152. .tabtop{padding-bottom: 46rpx;
  153. .tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;margin-right: 6rpx;
  154. &.act{font-weight: bold;font-size: 32rpx;color: #272727;
  155. &::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
  156. }
  157. }
  158. }
  159. .tablst{background: #F3F3F0;padding:30rpx 16rpx 30rpx 46rpx;overflow: auto;
  160. .tabs{height: 48rpx;background: #DADADA;border-radius: 24rpx;margin-right: 30rpx;font-weight: 500;display: flex;align-items: center;justify-content: center;padding: 0 24rpx;
  161. font-size: 26rpx;box-sizing: border-box;flex: 0 0 auto;color: #666666;
  162. &.act{border: 2rpx solid #0256FD;background: #FFFFFF;color: #0256FD;}
  163. }
  164. }
  165. }
  166. .fbtn{height: 98rpx;display: flex;align-items: center;justify-content: center;
  167. font-weight: bold;position: fixed;left: 0;right: 0;bottom: 0;z-index: 2;
  168. font-size: 26rpx;
  169. color: #FFFFFF;
  170. background: #0156FE;}
  171. .carlists{padding: 0 18rpx;}
  172. </style>