diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 2a6d625490..e9ef18a481 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -434,13 +434,6 @@ export default { panelInfo() { return this.$store.state.panel.panelInfo } - /* pluginRenderOptions() { - const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || [] - const pluginOptions = plugins.filter(plugin => !this.renderOptions.some(option => option.value === plugin.render)).map(plugin => { - return { name: plugin.render, value: plugin.render } - }) - return [...this.renderOptions, ...pluginOptions] - } */ }, watch: { saveStatus() { @@ -693,6 +686,9 @@ export default { this.tData = res.data this.initCurrentNode() } + if (this.filterText) { + this.$refs.chartTreeRef.filter(this.filterText) + } }) }, diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index f1ab5dad5c..965a98994d 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -228,7 +228,7 @@ import LinkGenerate from '@/views/link/generate' import { uuid } from 'vue-uuid' import bus from '@/utils/bus' import EditPanel from './EditPanel' -import { addGroup, delGroup, groupTree, defaultTree, panelSave, initPanelData, panelUpdate } from '@/api/panel/panel' +import { addGroup, delGroup, groupTree, defaultTree, initPanelData, panelUpdate } from '@/api/panel/panel' import { mapState } from 'vuex' import { DEFAULT_COMMON_CANVAS_STYLE_STRING @@ -621,6 +621,11 @@ export default { if (!userCache) { this.tData = res.data } + if (this.filterText) { + this.$nextTick(() => { + this.$refs.panel_list_tree.filter(this.filterText) + }) + } }) }, defaultTree(cache = false) { @@ -638,6 +643,11 @@ export default { if (!userCache) { this.defaultData = res.data } + if (this.filterText) { + this.$nextTick(() => { + this.$refs.default_panel_tree.filter(this.filterText) + }) + } }) },