processcheckorderlistview.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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" statusBar="false" 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. <image class="item-title-run-status-icon" style="box-shadow:0 0 2px 2px lightblue"
  24. src="/static/images/list/order_item.png" mode="widthFix">
  25. </image>
  26. <text class="item-title-rtu-name">{{item.rtuName}}</text>
  27. <text class="item-title-rtu-code">[{{item.rtuCode}}]</text>
  28. </view>
  29. <view class="items-line">
  30. <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
  31. <text class="item-text-lable">维修时长:</text>
  32. <text class="item-text-content" style="color: red;">{{item.taskProcessDuration}}</text>
  33. </view>
  34. <view class="items-line">
  35. <uni-icons class="input-uni-icon" type="location" size="18" color="lightblue" />
  36. <text class="item-text-lable">行政区划:</text>
  37. <text class="item-text-content">{{item.areaName}}</text>
  38. </view>
  39. <view class="items-line">
  40. <uni-icons class="input-uni-icon" type="home" size="18" color="lightblue" />
  41. <text class="item-text-lable">运维公司:</text>
  42. <text class="item-text-content">
  43. {{item.manageCompany}}
  44. </text>
  45. </view>
  46. <view class="items-line">
  47. <uni-icons class="input-uni-icon" type="auth" size="18" color="lightblue" />
  48. <text class="item-text-lable">处理人:</text>
  49. <text class="item-text-content">{{item.contactUserName}}</text>
  50. </view>
  51. <view class="items-line">
  52. <uni-icons class="input-uni-icon" type="phone" size="18" color="lightblue" />
  53. <text class="item-text-lable">联系电话:</text>
  54. <view v-if="item.contactPhone != null" @click="call(item.contactPhone)">
  55. <text class="item-text-content-phone">{{item.contactPhone}}</text>
  56. </view>
  57. </view>
  58. <view class="item-button-group">
  59. <view class="item-button" @click="call(item.contactPhone)">
  60. <view class="items-line">
  61. <uni-icons class="input-uni-icon" type="phone" size="18" color="coral" />
  62. <text class="button-text">电 话</text>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. </uni-list-item>
  69. </uni-list>
  70. <uni-group>
  71. <view class="pagination-block">
  72. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  73. @change="pageChange" />
  74. </view>
  75. </uni-group>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. import {
  81. role
  82. } from "@/api/role.js";
  83. import http from '@/http/api.js';
  84. export default {
  85. components: {
  86. },
  87. onLoad(option) {
  88. if (this.userInfo.role_name === role['admin']) {
  89. this.permission.admin = true;
  90. } else if (this.userInfo.role_name === role['orgAdmin']) {
  91. this.permission.orgAdmin = true;
  92. } else if (this.userInfo.role_name === role['companyAdmin']) {
  93. this.permission.companyAdmin = true;
  94. } else if (this.userInfo.role_name === role['companyServciePerson']) {
  95. this.permission.companyServciePerson = true;
  96. }
  97. this.query = {};
  98. this.query['orderStatus'] = 2;
  99. this.query['orderConfirm'] = 1;
  100. this.query['orderClose'] = 0;
  101. this.pageCurrent = 1;
  102. this.getPage()
  103. },
  104. data() {
  105. return {
  106. title: '处理中维修任务信息',
  107. permission: {
  108. 'admin': false,
  109. 'orgAdmin': false,
  110. 'companyAdmin': false,
  111. 'companyServciePerson': false,
  112. },
  113. pageSize: 10,
  114. pageCurrent: 1,
  115. total: 0,
  116. list: [],
  117. query: {},
  118. }
  119. },
  120. computed: {
  121. },
  122. onShow() {
  123. },
  124. methods: {
  125. //返回上一页
  126. toBack() {
  127. uni.navigateBack({
  128. delta: 1
  129. })
  130. },
  131. onBackPress() {
  132. // #ifdef APP-PLUS
  133. plus.key.hideSoftKeybord();
  134. // #endif
  135. },
  136. // 分页触发
  137. pageChange(e) {
  138. this.pageCurrent = e.current;
  139. this.getPage()
  140. },
  141. call(phone) {
  142. console.log(phone)
  143. uni.showModal({
  144. content: '是否需要拨打[' + phone + ']?',
  145. showCancel: true,
  146. success(res) {
  147. if (res.confirm) {
  148. uni.makePhoneCall({
  149. phoneNumber: phone
  150. });
  151. }
  152. }
  153. });
  154. },
  155. getPage(params = {}) {
  156. const current = this.pageCurrent;
  157. const size = this.pageSize;
  158. let postData = Object.assign(params, this.query);
  159. let that = this;
  160. http.request({
  161. url: '/galaxy-business/rtu/check/order/page',
  162. method: 'GET',
  163. params: {
  164. current,
  165. size,
  166. },
  167. data: postData,
  168. }).then(res => {
  169. if (res.data.records != null) {
  170. console.log(JSON.stringify(res.data.records))
  171. that.list = res.data.records;
  172. }
  173. this.total = res.data.total;
  174. }).catch(err => {
  175. console.log(err)
  176. })
  177. },
  178. }
  179. }
  180. </script>
  181. <style lang="scss" scoped>
  182. </style>