From e4aaf0ddd0c102c992b87967dee6f0c7c439d630 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 19 Sep 2024 11:31:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=BB=84=E9=BB=98=E8=AE=A4=E5=B1=95=E7=A4=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/picture-group/Attr.vue | 5 ++--- .../src/custom-component/picture-group/Component.vue | 10 ++++++++-- .../editor/editor-senior/components/Threshold.vue | 2 ++ .../components/dialog/PictureGroupThresholdEdit.vue | 3 ++- .../components/js/panel/charts/others/picture-group.ts | 10 ++-------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/core/core-frontend/src/custom-component/picture-group/Attr.vue b/core/core-frontend/src/custom-component/picture-group/Attr.vue index 156bae32ff..edc64b1053 100644 --- a/core/core-frontend/src/custom-component/picture-group/Attr.vue +++ b/core/core-frontend/src/custom-component/picture-group/Attr.vue @@ -177,11 +177,10 @@ onBeforeUnmount(() => { { } } -.form-item-dark { +.form-item-custom { .ed-radio { margin-right: 4px !important; } diff --git a/core/core-frontend/src/custom-component/picture-group/Component.vue b/core/core-frontend/src/custom-component/picture-group/Component.vue index e298305ce0..1b43374342 100644 --- a/core/core-frontend/src/custom-component/picture-group/Component.vue +++ b/core/core-frontend/src/custom-component/picture-group/Component.vue @@ -107,6 +107,7 @@ const initCurFields = chartDetails => { } const conditionAdaptor = (chart: Chart) => { + state.showUrl = null if (!chart || !chart.senior) { return } @@ -118,7 +119,7 @@ const conditionAdaptor = (chart: Chart) => { if (conditions?.length > 0) { for (let i = 0; i < conditions.length; i++) { const field = conditions[i] - let defaultValueColor = 'none' + let defaultValueColor = null const checkResult = mappingColor( dataRowNameSelect.value[field.field.name], defaultValueColor, @@ -139,8 +140,13 @@ const withInit = () => { } const calcData = (view: Chart, callback) => { - console.log('===calcData1') isError.value = false + const { threshold } = parseJson(view.senior) + if (!threshold.enable) { + withInit() + callback?.() + return + } if (view.tableId || view['dataFrom'] === 'template') { const v = JSON.parse(JSON.stringify(view)) getData(v) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue index bf498d50c7..08cd6f84b8 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue @@ -575,11 +575,13 @@ init() {{ t('chart.filter_not_empty') }} + 默认