dangerarearesidentfamilylist.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 v-if="item.isHouseholder ===1" class="line">
  23. <text class="text" style="color: blue;">户主</text>
  24. </view>
  25. <view v-else class="line">
  26. <text class="text" style="color: blue;">家庭成员</text>
  27. </view>
  28. <view class="line">
  29. <text class="text text-ellipsis">姓名:{{item.personName}}</text>
  30. </view>
  31. <view class="line">
  32. <text class="text text-ellipsis">身份证号:{{item.personId}}</text>
  33. </view>
  34. </view>
  35. </template>
  36. </uni-list-item>
  37. </uni-list>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. role
  44. } from "@/api/role.js";
  45. import http from '@/http/api.js';
  46. export default {
  47. components: {},
  48. onLoad(option) {
  49. this.query = {};
  50. this.query['personId'] = option.personId;
  51. this.getList();
  52. },
  53. data() {
  54. return {
  55. title: '家庭成员表',
  56. list: [],
  57. query: {},
  58. }
  59. },
  60. computed: {},
  61. onShow() {},
  62. methods: {
  63. toBack() {
  64. uni.navigateBack({
  65. delta: 1
  66. })
  67. },
  68. getList(params = {}) {
  69. let postData = Object.assign(params, this.query);
  70. let that = this;
  71. http.request({
  72. url: '/galaxy-business/yj/resident/family/list',
  73. method: 'GET',
  74. data: postData,
  75. }).then(res => {
  76. if (res.data != null) {
  77. that.list = res.data;
  78. }
  79. }).catch(err => {
  80. console.log(err)
  81. })
  82. },
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. </style>