diff --git a/src/views/modules/analysis/export/operation.vue b/src/views/modules/analysis/export/operation.vue
index 102f3ca..184a198 100644
--- a/src/views/modules/analysis/export/operation.vue
+++ b/src/views/modules/analysis/export/operation.vue
@@ -46,6 +46,7 @@
label="截止时间">
@@ -163,7 +164,7 @@ export default {
mixins: [mixinViewModule],
watch: {
'timeFlag': function (val) {
- if (val == 0) {
+ if (val === 0) {
this.dataForm.operationStartTime = ''
this.dataForm.operationEndTime = ''
this.time = []
diff --git a/src/views/modules/analysis/user/gridopening.vue b/src/views/modules/analysis/user/gridopening.vue
index dd4dd57..8e85069 100644
--- a/src/views/modules/analysis/user/gridopening.vue
+++ b/src/views/modules/analysis/user/gridopening.vue
@@ -86,12 +86,12 @@
header-align="center"
align="center">
@@ -299,10 +299,39 @@ export default {
this.options = res.data.options
})
.catch(() => { })
+ this.initTime()
// this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
// this.getListCategory()
},
methods: {
+ initTime () {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+ this.time = [start, end]
+ let year = start.getFullYear()
+ let month = start.getMonth() + 1
+ if (month < 10) {
+ month = '0' + month
+ }
+ let date = start.getDate()
+ if (date < 10) {
+ date = '0' + date
+ }
+ let startDate = year + '-' + month + '-' + date
+ let yearend = end.getFullYear()
+ let monthend = end.getMonth() + 1
+ if (monthend < 10) {
+ monthend = '0' + monthend
+ }
+ let dateend = end.getDate()
+ if (dateend < 10) {
+ dateend = '0' + dateend
+ }
+ let endDate = yearend + '-' + monthend + '-' + dateend
+ this.dataForm.startTime = startDate
+ this.dataForm.endTime = endDate
+ },
newsUpDownState: function (row) {
return row.newsUpDownState === '1' ? '下线' : '上线'
},
diff --git a/src/views/modules/analysis/user/party.vue b/src/views/modules/analysis/user/party.vue
index b8917be..41eebd2 100644
--- a/src/views/modules/analysis/user/party.vue
+++ b/src/views/modules/analysis/user/party.vue
@@ -188,10 +188,39 @@ export default {
this.options = res.data.options
})
.catch(() => { })
+ this.initTime()
// this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
// this.getListCategory()
},
methods: {
+ initTime () {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+ this.time = [start, end]
+ let year = start.getFullYear()
+ let month = start.getMonth() + 1
+ if (month < 10) {
+ month = '0' + month
+ }
+ let date = start.getDate()
+ if (date < 10) {
+ date = '0' + date
+ }
+ let startDate = year + '-' + month + '-' + date
+ let yearend = end.getFullYear()
+ let monthend = end.getMonth() + 1
+ if (monthend < 10) {
+ monthend = '0' + monthend
+ }
+ let dateend = end.getDate()
+ if (dateend < 10) {
+ dateend = '0' + dateend
+ }
+ let endDate = yearend + '-' + monthend + '-' + dateend
+ this.dataForm.startTime = startDate
+ this.dataForm.endTime = endDate
+ },
newsUpDownState: function (row) {
return row.newsUpDownState === '1' ? '下线' : '上线'
},
diff --git a/src/views/modules/analysis/user/register.vue b/src/views/modules/analysis/user/register.vue
index 5ff2b98..b2c8376 100644
--- a/src/views/modules/analysis/user/register.vue
+++ b/src/views/modules/analysis/user/register.vue
@@ -206,10 +206,39 @@ export default {
this.options = res.data.options
})
.catch(() => { })
+ this.initTime()
// this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
// this.getListCategory()
},
methods: {
+ initTime () {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+ this.time = [start, end]
+ let year = start.getFullYear()
+ let month = start.getMonth() + 1
+ if (month < 10) {
+ month = '0' + month
+ }
+ let date = start.getDate()
+ if (date < 10) {
+ date = '0' + date
+ }
+ let startDate = year + '-' + month + '-' + date
+ let yearend = end.getFullYear()
+ let monthend = end.getMonth() + 1
+ if (monthend < 10) {
+ monthend = '0' + monthend
+ }
+ let dateend = end.getDate()
+ if (dateend < 10) {
+ dateend = '0' + dateend
+ }
+ let endDate = yearend + '-' + monthend + '-' + dateend
+ this.dataForm.startTime = startDate
+ this.dataForm.endTime = endDate
+ },
newsUpDownState: function (row) {
return row.newsUpDownState === '1' ? '下线' : '上线'
},