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
d964ab73
authored
2023-04-03 13:41:34 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:地图配置话
1 parent
4902817c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
55 deletions
README.md
public/config.json
src/common/map/yushu.js
src/components/Echart/Map/Chart.vue
src/components/Echart/Map/index.vue
src/layout/components/Navbar.vue
README.md
View file @
d964ab7
<!--
*
@Description:
*
@Autor: renchao
*
@LastEditTime: 2023-0
3-27 15:43:24
*
@LastEditTime: 2023-0
4-03 13:41:12
-->
# 安装依赖
npm install
...
...
@@ -30,6 +30,8 @@ npm install --registry=https://registry.npm.taobao.org
"THEME": "sb",
"CODE": "BDCJGPT", {"BDCSBPT":上报: "BDCJGPT":监管}
"SERVERAPI": "/bdcsjsb",
"AREARMAP": "hanzhong", // {"hanzhong","yushu"}
"AREARNAME": "汉中",// {汉中市,玉树}
"calcHeight": 200, {上报:160 监管:200}
"echartTextColor": "#FFFFFF", {上报:"#4A4A4A" 监管:"#FFFFFF"}
"MANAGEMENTAPI": "http://192.168.2.38:8090/management"
...
...
public/config.json
View file @
d964ab7
{
"TITLE"
:
"汉中市数据上报系统"
,
"THEME"
:
"sb"
,
"CODE"
:
"BDCSBPT"
,
"THEME"
:
"jg"
,
"CODE"
:
"BDCJGPT"
,
"AREARMAP"
:
"hanzhong"
,
"AREARNAME"
:
"汉中市"
,
"SERVERAPI"
:
"/bdcsjsb"
,
"calcHeight"
:
160
,
"echartTextColor"
:
"#4A4A4A"
,
...
...
src/common/map/yushu.js
View file @
d964ab7
This diff could not be displayed because it is too large.
src/components/Echart/Map/Chart.vue
View file @
d964ab7
...
...
@@ -31,7 +31,8 @@ export default {
window
.
addEventListener
(
"resize"
,
()
=>
{
this
.
key
++
;
});
this
.
getDistrictcode
();
// 根据行政区代码匹配行政区
require
(
`@/common/map/
${
this
.
BASE_API
.
AREARMAP
}
.js`
);
},
watch
:
{
cdata
:
{
...
...
@@ -83,15 +84,12 @@ export default {
mapType: "", // 自定义扩展图表类型
top: "15%",
left: "10%",
map:
"汉中市"
,
map:
this.BASE_API.AREARNAME
,
itemStyle: {
normal: {
//阴影
areaColor: "#5689FD",
// shadowColor: "#21371d",
borderWidth: 1,
// shadowOffsetX: 2,
// shadowOffsetY: 20,
},
},
}, {
...
...
@@ -100,7 +98,7 @@ export default {
mapType: "", // 自定义扩展图表类型
top: "18%",
left: "10%",
map:
"汉中市"
,
map:
this.BASE_API.AREARNAME
,
itemStyle: {
color: '#21371d',
areaColor: "#21371d",
...
...
@@ -110,11 +108,6 @@ export default {
shadowBlur: 10,
shadowOffsetX: 0,
shadowOffsetY: -12,
// normal: {
// //阴影
// color:'#21371d',
// areaColor: "#21371d",
// },
},
emphasis: {
disabled: true
...
...
@@ -125,19 +118,15 @@ export default {
type: "map",
aspectScale: 1, //长宽比
zoom: 1.1,
mapType:
"汉中市"
, // 自定义扩展图表类型
mapType:
this.BASE_API.AREARNAME
, // 自定义扩展图表类型
top: "15%",
left: "10%",
itemStyle: {
normal: {
// areaColor: "rgba(19,54,162,.1)",
borderWidth: 1.6,
// shadowBlur: 2,
borderColor: "#9DFFFC",
// shadowColor: "#44f2fc",
},
emphasis: {
// itemStyle:{
// 地图区域的高亮颜色
areaColor: {
type: 'linear',
...
...
@@ -158,7 +147,6 @@ export default {
shadowColor: '#000',
shadowBlur: 10,
shadowOffsetY: 4
// }
}
},
label: {
...
...
@@ -177,41 +165,16 @@ export default {
},
},
},
// 选中区域颜色
// select:{
// itemStyle:{
// areaColor:'red'
// }
// },
data: newData,
},
],
};
// 重新选择区域
// this.handleMapRandomSelect();
},
immediate: true,
deep: true,
},
},
computed: {
...mapGetters(["sidebar", "dicData"]),
logoName () {
return (
this.dicData["sysCode"].filter((item) => { return item.DCODE == "areaMap" })
);
},
},
methods: {
// 根据行政区代码匹配行政区
getDistrictcode () {
this.mapjson = ""
if (this.logoName[0].DNAME) {
this.mapjson = this.logoName[0].DNAME;
require(`
@
/common/m
ap
/
$
{
this
.
mapjson
}.
js
`);
}
},
// 开启定时器
startInterval () {
const _self = this;
...
...
src/components/Echart/Map/index.vue
View file @
d964ab7
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-04-03 13:40:18
-->
<
template
>
<Chart
:cdata=
"cdata"
/>
</
template
>
...
...
@@ -16,7 +21,6 @@ export default {
},
mounted
()
{
this
.
mapViews
();
},
methods
:
{
async
mapViews
()
{
...
...
src/layout/components/Navbar.vue
View file @
d964ab7
...
...
@@ -2,7 +2,7 @@
<div
class=
"navbar-con"
>
<div
class=
"navbar"
>
<div
class=
"title"
>
{{
logoName
[
0
]
&&
logoName
[
0
].
DNAM
E
}}
{{
BASE_API
.
TITL
E
}}
</div>
<div
class=
"user"
>
欢迎进入系统
{{
userName
}}
...
...
@@ -29,12 +29,7 @@ export default {
sidebarRight
,
},
computed
:
{
...
mapGetters
([
"sidebar"
,
"dicData"
,
,
"permission_routes"
,
"userInfo"
]),
logoName
()
{
return
this
.
dicData
[
'sysCode'
]
&&
this
.
dicData
[
'sysCode'
].
filter
(
item
=>
item
.
DCODE
==
"systemTitle"
)
},
...
mapGetters
([
"userInfo"
]),
userName
()
{
return
this
.
userInfo
?
this
.
userInfo
.
name
:
""
}
...
...
@@ -54,11 +49,10 @@ export default {
});
})
.
catch
((
error
)
=>
{
// console.dir(error);
})
}
}
}
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
.menubg
{
...
...
Please
register
or
sign in
to post a comment