Commit 23daf6b217c1fb5126f6db365a4f07f35af1bdc9

Authored by 杨泽宇
1 parent 3043763b

debug

src/api/resident/index.ts deleted 100644 → 0
1 -import request from '../request'  
2 -  
3 -/**  
4 - * @description 居民列表  
5 - * @function residentList  
6 - */  
7 -export function residentList (params) {  
8 - for (const i in params) {  
9 - if (!(params[i] + '').trim()) {  
10 - delete params[i]  
11 - }  
12 - }  
13 - return request({  
14 - method: 'get',  
15 - url: '/resident/residentList',  
16 - params: {  
17 - page: 1,  
18 - pageSize: 10  
19 - }  
20 - })  
21 -}  
22 -  
23 -/**  
24 - * @description 新增住户  
25 - * @function propertyAdd  
26 - */  
27 -export function residentAdd (data) {  
28 - return request({  
29 - method: 'post',  
30 - url: '/resident/insert',  
31 - data: data  
32 - })  
33 -}  
34 \ No newline at end of file 0 \ No newline at end of file
src/api/tengxi/index.ts deleted 100644 → 0
1 -import request from '../request'  
2 -  
3 -export const home_list = async ( params: any ) => {  
4 - let res: any = await request.get( '/user/list', { params } )  
5 - return res  
6 -}  
7 -  
8 -export function getUserInfo(id) {  
9 - return request({  
10 - method: 'get',  
11 - url: '/user/list',  
12 - params: { id }  
13 - })  
14 -}  
15 -  
16 -export function propertyList () {  
17 - return request({  
18 - method: 'get',  
19 - url: '/property/list',  
20 - params: {  
21 - page: 1,  
22 - pageSize: 10  
23 - }  
24 - })  
25 -}  
26 \ No newline at end of file 0 \ No newline at end of file
src/router/index.ts
@@ -3,7 +3,6 @@ import System from './modules/system' @@ -3,7 +3,6 @@ import System from './modules/system'
3 import Permission from './modules/permission' 3 import Permission from './modules/permission'
4 import Role from "./modules/role" 4 import Role from "./modules/role"
5 import User from "./modules/user" 5 import User from "./modules/user"
6 -import Resident from "./modules/resident"  
7 import Property from "./modules/property" 6 import Property from "./modules/property"
8 import Community from "./modules/community" 7 import Community from "./modules/community"
9 import OwnerManagement from "./modules/ownerManagement" 8 import OwnerManagement from "./modules/ownerManagement"
@@ -44,7 +43,6 @@ const routes: Array<any> = [ @@ -44,7 +43,6 @@ const routes: Array<any> = [
44 Permission, 43 Permission,
45 Role, 44 Role,
46 User, 45 User,
47 - Resident,  
48 Property, 46 Property,
49 Community, 47 Community,
50 OwnerManagement, 48 OwnerManagement,
src/router/modules/resident.ts deleted 100644 → 0
1 -import { RouteRecordRaw } from 'vue-router'  
2 -import Layout from '@/layout/enter.vue'  
3 -const resident= {  
4 - path: '/',  
5 - component: Layout,  
6 - name: 'Resident',  
7 - children: [{  
8 - path: 'resident',  
9 - name: 'resident',  
10 - component: () => import('@/views/resident/index.vue'),  
11 - meta: { title: '业主住户管理' }  
12 - }]  
13 -}  
14 -  
15 -export default resident  
src/views/resident/index.vue deleted 100644 → 0
1 -<script setup lang="ts">  
2 -import { reactive, ref } from "vue";  
3 -import { propertyList } from "@/api/tengxi";  
4 -import Pagination from "@/components/Pagination/index.vue";  
5 -let data = reactive([]);  
6 -let loading = ref(false);  
7 -let params = reactive({  
8 - total: 0,  
9 - query: {  
10 - page: 1,  
11 - pageSize: 10,  
12 - },  
13 -});  
14 -const handlePageChange = (page, size) => {  
15 - params.query.page = page;  
16 - params.query.pageSize = size;  
17 -};  
18 -</script>  
19 -  
20 -<template>  
21 - <div class="page-container">  
22 - <h1>居民列表</h1>  
23 - <el-table  
24 - :data="data"  
25 - style="width: 100%"  
26 - border  
27 - v-loading="loading"  
28 - element-loading-text="拼命加载中"  
29 - >  
30 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
31 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
32 - <el-table-column prop="address" label="地址"> </el-table-column>  
33 - <el-table-column prop="status" label="状态">  
34 - <template #default="scope">  
35 - {{ scope.row.status }}  
36 - </template>  
37 - </el-table-column>  
38 - <el-table-column label="按钮">  
39 - <template #default="scope">  
40 - <el-button type="primary">哈哈</el-button>  
41 - </template>  
42 - </el-table-column>  
43 - </el-table>  
44 - <Pagination  
45 - :total="params.total"  
46 - :currentPage="params.query.page"  
47 - :pageSize="params.query.pageSize"  
48 - @pageChange="handlePageChange"  
49 - ></Pagination>  
50 - </div>  
51 -</template>  
src/views/tengxi/about.vue deleted 100644 → 0
1 -<script setup lang="ts">  
2 -import { reactive,getCurrentInstance } from "vue";  
3 -import {globalFilters} from '@/utils/tool'  
4 -import Pagination from '@/components/Pagination/index.vue'  
5 -// import {tengxiTestStore} from '@/pinia/index'  
6 -import * as all from '@/pinia/index'  
7 -// const store = tengxiTestStore()  
8 -// console.log(store)  
9 -const data = reactive([  
10 - {  
11 - date: "2016-05-03",  
12 - name: "王小虎",  
13 - address: "上海市普陀区金沙江路 1516 弄",  
14 - status: 0  
15 - },  
16 - {  
17 - date: "2016-05-03",  
18 - name: "王小虎",  
19 - address: "上海市普陀区金沙江路 1516 弄",  
20 - status: 0  
21 - },  
22 - {  
23 - date: "2016-05-03",  
24 - name: "王小虎",  
25 - address: "上海市普陀区金沙江路 1516 弄",  
26 - status: 0  
27 - },  
28 -]);  
29 -  
30 -const statusArray = [{  
31 - label: '启用',  
32 - value: 1  
33 -}, {  
34 - label: '禁用',  
35 - value: 2  
36 -}, {  
37 - label: '舍弃',  
38 - value: 0  
39 -}, {  
40 - label: '上线',  
41 - value: 3  
42 -}]  
43 -  
44 -// const filterStatus = (status) => {  
45 -// return statusArray.find(item => ~~item.value == ~~status)['label']  
46 -// }  
47 -  
48 -const thisLine = (obj) => {  
49 - console.log(obj.status)  
50 -}  
51 -  
52 -const pageDataStore = reactive({  
53 - page: 1,  
54 - pageSize: 10  
55 - })  
56 -  
57 - const test = (page, size, tagName) => {  
58 - console.log('分页的回调')  
59 - console.log(page)  
60 - console.log(size)  
61 - console.log(tagName)  
62 - pageDataStore.page = page  
63 - pageDataStore.pageSize = size  
64 - }  
65 -  
66 -// const addAge = () => {  
67 -// console.log('add one age')  
68 -// console.log(store.age)  
69 -// store.grown()  
70 -// console.log(store.age)  
71 -// }  
72 -// const initPinia = () => {  
73 -// store.init()  
74 -// }  
75 -</script>  
76 -  
77 -<template>  
78 - <div class="page-container">  
79 - <!-- <p class="tengxi">Tengxi About Page</p>  
80 - <el-button type="primary">成功</el-button>  
81 - <p>测试pinia数据:{{all.family.dataStore().data1}}</p> -->  
82 - <!-- <el-button @click="addAge">长一岁</el-button>  
83 - <el-button @click="initPinia">初始化pinia</el-button> -->  
84 -  
85 - <el-table :data="data" style="width: 100%" border>  
86 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
87 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
88 - <el-table-column prop="address" label="地址"> </el-table-column>  
89 - <el-table-column prop="status" label="状态">  
90 - <template #default="scope">  
91 - {{globalFilters(scope.row.status, statusArray)}}  
92 - </template>  
93 - </el-table-column>  
94 - <el-table-column label="按钮">  
95 - <template #default="scope">  
96 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
97 - </template>  
98 - </el-table-column>  
99 - </el-table>  
100 - <el-table :data="data" style="width: 100%" border>  
101 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
102 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
103 - <el-table-column prop="address" label="地址"> </el-table-column>  
104 - <el-table-column prop="status" label="状态">  
105 - <template #default="scope">  
106 - {{globalFilters(scope.row.status, statusArray)}}  
107 - </template>  
108 - </el-table-column>  
109 - <el-table-column label="按钮">  
110 - <template #default="scope">  
111 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
112 - </template>  
113 - </el-table-column>  
114 - </el-table>  
115 - <el-table :data="data" style="width: 100%" border>  
116 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
117 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
118 - <el-table-column prop="address" label="地址"> </el-table-column>  
119 - <el-table-column prop="status" label="状态">  
120 - <template #default="scope">  
121 - {{globalFilters(scope.row.status, statusArray)}}  
122 - </template>  
123 - </el-table-column>  
124 - <el-table-column label="按钮">  
125 - <template #default="scope">  
126 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
127 - </template>  
128 - </el-table-column>  
129 - </el-table>  
130 - <el-table :data="data" style="width: 100%" border>  
131 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
132 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
133 - <el-table-column prop="address" label="地址"> </el-table-column>  
134 - <el-table-column prop="status" label="状态">  
135 - <template #default="scope">  
136 - {{globalFilters(scope.row.status, statusArray)}}  
137 - </template>  
138 - </el-table-column>  
139 - <el-table-column label="按钮">  
140 - <template #default="scope">  
141 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
142 - </template>  
143 - </el-table-column>  
144 - </el-table>  
145 - <Pagination tagName="second" :total="data.length" :currentPage="pageDataStore.page" :pageSize="pageDataStore.pageSize" @pageChange="test"></Pagination>  
146 - <el-table :data="data" style="width: 100%" border>  
147 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
148 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
149 - <el-table-column prop="address" label="地址"> </el-table-column>  
150 - <el-table-column prop="status" label="状态">  
151 - <template #default="scope">  
152 - {{globalFilters(scope.row.status, statusArray)}}  
153 - </template>  
154 - </el-table-column>  
155 - <el-table-column label="按钮">  
156 - <template #default="scope">  
157 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
158 - </template>  
159 - </el-table-column>  
160 - </el-table>  
161 - <el-table :data="data" style="width: 100%" border>  
162 - <el-table-column prop="date" label="日期" width="180"> </el-table-column>  
163 - <el-table-column prop="name" label="姓名" width="180"> </el-table-column>  
164 - <el-table-column prop="address" label="地址"> </el-table-column>  
165 - <el-table-column prop="status" label="状态">  
166 - <template #default="scope">  
167 - {{globalFilters(scope.row.status, statusArray)}}  
168 - </template>  
169 - </el-table-column>  
170 - <el-table-column label="按钮">  
171 - <template #default="scope">  
172 - <el-button type="primary" @click="thisLine(scope.row)">哈哈</el-button>  
173 - </template>  
174 - </el-table-column>  
175 - </el-table>  
176 - </div>  
177 -</template>  
src/views/tengxi/index.vue deleted 100644 → 0
1 -<script setup lang="ts">  
2 - import {ref, onMounted, reactive} from 'vue'  
3 - import Test from '@/components/Test/index.vue'  
4 - import Pagination from '@/components/Pagination/index.vue'  
5 - // import { onMounted, reactive, ref } from 'vue'  
6 - // const pageSizes = reactive([10, 20, 40, 30])  
7 - // const pageSize = ref(5)  
8 - // const currentPage = ref(1)  
9 - // const getSizeChange = (size) => {  
10 - // console.log('size change')  
11 - // console.log(size)  
12 - // console.log(pageSize.value)  
13 - // pageSize.value = size  
14 - // }  
15 - // const getCurrentChange = (cur) => {  
16 - // console.log('cur change')  
17 - // console.log(cur)  
18 - // console.log(currentPage.value)  
19 - // currentPage.value = cur  
20 - // }  
21 -  
22 - // 上级页面和下级组件中的函数、数据交互,组件视图上加ref  
23 - const testExpose = ref(null)  
24 - onMounted(() => {  
25 - console.log(testExpose.value)  
26 - console.log(testExpose.value.count)  
27 - testExpose.value.singleFunc()  
28 - })  
29 - const changeCount = () => {  
30 - testExpose.value.addCount()  
31 - console.log(testExpose.value.count)  
32 - }  
33 - const acceptEmit = (value) => {  
34 - console.log('页面中监听组件的事件')  
35 - console.log(value)  
36 - }  
37 - const getTitle = (v) => {  
38 - console.log('新的回调监听')  
39 - console.log(v)  
40 - }  
41 - const data = reactive({  
42 - limit: true,  
43 - maxSize: 10010,  
44 - collections: ['苹果', '胡椒'],  
45 - title: ''  
46 - })  
47 - const pageData = reactive({  
48 - total: 108,  
49 - page: 1,  
50 - pageSize: 10  
51 - })  
52 - const pageDataStore = reactive({  
53 - total: 178,  
54 - page: 1,  
55 - pageSize: 10  
56 - })  
57 - const handlePageChange = (page, size, tagName) => {  
58 - console.log('分页的回调')  
59 - console.log(page)  
60 - console.log(size)  
61 - console.log(tagName)  
62 - pageData.page = page  
63 - pageData.pageSize = size  
64 - }  
65 - const test = (page, size, tagName) => {  
66 - console.log('分页的回调')  
67 - console.log(page)  
68 - console.log(size)  
69 - console.log(tagName)  
70 - pageDataStore.page = page  
71 - pageDataStore.pageSize = size  
72 - }  
73 -</script>  
74 -  
75 -<template>  
76 - <div style="background-color: lightgreen; padding: 20px;">  
77 - <p>这是组件外的上级页面</p>  
78 - <el-button type="warning" @click="changeCount">改组件里的count</el-button>  
79 - <!-- <Test ref="testExpose" :maxSize="10086" :limit="true" :collections="['厕所', '阳台']" @emitFunc="acceptEmit"></Test> -->  
80 - <Test ref="testExpose" v-model:title="data.title" @update:title="getTitle"></Test>  
81 - <!-- <Test ref="testExpose" :maxSize="data.maxSize" :limit="data.limit" :collections="data.collections" @emitFunc="  
82 - acceptEmit"></Test> -->  
83 - </div>  
84 - <!-- {{pageSize}} |||| {{currentPage}} -->  
85 - <!-- {{hello.total}} -->  
86 - <Pagination tagName="first" :total="pageData.total" :currentPage="pageData.page" :pageSize="pageData.pageSize" @pageChange="handlePageChange"></Pagination>  
87 - <Pagination tagName="second" :total="pageDataStore.total" :currentPage="pageDataStore.page" :pageSize="pageDataStore.pageSize" @pageChange="test"></Pagination>  
88 - <!-- <Pagination :total="100" :pageSize="pageSize" :currentPage:update="currentPage" :pageSizes="pageSizes" @handleSizeChange="getSizeChange" @handleCurrentChange="getCurrentChange"></Pagination> -->  
89 -</template>