fix(仪表板-过滤组件): 复制视图后过滤组件对原视图和目标视图作用效果不一致

This commit is contained in:
fit2cloud-chenyw 2022-08-01 13:37:52 +08:00
parent 174c3cde4f
commit 6ea655f36d

View File

@ -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) => {