forked from github/dataease
Merge pull request #9081 from dataease/pr@dev-v2@feat_outer-params
Pr@dev v2@feat outer params
This commit is contained in:
commit
28d48fc949
1
core/core-frontend/src/assets/svg/filter.svg
Normal file
1
core/core-frontend/src/assets/svg/filter.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1700015172685" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4199" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M922.366667 114.813333A53.04 53.04 0 0 0 874.666667 85.333333H149.333333a53.333333 53.333333 0 0 0-42.666666 85.333334l277.333333 369.78V917.333333a21.333333 21.333333 0 0 0 29.253333 19.806667l213.333334-85.333333A21.333333 21.333333 0 0 0 640 832V540.446667L917.333333 170.666667a53.04 53.04 0 0 0 5.033334-55.853334z" p-id="4200"></path></svg>
|
After Width: | Height: | Size: 680 B |
@ -154,7 +154,7 @@ const componentBackgroundStyle = computed(() => {
|
||||
} else {
|
||||
style['background-color'] = colorRGBA
|
||||
}
|
||||
if (element.value.component !== 'UserView') {
|
||||
if (config.value.component !== 'UserView') {
|
||||
style['overflow'] = 'hidden'
|
||||
}
|
||||
return style
|
||||
|
@ -342,17 +342,18 @@ const getPanelViewList = dvId => {
|
||||
}
|
||||
// 增加过滤组件匹配
|
||||
componentData.value.forEach(componentItem => {
|
||||
if (componentItem.type === 'custom') {
|
||||
state.currentLinkPanelViewArray.push({
|
||||
id: componentItem.id,
|
||||
type: 'filter',
|
||||
name: componentItem.options.attrs.title
|
||||
? componentItem.options.attrs.title
|
||||
: state.widgetSubjectsTrans[componentItem.serviceName]
|
||||
if (componentItem.component === 'VQuery') {
|
||||
componentItem.propValue.forEach(filterItem => {
|
||||
state.currentLinkPanelViewArray.push({
|
||||
id: filterItem.id,
|
||||
type: 'filter',
|
||||
name: filterItem.name,
|
||||
title: filterItem.name
|
||||
})
|
||||
state.viewIdFieldArrayMap[filterItem.id] = [
|
||||
{ id: 'empty', name: t('visualization.filter_no_select') }
|
||||
]
|
||||
})
|
||||
state.viewIdFieldArrayMap[componentItem.id] = [
|
||||
{ id: 'empty', name: t('visualization.filter_no_select') }
|
||||
]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -1762,6 +1762,7 @@ export default {
|
||||
column_name: '字段名称'
|
||||
},
|
||||
visualization: {
|
||||
filter_no_select: '过滤组件无需选择',
|
||||
forbidden_copy: '当前组件不允许复制',
|
||||
url_check_error: '跳转错误,URL不合法',
|
||||
view_style: '图表样式',
|
||||
|
@ -820,7 +820,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
const trackInfo = this.nowPanelOuterParamsInfo
|
||||
for (let index = 0; index < curComponentData.length; index++) {
|
||||
const element = curComponentData[index]
|
||||
if (element.component !== 'UserView') continue
|
||||
if (!['UserView', 'VQuery'].includes(element.component)) continue
|
||||
const currentFilters = element.outerParamsFilters || [] // 外部参数信息
|
||||
|
||||
// 外部参数 可能会包含多个参数
|
||||
@ -869,6 +869,14 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
// !filterExist && vValid && currentFilters.push(condition)
|
||||
currentFilters.push(condition)
|
||||
}
|
||||
if (element.component === 'VQuery') {
|
||||
element.propValue.forEach(filterItem => {
|
||||
if (filterItem.id === targetViewId) {
|
||||
filterItem.selectValue = paramValueStr
|
||||
filterItem.defaultValue = paramValueStr
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
if (element.component === 'UserView') {
|
||||
element['outerParamsFilters'] = currentFilters
|
||||
|
Loading…
Reference in New Issue
Block a user