-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.patch
440 lines (437 loc) · 12.6 KB
/
1.patch
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
Index: src/myView/manager/manager.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/myView/manager/manager.vue (revision 91c0f7b756f78912b9c521b58822a8c851692b3d)
+++ src/myView/manager/manager.vue (date 1572401731103)
@@ -11,245 +11,172 @@
</Row>
</Card>
<Card>
- <Row style="margin-bottom: 10px;">
- <span>关键字:</span>
- <Input placeholder="请输入姓名查询" v-model.trim='searchText' style="width:200px;margin-right:20px;"></Input>
- <Button type="primary" @click='search'>搜索</Button>
- </Row>
- <Table size="large" @on-selection-change="selectOption" stripe ref="selection" :columns="tableCol" :data="tableData"></Table>
- <Page class='mt-10 text-right' :total="total" :current='currentPage' :page-size='pageSize' @on-change="changePage" @on-page-size-change="changeSize" show-sizer show-total />
+ <Row style="margin-bottom: 10px;">
+ <span>关键字:</span>
+ <Input placeholder="请输入姓名查询" v-model.trim='searchText' style="width:200px;margin-right:20px;"></Input>
+ <Button type="primary" @click='search'>搜索</Button>
+ </Row>
+ <Table size="large" @on-selection-change="selectOption" stripe ref="selection" :columns="tableCol"
+ :data="tableData"></Table>
+ <Page class='mt-10 text-right' :total="total" :current='currentPage' :page-size='pageSize' @on-change="changePage"
+ @on-page-size-change="changeSize" show-sizer show-total/>
</Card>
- <!-- <Modal
- v-model="recordModal"
- title="操作"
- @on-cancel="closeRecordModal"
- width =60>
- <Table height="300" stripe :columns="recordCol" :data="recordData"></Table>
- <Button type="success" long @click="recordLoadMore">加载更多</Button>
- <div slot="footer">
- <Button type="default" @click="closeRecordModal">关闭</Button>
- </div>
- </Modal> -->
</div>
</template>
<script>
-import { ManagerTableData, commentDel,recordTableData,editLandlordData} from '@/api/data'
-export default {
- data () {
- return {
- // startTime: '', // 入住日期初始化
- // endTime: '', // 退房日期初始化
- searchText: '', // 搜索内容初始化
- pageSize:10,
- currentPage:1,
- total:1,
+ import {commentDel, ManagerTableData,} from '@/api/data'
+
+ export default {
+ data () {
+ return {
+ // startTime: '', // 入住日期初始化
+ // endTime: '', // 退房日期初始化
+ searchText: '', // 搜索内容初始化
+ pageSize: 10,
+ currentPage: 1,
+ total: 1,
-// recordModal:false, //记录模态框
-// tableCurrentPage:1, //住房记录当前页码
-// tableTotalPage:1, //住房记录总页码
-// userId:'', //住房记录用户id
-
- selectItemArr: [], // 选中项目id
- tableCol: [
- {
- type: 'selection',
- width: 60,
- align: 'center'
- },
- {
- title: '姓名',
- key: 'name'
- },
- {
- title: '手机号',
- key: 'phone'
- },
- {
- title: '权限内容',
- key: 'roleName'
- },
- /*{
- title: '操作',
- key: 'examineStatus',
- width:100,
- render: (h, params) => {
- return h('div', [
- h('Button', {
- props: {
- type: 'primary',
- size: 'large'
- },
- on: {
- click: () => {
- this.userId = params.row.id;
- this.tableInit();
- this.recordModal = true;
- }
- }
- }, '详情')
- ])
- }
- }*/
- ],
- tableData: [
- /*{
- createTime: '2018-01-03',
- idNumber: '111111111111111111',
- thisHourse: '2',
- phone: '18738790000',
- name: '用户1',
- id: 1
- // record: "详情",
- }*/
- ],
- /*recordCol:[
- {
- title: '管理员名称',
- key: 'userneme'
- },
- {
- title: '房屋地址',
- key: 'positionAddr'
- },
- {
- title: '房屋名称',
- key: 'name'
- },
- {
- title: '入住时间',
- key: 'intime'
- },
- {
- title: '退房时间',
- key: 'outtime'
- },
- ],*/
- recordData:[
- ]
- }
- },
- methods: {
- async pageInit(){
- ManagerTableData(this.pageSize,this.currentPage,this.searchText).then(res => {
- if(res.data.success){
- this.total = res.data.result.pageBounds.totalSize;
- this.tableData = res.data.result.pageBounds.pageList;
- }else if(res.data.errorMsg){
- this.$Message.warning({
- content:res.data.errorMsg
- })
- }
- })
- },
- /*async tableInit(){
- recordTableData(this.userId,this.tableCurrentPage).then(res => {
- console.log("+++++"+JSON.stringify(res));
- if(res.data.success){
- this.tableCurrentPage = res.data.result.data.currectPage;
- this.tableTotalPage = res.data.result.data.totalPage;
- var dataList = res.data.result.data.pageList;
- var recordO = {};
- for(let item of dataList) {
- recordO = {};
- recordO.id = item.id;
- recordO.intime = item.intime;
- recordO.outtime = item.outtime;
- recordO.area = item.lock.longAddress;
- recordO.positionAddr = item.lock.positionAddr;
- recordO.name = item.lock.name;
- this.recordData.push(recordO);
- }
- }else if(res.data.errorMsg){
- this.$Message.warning({
- content:res.data.errorMsg
- })
- }
- })
- },*/
- changePage(page){
- this.currentPage = page;
- this.pageInit();
- },
- changeSize(size){
- this.pageSize = size;
- this.currentPage = 1;
- this.pageInit();
- },
- // 选中项
- selectOption (selection, row) {
- this.selectItemArr = []
- for (let item of selection) {
- this.selectItemArr.push(item.id)
- }
- },
- // 删除
- myDelete () {
- var selectItemArr = this.selectItemArr
- if(selectItemArr.length<1){
- this.$Message.warning({
- content:'请选择项目!'
- })
- return;
- }
- commentDel('/manager/delManager', selectItemArr).then(res => {
- if(res.data.success){
- this.selectItemArr=[];
- this.pageInit();
- this.$Message.success({
- content:'删除成功!'
- });
- }else if(res.data.errorMsg){
- this.$Message.warning({
- content:res.data.errorMsg
- })
- }
+ selectItemArr: [], // 选中项目id
+ tableCol: [
+ {
+ type: 'selection',
+ width: 60,
+ align: 'center'
+ },
+ {
+ title: '姓名',
+ key: 'name'
+ },
+ {
+ title: '手机号',
+ key: 'phone'
+ },
+ {
+ title: '权限内容',
+ key: 'roleName'
+ },
+ /* {
+ title: '操作',
+ key: 'examineStatus',
+ width:100,
+ render: (h, params) => {
+ return h('div', [
+ h('Button', {
+ props: {
+ type: 'primary',
+ size: 'large'
+ },
+ on: {
+ click: () => {
+ this.userId = params.row.id;
+ this.tableInit();
+ this.recordModal = true;
+ }
+ }
+ }, '详情')
+ ])
+ }
+ } */
+ ],
+ }
+ },
+ methods: {
+ async pageInit () {
+ ManagerTableData(this.pageSize, this.currentPage, this.searchText).then(res => {
+ if (res.data.success) {
+ this.total = res.data.result.pageBounds.totalSize
+ this.tableData = res.data.result.pageBounds.pageList
+ } else if (res.data.errorMsg) {
+ this.$Message.warning({
+ content: res.data.errorMsg
+ })
+ }
+ })
+ },
+ changePage (page) {
+ this.currentPage = page
+ this.pageInit()
+ },
+ changeSize (size) {
+ this.pageSize = size
+ this.currentPage = 1
+ this.pageInit()
+ },
+ // 选中项
+ selectOption (selection, row) {
+ this.selectItemArr = []
+ for (let item of selection) {
+ this.selectItemArr.push(item.id)
+ }
+ },
+ // 删除
+ myDelete () {
+ var selectItemArr = this.selectItemArr
+ if (selectItemArr.length < 1) {
+ this.$Message.warning({
+ content: '请选择项目!'
+ })
+ return
+ }
+ commentDel('/manager/delManager', selectItemArr).then(res => {
+ if (res.data.success) {
+ this.selectItemArr = []
+ this.pageInit()
+ this.$Message.success({
+ content: '删除成功!'
+ })
+ } else if (res.data.errorMsg) {
+ this.$Message.warning({
+ content: res.data.errorMsg
+ })
+ }
- // this.tableData = res.data.result.data.pageList;
- })
- },
- // 入住日期
- myStartTime (newTime) {
- this.startTime = newTime
- },
- // 退房日期
- myEndTime (newTime) {
- this.endTime = newTime
- },
- // 搜索
- search () {
- this.currentPage = 1;
- this.pageInit();
- },
- /* recordLoadMore(){
- if(this.tableCurrentPage === this.tableTotalPage){
- this.$Message.warning({
- content:'暂无更多数据'
- })
- return;
- }
- this.tableCurrentPage += 1;
- this.tableInit();
- },*/
- closeRecordModal(){
- this.recordModal = false;
- this.tableCurrentPage = 1;
- this.recordData = [];
- }
+ // this.tableData = res.data.result.data.pageList;
+ })
+ },
+ // 入住日期
+ myStartTime (newTime) {
+ this.startTime = newTime
+ },
+ // 退房日期
+ myEndTime (newTime) {
+ this.endTime = newTime
+ },
+ // 搜索
+ search () {
+ this.currentPage = 1
+ this.pageInit()
+ },
+ /* recordLoadMore(){
+ if(this.tableCurrentPage === this.tableTotalPage){
+ this.$Message.warning({
+ content:'暂无更多数据'
+ })
+ return;
+ }
+ this.tableCurrentPage += 1;
+ this.tableInit();
+ },*/
+ closeRecordModal () {
+ this.recordModal = false
+ this.tableCurrentPage = 1
+ this.recordData = []
+ }
- },
- mounted () {
- // 初始化
- ManagerTableData(10, 1).then(res => {
- if(res.data.success){
- console.log("+++++"+JSON.stringify(res))
- this.total = res.data.result.pageBounds.totalSize;
- this.tableData = res.data.result.pageBounds.pageList;
- }else if(res.data.errorMsg){
- this.$Message.warning({
- content:res.data.errorMsg
- })
- }
- })
- }
-}
+ },
+ mounted () {
+ // 初始化
+ ManagerTableData(10, 1).then(res => {
+ if (res.data.success) {
+ console.log('+++++' + JSON.stringify(res))
+ this.total = res.data.result.pageBounds.totalSize
+ this.tableData = res.data.result.pageBounds.pageList
+ } else if (res.data.errorMsg) {
+ this.$Message.warning({
+ content: res.data.errorMsg
+ })
+ }
+ })
+ }
+ }
</script>
Index: src/router/routers.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/router/routers.js (revision 91c0f7b756f78912b9c521b58822a8c851692b3d)
+++ src/router/routers.js (date 1572401798316)
@@ -50,8 +50,7 @@
name: '管理员',
component: Main,
meta: {
- hide: true,
- access: ['superAdmin']
+ hide: true
},
children: [
{
@@ -255,7 +254,7 @@
// icon: 'ios-book'
// }
// },
-
+
// {
// path: '/components',
// name: 'components',