Commit 211b1e7f by liwk

commit

1 parent 3e6327bb
......@@ -269,6 +269,10 @@ export default {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
Object.keys(params).map(key => {
if (!params[key]) delete params[key]
})
// console.log(params)
this.getListApi(params).then(({ data }) => {
this.data = data[this.tableParams.listName]
......
......@@ -280,11 +280,9 @@ export default {
},
watch: {
'date' (n, o) {
console.log(n)
if (n) {
this.searchObj.orderDateStart = `${n[0]} 00:00:00`
this.searchObj.orderDateEnd = `${n[1]} 23:59:59`
}
let [orderDateStart, orderDateEnd] = n
this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : ''
this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : ''
}
},
methods: {
......@@ -299,9 +297,11 @@ export default {
this.$refs.table.refreshTable()
},
reset () {
this.searchObj = {}
this.date = ''
this.search()
this.searchObj = {}
this.$nextTick(() => {
this.search()
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!