

231214 김성훈 관리자단 - 사용자관리, 구독서비스 페이징 GET 방식으로 변경
@58da0170c8f54845240f751c8b8c5cf0ca7470cf
--- client/views/pages/admin/subscribe/Subscribe.vue
+++ client/views/pages/admin/subscribe/Subscribe.vue
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 |
</div> |
49 | 49 |
<div class="bottom-wrap"> |
50 | 50 |
<PaginationButton v-model:currentPage="subscListSearch.currentPage" :perPage="subscListSearch.perPage" |
51 |
- :totalCount="subscListCount" :maxRange="5" :click="subscSelectList" /> |
|
51 |
+ :totalCount="subscListCount" :maxRange="5" :click="subscSelectListPage" /> |
|
52 | 52 |
</div> |
53 | 53 |
</div> |
54 | 54 |
</div> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 |
data() { |
64 | 64 |
return { |
65 | 65 |
subscListSearch: { |
66 |
- currentPage: 1, |
|
66 |
+ currentPage: 0, |
|
67 | 67 |
perPage: 10, |
68 | 68 |
searchType: 'all', |
69 | 69 |
}, |
... | ... | @@ -135,14 +135,31 @@ |
135 | 135 |
alert("구독자 리스트 Excel 다운로드 오류, 관리자에게 문의해주세요."); |
136 | 136 |
}); |
137 | 137 |
}, |
138 |
+ |
|
139 |
+ subscSelectListPage: function() { |
|
140 |
+ this.$router.push({ path: '/adm/subscribe.page', query: { "page": this.subscListSearch.currentPage } }); |
|
141 |
+ } |
|
138 | 142 |
}, |
139 |
- watch: {}, |
|
143 |
+ watch: { |
|
144 |
+ 'subscListSearch.currentPage': function () { |
|
145 |
+ this.subscSelectList(); |
|
146 |
+ }, |
|
147 |
+ }, |
|
140 | 148 |
computed: {}, |
141 | 149 |
components: { |
142 | 150 |
PaginationButton: PaginationButton, |
143 | 151 |
}, |
152 |
+ created() { |
|
153 |
+ if(this.$route.query.page) { |
|
154 |
+ this.subscListSearch.currentPage = Number(this.$route.query.page); |
|
155 |
+ } else { |
|
156 |
+ this.subscListSearch.currentPage = 1; |
|
157 |
+ } |
|
158 |
+ }, |
|
144 | 159 |
mounted() { |
145 |
- this.subscSelectList() |
|
160 |
+ if(!this.$route.query.page) { |
|
161 |
+ this.subscSelectList() |
|
162 |
+ } |
|
146 | 163 |
} |
147 | 164 |
}; |
148 | 165 |
</script> |
--- client/views/pages/admin/user/CompanySelectOne.vue
+++ client/views/pages/admin/user/CompanySelectOne.vue
... | ... | @@ -338,7 +338,7 @@ |
338 | 338 |
}, |
339 | 339 |
//리스트 페이지로 이동 |
340 | 340 |
adminSelectListPage: function () { |
341 |
- this.$router.push({ path: '/adm/userSelectList.page', query: {} }); |
|
341 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: {'tab': this.$route.query.tab, 'Cpage' : this.$route.query.Cpage} }); |
|
342 | 342 |
}, |
343 | 343 |
|
344 | 344 |
resetPassword: function() { |
--- client/views/pages/admin/user/UserSelectList.vue
+++ client/views/pages/admin/user/UserSelectList.vue
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 |
<div class="content-wrap"> |
11 | 11 |
<ul class="tab-menu"> |
12 | 12 |
<li v-for="(tab, index) in tabMenu" :key="index"> |
13 |
- <a @click="currentTab = index" :class="{ active: currentTab === index }">{{ tab }}</a> |
|
13 |
+ <a @click="currentTabChange(index)" :class="{ active: currentTab === index }">{{ tab }}</a> |
|
14 | 14 |
</li> |
15 | 15 |
</ul> |
16 | 16 |
<div class="tab-content"> |
... | ... | @@ -305,6 +305,17 @@ |
305 | 305 |
}; |
306 | 306 |
}, |
307 | 307 |
methods: { |
308 |
+ currentTabChange: function(index) { |
|
309 |
+ this.currentTab = index; |
|
310 |
+ if(index === 0) { |
|
311 |
+ this.userSelectListPage(); |
|
312 |
+ } else if (index === 1) { |
|
313 |
+ this.companySelectListPage(); |
|
314 |
+ } else { |
|
315 |
+ this.managerSelectListPage(); |
|
316 |
+ } |
|
317 |
+ }, |
|
318 |
+ |
|
308 | 319 |
openModal: function () { |
309 | 320 |
this.isModalOpen = true; |
310 | 321 |
this.passwordSyncCheck() |
... | ... | @@ -589,28 +600,28 @@ |
589 | 600 |
|
590 | 601 |
//상세조회 페이지로 이동 |
591 | 602 |
userSelectOnePage: function (user) { |
592 |
- this.$router.push({ path: '/adm/userSelectOne.page', query: { 'user_id': user.user_id, 'Upage': this.userListSearch.currentPage } }); |
|
603 |
+ this.$router.push({ path: '/adm/userSelectOne.page', query: { 'tab': this.currentTab, 'Upage': this.userListSearch.currentPage, 'user_id': user.user_id } }); |
|
593 | 604 |
}, |
594 | 605 |
|
595 | 606 |
companySelectOnePage: function (company) { |
596 |
- this.$router.push({ path: '/adm/companySelectOne.page', query: { 'user_id': company.user_id, 'Cpage': this.companyListSearch.currentPage} }); |
|
607 |
+ this.$router.push({ path: '/adm/companySelectOne.page', query: { 'tab': this.currentTab, 'Cpage': this.companyListSearch.currentPage, 'user_id': company.user_id} }); |
|
597 | 608 |
}, |
598 | 609 |
|
599 | 610 |
//상세조회 페이지로 이동 |
600 | 611 |
adminSelectOnePage: function (admin) { |
601 |
- this.$router.push({ path: '/adm/userSelectOne.page', query: { 'mngr_id': admin.mngr_id, 'Mpage': this.managerListSearch.currentPage } }); |
|
612 |
+ this.$router.push({ path: '/adm/userSelectOne.page', query: { 'tab': this.currentTab, 'Mpage': this.managerListSearch.currentPage, 'mngr_id': admin.mngr_id } }); |
|
602 | 613 |
}, |
603 | 614 |
|
604 | 615 |
userSelectListPage: function() { |
605 |
- this.$router.push({ path: '/adm/userSelectList.page', query: { 'Upage': this.userListSearch.currentPage } }); |
|
616 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: { 'tab': this.currentTab, 'Upage': this.userListSearch.currentPage } }); |
|
606 | 617 |
}, |
607 | 618 |
|
608 | 619 |
companySelectListPage: function() { |
609 |
- this.$router.push({ path: '/adm/userSelectList.page', query: { 'Cpage': this.companyListSearch.currentPage } }); |
|
620 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: { 'tab': this.currentTab, 'Cpage': this.companyListSearch.currentPage } }); |
|
610 | 621 |
}, |
611 | 622 |
|
612 | 623 |
managerSelectListPage: function() { |
613 |
- this.$router.push({ path: '/adm/userSelectList.page', query: { 'Mpage': this.managerListSearch.currentPage } }); |
|
624 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: { 'tab': this.currentTab, 'Mpage': this.managerListSearch.currentPage } }); |
|
614 | 625 |
} |
615 | 626 |
}, |
616 | 627 |
watch: { |
... | ... | @@ -634,7 +645,7 @@ |
634 | 645 |
'managerListSearch.currentPage': function () { |
635 | 646 |
this.managerSelectList(); |
636 | 647 |
}, |
637 |
- |
|
648 |
+ |
|
638 | 649 |
}, |
639 | 650 |
computed: {}, |
640 | 651 |
components: { |
... | ... | @@ -643,18 +654,21 @@ |
643 | 654 |
created() { |
644 | 655 |
if(this.$route.query.Upage) { |
645 | 656 |
this.userListSearch.currentPage = Number(this.$route.query.Upage); |
657 |
+ this.currentTab = Number(this.$route.query.tab); |
|
646 | 658 |
} else { |
647 | 659 |
this.userListSearch.currentPage = 1; |
648 | 660 |
} |
649 | 661 |
|
650 | 662 |
if(this.$route.query.Cpage) { |
651 | 663 |
this.companyListSearch.currentPage = Number(this.$route.query.Cpage); |
664 |
+ this.currentTab = Number(this.$route.query.tab); |
|
652 | 665 |
} else { |
653 | 666 |
this.companyListSearch.currentPage = 1; |
654 | 667 |
} |
655 | 668 |
|
656 | 669 |
if(this.$route.query.Mpage) { |
657 | 670 |
this.managerListSearch.currentPage = Number(this.$route.query.Mpage); |
671 |
+ this.currentTab = Number(this.$route.query.tab); |
|
658 | 672 |
} else { |
659 | 673 |
this.managerListSearch.currentPage = 1; |
660 | 674 |
} |
--- client/views/pages/admin/user/UserSelectOne.vue
+++ client/views/pages/admin/user/UserSelectOne.vue
... | ... | @@ -339,7 +339,11 @@ |
339 | 339 |
|
340 | 340 |
//리스트 페이지로 이동 |
341 | 341 |
adminSelectListPage: function () { |
342 |
- this.$router.push({ path: '/adm/userSelectList.page', query: {} }); |
|
342 |
+ if(this.route.query.user_id) { |
|
343 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: {'tab': this.$route.query.tab, 'Upage' : this.$route.query.Upage} }); |
|
344 |
+ } else { |
|
345 |
+ this.$router.push({ path: '/adm/userSelectList.page', query: {'tab': this.$route.query.tab, 'Mpage' : this.$route.query.Mpage} }); |
|
346 |
+ } |
|
343 | 347 |
}, |
344 | 348 |
}, |
345 | 349 |
watch: {}, |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?