mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 新增编辑接口同步修改所有组件功能
This commit is contained in:
parent
99cd66c835
commit
e1e26cafcf
@ -131,6 +131,19 @@ const editSaveHandle = (newData: RequestDataPondItemType) => {
|
|||||||
const targetIndex = requestDataPond.value.findIndex(item => item.dataPondId === newData.dataPondId)
|
const targetIndex = requestDataPond.value.findIndex(item => item.dataPondId === newData.dataPondId)
|
||||||
if (targetIndex !== -1) {
|
if (targetIndex !== -1) {
|
||||||
requestDataPond.value.splice(targetIndex, 1, newData)
|
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 {
|
} else {
|
||||||
window.$message.error('编辑失败,请稍后重试!')
|
window.$message.error('编辑失败,请稍后重试!')
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ const closeAndSendHandle = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
goDialog({
|
goDialog({
|
||||||
message: '是否保存内容?',
|
message: '保存内容将同步修改所有使用此接口的组件, 是否继续?',
|
||||||
isMaskClosable: true,
|
isMaskClosable: true,
|
||||||
transformOrigin: 'center',
|
transformOrigin: 'center',
|
||||||
onPositiveCallback: () => {
|
onPositiveCallback: () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user