recordDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">{{this.getData.plan_name}}</view>
  5. <button class="cu-btn radius bg-green sm" v-if="this.getData.spot_abnormal==0">正常</button>
  6. <button class="cu-btn radius bg-orange sm" v-if="this.getData.spot_abnormal==1">异常</button>
  7. <button class="cu-btn radius bg-red sm" v-if="this.getData.spot_abnormal==2">故障</button>
  8. <button class="cu-btn radius bg-red sm" v-if="this.getData.spot_abnormal==3">其他</button>
  9. </view>
  10. <view>
  11. <view class="basic-info">
  12. <view class="info-tit margin-left-xs">
  13. <text class="cuIcon-titles margin-right-xs"></text>
  14. 基本信息
  15. </view>
  16. <view class="info-content">
  17. <view class="info-one-info ">
  18. <text>所属单位:</text>
  19. <text>{{this.getData.owner_name}}</text>
  20. </view>
  21. <view class="info-one-info ">
  22. <text>单位地址:</text>
  23. <text>{{this.getData.owner_address}}</text>
  24. </view>
  25. <view class="info-one-info ">
  26. <text>巡检点位:</text>
  27. <text>{{this.getData.spot_name}}</text>
  28. </view>
  29. <view class="info-one-info ">
  30. <text>点位地址:</text>
  31. <text>{{this.getData.spot_address}}</text>
  32. </view>
  33. <view class="info-one-info ">
  34. <text>预期时间:</text>
  35. <text>{{this.getData.ywc_time}}</text>
  36. </view>
  37. <view class="info-one-info ">
  38. <text>完成时间:</text>
  39. <text>{{this.getData.wc_time}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 巡检信息 -->
  44. <view class="basic-info">
  45. <view class="info-tit margin-left-xs">
  46. <text class="cuIcon-titles margin-right-xs"></text>
  47. 巡检信息
  48. </view>
  49. <view class="info-content">
  50. <view class="info-one-info ">
  51. <text>巡检人员:</text>
  52. <text>{{this.getData.name}}</text>
  53. </view>
  54. <view class="info-one-info ">
  55. <text>联系方式:</text>
  56. <text>{{this.getData.phone}}</text>
  57. </view>
  58. <view class="info-one-info ">
  59. <text>巡检描述:</text>
  60. <text>{{this.getData.dwsb_remarks}}</text>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- 处理状态start -->
  65. <view class="processStatus">
  66. <view class="info-tit margin-left-xs">
  67. <text class="cuIcon-titles margin-right-xs"></text>
  68. 巡检图片
  69. </view>
  70. <view class="padding-lr padding-bottom-lg imgPic">
  71. <image v-if="!this.getData.report_photos&&this.dataRes==1" mode='widthFix' src="/static/defaultImg.jpg" width="100%"/>
  72. <image v-else mode='widthFix' :src="`${this.$websiteUrl}${this.getData.report_photos}`" width="100%"/>
  73. <!-- <image class="image-bg" v-if="!this.getData.report_photos&&this.dataRes==1" src="/static/defaultImg.jpg"/>
  74. <image class="image-bg" v-else :src="this.getData.report_photos" /> -->
  75. </view>
  76. </view>
  77. <!-- 处理状态end -->
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. radio: 'A',
  86. radio: 'B',
  87. modalName: null,
  88. reason: '',
  89. type: '0',
  90. detailMessage: {},
  91. detailMessage2: {},
  92. msg: '',
  93. msg2: '',
  94. flag: false,
  95. companyCode: 0,
  96. getData: {},
  97. dataRes: 0,
  98. }
  99. },
  100. onLoad: function(option) {
  101. this.goRecordDetail({
  102. 'company_code': uni.getStorageSync('selectedCode'),
  103. "id": option.id
  104. })
  105. },
  106. methods: {
  107. // 巡检记录列详情数据请求
  108. async goRecordDetail(params = {}) {
  109. const res = await this.$myRequest({
  110. url: 'Inspection/getInspectionRecordDetails',
  111. data: params,
  112. showLoading: true
  113. })
  114. this.getData = res.data.data[0];
  115. this.dataRes=1;
  116. console.log(this.getData);
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="scss">
  122. </style>