Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2c8d9f2d
authored
2023-02-17 16:52:25 +0800
by
yangwei
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
2 parents
2414a7eb
9aa814ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
src/common/echart/index.vue
src/components/Echart/Map/Chart.vue
src/layout/components/Navbar.vue
src/common/echart/index.vue
View file @
2c8d9f2
<
template
>
<div
:id=
"id"
:class=
"className"
:style=
"
{ height: height, width: width }" />
</
template
>
<
template
><div
:id=
"id"
:class=
"className"
:style=
"
{ height: height, width: width }" />
</
template
>
<
script
>
import
tdTheme
from
"./theme.json"
;
// 引入默认主题
import
"../map/hanzhong.js"
;
export
default
{
name
:
"echart"
,
props
:
{
...
...
@@ -30,14 +26,14 @@ export default {
default
:
()
=>
({}),
},
},
data
()
{
data
()
{
return
{
chart
:
null
,
};
},
watch
:
{
options
:
{
handler
(
options
)
{
handler
(
options
)
{
// 设置true清空echart缓存
this
.
chart
.
setOption
(
options
,
true
);
window
.
addEventListener
(
"resize"
,
()
=>
{
...
...
@@ -49,19 +45,19 @@ export default {
deep
:
true
,
},
},
mounted
()
{
mounted
()
{
this
.
$echarts
.
registerTheme
(
"tdTheme"
,
tdTheme
);
// 覆盖默认主题
this
.
initChart
();
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
methods
:
{
initChart
()
{
initChart
()
{
// 初始化echart
this
.
chart
=
this
.
$echarts
.
init
(
this
.
$el
,
"tdTheme"
);
function
nowSize
(
val
,
initWidth
=
1920
)
{
function
nowSize
(
val
,
initWidth
=
1920
)
{
return
val
*
(
nowClientWidth
/
initWidth
);
}
this
.
chart
.
setOption
(
this
.
options
,
true
);
...
...
src/components/Echart/Map/Chart.vue
View file @
2c8d9f2
...
...
@@ -18,6 +18,9 @@ export default {
components
:
{
Echart
,
},
created
()
{
require
(
`@/common/map/hanzhong.js`
)
},
props
:
{
cdata
:
{
type
:
Array
,
...
...
@@ -98,7 +101,7 @@ export default {
geo
:
{
aspectScale
:
1
,
//长宽比
zoom
:
1.1
,
mapType
:
'
汉中市
'
,
// 自定义扩展图表类型
mapType
:
''
,
// 自定义扩展图表类型
top
:
'15%'
,
left
:
'10%'
,
map
:
'汉中市'
,
...
...
src/layout/components/Navbar.vue
View file @
2c8d9f2
...
...
@@ -2,7 +2,7 @@
<div
class=
"navbar-con"
>
<div
class=
"navbar"
>
<div
class=
"title"
>
{{
logoName
[
0
].
DNAME
}}
{{
logoName
[
0
]
&&
logoName
[
0
]
.
DNAME
}}
</div>
<div
class=
"user"
>
欢迎进入系统
{{
userName
}}
...
...
Please
register
or
sign in
to post a comment