ebf11268 by zhen

fix查询初始化page页数

1 parent 98a404ed
......@@ -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'
......
......@@ -50,7 +50,7 @@ service.interceptors.response.use(
// 2909 登录超时
// cookie失效
Message({
message: res.message || 'error',
message: res.msg || '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.message || 'error',
message: res.msg || 'error',
type: 'error',
duration: 5 * 1000
})
......
......@@ -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 })
},
......
......@@ -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.handleQueryOrderList()
this.submit()
},
handleGetPager(data) {
this.pagination = data
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!