Commit 0ac447fe authored by daywrite's avatar daywrite

修复分页问题

parent 5e2ff3b2
......@@ -4,7 +4,7 @@
<el-col :span="4" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}">
<el-row :gutter="10">
<el-col :span="24">
<router-link :to="{ app: 'client', name: 'viewClient', params: {id: item.id} }">
<router-link :to="{ app: 'client', name: 'viewClient', params: {id: item.client_id} }">
<i class="fa fa-star" aria-hidden="true"></i>客户名称({{ isNullClient ? '未设置' : item.client.name }})
</router-link>
</el-col>
......
......@@ -17,7 +17,7 @@
</el-button>
</el-form-item>
<el-form-item v-if="searchKey">
<a class="btn">
<a class="btn" @click.stop.prevent="clear">
<i class="fa fa-fw fa-refresh faa-spin animated-hover"></i>
</a>
</el-form-item>
......@@ -43,6 +43,12 @@ export default {
},
addNew () {
this.$emit('update:headerAdd')
},
clear () {
if (window.localStorage) {
window.localStorage.clear()
this.$emit('update:headerClear')
}
}
},
props: ['title', 'searchKey', 'addTitle'],
......
......@@ -7,7 +7,8 @@
:search-key="'ClientSearch'"
:add-title="'新建待办事项'"
@update:headerSearch="search => searchKeyword(search)"
@update:headerAdd="() => addSch()">
@update:headerAdd="() => addSch()"
@update:headerClear="() => searchClear()">
</search-header>
<search-form
ref="clientForm"
......@@ -151,6 +152,11 @@ export default {
this.getFilter()
},
searchClear () {
this.init()
this.reload()
},
reload () {
let ret = this.setParams({
...this.form,
......@@ -179,7 +185,7 @@ export default {
let ret = this.setParams({
...this.form,
page: this.pagenation.thispage
}, pager)
}, {page: pager.thispage})
this.getScheduleList(ret)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment