details.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div>
  3. <el-table
  4. :data="tableData"
  5. border
  6. style="width: 100%"
  7. >
  8. <el-table-column
  9. prop="date"
  10. label="区域编号"
  11. width="180"
  12. >
  13. </el-table-column>
  14. <el-table-column
  15. prop="name"
  16. label="区域名称"
  17. width="180"
  18. >
  19. </el-table-column>
  20. <el-table-column
  21. prop="address"
  22. label="区域车位数"
  23. >
  24. </el-table-column>
  25. </el-table>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. props: ['params'],
  31. data () {
  32. return {
  33. tableData: []
  34. }
  35. },
  36. methods: {
  37. // /sc-community/parkingCar/findAreaInfo
  38. // 查询对应的信息
  39. region () {
  40. this.$http.post('/sc-community/parkingCar/findAreaInfo', { parkId: this.params.id }).then(({ data, status, msg }) => {
  41. this.tableData = [];
  42. for (let i = 0; i < data.length; i++) {
  43. this.tableData.push({
  44. date: data[i].areaCode,
  45. name: data[i].areaName,
  46. address: data[i].parkingNumber
  47. })
  48. }
  49. });
  50. }
  51. },
  52. created () {
  53. this.region();
  54. }
  55. }
  56. </script>