From 9d11f8b943605b51476259d7f0ab025c35700288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Mon, 3 Jun 2024 16:42:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 8 +-- src/mixins/chart.js | 20 +++--- .../copilot/efficiency/components/StdRate.vue | 18 +++--- .../components/sub/bar/BarChartChipOEE.vue | 64 +++++++++---------- .../components/sub/bar/BarChartChipTrans.vue | 32 +++++----- .../components/sub/chip/ChipRateItem.vue | 3 +- src/views/copilot/efficiency/index.vue | 59 ++++++++++++----- .../copilot/efficiency/options/chipOptions.js | 2 +- src/views/copilot/efficiencyContainer.vue | 13 ++-- .../components/sub/ring/DoubleRingChart.vue | 4 +- .../components/sub/ring/DoubleRingWrapper.vue | 9 +-- .../options/double-ring-chart-options.js | 8 +-- 12 files changed, 132 insertions(+), 108 deletions(-) diff --git a/.env.dev b/.env.dev index 5729465..218fdc5 100644 --- a/.env.dev +++ b/.env.dev @@ -1,8 +1,8 @@ ### # @Author: zhp # @Date: 2024-04-28 13:42:51 - # @LastEditTime: 2024-06-03 08:50:41 - # @LastEditors: DY + # @LastEditTime: 2024-06-03 15:41:29 + # @LastEditors: zhp # @Description: ### # 开发环境配置 @@ -13,11 +13,11 @@ VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://192.168.1.70:30307' -# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' +VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' # sara # VUE_APP_BASE_API = 'http://192.168.1.63:48080' # 张一丁 -VUE_APP_BASE_API = 'http://192.168.4.139:48080' +# VUE_APP_BASE_API = 'http://192.168.4.139:48080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/mixins/chart.js b/src/mixins/chart.js index b356201..0901d53 100644 --- a/src/mixins/chart.js +++ b/src/mixins/chart.js @@ -4,16 +4,16 @@ function __resizeHandler(entries) { console.log(entries) for (const entry of entries) { if (entry.contentBoxSize) { - // const contentBoxSize = Array.isArray(entry.contentBoxSize) - // ? entry.contentBoxSize[0] - // : entry.contentBoxSize; - // this.chart_mixin_chartInstance.resize({ - // width: - // contentBoxSize.inlineSize < this.MIN_WIDTH - // ? this.MIN_WIDTH - // : contentBoxSize.inlineSize, - // height: contentBoxSize.blockSize, - // }); + const contentBoxSize = Array.isArray(entry.contentBoxSize) + ? entry.contentBoxSize[0] + : entry.contentBoxSize; + this.chart_mixin_chartInstance.resize({ + width: + contentBoxSize.inlineSize < this.MIN_WIDTH + ? this.MIN_WIDTH + : contentBoxSize.inlineSize, + height: contentBoxSize.blockSize, + }); } else { // manipulate contentRect this.chart_mixin_chartInstance.resize({ diff --git a/src/views/copilot/efficiency/components/StdRate.vue b/src/views/copilot/efficiency/components/StdRate.vue index e186625..cbbfe12 100644 --- a/src/views/copilot/efficiency/components/StdRate.vue +++ b/src/views/copilot/efficiency/components/StdRate.vue @@ -1,14 +1,14 @@ @@ -22,7 +22,7 @@ import ChartContainer from "../../../../components/ChartContainer.vue"; import { debounce } from "@/utils/debounce"; import * as echarts from "echarts"; export default { - name: "BarChartBase", + name: "barChartBaseoee", components: { ChartContainer, }, @@ -220,30 +220,30 @@ export default { this.canvasReset() }, /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ - // isFullscreen(val) { - // this.actualOptions.series.map((item) => { - // item.barWidth = val ? 18 : 12; - // }); - // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; - // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; - // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; - // // if (val === false && this.isOpen === true) { - // // console.log(val) - // // this.width = 97 + '%' - // // this.canvasReset() - // // } else if (val === false && this.isOpen === false) { - // // this.width = 100 + '%' - // // this.canvasReset() - // // } - // // this.actualOptions.series.map((item) => { - // // item.barWidth = val ? 18 : 12; - // // }); - // // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; - // // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; - // // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; - // this.initChart(this.actualOptions) - // this.canvasReset() - // }, + isFullscreen(val) { + // this.actualOptions.series.map((item) => { + // item.barWidth = val ? 18 : 12; + // }); + // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; + // if (val === false && this.isOpen === true) { + // console.log(val) + // this.width = 97 + '%' + // this.canvasReset() + // } else if (val === false && this.isOpen === false) { + // this.width = 100 + '%' + // this.canvasReset() + // } + // this.actualOptions.series.map((item) => { + // item.barWidth = val ? 18 : 12; + // }); + // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; + this.initChart(this.actualOptions) + this.canvasReset() + }, series(val) { if (!val) { this.initChart(this.options); @@ -268,11 +268,11 @@ export default { // this.isFullscreen = screenfull.isFullscreen; // }); // } - // if (screenfull.isEnabled) { - // screenfull.on("change", () => { - // this.isFullscreen = screenfull.isFullscreen; - // }); - // } + if (screenfull.isEnabled) { + screenfull.on("change", () => { + this.isFullscreen = screenfull.isFullscreen; + }); + } this.actualOptions = this.options this.canvasReset(); window.addEventListener("resize", this.canvasReset); diff --git a/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue b/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue index 2bbdf3e..5f82ff6 100644 --- a/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue +++ b/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue @@ -1,7 +1,7 @@ @@ -11,7 +11,7 @@ {{ item.label }} -
+
@@ -22,7 +22,7 @@ import ChartContainer from "../../../../components/ChartContainer.vue"; import { debounce } from "@/utils/debounce"; import * as echarts from "echarts"; export default { - name: "BarChartBase", + name: "barChartBaseoee", components: { ChartContainer, }, @@ -221,12 +221,12 @@ export default { }, /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ isFullscreen(val) { - this.actualOptions.series.map((item) => { - item.barWidth = val ? 18 : 12; - }); - this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; - this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; - this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; + // this.actualOptions.series.map((item) => { + // item.barWidth = val ? 18 : 12; + // }); + // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; + // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // if (val === false && this.isOpen === true) { // console.log(val) // this.width = 97 + '%' @@ -241,8 +241,8 @@ export default { // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; - // this.initChart(this.actualOptions) - // this.canvasReset() + this.initChart(this.actualOptions) + this.canvasReset() }, series(val) { if (!val) { @@ -267,11 +267,11 @@ export default { // this.isFullscreen = screenfull.isFullscreen; // }); // } - // if (screenfull.isEnabled) { - // screenfull.on("change", () => { - // this.isFullscreen = screenfull.isFullscreen; - // }); - // } + if (screenfull.isEnabled) { + screenfull.on("change", () => { + this.isFullscreen = screenfull.isFullscreen; + }); + } this.actualOptions = this.options this.canvasReset(); window.addEventListener("resize", this.canvasReset); diff --git a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue index a8ffc70..87b59f5 100644 --- a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue +++ b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue @@ -270,7 +270,7 @@ export default { display: flex; flex-direction: column; align-items: center; - justify-content: center; + // justify-content: center; gap: 3px; backdrop-filter: blur(24px); .cities { @@ -283,6 +283,7 @@ export default { flex: 1 1 auto; padding: 0 15%; /* margin: 10%; */ + height: 16vh; /* min-width: 300px; */ align-self: stretch; } diff --git a/src/views/copilot/efficiency/index.vue b/src/views/copilot/efficiency/index.vue index 6fc26c7..27af2ff 100644 --- a/src/views/copilot/efficiency/index.vue +++ b/src/views/copilot/efficiency/index.vue @@ -1,25 +1,31 @@ @@ -31,7 +37,7 @@ import StdRateVue from "./components/StdRate.vue"; import TransformRateVue from "./components/TransformRate.vue"; export default { - name: "EfficiencyCopilot", + name: "efficiencyCopilot", components: { Container, ChipOee: ChipOeeVue, @@ -88,7 +94,30 @@ export default { }; + + + diff --git a/src/views/copilot/efficiency/options/chipOptions.js b/src/views/copilot/efficiency/options/chipOptions.js index 6ff0fd9..f0732ee 100644 --- a/src/views/copilot/efficiency/options/chipOptions.js +++ b/src/views/copilot/efficiency/options/chipOptions.js @@ -22,7 +22,7 @@ export default ({ textAlign: "center", textStyle: { fontWeight: 600, - fontSize: 32, + fontSize: 26, color: "#fffd", }, subtext: `\u2002${subtitle}\u2002`, diff --git a/src/views/copilot/efficiencyContainer.vue b/src/views/copilot/efficiencyContainer.vue index 5393aef..e654b47 100644 --- a/src/views/copilot/efficiencyContainer.vue +++ b/src/views/copilot/efficiencyContainer.vue @@ -1,7 +1,7 @@ @@ -95,13 +95,14 @@ export default {