Commit 0ac447fe authored by daywrite's avatar daywrite

修复分页问题

parent 5e2ff3b2
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-col :span="4" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}"> <el-col :span="4" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="24"> <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 }}) <i class="fa fa-star" aria-hidden="true"></i>客户名称({{ isNullClient ? '未设置' : item.client.name }})
</router-link> </router-link>
</el-col> </el-col>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="searchKey"> <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> <i class="fa fa-fw fa-refresh faa-spin animated-hover"></i>
</a> </a>
</el-form-item> </el-form-item>
...@@ -43,6 +43,12 @@ export default { ...@@ -43,6 +43,12 @@ export default {
}, },
addNew () { addNew () {
this.$emit('update:headerAdd') this.$emit('update:headerAdd')
},
clear () {
if (window.localStorage) {
window.localStorage.clear()
this.$emit('update:headerClear')
}
} }
}, },
props: ['title', 'searchKey', 'addTitle'], props: ['title', 'searchKey', 'addTitle'],
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
:search-key="'ClientSearch'" :search-key="'ClientSearch'"
:add-title="'新建待办事项'" :add-title="'新建待办事项'"
@update:headerSearch="search => searchKeyword(search)" @update:headerSearch="search => searchKeyword(search)"
@update:headerAdd="() => addSch()"> @update:headerAdd="() => addSch()"
@update:headerClear="() => searchClear()">
</search-header> </search-header>
<search-form <search-form
ref="clientForm" ref="clientForm"
...@@ -151,6 +152,11 @@ export default { ...@@ -151,6 +152,11 @@ export default {
this.getFilter() this.getFilter()
}, },
searchClear () {
this.init()
this.reload()
},
reload () { reload () {
let ret = this.setParams({ let ret = this.setParams({
...this.form, ...this.form,
...@@ -179,7 +185,7 @@ export default { ...@@ -179,7 +185,7 @@ export default {
let ret = this.setParams({ let ret = this.setParams({
...this.form, ...this.form,
page: this.pagenation.thispage page: this.pagenation.thispage
}, pager) }, {page: pager.thispage})
this.getScheduleList(ret) 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