瀏覽代碼

2.23问题修改

zhongxiaoyu 2 年之前
父節點
當前提交
7abc164a93

+ 2 - 2
public/config.js

@@ -199,7 +199,7 @@ var DATACONTENT_ID = {
   departureFlightContainerWaybill: 1803518, // 国内离港航班-集装器内运单
   arrivalFlightInfo: 1803509, // 国内进港航班基础信息
   arrivalFlightWaybill: 1803510, // 国内进港航班运单
-  arrivalFlightContainer: 1803617, // 国内进港航班集装器
+  // arrivalFlightContainer: 1803617, // 国内进港航班集装器
   arrivalFlightContainerWaybill: 1803620, // 国内进港航班-集装器内运单
   internationalDepartureFlightInfo: 1803528, // 国际离港航班基础信息
   internationalDepartureFlightWaybill: 1803529, // 国际离港航班运单
@@ -207,7 +207,7 @@ var DATACONTENT_ID = {
   internationalDepartureFlightContainerWaybill: 1803531, // 国际离港航班-集装器内运单
   internationalArrivalFlightInfo: 1803526, // 国际进港航班基础信息
   internationalArrivalFlightWaybill: 1803527, // 国际进港航班运单
-  internationalArrivalFlightContainer: 1803618, // 国际进港航班集装器
+  // internationalArrivalFlightContainer: 1803618, // 国际进港航班集装器
   internationalArrivalFlightContainerWaybill: 1803619, // 国际进港航班-集装器内运单
   airportNameZh: 1803517, // 机场中文名
   // 运单

+ 16 - 0
src/views/dashboard/hooks/usePublic.ts

@@ -493,6 +493,22 @@ export function usePublic() {
     return dates.join('-')
   }
   const formatGoods = (name: string, datas: any) => {
+    if (name === '合计') {
+      return datas.reduce((prev, curr) => {
+        const sameDate = prev.find(item => item.jobTime === parseDate(curr.flightDate))
+        if (sameDate) {
+          sameDate.weight += curr.flightNum
+          sameDate.stockNum += curr.stockNum
+        } else {
+          prev.push({
+            jobTime: parseDate(curr.flightDate),
+            weight: curr.flightNum,
+            stockNum: curr.stockNum
+          })
+        }
+        return prev
+      }, [])
+    }
     const res = datas.filter((item) => item['specialTypeName'] == name)
     res.forEach((item) => {
       item.jobTime = parseDate(item['flightDate'])

+ 29 - 7
src/views/dashboard/index.vue

@@ -83,7 +83,7 @@
                 <div class="dashboard-content-top-center-bottom-content-head-list">航班状态</div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">始发站/经停</div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">计划到达</div>
-                <div class="dashboard-content-top-center-bottom-content-head-list">实际到达</div>
+                <div class="dashboard-content-top-center-bottom-content-head-list">预计到达</div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">机型</div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">类型</div>
               </div>
@@ -146,7 +146,7 @@
                   </span>
                   <template #dropdown>
                     <el-dropdown-menu>
-                      <el-dropdown-item v-for="(item,index) in specialGoodsDatas" :key="index" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
+                      <el-dropdown-item v-for="item in specialGoodsDatas" :key="item.specialTypeName" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
                     </el-dropdown-menu>
                   </template>
                 </el-dropdown>
@@ -159,16 +159,32 @@
           <div class="dashboard-content-top-right-item">
             <div class="dashboard-content-top-right-item-top">
               <div class="dashboard-content-top-right-item-top-title">
-                货物重量统计
+                货机货量统计
               </div>
-              <!-- <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker(showTimeMsg.TallyWeight)">
+              <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker(showTimeMsg.TallyWeight)">
                 <el-icon color="#ffffff" size="18">
                   <Calendar />
                 </el-icon>
                 <el-icon color="#ffffff">
                   <CaretBottom />
                 </el-icon>
-              </div> -->
+              </div>
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleWeightType">
+                  <span class="icons">
+                    <span class="icons-txt">{{ weightType }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </span>
+                  <template #dropdown>
+                    <el-dropdown-menu>
+                      <el-dropdown-item command="进港">进港</el-dropdown-item>
+                      <el-dropdown-item command="出港">出港</el-dropdown-item>
+                    </el-dropdown-menu>
+                  </template>
+                </el-dropdown>
+              </div>
             </div>
             <div v-loading="loading8" element-loading-text="数据加载中..." element-loading-svg-view-box="-10, -10, 50, 50" element-loading-background="rgba(0,0,0, 0.3)" class="dashboard-content-top-left-item-bottom">
               <Echarts id="ww45" :option="tallyObj" />
@@ -234,6 +250,7 @@ const weightNums = ref<number | string>(0);
 const specialGoods = ref<string>("分类");
 const specialGoodsDatas = ref<any>([]);
 const specialGoodsAll = ref<any>([]);
+const weightType = ref("进港")
 const form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
   endDate: parseTime(Date.now(), "{y}-{m}-{d}"),
@@ -466,7 +483,8 @@ const airlineFunc = async () => {
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
     const newDatas = _.cloneDeep(listValues);
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
-    const names: any = [...nameDatas];
+    // const names: any = [...nameDatas];
+    const names: any = [...nameDatas, { specialTypeName: "合计" }];
     specialGoods.value = names[0]["specialTypeName"];
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
@@ -486,7 +504,7 @@ const tallyWeightFunc = async () => {
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
-      fttp: "国内进港",
+      fttp: `国内${weightType.value}`,
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
@@ -502,6 +520,10 @@ const tallyWeightFunc = async () => {
   }
   loading8.value = false;
 };
+const handleWeightType = (type: string) => {
+  weightType.value = type;
+  tallyWeightFunc();
+}
 
 onMounted(() => {
   hourlyPeakFunc();

+ 4 - 3
src/views/dashboard/indexHomeOut.vue

@@ -136,7 +136,7 @@
                 </el-icon>
               </div>
               <div class="dashboard-content-top-right-item-top-time">
-                <el-dropdown trigger="click" @command="handleCommand">
+                <el-dropdown :disabled="!specialGoodsDatas.length" trigger="click" @command="handleCommand">
                   <span class="icons">
                     <span class="icons-txt">{{ specialGoods }}</span>
                     <el-icon color="#ffffff">
@@ -145,7 +145,7 @@
                   </span>
                   <template #dropdown>
                     <el-dropdown-menu>
-                      <el-dropdown-item v-for="(item,index) in specialGoodsDatas" :key="index" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
+                      <el-dropdown-item v-for="item in specialGoodsDatas" :key="item.specialTypeName" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
                     </el-dropdown-menu>
                   </template>
                 </el-dropdown>
@@ -498,7 +498,8 @@ const airlineFunc = async () => {
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
     const newDatas = _.cloneDeep(listValues);
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
-    const names: any = [...nameDatas];
+    // const names: any = [...nameDatas];
+    const names: any = [...nameDatas, { specialTypeName: "合计" }];
     specialGoods.value = names[0]["specialTypeName"];
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;

+ 33 - 10
src/views/dashboard/indexIn.vue

@@ -106,7 +106,7 @@
                   计划到达
                 </div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">
-                  实际到达
+                  预计到达
                 </div>
                 <div class="dashboard-content-top-center-bottom-content-head-list">
                   机型
@@ -190,7 +190,7 @@
                   </span>
                   <template #dropdown>
                     <el-dropdown-menu>
-                      <el-dropdown-item v-for="(item,index) in specialGoodsDatas" :key="index" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
+                      <el-dropdown-item v-for="item in specialGoodsDatas" :key="item.specialTypeName" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
                     </el-dropdown-menu>
                   </template>
                 </el-dropdown>
@@ -203,16 +203,32 @@
           <div class="dashboard-content-top-right-item">
             <div class="dashboard-content-top-right-item-top">
               <div class="dashboard-content-top-right-item-top-title">
-                货物重量统计
+                货机货量统计
               </div>
-              <!-- <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker(showTimeMsg.TallyWeight)">
+              <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker(showTimeMsg.TallyWeight)">
                 <el-icon color="#ffffff" size="18">
                   <Calendar />
                 </el-icon>
                 <el-icon color="#ffffff">
                   <CaretBottom />
                 </el-icon>
-              </div> -->
+              </div>
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleWeightType">
+                  <span class="icons">
+                    <span class="icons-txt">{{ weightType }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </span>
+                  <template #dropdown>
+                    <el-dropdown-menu>
+                      <el-dropdown-item command="进港">进港</el-dropdown-item>
+                      <el-dropdown-item command="出港">出港</el-dropdown-item>
+                    </el-dropdown-menu>
+                  </template>
+                </el-dropdown>
+              </div>
             </div>
             <div v-loading="loading8" element-loading-text="数据加载中..." element-loading-svg-view-box="-10, -10, 50, 50" element-loading-background="rgba(0,0,0, 0.3)" class="dashboard-content-top-left-item-bottom">
               <Echarts id="ww45" :option="tallyObj" />
@@ -274,10 +290,11 @@ const airlineObj = ref<any>({});
 const tallyObj = ref<any>({});
 const flightNums = ref<number>(0);
 const stockNums = ref<number>(0);
+const weightNums = ref<number | string>(0);
 const specialGoods = ref<string>("分类");
 const specialGoodsDatas = ref<any>([]);
 const specialGoodsAll = ref<any>([]);
-const weightNums = ref<number | string>(0);
+const weightType = ref("进港")
 const form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
   endDate: parseTime(Date.now(), "{y}-{m}-{d}"),
@@ -358,8 +375,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) {
@@ -469,6 +486,7 @@ const airlineTrafficFunc = async () => {
       listValues.forEach((item) => {
         item.jobTime = item["IACACode"];
       });
+
     airlineTrafficObj.value = pubFunc(listValues, newObj, true);
   }
   loading6.value = false;
@@ -509,7 +527,8 @@ const airlineFunc = async () => {
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
     const newDatas = _.cloneDeep(listValues);
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
-    const names: any = [...nameDatas];
+    // const names: any = [...nameDatas];
+    const names: any = [...nameDatas, { specialTypeName: "合计" }];
     specialGoods.value = names[0]["specialTypeName"];
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
@@ -529,7 +548,7 @@ const tallyWeightFunc = async () => {
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
-      fttp: "国际进港",
+      fttp: `国际${weightType.value}`,
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
@@ -545,6 +564,10 @@ const tallyWeightFunc = async () => {
   }
   loading8.value = false;
 };
+const handleWeightType = (type: string) => {
+  weightType.value = type;
+  tallyWeightFunc();
+}
 
 onMounted(() => {
   hourlyPeakFunc();

+ 10 - 9
src/views/dashboard/indexOut.vue

@@ -178,7 +178,7 @@
                 </el-icon>
               </div>
               <div class="dashboard-content-top-right-item-top-time">
-                <el-dropdown trigger="click" @command="handleCommand">
+                <el-dropdown :disabled="!specialGoodsDatas.length" trigger="click" @command="handleCommand">
                   <span class="icons">
                     <span class="icons-txt">{{ specialGoods }}</span>
                     <el-icon color="#ffffff">
@@ -187,7 +187,7 @@
                   </span>
                   <template #dropdown>
                     <el-dropdown-menu>
-                      <el-dropdown-item v-for="(item,index) in specialGoodsDatas" :key="index" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
+                      <el-dropdown-item v-for="item in specialGoodsDatas" :key="item.specialTypeName" :command="item.specialTypeName">{{ item.specialTypeName }}</el-dropdown-item>
                     </el-dropdown-menu>
                   </template>
                 </el-dropdown>
@@ -368,6 +368,12 @@ const pubFunc = (listValues, target, type?) => {
   return newObj;
 };
 
+const parseDate = (date: string) => {
+  const dates = date.split("-");
+  const newDate = dates.shift();
+  return dates.join("-");
+};
+
 // 特货分类统计-选取下拉数据
 const handleCommand = (command: string) => {
   specialGoods.value = command;
@@ -499,7 +505,8 @@ const airlineFunc = async () => {
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
     const newDatas = _.cloneDeep(listValues);
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
-    const names: any = [...nameDatas];
+    // const names: any = [...nameDatas];
+    const names: any = [...nameDatas, { specialTypeName: "合计" }];
     specialGoods.value = names[0]["specialTypeName"];
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
@@ -532,12 +539,6 @@ const pickingFuncs = async () => {
   loading8.value = false;
 };
 
-const parseDate = (date: string) => {
-  const dates = date.split("-");
-  const newDate = dates.shift();
-  return dates.join("-");
-};
-
 onMounted(() => {
   hourlyPeakFunc();
   waybillTrendFunc();

+ 1 - 1
src/views/dataQuery/components/DataQueryView/index.vue

@@ -56,7 +56,7 @@
               <el-option value="out" label="出港航班" />
             </el-select>
           </el-form-item>
-          <el-form-item v-if="false" prop="planeType" style="width: 108px">
+          <el-form-item prop="planeType" style="width: 108px">
             <el-select
               v-model="formData.planeType"
               size="default"

+ 1 - 1
src/views/dataQuery/components/DataQueryView/useTable.ts

@@ -1,6 +1,6 @@
 import { Query } from '@/api/webApi'
 import { Ref } from 'vue'
-import { CommonData, CommonTableColumn, CommonValue, MaybeRef } from '~/common'
+import { CommonData, CommonTableColumn, CommonValue } from '~/common'
 
 const idGetter = (name: string) => DATACONTENT_ID[name + 'DataQuery']
 

+ 2 - 2
src/views/realTime/components/AirportView/AirportForm.vue

@@ -52,7 +52,7 @@
         />
       </el-select>
     </el-form-item> -->
-    <el-form-item
+    <!-- <el-form-item
       v-if="name.includes('International')"
       :prop="formData.waybillType"
       style="width: 104px"
@@ -69,7 +69,7 @@
           :value="option.value"
         />
       </el-select>
-    </el-form-item>
+    </el-form-item> -->
   </el-form>
 </template>
 

+ 34 - 14
src/views/realTime/components/AirportView/useAirportTable.ts

@@ -38,7 +38,13 @@ const columnGroupsMap: {
         },
         {
           columnName: 'planDepartureTime',
-          columnLabel: '起飞时间',
+          columnLabel: '预计起飞\n时间',
+          width: 73,
+          fixed: true,
+        },
+        {
+          columnName: 'acDepartureTime',
+          columnLabel: '实际起飞\n时间',
           width: 73,
           fixed: true,
         },
@@ -66,11 +72,11 @@ const columnGroupsMap: {
           fixed: true,
           defaultHidden: true,
         },
-        {
-          columnName: 'acLandingTime',
-          columnLabel: '实际降落\n时间',
-          width: 73,
-        },
+        // {
+        //   columnName: 'acLandingTime',
+        //   columnLabel: '实际降落\n时间',
+        //   width: 73,
+        // },
         {
           columnName: 'jiahuo',
           columnLabel: '一个码标记',
@@ -262,7 +268,11 @@ const columnGroupsMap: {
         },
         {
           columnName: 'planLandingTime',
-          columnLabel: '降落时间',
+          columnLabel: '计划降落\n时间',
+        },
+        {
+          columnName: 'acLandingTime',
+          columnLabel: '实际降落\n时间',
         },
         {
           columnName: 'target',
@@ -381,7 +391,13 @@ const columnGroupsMap: {
         },
         {
           columnName: 'planDepartureTime',
-          columnLabel: '起飞时间',
+          columnLabel: '预计起飞\n时间',
+          width: 73,
+          fixed: true,
+        },
+        {
+          columnName: 'acDepartureTime',
+          columnLabel: '实际起飞\n时间',
           width: 73,
           fixed: true,
         },
@@ -408,11 +424,11 @@ const columnGroupsMap: {
           columnLabel: '前序航班',
           fixed: true,
         },
-        {
-          columnName: 'acLandingTime',
-          columnLabel: '实际降落\n时间',
-          width: 73,
-        },
+        // {
+        //   columnName: 'acLandingTime',
+        //   columnLabel: '实际降落\n时间',
+        //   width: 73,
+        // },
         {
           columnName: 'speCargoInfo',
           columnLabel: '特货信息',
@@ -640,7 +656,11 @@ const columnGroupsMap: {
         },
         {
           columnName: 'planLandingTime',
-          columnLabel: '降落时间',
+          columnLabel: '计划降落\n时间',
+        },
+        {
+          columnName: 'acLandingTime',
+          columnLabel: '实际降落\n时间',
         },
         {
           columnName: 'target',

+ 2 - 2
src/views/realTime/components/FlightView/index.vue

@@ -25,7 +25,7 @@
           </template>
         </div>
       </div>
-      <div class="container-list">
+      <div v-if="name.includes('Departure')" class="container-list">
         <SimpleTable
           :data="containerTableData"
           :columns="containerTableColumns"
@@ -84,7 +84,7 @@ import Search from '@/components/search/index.vue'
 import { CaretRight, Download, Refresh } from '@element-plus/icons-vue'
 import ContainerWaybillDialog from './ContainerWaybillDialog.vue'
 import SimpleTable from '@/components/SimpleTable/index.vue'
-import CommonSwitch from '../../components/CommonSwitch/index.vue'
+// import CommonSwitch from '../../components/CommonSwitch/index.vue'
 import ColumnSet from '@/components/ColumnSet/index.vue'
 import { useTable } from '../../hooks/useTable'
 import { useTableColumnSet } from '@/hooks/useTableColumnSet'

+ 4 - 4
src/views/realTime/components/FlightView/useFlightInfo.ts

@@ -6,7 +6,7 @@ const flightInfoItemsMap = {
   departure: [
     [
       {
-        label: '起飞机场简称',
+        label: '始发站',
         key: 'departureAirportZh',
       },
       {
@@ -63,7 +63,7 @@ const flightInfoItemsMap = {
     ],
     [
       {
-        label: '降落机场简称',
+        label: '目的站',
         key: 'landingAirportZh',
       },
       {
@@ -79,7 +79,7 @@ const flightInfoItemsMap = {
   arrival: [
     [
       {
-        label: '起飞机场简称',
+        label: '始发站',
         key: 'departureAirportZh',
       },
       {
@@ -132,7 +132,7 @@ const flightInfoItemsMap = {
     ],
     [
       {
-        label: '降落机场简称',
+        label: '目的站',
         key: 'landingAirportZh',
       },
       {

+ 28 - 26
src/views/realTime/hooks/useTable.ts

@@ -77,6 +77,7 @@ const tableColumnsMap: {
   ],
   DepartureFlightWaybill: [
     { columnLabel: '运单号', columnName: 'stockCode', width: 120 },
+    { columnLabel: '目的地', columnName: 'destination' },
     { columnLabel: '集装器数量', columnName: 'stowageNum' },
     {
       columnLabel: '品名',
@@ -339,20 +340,20 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 70,
     },
-    {
-      columnLabel: '货物编码',
-      columnName: 'cargoSN',
-      needFilters: 1,
-      width: 100,
-    },
+    // {
+    //   columnLabel: '货物编码',
+    //   columnName: 'cargoSN',
+    //   needFilters: 1,
+    //   width: 100,
+    // },
     // { columnLabel: '中转', columnName: 'transMark', needFilters: 1 },
-    { columnLabel: '拉下', columnName: 'pullMark', needFilters: 1, width: 60 },
-    {
-      columnLabel: '退运',
-      columnName: 'returnMark',
-      needFilters: 1,
-      width: 60,
-    },
+    // { columnLabel: '拉下', columnName: 'pullMark', needFilters: 1, width: 60 },
+    // {
+    //   columnLabel: '退运',
+    //   columnName: 'returnMark',
+    //   needFilters: 1,
+    //   width: 60,
+    // },
     {
       columnLabel: '卸机',
       columnName: 'CARGOS_ARR_HANDOVER',
@@ -539,6 +540,7 @@ const tableColumnsMap: {
   ],
   InternationalDepartureFlightWaybill: [
     { columnLabel: '运单号', columnName: 'stockCode', width: 120 },
+    { columnLabel: '目的地', columnName: 'destination' },
     { columnLabel: '分类', columnName: 'type' },
     { columnLabel: '集装器数量', columnName: 'stowageNum' },
     {
@@ -765,24 +767,24 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 70,
     },
-    {
-      columnLabel: '货物编码',
-      columnName: 'cargoSN',
-      needFilters: 1,
-      width: 100,
-    },
+    // {
+    //   columnLabel: '货物编码',
+    //   columnName: 'cargoSN',
+    //   needFilters: 1,
+    //   width: 100,
+    // },
     // { columnLabel: '中转', columnName: 'C2', needFilters: 1 },
-    {
-      columnLabel: '退运',
-      columnName: 'returnMark',
-      needFilters: 1,
-      width: 60,
-    },
+    // {
+    //   columnLabel: '退运',
+    //   columnName: 'returnMark',
+    //   needFilters: 1,
+    //   width: 60,
+    // },
     {
       columnLabel: '海关异常',
       columnName: 'exceptionCustomsMark',
       needFilters: 1,
-      width: 60,
+      width: 100,
     },
     {
       columnLabel: '卸机',