From 9ec4a8676cf038835430abe8439200a9765cd747 Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Mon, 21 Oct 2024 09:09:56 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/echarts/color.ts | 14 ++------------
src/utils/echartMethod.ts | 11 +++--------
src/utils/tableStore.ts | 2 ++
src/views/govern/analyze/DVR/index.vue | 1 +
src/views/govern/device/control/detail.vue | 11 ++++++++---
.../device/planData/components/schemeTree.vue | 15 ++++++++-------
src/views/govern/device/planData/index.vue | 14 +++++++++-----
7 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/src/components/echarts/color.ts b/src/components/echarts/color.ts
index 00fb0e2..a3d2211 100644
--- a/src/components/echarts/color.ts
+++ b/src/components/echarts/color.ts
@@ -1,14 +1,4 @@
-export let color = [
- '#07CCCA',
- '#00BFF5',
- '#FFBF00',
- '#77DA63',
- '#D5FF6B',
- '#Ff6600',
- '#FF9100',
- '#5B6E96',
- '#66FFCC',
- '#B3B3B3'
-]
+export let color = [ '#07CCCA','#00BFF5', '#FFBF00', '#77DA63', '#D5FF6B', '#Ff6600', '#FF9100', '#5B6E96', '#66FFCC', '#B3B3B3']
export const gradeColor3 = ['#339966', '#FFCC33', '#CC0000']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#CC0000']
+
diff --git a/src/utils/echartMethod.ts b/src/utils/echartMethod.ts
index b1e01a1..710ee6f 100644
--- a/src/utils/echartMethod.ts
+++ b/src/utils/echartMethod.ts
@@ -1,20 +1,16 @@
-import { install$2 } from 'echarts/types/dist/shared'
-
export const yMethod = (arr: any) => {
- let interval = 0
let maxValue = 0
let minValue = 0
let max = 0
let min = 0
maxValue = Math.max(...arr)
minValue = Math.min(...arr)
-
- if (maxValue > 1000) {
+ if (maxValue > 1000 ||minValue < -1000) {
max = Math.ceil(maxValue / 100) * 100
if (minValue == 0) {
min = 0
} else {
- min = (Math.floor(minValue / 100) - 1) * 100
+ min = (Math.floor(minValue / 100) ) * 100
}
} else {
max = Math.ceil(maxValue / 10) * 10
@@ -26,6 +22,5 @@ export const yMethod = (arr: any) => {
} else if (max == 0 && minValue > -1 && minValue < 0) {
min = -1
}
-
- return [min, max, interval]
+ return [min, max]
}
diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts
index 31100ae..e3fc295 100644
--- a/src/utils/tableStore.ts
+++ b/src/utils/tableStore.ts
@@ -95,6 +95,8 @@ export default class TableStore {
}
this.table.loadCallback && this.table.loadCallback()
this.table.loading = false
+ }).catch(() => {
+ this.table.loading = false
})
}
diff --git a/src/views/govern/analyze/DVR/index.vue b/src/views/govern/analyze/DVR/index.vue
index 16c6ded..d045665 100644
--- a/src/views/govern/analyze/DVR/index.vue
+++ b/src/views/govern/analyze/DVR/index.vue
@@ -141,6 +141,7 @@ const tableStore = new TableStore({
tableStore.table.params.type = 0
provide('tableStore', tableStore)
const nodeClick = async (e: anyObj) => {
+ console.log("🚀 ~ nodeClick ~ e:", e)
if (e.level == 2) {
loading.value = false
tableStore.table.params.deviceId = e.id
diff --git a/src/views/govern/device/control/detail.vue b/src/views/govern/device/control/detail.vue
index b57785e..813c4e9 100644
--- a/src/views/govern/device/control/detail.vue
+++ b/src/views/govern/device/control/detail.vue
@@ -5,7 +5,7 @@