transferresidentlist.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <text class="item-text-content">姓名:{{item.personName}}</text>
  24. </view>
  25. <view class="items-line">
  26. <text class="item-text-content">手机号:{{item.personId}}</text>
  27. </view>
  28. <view v-if="item.warnId" class="items-line">
  29. <text class="item-text-content">转移记录时间:{{item.recordTime}}</text>
  30. </view>
  31. <view v-else class="items-line">
  32. <text class="item-text-content" style="color: red;">未转移</text>
  33. </view>
  34. </view>
  35. </template>
  36. </uni-list-item>
  37. </uni-list>
  38. <uni-group>
  39. <view class="pagination-block">
  40. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  41. @change="pageChange" />
  42. </view>
  43. </uni-group>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. role
  50. } from "@/api/role.js";
  51. import http from '@/http/api.js';
  52. export default {
  53. components: {},
  54. onLoad(option) {
  55. this.warnId = option.id;
  56. this.query = {};
  57. this.query['warnId'] = this.warnId;
  58. this.getPage();
  59. },
  60. data() {
  61. return {
  62. title: '转移人员清单',
  63. pageSize: 10,
  64. pageCurrent: 1,
  65. total: 0,
  66. list: [],
  67. query: {},
  68. warnId: '',
  69. }
  70. },
  71. computed: {},
  72. onShow() {},
  73. methods: {
  74. //返回上一页
  75. toBack() {
  76. uni.navigateBack({
  77. delta: 1
  78. })
  79. },
  80. // 分页触发
  81. pageChange(e) {
  82. this.pageCurrent = e.current;
  83. this.getPage()
  84. },
  85. getPage(params = {}) {
  86. const current = this.pageCurrent;
  87. const size = this.pageSize;
  88. let postData = Object.assign(params, this.query);
  89. let that = this;
  90. http.request({
  91. url: '/galaxy-business/yj/transfer/page',
  92. method: 'GET',
  93. params: {
  94. current,
  95. size,
  96. },
  97. data: postData,
  98. }).then(res => {
  99. if (res.data.records != null) {
  100. that.list = res.data.records;
  101. //console.log(JSON.stringify(that.list))
  102. // that.list =res.data.records.map(item => {
  103. // let id = item.personId.replace(/^(\d{6})\d+(\d{4})$/, '$1******$2')
  104. // return {
  105. // ...item,
  106. // 'pId':id
  107. // }
  108. // })
  109. }
  110. this.total = res.data.total;
  111. }).catch(err => {
  112. console.log(err)
  113. })
  114. },
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. </style>