From 92ff8c7c256dee6daad51ed06fd270c275dec528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Thu, 15 Dec 2022 21:04:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=BB=84=E4=BB=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ChartDataPondControl/index.vue | 13 +++++++++++++ .../components/ChartDataRequest/pondIndex.vue | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) 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: () => {