From fb462e3936fbeff15ad83a35872bdde83eb6e8b3 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Wed, 11 Dec 2024 16:33:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- package.json | 1 + src/components/echarts/MyEchart.vue | 2 +- src/components/echarts/MyEchartMap.vue | 7 +-- src/components/echarts/rmsboxi.vue | 48 +++++++++---------- src/components/echarts/shushiboxi.vue | 4 +- src/views/govern/device/control/detail.vue | 2 +- .../tabs/components/harmonicSpectrum.vue | 37 +++++--------- .../govern/device/control/tabs/trend.vue | 2 +- src/views/govern/device/planData/index.vue | 22 ++++----- 10 files changed, 58 insertions(+), 70 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf3..ff2d76a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,14 +11,15 @@ node_modules dist dist-ssr *.local - # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo +*.zip* *.ntvs* *.njsproj *.sln *.sw? +pnpm-lock.yaml diff --git a/package.json b/package.json index 5fdfbb7..de2054f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "screenfull": "^6.0.2", + "socket.io-client": "^4.0.0", "splitpanes": "3.1.5", "use-element-plus-theme": "^0.0.5", "vue": "^3.3.11", diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue index b27fb74..6f53c2d 100644 --- a/src/components/echarts/MyEchart.vue +++ b/src/components/echarts/MyEchart.vue @@ -66,7 +66,7 @@ const initChart = () => { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', borderWidth: 0, confine: true, ...(props.options?.tooltip || null) diff --git a/src/components/echarts/MyEchartMap.vue b/src/components/echarts/MyEchartMap.vue index aac3d59..7757a01 100644 --- a/src/components/echarts/MyEchartMap.vue +++ b/src/components/echarts/MyEchartMap.vue @@ -10,7 +10,7 @@ import { onBeforeUnmount, ref, watch, onMounted, defineEmits } from 'vue' import * as echarts from 'echarts4' import { useDictData } from '@/stores/dictData' -const dictData = useDictData() +const dictData = useDictData() const props = defineProps(['options']) const myCharts = ref() const showCircle = ref(false) @@ -23,7 +23,7 @@ const fetchConfig = async (name: string) => { // fetchConfig() const emit = defineEmits(['getRegionByRegion', 'eliminate']) -onMounted(() => {}) +onMounted(() => { }) const GetEchar = async (name: string) => { let chartDom = document.getElementById('chartMap') @@ -53,7 +53,7 @@ const GetEchar = async (name: string) => { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', ...(props.options.tooltip || null) }, @@ -206,6 +206,7 @@ watch( width: 100%; height: 100%; } + .iconfont { cursor: pointer; position: absolute; diff --git a/src/components/echarts/rmsboxi.vue b/src/components/echarts/rmsboxi.vue index 8cc8833..23cc2c8 100644 --- a/src/components/echarts/rmsboxi.vue +++ b/src/components/echarts/rmsboxi.vue @@ -209,8 +209,8 @@ export default { this.boxoList.evtParamTm + "s"; } else if (this.boxoList.systemType == 'WX') { - - + + this.titles = ' 监测点名称:' + @@ -218,7 +218,7 @@ export default { ' 发生时刻:' + this.boxoList.startTime + ' 暂降(骤升)幅值:' + - (this.boxoList.featureAmplitude ) + + (this.boxoList.featureAmplitude) + '% 持续时间:' + (this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') + 's' @@ -907,12 +907,12 @@ export default { opacity: 0.35, fontSize: 14, }, - backgroundColor: "rgba(0,0,0,0.35)", + backgroundColor: "rgba(0,0,0,0.55)", borderWidth: 0, }, title: { left: "center", - text: title, + text: title, subtitle: { text: "电压", align: "left", @@ -1079,9 +1079,9 @@ export default { color: "#FFCC00", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: radata, }, { @@ -1094,9 +1094,9 @@ export default { color: "#009900", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: rbdata, }, { @@ -1109,9 +1109,9 @@ export default { color: "#CC0000", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: rcdata, }, { @@ -1338,7 +1338,7 @@ export default { opacity: 0.35, fontSize: 14, }, - backgroundColor: "rgba(0,0,0,0.35)", + backgroundColor: "rgba(0,0,0,0.55)", borderWidth: 0, }, title: { @@ -1509,9 +1509,9 @@ export default { color: "#FFCC00", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: radata, }, { @@ -1524,9 +1524,9 @@ export default { color: "#009900", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: rbdata, }, { @@ -1539,9 +1539,9 @@ export default { color: "#CC0000", }, progressive: 500, - // 渲染阈值,大于此值则启动渐进渲染 - progressiveThreshold: 1000, - large: true, + // 渲染阈值,大于此值则启动渐进渲染 + progressiveThreshold: 1000, + large: true, data: rcdata, }, ], diff --git a/src/components/echarts/shushiboxi.vue b/src/components/echarts/shushiboxi.vue index ca49926..7207e5e 100644 --- a/src/components/echarts/shushiboxi.vue +++ b/src/components/echarts/shushiboxi.vue @@ -577,7 +577,7 @@ export default { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', borderWidth: 0, }, @@ -941,7 +941,7 @@ export default { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', borderWidth: 0 }, title: { diff --git a/src/views/govern/device/control/detail.vue b/src/views/govern/device/control/detail.vue index d7edbfc..ed3c132 100644 --- a/src/views/govern/device/control/detail.vue +++ b/src/views/govern/device/control/detail.vue @@ -179,7 +179,7 @@ const init = () => { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', borderWidth: 0 }, diff --git a/src/views/govern/device/control/tabs/components/harmonicSpectrum.vue b/src/views/govern/device/control/tabs/components/harmonicSpectrum.vue index a64a60d..490b17b 100644 --- a/src/views/govern/device/control/tabs/components/harmonicSpectrum.vue +++ b/src/views/govern/device/control/tabs/components/harmonicSpectrum.vue @@ -4,33 +4,18 @@
- - + +
-
+
@@ -286,8 +271,8 @@ const init = () => { searchForm.value.index.map((item: any, index: any) => { item?.children.map((vv: any, vvs: any) => { - if (mqttMessage.value[vv.name] !=undefined) { - + if (mqttMessage.value[vv.name] != undefined) { + item.data.push({ // time: mqttMessage.value.dataTime, value: mqttMessage.value[vv.name], @@ -305,7 +290,7 @@ const init = () => { xAixsTimeList.value.push(mqttMessage.value.dataTime.split(" ")[1]) searchForm.value.index.map((item: any, index: any) => { - + //循环渲染图表 const refName = setChildRef(index) childRefs[refName] = ref(null) // 初始化ref @@ -334,7 +319,7 @@ const init = () => { opacity: 0.35, fontSize: 14 }, - backgroundColor: 'rgba(0,0,0,0.35)', + backgroundColor: 'rgba(0,0,0,0.55)', borderWidth: 0 }, xAxis: { @@ -386,7 +371,7 @@ const init = () => { loading.value = false } -onMounted(() => {}) +onMounted(() => { }) defineExpose({ resetData, setHarmonicSpectrumData })