From f585e2f0205efee795c3993f6653d3a644426898 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Thu, 24 Oct 2024 15:38:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=202.?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=91=E5=AE=9A=E8=80=97=E6=9D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/home.vue | 168 +++++++++++----------- src/views/product/components/bindCons.vue | 58 +++++--- 2 files changed, 120 insertions(+), 106 deletions(-) diff --git a/src/views/home/home.vue b/src/views/home/home.vue index 324834d..5ef6931 100644 --- a/src/views/home/home.vue +++ b/src/views/home/home.vue @@ -220,13 +220,13 @@
{{ productCount }}
-
+
@@ -336,9 +336,9 @@ export default { if (this.productCountChart) { this.productCountChart.resize(); } - if (this.productSumChart) { - this.productSumChart.resize(); - } + // if (this.productSumChart) { + // this.productSumChart.resize(); + // } }, 100); window.addEventListener("resize", this.__resizeHandler); // this.initCardUserChart(); @@ -679,7 +679,7 @@ export default { { name: '订单金额', type: "bar", - barWidth: time.length <= 7 ? "30%" : "20%", + barWidth: time.length <= 7 ? "50%" : "30%", data: data.map(item => item.orderAmount), }, // { @@ -688,12 +688,12 @@ export default { // barWidth: time.length <= 7 ? "30%" : "20%", // data: data.map(item => item.actualAmount), // }, - { - name: '优惠金额', - type: "bar", - barWidth: time.length <= 7 ? "30%" : "20%", - data: data.map(item => item.discountAmount), - } + // { + // name: '优惠金额', + // type: "bar", + // barWidth: time.length <= 7 ? "30%" : "20%", + // data: data.map(item => item.discountAmount), + // } ] }); }, @@ -754,7 +754,7 @@ export default { return { orderAmount: item.orderAmount, // actualAmount: item.actualAmount, - discountAmount: item.discountAmount + // discountAmount: item.discountAmount } }); const time = res.total.map(item => item.tradeDay); @@ -840,7 +840,7 @@ export default { // 初始化销售图标 initProduceChart(p1, p2) { this.productCountChart = echarts.init(this.$refs.productCountChart); - this.productSumChart = echarts.init(this.$refs.productSumChart); + // this.productSumChart = echarts.init(this.$refs.productSumChart); this.productCountChart.setOption({ tooltip: { @@ -913,76 +913,76 @@ export default { ] }); - this.productSumChart.setOption({ - tooltip: { - trigger: "axis" - }, - grid: { - x: 0, - y: 0, - x2: 0, - y2: 0 - }, - xAxis: [ - { - boundaryGap: false, - type: "category", - data: p2[0], - show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字 - axisTick: { - show: false // 不显示坐标轴刻度线 - }, - axisLine: { - show: false // 不显示坐标轴线 - }, - axisLabel: { - show: false // 不显示坐标轴上的文字 - }, - splitLine: { - show: false // 不显示网格线 - } - } - ], - color: "#409eff", - yAxis: [ - { - type: "value", - show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字 - axisTick: { - show: false // 不显示坐标轴刻度线 - }, - axisLine: { - show: false // 不显示坐标轴线 - }, - axisLabel: { - show: false // 不显示坐标轴上的文字 - }, - splitLine: { - show: false // 不显示网格线 - } - } - ], - series: [ - { - data: p2[1], - type: "line", - symbol: "none", - smooth: true, - areaStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: "#409eff" // 渐变颜色 - }, - { - offset: 1, - color: "#409eff" // 渐变颜色 - } - ]) - } - } - ] - }); + // this.productSumChart.setOption({ + // tooltip: { + // trigger: "axis" + // }, + // grid: { + // x: 0, + // y: 0, + // x2: 0, + // y2: 0 + // }, + // xAxis: [ + // { + // boundaryGap: false, + // type: "category", + // data: p2[0], + // show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字 + // axisTick: { + // show: false // 不显示坐标轴刻度线 + // }, + // axisLine: { + // show: false // 不显示坐标轴线 + // }, + // axisLabel: { + // show: false // 不显示坐标轴上的文字 + // }, + // splitLine: { + // show: false // 不显示网格线 + // } + // } + // ], + // color: "#409eff", + // yAxis: [ + // { + // type: "value", + // show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字 + // axisTick: { + // show: false // 不显示坐标轴刻度线 + // }, + // axisLine: { + // show: false // 不显示坐标轴线 + // }, + // axisLabel: { + // show: false // 不显示坐标轴上的文字 + // }, + // splitLine: { + // show: false // 不显示网格线 + // } + // } + // ], + // series: [ + // { + // data: p2[1], + // type: "line", + // symbol: "none", + // smooth: true, + // areaStyle: { + // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + // { + // offset: 0, + // color: "#409eff" // 渐变颜色 + // }, + // { + // offset: 1, + // color: "#409eff" // 渐变颜色 + // } + // ]) + // } + // } + // ] + // }); }, // 日期汇总数据 async summaryDateGet(res) { diff --git a/src/views/product/components/bindCons.vue b/src/views/product/components/bindCons.vue index ff4b22b..cd8108a 100644 --- a/src/views/product/components/bindCons.vue +++ b/src/views/product/components/bindCons.vue @@ -1,5 +1,5 @@