接口联调
This commit is contained in:
parent
0b8c38a691
commit
d3e7abbaff
|
|
@ -125,7 +125,34 @@ const open = (maId:any) => {
|
||||||
const initApiBmCompanyInfoTimeListTime = async (val: any) => {
|
const initApiBmCompanyInfoTimeListTime = async (val: any) => {
|
||||||
|
|
||||||
try {
|
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"
|
||||||
|
}
|
||||||
|
]
|
||||||
console.log("res-apiBmCompanyInfoTimeListTime",res)
|
console.log("res-apiBmCompanyInfoTimeListTime",res)
|
||||||
// domShow.value = true
|
// domShow.value = true
|
||||||
// console.log("apiBmCompanyInfoTimeListTime", res)
|
// console.log("apiBmCompanyInfoTimeListTime", res)
|
||||||
|
|
|
||||||
|
|
@ -155,9 +155,9 @@ const mapProps = reactive({
|
||||||
borderColor: "rgba(21, 29, 56,0)"
|
borderColor: "rgba(21, 29, 56,0)"
|
||||||
},
|
},
|
||||||
tooltipFormat: (params: any) => {
|
tooltipFormat: (params: any) => {
|
||||||
console.log("params11", params)
|
// console.log("params11", params)
|
||||||
const curItem = mapDataByProvice(params.name.slice(0, 2))
|
const curItem = mapDataByProvice(params.name.slice(0, 2))
|
||||||
console.log("curitemcuritem", curItem)
|
// console.log("curitemcuritem", curItem)
|
||||||
if (!curItem) {
|
if (!curItem) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
@ -233,6 +233,12 @@ const mapDataByProvice = (provinceName: String) => {
|
||||||
selfCount: 963,
|
selfCount: 963,
|
||||||
toCount: 4521,
|
toCount: 4521,
|
||||||
inCount: 963
|
inCount: 963
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "海南省",
|
||||||
|
selfCount: 123,
|
||||||
|
toCount: 300,
|
||||||
|
inCount: 987
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const curItem: any = listData.find((ele: any) => ele.name.slice(0, 2) == provinceName)
|
const curItem: any = listData.find((ele: any) => ele.name.slice(0, 2) == provinceName)
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
<div class="provider_item_left">
|
<div class="provider_item_left">
|
||||||
<div class="pro_item_icon" :class="{ 'inThree': index + 1 <= 3, 'afterThree': index + 1 > 3 }">
|
<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 :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-if="index == 0" src="/src/assets/img/index1.png" alt="">
|
||||||
<img v-else-if="index == 1" src="/src/assets/img/index2.png" alt="" class="pro_item_icon_img">
|
<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="" class="pro_item_icon_img">
|
<img v-else-if="index == 2" src="/src/assets/img/index3.png" alt="">
|
||||||
<img v-else src="/src/assets/img/index4.png" alt="" class="pro_item_icon_img">
|
<img v-else src="/src/assets/img/index4.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="pro_item_title overflow">
|
<div class="pro_item_title overflow">
|
||||||
{{ item.ownCo }}
|
{{ item.ownCo }}
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ const option = {
|
||||||
},
|
},
|
||||||
series: handleSeriesData(),
|
series: handleSeriesData(),
|
||||||
formatter: function (params: any) {
|
formatter: function (params: any) {
|
||||||
console.log("parmas", params)
|
// console.log("parmas", params)
|
||||||
return propsVal.formatCallBack(params)
|
return propsVal.formatCallBack(params)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const initMap = () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
const endIcon = {
|
const endIcon = {
|
||||||
imgUrl: '/src/assets/img/mapStart.png',
|
imgUrl: '/src/assets/img/mapEnd.png',
|
||||||
position: [116.3964, 39.9093],
|
position: [116.3964, 39.9093],
|
||||||
size: [60, 60]
|
size: [60, 60]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ import { get, post } from '../index'
|
||||||
|
|
||||||
// 平台入驻设备总数
|
// 平台入驻设备总数
|
||||||
export function apiMaDevInfoList() {
|
export function apiMaDevInfoList() {
|
||||||
return get('maDevInfo/list', {})
|
return get('item-center/maDevInfo/list', {})
|
||||||
}
|
}
|
||||||
// 查询自有以及上架可租设备数量
|
// 查询自有以及上架可租设备数量
|
||||||
export function apiMaDevInfoTypeList() {
|
export function apiMaDevInfoTypeList() {
|
||||||
return get('maDevInfo/type-list', {})
|
return get('item-center/maDevInfo/type-list', {})
|
||||||
}
|
}
|
||||||
// 获取企业所属设备状态为自有的设备数量:
|
// 获取企业所属设备状态为自有的设备数量:
|
||||||
export function apiMaDevInfoCompanyList() {
|
export function apiMaDevInfoCompanyList() {
|
||||||
return get('maDevInfo/company-list', {})
|
return get('item-center/maDevInfo/company-list', {})
|
||||||
}
|
}
|
||||||
// 查询在租以及待租设备数量:
|
// 查询在租以及待租设备数量:
|
||||||
export function apiMaDevInfoMatypeList() {
|
export function apiMaDevInfoMatypeList() {
|
||||||
|
|
@ -27,7 +27,7 @@ export function apiMaOrderInfoList() {
|
||||||
// --
|
// --
|
||||||
// 获取企业所属对应的机手数量以及机手总人数:
|
// 获取企业所属对应的机手数量以及机手总人数:
|
||||||
export function apiBmMachinistInfoList() {
|
export function apiBmMachinistInfoList() {
|
||||||
return get('bmMachinistInfo/list', {})
|
return get('item-center/maDevInfo/enterprise-list', {})
|
||||||
}
|
}
|
||||||
// 根据企业类型查询对应数量以及总数量:
|
// 根据企业类型查询对应数量以及总数量:
|
||||||
export function apiBmCompanyInfoTypeList() {
|
export function apiBmCompanyInfoTypeList() {
|
||||||
|
|
@ -36,7 +36,7 @@ export function apiBmCompanyInfoTypeList() {
|
||||||
|
|
||||||
|
|
||||||
export function apiMaDevInfoMaList() {
|
export function apiMaDevInfoMaList() {
|
||||||
return get('maDevInfo/ma-list', {})
|
return get('item-center/maDevInfo/ma-list', {})
|
||||||
}
|
}
|
||||||
// ======
|
// ======
|
||||||
// 根据求出租信息查询对应的数量:
|
// 根据求出租信息查询对应的数量:
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,6 @@ import barCom from "../../components/echartsCom/barCom.vue"
|
||||||
import Pie3dCom from "../../components/echartsCom/Pie3dCom.vue"
|
import Pie3dCom from "../../components/echartsCom/Pie3dCom.vue"
|
||||||
import hotProvider from "../../components/customCom/hotProvider.vue"
|
import hotProvider from "../../components/customCom/hotProvider.vue"
|
||||||
import equipmentLeasing from "../../components/customCom/equipmentLeasing.vue"
|
import equipmentLeasing from "../../components/customCom/equipmentLeasing.vue"
|
||||||
import { getImg } from "utils/index"
|
|
||||||
import {
|
import {
|
||||||
apiMaDevInfoList, apiMaDevInfoTypeList,
|
apiMaDevInfoList, apiMaDevInfoTypeList,
|
||||||
apiMaDevInfoCompanyList, apiMaDevInfoMatypeList,
|
apiMaDevInfoCompanyList, apiMaDevInfoMatypeList,
|
||||||
|
|
@ -171,56 +170,54 @@ import {
|
||||||
const equipmentCountInfo: any = reactive({
|
const equipmentCountInfo: any = reactive({
|
||||||
// 平台入驻设备总数
|
// 平台入驻设备总数
|
||||||
listCount: [
|
listCount: [
|
||||||
"0", "0", "0", "0" // 默认假数据
|
// "0", "0", "0", "1" // 默认假数据
|
||||||
],
|
],
|
||||||
selfCount: "0",
|
selfCount: 0,
|
||||||
shelfCount: "0"
|
shelfCount: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
const middleCountList = reactive({
|
const middleCountList = reactive({
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
// icon: getImg("/src/assets/img/money1.png"),
|
|
||||||
icon: new URL("/src/assets/img/money1.png", import.meta.url).href,
|
icon: new URL("/src/assets/img/money1.png", import.meta.url).href,
|
||||||
count: "",
|
count: 0,
|
||||||
title: "今日订单"
|
title: "今日订单"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// icon: getImg("/src/assets/img/money2.png"),
|
|
||||||
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
|
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
|
||||||
count: "",
|
count: 0,
|
||||||
title: "累计金额"
|
title: "累计金额"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// icon: getImg("/src/assets/img/money3.png"),
|
|
||||||
icon: new URL("/src/assets/img/money3.png", import.meta.url).href,
|
icon: new URL("/src/assets/img/money3.png", import.meta.url).href,
|
||||||
count: "",
|
count: 0,
|
||||||
title: "在用设备"
|
title: "在用设备"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// icon: getImg("/src/assets/img/money2.png"),
|
|
||||||
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
|
icon: new URL("/src/assets/img/money2.png", import.meta.url).href,
|
||||||
count: "",
|
count: 0,
|
||||||
title: "待租设备"
|
title: "待租设备"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const rentWantRent:any=reactive({
|
const rentWantRent:any=reactive({
|
||||||
|
// 出租信息
|
||||||
rent:[
|
rent:[
|
||||||
"0", "0", "0", "0" // 默认假数据
|
"1", "0", "0", "0" // 默认假数据
|
||||||
],
|
],
|
||||||
|
// 求租信息
|
||||||
wantRent:[
|
wantRent:[
|
||||||
"0", "0", "0", "0" // 默认假数据
|
"0", "0", "0", "0" // 默认假数据
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const platFormInfo: any = reactive({
|
const platFormInfo: any = reactive({
|
||||||
// 平台入驻设备总数
|
// 平台入驻单位
|
||||||
listCount: [
|
listCount: [
|
||||||
"0", "0", "0", "0" // 默认假数据
|
"0", "0", "0", "0" // 默认假数据
|
||||||
],
|
],
|
||||||
socailCount: "",
|
socailCount: "0",
|
||||||
enterpriseCount: "",
|
enterpriseCount: "0",
|
||||||
holdingCount: ''
|
holdingCount: '0'
|
||||||
})
|
})
|
||||||
|
|
||||||
const barComProps = reactive({
|
const barComProps = reactive({
|
||||||
|
|
@ -230,7 +227,7 @@ const barComProps = reactive({
|
||||||
paddingTop: 20
|
paddingTop: 20
|
||||||
},
|
},
|
||||||
xAxisData: [
|
xAxisData: [
|
||||||
"1月","2月","3月"
|
// "机手1","机手2","机手3","机手4","机手5","机手6","机手7","机手8","机手9"
|
||||||
],
|
],
|
||||||
yAxisProps: {
|
yAxisProps: {
|
||||||
type: "value",
|
type: "value",
|
||||||
|
|
@ -239,7 +236,9 @@ const barComProps = reactive({
|
||||||
},
|
},
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
seriseData: [],//数据
|
seriseData: [
|
||||||
|
// 120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290
|
||||||
|
],//数据
|
||||||
itemStyle: [//柱状图的默认颜色 渐变
|
itemStyle: [//柱状图的默认颜色 渐变
|
||||||
{ offset: 0, color: '#91FFBE' },
|
{ offset: 0, color: '#91FFBE' },
|
||||||
{ offset: 1, color: '#077FBA' }
|
{ offset: 1, color: '#077FBA' }
|
||||||
|
|
@ -337,22 +336,14 @@ const barComPropsHorizontal = reactive({
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
xAxisData: [
|
xAxisData: [],
|
||||||
20, 40, 60, 80, 100
|
|
||||||
],
|
|
||||||
yAxisProps: {
|
yAxisProps: {
|
||||||
type: "category",
|
type: "category",
|
||||||
// boundaryGap: false,
|
// boundaryGap: false,
|
||||||
},
|
},
|
||||||
yAxisData: [
|
yAxisData: [],
|
||||||
"装备1", "装备2", "装备3", "装备4", "装备5"
|
|
||||||
],
|
|
||||||
seriseData: [
|
seriseData: [
|
||||||
{ value: 120, name: '装备1' },
|
// 120, 132, 101, 134, 90
|
||||||
{ value: 132, name: '装备2' },
|
|
||||||
{ value: 101, name: '装备3' },
|
|
||||||
{ value: 134, name: '装备4' },
|
|
||||||
{ value: 90, name: '装备5' }
|
|
||||||
],//数据
|
],//数据
|
||||||
itemStyle: [//柱状图的默认颜色 渐变
|
itemStyle: [//柱状图的默认颜色 渐变
|
||||||
{ offset: 0, color: '#077FBA' },
|
{ offset: 0, color: '#077FBA' },
|
||||||
|
|
@ -428,8 +419,8 @@ const iniTapiMaDevInfoTypeList = async () => {
|
||||||
try {
|
try {
|
||||||
const res: any = await apiMaDevInfoTypeList()
|
const res: any = await apiMaDevInfoTypeList()
|
||||||
console.log("apiMaDevInfoTypeList", res)
|
console.log("apiMaDevInfoTypeList", res)
|
||||||
equipmentCountInfo.selfCount = res.self.count
|
equipmentCountInfo.selfCount = res.self.count || 0
|
||||||
equipmentCountInfo.shelfCount = res.rent.count
|
equipmentCountInfo.shelfCount = res.use.count || 0
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
|
@ -457,7 +448,7 @@ const iniTapiMaDevInfoCompanyList = async () => {
|
||||||
const iniTapiMaDevInfoMatypeList = async () => {
|
const iniTapiMaDevInfoMatypeList = async () => {
|
||||||
// 查询在租以及待租设备数量:
|
// 查询在租以及待租设备数量:
|
||||||
try {
|
try {
|
||||||
const res: any = await apiMaDevInfoMatypeList()
|
const res: any = await apiMaDevInfoTypeList()
|
||||||
console.log("apiMaDevInfoMatypeList", res)
|
console.log("apiMaDevInfoMatypeList", res)
|
||||||
middleCountList.list[2].count = res.rent.count || 0
|
middleCountList.list[2].count = res.rent.count || 0
|
||||||
middleCountList.list[3].count = res.use.count || 0
|
middleCountList.list[3].count = res.use.count || 0
|
||||||
|
|
@ -528,6 +519,7 @@ const iniTapiMaDevInfoMaList = async () => {
|
||||||
const res: any = await apiMaDevInfoMaList()
|
const res: any = await apiMaDevInfoMaList()
|
||||||
console.log("apiMaDevInfoMaList", res)
|
console.log("apiMaDevInfoMaList", res)
|
||||||
barComPropsHorizontal.xAxisData = res.map((ele: any) => ele.ownCo)
|
barComPropsHorizontal.xAxisData = res.map((ele: any) => ele.ownCo)
|
||||||
|
barComPropsHorizontal.yAxisData = res.map((ele: any) => ele.ownCo)
|
||||||
barComPropsHorizontal.seriseData = res.map((ele: any) => ele.count)
|
barComPropsHorizontal.seriseData = res.map((ele: any) => ele.count)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue