Commit f462e1d2 by lichengming

修改了统计查询模块日期查询格式

parent 19ee7076
......@@ -12,12 +12,12 @@
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
type="daterange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</Form-item>
......@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
'yyyy-mm-dd'
)
return {
formId: 'AreaSample',
......@@ -113,7 +113,7 @@ export default {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateBeg = this.tempData.beginDate
this.formObj.entrustDateEnd = this.$dateformat(
lastday,
......@@ -129,7 +129,7 @@ export default {
this.formObj.entrustDateBeg = data[0]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateEnd = this.$dateformat(
lastday,
'yyyy-mm-dd HH:MM:ss'
......@@ -141,8 +141,8 @@ export default {
this.formObj.entrustDateEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
mGetDate(year, month, day) {
const d = new Date(year, month - 1, day, 24)
return d
},
// 服务类型
......
......@@ -12,12 +12,12 @@
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
type="daterange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</Form-item>
......@@ -74,10 +74,10 @@ import { soilAptitude, soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
'yyyy-mm-dd'
)
return {
formId: 'ProjectItem',
......@@ -122,7 +122,7 @@ export default {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateBeg = this.tempData.beginDate
this.formObj.entrustDateEnd = this.$dateformat(
lastday,
......@@ -149,7 +149,7 @@ export default {
this.formObj.entrustDateBeg = data[0]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateEnd = this.$dateformat(
lastday,
'yyyy-mm-dd HH:MM:ss'
......@@ -161,8 +161,8 @@ export default {
this.formObj.entrustDateEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
mGetDate(year, month, day) {
const d = new Date(year, month - 1, day, 24)
return d
},
// 服务类型
......
......@@ -12,12 +12,12 @@
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
type="daterange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</Form-item>
......@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
'yyyy-mm-dd'
)
return {
formId: 'TestItem',
......@@ -113,7 +113,7 @@ export default {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.checkTimeBeg = this.tempData.beginDate
this.formObj.checkTimeEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
this._getData()
......@@ -124,9 +124,10 @@ export default {
this.tempData.beginDate = data[0]
this.tempData.endDate = data[1]
this.formObj.checkTimeBeg = data[0]
// this.formObj.checkTimeEnd = data[1]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.checkTimeEnd = this.$dateformat(
lastday,
'yyyy-mm-dd HH:MM:ss'
......@@ -138,8 +139,8 @@ export default {
this.formObj.checkTimeEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
mGetDate(year, month, day) {
const d = new Date(year, month - 1, day, 24)
return d
},
// 服务类型
......
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