From 6ea76b54d9b53e857560bdfe646e765ae217b462 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Tue, 26 Mar 2024 11:27:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=E5=88=9D=E5=A7=8B=E5=8C=96=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E5=80=BC=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/views/chart/chart/util.js | 7 ++ .../senior/dialog/TableThresholdEdit.vue | 65 +++++++------------ 2 files changed, 31 insertions(+), 41 deletions(-) diff --git a/core/frontend/src/views/chart/chart/util.js b/core/frontend/src/views/chart/chart/util.js index 08bd5d2af8..7137f276cc 100644 --- a/core/frontend/src/views/chart/chart/util.js +++ b/core/frontend/src/views/chart/chart/util.js @@ -3923,3 +3923,10 @@ export function handleTableEmptyStrategy(tableData, chart) { } return newData } + +export function parseJson(target) { + if (Object.prototype.toString.call(target) === '[object String]') { + return JSON.parse(target) + } + return JSON.parse(JSON.stringify(target)) +} diff --git a/core/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue b/core/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue index 374e572458..70ee0922d0 100644 --- a/core/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue +++ b/core/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue @@ -393,6 +393,7 @@