From 44c5271b5a4dad1e1624f05e83deabcf1d7c760f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Wed, 26 Jun 2024 16:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/produceLineBarTarget.vue | 21 ++++++++-- src/views/report/produceConversion.vue | 41 ++++++++++--------- src/views/report/productionSituationMW.vue | 20 ++++++--- .../report/productionSituationTablets.vue | 16 +++++++- src/views/report/productionYield.vue | 40 +++++++++--------- 5 files changed, 88 insertions(+), 50 deletions(-) diff --git a/src/views/report/components/produceLineBarTarget.vue b/src/views/report/components/produceLineBarTarget.vue index aca2d24..e0ef1cf 100644 --- a/src/views/report/components/produceLineBarTarget.vue +++ b/src/views/report/components/produceLineBarTarget.vue @@ -1,7 +1,7 @@ @@ -36,7 +36,7 @@ export default { color: [], // color: ["#8EF0AB", "#63BDFF", "#288AFF"], grid: { - left: -60, + left: 20, right: 0, bottom: 31, top: 30, @@ -136,6 +136,10 @@ export default { type: Number, default: 300, }, + gridLeft: { + type: Boolean, + default: true, + }, type: { type: Number, default: 2, @@ -166,7 +170,12 @@ export default { handler(newVal) { this.chartHeight = newVal; }, + }, + // gridLeft(val) { + // console.log(val) + + // }, type() { this.canvasReset(); }, @@ -190,6 +199,12 @@ export default { }, 500)(); }, getMes() { + console.log(this.gridLeft) + if (this.gridLeft === false) { + this.option.grid.left = 20 + } else { + this.option.grid.left = -80 + } // console.log('222222', this.chartMsg); if (this.myChart) { this.myChart.dispose(); @@ -197,7 +212,7 @@ export default { var chartDom = document.getElementById(this.chartId); this.myChart = echarts.init(chartDom); this.option.color = this.chartMsg.color; - this.option.xAxis.data = this.chartMsg.xData; + this.option.xAxis.data = this.chartMsg.xData // this.option.yAxis.name = this.chartMsg.yName; // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel; diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue index 2c8b3f7..67220d7 100644 --- a/src/views/report/produceConversion.vue +++ b/src/views/report/produceConversion.vue @@ -176,12 +176,12 @@ export default { type: "value", name: "单位/MW", // splitNumber: 5, - min: function (value) {//取最小值向下取整为最小刻度 - return 0 - }, - max: function (value) {//取最大值向上取整为最大刻度 - return Math.ceil(value.max) - }, + // min: function (value) {//取最小值向下取整为最小刻度 + // return 0 + // }, + // max: function (value) {//取最大值向上取整为最大刻度 + // return Math.ceil(value.max) + // }, alignTicks: true, nameTextStyle: { fontSize: 12, @@ -192,12 +192,12 @@ export default { { type: 'value', alignTicks: true, - min: 0, - max: 100, + // min: 0, + // max: 100, // scale: true, - interval: 25,//间隔 + // interval: 25,//间隔 // inverse: true, - splitNumber: 5, + // splitNumber: 5, name: "单位/%", nameTextStyle: { fontSize: 12, @@ -248,15 +248,15 @@ export default { { type: "value", name: "单位/片", - min: function (value) {//取最小值向下取整为最小刻度 - return 0 - }, - max: function (value) {//取最大值向上取整为最大刻度 - return Math.ceil(value.max) - }, + // min: function (value) {//取最小值向下取整为最小刻度 + // return 0 + // }, + // max: function (value) {//取最大值向上取整为最大刻度 + // return Math.ceil(value.max) + // }, alignTicks: true, // splitNumber: 5, - scale: true, + // scale: true, nameTextStyle: { fontSize: 12, align: "right", @@ -269,10 +269,10 @@ export default { name: "单位/%", scale: true, alignTicks: true, - min: 0, - max: 100, + // min: 0, + // max: 100, // scale: true, - interval: 25,//间隔 + // interval: 25,//间隔 // splitNumber: 5, nameTextStyle: { fontSize: 12, @@ -521,6 +521,7 @@ export default { this.chartMsg.series[2].data = [] this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[1].data = [] + this.title = '' if (!this.listQuery.beginTime && !this.listQuery.endTime) { return this.$message('请选择起止时间') } diff --git a/src/views/report/productionSituationMW.vue b/src/views/report/productionSituationMW.vue index c38df8c..458884b 100644 --- a/src/views/report/productionSituationMW.vue +++ b/src/views/report/productionSituationMW.vue @@ -64,7 +64,7 @@ + :chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartTarget'" :chartNum="chartNum" /> @@ -84,7 +84,7 @@ + :chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartDayTarget'" :chartNum="chartNum" /> - +