|
|
@@ -176,6 +176,7 @@
|
|
|
created () {
|
|
|
// 查询条件初始值备份
|
|
|
Object.assign(this.searchFormReset, this.searchForm)
|
|
|
+ this.initYear()
|
|
|
// 查询列表
|
|
|
this.initDatas()
|
|
|
// this.getDictOptions()
|
|
|
@@ -193,11 +194,16 @@
|
|
|
let myCreateOn = []
|
|
|
// 解析时间
|
|
|
if (this.CreateOn !== null && this.CreateOn.length === 2) {
|
|
|
- this.CreateOn[1].setHours(23)
|
|
|
- this.CreateOn[1].setMinutes(59)
|
|
|
- this.CreateOn[1].setSeconds(59)
|
|
|
- myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
- myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
+ if (typeof(this.CreateOn[0]) == 'string') {
|
|
|
+ myCreateOn.push(this.CreateOn[0])
|
|
|
+ myCreateOn.push(this.CreateOn[1])
|
|
|
+ } else {
|
|
|
+ this.CreateOn[1].setHours(23)
|
|
|
+ this.CreateOn[1].setMinutes(59)
|
|
|
+ this.CreateOn[1].setSeconds(59)
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
+ }
|
|
|
}
|
|
|
// 查询条件
|
|
|
Object.assign(params, this.searchForm)
|
|
|
@@ -215,7 +221,12 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ initYear() {
|
|
|
+ let now = new Date()
|
|
|
+ let nowYear = now.getFullYear()
|
|
|
+ this.CreateOn.push(nowYear+'-01-01 00:00:00')
|
|
|
+ this.CreateOn.push(nowYear+'-12-31 23:59:59')
|
|
|
+ },
|
|
|
searchCommand (command) {
|
|
|
if (command === 'search') {
|
|
|
this.dialogVisible = true
|