comfiredelaycheckorderlist.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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="item-text-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.taskCreateDuration}}</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="item-text-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="item-text-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.manageCompanyAdminName}}</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.manageCompanyAdminPhone != null" @click="call(item.manageCompanyAdminPhone)">
  55. <text class="item-text-content-phone">{{item.manageCompanyAdminPhone}}</text>
  56. </view>
  57. </view>
  58. <view class="item-button-group">
  59. <view class="item-button" @click="call(item.manageCompanyAdminPhone)">
  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. onLoad(option) {
  87. if (this.userInfo.role_name === role['admin']) {
  88. this.permission.admin = true;
  89. } else if (this.userInfo.role_name === role['orgAdmin']) {
  90. this.permission.orgAdmin = true;
  91. } else if (this.userInfo.role_name === role['companyAdmin']) {
  92. this.permission.companyAdmin = true;
  93. } else if (this.userInfo.role_name === role['companyServciePerson']) {
  94. this.permission.companyServciePerson = true;
  95. }
  96. this.pageCurrent = 1;
  97. this.getPage()
  98. },
  99. data() {
  100. return {
  101. title: '确认超时维修任务',
  102. permission: {
  103. 'admin': false,
  104. 'orgAdmin': false,
  105. 'companyAdmin': false,
  106. 'companyServciePerson': false,
  107. },
  108. pageSize: 10,
  109. pageCurrent: 1,
  110. total: 0,
  111. list: [],
  112. query: {},
  113. }
  114. },
  115. computed: {},
  116. onShow() {},
  117. methods: {
  118. //返回上一页
  119. toBack() {
  120. uni.navigateBack({
  121. delta: 1
  122. })
  123. },
  124. onBackPress() {
  125. // #ifdef APP-PLUS
  126. plus.key.hideSoftKeybord();
  127. // #endif
  128. },
  129. // 分页触发
  130. pageChange(e) {
  131. this.pageCurrent = e.current;
  132. this.getPage()
  133. },
  134. call(phone) {
  135. console.log(phone)
  136. uni.showModal({
  137. content: '是否需要拨打[' + phone + ']?',
  138. showCancel: true,
  139. success(res) {
  140. if (res.confirm) {
  141. uni.makePhoneCall({
  142. phoneNumber: phone
  143. });
  144. }
  145. }
  146. });
  147. },
  148. getPage(params = {}) {
  149. const current = this.pageCurrent;
  150. const size = this.pageSize;
  151. let postData = Object.assign(params, this.query);
  152. let that = this;
  153. http.request({
  154. url: '/galaxy-business/rtu/check/order/confirm/delay/page',
  155. method: 'GET',
  156. params: {
  157. current,
  158. size,
  159. },
  160. data: postData,
  161. }).then(res => {
  162. if (res.data.records != null) {
  163. that.list = res.data.records;
  164. }
  165. this.total = res.data.total;
  166. }).catch(err => {
  167. console.log(err)
  168. })
  169. },
  170. }
  171. }
  172. </script>
  173. <style lang="scss" scoped>
  174. .nav-title {
  175. width: 100%;
  176. display: flex;
  177. flex-direction: row;
  178. justify-content: center;
  179. align-items: center;
  180. text {
  181. color: white;
  182. font-size: 1rem;
  183. }
  184. }
  185. .container {
  186. padding: 0 0 100rpx;
  187. }
  188. </style>