-
- 下级社区数量统计
-
-
-
-
- 至
-
-
-
-
-
+
下级社区数量统计
{
//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键
let nowData = Date.now();
- if (this.formData2.startDate) {
- let startDate = new Date(this.formData2.startDate);
+ if (this.formData.startDate) {
+ let startDate = new Date(this.formData.startDate);
return time.getTime() > nowData || time.getTime() < startDate || time.getTime() === startDate;
} else {
return time.getTime() > nowData;
@@ -196,12 +191,11 @@ export default {
censusData: { district: '', street: '', community: '', grid: '', staff: '' },
formData: {
orgId: '',
- level: ''
- },
- formData2: {
+ level: '',
startDate: '',
endDate: ''
},
+
cateOptions: [],
eventTypeCheck: [],
pageNo: 1,
@@ -239,10 +233,10 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
- 'formData2.endDate': function(val) {
+ 'formData.endDate': function(val) {
if (val && val != '') {
let arrayTemp = val.split(' ');
- this.formData2.endDate = arrayTemp[0] + ' 23:59:59';
+ this.formData.endDate = arrayTemp[0] + ' 23:59:59';
}
}
},
@@ -283,8 +277,8 @@ export default {
url = '/gov/org/customeragency/getCommunityList';
param = {
agencyId: this.orgId,
- timeStart: this.formData2.startDate,
- timeEnd: this.formData2.endDate,
+ timeStart: this.formData.startDate,
+ timeEnd: this.formData.endDate,
pageNum: this.pageNo,
pageSize: this.pageSize
};
@@ -385,7 +379,7 @@ export default {
} else {
agencyId = this.agencyId;
}
- const { data, code, msg } = await requestPost(url, { agencyId: agencyId, timeStart: this.formData2.startDate, timeEnd: this.formData2.endDate });
+ const { data, code, msg } = await requestPost(url, { agencyId: agencyId, timeStart: this.formData.startDate, timeEnd: this.formData.endDate });
this.$refs.pieChart.hideLoading();