|
@@ -17,7 +17,7 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="操作人"><a-input allowClear v-model.trim="searchData.queryWord" :maxLength="30" placeholder="请输入" id="OperateJournal-queryWord"/></a-form-item>
|
|
|
+ <a-form-item label="操作人"><a-input allowClear v-model.trim="queryParam.queryWord" :maxLength="30" placeholder="请输入" id="OperateJournal-queryWord"/></a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
name: 'OperateJournal'
|
|
|
}),
|
|
|
time: [moment(moment().startOf('day').valueOf()).format(this.dateFormat), moment(moment().valueOf()).format(this.dateFormat)],
|
|
|
- searchData: {
|
|
|
+ queryParam: {
|
|
|
beginDate: null, // 查询的开始时间
|
|
|
endDate: null, // 查询的结束时间
|
|
|
queryWord: '' // 操作人
|
|
@@ -92,9 +92,15 @@ export default {
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
- this.searchData.beginDate == null ? (this.searchData.beginDate = getDate.getToday().starttime) : null
|
|
|
- this.searchData.endDate == null ? (this.searchData.endDate = getDate.getToday().endtime) : null
|
|
|
- return journalList(Object.assign(parameter, this.searchData)).then(res => {
|
|
|
+ const searchData = Object.assign(parameter, this.queryParam)
|
|
|
+ if (this.time && this.time.length) {
|
|
|
+ searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ } else {
|
|
|
+ searchData.beginDate = ''
|
|
|
+ searchData.endDate = ''
|
|
|
+ }
|
|
|
+ return journalList(searchData).then(res => {
|
|
|
const no = (res.data.data.pageNo - 1) * res.data.data.pageSize
|
|
|
for (let i = 0; i < res.data.data.list.length; i++) {
|
|
|
const _item = res.data.data.list[i]
|
|
@@ -109,15 +115,15 @@ export default {
|
|
|
moment,
|
|
|
// 操作时间change
|
|
|
onChange (dates, dateStrings) {
|
|
|
- this.searchData.beginDate = dateStrings[0]
|
|
|
- this.searchData.endDate = dateStrings[1]
|
|
|
+ this.queryParam.beginDate = dateStrings[0]
|
|
|
+ this.queryParam.endDate = dateStrings[1]
|
|
|
},
|
|
|
// 重置
|
|
|
resetForm () {
|
|
|
- this.searchData.beginDate = getDate.getToday().starttime
|
|
|
- this.searchData.endDate = getDate.getToday().endtime
|
|
|
- this.time = [moment(getDate.getToday().starttime, this.dateFormat), moment(getDate.getToday().endtime, this.dateFormat)]
|
|
|
- this.searchData.queryWord = ''
|
|
|
+ this.queryParam.beginDate = getDate.getToday().starttime
|
|
|
+ this.queryParam.endDate = getDate.getToday().endtime
|
|
|
+ this.time = [moment(moment().startOf('day').valueOf()).format(this.dateFormat), moment(moment().valueOf()).format(this.dateFormat)]
|
|
|
+ this.queryParam.queryWord = ''
|
|
|
this.$refs.table.refresh(true)
|
|
|
}
|
|
|
}
|