@@ -38,6 +38,7 @@ export default {
year: '',
month: '',
day: '',
+ yyyyMM: '',
}
},
components: {
@@ -49,6 +50,14 @@ export default {
},
methods: {
+ changeMonth(e) {
+ if(e.month<=9) {
+ this.yyyyMM = e.year + '-' + '0' + e.month
+ } else if(e.month > 9) {
+ this.yyyyMM = e.year + '-' + e.month
+ }
+ this.getData()
+ },
change(val) {
this.date = `${val.year} + '-' + ${val.month} + '-' + ${val.day}`
},
@@ -62,21 +71,27 @@ export default {
},
getData() {
this.$http.post(`/app/appmasssendingtask/statisticsCalendar`, null, {
- params: {},
+ params: {
+ yyyyMM: this.yyyyMM,
+ },
})
.then((res) => {
if (res?.data) {
this.calendarList = res.data;
- var arr = Object.keys(res.data).map(key => (res.data[key]))
- var calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
+ let arr = Object.keys(res.data).map(key => (res.data[key]))
+ let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
this.selected = calList.map(item=> {
if(item.day>=1 && item.day<=9) {
if(this.month>=1 && this.month <=9) {
- return this.year + '-' + '0' + this.month + '-' + '0' + item.day
+ return {
+ date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
+ }
}
} else if(item.day> 9) {
if(this.month > 9) {
- return this.year + '-' + this.month + '-' + item.day
+ return {
+ date: this.year + '-' + this.month + '-' + item.day
+ }
}
}
})
From d6997d515bcd3c9d57515f2f9b4858398482b83f Mon Sep 17 00:00:00 2001
From: shijingjing <1789544664@qq.com>
Date: Mon, 18 Jul 2022 11:35:11 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=A5=E6=9C=9F?=
=?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=A4=A7=E4=BA=8E=E6=88=96=E7=AD=89=E4=BA=8E?=
=?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=A5=E6=9C=9F=EF=BC=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AppCooperationPropaganda.vue | 12 ++++++++++--
.../AppPropagandaStatistics.vue | 15 ++++++++++-----
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue
index d3ab2be5..c2815b6b 100644
--- a/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue
+++ b/src/project/saas/AppCooperationPropaganda/AppCooperationPropaganda.vue
@@ -113,8 +113,7 @@ export default {
// console.log(res);
})
},
-
- filterBtn() {},
+
reset() {
this.startTime = '',
this.endTime = ''
@@ -122,6 +121,15 @@ export default {
selectConfirm() {
this.start = this.startTime,
this.end = this.endTime
+ let startTmp = this.start.split("-");
+ let endTmp = this.end.split("-");
+ let stT = new Date(startTmp[0], startTmp[1], startTmp[2]);
+ let edT = new Date(endTmp[0], endTmp[1], endTmp[2]);
+ if (stT.getTime() >= edT.getTime()) {
+ this.$u.toast("开始日期不能大于或等于结束日期!");
+ this.filterShow = true
+ return
+ }
this.filterShow = false
this.getList()
},
diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue
index 0556722a..8ceb01ee 100644
--- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue
+++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue
@@ -281,8 +281,6 @@ export default {
onShow() {
document.title = "宣发统计";
- },
- created() {
this.getBrokenDate();
this.getData();
this.getColData();
@@ -301,7 +299,6 @@ export default {
if (index == 3) {
this.timeSelect = index;
this.customShow = true;
-
this.showStart = false;
this.showEnd = false;
} else {
@@ -326,11 +323,10 @@ export default {
this.detailType = this.timeSelect;
this.start = this.startTime;
this.end = this.endTime;
- this.getBrokenDate();
} else {
this.detailType = this.timeSelect;
- this.getBrokenDate();
}
+ this.getBrokenDate();
this.filterShow = false;
},
@@ -344,6 +340,15 @@ export default {
handleTime() {
this.start = this.startTime;
this.end = this.endTime;
+ let startTmp = this.start.split("-");
+ let endTmp = this.end.split("-");
+ let stT = new Date(startTmp[0], startTmp[1], startTmp[2]);
+ let edT = new Date(endTmp[0], endTmp[1], endTmp[2]);
+ if (stT.getTime() >= edT.getTime()) {
+ this.$u.toast("开始日期不能大于或等于结束日期!");
+ this.customShow = true
+ return
+ }
this.customShow = false;
},