forked from github/dataease
Merge pull request #8063 from dataease/pr@dev-v2@refactor_save-button
refactor(数据大屏): 保存按钮防止重复提交
This commit is contained in:
commit
356cee93f3
@ -142,16 +142,19 @@ const saveCanvasWithCheck = () => {
|
||||
}
|
||||
|
||||
const saveResource = () => {
|
||||
dvMainStore.matrixSizeAdaptor()
|
||||
queryList.value.forEach(ele => {
|
||||
useEmitt().emitter.emit(`updateQueryCriteria${ele.id}`)
|
||||
})
|
||||
|
||||
canvasSave(() => {
|
||||
if (styleChangeTimes.value > 0) {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dashboard?resourceId=${dvInfo.value.id}`)
|
||||
})
|
||||
dvMainStore.matrixSizeAdaptor()
|
||||
queryList.value.forEach(ele => {
|
||||
useEmitt().emitter.emit(`updateQueryCriteria${ele.id}`)
|
||||
})
|
||||
|
||||
canvasSave(() => {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dashboard?resourceId=${dvInfo.value.id}`)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const clearCanvas = () => {
|
||||
|
@ -85,10 +85,13 @@ const saveCanvasWithCheck = () => {
|
||||
}
|
||||
|
||||
const saveResource = () => {
|
||||
canvasSave(() => {
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
|
||||
})
|
||||
if (styleChangeTimes.value > 0) {
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
canvasSave(() => {
|
||||
ElMessage.success('保存成功')
|
||||
window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const clearCanvas = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user