From 083da5e4b13b96eaead6d80bf6a1d736cb2a603f Mon Sep 17 00:00:00 2001 From: fuguobin Date: Mon, 19 Feb 2024 16:41:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E5=80=BC=E5=8D=95=E4=BD=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/components.d.ts | 4 +++ src/views/data-visual/components/hxPress.vue | 11 +++++-- src/views/data-visual/components/hxTemp.vue | 11 +++++-- src/views/data-visual/components/priPress.vue | 30 +++++++++++++++++++ src/views/data-visual/components/secPress.vue | 30 +++++++++++++++++++ src/views/data-visual/components/secTemp.vue | 30 +++++++++++++++++++ 6 files changed, 110 insertions(+), 6 deletions(-) diff --git a/src/types/components.d.ts b/src/types/components.d.ts index ff9cf43..4b8a87e 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -9,12 +9,15 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] Button: typeof import('./../components/Widgets/button.vue')['default'] + ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] + ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] + ElDivider: typeof import('element-plus/es')['ElDivider'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] @@ -30,6 +33,7 @@ declare module '@vue/runtime-core' { ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] diff --git a/src/views/data-visual/components/hxPress.vue b/src/views/data-visual/components/hxPress.vue index 5229340..a30a204 100644 --- a/src/views/data-visual/components/hxPress.vue +++ b/src/views/data-visual/components/hxPress.vue @@ -1146,8 +1146,8 @@ function init(data: any) { offset: offsetData, scale: true, //自适应 // minInterval: 1, //最小间距 - min: item.unitMin, //最小值 - max: item.unitMax, //最大值 + // min: item.unitMin, //最小值 + // max: item.unitMax, //最大值 // interval: 10, //刻度间隔 nameTextStyle: { color: '#D1E1FF', @@ -1182,7 +1182,12 @@ function init(data: any) { smooth: true, symbol: 'none', yAxisIndex: item.index, - data: item.data + data: item.data, + tooltip: { + valueFormatter: function (value: any) { + return value + ' ' + item.paramUnit; + } + } }); }); const chart = echarts.init(hxPressRef.value); diff --git a/src/views/data-visual/components/hxTemp.vue b/src/views/data-visual/components/hxTemp.vue index 7cf5eee..dc213ba 100644 --- a/src/views/data-visual/components/hxTemp.vue +++ b/src/views/data-visual/components/hxTemp.vue @@ -640,8 +640,8 @@ function init(data: any) { offset: offsetData, scale: true, //自适应 // minInterval: 1, //最小间距 - min: item.unitMin, //最小值 - max: item.unitMax, //最大值 + // min: item.unitMin, //最小值 + // max: item.unitMax, //最大值 // interval: 10, //刻度间隔 nameTextStyle: { color: '#D1E1FF', @@ -676,7 +676,12 @@ function init(data: any) { smooth: true, symbol: 'none', yAxisIndex: item.index, - data: item.data + data: item.data, + tooltip: { + valueFormatter: function (value: any) { + return value + ' ' + item.paramUnit; + } + } }); }); const chart = echarts.init(hxTempRef.value); diff --git a/src/views/data-visual/components/priPress.vue b/src/views/data-visual/components/priPress.vue index d2b31e3..fa26190 100644 --- a/src/views/data-visual/components/priPress.vue +++ b/src/views/data-visual/components/priPress.vue @@ -103,6 +103,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -112,6 +117,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -121,6 +131,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -130,6 +145,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -139,6 +159,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -148,6 +173,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } } ] diff --git a/src/views/data-visual/components/secPress.vue b/src/views/data-visual/components/secPress.vue index 90c198e..688e896 100644 --- a/src/views/data-visual/components/secPress.vue +++ b/src/views/data-visual/components/secPress.vue @@ -103,6 +103,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -112,6 +117,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -121,6 +131,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -130,6 +145,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -139,6 +159,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } }, { @@ -148,6 +173,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' Mpa'; + } } } ] diff --git a/src/views/data-visual/components/secTemp.vue b/src/views/data-visual/components/secTemp.vue index 73fac6d..e39fbca 100644 --- a/src/views/data-visual/components/secTemp.vue +++ b/src/views/data-visual/components/secTemp.vue @@ -103,6 +103,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } }, { @@ -112,6 +117,11 @@ const options = { barWidth: 15, emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } }, { @@ -121,6 +131,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } }, { @@ -130,6 +145,11 @@ const options = { stack: 'Low Zone', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } }, { @@ -139,6 +159,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } }, { @@ -148,6 +173,11 @@ const options = { stack: 'High Area', emphasis: { focus: 'series' + }, + tooltip: { + valueFormatter: function (value: any) { + return value + ' °C'; + } } } ]