From c9f9122c1294c1884aa92fcd72abc0c6895a4647 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 19 Dec 2023 17:54:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=86=E5=9B=BE=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=99=A8=E6=94=AF=E6=8C=81=E4=B8=8E=E6=88=96=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/icons/svg/icon-filter_outlined.svg | 3 + .../src/views/chart/view/ChartEdit.vue | 84 +++++++++++------- .../src/views/chart/view/FilterTree.vue | 86 +++++++++++++++++++ 3 files changed, 142 insertions(+), 31 deletions(-) create mode 100644 core/frontend/src/icons/svg/icon-filter_outlined.svg create mode 100644 core/frontend/src/views/chart/view/FilterTree.vue diff --git a/core/frontend/src/icons/svg/icon-filter_outlined.svg b/core/frontend/src/icons/svg/icon-filter_outlined.svg new file mode 100644 index 0000000000..edff90dc53 --- /dev/null +++ b/core/frontend/src/icons/svg/icon-filter_outlined.svg @@ -0,0 +1,3 @@ + + + diff --git a/core/frontend/src/views/chart/view/ChartEdit.vue b/core/frontend/src/views/chart/view/ChartEdit.vue index 8e219fff94..62bf76e736 100644 --- a/core/frontend/src/views/chart/view/ChartEdit.vue +++ b/core/frontend/src/views/chart/view/ChartEdit.vue @@ -1095,36 +1095,19 @@ class="padding-lr" style="margin-top: 6px;" > - {{ $t('chart.result_filter') }} - - - - - -
- {{ $t('chart.placeholder_field') }} + + {{ $t('chart.result_filter') }} + 已设置 + + +
+ + 过滤
+ @@ -1888,7 +1872,7 @@ import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import DimensionExtItem from '@/views/chart/components/dragItem/DimensionExtItem' import PluginCom from '@/views/system/plugin/PluginCom' import { mapState } from 'vuex' - +import FilterTree from './FilterTree.vue' import FunctionCfg from '@/views/chart/components/senior/FunctionCfg' import MapMapping from '@/views/chart/components/senior/MapMapping' import AssistLine from '@/views/chart/components/senior/AssistLine' @@ -1924,6 +1908,7 @@ export default { ChartComponentG2, QuotaExtItem, FilterItem, + FilterTree, FieldEdit, TableSelector, ResultFilterEditor, @@ -1942,6 +1927,11 @@ export default { MapMapping, MarkMapDataEditor }, + provide() { + return { + filedList: () => this.filedList + } + }, props: { param: { type: Object, @@ -2075,6 +2065,9 @@ export default { } }, computed: { + filedList() { + return [...this.dimension, ...this.quota] + }, obj() { return { view: this.view, @@ -2298,6 +2291,13 @@ export default { }, methods: { + changeFilterData(customFilter) { + this.view.customFilter = customFilter + this.calcData(true) + }, + openTreeFilter() { + this.$refs.filterTree.init(this.view.customFilter) + }, includesAny, equalsAny, setTitle(title, id) { @@ -4271,8 +4271,30 @@ span { position: relative; width: 100%; display: inline-block; + .setting { + padding: 0px 4px 0px 4px; + border-radius: 2px; + background-color: #1F23291A; + color: #646A73; + position: absolute; + top: 1px; + right: 23px; + z-index: 1; + } } +.tree-btn { + width: 100%; + background: #fff; + height: 28px; + border-radius: 4px; + border: 1px solid #BBBFC4; + display: flex; + align-items: center; + cursor: pointer; + justify-content: center; + } + .data-area-clear { position: absolute; top: 4px; diff --git a/core/frontend/src/views/chart/view/FilterTree.vue b/core/frontend/src/views/chart/view/FilterTree.vue new file mode 100644 index 0000000000..f810c62f7a --- /dev/null +++ b/core/frontend/src/views/chart/view/FilterTree.vue @@ -0,0 +1,86 @@ + + + + \ No newline at end of file