|
@@ -9,6 +9,7 @@ import RecentStatus from './components/RecentStatus.vue'
|
|
|
import ScoringSystem from './components/ScoringSystem.vue'
|
|
import ScoringSystem from './components/ScoringSystem.vue'
|
|
|
import TopMap from './components/TopMap.vue'
|
|
import TopMap from './components/TopMap.vue'
|
|
|
import DashFilters from './components/DashFiters.vue'
|
|
import DashFilters from './components/DashFiters.vue'
|
|
|
|
|
+import CustomerFilter from './components/CustomerFilter.vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { formatNumber } from '@/utils/tools'
|
|
import { formatNumber } from '@/utils/tools'
|
|
@@ -39,6 +40,11 @@ const changeCancel = (id: any) => {
|
|
|
Management.value[id - 1].switchValue = false
|
|
Management.value[id - 1].switchValue = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const customerInfo = ref({
|
|
|
|
|
+ customerCode: '',
|
|
|
|
|
+ customerType: ''
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
//RecentStatusList
|
|
//RecentStatusList
|
|
|
const RecentStatusList = ref()
|
|
const RecentStatusList = ref()
|
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 10, total: 10000 })
|
|
const pageInfo = ref({ pageNo: 1, pageSize: 10, total: 10000 })
|
|
@@ -77,15 +83,7 @@ const GetDashboardData = () => {
|
|
|
revenueDefaultData.value = res.data.RevenueDefaultData
|
|
revenueDefaultData.value = res.data.RevenueDefaultData
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- // GetKpiData(kpiDefaultData.value)
|
|
|
|
|
- // GetPendingEcharts(pendingDefaultData.value)
|
|
|
|
|
getTableData(recentDefaultData.value, false)
|
|
getTableData(recentDefaultData.value, false)
|
|
|
- // GetETDEcharts(etdDefaultData.value)
|
|
|
|
|
- // GetContainerCountEcharts(containerDefaultData.value)
|
|
|
|
|
- // GetTop10ODEcharts(top10DefaultData.value)
|
|
|
|
|
- // GetCo2EmissionEcharts(co2OriginDefaultData.value)
|
|
|
|
|
- // GetCo2DestinationEcharts(co2DestinationDefaultData.value)
|
|
|
|
|
- // GetRevenueEcharts(revenueDefaultData.value)
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -126,11 +124,13 @@ const kpiArrivalLoading = ref(false)
|
|
|
const GetKpiData = (val: any) => {
|
|
const GetKpiData = (val: any) => {
|
|
|
kpiLoading.value = true
|
|
kpiLoading.value = true
|
|
|
kpiArrivalLoading.value = true
|
|
kpiArrivalLoading.value = true
|
|
|
|
|
+ kpiDefaultData.value = val
|
|
|
// 获取KPI Departure图表数据
|
|
// 获取KPI Departure图表数据
|
|
|
$api
|
|
$api
|
|
|
.GetKPIEcharts({
|
|
.GetKPIEcharts({
|
|
|
r_type: 'atd_r4',
|
|
r_type: 'atd_r4',
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -180,10 +180,12 @@ const GetPendingEcharts = (val: any) => {
|
|
|
// 获取Pending Departure图表数据
|
|
// 获取Pending Departure图表数据
|
|
|
pendingLoading.value = true
|
|
pendingLoading.value = true
|
|
|
pendingArrivalLoading.value = true
|
|
pendingArrivalLoading.value = true
|
|
|
|
|
+ pendingDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetPendingEcharts({
|
|
.GetPendingEcharts({
|
|
|
r_type: 'r4',
|
|
r_type: 'r4',
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -194,14 +196,14 @@ const GetPendingEcharts = (val: any) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.finally(() => {
|
|
.finally(() => {
|
|
|
- console.log('pendingLoading', pendingLoading.value)
|
|
|
|
|
pendingLoading.value = false
|
|
pendingLoading.value = false
|
|
|
})
|
|
})
|
|
|
// 获取Pending Arrival图表数据
|
|
// 获取Pending Arrival图表数据
|
|
|
$api
|
|
$api
|
|
|
.GetPendingEcharts({
|
|
.GetPendingEcharts({
|
|
|
r_type: 'r3',
|
|
r_type: 'r3',
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -225,9 +227,11 @@ const etdLoading = ref(false)
|
|
|
// 获取ETD/ETA 图表数据
|
|
// 获取ETD/ETA 图表数据
|
|
|
const GetETDEcharts = (val: any) => {
|
|
const GetETDEcharts = (val: any) => {
|
|
|
etdLoading.value = true
|
|
etdLoading.value = true
|
|
|
|
|
+ etdDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetETDEcharts({
|
|
.GetETDEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -253,9 +257,11 @@ const containerObj = reactive({
|
|
|
const containerLoading = ref(false)
|
|
const containerLoading = ref(false)
|
|
|
const GetContainerCountEcharts = (val: any) => {
|
|
const GetContainerCountEcharts = (val: any) => {
|
|
|
containerLoading.value = true
|
|
containerLoading.value = true
|
|
|
|
|
+ containerDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetContainerCountEcharts({
|
|
.GetContainerCountEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -291,10 +297,11 @@ const top10Originref = ref()
|
|
|
const top10Destinationref = ref()
|
|
const top10Destinationref = ref()
|
|
|
const GetTop10ODEcharts = (val: any) => {
|
|
const GetTop10ODEcharts = (val: any) => {
|
|
|
topOriginLoading.value = true
|
|
topOriginLoading.value = true
|
|
|
-
|
|
|
|
|
|
|
+ top10DefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetTop10ODEcharts({
|
|
.GetTop10ODEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -329,9 +336,11 @@ const emissionObj = reactive({
|
|
|
})
|
|
})
|
|
|
const GetCo2EmissionEcharts = (val: any) => {
|
|
const GetCo2EmissionEcharts = (val: any) => {
|
|
|
emissionLoading.value = true
|
|
emissionLoading.value = true
|
|
|
|
|
+ co2OriginDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetCo2EmissionEcharts({
|
|
.GetCo2EmissionEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -359,9 +368,11 @@ const destinationObj = reactive({
|
|
|
const destinationLoading = ref(false)
|
|
const destinationLoading = ref(false)
|
|
|
const GetCo2DestinationEcharts = (val: any) => {
|
|
const GetCo2DestinationEcharts = (val: any) => {
|
|
|
destinationLoading.value = true
|
|
destinationLoading.value = true
|
|
|
|
|
+ co2DestinationDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetCo2DestinationEcharts({
|
|
.GetCo2DestinationEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -395,9 +406,11 @@ const GetRevenueEcharts = (val: any) => {
|
|
|
revenue_date_start.value = val.date_start
|
|
revenue_date_start.value = val.date_start
|
|
|
revenue_date_end.value = val.date_end
|
|
revenue_date_end.value = val.date_end
|
|
|
revenueLoading.value = true
|
|
revenueLoading.value = true
|
|
|
|
|
+ revenueDefaultData.value = val
|
|
|
$api
|
|
$api
|
|
|
.GetRevenueEcharts({
|
|
.GetRevenueEcharts({
|
|
|
- ...val
|
|
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ ...customerInfo.value
|
|
|
})
|
|
})
|
|
|
.then((res: any) => {
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -443,7 +456,7 @@ const SaveFilters = () => {
|
|
|
Management.value.forEach((item: any, index: any) => {
|
|
Management.value.forEach((item: any, index: any) => {
|
|
|
item.id = index + 1
|
|
item.id = index + 1
|
|
|
})
|
|
})
|
|
|
- const dashboardObj = {
|
|
|
|
|
|
|
+ const filterConfig = {
|
|
|
kpiDefaultData: kpiDefaultData.value,
|
|
kpiDefaultData: kpiDefaultData.value,
|
|
|
pendingDefaultData: pendingDefaultData.value,
|
|
pendingDefaultData: pendingDefaultData.value,
|
|
|
recentDefaultData: recentDefaultData.value,
|
|
recentDefaultData: recentDefaultData.value,
|
|
@@ -454,21 +467,20 @@ const SaveFilters = () => {
|
|
|
co2DestinationDefaultData: co2DestinationDefaultData.value,
|
|
co2DestinationDefaultData: co2DestinationDefaultData.value,
|
|
|
revenueDefaultData: revenueDefaultData.value
|
|
revenueDefaultData: revenueDefaultData.value
|
|
|
}
|
|
}
|
|
|
- console.log(dashboardObj, '保存内容')
|
|
|
|
|
- // $api
|
|
|
|
|
- // .SaveLayout({
|
|
|
|
|
- // management: Management.value,
|
|
|
|
|
- // dashboardObj
|
|
|
|
|
- // })
|
|
|
|
|
- // .then((res: any) => {
|
|
|
|
|
- // if (res.code == 200) {
|
|
|
|
|
- // ElMessage({
|
|
|
|
|
- // message: res.data.msg,
|
|
|
|
|
- // duration: 3000,
|
|
|
|
|
- // type: 'success'
|
|
|
|
|
- // })
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ $api
|
|
|
|
|
+ .SaveLayout({
|
|
|
|
|
+ management: Management.value,
|
|
|
|
|
+ dashboardObj: filterConfig
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res.data.msg,
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
//ETD to ETA(DAYS)点击跳转
|
|
//ETD to ETA(DAYS)点击跳转
|
|
|
const pie_chart_ETD = ref()
|
|
const pie_chart_ETD = ref()
|
|
@@ -923,6 +935,8 @@ const handleGuide = () => {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- customer-filter -->
|
|
|
|
|
+ <CustomerFilter></CustomerFilter>
|
|
|
<!-- 图表 -->
|
|
<!-- 图表 -->
|
|
|
<div class="echarts">
|
|
<div class="echarts">
|
|
|
<VueDraggable
|
|
<VueDraggable
|
|
@@ -1355,6 +1369,7 @@ const handleGuide = () => {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.iconfont {
|
|
.iconfont {
|
|
|
vertical-align: -2px;
|
|
vertical-align: -2px;
|
|
|
}
|
|
}
|