index.vue
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<script setup lang="ts">
import { reactive,onMounted } from "vue";
import { getTableList } from "@/api/community";
import Pagination from "@/components/Pagination/index.vue";
// 搜索列表参数
const form = reactive({
propertyId: 1,
type:0,
name: null,
});
// 表格
const tableList = [
{
propertyId: 1,
name: null,
},
{
propertyId: 1,
name: null,
},
];
/**
* 列表查询
*/
const search = () => {
getTableList(form)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
};
onMounted(()=>{
search()
// console.log()
})
</script>
<template>
<div class="app-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input placeholder="请输入社区名称" v-model="form.name"></el-input>
</el-form-item>
<el-form-item
><el-button type="primary" @click="search"
>查询</el-button
></el-form-item
>
<el-row>
<el-form-item>
<el-button type="primary">导入</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary">新增</el-button>
</el-form-item>
</el-row>
</el-form>
<el-table border :data="tableList">
<el-table-column label="小区名称"></el-table-column>
<el-table-column label="楼座数"></el-table-column>
<el-table-column label="储藏室数"></el-table-column>
<el-table-column label="车位数"></el-table-column>
<el-table-column label="所在地区"></el-table-column>
<el-table-column label="详细地址"></el-table-column>
<el-table-column label="操作">
<template #default>
<el-button type="text" size="mini">编辑</el-button>
<el-button type="text" size="mini">删除</el-button>
<el-button type="text" size="mini">楼宇管理</el-button>
</template>
</el-table-column>
</el-table>
<!-- <Pagination
></Pagination> -->
</div>
</template>
<style></style>