|
|
@@ -51,6 +51,7 @@ const ContainerefaultData = ref()
|
|
|
const Top10DefaultData = ref()
|
|
|
const Co2OriginDefaultData = ref()
|
|
|
const Co2DestinationDefaultData = ref()
|
|
|
+const RevenueDefaultData = ref()
|
|
|
// 获取首页数据
|
|
|
let dashboardObj: any = {}
|
|
|
const GetDashboardData = () => {
|
|
|
@@ -75,6 +76,8 @@ const GetDashboardData = () => {
|
|
|
dashboardObj.OriginCo2Top10faultData = res.data.OriginCo2Top10faultData
|
|
|
Co2DestinationDefaultData.value = res.data.DestinationCo2Top10faultData
|
|
|
dashboardObj.DestinationCo2Top10faultData = res.data.DestinationCo2Top10faultData
|
|
|
+ RevenueDefaultData.value = res.data.RevenueDefaultData
|
|
|
+ dashboardObj.RevenueDefaultData = res.data.RevenueDefaultData
|
|
|
}
|
|
|
})
|
|
|
.finally(() => {
|
|
|
@@ -87,6 +90,7 @@ const GetDashboardData = () => {
|
|
|
GetTop10ODEcharts(Top10DefaultData.value)
|
|
|
GetCo2EmissionEcharts(Co2OriginDefaultData.value)
|
|
|
GetCo2DestinationEcharts(Co2DestinationDefaultData.value)
|
|
|
+ GetRevenueEcharts(RevenueDefaultData.value)
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
@@ -354,6 +358,29 @@ const DestinationObj = reactive({
|
|
|
interval: 0,
|
|
|
download_name: ''
|
|
|
})
|
|
|
+const DestinationLoading = ref(true)
|
|
|
+const GetCo2DestinationEcharts = (val: any) => {
|
|
|
+ dashboardObj.DestinationCo2Top10faultData = val
|
|
|
+ $api
|
|
|
+ .GetCo2DestinationEcharts({
|
|
|
+ ...val
|
|
|
+ })
|
|
|
+ .then((res: any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ DestinationObj.bar_title = res.data.ContainerCount_Title
|
|
|
+ DestinationObj.barList = res.data.ContainerCountList
|
|
|
+ DestinationObj.barSeries = res.data.ContainerCounSeries
|
|
|
+ DestinationObj.Max = res.data.Max
|
|
|
+ DestinationObj.interval = res.data.interval
|
|
|
+ DestinationObj.download_name = res.data.download_name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ DestinationLoading.value = false
|
|
|
+ })
|
|
|
+}
|
|
|
+//获取Revenue Spent
|
|
|
+
|
|
|
const RevenueObj = reactive({
|
|
|
bar_title: 'Total: 0',
|
|
|
barList: [
|
|
|
@@ -376,11 +403,19 @@ const RevenueObj = reactive({
|
|
|
type: 'bar',
|
|
|
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
|
|
emphasis: {
|
|
|
+ disabled: true,
|
|
|
focus: 'none'
|
|
|
},
|
|
|
itemStyle: {
|
|
|
color: '#FF7500',
|
|
|
borderRadius: 6
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ color: '#646A73',
|
|
|
+ position: 'top',
|
|
|
+ fontFamily: 'Lato-Light',
|
|
|
+ hideWhenMouseLeave: false // 鼠标离开时不隐藏标签
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -388,11 +423,19 @@ const RevenueObj = reactive({
|
|
|
type: 'bar',
|
|
|
data: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
|
|
emphasis: {
|
|
|
+ disabled: true,
|
|
|
focus: 'none'
|
|
|
},
|
|
|
itemStyle: {
|
|
|
color: '#FFAC66',
|
|
|
borderRadius: 6
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ color: '#646A73',
|
|
|
+ position: 'top',
|
|
|
+ fontFamily: 'Lato-Light',
|
|
|
+ hideWhenMouseLeave: false // 鼠标离开时不隐藏标签
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -400,11 +443,19 @@ const RevenueObj = reactive({
|
|
|
type: 'bar',
|
|
|
data: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],
|
|
|
emphasis: {
|
|
|
+ disabled: true,
|
|
|
focus: 'none'
|
|
|
},
|
|
|
itemStyle: {
|
|
|
color: '#FFE3CC',
|
|
|
borderRadius: 6
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ color: '#646A73',
|
|
|
+ position: 'top',
|
|
|
+ fontFamily: 'Lato-Light',
|
|
|
+ hideWhenMouseLeave: false // 鼠标离开时不隐藏标签
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
@@ -413,25 +464,25 @@ const RevenueObj = reactive({
|
|
|
download_name: 'Rvenue',
|
|
|
isShowTooltips: true
|
|
|
})
|
|
|
-const DestinationLoading = ref(true)
|
|
|
-const GetCo2DestinationEcharts = (val: any) => {
|
|
|
- dashboardObj.DestinationCo2Top10faultData = val
|
|
|
+const RevenueLoading = ref(true)
|
|
|
+const GetRevenueEcharts = (val: any) => {
|
|
|
+ dashboardObj.RevenueDefaultData = val
|
|
|
$api
|
|
|
- .GetCo2DestinationEcharts({
|
|
|
+ .GetRevenueEcharts({
|
|
|
...val
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
|
- DestinationObj.bar_title = res.data.ContainerCount_Title
|
|
|
- DestinationObj.barList = res.data.ContainerCountList
|
|
|
- DestinationObj.barSeries = res.data.ContainerCounSeries
|
|
|
- DestinationObj.Max = res.data.Max
|
|
|
- DestinationObj.interval = res.data.interval
|
|
|
- DestinationObj.download_name = res.data.download_name
|
|
|
+ RevenueObj.bar_title = res.data.bar_title
|
|
|
+ RevenueObj.barList = res.data.barList
|
|
|
+ RevenueObj.barSeries = res.data.barSeries
|
|
|
+ RevenueObj.Max = res.data.Max
|
|
|
+ RevenueObj.interval = res.data.interval
|
|
|
+ RevenueObj.download_name = res.data.download_name
|
|
|
}
|
|
|
})
|
|
|
.finally(() => {
|
|
|
- DestinationLoading.value = false
|
|
|
+ RevenueLoading.value = false
|
|
|
})
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
@@ -1189,14 +1240,16 @@ const ClickParams = (val: any) => {
|
|
|
</template>
|
|
|
</VBox_Dashboard>
|
|
|
</div>
|
|
|
- <!-- <div class="KPI_Pending">
|
|
|
+ <!-- <div v-else-if="item.title === 'Revenue Spent' && item.switchValue" class="KPI_Pending">
|
|
|
<VBox_Dashboard @changeCancel="changeCancel(item.id)" style="width: 100%">
|
|
|
<template #header>
|
|
|
<div class="Title_flex">
|
|
|
Revenue Spent
|
|
|
<DashFilters
|
|
|
- :defaultData="Co2DestinationDefaultData"
|
|
|
- @FilterSearch="GetCo2DestinationEcharts"
|
|
|
+ :defaultData="RevenueDefaultData"
|
|
|
+ @FilterSearch="GetRevenueEcharts"
|
|
|
+ :isRevenue="true"
|
|
|
+ :isContainer="true"
|
|
|
></DashFilters>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -1204,9 +1257,8 @@ const ClickParams = (val: any) => {
|
|
|
<BarChart
|
|
|
ref="seller_chart_CO2_destination"
|
|
|
:BarData="RevenueObj"
|
|
|
- v-vloading="DestinationLoading"
|
|
|
+ v-vloading="RevenueLoading"
|
|
|
style="height: 300px"
|
|
|
- @clickParams="ClickParams(item.title)"
|
|
|
:barHeight="{ height: '300px' }"
|
|
|
></BarChart>
|
|
|
</template>
|