details.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <div class="main">
  3. <div class="top-title">
  4. <h1>{{ detailsData.name }} <span class="titleType">业主</span></h1>
  5. <el-button class="right" type="primary" @click="close()">返回</el-button>
  6. <div class="text">
  7. <span>手机号:{{ detailsData.phone }}</span> <span>身份证号:{{ detailsData.idNumber }}</span>
  8. </div>
  9. </div>
  10. <div class="content">
  11. <div class="tages">
  12. <div v-for="(item, index) in tabs" :key="index" class="tages-list" :class="tabsIndex === index ? 'active' : ''">
  13. <span @click="toggleTab(index)">{{ item.lable }}</span>
  14. </div>
  15. </div>
  16. <div class="content-item" v-show="tabsIndex === 0">
  17. <div class="formContent-item_title">基础信息</div>
  18. <div class="widthFlex">
  19. <household-table :tableName="householdTable.left" :tabData="detailsData"></household-table>
  20. <household-table :tableName="householdTable.right" :tabData="detailsData"></household-table>
  21. </div>
  22. </div>
  23. <div class="content-item" v-show="tabsIndex === 1">
  24. <div class="widthFlex" v-for="item in 2" :key="item">
  25. <household-table :tableName="houseTable.left" :tabData="detailsData"></household-table>
  26. <household-table :tableName="houseTable.right" :tabData="detailsData"></household-table>
  27. </div>
  28. </div>
  29. <div class="content-item" v-show="tabsIndex === 2">
  30. <div class="formContent-item_title">车辆信息</div>
  31. </div>
  32. <div class="content-item" v-show="tabsIndex === 3">
  33. <div class="widthFlex" v-for="item in 3" :key="item">
  34. <household-table :tableName="parkingLotTable.left" :tabData="detailsData"></household-table>
  35. <household-table :tableName="parkingLotTable.right" :tabData="detailsData"></household-table>
  36. </div>
  37. </div>
  38. <div class="content-item" v-show="tabsIndex === 4">
  39. <div class="formContent-item_title">人员进出记录</div>
  40. </div>
  41. <div class="content-item" v-show="tabsIndex === 5">
  42. <div class="formContent-item_title">车辆进出记录</div>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import householdTable from './stepPage/householdTable.vue';
  49. export default {
  50. components: { householdTable },
  51. data() {
  52. return {
  53. tabsIndex: 0,
  54. id: null,
  55. detailsData: {},
  56. tabs: [
  57. {
  58. lable: '住户信息'
  59. },
  60. {
  61. lable: '房屋信息'
  62. },
  63. {
  64. lable: '车辆信息'
  65. },
  66. {
  67. lable: '车位信息'
  68. },
  69. {
  70. lable: '人员进出记录'
  71. },
  72. {
  73. lable: '车辆进出记录'
  74. }
  75. ],
  76. householdTable: {
  77. left: [
  78. {
  79. lable: '姓名',
  80. prop: 'name'
  81. },
  82. {
  83. lable: '手机号',
  84. prop: 'phone'
  85. },
  86. {
  87. lable: '身份证号',
  88. prop: 'idNumber'
  89. },
  90. {
  91. lable: '出生日期',
  92. prop: 'birthDate'
  93. },
  94. {
  95. lable: '民族',
  96. prop: 'nation'
  97. },
  98. {
  99. lable: '入住时间',
  100. prop: 'checkInDate'
  101. }
  102. ],
  103. right: [
  104. {
  105. lable: '类型',
  106. prop: 'householdType'
  107. },
  108. {
  109. lable: '人员编号',
  110. prop: 'personnelNumber'
  111. },
  112. {
  113. lable: '性别',
  114. prop: 'sex'
  115. },
  116. {
  117. lable: '国籍',
  118. prop: 'nationality'
  119. },
  120. {
  121. lable: '户籍地址',
  122. prop: 'permanentAddress'
  123. },
  124. {
  125. lable: '现住地址',
  126. prop: ''
  127. }
  128. ]
  129. },
  130. houseTable: {
  131. left: [
  132. {
  133. lable: '所属小区',
  134. prop: 'houseId'
  135. },
  136. {
  137. lable: '单元',
  138. prop: 'unitName'
  139. },
  140. {
  141. lable: '房屋号',
  142. prop: 'roomNumber'
  143. },
  144. {
  145. lable: '建筑面积',
  146. prop: 'name'
  147. },
  148. {
  149. lable: '公摊面积',
  150. prop: 'name'
  151. },
  152. {
  153. lable: '装修性质',
  154. prop: 'name'
  155. },
  156. {
  157. lable: '房屋编号',
  158. prop: 'id'
  159. }
  160. ],
  161. right: [
  162. {
  163. lable: '楼宇名称',
  164. prop: 'name'
  165. },
  166. {
  167. lable: '楼层',
  168. prop: 'name'
  169. },
  170. {
  171. lable: '房屋类型',
  172. prop: 'name'
  173. },
  174. {
  175. lable: '使用面积 ',
  176. prop: 'name'
  177. },
  178. {
  179. lable: '房屋户型',
  180. prop: 'name'
  181. },
  182. {
  183. lable: '房屋朝向',
  184. prop: 'name'
  185. },
  186. {
  187. lable: '',
  188. prop: ''
  189. }
  190. ]
  191. },
  192. parkingLotTable: {
  193. left: [
  194. {
  195. lable: '所属小区',
  196. prop: 'name'
  197. },
  198. {
  199. lable: '车库区域',
  200. prop: 'name'
  201. },
  202. {
  203. lable: '车位类型',
  204. prop: 'name'
  205. }
  206. ],
  207. right: [
  208. {
  209. lable: '车库名称',
  210. prop: 'name'
  211. },
  212. {
  213. lable: '车位编号',
  214. prop: 'name'
  215. },
  216. {
  217. lable: '车位面积',
  218. prop: 'name'
  219. }
  220. ]
  221. }
  222. };
  223. },
  224. created() {
  225. this.id = this.$route.query.id;
  226. this.getDetails();
  227. },
  228. methods: {
  229. toggleTab(index) {
  230. this.tabsIndex = index;
  231. },
  232. close() {
  233. let activeRout = this.$route;
  234. let tagsList = this.$store.getters['getTagsList'];
  235. tagsList.forEach((item, index) => {
  236. if (item.title == activeRout.meta.title || item.path == activeRout.path) {
  237. tagsList.splice(index, 1);
  238. history.go(-1);
  239. return true;
  240. }
  241. });
  242. },
  243. getDetails() {
  244. this.$http
  245. .get('/scResident/find/' + this.id)
  246. .then(({ data, status, msg }) => {
  247. if (0 === status) {
  248. this.detailsData = data;
  249. } else {
  250. this.$message.error(msg);
  251. }
  252. })
  253. .catch(() => {});
  254. }
  255. }
  256. };
  257. </script>
  258. <style lang='scss' scoped >
  259. @import './style.scss';
  260. </style>