diff --git a/nezha-fronted/src/components/common/js/common.js b/nezha-fronted/src/components/common/js/common.js
index f806c3e6c..2917daffd 100644
--- a/nezha-fronted/src/components/common/js/common.js
+++ b/nezha-fronted/src/components/common/js/common.js
@@ -16,6 +16,10 @@ export function getUUID () {
return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
}
+export function s8 () {
+ return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1)
+}
+
export const chartCache = {}
export function getChart (key) {
diff --git a/nezha-fronted/src/components/common/nezhaColor.vue b/nezha-fronted/src/components/common/nezhaColor.vue
index d14c7adf9..9f90b7672 100644
--- a/nezha-fronted/src/components/common/nezhaColor.vue
+++ b/nezha-fronted/src/components/common/nezhaColor.vue
@@ -21,7 +21,7 @@
{{item.name}}
-
+
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
index 8bd754a8c..88e26f6df 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
@@ -484,7 +484,7 @@
import { fromRoute } from '@/components/common/js/constants'
import editRigthBox from '@/components/common/mixin/editRigthBox'
-import { resetZIndex, getUUID } from '@/components/common/js/common'
+import { resetZIndex, getUUID, s8 } from '@/components/common/js/common'
import selectPanel from '@/components/common/popBox/selectPanel'
import chartConfig from '@/components/common/rightBox/chart/chartConfig'
import otherChartConfig from '@/components/common/rightBox/chart/otherChartConfig'
@@ -382,7 +382,7 @@ export default {
valueMapping: false,
visibility: false
},
- thresholds: [{ value: undefined, color: '#eeeeeeff' }],
+ thresholds: [{ id: s8(), value: undefined, color: '#eeeeeeff' }],
showHeader: this.editChart.param.showHeader,
visibility: {
varName: '',
@@ -541,6 +541,10 @@ export default {
}
if (obj.param && !obj.param.thresholds) {
obj.param.thresholds = []
+ } else if (obj.param && obj.param.thresholds) {
+ obj.param.thresholds.forEach(item => {
+ item.id = s8()
+ })
}
if (obj.groupId === -1) {
obj.groupId = ''
diff --git a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
index 914b11318..3f51c53c3 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
@@ -398,7 +398,7 @@