uncomfirecheckorderlistview.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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.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="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.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"
  60. @click="call(item.manageCompanyAdminPhone)">
  61. <view class="items-line">
  62. <uni-icons class="input-uni-icon" type="phone" size="18" color="coral" />
  63. <text class="button-text">电 话</text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. </uni-list-item>
  70. </uni-list>
  71. <uni-group>
  72. <view class="pagination-block">
  73. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  74. @change="pageChange" />
  75. </view>
  76. </uni-group>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import {
  82. role
  83. } from "@/api/role.js";
  84. import http from '@/http/api.js';
  85. export default {
  86. components: {
  87. },
  88. onLoad(option) {
  89. if (this.userInfo.role_name === role['admin']) {
  90. this.permission.admin = true;
  91. } else if (this.userInfo.role_name === role['orgAdmin']) {
  92. this.permission.orgAdmin = true;
  93. } else if (this.userInfo.role_name === role['companyAdmin']) {
  94. this.permission.companyAdmin = true;
  95. } else if (this.userInfo.role_name === role['companyServciePerson']) {
  96. this.permission.companyServciePerson = true;
  97. }
  98. this.query = {};
  99. this.query['orderConfirm'] = 0;
  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. getIcon() {
  122. return path => {
  123. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  124. }
  125. },
  126. },
  127. onShow() {
  128. },
  129. methods: {
  130. //返回上一页
  131. toBack() {
  132. uni.navigateBack({
  133. delta: 1
  134. })
  135. },
  136. onBackPress() {
  137. // #ifdef APP-PLUS
  138. plus.key.hideSoftKeybord();
  139. // #endif
  140. },
  141. // 分页触发
  142. pageChange(e) {
  143. this.pageCurrent = e.current;
  144. this.getPage()
  145. },
  146. call(phone) {
  147. console.log(phone)
  148. uni.showModal({
  149. content: '是否需要拨打[' + phone + ']?',
  150. showCancel: true,
  151. success(res) {
  152. if (res.confirm) {
  153. uni.makePhoneCall({
  154. phoneNumber: phone
  155. });
  156. }
  157. }
  158. });
  159. },
  160. getPage(params = {}) {
  161. const current = this.pageCurrent;
  162. const size = this.pageSize;
  163. let postData = Object.assign(params, this.query);
  164. let that = this;
  165. http.request({
  166. url: '/galaxy-business/rtu/check/order/unconfirm/page',
  167. method: 'GET',
  168. params: {
  169. current,
  170. size,
  171. },
  172. data: postData,
  173. }).then(res => {
  174. if (res.data.records != null) {
  175. //console.log(JSON.stringify(res.data.records))
  176. that.list = res.data.records;
  177. }
  178. this.total = res.data.total;
  179. }).catch(err => {
  180. console.log(err)
  181. })
  182. },
  183. }
  184. }
  185. </script>
  186. <style lang="scss" scoped>
  187. </style>