forked from github/dataease
Merge pull request #2749 from dataease/pr@dev@fix_filter_component_copy
fix(仪表板-过滤组件): 复制视图后过滤组件对原视图和目标视图作用效果不一致
This commit is contained in:
commit
62517b7fdb
@ -100,6 +100,10 @@ export default {
|
||||
const newView = deepCopy(data)
|
||||
newView.id = uuid.v1()
|
||||
newView.propValue.viewId = res.data
|
||||
if (newView.filters && newView.filters.length) {
|
||||
newView.filters = []
|
||||
}
|
||||
|
||||
store.commit('addComponent', { component: newView })
|
||||
})
|
||||
} else if (data.type === 'de-tabs') {
|
||||
@ -111,6 +115,9 @@ export default {
|
||||
const newViewId = uuid.v1()
|
||||
sourceAndTargetIds[item.content.propValue.viewId] = newViewId
|
||||
item.content.propValue.viewId = newViewId
|
||||
if (item.content.filters && item.content.filters.length) {
|
||||
item.content.filters = []
|
||||
}
|
||||
}
|
||||
})
|
||||
chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {
|
||||
|
Loading…
Reference in New Issue
Block a user