houseDataPop.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class="content-item">
  3. <div class="formContent-item_title">基础信息</div>
  4. <div class="widthFlex">
  5. <household-table :tableName="householdTable.left" :tabData="houseData"></household-table>
  6. <household-table :tableName="householdTable.right" :tabData="houseData"></household-table>
  7. </div>
  8. <div class="formContent-item_title">人脸信息</div>
  9. <div class="detailImg">
  10. <div class="clickUpText">
  11. <img class="dataImg" v-if="!!houseData.facePictureUrl" :src="houseData.facePictureUrl" />
  12. <template v-else>
  13. <img class="bg-img" src="@/assets/img/ownerManagement/img_zhaopian2@2x.png" alt="" />
  14. <div>无人脸图片</div>
  15. </template>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import list from '@utils/list.js';
  22. import householdTable from './householdTable.vue';
  23. let type = '';
  24. let typeArr = ['业主', '亲属', '租客'];
  25. export default {
  26. components: { householdTable },
  27. mixins: [list],
  28. props: ['params'],
  29. data() {
  30. return {
  31. houseData: {},
  32. householdTable: {
  33. left: [
  34. {
  35. lable: '姓名',
  36. prop: 'name'
  37. },
  38. {
  39. lable: '手机号',
  40. prop: 'phone'
  41. },
  42. {
  43. lable: '身份证号',
  44. prop: 'idNumber'
  45. },
  46. {
  47. lable: '出生日期',
  48. prop: 'birthDate'
  49. },
  50. {
  51. lable: '民族',
  52. prop: 'nation'
  53. }
  54. // {
  55. // lable: '入住时间',
  56. // prop: 'checkInDate'
  57. // }
  58. ],
  59. right: [
  60. {
  61. lable: '类型',
  62. prop: 'householdType',
  63. const: true,
  64. format(val) {
  65. return type;
  66. }
  67. },
  68. {
  69. lable: '人员编号',
  70. prop: 'personnelNumber'
  71. },
  72. {
  73. lable: '性别',
  74. prop: 'sex',
  75. typeArray: [
  76. { type: 0, lable: '未知' },
  77. { type: 1, lable: '男' },
  78. { type: 2, lable: '女' }
  79. ]
  80. },
  81. {
  82. lable: '国籍',
  83. prop: 'nationality',
  84. typeArray: [
  85. { type: 1, lable: '中国' },
  86. { type: 2, lable: '其他' }
  87. ]
  88. },
  89. {
  90. lable: '户籍地址',
  91. prop: 'permanentAddress'
  92. }
  93. ]
  94. }
  95. };
  96. },
  97. created() {
  98. if (!!this.params.data) {
  99. type = typeArr[Number(this.params.data.householdType) - 1];
  100. this.getHouse(this.params.data.residentId);
  101. }
  102. },
  103. methods: {
  104. getHouse(id) {
  105. this.$http
  106. .get('/sc-community/scResident/find/' + id)
  107. .then(({ data, status, msg }) => {
  108. if (0 === status) {
  109. if (data !== null) {
  110. this.houseData = data;
  111. }
  112. } else {
  113. this.$message.error(msg);
  114. }
  115. })
  116. .catch(() => {});
  117. }
  118. }
  119. };
  120. </script>
  121. <style lang="scss" scoped>
  122. @import '../style.scss';
  123. .content {
  124. .content-item {
  125. padding: 0;
  126. }
  127. }
  128. .detailImg {
  129. width: 200px;
  130. height: 280px;
  131. background: #f8fcff;
  132. border-radius: 4px;
  133. border: 1px solid #e0e1e3;
  134. color: #424656;
  135. text-align: center;
  136. .clickUpText {
  137. position: inherit;
  138. img.bg-img {
  139. width: 100px;
  140. }
  141. }
  142. }
  143. </style>