2023-11-30 10:48:06 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="equipment_area">
|
|
|
|
|
|
<div class="top_title">
|
|
|
|
|
|
设备租赁分布图
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="e_content">
|
|
|
|
|
|
<div class="left_nav_list">
|
2023-12-01 11:19:43 +08:00
|
|
|
|
<div class="nav_item" v-for="(item, index) in navInfo.list" :key="index" :class="{'activeNav':mapProps.idType==item.navId}" @click="toNavItem(item)">
|
2023-11-30 10:48:06 +08:00
|
|
|
|
{{ item.text }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="right_map_container">
|
2023-11-30 20:18:54 +08:00
|
|
|
|
<mapEcharts ref="mapEchartsRef" :jsonData="mapProps.jsonData" :itemStyle="mapProps.itemStyle" :emphasisLabelStyle="mapProps.emphasisLabelStyle"
|
2023-11-30 10:48:06 +08:00
|
|
|
|
:emphasisItemStyle="mapProps.emphasisItemStyle" :labelInfo="mapProps.labelInfo"
|
|
|
|
|
|
:rippleEffect="mapProps.rippleEffect" :tooltipProps="mapProps.tooltipProps"
|
|
|
|
|
|
:tooltipFormat="mapProps.tooltipFormat" :itemColorFormat="mapProps.itemColorFormat"
|
2023-12-01 11:19:43 +08:00
|
|
|
|
:seriesData="mapProps.seriesData" :effectScatterCallBack="mapProps.effectScatterCallBack">
|
2023-11-30 10:48:06 +08:00
|
|
|
|
</mapEcharts>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-11-30 19:45:08 +08:00
|
|
|
|
<div class="type_list">
|
|
|
|
|
|
<div class="type_list_item">
|
|
|
|
|
|
<div class="out_dot1">
|
|
|
|
|
|
<div class="dot">
|
|
|
|
|
|
<div class="inner_dot"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
自有
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="type_list_item">
|
|
|
|
|
|
<div class="out_dot2">
|
|
|
|
|
|
<div class="dot">
|
|
|
|
|
|
<div class="inner_dot"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
待租
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="type_list_item">
|
|
|
|
|
|
<div class="out_dot3">
|
|
|
|
|
|
<div class="dot">
|
|
|
|
|
|
<div class="inner_dot"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
在租
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-12-01 09:54:11 +08:00
|
|
|
|
<div class="haiNanDao" v-if="mapProps.idType=='0'||mapProps.idType=='5' ">
|
|
|
|
|
|
<img src="/src/assets/img/nanhai_dao.png" alt="">
|
|
|
|
|
|
</div>
|
2023-12-01 11:19:43 +08:00
|
|
|
|
<equipmentDialog ref="equipmentDialogRef"></equipmentDialog>
|
2023-11-30 19:45:08 +08:00
|
|
|
|
</div>
|
2023-11-30 10:48:06 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-12-01 09:54:11 +08:00
|
|
|
|
import { getImg } from "utils/index"
|
2023-11-30 10:48:06 +08:00
|
|
|
|
import mapEcharts from "../echartsCom/mapEcharts.vue"
|
2023-11-30 18:37:22 +08:00
|
|
|
|
import equipmentDialog from "./equipmentDialog.vue"
|
2023-11-30 20:18:54 +08:00
|
|
|
|
import xnallJSON from './mapData/xnall.json'
|
|
|
|
|
|
import gxJSON from './mapData/gx.json'
|
|
|
|
|
|
import gdJSON from './mapData/gd.json'
|
|
|
|
|
|
import gzJSON from './mapData/gz.json'
|
|
|
|
|
|
import ynJSON from './mapData/yn.json'
|
2023-12-01 09:54:11 +08:00
|
|
|
|
import hnJSON from './mapData/hn.json'
|
2023-12-02 17:50:50 +08:00
|
|
|
|
import {apibmCompanyInfoColtdList} from "http/api/echartApi"
|
2023-11-30 20:18:54 +08:00
|
|
|
|
const mapEchartsRef = ref()
|
2023-12-01 11:19:43 +08:00
|
|
|
|
const equipmentDialogRef=ref()
|
2023-11-30 20:18:54 +08:00
|
|
|
|
|
2023-11-30 10:48:06 +08:00
|
|
|
|
const navInfo = reactive({
|
|
|
|
|
|
list: [
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "全部",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "0",
|
|
|
|
|
|
jsonData:xnallJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "广西电网",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "1",
|
|
|
|
|
|
jsonData:gxJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "广东电网",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "2",
|
|
|
|
|
|
jsonData:gdJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "贵州电网",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "3",
|
|
|
|
|
|
jsonData:gzJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "云南电网",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "4",
|
|
|
|
|
|
jsonData:ynJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "海南电网",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "5",
|
2023-12-01 09:54:11 +08:00
|
|
|
|
jsonData:hnJSON
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "储能公司",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "6",
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "深圳供电局",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "7"
|
2023-11-30 10:48:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "超高压公司",
|
2023-11-30 20:18:54 +08:00
|
|
|
|
navId: "8"
|
2023-11-30 10:48:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mapProps = reactive({
|
2023-11-30 20:18:54 +08:00
|
|
|
|
idType:"0",
|
|
|
|
|
|
jsonData:{
|
|
|
|
|
|
},
|
2023-11-30 10:48:06 +08:00
|
|
|
|
itemStyle: {
|
|
|
|
|
|
areaColor: '#186894',//区域颜色
|
|
|
|
|
|
shadowColor: '#2894c9',//边缘阴影颜色
|
|
|
|
|
|
color: 'rgba(255, 255, 255, 1)'//文字颜色
|
|
|
|
|
|
},
|
|
|
|
|
|
emphasisLabelStyle: {
|
|
|
|
|
|
color: "rgba(255, 255, 255, 1)"
|
|
|
|
|
|
},
|
|
|
|
|
|
emphasisItemStyle: {
|
|
|
|
|
|
areaColor: '#39baf6',
|
|
|
|
|
|
shadowColor: '#2894c9',
|
|
|
|
|
|
},
|
|
|
|
|
|
labelInfo: {
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
color: 'rgba(255,255,255,0.6)',
|
|
|
|
|
|
position: 'inside',
|
|
|
|
|
|
distance: 0,
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
rotate: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
rippleEffect: {
|
|
|
|
|
|
number: 4,
|
|
|
|
|
|
period: 4,
|
|
|
|
|
|
scale: 4.5,
|
|
|
|
|
|
brushType: 'fill'
|
|
|
|
|
|
},
|
|
|
|
|
|
tooltipProps: {
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
shadowColor: 'rgba(0, 0, 0, 0)', // 设置阴影颜色为透明
|
|
|
|
|
|
shadowBlur: 0, // 设置阴影模糊度为0,即无阴影
|
|
|
|
|
|
backgroundColor: "rgba(21, 29, 56,0)",
|
|
|
|
|
|
borderColor: "rgba(21, 29, 56,0)"
|
|
|
|
|
|
},
|
|
|
|
|
|
tooltipFormat: (params: any) => {
|
|
|
|
|
|
console.log("params11", params)
|
|
|
|
|
|
const curItem = mapDataByProvice(params.name)
|
2023-12-01 11:19:43 +08:00
|
|
|
|
if(!curItem||!curItem.selfCount){
|
|
|
|
|
|
return ""
|
|
|
|
|
|
}
|
2023-11-30 10:48:06 +08:00
|
|
|
|
let fromatStr =
|
|
|
|
|
|
`<div style="background:url(${getImg('/src/assets/img/mapHoverBg.png')});width:324px;height:225px;background-size:contain;background-repeat:no-repeat;">
|
|
|
|
|
|
<div style="width: 100px;height: 90px;padding-top:4px;position:relative;">
|
|
|
|
|
|
<div style="position:absolute;left:20px;top:10px;font-weight:bold;color:#fff;">
|
|
|
|
|
|
${params.name}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="position:absolute;left:120px;top:58px;color:#fff;width:120px;text-align:right;">
|
|
|
|
|
|
${curItem.selfCount}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="position:absolute;left:135px;top:108px;color:#fff;width:120px;text-align:right;">
|
|
|
|
|
|
${curItem.toCount}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="position:absolute;left:166px;top:158px;color:#fff;width:120px;text-align:right;">
|
|
|
|
|
|
${curItem.inCount}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>`
|
|
|
|
|
|
return fromatStr
|
|
|
|
|
|
},
|
|
|
|
|
|
itemColorFormat: (params: any) => {
|
|
|
|
|
|
console.log("params001", params)
|
|
|
|
|
|
if (params.value[2] > 0 && params.value[2] <= 100) {
|
|
|
|
|
|
return '#00ff31';
|
|
|
|
|
|
} else if (params.value[2] > 100 && params.value[2] <= 200) {
|
|
|
|
|
|
return '#f00';
|
|
|
|
|
|
} else if (params.value[2] > 200 && params.value[2] <= 300) {
|
|
|
|
|
|
return '#0ff';
|
|
|
|
|
|
} else if (params.value[2] > 300 && params.value[2] <= 400) {
|
|
|
|
|
|
return '#ff0';
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-12-01 11:19:43 +08:00
|
|
|
|
effectScatterCallBack:(params:any)=>{
|
|
|
|
|
|
console.log("equipmentDialogRef",params)
|
|
|
|
|
|
equipmentDialogRef.value.open()
|
|
|
|
|
|
},
|
2023-11-30 10:48:06 +08:00
|
|
|
|
seriesData: [{ name: '肇庆市', value: [112.48461, 23.05196, 100] },
|
|
|
|
|
|
{ name: '佛山市', value: [110.130214, 23.018978, 200] },
|
|
|
|
|
|
{ name: '广州', value: [115.261081, 23.139856, 300] },
|
|
|
|
|
|
{ name: '南宁', value: [107.45, 22.139856, 400] },
|
|
|
|
|
|
{ name: '贵阳', value: [106.7, 26.36, 200] },
|
2023-12-01 09:54:11 +08:00
|
|
|
|
{ name: '昆明', value: [102.33, 24.23, 300] } ,
|
2023-12-01 11:19:43 +08:00
|
|
|
|
{ name: '海口', value: [110.33,19.823, 10] }]
|
2023-11-30 10:48:06 +08:00
|
|
|
|
})
|
2023-12-02 17:50:50 +08:00
|
|
|
|
let listData:any= []
|
2023-11-30 10:48:06 +08:00
|
|
|
|
const mapDataByProvice = (provinceName: String) => {
|
|
|
|
|
|
let listData = [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "广东省",
|
|
|
|
|
|
selfCount: 123,
|
|
|
|
|
|
toCount: 300,
|
|
|
|
|
|
inCount: 987
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "广西壮族自治区",
|
|
|
|
|
|
selfCount: 23,
|
|
|
|
|
|
toCount: 55,
|
|
|
|
|
|
inCount: 278
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "云南省",
|
|
|
|
|
|
selfCount: 256,
|
|
|
|
|
|
toCount: 2456,
|
|
|
|
|
|
inCount: 745
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "贵州省",
|
|
|
|
|
|
selfCount: 963,
|
|
|
|
|
|
toCount: 4521,
|
|
|
|
|
|
inCount: 963
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
const curItem: any = listData.find(ele => ele.name == provinceName)
|
|
|
|
|
|
return curItem
|
|
|
|
|
|
}
|
2023-11-30 20:18:54 +08:00
|
|
|
|
|
|
|
|
|
|
const toNavItem=(item:any)=>{
|
|
|
|
|
|
console.log("item",item)
|
|
|
|
|
|
mapProps.jsonData= item.jsonData
|
|
|
|
|
|
mapProps.idType=item.navId
|
|
|
|
|
|
mapEchartsRef.value.chagneJSON(item)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(()=>{
|
|
|
|
|
|
mapProps.jsonData= xnallJSON
|
|
|
|
|
|
})
|
2023-12-02 17:50:50 +08:00
|
|
|
|
onMounted(()=>{
|
|
|
|
|
|
iniTapibmCompanyInfoColtdList()
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const iniTapibmCompanyInfoColtdList = async () => {
|
|
|
|
|
|
//设备租赁分布图
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res: any = await apibmCompanyInfoColtdList()
|
|
|
|
|
|
// console.log("apibmCompanyInfoColtdList", res)
|
|
|
|
|
|
// listData = res
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-11-30 10:48:06 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.equipment_area {
|
|
|
|
|
|
width: 1160px;
|
|
|
|
|
|
height: 504px;
|
|
|
|
|
|
background-image: url('../../assets/img/map_bg.png');
|
|
|
|
|
|
background-color: linear-gradient(180deg, #011B37 0%, #000525 7%, rgba(0, 2, 37, 0) 100%);
|
2023-11-30 19:45:08 +08:00
|
|
|
|
position: relative;
|
2023-11-30 10:48:06 +08:00
|
|
|
|
}
|
2023-12-01 09:54:11 +08:00
|
|
|
|
.haiNanDao{
|
|
|
|
|
|
width: 46px;
|
|
|
|
|
|
height: 59px;
|
|
|
|
|
|
position: absolute;
|
2023-12-02 14:46:39 +08:00
|
|
|
|
right: 280px;
|
2023-12-01 09:54:11 +08:00
|
|
|
|
bottom: 6px;
|
|
|
|
|
|
img{
|
|
|
|
|
|
width: 46px;
|
|
|
|
|
|
height: 59px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-11-30 10:48:06 +08:00
|
|
|
|
.top_title {
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
padding-top: 42px;
|
|
|
|
|
|
color: #74d3ea;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.e_content {
|
|
|
|
|
|
display: flex;
|
2023-12-02 14:46:39 +08:00
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
2023-11-30 10:48:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.left_nav_list {
|
|
|
|
|
|
width: 78px;
|
|
|
|
|
|
margin-left: 48px;
|
|
|
|
|
|
height: 400px;
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
.nav_item {
|
|
|
|
|
|
width: 78px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
|
background: url('../../assets/img/map_nav_item_bg.png');
|
|
|
|
|
|
background-size: contain;
|
2023-12-01 11:19:43 +08:00
|
|
|
|
color: #66e0ff;
|
2023-11-30 10:48:06 +08:00
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right_map_container {
|
|
|
|
|
|
width: 822px;
|
|
|
|
|
|
height: 447px;
|
|
|
|
|
|
}
|
2023-11-30 19:45:08 +08:00
|
|
|
|
|
|
|
|
|
|
.type_list {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
position: absolute;
|
2023-12-02 14:46:39 +08:00
|
|
|
|
left: 100px;
|
2023-11-30 19:45:08 +08:00
|
|
|
|
bottom: 16px;
|
|
|
|
|
|
.out_dot1,
|
|
|
|
|
|
.out_dot2,
|
|
|
|
|
|
.out_dot3 {
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
background-color: rgba($color: #FA0000, $alpha: 0.3);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
margin-right: 3px;
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
width: 7px;
|
|
|
|
|
|
height: 7px;
|
|
|
|
|
|
background-color: rgba($color: #FA0000, $alpha: 0.4);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
|
|
|
|
.inner_dot {
|
|
|
|
|
|
width: 3px;
|
|
|
|
|
|
height: 3px;
|
|
|
|
|
|
background-color: #FA0000;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.out_dot1 {
|
|
|
|
|
|
background-color: rgba($color: #FA0000, $alpha: 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
background-color: rgba($color: #FA0000, $alpha: 0.4);
|
|
|
|
|
|
|
|
|
|
|
|
.inner_dot {
|
|
|
|
|
|
background-color: #FA0000;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.out_dot2 {
|
|
|
|
|
|
background-color: rgba($color: #00FF31, $alpha: 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
background-color: rgba($color: #00FF31, $alpha: 0.4);
|
|
|
|
|
|
|
|
|
|
|
|
.inner_dot {
|
|
|
|
|
|
background-color: #00FF31;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.out_dot3 {
|
|
|
|
|
|
background-color: rgba($color: #FAD300, $alpha: 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
background-color: rgba($color: #FAD300, $alpha: 0.4);
|
|
|
|
|
|
|
|
|
|
|
|
.inner_dot {
|
|
|
|
|
|
background-color: #FAD300;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.type_list_item{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding-right: 10px;
|
|
|
|
|
|
}
|
2023-12-01 11:19:43 +08:00
|
|
|
|
.activeNav{
|
|
|
|
|
|
color: #fff!important;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
2023-11-30 10:48:06 +08:00
|
|
|
|
</style>
|