hasrepaired.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="contain" style="padding-bottom: 0;">
  3. <view class="main" style="padding: 0;">
  4. <view class="baoxiu"><span></span>报修信息</view>
  5. <u-cell-group>
  6. <u-cell title="报修时间" :value="details.shijian">
  7. </u-cell>
  8. <u-cell title="报修位置" :value="details.weizhi">
  9. </u-cell>
  10. <u-cell title="报修区域" :value="details.quyu">
  11. </u-cell>
  12. <u-cell title="报修类型" :value="details.leixing">
  13. </u-cell>
  14. <u-cell title="联系人" :value="details.lxr">
  15. </u-cell>
  16. <u-cell title="联系电话" :value="details.lxdh">
  17. </u-cell>
  18. <u--form labelPosition="left" >
  19. <u-form-item labelWidth='180' style="padding:0 32rpx;" label="故障描述:">
  20. </u-form-item>
  21. <u-form-item labelWidth='180' borderBottom style="padding:0 32rpx;">
  22. <view style="width:100%;padding: 0 20rpx;height:80px">{{details.gzms}}</view>
  23. </u-form-item>
  24. <u-form-item labelWidth='180' label="故障照片" style="padding:0 32rpx;">
  25. </u-form-item>
  26. <u-form-item labelWidth='180' borderBottom style="padding:0 32rpx;">
  27. <view class="uploadPart">
  28. <view class="allimg" v-for="img in details.gzimg">
  29. <image :src="img" mode="aspectFill" class="newimg"></image>
  30. </view>
  31. </view>
  32. </u-form-item>
  33. </u--form>
  34. </u-cell-group>
  35. <view class="baoxiu"><span></span>维修信息</view>
  36. <u-cell-group>
  37. <u-cell title="紧急程度" :value="details.jinji">
  38. </u-cell>
  39. <u-cell title="维修人员" :value="details.weixiury">
  40. </u-cell>
  41. <!-- <u-cell title="联系电话" :value="details.weixiudh">
  42. </u-cell> -->
  43. <u-cell title="完成时间" :value="details.repairFinishTime">
  44. </u-cell>
  45. </u-cell-group>
  46. </view>
  47. <!--确定弹窗-->
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. companyOrgId: '',
  55. details: {
  56. shijian: '',
  57. weizhi: '',
  58. quyu: '',
  59. leixing: '',
  60. lxr: '',
  61. lxdh: '',
  62. gzms: '',
  63. gzimg: [],
  64. repairFinishTime: '',
  65. jinji: '',
  66. weixiury: '',
  67. weixiudh: ''
  68. },
  69. }
  70. },
  71. onReady() {},
  72. onLoad(options) {
  73. this.companyOrgId = options.id;
  74. this.getdata();
  75. },
  76. methods: {
  77. getdata() {
  78. this.$api.get('/repairorder/' + this.companyOrgId, {})
  79. .then(res => {
  80. this.details.shijian = res.data.data.createDate;
  81. this.details.weizhi = res.data.data.repairPosition;
  82. this.details.lxr = res.data.data.contactPerson;
  83. this.details.lxdh = res.data.data.contactPhone;
  84. this.details.gzms = res.data.data.faultDes;
  85. this.details.weixiury = res.data.data.repairPersonName;
  86. this.details.repairFinishTime = res.data.data.repairFinishTime;
  87. res.data.data.faultPics = res.data.data.faultPics.split(",");
  88. this.details.gzimg = res.data.data.faultPics;
  89. if (res.data.data.repairRegion == 1) {
  90. this.details.quyu = '公共区域';
  91. } else if (res.data.data.repairRegion == 2) {
  92. this.details.quyu = '室内';
  93. }
  94. if (res.data.data.repairType == 1) {
  95. this.details.leixing = '水';
  96. } else if (res.data.data.repairType == 2) {
  97. this.details.leixing = '电';
  98. } else if (res.data.data.repairType == 3) {
  99. this.details.leixing = '其他';
  100. }
  101. if (res.data.data.urgency == 1) {
  102. this.details.jinji = '非常紧急';
  103. } else if (res.data.data.urgency == 2) {
  104. this.details.jinji = '紧急';
  105. } else if (res.data.data.urgency == 3) {
  106. this.details.jinji = '普通';
  107. }
  108. })
  109. },
  110. }
  111. }
  112. </script>
  113. <style lang="scss">
  114. .baoxiu {
  115. padding: 18rpx 32rpx;
  116. font-size: 36rpx;
  117. span {
  118. display: inline-block;
  119. margin-right: 16rpx;
  120. width: 8rpx;
  121. height: 32rpx;
  122. background-color: #5776E6;
  123. border-radius: 5rpx;
  124. }
  125. }
  126. .uploadPart {
  127. display: flex;
  128. justify-content: center;
  129. width: 100%;
  130. .uploadBtn {
  131. width: 160rpx;
  132. height: 160rpx;
  133. background-color: #ECF0FF;
  134. text-align: center;
  135. border-radius: 4rpx;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. }
  140. .allimg {
  141. position: relative;
  142. }
  143. .newimg {
  144. width: 160rpx;
  145. height: 160rpx;
  146. margin-right: 10rpx;
  147. border: 1px solid #eee;
  148. }
  149. }
  150. </style>