diff --git a/src/components/BaseForm/search-form.vue b/src/components/BaseForm/search-form.vue index 9e5f949a..d1bd846b 100644 --- a/src/components/BaseForm/search-form.vue +++ b/src/components/BaseForm/search-form.vue @@ -111,6 +111,7 @@ v-model="searchData[item.prop]" :placeholder="item.placeholder" type="datetime" + value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disable && item.disable(searchData[item.prop])" :style="{ width: item.width }" /> @@ -122,6 +123,8 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" + value-format="yyyy-MM-dd" + format="yyyy-MM-dd" :style="{ width: item.width }" clearable /> diff --git a/src/views/system/user/list/index.vue b/src/views/system/user/list/index.vue index 76bf7489..d32b1550 100644 --- a/src/views/system/user/list/index.vue +++ b/src/views/system/user/list/index.vue @@ -11,12 +11,6 @@ @reset="handleReset" @new="handleAddUser" /> - - - - - - { PageSize: 20, Asc: false, RealName: '', + BeginCreateTime: '', + EndCreateTime: '', + CreateTimeArr: [], SortField: 'CreateTime' } } @@ -335,7 +332,14 @@ export default { handleReset() { this.searchData = searchDataDefault() this.getList() - } + }, + handleSearch() { + if (this.searchData.CreateTimeArr.length > 0) { + this.searchData.BeginCreateTime = this.searchData.CreateTimeArr[0] + this.searchData.EndCreateTime = this.searchData.CreateTimeArr[1] + } + this.getList() + }, } }