接口联调

This commit is contained in:
binbin_pan 2024-03-20 11:16:34 +08:00
parent e19eddb1f9
commit 5fd4428129
5 changed files with 11739 additions and 36037 deletions

View File

@ -126,34 +126,34 @@ const initApiBmCompanyInfoTimeListTime = async (val: any) => {
// console.log("val-->",val) // console.log("val-->",val)
try { try {
const res: any = await apiBmCompanyInfoTimeListTime(val) // const res: any = await apiBmCompanyInfoTimeListTime(val)
// //
// const res = [ const res = [
// { {
// "id": 1, "id": 1,
// "lat": 31.22, "lat": 31.22,
// "lon": 121.48, "lon": 121.48,
// "time": "2022-12-10 10:10:10" "time": "2022-12-10 10:10:10"
// }, },
// // { {
// // "id": 2, "id": 2,
// // "lat": 29.588885, "lat": 29.588885,
// // "lon": 106.621131, "lon": 106.621131,
// // "time": "2023-12-19 10:10:10" "time": "2023-12-19 10:10:10"
// // }, },
// // { {
// // "id": 3, "id": 3,
// // "lat": 39.904989, "lat": 39.904989,
// // "lon": 116.405285, "lon": 116.405285,
// // "time": "2023-12-19 10:10:10" "time": "2023-12-19 10:10:10"
// // }, },
// { {
// "id": 4, "id": 4,
// "lat": 31.820587, "lat": 31.820587,
// "lon": 117.227219, "lon": 117.227219,
// "time": "2023-12-19 10:10:10" "time": "2023-12-19 10:10:10"
// } }
// ] ]
console.log("res-apiBmCompanyInfoTimeListTime",res) console.log("res-apiBmCompanyInfoTimeListTime",res)
// domShow.value = true // domShow.value = true
// console.log("apiBmCompanyInfoTimeListTime", res) // console.log("apiBmCompanyInfoTimeListTime", res)

View File

@ -5,6 +5,9 @@
</div> </div>
<div class="e_content"> <div class="e_content">
<div class="left_nav_list"> <div class="left_nav_list">
<!--
移入后的样式 小手
-->
<div class="nav_item" v-for="(item, index) in navInfo.list" :key="index" <div class="nav_item" v-for="(item, index) in navInfo.list" :key="index"
:class="{ 'activeNav': mapProps.idType == item.navId }" @click="toNavItem(item)"> :class="{ 'activeNav': mapProps.idType == item.navId }" @click="toNavItem(item)">
{{ item.text }} {{ item.text }}
@ -75,7 +78,7 @@ const navInfo = reactive({
{ {
text: "全部", text: "全部",
navId: "0", navId: "0",
jsonData: xnallJSON jsonData: xnallJSON,
}, },
{ {
text: "广西电网", text: "广西电网",
@ -109,7 +112,7 @@ const navInfo = reactive({
{ {
text: "深圳供电局", text: "深圳供电局",
navId: "7", navId: "7",
// jsonData: szJSON jsonData: szJSON
}, },
{ {
text: "超高压公司", text: "超高压公司",
@ -262,68 +265,62 @@ onMounted(() => {
}) })
const iniTapibmCompanyInfoColtdList = async () => { const iniTapibmCompanyInfoColtdList = async () => {
// // 10: , 20: , 110:
try { try {
listData = [] listData = []
let seriresData: any = [] let seriresData: any = []
const res: any = await apiBmCompanyInfoColtdList() const res: any = await apiBmCompanyInfoColtdList()
console.log("apiBmCompanyInfoColtdList", res) // console.log("apiBmCompanyInfoColtdList", res)
const uniqueInfo: any = {} const uniqueInfo: any = {}
res.forEach((ele: any, index: any) => { res.forEach((ele: any, index: any) => {
let item: any = {} let item: any = {}
item.name = ele.companyName item.name = ele.companyName
ele.coltdVo.forEach((eleS: any) => { ele.coltdVo.forEach((eleS: any) => {
if (eleS.status == "110") { // console.log("eleS--->>>", eleS)
if (eleS.status === "110") {
item.selfCount = eleS.count item.selfCount = eleS.count
} eleS.list.forEach((subEle: any) => {
eleS.list.forEach((subEle: any) => { if (!uniqueInfo[subEle.maId]) {
if (!uniqueInfo[subEle.maId]) { seriresData.push({
seriresData.push({ name: subEle.maId,
name: subEle.maId, value: [Number(subEle.lon), Number(subEle.lat), 3]// 1:, 2:, 3:, 4:
value: [Number(subEle.lon), Number(subEle.lat),eleS.count,3]// 1:, 2:, 3:, 4: })
}) uniqueInfo[subEle.maId] = true
uniqueInfo[subEle.maId] = true }
} })
}) } else if (eleS.status === "20") {
})
ele.coltdVo.forEach((eleS: any) => {
if (eleS.status == "20") {
item.toCount = eleS.count item.toCount = eleS.count
eleS.list.forEach((subEle: any) => {
} if (!uniqueInfo[subEle.maId]) {
eleS.list.forEach((subEle: any) => { seriresData.push({
if (!uniqueInfo[subEle.maId]) { name: subEle.maId,
seriresData.push({ value: [Number(subEle.lon), Number(subEle.lat), 2]
name: subEle.maId, })
value: [Number(subEle.lon), Number(subEle.lat),eleS.count,2] uniqueInfo[subEle.maId] = true
}) }
uniqueInfo[subEle.maId] = true })
} } else if (eleS.status === "10") {
})
})
ele.coltdVo.forEach((eleS: any) => {
if (eleS.status == "10") {
item.inCount = eleS.count 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) listData.push(item)
// console.log("listData", listData) // console.log("listData", listData)
}) })
mapProps.seriesData = seriresData mapProps.seriesData = seriresData
// console.log("listData", res, listData, seriresData) // console.log("listData", res, listData, seriresData)
console.log('mapProps--->', mapProps.seriesData) // console.log('mapProps--->', mapProps.seriesData)
} catch (error) { } catch (error) {
console.log(error) console.log(error)
@ -384,6 +381,7 @@ const iniTapibmCompanyInfoColtdList = async () => {
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
line-height: 28px; 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

View File

@ -9,16 +9,14 @@
let map: any = null let map: any = null
let centerPoint: any = null let centerPoint: any = null
let domId = ref("0") let domId = ref(0)
let domShow = ref(false) let domShow = ref(false)
let animiationLineList = [] let animiationLineList = []
let props = defineProps({ const state = reactive({
lineStyle: { lineStyle: {
type: Object, strokeColor: "#0e83ed",
default: { strokeWeight: 3,
strokeColor: "#0e83ed", strokeOpacity: 0.6,
strokeWeight: 4
}
} }
}) })
onMounted(() => { onMounted(() => {
@ -93,12 +91,12 @@ const initCustomDot = (centerPoint: any) => {
const initPolylineAnimation = () => { const initPolylineAnimation = () => {
var pl = new BMapGL.Polyline(linePointList, props.lineStyle); var pl = new BMapGL.Polyline(linePointList, state.lineStyle);
// setTimeout('start()', 3000); // setTimeout('start()', 3000);
const trackAni = new BMapGLLib.TrackAnimation(map, pl, { const trackAni = new BMapGLLib.TrackAnimation(map, pl, {
overallView: true, overallView: true,
tilt: 30, tilt: 30,
duration: 2000, duration: 4000,
delay: 300, delay: 300,
}); });
start() start()