Commit 0470aa39 by liwk

commit

1 parent 69d99da8
...@@ -1984,6 +1984,43 @@ ...@@ -1984,6 +1984,43 @@
"resolved": "https://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz", "resolved": "https://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz",
"integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=" "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
}, },
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "=3.1.0"
}
},
"is-buffer": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"babel-code-frame": { "babel-code-frame": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", "resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz",
...@@ -2841,8 +2878,7 @@ ...@@ -2841,8 +2878,7 @@
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz", "resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true, "dev": true
"optional": true
}, },
"coa": { "coa": {
"version": "2.0.2", "version": "2.0.2",
...@@ -4035,7 +4071,7 @@ ...@@ -4035,7 +4071,7 @@
}, },
"duplexer": { "duplexer": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "resolved": "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true "dev": true
}, },
...@@ -5209,8 +5245,7 @@ ...@@ -5209,8 +5245,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -5231,14 +5266,12 @@ ...@@ -5231,14 +5266,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -5253,20 +5286,17 @@ ...@@ -5253,20 +5286,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -5383,8 +5413,7 @@ ...@@ -5383,8 +5413,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -5396,7 +5425,6 @@ ...@@ -5396,7 +5425,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -5411,7 +5439,6 @@ ...@@ -5411,7 +5439,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -5419,14 +5446,12 @@ ...@@ -5419,14 +5446,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -5445,7 +5470,6 @@ ...@@ -5445,7 +5470,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -5526,8 +5550,7 @@ ...@@ -5526,8 +5550,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -5539,7 +5562,6 @@ ...@@ -5539,7 +5562,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -5625,8 +5647,7 @@ ...@@ -5625,8 +5647,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -5662,7 +5683,6 @@ ...@@ -5662,7 +5683,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -5682,7 +5702,6 @@ ...@@ -5682,7 +5702,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -5726,14 +5745,12 @@ ...@@ -5726,14 +5745,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -10023,8 +10040,7 @@ ...@@ -10023,8 +10040,7 @@
"version": "4.0.8", "version": "4.0.8",
"resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", "resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true, "dev": true
"optional": true
}, },
"rx-lite-aggregates": { "rx-lite-aggregates": {
"version": "4.0.8", "version": "4.0.8",
...@@ -11847,6 +11863,11 @@ ...@@ -11847,6 +11863,11 @@
"resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz", "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz",
"integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc=" "integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc="
}, },
"vue-axios": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/vue-axios/-/vue-axios-2.1.5.tgz",
"integrity": "sha512-th5xVbInVoyIoe+qY+9GCflEVezxAvztD4xpFF39SRQYqpoKD2qkmX8yv08jJG9a2SgNOCjirjJGSwg/wTrbmA=="
},
"vue-count-to": { "vue-count-to": {
"version": "1.0.13", "version": "1.0.13",
"resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz", "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz",
......
...@@ -9,9 +9,11 @@ ...@@ -9,9 +9,11 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.0",
"core-js": "^2.6.5", "core-js": "^2.6.5",
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-axios": "^2.1.5",
"vue-count-to": "^1.0.13", "vue-count-to": "^1.0.13",
"vue-router": "^3.0.6" "vue-router": "^3.0.6"
}, },
......
{"type":"FeatureCollection","features":[{"id":"820001","geometry":{"type":"Polygon","coordinates":["@@LADC^umZ@DONWEBDCLHBH@DFBBNA"],"encodeOffsets":[[116285,22746]]},"properties":{"cp":[113.5528956,22.20787],"name":"花地瑪堂區","childNum":1}},{"id":"820002","geometry":{"type":"Polygon","coordinates":["@@MK@CA@AAGDEB@NVFHE"],"encodeOffsets":[[116281,22734]]},"properties":{"cp":[113.5489608,22.1992075],"name":"花王堂區","childNum":1}},{"id":"820003","geometry":{"type":"Polygon","coordinates":["@@EGOB@DNLHE@C"],"encodeOffsets":[[116285,22729]]},"properties":{"cp":[113.5501828,22.19372083],"name":"望德堂區","childNum":1}},{"id":"820004","geometry":{"type":"Polygon","coordinates":["@@ŸYIPEL@JFCBBFADHDBBFDHIJJEFDPCHHlY"],"encodeOffsets":[[116313,22707]]},"properties":{"cp":[113.5536475,22.18853944],"name":"大堂區","childNum":1}},{"id":"820005","geometry":{"type":"Polygon","coordinates":["@@JICGAECACGEBAAEDP^"],"encodeOffsets":[[116266,22728]]},"properties":{"cp":[113.5419278,22.18736806],"name":"風順堂區","childNum":1}},{"id":"820006","geometry":{"type":"Polygon","coordinates":["@@ ZNWRquZCBCC@AEA@@ADCDCAACEAGBQ@IN"],"encodeOffsets":[[116265,22694]]},"properties":{"cp":[113.5587044,22.15375944],"name":"嘉模堂區","childNum":1}},{"id":"820007","geometry":{"type":"Polygon","coordinates":["@@MOIAIEI@@GE@AAUCBdCFIFR@HAFBBDDBDCBCDB@BFDDC"],"encodeOffsets":[[116316,22676]]},"properties":{"cp":[113.5695992,22.13663],"name":"路氹填海區","childNum":1}},{"id":"820008","geometry":{"type":"Polygon","coordinates":["@@DKMMa_GC_COD@dVDBBF@@HJ@JFJBNP"],"encodeOffsets":[[116329,22670]]},"properties":{"cp":[113.5599542,22.12348639],"name":"聖方濟各堂區","childNum":1}}],"UTF8Encoding":true}
\ No newline at end of file \ No newline at end of file
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<div class="box-right-top top"></div> <div class="box-right-top top"></div>
<div class="box-right-bottom bottom"></div> <div class="box-right-bottom bottom"></div>
<div class="box-left-bottom bottom"></div> <div class="box-left-bottom bottom"></div>
<div class="box-cap"> <!-- <div class="box-cap">
<div class="top-box"></div> <div class="top-box"></div>
<div class="bottom-box"></div> <div class="bottom-box"></div>
</div> </div> -->
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
background-color: rgba(0, 0, 0, 0.07); background-color: rgba(0, 0, 0, 0.07);
border: 1px solid rgba(19, 107, 153, 0.5); border: 1px solid rgba(19, 107, 153, 0.5);
position: relative; position: relative;
&-left-top, &-left-top,
&-left-bottom, &-left-bottom,
&-right-top, &-right-top,
...@@ -44,25 +45,25 @@ export default { ...@@ -44,25 +45,25 @@ export default {
&-left-top { &-left-top {
left: -3px; left: -3px;
top: -1px; top: -1px;
animation: topMove 2s forwards; // animation: topMove 2s forwards;
} }
&-left-bottom { &-left-bottom {
left: -3px; left: -3px;
bottom: -1px; bottom: -1px;
transform: rotate(-90deg); transform: rotate(-90deg);
animation: bottomMove 2s forwards; // animation: bottomMove 2s forwards;
} }
&-right-top { &-right-top {
top: -1px; top: -1px;
right: -3px; right: -3px;
transform: rotate(90deg); transform: rotate(90deg);
animation: topMove 2s forwards; // animation: topMove 2s forwards;
} }
&-right-bottom { &-right-bottom {
bottom: -1px; bottom: -1px;
right: -3px; right: -3px;
transform: rotate(180deg); transform: rotate(180deg);
animation: bottomMove 2s forwards; // animation: bottomMove 2s forwards;
} }
} }
@keyframes topMove { @keyframes topMove {
...@@ -81,16 +82,14 @@ export default { ...@@ -81,16 +82,14 @@ export default {
bottom: -1px; bottom: -1px;
} }
} }
.box-cap { .box-cap {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
z-index: 2;
overflow: hidden; overflow: hidden;
z-index: 1;
.top-box, .top-box,
.bottom-box { .bottom-box {
width: 100%; width: 100%;
...@@ -101,11 +100,11 @@ export default { ...@@ -101,11 +100,11 @@ export default {
} }
.top-box { .top-box {
top: 0; top: 0;
animation: topHidden 2s forwards; // animation: topHidden 2s forwards;
} }
.bottom-box { .bottom-box {
bottom: 0; bottom: 0;
animation: bottomHidden 2s forwards; // animation: bottomHidden 2s forwards;
} }
} }
@keyframes topHidden { @keyframes topHidden {
......
<template>
<div class='map-box'>
<div
class="map"
ref="map"
>
</div>
<div
class='back'
v-show="mapName!='china'"
@click='back'
></div>
</div>
</template>
<script type='text/ecmascript-6'>
import countTo from "vue-count-to"
import china from '@p/map/china.json'
import axios from 'axios'
export default {
name: 'GlMap',
data () {
return {
mapName: 'china',
map: null,
timeTicket: null,
count: 0,
}
},
mounted () {
this.chinaConfigure(this.mapName, china)
},
methods: {
back () {
this.mapName = 'china'
this.map.clear()
this.chinaConfigure(this.mapName, china)
},
chinaConfigure (mapName, data) {
echarts.registerMap(mapName, data)
this.map = echarts.init(this.$refs.map)
window.onresize = this.map.resize
let options = {
tooltip: {
padding: 0,
enterable: true,
transitionDuration: 1,
textStyle: {
color: '#fff',
decoration: 'none',
},
alwaysShowContent: true,
formatter: params => {
let tipHtml = `<div class='map-tooltip'>
<p class='map-tooltip-title'>
<i class='address'></i>
${params.name}
</p>
<div class='map-item'>
<div class='map-list map-border' >
${params.value ? params.value : 0}
<p class='map-tooltip-name' >用户总数</p>
</div>
<div class='map-list map-left' >
854
<p class='map-tooltip-name' >当前在线用户数</p>
</div>
</div>
</div>`
return tipHtml
}
},
visualMap: {
min: 0,
max: 100,
left: '13%',
bottom: '4.5%',
orient: 'horizontal',
itemWidth: '5',
itemHeight: '100',
text: [100, 0],
inRange: {
color: ['#1DE6EE', '#0B7FE1']
},
textStyle: {
color: '#F9F9F9',
fontSize: 10
}
},
animationDuration: 5000,
animationEasing: 'cubicOut',
animationDurationUpdate: 5000,
geo: {
show: true,
label: {
show: mapName == 'china',
align: 'center',
color: '#333',
verticalAlign: 'middle',
},
map: mapName,
zoom: mapName == 'china' ? 1 : 0.8,
top: mapName == '广东' ? '0' : mapName == '甘肃' ? '20%' : 'middle',
left: mapName == '甘肃' ? '25%' : 'center',
},
series: [
{
type: 'map',
geoIndex: 0,
data: [
{
name: '广东',
value: 100
},
{
name: '上海',
value: 10
},
{
name: '北京',
value: 30
}
]
}
]
}
console.log(options)
this.map.setOption(options)
let dataLength = options.series[0].data.length
this.map.on('click', val => {
if (this.mapName == 'china' && val.name != '南海诸岛') {
this.map.clear()
this.mapName = val.name
axios.get(`/map/province/${val.name}.json`).then(res => {
this.chinaConfigure(val.name, res.data)
})
}
})
this.map.on('mouseover', val => {
clearInterval(this.timeTicket)
})
this.map.on('mouseout', val => {
this.mapTooltipMove(dataLength, this.map)
})
this.mapTooltipMove(dataLength, this.map)
},
mapTooltipMove (dataLength, map) {
this.timeTicket && clearInterval(this.timeTicket)
this.timeTicket = setInterval(_ => {
map.dispatchAction({
type: 'downplay',
seriesIndex: 0,
})
map.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: (this.count) % dataLength
})
map.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: (this.count) % dataLength
})
this.count++
}, 3000)
}
}
}
</script>
<style scoped lang='scss'>
.map-box {
position: relative;
width: 100%;
height: 100%;
}
.map {
width: 100%;
height: 100%;
position: relative;
z-index: 9;
&-tooltip {
padding: 20px;
background-image: linear-gradient(
180deg,
rgba(26, 76, 139, 0.95) 0%,
rgba(7, 45, 93, 0.95) 100%
);
border: 1px solid #5acbff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
}
}
.back {
position: absolute;
left: 49px;
bottom: 44px;
width: 118px;
height: 118px;
background: url("~@a/back.png") no-repeat;
background-size: cover;
z-index: 10;
cursor: pointer;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class='header'>
<div class="header-bg"></div>
<slot></slot>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Header',
data () {
return {
}
}
}
</script>
<style scoped lang='scss'>
.header {
position: relative;
width: 100%;
height: 132px;
line-height: 132px;
font-size: 48px;
color: #ffffff;
letter-spacing: 8px;
text-align: center;
&-bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 50%;
transform: translateX(-50%);
// animation: move 3.5s ease-out forwards;
background: url("~@a/title-bg.png") no-repeat;
background-size: cover;
background-position-x: center;
}
}
@keyframes move {
from {
width: 0;
}
to {
width: 100%;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class='title'> <div class='title'>
<i></i>
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
...@@ -17,13 +18,18 @@ export default { ...@@ -17,13 +18,18 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.title { .title {
width: 100%; width: 100%;
height: 132px; padding: 30px;
line-height: 132px; box-sizing: border-box;
font-size: 48px; font-size: 20px;
color: #ffffff; color: #ffffff;
letter-spacing: 8px; letter-spacing: 4px;
text-align: center; i {
background: url("~@a/title-bg.png") no-repeat; display: inline-block;
background-size: cover; height: 20px;
width: 5px;
background: #28c5ff;
margin-right: 20px;
vertical-align: middle;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
import Title from './Title.vue' import Header from './Header.vue'
import Box from './Box.vue' import Box from './Box.vue'
import Title from './Title.vue'
import GlMap from './GlMap.vue'
const components = [ const components = [
Title, Header,
Box Box,
GlMap,
Title
] ]
const GlsxVueComponents = {} const GlsxVueComponents = {}
GlsxVueComponents.install = Vue => { GlsxVueComponents.install = Vue => {
......
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import components from '@c/index.js' import components from '@c/index.js'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(components) Vue.use(components)
......
<template> <template>
<div class='view-box'> <div class='view-box'>
<Title>广联用户数据</Title> <Header>广联用户数据</Header>
<div class="main"> <div class="main">
<div class="main-top"> <div class="main-top">
<div class="m-t-left"> <div class="m-t-left">
<div class="m-t-left-top"> <div class="m-t-left-top">
<Box></Box> <Box>
<div class="online">
<countTo
:startVal="0"
:endVal="8651265"
:duration="3500"
separator=','
></countTo>
<p>当前在线用户数</p>
</div>
</Box>
</div> </div>
<div class="m-t-left-bottom"> <div class="m-t-left-bottom">
<Box></Box> <Box>
<div class="count-box">
<div
class="count-item"
v-for="(i, ind) in dataNumber"
:key='ind'
>
<div>
<countTo
:startVal="0"
:endVal="i.number"
:duration="3500"
:decimals='ind != 0?1:0'
separator
:suffix='ind !=0 ? "%":""'
></countTo>
<p>{{i.title}}</p>
</div>
<i v-if='ind != 1 && ind != 3'></i>
</div>
</div>
</Box>
</div> </div>
</div> </div>
<div class="m-t-center"> <div class="m-t-center">
<Box></Box> <!-- 地图 -->
<Box>
<gl-map></gl-map>
</Box>
</div> </div>
<div class="m-t-right"> <div class="m-t-right">
<div> <div>
<Box></Box> <Box>
<Title>用户分析</Title>
</Box>
</div> </div>
<div> <div>
<Box></Box> <Box></Box>
...@@ -31,14 +67,110 @@ ...@@ -31,14 +67,110 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import countTo from "vue-count-to"
import axios from 'axios'
export default { export default {
name: 'page1', name: 'page1',
components: {
countTo
},
data () { data () {
return { return {
dataNumber: [
{
number: 35529,
title: '近7天新增用户数'
},
{
number: 56.3,
title: '近7天用户活跃度'
},
{
number: 69.1,
title: '近30天用户活跃度'
},
{
number: 39.1,
title: '用户付费转化率'
} }
]
}
},
mounted () {
},
methods: {
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.m-t-left-top .online {
width: 100%;
color: #fff;
position: absolute;
top: 50%;
left: 0;
text-align: center;
font-size: 24px;
color: #ffffff;
letter-spacing: 8px;
transform: translateY(-50%);
span {
color: #ffae00;
font-size: 65px;
letter-spacing: 9px;
text-shadow: 0 4px 5px rgba(0, 0, 0, 0.6);
}
p {
margin-top: 16px;
}
}
.count {
&-box {
width: 100%;
height: 100%;
font-size: 60px;
p {
font-size: 20px;
color: #ffffff;
letter-spacing: 1px;
margin-top: 15px;
}
}
&-item {
float: left;
width: 50%;
height: 50%;
color: #fff;
position: relative;
i {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
width: 3px;
height: 74.4px;
background-color: #136b99;
}
span {
letter-spacing: 4px;
color: #f9f9f9;
}
& > div {
position: absolute;
top: 50%;
width: 100%;
left: 0;
text-align: center;
transform: translateY(-50%);
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
user-select: none;
}
.map-tooltip {
background-image: linear-gradient(180deg, rgba(26, 76, 139, 0.95) 0%, rgba(7, 45, 93, 0.95) 100%);
border: 1px solid #5acbff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
color: #F9F9F9;
font-size: 24px;
}
.map-tooltip-title {
margin-bottom: 33px;
padding: 22px 24px;
}
.map-item {
display: flex;
padding: 0 33px 41px;
}
.map-tooltip-name {
font-size: 24px;
margin-top: 8px;
}
.map-left {
padding-left: 36px;
}
.map-border {
padding-right: 50px;
border-right: 1px solid #3F5E86;
}
.map-list {
font-size: 40px;
letter-spacing: 1px;
text-align: center;
}
.map-line {
padding-right: 50px;
border-right: 1px solid #3F5E86;
}
.address {
display: inline-block;
width: 22px;
height: 28px;
background: url('~@a/address.png') no-repeat;
background-size: cover;
margin-right: 18px;
vertical-align: middle;
} }
.view-box { .view-box {
......
...@@ -14,8 +14,8 @@ const cdn = { ...@@ -14,8 +14,8 @@ const cdn = {
`${CDN_DOMAIN}/vue/2.6.10/vue.min.js`, `${CDN_DOMAIN}/vue/2.6.10/vue.min.js`,
`${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`, `${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`,
`${CDN_DOMAIN}/echarts/4.4.0-rc.1/echarts.min.js`, `${CDN_DOMAIN}/echarts/4.4.0-rc.1/echarts.min.js`,
`${CDN_DOMAIN}/highcharts/7.2.0/highcharts-3d.js`, `${CDN_DOMAIN}/highcharts/7.2.0/highcharts.js`,
`${CDN_DOMAIN}/highcharts/7.2.0/highcharts.js` `${CDN_DOMAIN}/highcharts/7.2.0/highcharts-3d.js`
] ]
}; };
// version_lib = version_lib.replace(/\./g,'_'); // version_lib = version_lib.replace(/\./g,'_');
...@@ -35,14 +35,13 @@ module.exports = { ...@@ -35,14 +35,13 @@ module.exports = {
.set("@a", path.resolve(__dirname, "./src/assets")) .set("@a", path.resolve(__dirname, "./src/assets"))
.set("@c", path.resolve(__dirname, "./src/components")) .set("@c", path.resolve(__dirname, "./src/components"))
.set("@s", path.resolve(__dirname, "./src/styles")) .set("@s", path.resolve(__dirname, "./src/styles"))
.set("@v", path.resolve(__dirname, "./src/views")); .set("@p", path.resolve(__dirname, "./public"));
config.plugin("html").tap(args => { config.plugin("html").tap(args => {
// args[0].minify.removeComments = false; // args[0].minify.removeComments = false;
args[0].cdn = cdn; args[0].cdn = cdn;
return args; return args;
}); });
if (isProduction) { if (isProduction) {} else {
} else {
config.devtool("cheap-source-map"); config.devtool("cheap-source-map");
config config
.plugin("webpack-bundle-analyzer") .plugin("webpack-bundle-analyzer")
...@@ -55,8 +54,8 @@ module.exports = { ...@@ -55,8 +54,8 @@ module.exports = {
config.externals = { config.externals = {
vue: "Vue", vue: "Vue",
"vue-router": "VueRouter", "vue-router": "VueRouter",
highcharts: "Highcharts",
"highcharts-3d": "Highcharts3D", "highcharts-3d": "Highcharts3D",
highcharts: "Highcharts",
echarts: "echarts" echarts: "echarts"
}; // 防止将某些 import 的包(package)打包到 bundle 中,而是在运行时(runtime)再去从外部获取这些扩展依赖(用于cdn引入) }; // 防止将某些 import 的包(package)打包到 bundle 中,而是在运行时(runtime)再去从外部获取这些扩展依赖(用于cdn引入)
if (isProduction) { if (isProduction) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!