forked from github/dataease
Merge pull request #7481 from dataease/pr@dev-v2@refactor_copy
refactor: 优化资源复制
This commit is contained in:
commit
6732a476ba
@ -883,8 +883,10 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
if (this.dvInfo) {
|
if (this.dvInfo) {
|
||||||
this.dvInfo.dataState = 'ready'
|
this.dvInfo.dataState = 'ready'
|
||||||
this.dvInfo.optType = null
|
this.dvInfo.optType = null
|
||||||
|
if (newId) {
|
||||||
this.dvInfo.id = newId
|
this.dvInfo.id = newId
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
createInit(dvType, resourceId?, pid?) {
|
createInit(dvType, resourceId?, pid?) {
|
||||||
const optName = dvType === 'dashboard' ? '新建仪表板' : '新建数据大屏'
|
const optName = dvType === 'dashboard' ? '新建仪表板' : '新建数据大屏'
|
||||||
|
@ -168,9 +168,7 @@ export function canvasSave(callBack) {
|
|||||||
|
|
||||||
const method = dvInfo.value.id ? updateCanvas : saveCanvas
|
const method = dvInfo.value.id ? updateCanvas : saveCanvas
|
||||||
method(canvasInfo).then(res => {
|
method(canvasInfo).then(res => {
|
||||||
if (res && res.data) {
|
|
||||||
dvMainStore.updateDvInfoId(res.data)
|
dvMainStore.updateDvInfoId(res.data)
|
||||||
}
|
|
||||||
snapshotStore.resetStyleChangeTimes()
|
snapshotStore.resetStyleChangeTimes()
|
||||||
callBack(res)
|
callBack(res)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user