fix:图片底图打点

This commit is contained in:
SunTao 2024-10-28 10:00:28 +08:00
parent 0bf0db3ff8
commit 0a840663d9
7 changed files with 106 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 11:34:00 * @Date: 2024-10-17 11:34:00
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-25 16:40:29 * @LastEditTime: 2024-10-28 09:50:01
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页 * @Description: 大屏首页
--> -->
@ -87,7 +87,11 @@
<span>病害筛查</span> <span>病害筛查</span>
</div> </div>
<!-- 返回图片底图 --> <!-- 返回图片底图 -->
<div class="road-return" v-if="!showImgBk" @click="changeMap(true)"> <div
class="road-return"
v-if="!showImgBk"
@click="changeMap(true, '')"
>
返回 返回
</div> </div>
</div> </div>
@ -106,10 +110,19 @@
</div> </div>
<!-- 图片背景 --> <!-- 图片背景 -->
<div class="disease-content" v-if="showImgBk"> <div class="disease-content" v-if="showImgBk">
<div class="disease-title" @click="changeMap(false)"></div> <div class="disease-title"></div>
<div class="map-legend"></div> <div class="map-legend"></div>
<div class="map-care"> <div class="map-care">
<div class="map-care-div"></div> <div
class="map-care-div"
:class="`map-care-div-${index + 1}`"
v-for="(item, index) in mapCareList"
:key="`map-care-${index}`"
:style="{ left: item.left, top: item.top }"
@click="changeMap(false, item)"
>
<span>{{ item.name }}</span>
</div>
</div> </div>
</div> </div>
<!-- 地图 --> <!-- 地图 -->
@ -288,6 +301,8 @@ export default {
], ],
// //
showImgBk: true, showImgBk: true,
//
mapCareList: [],
// //
changeMapBtn: [ changeMapBtn: [
{ name: "巡查车", click: "1" }, { name: "巡查车", click: "1" },
@ -328,6 +343,7 @@ export default {
created() { created() {
this.setTime(); this.setTime();
this.getSelect(); this.getSelect();
this.getMapCare();
}, },
methods: { methods: {
/* 获取当前时间 */ /* 获取当前时间 */
@ -370,6 +386,47 @@ export default {
} }
}); });
}, },
/* 获取图片背景下坐标数据 */
getMapCare() {
this.mapCareList = [
{
name: "沈抚",
left: "63%",
top: "15%",
tip: "1",
},
{
name: "沈阳",
left: "55%",
top: "12%",
tip: "2",
},
{
name: "锦州",
left: "35%",
top: "25%",
tip: "3",
},
{
name: "朝阳",
left: "20%",
top: "20%",
tip: "4",
},
{
name: "大连",
left: "50%",
top: "50%",
tip: "5",
},
{
name: "丹东",
left: "70%",
top: "40%",
tip: "6",
},
];
},
/* 点击病害筛查 */ /* 点击病害筛查 */
clickImg() { clickImg() {
this.imgVisible = true; this.imgVisible = true;
@ -383,12 +440,12 @@ export default {
console.log(value, "icontype"); console.log(value, "icontype");
}, },
/* 点击图片点位切换地图事件 */ /* 点击图片点位切换地图事件 */
changeMap(value) { changeMap(boolen, value) {
this.mapZoom = ""; this.mapZoom = "";
this.showImgBk = value; this.showImgBk = boolen;
// //
this.changeIconType("1"); this.changeIconType("1");
if (!value) { if (!boolen) {
this.mapZoom = ""; this.mapZoom = "";
this.getZoom("10"); this.getZoom("10");
} }
@ -1021,6 +1078,48 @@ export default {
position: absolute; position: absolute;
left: 26%; left: 26%;
top: 13%; top: 13%;
.map-care-div {
height: 8.5rem;
min-width: 3.5rem;
display: flex;
justify-content: center;
line-height: 1.6rem;
font-size: 0.7rem;
color: #ffffff;
position: absolute;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 50%;
span{
cursor: pointer;
}
}
.map-care-div-1 {
background-image: url("../../assets/screen/index/map-care-div-1.png");
}
.map-care-div-2 {
background-image: url("../../assets/screen/index/map-care-div-2.png");
}
.map-care-div-3 {
background-image: url("../../assets/screen/index/map-care-div-3.png");
}
.map-care-div-4 {
background-image: url("../../assets/screen/index/map-care-div-4.png");
}
.map-care-div-5 {
background-image: url("../../assets/screen/index/map-care-div-5.png");
}
.map-care-div-6 {
background-image: url("../../assets/screen/index/map-care-div-6.png");
}
} }
} }