forked from github/dataease
fix(地图): 多地图场景清除联动后指标选项恢复到第一个指标
This commit is contained in:
parent
4d6842ed4b
commit
6ccaf22ee5
@ -13,6 +13,7 @@
|
|||||||
:canvas-id="canvasId"
|
:canvas-id="canvasId"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
|
:series-id-map="seriesIdMap"
|
||||||
@showViewDetails="showViewDetails"
|
@showViewDetails="showViewDetails"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
@ -149,7 +150,10 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
previewVisible: false,
|
previewVisible: false,
|
||||||
chart: null
|
chart: null,
|
||||||
|
seriesIdMap: {
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -144,6 +144,7 @@
|
|||||||
<map-layer-controller
|
<map-layer-controller
|
||||||
v-if="chart && showMapLayerController"
|
v-if="chart && showMapLayerController"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
|
:series-id-map="seriesIdMap"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -239,6 +240,14 @@ export default {
|
|||||||
chart: {
|
chart: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
seriesIdMap: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
:canvas-id="canvasId"
|
:canvas-id="canvasId"
|
||||||
:element="element"
|
:element="element"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
|
:series-id-map="seriesIdMap"
|
||||||
@showViewDetails="showViewDetails"
|
@showViewDetails="showViewDetails"
|
||||||
@amRemoveItem="amRemoveItem"
|
@amRemoveItem="amRemoveItem"
|
||||||
@amAddItem="amAddItem"
|
@amAddItem="amAddItem"
|
||||||
@ -431,7 +432,10 @@ export default {
|
|||||||
// 是否移动 (如果没有移动 不需要记录snapshot)
|
// 是否移动 (如果没有移动 不需要记录snapshot)
|
||||||
hasMove: false,
|
hasMove: false,
|
||||||
// 上次的鼠标指针纵向位置,用来判断指针是上移还是下移
|
// 上次的鼠标指针纵向位置,用来判断指针是上移还是下移
|
||||||
latestMoveY: 0
|
latestMoveY: 0,
|
||||||
|
seriesIdMap: {
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -42,6 +42,14 @@ export default {
|
|||||||
chart: {
|
chart: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
seriesIdMap: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -79,11 +87,12 @@ export default {
|
|||||||
id: this.chart.id,
|
id: this.chart.id,
|
||||||
seriesId: this.currentSeriesId
|
seriesId: this.currentSeriesId
|
||||||
}
|
}
|
||||||
|
this.seriesIdMap.id = this.currentSeriesId
|
||||||
bus.$emit('change-series-id', param)
|
bus.$emit('change-series-id', param)
|
||||||
},
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.currentSeriesId = this.customAttr.currentSeriesId
|
this.currentSeriesId = this.seriesIdMap?.id || this.customAttr.currentSeriesId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user