Commit 1624cdc2 by liwk

commit

1 parent 4b78c1d1

22.5 KB | W: | H:

17.9 KB | W: | H:

src/assets/back.png
src/assets/back.png
src/assets/back.png
src/assets/back.png
  • 2-up
  • Swipe
  • Onion skin

838 KB | W: | H:

693 KB | W: | H:

src/assets/bg2.png
src/assets/bg2.png
src/assets/bg2.png
src/assets/bg2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -5,6 +5,15 @@ ...@@ -5,6 +5,15 @@
ref="map" ref="map"
> >
</div> </div>
<div
class="map-back"
v-show='mapName != "china"'
@click='back'
></div>
<div
class="map-nanhai"
v-show='mapName == "china"'
></div>
</div> </div>
</template> </template>
...@@ -85,18 +94,25 @@ export default { ...@@ -85,18 +94,25 @@ export default {
this.map.on('click', even => { this.map.on('click', even => {
console.log(even) console.log(even)
if (this.mapName == 'china') { if (this.mapName == 'china') {
this.$refs.map.classList.add('test') this.$refs.map.classList.add('change')
this.mapName = even.name this.mapName = even.name
axios.get(`/map/province/${even.name}.json`).then(res => { axios.get(`/map/province/${even.name}.json`).then(res => {
this.map.clear() this.map.clear()
this.chinaConfigure(even.name, res.data) this.chinaConfigure(even.name, res.data)
}) })
} }
}) })
this.map.on('mouseover', even => {
console.log(even)
})
}, },
methods: { methods: {
back () {
this.$refs.map.classList.add('change')
this.mapName = 'china'
this.map.clear()
this.chinaConfigure(this.mapName, china)
},
chinaConfigure (mapName, data) { chinaConfigure (mapName, data) {
this.map.hideLoading() this.map.hideLoading()
echarts.registerMap(mapName, data) echarts.registerMap(mapName, data)
...@@ -105,16 +121,18 @@ export default { ...@@ -105,16 +121,18 @@ export default {
options.series[0].name = options.series[0].map = mapName options.series[0].name = options.series[0].map = mapName
this.map.setOption(options) this.map.setOption(options)
setTimeout(() => { setTimeout(() => {
if (this.mapName != 'china') { this.$refs.map.classList.remove('change')
this.$refs.map.classList.add('test1') this.$refs.map.classList.add('back')
}
}, 500) }, 500)
setInterval(() => { setTimeout(() => {
let num = Math.floor(Math.random() * (80 - 1)) + 1 this.$refs.map.classList.remove('back')
options.series[0].viewControl.alpha = num }, 1000)
options.series[0].viewControl.beta = num // setInterval(() => {
this.map.setOption(options) // let num = Math.floor(Math.random() * (80 - 1)) + 1
}, 5000) // options.series[0].viewControl.alpha = num
// options.series[0].viewControl.beta = num
// this.map.setOption(options)
// }, 5000)
} }
} }
} }
...@@ -125,41 +143,45 @@ export default { ...@@ -125,41 +143,45 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box;
overflow: hidden;
.map-back {
width: 135px;
height: 150px;
position: absolute;
bottom: 533px;
left: 1105px;
background: url("~@a/back.png") no-repeat;
background-size: cover;
z-index: 3;
cursor: pointer;
}
.map-nanhai {
width: 200px;
height: 283px;
position: absolute;
bottom: 527px;
right: 1048px;
background: url("~@a/nanhai.png") no-repeat;
background-size: cover;
z-index: 3;
}
} }
.map { .map {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
z-index: 9; z-index: 1;
&-tooltip { left: 0;
padding: 20px; top: 0;
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 { .change {
position: absolute; animation: small 0.5s forwards;
left: 49px;
bottom: 44px;
width: 118px;
height: 118px;
background: url("~@a/back.png") no-repeat;
background-size: cover;
z-index: 10;
cursor: pointer;
}
.test {
animation: a 0.5s forwards;
} }
.test1 { .back {
animation: identifier 0.5s forwards; animation: big 0.5s forwards;
} }
@keyframes a { @keyframes small {
0% { 0% {
transform: scale(1); transform: scale(1);
} }
...@@ -167,7 +189,7 @@ export default { ...@@ -167,7 +189,7 @@ export default {
transform: scale(0); transform: scale(0);
} }
} }
@keyframes identifier { @keyframes big {
0% { 0% {
transform: scale(0); transform: scale(0);
} }
......
...@@ -355,11 +355,10 @@ export default { ...@@ -355,11 +355,10 @@ export default {
} }
&-center { &-center {
position: absolute; position: absolute;
width: 3139px; width: 4088px;
height: 1599px; height: 1728px;
top: 24px; top: 0;
left: 50%; left: 0;
transform: translateX(-50%);
box-sizing: border-box; box-sizing: border-box;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!