From 1c552c34bee4da8d86c6fd57d9c6dab0354955c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 16 Oct 2024 09:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/views/shopowner.vue | 99 ++++++++++++++++-------------- 1 file changed, 54 insertions(+), 45 deletions(-) diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue index 9df367751..3e582b2e9 100644 --- a/fuintAdmin/src/views/shopowner.vue +++ b/fuintAdmin/src/views/shopowner.vue @@ -147,7 +147,7 @@
油品交易分析
- +
{{ypjyTitle}}
@@ -221,7 +221,7 @@
数据统计
- +
{{sjtjTitle}}
@@ -377,11 +377,7 @@ export default { goList() { this.$router.push('/notificationList/index') }, - editColor(command,index){ - // console.log("command",command) - // console.log("index",index.$attrs.index) - index = index.$attrs.index - // this.timeIndex = command + editShow(command){ this.disabled = true if (command=='今日'){ let start = new Date(); @@ -389,62 +385,75 @@ export default { start.setMinutes(0) start.setSeconds(0) start.setMilliseconds(0) - if (index == "1"){ - this.countValue = [start,new Date()] - }else if (index == "2") { this.showValue = [start,new Date()] - }else if (index == "3") { - this.value2 = [start,new Date()] - }else if (index == "4") { - this.value1 = [start,new Date()]; - } } else if (command=='近一周'){ let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) - if (index == "1"){ - this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "2") { this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "3") { - this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "4") { - this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] - } } else if (command=='近一月'){ let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) - if (index == "1"){ - this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "2") { this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "3") { - this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "4") { - this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] - } } else if (command=='近一年'){ let nowDate = new Date(); let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) - this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] - if (index == "1"){ - this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "2") { this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "3") { - this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] - }else if (index == "4") { - this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] - } }else if (command=='自定义'){ this.disabled = false } - if (index == "1") { - this.getDataCount() - }else if (index == "2") { this.getDataShow() - }else if (index == "3") { - this.getStoreList() + }, + editCount(command){ + this.disabled = true + if (command=='今日'){ + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.showValue = [start,new Date()] + } else if (command=='近一周'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='近一月'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='近一年'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)] + }else if (command=='自定义'){ + this.disabled = false } + this.getDataCount() + }, + editColor(command){ + this.disabled = true + if (command=='今日'){ + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.value2 = [start,new Date()] + } else if (command=='近一周'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='近一月'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='近一年'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + }else if (command=='自定义'){ + this.disabled = false + } + this.getStoreList() }, // 获取员工排行信息 getEmployeList() {