recordDetail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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="imgPic padding-lr padding-bottom-lg">
  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. </view>
  74. </view>
  75. <!-- 处理状态end -->
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. export default {
  81. data() {
  82. return {
  83. radio: 'A',
  84. radio: 'B',
  85. modalName: null,
  86. reason: '',
  87. type: '0',
  88. detailMessage: {},
  89. detailMessage2: {},
  90. msg: '',
  91. msg2: '',
  92. flag:false,
  93. companyCode:0,
  94. getData:{},
  95. dataRes:0
  96. }
  97. },
  98. onLoad: function(option) {
  99. this.goRecordDetail({
  100. 'company_code': uni.getStorageSync('selectedCode'),
  101. "id": option.id
  102. })
  103. },
  104. methods: {
  105. // 维保记录列详情数据请求
  106. async goRecordDetail(params = {}) {
  107. const res = await this.$myRequest({
  108. url: 'Maintenance/getMaintenanceRecordDetails',
  109. data: params,
  110. showLoading: true
  111. })
  112. this.getData = res.data.data[0];
  113. console.log('this.getData.report_photos');
  114. console.log(this.getData.report_photos);
  115. this.dataRes=1
  116. },
  117. }
  118. }
  119. </script>
  120. <style lang="scss">
  121. </style>