details.vue 12 KB

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