Commit 351950a7 authored by huai.li's avatar huai.li

修复重置bug

parent f6c19666
......@@ -201,9 +201,12 @@ export default {
// 3.2关键字后面的重置
searchClear () {
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
// this.clearParams()
// this.$refs.timeSearchForm.resetForm()
// this._reload()
},
// 4.重新加载
......
......@@ -211,6 +211,11 @@ export default {
this.getFilter()
},
searchClear () {
this.$refs.searchHeader._resetParams()
this.$refs.timeSearchForm.resetParams()
this.$refs.clientForm._resetForm()
},
// 1.查询条件
getFilter () {
requestAPI(api.getCaseFilter).then(res => {
......@@ -256,11 +261,11 @@ export default {
},
// 3.2关键字后面的重置
searchClear () {
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
},
// searchClear () {
// this.clearParams()
// this.$refs.timeSearchForm.resetForm()
// this._reload()
// },
// 4.重新加载
_reload () {
......
......@@ -14,7 +14,7 @@
</el-col>
</el-form>
<el-form ref="clientTimeRange" :model="clientTimeRange" size="mini">
<el-col :span="8" :offset="0" :xs="{span: 24, offset: 0}" class="form-content-time-range">
<el-col :span="9" :offset="0" :xs="{span: 24, offset: 0}" class="form-content-time-range">
<el-form-item label-width="0">
<el-date-picker
size="mini"
......@@ -67,7 +67,13 @@ export default {
this.$watch('clientTimeForm', (val) => {
let perid = val[this.formSearchKey + '[period]']
this.$emit('update:list', Object.assign({}, {[this.formSearchKey + '[period]']: perid}))
}, {deep: true})
}, {deep: true, immediate: true})
},
resetParams () {
this.$set(this.clientTimeForm, this.formSearchKey + '[period]', 'all')
this.clientTimeRange.from = ''
this.clientTimeRange.to = ''
},
initParams () {
......
......@@ -190,9 +190,11 @@ export default {
// 3.2关键字后面的重置
searchClear () {
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
// this.clearParams()
// this.$refs.timeSearchForm.resetForm()
// this._reload()
},
// 4.重新加载
......
......@@ -127,9 +127,12 @@ export default {
// 3.2关键字后面的重置
searchClear () {
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
// this.clearParams()
// this.$refs.timeSearchForm.resetForm()
// this._reload()
},
// 4.重新加载
......
......@@ -199,9 +199,11 @@ export default {
// 3.2关键字后面的重置
searchClear () {
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
// this.clearParams()
// this.$refs.timeSearchForm.resetForm()
// this._reload()
},
// 4.重新加载
......
......@@ -7,7 +7,8 @@
:search-key="'ClientSearch'"
:add-title="'新建项目'"
@update:headerSearch="search => searchKeyword(search)"
@update:headerAdd="() => addSch()">
@update:headerAdd="() => addSch()"
@update:headerClear="() => _resetParams()">
</search-header>
<search-form
ref="clientForm"
......@@ -175,6 +176,11 @@ export default {
this.getFilter()
},
_resetParams () {
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
},
_reload () {
let params = this.setParams({
...this.form,
......
......@@ -7,7 +7,8 @@
:search-key="'ClientSearch'"
:add-title="'新建项目清单'"
@update:headerSearch="search => searchKeyword(search)"
@update:headerAdd="() => addSch()">
@update:headerAdd="() => addSch()"
@update:headerClear="() => _resetParams()">
</search-header>
<search-form
ref="clientForm"
......@@ -160,6 +161,11 @@ export default {
this.getFilter()
},
_resetParams () {
this.$refs.searchHeader._resetParams()
this.$refs.clientForm._resetForm()
},
_reload () {
let params = this.setParams({
...this.form,
......
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