From ae7ec67161121534672430be1794784cd73733ff Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 18 Jul 2022 10:42:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=98=88=E5=80=BC=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 10 +- frontend/src/lang/tw.js | 10 +- frontend/src/lang/zh.js | 10 +- frontend/src/views/chart/chart/chart.js | 8 +- .../chart/components/senior/Threshold.vue | 165 +++++++- .../senior/dialog/TableThresholdEdit.vue | 398 ++++++++++++++++++ frontend/src/views/chart/view/ChartEdit.vue | 10 +- 7 files changed, 597 insertions(+), 14 deletions(-) create mode 100644 frontend/src/views/chart/components/senior/dialog/TableThresholdEdit.vue diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index e8da510e74..0bcc2905b3 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1121,7 +1121,15 @@ export default { open: 'Open', row: 'Row', interval: 'Interval', - max_more_than_mix: 'Max must more than Min' + max_more_than_mix: 'Max must more than Min', + field: 'Field', + textColor: 'Text Color', + backgroundColor: 'Background Color', + field_can_not_empty: 'Field can not empty', + conditions_can_not_empty: 'Conditions can not be empty,if unnecessary,please delete the field', + remark: 'Remark', + remark_edit: 'Edit Remark', + remark_bg_color: 'Background Fill' }, dataset: { params_work: 'Effective only when editing SQL', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index f0398bcb86..1e2e7f279e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1121,7 +1121,15 @@ export default { open: '開啟', row: '行數', interval: '間隔', - max_more_than_mix: '最大值必須大於最小值' + max_more_than_mix: '最大值必須大於最小值', + field: '字段', + textColor: '文字顏色', + backgroundColor: '背景顏色', + field_can_not_empty: '字段不能為空', + conditions_can_not_empty: '字段的條件不能為空,若無條件,請直接刪除該字段', + remark: '備註', + remark_edit: '編輯備註', + remark_bg_color: '背景填充' }, dataset: { params_work: '僅在編輯 sql 時生效', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index e3ff9dcd52..25c295f2f8 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1123,7 +1123,15 @@ export default { open: '开启', row: '行数', interval: '间隔', - max_more_than_mix: '最大值必须大于最小值' + max_more_than_mix: '最大值必须大于最小值', + field: '字段', + textColor: '文字颜色', + backgroundColor: '背景颜色', + field_can_not_empty: '字段不能为空', + conditions_can_not_empty: '字段的条件不能为空,若无条件,请直接删除该字段', + remark: '备注', + remark_edit: '编辑备注', + remark_bg_color: '背景填充' }, dataset: { params_work: '仅在编辑sql时生效', diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index dc8e119a52..afc9abf262 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -144,7 +144,10 @@ export const DEFAULT_TITLE_STYLE = { hPosition: 'left', vPosition: 'top', isItalic: false, - isBolder: true + isBolder: true, + remarkShow: false, + remark: '', + remarkBackgroundColor: '#ffffffff' } export const DEFAULT_TITLE_STYLE_DARK = { @@ -337,7 +340,8 @@ export const DEFAULT_FUNCTION_CFG = { } export const DEFAULT_THRESHOLD = { gaugeThreshold: '', - labelThreshold: [] + labelThreshold: [], + tableThreshold: [] } export const DEFAULT_SCROLL = { open: false, diff --git a/frontend/src/views/chart/components/senior/Threshold.vue b/frontend/src/views/chart/components/senior/Threshold.vue index 6b433b70fe..c171c90022 100644 --- a/frontend/src/views/chart/components/senior/Threshold.vue +++ b/frontend/src/views/chart/components/senior/Threshold.vue @@ -44,14 +44,67 @@ {{ item.value }} - + - + + + + + + + + + + + + + + {{ fieldItem.field.name }} + + + + {{ $t('chart.filter_eq') }} + {{ $t('chart.filter_not_eq') }} + {{ $t('chart.filter_lt') }} + {{ $t('chart.filter_gt') }} + {{ $t('chart.filter_le') }} + {{ $t('chart.filter_ge') }} + {{ $t('chart.filter_like') }} + {{ $t('chart.filter_not_like') }} + {{ $t('chart.filter_null') }} + {{ $t('chart.filter_not_null') }} + {{ $t('chart.filter_empty') }} + {{ $t('chart.filter_not_empty') }} + + + {{ item.value }} +   + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index dea7115270..e885201071 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -697,12 +697,12 @@
{{ $t('chart.senior_cfg') }} @@ -714,7 +714,7 @@ @onFunctionCfgChange="onFunctionCfgChange" /> - + {{ $t('chart.analyse_cfg') }} @@ -742,7 +742,7 @@ />