From 2a8cb0d3893dd78d7aef5ce035cfd52ac36c4dd6 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 27 Feb 2024 16:59:15 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E6=96=B0=E5=A2=9Eecharts(=E6=8A=98?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE)=E4=B8=8B=E6=96=B9=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1=E5=9E=8B=E7=BC=A9=E6=94=BE=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/index.scss | 8 +-- src/components/content/airInfo/AirInfo.vue | 14 ++++- .../content/badGasInfo/BadGasInfo.vue | 14 ++++- src/components/content/fanInfo/FanInfo.vue | 55 ++++++++++--------- .../content/windPressure/WindPressureList.vue | 34 ++++++++---- 5 files changed, 78 insertions(+), 47 deletions(-) diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 22903fd..80aeee4 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -295,25 +295,25 @@ body, #container { flex: 1; - height: 1160px; + height: 1200px; //width: 1300px; } #containerFan { flex: 1; - height: 1160px; + height: 1200px; //width: 1300px; } #containerBad { flex: 1; - height: 1160px; + height: 1200px; //width: 1300px; } #containerWind { flex: 1; - height: 1160px; + height: 1200px; //width: 1300px; } #containerWindDirection { diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index 104b32f..8e03332 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -200,7 +200,7 @@ const initChart = (type, values) => { left: 0, // 左边距 right: 20, // 右边距 top: 80, // 顶边距 - bottom: 0, // 底边距 + bottom: 170, // 底边距 containLabel: true, }, //提示框组件 @@ -233,7 +233,17 @@ const initChart = (type, values) => { }, dataZoom: [{ type: 'inside' - }], + }, + { + type: 'slider', + top: 1050, + height: 100, + textStyle: { + fontSize: 45, + color: '#fffff' + } + } + ], //X轴 xAxis: { type: 'category', diff --git a/src/components/content/badGasInfo/BadGasInfo.vue b/src/components/content/badGasInfo/BadGasInfo.vue index d9e256d..20bee1c 100644 --- a/src/components/content/badGasInfo/BadGasInfo.vue +++ b/src/components/content/badGasInfo/BadGasInfo.vue @@ -181,7 +181,7 @@ const initChart = (type, values) => { left: 0, // 左边距 right: 20, // 右边距 top: 80, // 顶边距 - bottom: 0, // 底边距 + bottom: 170, // 底边距 containLabel: true, }, //提示框组件 @@ -218,7 +218,17 @@ const initChart = (type, values) => { }, dataZoom: [{ type: 'inside' - }], + }, + { + type: 'slider', + top: 1050, + height: 100, + textStyle: { + fontSize: 45, + color: '#fffff' + } + } + ], //X轴 xAxis: { type: "category", diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue index 075eff3..69d57b5 100644 --- a/src/components/content/fanInfo/FanInfo.vue +++ b/src/components/content/fanInfo/FanInfo.vue @@ -55,16 +55,18 @@ - + - - - + + + @@ -347,7 +349,7 @@ const getBasicData = (data) => { autoMode: item.autoMode,//自动模式 breakdown: item.breakdown,//故障 running: item.running,//启动, - showTooltip:false, + showTooltip: false, frequencyFeedback: item.frequencyFeedback, frequencySetting: item.frequencySetting } @@ -506,7 +508,7 @@ const initChart = (type, valueA, valueB, valueC) => { left: 0, // 左边距 right: 20, // 右边距 top: 80, // 顶边距 - bottom: 0, // 底边距 + bottom: 170, // 底边距 containLabel: true, }, //提示框组件 @@ -528,22 +530,7 @@ const initChart = (type, valueA, valueB, valueC) => { `; } return res - - // return content; }, - // formatter: function (params) { - // let content = ` - //
- //
${params[0].name}
- //
${params[0].value}
- //
${params[1].name}
- //
${params[1].value}
- //
${params[2].name}
- //
${params[2].value}
- // - //
`; - // return content; - // }, }, toolbox: { show: false, @@ -555,8 +542,18 @@ const initChart = (type, valueA, valueB, valueC) => { } }, dataZoom: [{ - type: 'inside' - }], + type: 'inside', + }, + { + type: 'slider', + top: 1050, + height: 100, + textStyle: { + fontSize: 45, + color: '#fffff' + } + } + ], //X轴 xAxis: { type: 'category', @@ -900,9 +897,11 @@ input[type="number"] { margin-top: 10px; display: flex; flex-direction: column; - .changeMargin{ + + .changeMargin { } + > div:first-child { display: flex; @@ -910,12 +909,14 @@ input[type="number"] { white-space: pre; margin-right: 14px; } + :deep(.is-focus) { .el-input__inner { - font-weight: normal!important; - color: #fff!important; + font-weight: normal !important; + color: #fff !important; } } + :deep(.el-input__wrapper) { width: 160px; height: 44px; diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue index 13fb77a..0cf3646 100644 --- a/src/components/content/windPressure/WindPressureList.vue +++ b/src/components/content/windPressure/WindPressureList.vue @@ -3,7 +3,7 @@
风压
- {{loading===0?'加载中...':'暂无数据~'}} + {{ loading === 0 ? '加载中...' : '暂无数据~' }}
-
+
加载中...
@@ -69,12 +69,12 @@ watch(() => props.winData, (now) => { getScreenInfo(now.windPressureSensorList) }, {deep: true}); -const getWindInfo = (equipmentId,type='day') => { +const getWindInfo = (equipmentId, type = 'day') => { isVisited.value = true - showLoading.value=true - getEchartsInfo(equipmentId,type).then(res => { + showLoading.value = true + getEchartsInfo(equipmentId, type).then(res => { if (res?.code === 1000) { - showLoading.value=false + showLoading.value = false nextTick(() => { initChart(res.data.dates, res.data.values) }) @@ -83,18 +83,18 @@ const getWindInfo = (equipmentId,type='day') => { } const handleOpenChart = (item) => { - selectTimeButton.value=2 + selectTimeButton.value = 2 getWindInfo(item.equipmentId) windSort.value = item.equipmentName windSortId.value = item.equipmentId } const timeSelect = (index) => { if (index === 0) { - getWindInfo(windSortId.value,'years') + getWindInfo(windSortId.value, 'years') } else if (index === 1) { - getWindInfo(windSortId.value,'month') + getWindInfo(windSortId.value, 'month') } else if (index === 2) { - getWindInfo(windSortId.value,'day') + getWindInfo(windSortId.value, 'day') } }; const getScreenInfo = (now) => { @@ -136,7 +136,7 @@ const initChart = (type, values) => { left: 0, // 左边距 right: 20, // 右边距 top: 80, // 顶边距 - bottom: 0, // 底边距 + bottom: 170, // 底边距 containLabel: true, }, //提示框组件 @@ -169,7 +169,17 @@ const initChart = (type, values) => { }, dataZoom: [{ type: 'inside' - }], + }, + { + type: 'slider', + top: 1050, + height: 100, + textStyle: { + fontSize: 45, + color: '#fffff' + } + } + ], //X轴 xAxis: { type: 'category',