diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue index e738f1fb..c9c3016f 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataPond/components/ChartDataPondControl/index.vue @@ -131,6 +131,19 @@ const editSaveHandle = (newData: RequestDataPondItemType) => { const targetIndex = requestDataPond.value.findIndex(item => item.dataPondId === newData.dataPondId) if (targetIndex !== -1) { requestDataPond.value.splice(targetIndex, 1, newData) + // 修改数据池后, 修改所有关联的组件 + chartEditStore.getComponentList.forEach(item => { + if ( + item.request.requestDataType === RequestDataTypeEnum.Pond && + item.request.requestDataPondId === newData.dataPondId + ) { + item.request = { + ...toRaw(newData.dataPondRequestConfig), + requestDataPondId: newData.dataPondId + } + } + }) + window.$message.success('保存成功!') } else { window.$message.error('编辑失败,请稍后重试!') } diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataRequest/pondIndex.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataRequest/pondIndex.vue index e07ca362..9081500e 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataRequest/pondIndex.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataRequest/pondIndex.vue @@ -70,7 +70,7 @@ const closeAndSendHandle = () => { return } goDialog({ - message: '是否保存内容?', + message: '保存内容将同步修改所有使用此接口的组件, 是否继续?', isMaskClosable: true, transformOrigin: 'center', onPositiveCallback: () => {