日期默认
This commit is contained in:
@@ -84,7 +84,8 @@ export default {
|
|||||||
endDate: '',
|
endDate: '',
|
||||||
showDateSelect: false,
|
showDateSelect: false,
|
||||||
backVal: 0,
|
backVal: 0,
|
||||||
pointVal: 0
|
pointVal: 0,
|
||||||
|
firstGet: true, //第一次请求
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -115,7 +116,14 @@ export default {
|
|||||||
getData() {
|
getData() {
|
||||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/statistics?areaId=${this.areaId}&beginTime=${this.beginDate}&endTime=${this.endDate}`).then((res) => {
|
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/statistics?areaId=${this.areaId}&beginTime=${this.beginDate}&endTime=${this.endDate}`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
if(this.firstGet) {
|
||||||
|
var myDate = new Date();
|
||||||
|
this.beginDate = myDate.getFullYear() + res.data.trend[0].ymd
|
||||||
|
this.endDate = myDate.getFullYear() + res.data.trend[6].ymd
|
||||||
|
this.firstGet = false
|
||||||
|
}
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
|
|
||||||
var xData = [], yDataScreening = [], yDataNucleicAcid = []
|
var xData = [], yDataScreening = [], yDataNucleicAcid = []
|
||||||
res.data.trend.map((item) => {
|
res.data.trend.map((item) => {
|
||||||
xData.push(item.ymd)
|
xData.push(item.ymd)
|
||||||
|
|||||||
Reference in New Issue
Block a user