|
@@ -7,7 +7,7 @@
|
|
|
<div class="dashboard-content-top-left-item">
|
|
|
<div class="dashboard-content-top-left-item-top">
|
|
|
<div class="dashboard-content-top-left-item-top-title">
|
|
|
- 小时峰值分布
|
|
|
+ 小时峰值分析
|
|
|
</div>
|
|
|
<div class="dashboard-content-top-left-item-top-time" @click="showDatePicker(showTimeMsg.HourlyPeak)">
|
|
|
<el-icon color="#ffffff" size="18">
|
|
@@ -25,7 +25,7 @@
|
|
|
<div class="dashboard-content-top-left-item">
|
|
|
<div class="dashboard-content-top-left-item-top">
|
|
|
<div class="dashboard-content-top-left-item-top-title">
|
|
|
- 运单趋势分析
|
|
|
+ 日趋势分析
|
|
|
</div>
|
|
|
<div class="dashboard-content-top-left-item-top-time" @click="showDatePicker(showTimeMsg.WaybillTrend)">
|
|
|
<el-icon color="#ffffff" size="18">
|
|
@@ -166,7 +166,8 @@ import Dialog from "@/components/dialog/index.vue";
|
|
|
import { usePublic, showTimeMsg } from "./hooks/usePublic";
|
|
|
import { parseTime, isValue } from "@/utils/validate";
|
|
|
import * as _ from "lodash";
|
|
|
-const { optionLeft, airCompaneBaggage, airStutas, getPublicData } = usePublic();
|
|
|
+const { optionLeft, airCompaneBaggage, airlineAbnormalBaggage, getPublicData } =
|
|
|
+ usePublic();
|
|
|
const timePickerName = ref<number>(0);
|
|
|
const flag = ref<boolean>(false);
|
|
|
const loading1 = ref<boolean>(false);
|
|
@@ -188,6 +189,9 @@ const form = ref({
|
|
|
startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
|
|
|
endDate: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
});
|
|
|
+const dateNow = ref({
|
|
|
+ time: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
+});
|
|
|
const listData = ref<any>([]);
|
|
|
const disabledStartDate = (time: Date) => {
|
|
|
const timer: any = form.value.endDate;
|
|
@@ -207,6 +211,7 @@ const submitForm = () => {
|
|
|
flag.value = false;
|
|
|
switch (timePickerName.value) {
|
|
|
case showTimeMsg.HourlyPeak:
|
|
|
+ dateNow.value.time = form.value.startDate;
|
|
|
hourlyPeakFunc();
|
|
|
break;
|
|
|
case showTimeMsg.WaybillTrend:
|
|
@@ -254,8 +259,8 @@ const pubFunc = (listValues, target, type?) => {
|
|
|
const [jobTimes, stockNums, weights] = [<any>[], <any>[], <any>[]];
|
|
|
listValues.forEach((item) => {
|
|
|
jobTimes.push(item.jobTime);
|
|
|
- stockNums.push(item.stockNum);
|
|
|
- weights.push(item.weight);
|
|
|
+ stockNums.push(Number(item.stockNum));
|
|
|
+ weights.push(Number(item.weight));
|
|
|
});
|
|
|
newObj.xAxis.data = jobTimes;
|
|
|
if (type) {
|
|
@@ -278,7 +283,7 @@ const parseDate = (date: string) => {
|
|
|
const hourlyPeakFunc = async () => {
|
|
|
loading1.value = true;
|
|
|
const listValues = (await getPublicData(DATACONTENT_ID.jscCgHourlyPeakId, [
|
|
|
- { flightDate1: form.value.startDate, flightDate2: form.value.endDate },
|
|
|
+ { flightDate1: dateNow.value.time, flightDate2: form.value.endDate },
|
|
|
])) as any;
|
|
|
if (listValues && isValue(listValues)) {
|
|
|
hourlyPeakObj.value = pubFunc(listValues, optionLeft);
|
|
@@ -312,7 +317,7 @@ const nodePeakFunc = async () => {
|
|
|
listValues.forEach((item) => {
|
|
|
item.jobTime = item["airport"];
|
|
|
});
|
|
|
- nodePeakObj.value = pubFunc(listValues, newObj);
|
|
|
+ nodePeakObj.value = pubFunc(listValues, newObj, true);
|
|
|
}
|
|
|
loading3.value = false;
|
|
|
};
|
|
@@ -321,13 +326,16 @@ const nodePeakFunc = async () => {
|
|
|
const numbersFunc = async () => {
|
|
|
loading4.value = true;
|
|
|
const listValues = (await getPublicData(DATACONTENT_ID.jscCgNumbersId, [
|
|
|
- { fd1: form.value.startDate, fd2: form.value.endDate },
|
|
|
+ {
|
|
|
+ fd1: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
+ fd2: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
+ },
|
|
|
])) as any;
|
|
|
if (listValues && isValue(listValues)) {
|
|
|
const { flightNum, stockNum, weight } = listValues[0];
|
|
|
- flightNums.value = flightNum;
|
|
|
- stockNums.value = stockNum;
|
|
|
- weightNums.value = weight;
|
|
|
+ flightNums.value = flightNum ?? 0;
|
|
|
+ stockNums.value = stockNum ?? 0;
|
|
|
+ weightNums.value = weight ?? 0;
|
|
|
}
|
|
|
loading4.value = false;
|
|
|
};
|
|
@@ -355,7 +363,7 @@ const airlineTrafficFunc = async () => {
|
|
|
item.jobTime = item["IACACode"];
|
|
|
});
|
|
|
|
|
|
- airlineTrafficObj.value = pubFunc(listValues, newObj);
|
|
|
+ airlineTrafficObj.value = pubFunc(listValues, newObj, true);
|
|
|
}
|
|
|
loading6.value = false;
|
|
|
};
|
|
@@ -365,8 +373,8 @@ const airlineAbnormalFunc = async () => {
|
|
|
loading5.value = true;
|
|
|
const listValues = (await getPublicData(DATACONTENT_ID.jscFlightDynamicsId, [
|
|
|
{
|
|
|
- fd1: form.value.startDate,
|
|
|
- fd2: form.value.endDate,
|
|
|
+ fd1: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
+ fd2: parseTime(Date.now(), "{y}-{m}-{d}"),
|
|
|
fttp: "国内进港",
|
|
|
},
|
|
|
])) as any;
|
|
@@ -386,7 +394,7 @@ const airlineFunc = async () => {
|
|
|
},
|
|
|
])) as any;
|
|
|
if (listValues && isValue(listValues)) {
|
|
|
- const newObj: any = _.cloneDeep(airCompaneBaggage.option.baseOption);
|
|
|
+ const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
|
|
|
(newObj.dataZoom = [
|
|
|
{
|
|
|
id: "dataZoomX",
|