mycheckorderlist.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <!--
  2. * @Title:
  3. * @Description: 我的维修任务列表
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="wrap">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" status-bar left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <view class="container">
  18. <uni-list>
  19. <uni-list-item v-for="item in list" :key="item.id">
  20. <template v-slot:body>
  21. <view class="list-item-block">
  22. <view class="items-line">
  23. <view class="block">
  24. <image class="item-title-run-status-icon" style="box-shadow:0 0 2px 2px lightblue"
  25. src="/static/images/list/order_item.png" mode="widthFix">
  26. </image>
  27. </view>
  28. <text class="item-title-rtu-name">{{item.rtuName}}</text>
  29. <text class="item-title-rtu-code">[{{item.rtuCode}}]</text>
  30. </view>
  31. <view class="items-line">
  32. <uni-icons class="input-uni-icon" type="loop" size="18" color="lightblue" />
  33. <text class="item-text-lable">维修时长:</text>
  34. <text class="item-text-content" style="color: red;">{{item.taskProcessDuration}}</text>
  35. </view>
  36. <view class="items-line">
  37. <uni-icons class="input-uni-icon" type="location" size="18" color="lightblue" />
  38. <text class="item-text-lable">行政区划:</text>
  39. <text class="item-text-content">{{item.areaName}}</text>
  40. </view>
  41. <view class="item-button-group">
  42. <view class="item-button"
  43. @click="onLocationClick(item)">
  44. <view class="items-line">
  45. <uni-icons class="input-uni-icon" type="location" size="18" color="coral" />
  46. <text class="button-text">导航</text>
  47. </view>
  48. </view>
  49. <view class="item-button"
  50. @click="onReportDetailClick(item.id)">
  51. <view class="items-line">
  52. <uni-icons class="input-uni-icon" type="info" size="18" color="coral" />
  53. <text class="button-text">维修详情</text>
  54. </view>
  55. </view>
  56. <view class="item-button" @click="onCheckOrderReportEditClick(item.id)">
  57. <view class="items-line">
  58. <uni-icons class="input-uni-icon" type="compose" size="18" color="coral" />
  59. <text class="button-text">维修填报</text>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. </uni-list-item>
  66. </uni-list>
  67. <uni-group>
  68. <view class="pagination-block">
  69. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  70. @change="pageChange" />
  71. </view>
  72. </uni-group>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. import http from '@/http/api.js';
  78. export default {
  79. components: {
  80. },
  81. onLoad(option) {
  82. this.getPage();
  83. },
  84. data() {
  85. return {
  86. list: [],
  87. title: '我的维修任务',
  88. desc: '',
  89. pageSize: 10,
  90. // 当前页
  91. pageCurrent: 1,
  92. // 数据总量
  93. total: 0,
  94. query: {},
  95. }
  96. },
  97. computed: {
  98. },
  99. onShow() {
  100. },
  101. created() {
  102. },
  103. methods: {
  104. toBack() {
  105. uni.navigateBack({
  106. delta: 1
  107. })
  108. },
  109. // 分页触发
  110. pageChange(e) {
  111. this.pageCurrent = e.current;
  112. this.getPage()
  113. },
  114. getPage() {
  115. const current = this.pageCurrent;
  116. const size = this.pageSize;
  117. let that = this;
  118. http.request({
  119. url: '/galaxy-business/rtu/check/order/my/page',
  120. method: 'GET',
  121. params: {
  122. current,
  123. size,
  124. },
  125. }).then(res => {
  126. if (res.data.records != null) {
  127. that.list = res.data.records;
  128. }
  129. this.total = res.data.total;
  130. }).catch(err => {
  131. console.log(err)
  132. })
  133. },
  134. onCheckOrderReportEditClick(id) {
  135. console.log("iddd" + id)
  136. var url = '/pages/check-order/orderprocessreport?orderId=' + id;
  137. uni.navigateTo({
  138. url: url
  139. })
  140. },
  141. onReportDetailClick(id) {
  142. let url = '/pages/check-order/orderprocessreportdetail?orderId=' + id;
  143. uni.navigateTo({
  144. url: url
  145. })
  146. },
  147. onLocationClick(item) {
  148. let lat = item.lat;
  149. let lng = item.lng;
  150. let name = item.rtuName;
  151. let add = item.locationDesc;
  152. uni.openLocation({
  153. latitude: Number(lat),
  154. longitude: Number(lng),
  155. name: name,
  156. address: add,
  157. success() {
  158. }
  159. })
  160. },
  161. }
  162. }
  163. </script>
  164. <style>
  165. /* page {
  166. background-color: rgb(240, 242, 244);
  167. } */
  168. </style>
  169. <style lang="scss" scoped>
  170. </style>