Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuzhen@situdata.com
/
yunxiao-admin-fe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ebf11268
authored
2020-10-23 16:45:27 +0800
by
zhen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix查询初始化page页数
1 parent
98a404ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
.env.development
src/utils/request.js
src/views/components/FooterPagination.vue
src/views/monitor.vue
.env.development
View file @
ebf1126
...
...
@@ -2,5 +2,5 @@
ENV = 'development'
# base api
#
VUE_APP_BASE_API = 'http://192.168.11.67:8096'
VUE_APP_BASE_API = 'https://beta-salecloud-hengan.situdata.com'
VUE_APP_BASE_API = 'http://192.168.11.67:8096'
#
VUE_APP_BASE_API = 'https://beta-salecloud-hengan.situdata.com'
...
...
src/utils/request.js
View file @
ebf1126
...
...
@@ -50,7 +50,7 @@ service.interceptors.response.use(
// 2909 登录超时
// cookie失效
Message
({
message
:
res
.
m
essage
||
'error'
,
message
:
res
.
m
sg
||
'error'
,
type
:
'error'
,
duration
:
5
*
1000
})
...
...
@@ -58,7 +58,7 @@ service.interceptors.response.use(
router
.
push
(
'/login'
)
}
else
if
(
res
&&
res
.
code
)
{
Message
({
message
:
res
.
m
essage
||
'error'
,
message
:
res
.
m
sg
||
'error'
,
type
:
'error'
,
duration
:
5
*
1000
})
...
...
src/views/components/FooterPagination.vue
View file @
ebf1126
...
...
@@ -4,6 +4,7 @@
background
layout=
"total, prev, pager, next, sizes, jumper"
:total=
"pagination.total"
:current-page
.
sync=
"pagination.page"
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
></el-pagination>
...
...
@@ -36,6 +37,10 @@ export default {
this
.
$emit
(
'pager'
,
{
...
this
.
pagination
})
},
methods
:
{
changeCurrentSize
(
page
)
{
this
.
pagination
.
page
=
page
this
.
handleCurrentChange
(
page
)
},
handleCurrentChange
(
page
)
{
this
.
$emit
(
'pager'
,
{
...
this
.
pagination
,
page
})
},
...
...
src/views/monitor.vue
View file @
ebf1126
...
...
@@ -39,9 +39,7 @@
</el-form>
</div>
<div
class=
"flex-end mb10"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleQueryOrderList"
>
查询
</el-button
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
查询
</el-button>
<el-button
size=
"mini"
@
click=
"onReset"
>
重置
</el-button>
</div>
<el-table
...
...
@@ -97,8 +95,9 @@
</el-table-column>
</el-table>
<FooterPaginationfrom
@
pager=
"handleGetPager
"
ref=
"paginationRef
"
:total=
"total"
@
pager=
"handleGetPager"
></FooterPaginationfrom>
</Card>
</template>
...
...
@@ -148,13 +147,17 @@ export default {
console
.
log
(
error
)
}
},
submit
()
{
// 会触发pager事件
this
.
$refs
.
paginationRef
.
changeCurrentSize
(
1
)
},
onReset
()
{
this
.
ruleForm
=
{
username
:
''
,
userId
:
''
,
times
:
[
''
,
''
]
}
this
.
handleQueryOrderLis
t
()
this
.
submi
t
()
},
handleGetPager
(
data
)
{
this
.
pagination
=
data
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment