Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
ede4ebde
提交
ede4ebde
authored
8月 16, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
9cda59e2
268db1c0
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
32 行增加
和
32 行删除
+32
-32
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+2
-0
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+29
-32
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+1
-0
没有找到文件。
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
ede4ebde
...
...
@@ -296,6 +296,8 @@ export default {
this
.
drillClickDimensionList
=
[]
if
(
this
.
chart
.
type
===
'map'
)
{
this
.
backToParent
(
0
,
length
)
const
current
=
this
.
$refs
[
this
.
element
.
propValue
.
id
]
current
&&
current
.
registerDynamicMap
&&
current
.
registerDynamicMap
(
null
)
}
},
...
...
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
ede4ebde
...
...
@@ -48,7 +48,6 @@ export default {
return
{
myChart
:
{},
chartId
:
uuid
.
v1
(),
currentGeoJson
:
null
,
showTrackBar
:
true
,
trackBarStyle
:
{
position
:
'absolute'
,
...
...
@@ -57,7 +56,7 @@ export default {
},
pointParam
:
null
,
d
ownOrUp
:
false
d
ynamicAreaCode
:
null
}
},
...
...
@@ -144,52 +143,50 @@ export default {
if
(
chart
.
type
===
'map'
)
{
const
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
if
(
!
customAttr
.
areaCode
)
return
if
(
this
.
$store
.
getters
.
geoMap
[
c
ustomAttr
.
area
Code
])
{
const
json
=
this
.
$store
.
getters
.
geoMap
[
c
ustomAttr
.
area
Code
]
const
cCode
=
this
.
dynamicAreaCode
||
customAttr
.
areaCode
if
(
this
.
$store
.
getters
.
geoMap
[
cCode
])
{
const
json
=
this
.
$store
.
getters
.
geoMap
[
cCode
]
this
.
initMapChart
(
json
,
chart
)
return
}
geoJson
(
customAttr
.
areaCode
).
then
(
res
=>
{
this
.
initMapChart
(
res
,
chart
)
geoJson
(
cCode
).
then
(
res
=>
{
this
.
$store
.
dispatch
(
'map/setGeo'
,
{
key
:
c
ustomAttr
.
area
Code
,
key
:
cCode
,
value
:
res
// value: res.data
}).
then
(()
=>
{
this
.
initMapChart
(
res
,
chart
)
})
this
.
currentGeoJson
=
res
})
return
}
this
.
myEcharts
(
chart_option
)
},
registerDynamicMap
(
areaCode
)
{
this
.
downOrUp
=
true
if
(
this
.
$store
.
getters
.
geoMap
[
areaCode
])
{
const
json
=
this
.
$store
.
getters
.
geoMap
[
areaCode
]
this
.
$echarts
.
registerMap
(
'MAP'
,
json
)
console
.
log
(
'开始切换地图:'
+
areaCode
)
return
}
geoJson
(
areaCode
).
then
(
res
=>
{
this
.
$echarts
.
registerMap
(
'MAP'
,
res
)
console
.
log
(
'开始切换地图:'
+
areaCode
)
this
.
$store
.
dispatch
(
'map/setGeo'
,
{
key
:
areaCode
,
value
:
res
})
}).
catch
(()
=>
{
this
.
downOrUp
=
true
})
this
.
dynamicAreaCode
=
areaCode
// if (this.$store.getters.geoMap[areaCode]) {
// const json = this.$store.getters.geoMap[areaCode]
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', json)
// return
// }
// geoJson(areaCode).then(res => {
// this.$store.dispatch('map/setGeo', {
// key: areaCode,
// value: res
// }).then(() => {
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', res)
// })
// }).catch(() => {
// this.downOrUp = true
// })
},
initMapChart
(
geoJson
,
chart
)
{
if
(
!
this
.
$echarts
.
getMap
(
'MAP'
)
||
!
this
.
downOrUp
)
{
console
.
log
(
'开始初始化地图:'
)
this
.
$echarts
.
registerMap
(
'MAP'
,
geoJson
)
}
this
.
$echarts
.
registerMap
(
'MAP'
,
geoJson
)
// this.$echarts.getMap('MAP') || this.$echarts.registerMap('MAP', geoJson)
const
base_json
=
JSON
.
parse
(
JSON
.
stringify
(
BASE_MAP
))
const
chart_option
=
baseMapOption
(
base_json
,
chart
)
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
ede4ebde
...
...
@@ -1425,6 +1425,7 @@ export default {
if
(
this
.
chart
.
type
===
'map'
)
{
this
.
backToParent
(
0
,
length
)
this
.
currentAcreaNode
=
null
this
.
$refs
.
dynamicChart
&&
this
.
$refs
.
dynamicChart
.
registerDynamicMap
&&
this
.
$refs
.
dynamicChart
.
registerDynamicMap
(
null
)
}
},
drillJump
(
index
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论