details.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <div class="main">
  3. <div class="top-title">
  4. <h1>{{ detailsData.name }}</h1>
  5. <!-- <h1>{{ detailsData.name }} <span class="titleType">业主</span></h1> -->
  6. <el-button class="right" type="primary" @click="close()">返回</el-button>
  7. <div class="text">
  8. <span>手机号:{{ detailsData.phone }}</span> <span>身份证号:{{ detailsData.idNumber }}</span>
  9. </div>
  10. </div>
  11. <div class="content">
  12. <div class="tages">
  13. <div v-for="(item, index) in tabs" :key="index" class="tages-list" :class="tabsIndex === index ? 'active' : ''">
  14. <span @click="toggleTab(index)">{{ item.lable }}</span>
  15. </div>
  16. </div>
  17. <div class="content-item" v-show="tabsIndex === 0">
  18. <div class="formContent-item_title">基础信息</div>
  19. <div class="widthFlex">
  20. <household-table :tableName="householdTable.left" :tabData="detailsData"></household-table>
  21. <household-table :tableName="householdTable.right" :tabData="detailsData"></household-table>
  22. </div>
  23. <div class="formContent-item_title">人脸信息</div>
  24. <div class="detailImg">
  25. <div class="clickUpText">
  26. <img class="dataImg" v-if="!!detailsData.facePictureUrl" :src="detailsData.facePictureUrl" />
  27. <template v-else>
  28. <img class="bg-img" src="@/assets/img/ownerManagement/img_zhaopian2@2x.png" alt="" />
  29. <div>无人脸图片</div>
  30. </template>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="content-item" v-show="tabsIndex === 1">
  35. <div class="widthFlex" v-for="item in houseData" :key="item">
  36. <household-table :tableName="houseTable.left" :tabData="item"></household-table>
  37. <household-table :tableName="houseTable.right" :tabData="item"></household-table>
  38. </div>
  39. </div>
  40. <div class="content-item" v-show="tabsIndex === 2">
  41. <div class="formContent-item_title">车辆信息</div>
  42. </div>
  43. <div class="content-item" v-show="tabsIndex === 3">
  44. <div class="widthFlex" v-for="item in parkingData" :key="item">
  45. <household-table :tableName="parkingLotTable.left" :tabData="item"></household-table>
  46. <household-table :tableName="parkingLotTable.right" :tabData="item"></household-table>
  47. </div>
  48. </div>
  49. <div class="content-item" v-show="tabsIndex === 4">
  50. <div class="formContent-item_title">人员进出记录</div>
  51. </div>
  52. <div class="content-item" v-show="tabsIndex === 5">
  53. <div class="formContent-item_title">车辆进出记录</div>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import householdTable from './stepPage/householdTable.vue';
  60. export default {
  61. components: { householdTable },
  62. name: 'ownerManagementDetails',
  63. data() {
  64. let _this = this;
  65. return {
  66. tabsIndex: 0,
  67. id: null,
  68. detailsData: {},
  69. parkingData: [],
  70. houseData: [],
  71. tabs: [
  72. {
  73. lable: '住户信息'
  74. },
  75. {
  76. lable: '房屋信息'
  77. },
  78. {
  79. lable: '车辆信息'
  80. },
  81. {
  82. lable: '车位信息'
  83. },
  84. {
  85. lable: '人员进出记录'
  86. },
  87. {
  88. lable: '车辆进出记录'
  89. }
  90. ],
  91. householdTable: {
  92. left: [
  93. {
  94. lable: '姓名',
  95. prop: 'name'
  96. },
  97. {
  98. lable: '手机号',
  99. prop: 'phone'
  100. },
  101. {
  102. lable: '身份证号',
  103. prop: 'idNumber'
  104. },
  105. {
  106. lable: '出生日期',
  107. prop: 'birthDate'
  108. },
  109. {
  110. lable: '民族',
  111. prop: 'nation'
  112. }
  113. // {
  114. // lable: '入住时间',
  115. // prop: 'checkInDate'
  116. // }
  117. ],
  118. right: [
  119. // {
  120. // lable: '类型',
  121. // prop: 'householdType'
  122. // },
  123. {
  124. lable: '',
  125. prop: ''
  126. },
  127. {
  128. lable: '人员编号',
  129. prop: 'personnelNumber'
  130. },
  131. {
  132. lable: '性别',
  133. prop: 'sex',
  134. typeArray: [
  135. { type: 0, lable: '未知' },
  136. { type: 1, lable: '男' },
  137. { type: 2, lable: '女' }
  138. ]
  139. },
  140. {
  141. lable: '国籍',
  142. prop: 'nationality',
  143. typeArray: [
  144. { type: 1, lable: '中国' },
  145. { type: 2, lable: '其他' }
  146. ]
  147. },
  148. {
  149. lable: '户籍地址',
  150. prop: 'permanentAddress'
  151. }
  152. // {
  153. // lable: '现住地址',
  154. // prop: ''
  155. // }
  156. ]
  157. },
  158. houseTable: {
  159. left: [
  160. {
  161. lable: '所属社区',
  162. prop: 'communityName'
  163. },
  164. {
  165. lable: '单元',
  166. prop: 'unitName'
  167. },
  168. {
  169. lable: '房屋号',
  170. prop: 'roomNumber'
  171. },
  172. {
  173. lable: '建筑面积',
  174. prop: 'buildingArea'
  175. },
  176. {
  177. lable: '公摊面积',
  178. prop: 'publicArea'
  179. },
  180. {
  181. lable: '装修性质',
  182. prop: 'decorateProperties'
  183. },
  184. {
  185. lable: '房屋编号',
  186. prop: 'assetNumber'
  187. }
  188. ],
  189. right: [
  190. {
  191. lable: '楼宇名称',
  192. prop: 'buildingName'
  193. },
  194. {
  195. lable: '楼层',
  196. prop: 'floorNumber'
  197. },
  198. {
  199. lable: '房屋类型',
  200. prop: 'buildingType',
  201. typeArray: [
  202. { type: 1, lable: '住宅' },
  203. { type: 2, lable: '商用' }
  204. ]
  205. },
  206. {
  207. lable: '使用面积 ',
  208. prop: 'useArea'
  209. },
  210. {
  211. lable: '房屋户型',
  212. prop: 'housingType',
  213. typeArray: [
  214. { type: 1, lable: '室' },
  215. { type: 2, lable: '厅' },
  216. { type: 3, lable: '卫' }
  217. ]
  218. },
  219. {
  220. lable: '房屋朝向',
  221. prop: 'orientationOfRoom',
  222. typeArray: [
  223. { type: 1, lable: '东' },
  224. { type: 2, lable: '南' },
  225. { type: 3, lable: '西' },
  226. { type: 4, lable: '北' },
  227. { type: 5, lable: '东南' },
  228. { type: 6, lable: '西南' },
  229. { type: 7, lable: '西北' },
  230. { type: 8, lable: '东北' }
  231. ]
  232. },
  233. {
  234. lable: '住户类型',
  235. prop: 'householdTypeDict'
  236. }
  237. ]
  238. },
  239. parkingLotTable: {
  240. left: [
  241. {
  242. lable: '所属社区',
  243. prop: 'communityName'
  244. },
  245. {
  246. lable: '车库区域',
  247. prop: 'garageAreaName'
  248. },
  249. {
  250. lable: '车位类型',
  251. prop: 'parkingType',
  252. typeArray: [
  253. { type: 1, lable: '公共车位' },
  254. { type: 2, lable: '私人车位' }
  255. ]
  256. }
  257. ],
  258. right: [
  259. {
  260. lable: '车库名称',
  261. prop: 'garageName'
  262. },
  263. {
  264. lable: '车位编号',
  265. prop: 'parkingNumber'
  266. },
  267. {
  268. lable: '车位面积',
  269. prop: 'parkingArea'
  270. }
  271. ]
  272. }
  273. };
  274. },
  275. created() {
  276. this.id = this.$route.query.id;
  277. this.getDetails();
  278. this.getParking();
  279. this.getHouse();
  280. },
  281. methods: {
  282. toggleTab(index) {
  283. this.tabsIndex = index;
  284. },
  285. close() {
  286. let activeRout = this.$route;
  287. let tagsList = this.$store.getters['getTagsList'];
  288. tagsList.forEach((item, index) => {
  289. if (item.title == activeRout.meta.title || item.path == activeRout.path) {
  290. tagsList.splice(index, 1);
  291. history.go(-1);
  292. return true;
  293. }
  294. });
  295. },
  296. getDetails() {
  297. this.$http
  298. .get('/sc-community/scResident/find/' + this.id)
  299. .then(({ data, status, msg }) => {
  300. if (0 === status) {
  301. this.detailsData = data;
  302. } else {
  303. this.$message.error(msg);
  304. }
  305. })
  306. .catch(() => {});
  307. },
  308. getParking() {
  309. this.$http
  310. .get('/sc-community/assets/garage/parking/list/resident/parking', { residentId: this.id })
  311. .then(({ data, status, msg }) => {
  312. if (0 === status) {
  313. this.parkingData = data;
  314. } else {
  315. this.$message.error(msg);
  316. }
  317. })
  318. .catch(() => {});
  319. },
  320. getHouse() {
  321. this.$http
  322. .get('/sc-community/scResident/list/house', { residentId: this.id })
  323. .then(({ data, status, msg }) => {
  324. if (0 === status) {
  325. this.houseData = data;
  326. } else {
  327. this.$message.error(msg);
  328. }
  329. })
  330. .catch(() => {});
  331. }
  332. }
  333. };
  334. </script>
  335. <style lang='scss' scoped >
  336. @import './style.scss';
  337. .detailImg {
  338. width: 200px;
  339. height: 280px;
  340. background: #f8fcff;
  341. border-radius: 4px;
  342. border: 1px solid #e0e1e3;
  343. color: #424656;
  344. text-align: center;
  345. .clickUpText {
  346. position: inherit;
  347. img.bg-img {
  348. width: 100px;
  349. }
  350. }
  351. }
  352. </style>