|
@@ -29,7 +29,7 @@ watch(currentIndex, (newVale: any) => {
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
- console.log(store.currentIndex)
|
|
|
+ console.log(store.currentIndex);
|
|
|
currentIndex.value = store.currentIndex == null ? 0 : store.currentIndex;
|
|
|
});
|
|
|
</script>
|
|
@@ -40,17 +40,28 @@ onMounted(() => {
|
|
|
<div v-for="(item, index) in countyMapData" :key="index">
|
|
|
<div v-if="index === currentIndex">
|
|
|
<img :src="getAssetURL(item.bgImg)" alt="" id="box" />
|
|
|
- <div class="box-1" v-for="(label, index2) in item.labels" :key="index2" :style="{
|
|
|
- top: label.top,
|
|
|
- left: label.left,
|
|
|
- height: label.height ? label.height : '10rem',
|
|
|
- width: label.width ? label.width : 'auto',
|
|
|
- }">
|
|
|
- <div class="title" @click="goDetail(label.name)" :style="{
|
|
|
- transform: label.width
|
|
|
- ? `translate(${label.width},-50%)`
|
|
|
- : 'translate(-50%,-50%)',
|
|
|
- }">
|
|
|
+ <div
|
|
|
+ :class="['box-1', { 'box-1-bottom': label.isBottom }]"
|
|
|
+ v-for="(label, index2) in item.labels"
|
|
|
+ :key="index2"
|
|
|
+ :style="{
|
|
|
+ top: label.top,
|
|
|
+ left: label.left,
|
|
|
+ height: label.height ? label.height : '10rem',
|
|
|
+ width: label.width ? label.width : 'auto',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="title"
|
|
|
+ @click="goDetail(label.name)"
|
|
|
+ :style="{
|
|
|
+ transform: label.isBottom
|
|
|
+ ? `translate(${label.width},calc(${label.height} - 1.2rem)`
|
|
|
+ : label.width
|
|
|
+ ? `translate(${label.width},-50%)`
|
|
|
+ : 'translate(-50%,-50%)',
|
|
|
+ }"
|
|
|
+ >
|
|
|
{{ `${label.fullName ? label.fullName : label.name}` }}
|
|
|
</div>
|
|
|
<div class="dian-small"></div>
|
|
@@ -59,12 +70,21 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="option-box">
|
|
|
- <div v-for="(item, index) in countyMapData" :key="index" class="btn"
|
|
|
- :style="{ background: index == currentIndex ? '#fff' : '#767265' }" @click="() => {
|
|
|
- currentIndex = index;
|
|
|
- }
|
|
|
- ">
|
|
|
- <div class="circle" :class="{ 'circle-active': index === currentIndex }">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in countyMapData"
|
|
|
+ :key="index"
|
|
|
+ class="btn"
|
|
|
+ :style="{ background: index == currentIndex ? '#fff' : '#767265' }"
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ currentIndex = index;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="circle"
|
|
|
+ :class="{ 'circle-active': index === currentIndex }"
|
|
|
+ >
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -149,6 +169,17 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .box-1-bottom {
|
|
|
+ border-top: transparent;
|
|
|
+ border-bottom: 1px dashed #2058bd;
|
|
|
+ .dian-small {
|
|
|
+ top: -4px;
|
|
|
+ }
|
|
|
+ .dian-big {
|
|
|
+ top: -10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.div-1 {
|
|
|
width: 10%;
|
|
|
height: 10rem;
|
|
@@ -183,6 +214,7 @@ onMounted(() => {
|
|
|
width: 100%;
|
|
|
height: 9.5rem;
|
|
|
position: fixed;
|
|
|
+ z-index: 2;
|
|
|
bottom: 0;
|
|
|
background: rgba(83, 83, 83, 0.384);
|
|
|
display: flex;
|
|
@@ -205,7 +237,6 @@ onMounted(() => {
|
|
|
box-shadow: 0 0 10px #767265;
|
|
|
margin-right: 10px;
|
|
|
|
|
|
-
|
|
|
.circle {
|
|
|
width: 5.8rem;
|
|
|
height: 5.8rem;
|