illegalrecord.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="irecord">
  3. <view class="ctop flexc">
  4. <image :src="carc" class="imgs" v-if="datainfo.carType==1"></image>
  5. <image :src="card" class="imgs" v-if="datainfo.carType==2"></image>
  6. <view class="tit">{{datainfo.plateNumber}}</view>
  7. <view class="flex1"></view>
  8. <block v-if="datainfo.carType">
  9. <view class="txt" :class="datainfo.carType==1?'ca':'cb'">{{kaType(datainfo.carType,carType)}}</view>
  10. </block>
  11. </view>
  12. <view class="pdlr12" v-if="datainfo.carType==1">
  13. <view class="clists bgef">
  14. <view class="clist"><view class="tit">关联房号:</view>{{datainfo.visitPortal}}</view>
  15. <view class="clist"><view class="tit">手机号码:</view>{{datainfo.mobileNumber}}</view>
  16. </view>
  17. </view>
  18. <view class="chtop flexc">
  19. <view class="line"></view>
  20. <view>违停记录</view>
  21. <view class="flex1"></view>
  22. <view class="num coff" v-if="datainfo.isBlack=='Y'">(已登黑名单)</view>
  23. </view>
  24. <!-- 步骤条 -->
  25. <view class="steps" v-for="(ite,idx) in datainfo.children">
  26. <image :src="icoa" v-if="idx==0" class="circle"></image>
  27. <image :src="icob" v-else class="circle"></image>
  28. <view class="step">
  29. <view class="slist">
  30. <view class="tit">登记时间:</view>{{ite.createTime}}
  31. </view>
  32. <view class="slist">
  33. <view class="tit">违停拍照:</view>
  34. <view class="imgas" v-if="ite.illegalPhoto">
  35. <image :src="baseUrl+aite" v-for="(aite,aidx) in kaPhoto(ite.illegalPhoto)" :key="aidx" @click.stop="getPreview(aidx,ite.illegalPhoto)"></image>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <block >
  41. <!-- v-if="datainfo.isBlack=='Y'" -->
  42. <view style="height: 100rpx;"></view>
  43. <view class="rfbtn" @click="getDelFn" >解除黑名单</view>
  44. </block>
  45. <loading></loading>
  46. </view>
  47. </template>
  48. <script>
  49. import config from '@/config'
  50. import {selectDictValue} from "@/utils/common.js"
  51. import {illegalParkingDet,illegalParkingDel,illegalParkingCancel} from "@/api/work/car.js"
  52. import {getDictionaryFn} from "@/api/system/user.js"
  53. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  54. export default{
  55. components:{},
  56. data(){
  57. return{
  58. // line:require('@/car/static/car/line.png'),
  59. carc:require('@/mine/static/house/carcc.png'),
  60. card:require('@/mine/static/house/carbb.png'),
  61. icoa:require('@/mine/static/house/icoa.png'),
  62. icob:require('@/mine/static/house/icob.png'),
  63. baseUrl:config.baseUrl,
  64. datainfo:{},
  65. id:'',
  66. carType:[],
  67. }
  68. },
  69. onLoad: function(e) {
  70. this.init()
  71. if(e.id){
  72. this.id=e.id;
  73. this.getDataFn()
  74. }
  75. },
  76. methods:{
  77. checkPermi, checkRole,
  78. kaType(data, list) {
  79. return selectDictValue(list, data);
  80. },
  81. kaPhoto(data){
  82. return data.split(',');
  83. },
  84. init(){
  85. // 车辆类型
  86. getDictionaryFn('car_type').then(res=>{
  87. if(res.code==200){
  88. this.carType = res.data.map(v => {
  89. return {
  90. dictLabel: v.dictLabel,
  91. dictValue: v.dictValue
  92. }
  93. })
  94. }
  95. })
  96. },
  97. getDataFn(){
  98. illegalParkingDet(this.id).then(res=>{
  99. if(res.code==200){
  100. this.datainfo=JSON.parse(JSON.stringify(res.data));
  101. }
  102. })
  103. },
  104. getPreview(idx,arr) {
  105. var newArr=[];
  106. var list=arr.split(',')
  107. list.forEach(ite=>{
  108. var ds=this.baseUrl+ite
  109. newArr.push(ds)
  110. })
  111. uni.previewImage({
  112. urls: newArr,
  113. current:idx,
  114. success: function(data) {},
  115. fail: function(err) {}
  116. });
  117. },
  118. getDelFn(){
  119. var that=this;
  120. uni.showModal({
  121. title: '解除黑名单',
  122. content: "是否确认解除",
  123. cancelText: '取消',
  124. confirmText: '确认',
  125. success: function(res) {
  126. if (res.confirm) {
  127. that.getLiftFn()
  128. } else if (res.cancel) {
  129. }
  130. }
  131. });
  132. },
  133. getLiftFn(){
  134. var that=this;
  135. var info=JSON.parse(JSON.stringify(this.datainfo));
  136. var params={};
  137. params.plateNumber=info.plateNumber;
  138. params.illegalParkingId=info.illegalParkingId;
  139. params.isBlack="N"
  140. // 车牌号,id,isblace
  141. illegalParkingCancel(params).then(res=>{
  142. if(res.code==200){
  143. this.$toast("解除成功")
  144. setTimeout(function(){
  145. uni.$emit("refCarPark")
  146. uni.navigateBack({
  147. delta:1
  148. })
  149. },1500)
  150. }
  151. })
  152. }
  153. }
  154. }
  155. </script>
  156. <style lang="scss" scoped>
  157. .bgef{background: #EFF4FF;}
  158. .irecord{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 10rpx;
  159. .ctop{padding:20rpx 48rpx;margin-bottom:14rpx;
  160. .imgs{width: 30rpx;height: 24rpx;margin-right: 12rpx;}
  161. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  162. .txt{font-weight: 500;font-size: 24rpx;
  163. &.ca{color: #0256FD;}
  164. &.cb{color: #FE5A0E;}
  165. }
  166. }
  167. .clists{padding: 22rpx 40rpx 22rpx;border-radius: 20rpx;box-sizing: border-box;
  168. .clist{font-size: 26rpx;color: #272727;display: flex;line-height: 52rpx;
  169. .tit{font-size: 26rpx;color: #272727;flex: 0 0 auto;min-width: 108rpx;text-align-last: justify;font-weight: bold;}
  170. }
  171. }
  172. .chtop{padding-top: 36rpx;margin-bottom: 32rpx;padding-right: 48rpx;
  173. image{width: 14rpx;height: 48rpx;margin-right: 20rpx;}
  174. view{font-weight: bold;font-size: 32rpx;color: #272727;}
  175. .num{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  176. }
  177. .steps{display: flex;padding: 0 32rpx 12rpx;position: relative;
  178. &::after{content: '';background: #E6E6E6;width: 2rpx;position: absolute;top: 38rpx;bottom: -14rpx;left: 44rpx;}
  179. .circle{width: 24rpx;height: 24rpx;margin-right: 24rpx;flex: 0 0 auto;margin-top: 14rpx;}
  180. .step{
  181. .slist{font-size: 26rpx;color: #272727;display: flex;line-height: 52rpx;margin-bottom: 6rpx;
  182. .tit{font-weight: bold;text-align-last: justify;flex: 0 0 auto;min-width: 108rpx;}
  183. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  184. image{width: 160rpx;height: 160rpx;margin-right: 30rpx;margin-bottom: 14rpx;}
  185. }
  186. }
  187. }
  188. }
  189. }
  190. </style>