接口联调
This commit is contained in:
parent
e19eddb1f9
commit
5fd4428129
|
|
@ -126,34 +126,34 @@ const initApiBmCompanyInfoTimeListTime = async (val: any) => {
|
|||
// console.log("val-->",val)
|
||||
|
||||
try {
|
||||
const res: any = await apiBmCompanyInfoTimeListTime(val)
|
||||
// const res: any = await apiBmCompanyInfoTimeListTime(val)
|
||||
// 假数据
|
||||
// const res = [
|
||||
// {
|
||||
// "id": 1,
|
||||
// "lat": 31.22,
|
||||
// "lon": 121.48,
|
||||
// "time": "2022-12-10 10:10:10"
|
||||
// },
|
||||
// // {
|
||||
// // "id": 2,
|
||||
// // "lat": 29.588885,
|
||||
// // "lon": 106.621131,
|
||||
// // "time": "2023-12-19 10:10:10"
|
||||
// // },
|
||||
// // {
|
||||
// // "id": 3,
|
||||
// // "lat": 39.904989,
|
||||
// // "lon": 116.405285,
|
||||
// // "time": "2023-12-19 10:10:10"
|
||||
// // },
|
||||
// {
|
||||
// "id": 4,
|
||||
// "lat": 31.820587,
|
||||
// "lon": 117.227219,
|
||||
// "time": "2023-12-19 10:10:10"
|
||||
// }
|
||||
// ]
|
||||
const res = [
|
||||
{
|
||||
"id": 1,
|
||||
"lat": 31.22,
|
||||
"lon": 121.48,
|
||||
"time": "2022-12-10 10:10:10"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"lat": 29.588885,
|
||||
"lon": 106.621131,
|
||||
"time": "2023-12-19 10:10:10"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"lat": 39.904989,
|
||||
"lon": 116.405285,
|
||||
"time": "2023-12-19 10:10:10"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"lat": 31.820587,
|
||||
"lon": 117.227219,
|
||||
"time": "2023-12-19 10:10:10"
|
||||
}
|
||||
]
|
||||
console.log("res-apiBmCompanyInfoTimeListTime",res)
|
||||
// domShow.value = true
|
||||
// console.log("apiBmCompanyInfoTimeListTime", res)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
</div>
|
||||
<div class="e_content">
|
||||
<div class="left_nav_list">
|
||||
<!--
|
||||
移入后的样式 小手
|
||||
-->
|
||||
<div class="nav_item" v-for="(item, index) in navInfo.list" :key="index"
|
||||
:class="{ 'activeNav': mapProps.idType == item.navId }" @click="toNavItem(item)">
|
||||
{{ item.text }}
|
||||
|
|
@ -75,7 +78,7 @@ const navInfo = reactive({
|
|||
{
|
||||
text: "全部",
|
||||
navId: "0",
|
||||
jsonData: xnallJSON
|
||||
jsonData: xnallJSON,
|
||||
},
|
||||
{
|
||||
text: "广西电网",
|
||||
|
|
@ -109,7 +112,7 @@ const navInfo = reactive({
|
|||
{
|
||||
text: "深圳供电局",
|
||||
navId: "7",
|
||||
// jsonData: szJSON
|
||||
jsonData: szJSON
|
||||
},
|
||||
{
|
||||
text: "超高压公司",
|
||||
|
|
@ -262,68 +265,62 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
const iniTapibmCompanyInfoColtdList = async () => {
|
||||
//设备租赁分布图
|
||||
//设备租赁分布图 10: 自有, 20: 待租, 110: 在租
|
||||
try {
|
||||
listData = []
|
||||
let seriresData: any = []
|
||||
const res: any = await apiBmCompanyInfoColtdList()
|
||||
console.log("apiBmCompanyInfoColtdList", res)
|
||||
// console.log("apiBmCompanyInfoColtdList", res)
|
||||
const uniqueInfo: any = {}
|
||||
res.forEach((ele: any, index: any) => {
|
||||
let item: any = {}
|
||||
item.name = ele.companyName
|
||||
ele.coltdVo.forEach((eleS: any) => {
|
||||
if (eleS.status == "110") {
|
||||
// console.log("eleS--->>>", eleS)
|
||||
if (eleS.status === "110") {
|
||||
item.selfCount = eleS.count
|
||||
}
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat),eleS.count,3]// 参数1:经度, 参数2:纬度, 参数3:数量, 参数4:状态
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
ele.coltdVo.forEach((eleS: any) => {
|
||||
if (eleS.status == "20") {
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat), 3]// 参数1:经度, 参数2:纬度, 参数3:数量, 参数4:状态
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
} else if (eleS.status === "20") {
|
||||
item.toCount = eleS.count
|
||||
|
||||
}
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat),eleS.count,2]
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
})
|
||||
ele.coltdVo.forEach((eleS: any) => {
|
||||
if (eleS.status == "10") {
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat), 2]
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
} else if (eleS.status === "10") {
|
||||
item.inCount = eleS.count
|
||||
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat), 1]
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
}
|
||||
eleS.list.forEach((subEle: any) => {
|
||||
if (!uniqueInfo[subEle.maId]) {
|
||||
seriresData.push({
|
||||
name: subEle.maId,
|
||||
value: [Number(subEle.lon), Number(subEle.lat),eleS.count,1]
|
||||
})
|
||||
uniqueInfo[subEle.maId] = true
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
console.log("itemitem", item)
|
||||
|
||||
// console.log("itemitem", item)
|
||||
listData.push(item)
|
||||
// console.log("listData", listData)
|
||||
})
|
||||
mapProps.seriesData = seriresData
|
||||
// console.log("listData", res, listData, seriresData)
|
||||
console.log('mapProps--->', mapProps.seriesData)
|
||||
// console.log('mapProps--->', mapProps.seriesData)
|
||||
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
|
@ -384,6 +381,7 @@ const iniTapibmCompanyInfoColtdList = async () => {
|
|||
font-size: 14px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -9,16 +9,14 @@
|
|||
|
||||
let map: any = null
|
||||
let centerPoint: any = null
|
||||
let domId = ref("0")
|
||||
let domId = ref(0)
|
||||
let domShow = ref(false)
|
||||
let animiationLineList = []
|
||||
let props = defineProps({
|
||||
const state = reactive({
|
||||
lineStyle: {
|
||||
type: Object,
|
||||
default: {
|
||||
strokeColor: "#0e83ed",
|
||||
strokeWeight: 4
|
||||
}
|
||||
strokeColor: "#0e83ed",
|
||||
strokeWeight: 3,
|
||||
strokeOpacity: 0.6,
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
|
|
@ -93,12 +91,12 @@ const initCustomDot = (centerPoint: any) => {
|
|||
|
||||
|
||||
const initPolylineAnimation = () => {
|
||||
var pl = new BMapGL.Polyline(linePointList, props.lineStyle);
|
||||
var pl = new BMapGL.Polyline(linePointList, state.lineStyle);
|
||||
// setTimeout('start()', 3000);
|
||||
const trackAni = new BMapGLLib.TrackAnimation(map, pl, {
|
||||
overallView: true,
|
||||
tilt: 30,
|
||||
duration: 2000,
|
||||
duration: 4000,
|
||||
delay: 300,
|
||||
});
|
||||
start()
|
||||
|
|
|
|||
Loading…
Reference in New Issue