fix(视图): 修复设置默认时间后手动清除默认时间再复制视图显示数据依然是默认时间设置的数据

This commit is contained in:
wangjiahao 2022-12-16 13:42:13 +08:00
parent 8cc8541bdb
commit 00864766c0
2 changed files with 10 additions and 2 deletions

View File

@ -350,6 +350,10 @@ export default {
}, },
computed: { computed: {
//使filter
initLoad() {
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
},
scaleCoefficient() { scaleCoefficient() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) { if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
return 1.1 return 1.1
@ -396,7 +400,7 @@ export default {
}, },
filter() { filter() {
const filter = {} const filter = {}
filter.filter = this.isFirstLoad ? this.filters : this.cfilters filter.filter = this.initLoad ? this.filters : this.cfilters
filter.linkageFilters = this.element.linkageFilters filter.linkageFilters = this.element.linkageFilters
filter.outerParamsFilters = this.element.outerParamsFilters filter.outerParamsFilters = this.element.outerParamsFilters
filter.drill = this.drillClickDimensionList filter.drill = this.drillClickDimensionList
@ -455,6 +459,7 @@ export default {
return this.element.commonBackground && this.element.commonBackground.innerPadding || 0 return this.element.commonBackground && this.element.commonBackground.innerPadding || 0
}, },
...mapState([ ...mapState([
'currentCanvasNewId',
'nowPanelTrackInfo', 'nowPanelTrackInfo',
'nowPanelJumpInfo', 'nowPanelJumpInfo',
'publicLinkStatus', 'publicLinkStatus',

View File

@ -151,7 +151,8 @@ const data = {
height: 0 height: 0
}, },
previewVisible: false, previewVisible: false,
previewComponentData: [] previewComponentData: [],
currentCanvasNewId: []
}, },
mutations: { mutations: {
...animation.mutations, ...animation.mutations,
@ -271,6 +272,7 @@ const data = {
state.componentData.splice(index, 0, component) state.componentData.splice(index, 0, component)
} else { } else {
state.componentData.push(component) state.componentData.push(component)
state.currentCanvasNewId.push(component.id)
} }
this.commit('setCurComponent', { component: component, index: index || state.componentData.length - 1 }) this.commit('setCurComponent', { component: component, index: index || state.componentData.length - 1 })
}, },
@ -749,6 +751,7 @@ const data = {
this.commit('clearLinkageSettingInfo', false) this.commit('clearLinkageSettingInfo', false)
this.commit('resetViewEditInfo') this.commit('resetViewEditInfo')
this.commit('initCurMultiplexingComponents') this.commit('initCurMultiplexingComponents')
state.currentCanvasNewId = []
state.batchOptStatus = false state.batchOptStatus = false
// Currently selected components // Currently selected components
state.curBatchOptComponents = [] state.curBatchOptComponents = []