diff --git a/core/frontend/src/icons/svg/filter.svg b/core/frontend/src/icons/svg/filter.svg new file mode 100644 index 0000000000..d533bd3f2a --- /dev/null +++ b/core/frontend/src/icons/svg/filter.svg @@ -0,0 +1 @@ + diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index 5b1f241620..b539c481d9 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -2027,6 +2027,7 @@ export default { back_parent: 'Back to previous' }, panel: { + filter_no_select: 'Filter components do not need to be selected', first_item: 'First item', forbidden_copy: 'Forbidden copy', url_check_error: 'Jump error, Illegal URL', @@ -2343,7 +2344,9 @@ export default { link_panel: 'panel', select_jump_panel: 'Select Jump Panel', link_view: 'Link View', + link_component: 'Link Component', link_view_field: 'Link View Field', + link_component_field: 'Link Component Field', add_jump_field: 'Add Jump Field', input_jump_link: 'Input Jump Link', select_dimension: 'Select Dimension...', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index c4f26a9eea..a49c4ac367 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -2021,6 +2021,7 @@ export default { back_parent: '返回上一級' }, panel: { + filter_no_select: '過濾組件無需選擇', first_item: '首項', forbidden_copy: '當前組件不允許復製', url_check_error: '跳轉錯誤,URL不合法', @@ -2337,7 +2338,9 @@ export default { link_panel: '儀表闆', select_jump_panel: '選擇關聯的儀表闆', link_view: '聯動視圖', + link_component: '聯動组件', link_view_field: '聯動視圖字段', + link_component_field: '聯動组件字段', add_jump_field: '追加跳轉聯動依賴字段', input_jump_link: '請輸入跳轉連接', select_dimension: '請選擇維度...', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index ad3f92132e..a87d480532 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -2021,6 +2021,7 @@ export default { back_parent: '返回上一级' }, panel: { + filter_no_select: '过滤组件无需选择', first_item: '首项', forbidden_copy: '当前组件不允许复制', url_check_error: '跳转错误,URL不合法', @@ -2337,7 +2338,9 @@ export default { link_panel: '仪表板', select_jump_panel: '选择关联的仪表板', link_view: '联动视图', + link_component: '联动组件', link_view_field: '联动视图字段', + link_component_field: '联动组件字段', add_jump_field: '追加跳转联动依赖字段', input_jump_link: '请输入跳转连接', select_dimension: '请选择维度...', diff --git a/core/frontend/src/store/index.js b/core/frontend/src/store/index.js index e1543b32f9..a2054d3fb2 100644 --- a/core/frontend/src/store/index.js +++ b/core/frontend/src/store/index.js @@ -465,7 +465,7 @@ const data = { for (let index = 0; index < state.componentData.length; index++) { const element = state.componentData[index] - if (!element.type || element.type !== 'view') continue + if (!element.type || (element.type !== 'view' && element.type !== 'custom')) continue const currentFilters = element.outerParamsFilters || [] // 外部参数信息 // 外部参数 可能会包含多个参数 @@ -483,7 +483,7 @@ const data = { targetInfoList.forEach(targetInfo => { const targetInfoArray = targetInfo.split('#') const targetViewId = targetInfoArray[0] // 目标视图 - if (element.propValue.viewId === targetViewId) { // 如果目标视图 和 当前循环组件id相等 则进行条件增减 + if (element.type === 'view' && element.propValue.viewId === targetViewId) { // 如果目标视图 和 当前循环组件id相等 则进行条件增减 const targetFieldId = targetInfoArray[1] // 目标视图列ID const condition = new Condition('', targetFieldId, operator, paramValue, [targetViewId]) let j = currentFilters.length @@ -498,8 +498,13 @@ const data = { // !filterExist && vValid && currentFilters.push(condition) currentFilters.push(condition) } + if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理 + element.options.value = paramValue + } }) - element.outerParamsFilters = currentFilters + if (element.type === 'view') { + element.outerParamsFilters = currentFilters + } state.componentData[index] = element }) } diff --git a/core/frontend/src/views/panel/outerParamsSet/index.vue b/core/frontend/src/views/panel/outerParamsSet/index.vue index d63421dca9..908725201c 100644 --- a/core/frontend/src/views/panel/outerParamsSet/index.vue +++ b/core/frontend/src/views/panel/outerParamsSet/index.vue @@ -65,7 +65,8 @@ icon="el-icon-plus" round @click="addOuterParamsInfo" - >{{ $t('panel.add_param') }} + >{{ $t('panel.add_param') }} + - {{ $t('panel.link_view') }} + {{ $t('panel.link_component') }} - {{ $t('panel.link_view_field') }} + {{ $t('panel.link_component_field') }} @@ -129,6 +130,7 @@ {{ - $t('panel.add_param_link_field') }} + $t('panel.add_param_link_field') + }} @@ -224,23 +227,25 @@ {{ $t('commons.cancel') }} + >{{ $t('commons.cancel') }} + {{ $t('commons.confirm') }} + >{{ $t('commons.confirm') }} +