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 @@
ref="map"
>
</div>
<div
class="map-back"
v-show='mapName != "china"'
@click='back'
></div>
<div
class="map-nanhai"
v-show='mapName == "china"'
></div>
</div>
</template>
......@@ -85,18 +94,25 @@ export default {
this.map.on('click', even => {
console.log(even)
if (this.mapName == 'china') {
this.$refs.map.classList.add('test')
this.$refs.map.classList.add('change')
this.mapName = even.name
axios.get(`/map/province/${even.name}.json`).then(res => {
this.map.clear()
this.chinaConfigure(even.name, res.data)
})
}
})
this.map.on('mouseover', even => {
console.log(even)
})
},
methods: {
back () {
this.$refs.map.classList.add('change')
this.mapName = 'china'
this.map.clear()
this.chinaConfigure(this.mapName, china)
},
chinaConfigure (mapName, data) {
this.map.hideLoading()
echarts.registerMap(mapName, data)
......@@ -105,16 +121,18 @@ export default {
options.series[0].name = options.series[0].map = mapName
this.map.setOption(options)
setTimeout(() => {
if (this.mapName != 'china') {
this.$refs.map.classList.add('test1')
}
this.$refs.map.classList.remove('change')
this.$refs.map.classList.add('back')
}, 500)
setInterval(() => {
let num = Math.floor(Math.random() * (80 - 1)) + 1
options.series[0].viewControl.alpha = num
options.series[0].viewControl.beta = num
this.map.setOption(options)
}, 5000)
setTimeout(() => {
this.$refs.map.classList.remove('back')
}, 1000)
// setInterval(() => {
// let num = Math.floor(Math.random() * (80 - 1)) + 1
// options.series[0].viewControl.alpha = num
// options.series[0].viewControl.beta = num
// this.map.setOption(options)
// }, 5000)
}
}
}
......@@ -125,41 +143,45 @@ export default {
position: relative;
width: 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 {
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);
}
z-index: 1;
left: 0;
top: 0;
}
.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;
}
.test {
animation: a 0.5s forwards;
.change {
animation: small 0.5s forwards;
}
.test1 {
animation: identifier 0.5s forwards;
.back {
animation: big 0.5s forwards;
}
@keyframes a {
@keyframes small {
0% {
transform: scale(1);
}
......@@ -167,7 +189,7 @@ export default {
transform: scale(0);
}
}
@keyframes identifier {
@keyframes big {
0% {
transform: scale(0);
}
......
......@@ -355,11 +355,10 @@ export default {
}
&-center {
position: absolute;
width: 3139px;
height: 1599px;
top: 24px;
left: 50%;
transform: translateX(-50%);
width: 4088px;
height: 1728px;
top: 0;
left: 0;
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!