From e83687c9e72b6067dbd320f8d970b79c6e7ffed5 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 28 Jul 2022 22:16:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE):=20=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=98=88=E5=80=BCnull=E4=B8=8E=E7=A9=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E5=90=88=E5=B9=B6=E6=88=90=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/chart/table/table-info.js | 16 +++------------- .../senior/dialog/TableThresholdEdit.vue | 10 ---------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/frontend/src/views/chart/chart/table/table-info.js b/frontend/src/views/chart/chart/table/table-info.js index cdd4392bb4..563d5cac29 100644 --- a/frontend/src/views/chart/chart/table/table-info.js +++ b/frontend/src/views/chart/chart/table/table-info.js @@ -541,7 +541,7 @@ function mappingColor(value, defaultColor, field, type) { } else if (i === field.conditions.length - 1) { color = defaultColor } - } else if (field.field.deType === 0) { + } else if (field.field.deType === 0 || field.field.deType === 5) { const tv = t.value if (t.term === 'eq') { if (value === tv) { @@ -564,22 +564,12 @@ function mappingColor(value, defaultColor, field, type) { flag = true } } else if (t.term === 'null') { - if (value === null || value === undefined) { + if (value === null || value === undefined || value === '') { color = t[type] flag = true } } else if (t.term === 'not_null') { - if (value !== null && value !== undefined) { - color = t[type] - flag = true - } - } else if (t.term === 'empty') { - if (value === '') { - color = t[type] - flag = true - } - } else if (t.term === 'not_empty') { - if (value !== '') { + if (value !== null && value !== undefined && value !== '') { color = t[type] flag = true } diff --git a/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue b/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue index f168f45f92..5bd2d2f710 100644 --- a/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue +++ b/frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue @@ -166,16 +166,6 @@ export default { value: 'not_null', label: this.$t('chart.filter_not_null') }] - }, - { - label: '', - options: [{ - value: 'empty', - label: this.$t('chart.filter_empty') - }, { - value: 'not_empty', - label: this.$t('chart.filter_not_empty') - }] } ], dateOptions: [