diff --git a/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue b/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue
index b5a74bd4..614b3d15 100644
--- a/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue
+++ b/src/views/chart/ContentConfigurations/components/ChartEvent/components/ChartEventInteraction/index.vue
@@ -58,7 +58,7 @@
- 不支持「静态组件」
+ 不支持「静态组件」支持「组件」「公共APi」
- 关联目标组件请求参数
+ 关联目标请求参数
{
// 绑定组件数据 request
const fnGetRequest = (id: string | undefined, key: RequestParamsTypeEnum) => {
if (!id) return {}
+ const globalConfigPindApr = chartEditStore.requestGlobalConfig.requestDataPond.find(item => {
+ return item.dataPondId === id
+ })?.dataPondRequestConfig.requestParams
+
+ if (globalConfigPindApr) return globalConfigPindApr[key]
return chartEditStore.componentList[chartEditStore.fetchTargetIndex(id)]?.request.requestParams[key]
}
@@ -178,12 +183,10 @@ const fnEventsOptions = (): Array => {
iter: Array,
val: CreateComponentType | CreateComponentGroupType
) => {
- if (val.groupList && val.groupList.length > 0) {
- iter.push(val)
- } else {
+ if (!val.groupList && val.request.requestDataType === RequestDataTypeEnum.AJAX && val.request.requestUrl) {
iter.push(val)
}
- return val.groupList ? [...iter, ...fnFlattern(val.groupList)] : iter
+ return val.groupList && val.groupList.length > 0 ? [...iter, ...fnFlattern(val.groupList)] : iter
},
[]
)
@@ -203,18 +206,26 @@ const fnEventsOptions = (): Array => {
const mapOptionList = filterOptionList.map(item => ({
id: item.id,
title: item.chartConfig.title,
- disabled: false
+ disabled: false,
+ type: 'componentList'
}))
+ const requestDataPond = chartEditStore.requestGlobalConfig.requestDataPond.map(item => ({
+ id: item.dataPondId,
+ title: item.dataPondName,
+ disabled: false,
+ type: 'requestDataPond'
+ }))
+ const tarArr = requestDataPond.concat(mapOptionList)
targetData.value.events.interactEvents?.forEach(iaItem => {
- mapOptionList.forEach(optionItem => {
+ tarArr.forEach(optionItem => {
if (optionItem.id === iaItem.interactComponentId) {
optionItem.disabled = true
}
})
})
- return mapOptionList
+ return tarArr
}
// 新增模块