forked from github/dataease
fix(地图): 多地图场景清除联动后指标选项恢复到第一个指标
This commit is contained in:
parent
4d6842ed4b
commit
6ccaf22ee5
@ -13,6 +13,7 @@
|
||||
:canvas-id="canvasId"
|
||||
:chart="chart"
|
||||
:show-position="showPosition"
|
||||
:series-id-map="seriesIdMap"
|
||||
@showViewDetails="showViewDetails"
|
||||
/>
|
||||
<div
|
||||
@ -149,7 +150,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
previewVisible: false,
|
||||
chart: null
|
||||
chart: null,
|
||||
seriesIdMap: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -274,7 +278,7 @@ export default {
|
||||
} else {
|
||||
return {
|
||||
...
|
||||
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
||||
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
||||
position: 'relative'
|
||||
}
|
||||
}
|
||||
|
@ -137,13 +137,14 @@
|
||||
:target="curComponent.hyperlinks.openMode "
|
||||
:href="curComponent.hyperlinks.content "
|
||||
>
|
||||
<i class="icon iconfont icon-com-jump"/>
|
||||
<i class="icon iconfont icon-com-jump" />
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<map-layer-controller
|
||||
v-if="chart && showMapLayerController"
|
||||
:chart="chart"
|
||||
:series-id-map="seriesIdMap"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -239,6 +240,14 @@ export default {
|
||||
chart: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
seriesIdMap: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -40,6 +40,7 @@
|
||||
:canvas-id="canvasId"
|
||||
:element="element"
|
||||
:chart="chart"
|
||||
:series-id-map="seriesIdMap"
|
||||
@showViewDetails="showViewDetails"
|
||||
@amRemoveItem="amRemoveItem"
|
||||
@amAddItem="amAddItem"
|
||||
@ -65,7 +66,7 @@
|
||||
@mousedown.stop.prevent="handleDown(handlei, $event)"
|
||||
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
|
||||
>
|
||||
<slot :name="handlei"/>
|
||||
<slot :name="handlei" />
|
||||
</div>
|
||||
<div
|
||||
:id="componentCanvasId"
|
||||
@ -78,7 +79,7 @@
|
||||
class="svg-background"
|
||||
:icon-class="mainSlotSvgInner"
|
||||
/>
|
||||
<slot/>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -431,7 +432,10 @@ export default {
|
||||
// 是否移动 (如果没有移动 不需要记录snapshot)
|
||||
hasMove: false,
|
||||
// 上次的鼠标指针纵向位置,用来判断指针是上移还是下移
|
||||
latestMoveY: 0
|
||||
latestMoveY: 0,
|
||||
seriesIdMap: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -42,6 +42,14 @@ export default {
|
||||
chart: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
seriesIdMap: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -79,11 +87,12 @@ export default {
|
||||
id: this.chart.id,
|
||||
seriesId: this.currentSeriesId
|
||||
}
|
||||
this.seriesIdMap.id = this.currentSeriesId
|
||||
bus.$emit('change-series-id', param)
|
||||
},
|
||||
|
||||
init() {
|
||||
this.currentSeriesId = this.customAttr.currentSeriesId
|
||||
this.currentSeriesId = this.seriesIdMap?.id || this.customAttr.currentSeriesId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user