Commit dfd94ec7 authored by daywrite's avatar daywrite

工单管理查询条件

parent 4b8eb070
......@@ -17,4 +17,29 @@
border-color: #dc3545;
color: #dc3545;
}
.el-radio-button__inner, .el-radio-button:last-child .el-radio-button__inner, .el-radio-button:first-child .el-radio-button__inner{
border-left: 1px solid #DCDFE6;
margin: 0 2px 0 0;
border-radius: 3px;
}
.el-radio-button__inner:hover{
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner{
color: #fff;
background-color: #17a2b8;
border-color: #17a2b8;
box-shadow: 0 0 0 0 #17a2b8;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner:hover{
color: #333;
background-color: #d4d4d4;
border-color: #8c8c8c;
}
.ec-page-wrapper .el-form-item__label {
color: white;
}
}
......@@ -12,7 +12,7 @@
</search-header>
<time-search-form
ref="timeSearchForm"
form-search-key="projectSearch"
formSearchKey="projectSearch"
@update:list="search => timeSearchForm(search)">
</time-search-form>
<search-form
......@@ -89,7 +89,7 @@ import {
api
} from '@/lib/commonMixin'
export default {
name: 'documentHome',
name: 'caseHome',
mixins: [SetParams],
......@@ -215,7 +215,8 @@ export default {
// 3.2关键字后面的重置
searchClear () {
this.init()
this.clearParams()
this.$refs.timeSearchForm.resetForm()
this._reload()
},
......@@ -246,6 +247,15 @@ export default {
this.getList(ret)
},
// 5.3 TimeSearchForm
timeSearchForm (search) {
let ret = this.setParams({
...this.form,
page: this.pagenation.thispage
}, search)
this.getList(ret)
},
// 6.1新增
addSch () {
this.$refs.formModal.show()
......
......@@ -6,14 +6,15 @@
<el-form-item label="提交时间:" label-width="42">
<el-radio-group v-model="clientTimeForm[formSearchKey + '[period]']" size="mini">
<el-radio-button label="all">全部</el-radio-button>
<el-radio-button label="thismonth">本月</el-radio-button>
<el-radio-button label="lastmonth">上月</el-radio-button>
<el-radio-button label="today">今天</el-radio-button>
<el-radio-button label="tomorrow">明天</el-radio-button>
<el-radio-button label="aftertomorrow">后天</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-form>
<el-form ref="clientTimeRange" :model="clientTimeRange" size="mini">
<el-col :span="8" :offset="8" :xs="{span: 24, offset: 0}" class="form-content-time-range">
<el-col :span="8" :offset="0" :xs="{span: 24, offset: 0}" class="form-content-time-range">
<el-form-item label-width="0">
<el-date-picker
size="mini"
......@@ -71,10 +72,18 @@ export default {
initParams () {
this.setInitParams((ret) => {
this.$set(this.clientTimeForm, this.formSearchKey + '[period]', ret[this.formSearchKey + '[period]'] || '')
this.$set(this.clientTimeForm, this.formSearchKey + '[period]', ret[this.formSearchKey + '[period]'] || 'all')
this.clientTimeRange.from = ret[this.formSearchKey + '[from]'] || ''
this.clientTimeRange.to = ret[this.formSearchKey + '[to]'] || ''
})
},
resetForm () {
this.clientTimeForm[this.formSearchKey + '[period]'] = 'all'
this.clientTimeRange.from = ''
this.clientTimeRange.to = ''
},
setSearchTime () {
let from = this.clientTimeRange.from
let to = this.clientTimeRange.to
......@@ -88,8 +97,9 @@ export default {
watch: {
'formSearchKey': {
handler (val) {
this.$set(this.clientTimeForm, val + '[period]', '')
}
this.$set(this.clientTimeForm, val + '[period]', 'all')
},
immediate: true
},
'clientTimeRange.from' (val) {
if (new Date(val) >= new Date(this.clientTimeRange.to)) {
......
......@@ -28,6 +28,14 @@ export default {
return ret
},
clearParams () {
let key = this.$options && this.$options.name
let l = this.isHasLocalStorage()
if (l && key) {
l.removeItem(key)
}
},
isHasLocalStorage () {
return window.localStorage
}
......
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