index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <!-- 车场管理 -->
  2. <template>
  3. <div class="mian">
  4. <div class="search">
  5. <el-input
  6. placeholder="输入车场名称查询"
  7. class="search-input"
  8. clearable
  9. v-model="mixins_query.garageName"
  10. ></el-input>
  11. <el-select
  12. placeholder="社区名称"
  13. clearable
  14. v-model="mixins_query.communityId"
  15. >
  16. <el-option
  17. v-for="(item,index) in community"
  18. :key="index"
  19. :value="item.nameId"
  20. :label="item.name"
  21. ></el-option>
  22. </el-select>
  23. <el-button
  24. type="primary"
  25. class="search-btn"
  26. @click="mixins_search"
  27. icon="el-icon-search"
  28. >查询</el-button>
  29. </div>
  30. <zz-table
  31. :cols="cols"
  32. :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
  33. :data="mixins_list"
  34. :pageset="mixins_pageset"
  35. @page-change="pageChange"
  36. @selection-change="selectionChange"
  37. >
  38. <template
  39. slot-scope="scope"
  40. slot="opt"
  41. >
  42. <div class="opt">
  43. <el-tooltip
  44. class="item"
  45. effect="light"
  46. placement="bottom"
  47. content="查看"
  48. >
  49. <i
  50. class="zoniot_font zoniot-icon-xiangqing"
  51. @click="lookDetails(scope.row)"
  52. ></i>
  53. </el-tooltip>
  54. </div>
  55. </template>
  56. </zz-table>
  57. </div>
  58. </template>
  59. <script>
  60. import index from './index'
  61. import list from '@utils/list';
  62. export default {
  63. mixins: [index, list],
  64. data () {
  65. return {
  66. mixins_post: 'post',
  67. community: [],//社区名称
  68. };
  69. },
  70. methods: {
  71. // 获取社区名称
  72. queryCommunity () {
  73. this.$http.get('/sc-community/assets/community/list').then(({ data, status, msg }) => {
  74. console.log('data', data);
  75. this.community = [];
  76. for (let i = 0; i < data.length; i++) {
  77. this.community.push({
  78. name: data[i].communityName,
  79. nameId: data[i].id
  80. })
  81. }
  82. console.log(this.community);
  83. });
  84. },
  85. // 查询对应的详情
  86. lookDetails (row) {
  87. new Promise((resolve) => {
  88. this.$store.dispatch('addPopup', {
  89. url: '/parkingManagement/setpPage/details.vue',
  90. width: '748px',
  91. height: '300px',
  92. props: {
  93. id: row.parkId,
  94. // callback: resolve
  95. },
  96. showConfirmButton: true,
  97. showCancelButton: true,
  98. hideStar: true,
  99. title: '分区信息'
  100. });
  101. }).then(() => {
  102. this.mixins_search();
  103. });
  104. }
  105. },
  106. created () {
  107. // 默认查询
  108. this.mixins_dataUrl = '/sc-community/parkingCar/findParkInfo';
  109. this.mixins_query = {};
  110. this.mixins_search();
  111. // 社区名称
  112. this.queryCommunity();
  113. },
  114. }
  115. </script>