接口联调

This commit is contained in:
binbin_pan 2024-03-18 15:24:40 +08:00
parent 0b8c38a691
commit d3e7abbaff
7 changed files with 89 additions and 64 deletions

View File

@ -124,26 +124,53 @@ const open = (maId:any) => {
}
const initApiBmCompanyInfoTimeListTime = async (val: any) => {
try {
const res: any = await apiBmCompanyInfoTimeListTime(val)
console.log("res-apiBmCompanyInfoTimeListTime",res)
// domShow.value = true
// console.log("apiBmCompanyInfoTimeListTime", res)
// res.forEach((ele: any) => {
// linePointList.push(new BMapGL.Point(Number(ele.lon), Number(ele.lat)))
// })
mapLineRef.value.initMapLine(res,val.id)
// nextTick(() => {
// initMap()
// centerPoint = getcenterpoiont(res[0], res[res.length - 1])
// console.log("centerPoint", centerPoint)
// initCustomDot(centerPoint)
// })
try {
// 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"
}
]
console.log("res-apiBmCompanyInfoTimeListTime",res)
// domShow.value = true
// console.log("apiBmCompanyInfoTimeListTime", res)
// res.forEach((ele: any) => {
// linePointList.push(new BMapGL.Point(Number(ele.lon), Number(ele.lat)))
// })
mapLineRef.value.initMapLine(res,val.id)
// nextTick(() => {
// initMap()
// centerPoint = getcenterpoiont(res[0], res[res.length - 1])
// console.log("centerPoint", centerPoint)
// initCustomDot(centerPoint)
// })
} catch (error) {
} catch (error) {
}
}
}
defineExpose({

View File

@ -155,9 +155,9 @@ const mapProps = reactive({
borderColor: "rgba(21, 29, 56,0)"
},
tooltipFormat: (params: any) => {
console.log("params11", params)
// console.log("params11", params)
const curItem = mapDataByProvice(params.name.slice(0, 2))
console.log("curitemcuritem", curItem)
// console.log("curitemcuritem", curItem)
if (!curItem) {
return ""
}
@ -233,6 +233,12 @@ const mapDataByProvice = (provinceName: String) => {
selfCount: 963,
toCount: 4521,
inCount: 963
},
{
name: "海南省",
selfCount: 123,
toCount: 300,
inCount: 987
}
]
const curItem: any = listData.find((ele: any) => ele.name.slice(0, 2) == provinceName)

View File

@ -17,10 +17,10 @@
<div class="provider_item_left">
<div class="pro_item_icon" :class="{ 'inThree': index + 1 <= 3, 'afterThree': index + 1 > 3 }">
<!-- <img :src="`/src/assets/img/index${index + 1 <= 3 ? index + 1 : 4}.png`" alt="" -->
<img v-if="index == 0" src="/src/assets/img/index1.png" alt="" class="pro_item_icon_img">
<img v-else-if="index == 1" src="/src/assets/img/index2.png" alt="" class="pro_item_icon_img">
<img v-else-if="index == 2" src="/src/assets/img/index3.png" alt="" class="pro_item_icon_img">
<img v-else src="/src/assets/img/index4.png" alt="" class="pro_item_icon_img">
<img v-if="index == 0" src="/src/assets/img/index1.png" alt="">
<img v-else-if="index == 1" src="/src/assets/img/index2.png" alt="">
<img v-else-if="index == 2" src="/src/assets/img/index3.png" alt="">
<img v-else src="/src/assets/img/index4.png" alt="">
</div>
<div class="pro_item_title overflow">
{{ item.ownCo }}

View File

@ -196,7 +196,7 @@ const option = {
},
series: handleSeriesData(),
formatter: function (params: any) {
console.log("parmas", params)
// console.log("parmas", params)
return propsVal.formatCallBack(params)
}
};

View File

@ -41,7 +41,7 @@ const initMap = () => {
}
const endIcon = {
imgUrl: '/src/assets/img/mapStart.png',
imgUrl: '/src/assets/img/mapEnd.png',
position: [116.3964, 39.9093],
size: [60, 60]

View File

@ -2,15 +2,15 @@ import { get, post } from '../index'
// 平台入驻设备总数
export function apiMaDevInfoList() {
return get('maDevInfo/list', {})
return get('item-center/maDevInfo/list', {})
}
// 查询自有以及上架可租设备数量
export function apiMaDevInfoTypeList() {
return get('maDevInfo/type-list', {})
return get('item-center/maDevInfo/type-list', {})
}
// 获取企业所属设备状态为自有的设备数量:
export function apiMaDevInfoCompanyList() {
return get('maDevInfo/company-list', {})
return get('item-center/maDevInfo/company-list', {})
}
// 查询在租以及待租设备数量:
export function apiMaDevInfoMatypeList() {
@ -27,7 +27,7 @@ export function apiMaOrderInfoList() {
// --
// 获取企业所属对应的机手数量以及机手总人数:
export function apiBmMachinistInfoList() {
return get('bmMachinistInfo/list', {})
return get('item-center/maDevInfo/enterprise-list', {})
}
// 根据企业类型查询对应数量以及总数量:
export function apiBmCompanyInfoTypeList() {
@ -36,7 +36,7 @@ export function apiBmCompanyInfoTypeList() {
export function apiMaDevInfoMaList() {
return get('maDevInfo/ma-list', {})
return get('item-center/maDevInfo/ma-list', {})
}
// ======
// 根据求出租信息查询对应的数量:

View File

@ -161,7 +161,6 @@ import barCom from "../../components/echartsCom/barCom.vue"
import Pie3dCom from "../../components/echartsCom/Pie3dCom.vue"
import hotProvider from "../../components/customCom/hotProvider.vue"
import equipmentLeasing from "../../components/customCom/equipmentLeasing.vue"
import { getImg } from "utils/index"
import {
apiMaDevInfoList, apiMaDevInfoTypeList,
apiMaDevInfoCompanyList, apiMaDevInfoMatypeList,
@ -171,56 +170,54 @@ import {
const equipmentCountInfo: any = reactive({
//
listCount: [
"0", "0", "0", "0" //
// "0", "0", "0", "1" //
],
selfCount: "0",
shelfCount: "0"
selfCount: 0,
shelfCount: 0
})
const middleCountList = reactive({
list: [
{
// icon: getImg("/src/assets/img/money1.png"),
icon: new URL("/src/assets/img/money1.png", import.meta.url).href,
count: "",
count: 0,
title: "今日订单"
},
{
// icon: getImg("/src/assets/img/money2.png"),
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
count: "",
count: 0,
title: "累计金额"
},
{
// icon: getImg("/src/assets/img/money3.png"),
icon: new URL("/src/assets/img/money3.png", import.meta.url).href,
count: "",
count: 0,
title: "在用设备"
},
{
// icon: getImg("/src/assets/img/money2.png"),
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
count: "",
count: 0,
title: "待租设备"
}
]
})
const rentWantRent:any=reactive({
//
rent:[
"0", "0", "0", "0" //
"1", "0", "0", "0" //
],
//
wantRent:[
"0", "0", "0", "0" //
]
})
const platFormInfo: any = reactive({
//
//
listCount: [
"0", "0", "0", "0" //
],
socailCount: "",
enterpriseCount: "",
holdingCount: ''
socailCount: "0",
enterpriseCount: "0",
holdingCount: '0'
})
const barComProps = reactive({
@ -230,7 +227,7 @@ const barComProps = reactive({
paddingTop: 20
},
xAxisData: [
"1月","2月","3月"
// "1","2","3","4","5","6","7","8","9"
],
yAxisProps: {
type: "value",
@ -239,7 +236,9 @@ const barComProps = reactive({
},
show: false
},
seriseData: [],//
seriseData: [
// 120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290
],//
itemStyle: [//
{ offset: 0, color: '#91FFBE' },
{ offset: 1, color: '#077FBA' }
@ -337,22 +336,14 @@ const barComPropsHorizontal = reactive({
show: false
},
},
xAxisData: [
20, 40, 60, 80, 100
],
xAxisData: [],
yAxisProps: {
type: "category",
// boundaryGap: false,
},
yAxisData: [
"装备1", "装备2", "装备3", "装备4", "装备5"
],
yAxisData: [],
seriseData: [
{ value: 120, name: '装备1' },
{ value: 132, name: '装备2' },
{ value: 101, name: '装备3' },
{ value: 134, name: '装备4' },
{ value: 90, name: '装备5' }
// 120, 132, 101, 134, 90
],//
itemStyle: [//
{ offset: 0, color: '#077FBA' },
@ -428,8 +419,8 @@ const iniTapiMaDevInfoTypeList = async () => {
try {
const res: any = await apiMaDevInfoTypeList()
console.log("apiMaDevInfoTypeList", res)
equipmentCountInfo.selfCount = res.self.count
equipmentCountInfo.shelfCount = res.rent.count
equipmentCountInfo.selfCount = res.self.count || 0
equipmentCountInfo.shelfCount = res.use.count || 0
} catch (error) {
console.log(error)
}
@ -457,7 +448,7 @@ const iniTapiMaDevInfoCompanyList = async () => {
const iniTapiMaDevInfoMatypeList = async () => {
// :
try {
const res: any = await apiMaDevInfoMatypeList()
const res: any = await apiMaDevInfoTypeList()
console.log("apiMaDevInfoMatypeList", res)
middleCountList.list[2].count = res.rent.count || 0
middleCountList.list[3].count = res.use.count || 0
@ -528,6 +519,7 @@ const iniTapiMaDevInfoMaList = async () => {
const res: any = await apiMaDevInfoMaList()
console.log("apiMaDevInfoMaList", res)
barComPropsHorizontal.xAxisData = res.map((ele: any) => ele.ownCo)
barComPropsHorizontal.yAxisData = res.map((ele: any) => ele.ownCo)
barComPropsHorizontal.seriseData = res.map((ele: any) => ele.count)
} catch (error) {