|
@@ -281,10 +281,10 @@
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item
|
|
|
- v-for="item in specialGoodsDatas"
|
|
|
- :key="item.specialTypeName"
|
|
|
- :command="item.specialTypeName"
|
|
|
- >{{ item.specialTypeName }}</el-dropdown-item
|
|
|
+ v-for="specialTypeName in specialGoodsDatas"
|
|
|
+ :key="specialTypeName"
|
|
|
+ :command="specialTypeName"
|
|
|
+ >{{ specialTypeName }}</el-dropdown-item
|
|
|
>
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
@@ -403,9 +403,20 @@ const airlineObj = ref<any>({})
|
|
|
const pickingObj = ref<any>({})
|
|
|
const flightNums = ref(0)
|
|
|
const stockNums = ref(0)
|
|
|
-const specialGoods = ref<string>('分类')
|
|
|
-const specialGoodsDatas = ref<any>([])
|
|
|
-const specialGoodsAll = ref<any>([])
|
|
|
+const specialGoods = ref('全部')
|
|
|
+const specialGoodsDatas = ref([
|
|
|
+ '活',
|
|
|
+ '鲜',
|
|
|
+ '药',
|
|
|
+ '危',
|
|
|
+ '冷',
|
|
|
+ '锂',
|
|
|
+ '快',
|
|
|
+ '动',
|
|
|
+ '贵',
|
|
|
+ '邮',
|
|
|
+ '全部',
|
|
|
+])
|
|
|
const weightNums = ref<number | string>(0)
|
|
|
const today = parseTime(Date.now(), '{y}-{m}-{d}')
|
|
|
const sevenDaysAgo = parseTime(
|
|
@@ -536,9 +547,6 @@ const pubFunc = (listValues, target, type?) => {
|
|
|
// 特货分类统计-选取下拉数据
|
|
|
const handleCommand = (command: string) => {
|
|
|
specialGoods.value = command
|
|
|
- const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
|
|
|
- const result = formatGoods(command, specialGoodsAll.value)
|
|
|
- airlineObj.value = pubFunc(result, newObj)
|
|
|
}
|
|
|
|
|
|
//获取小时峰值分布
|
|
@@ -562,10 +570,13 @@ const waybillTrendFunc = async () => {
|
|
|
if (listValues && isValue(listValues)) {
|
|
|
const dealedList = listValues.reduce((preList, currentValue) => {
|
|
|
if (typeof currentValue.jobTime === 'string') {
|
|
|
- return [...preList, {
|
|
|
- ...currentValue,
|
|
|
- jobTime: parseDate(currentValue.jobTime)
|
|
|
- }]
|
|
|
+ return [
|
|
|
+ ...preList,
|
|
|
+ {
|
|
|
+ ...currentValue,
|
|
|
+ jobTime: parseDate(currentValue.jobTime),
|
|
|
+ },
|
|
|
+ ]
|
|
|
}
|
|
|
return preList
|
|
|
}, [])
|
|
@@ -677,18 +688,7 @@ const airlineFunc = async () => {
|
|
|
if (listValues && isValue(listValues)) {
|
|
|
const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
|
|
|
const newDatas = _.cloneDeep(listValues)
|
|
|
- const nameDatas = _.unionBy(newDatas, 'specialTypeName')
|
|
|
- // const names: any = [...nameDatas];
|
|
|
- const names: any = [...nameDatas, { specialTypeName: '合计' }]
|
|
|
- // specialGoods.value = names[0]["specialTypeName"];
|
|
|
- specialGoods.value = '合计'
|
|
|
- specialGoodsDatas.value = names
|
|
|
- specialGoodsAll.value = listValues
|
|
|
- const result = formatGoods(
|
|
|
- // names[0]["specialTypeName"],
|
|
|
- '合计',
|
|
|
- specialGoodsAll.value
|
|
|
- )
|
|
|
+ const result = formatGoods(specialGoods.value, newDatas)
|
|
|
airlineObj.value = pubFunc(result, newObj)
|
|
|
}
|
|
|
loading7.value = false
|
|
@@ -707,11 +707,14 @@ const pickingFuncs = async () => {
|
|
|
const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption)
|
|
|
const dealedList = listValues.reduce((preList, currentValue) => {
|
|
|
if (typeof currentValue.flightDate === 'string') {
|
|
|
- return [...preList, {
|
|
|
- ...currentValue,
|
|
|
- jobTime: parseDate(currentValue.flightDate),
|
|
|
- weight: currentValue.flightNum
|
|
|
- }]
|
|
|
+ return [
|
|
|
+ ...preList,
|
|
|
+ {
|
|
|
+ ...currentValue,
|
|
|
+ jobTime: parseDate(currentValue.flightDate),
|
|
|
+ weight: currentValue.flightNum,
|
|
|
+ },
|
|
|
+ ]
|
|
|
}
|
|
|
return preList
|
|
|
}, [])
|
|
@@ -726,7 +729,7 @@ useLoop([nodePeakFunc], 'dashboard', [nodeDates])
|
|
|
useLoop([numbersFunc], 'dashboard')
|
|
|
useLoop([airlineTrafficFunc], 'dashboard', [airlineTrafficDates])
|
|
|
useLoop([airlineAbnormalFunc], 'dashboard')
|
|
|
-useLoop([airlineFunc], 'dashboard', [airlineDates])
|
|
|
+useLoop([airlineFunc], 'dashboard', [airlineDates, specialGoods])
|
|
|
useLoop([pickingFuncs], 'dashboard', [pickingDates])
|
|
|
</script>
|
|
|
|