reportDetails.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <u-navbar
  4. :title="title"
  5. title-color="#fff"
  6. :custom-back="customBack"
  7. :border-bottom="false"
  8. back-icon-color="#CCE8FF"
  9. :background="{background: 'linear-gradient(99deg, #7A4398 0%, #5A5DB9 100%)' }"></u-navbar>
  10. <view class="base-info">
  11. <view class="base-info-item u-flex u-row-between">
  12. <view class=""><b>路段/停车场:</b>{{pageData.roadName}}</view>
  13. </view>
  14. <view class="base-info-item">
  15. <view class=""><b>泊位号:</b>{{pageData.spaceNo}}</view>
  16. </view>
  17. <view class="base-info-item">
  18. <view class=""><b>补充描述:</b>{{pageData.exceprionDes}}</view>
  19. </view>
  20. <view class="base-info-item">
  21. <view class="">
  22. <b>图片:</b>
  23. <view class="img-list">
  24. <image class="img" @click="previewImage(index)" v-for="(item,index) in pageData.imgList" :src="item" mode="widthFix" :key="index"></image>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="base-info-item">
  29. <view class=""><b>处理设配:</b>{{pageData.processDeviceName}}</view>
  30. </view>
  31. <view class="base-info-item">
  32. <view class=""><b>处理方式:</b>{{pageData.processTypeName}}</view>
  33. </view>
  34. <view class="base-info-item">
  35. <view class=""><b>处理状态:</b>{{pageData.isProcess|filterIsProcess}}</view>
  36. </view>
  37. </view>
  38. <view class="btn-wrap" v-if="pageData.isProcess!=1">
  39. <u-button type="primary" @click="goReport">更新处理进度</u-button>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default{
  46. data(){
  47. return{
  48. title:'记录详情',
  49. pageData:[],
  50. id:'',
  51. deviceId:'',
  52. dataList:[],
  53. }
  54. },
  55. onLoad(page){
  56. this.id = page.id;
  57. // this.deviceId = page.deviceId;
  58. },
  59. onShow(){
  60. this.getReportDetail();
  61. },
  62. mounted() {
  63. },
  64. onReady() {
  65. // this.$refs.uForm.setRules(this.rules);
  66. },
  67. methods:{
  68. customBack(){
  69. uni.navigateBack()
  70. },
  71. getReportDetail(){
  72. this.$u.api.excptionById({id:this.id}).then(res=>{
  73. if(res.code==200){
  74. this.pageData = res.data;
  75. // console.log('payeeReportDetail',res);
  76. }else{
  77. uni.showToast({
  78. icon:'none',
  79. title:res.msg
  80. })
  81. }
  82. console.log('res',res);
  83. }).catch(err=>{
  84. console.log('err',err);
  85. })
  86. },
  87. previewImage(index){
  88. uni.previewImage({
  89. current: index,
  90. urls: this.pageData.imgList
  91. });
  92. },
  93. goReport(){
  94. this.$u.route({
  95. url: '/pages/report/report',
  96. type:'navigateTo',
  97. params:{
  98. reportId:this.pageData.id,
  99. deviceId:this.pageData.deviceId,
  100. deviceType:this.pageData.deviceType,
  101. }
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style>
  108. page{background: #F3F3F3;}
  109. </style>
  110. <style lang="scss" scoped>
  111. @import '@/pages/report/report.scss';
  112. .btn-wrap{
  113. margin: 80rpx 50rpx 24rpx;
  114. }
  115. </style>