illegalrecord.vue 5.7 KB

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