Эх сурвалжийг харах

3.1问题-实时视图和决策驾驶舱修改

zhongxiaoyu 2 жил өмнө
parent
commit
42dc071578

+ 12 - 1
src/components/SimpleTable/index.vue

@@ -49,6 +49,11 @@
           :filter-options="filterOptionMap[column.columnName]"
           :sortable="!!column.needSort"
           filter-style="arrow"
+          @update:sort-rule="
+            sortRule => {
+              sortRuleChangeHandler(column.columnName, sortRule)
+            }
+          "
         />
       </template>
       <template v-if="column.customRender" #default="scope">
@@ -302,6 +307,7 @@ const {
   filterValueMap,
   sortRuleMap,
   dealedTableData,
+  sortChangeHandler,
 } = useTableFilterAndSort(tableColumns, tableData, props.filterSortOptions)
 
 const { saveTableFilterValues } = useTableSettingsStore()
@@ -314,6 +320,11 @@ watch(
   { deep: true }
 )
 
+const sortRuleChangeHandler = (columnName: string, sortRule: string) => {
+  sortRuleMap[columnName] = sortRule
+  sortChangeHandler(columnName, sortRule)
+}
+
 if (props.cacheKeys?.length) {
   watch(filterValueMap, map => {
     const values: { [x: string]: string[] } = {}
@@ -394,7 +405,7 @@ defineExpose({
       padding: 0;
       font-size: 14px;
       color: #101116;
-      font-family:DIN, Microsoft YaHei;
+      font-family: DIN, Microsoft YaHei;
       &:not(.el-tooltip) {
         white-space: pre-line;
       }

+ 2 - 2
src/hooks/useTableFilterAndSort.ts

@@ -95,8 +95,8 @@ export function useTableFilterAndSort(
     return filtered
   })
 
-  const sortChangeHandler = (currentKey: string) => {
-    if (options.sortMode === 'single') {
+  const sortChangeHandler = (currentKey: string, sortRule: string) => {
+    if (options.sortMode === 'single' && sortRule) {
       Object.keys(sortRuleMap).forEach(key => {
         if (currentKey !== key) {
           delete sortRuleMap[key]

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

@@ -63,11 +63,11 @@
         <div class="dashboard-content-top-center">
           <div v-loading="loading4" 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-center-top">
             <div class="dashboard-content-top-center-top-list">
-              <div class="dashboard-content-top-center-top-list-txt">今日计划航班数</div>
+              <div class="dashboard-content-top-center-top-list-txt">今日计划航班数(班)</div>
               <div class="dashboard-content-top-center-top-list-num">{{ flightNums }}</div>
             </div>
             <div class="dashboard-content-top-center-top-list">
-              <div class="dashboard-content-top-center-top-list-txt">已完成航班数</div>
+              <div class="dashboard-content-top-center-top-list-txt">已完成航班数(班)</div>
               <div class="dashboard-content-top-center-top-list-num">{{ stockNums }}</div>
             </div>
             <div class="dashboard-content-top-center-top-list">
@@ -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>
@@ -485,11 +485,13 @@ const airlineFunc = async () => {
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
     // const names: any = [...nameDatas];
     const names: any = [...nameDatas, { specialTypeName: "合计" }];
-    specialGoods.value = names[0]["specialTypeName"];
+    // specialGoods.value = names[0]["specialTypeName"];
+    specialGoods.value = "合计";
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
     const result = formatGoods(
-      names[0]["specialTypeName"],
+      // names[0]["specialTypeName"],
+      "合计",
       specialGoodsAll.value
     );
     airlineObj.value = pubFunc(result, newObj);

+ 7 - 5
src/views/dashboard/indexHomeOut.vue

@@ -63,11 +63,11 @@
         <div class="dashboard-content-top-center">
           <div v-loading="loading4" 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-center-top">
             <div class="dashboard-content-top-center-top-list">
-              <div class="dashboard-content-top-center-top-list-txt">今日计划航班数</div>
+              <div class="dashboard-content-top-center-top-list-txt">今日计划航班数(班)</div>
               <div class="dashboard-content-top-center-top-list-num">{{ flightNums }}</div>
             </div>
             <div class="dashboard-content-top-center-top-list">
-              <div class="dashboard-content-top-center-top-list-txt">已完成航班数</div>
+              <div class="dashboard-content-top-center-top-list-txt">已完成航班数(班)</div>
               <div class="dashboard-content-top-center-top-list-num">{{ stockNums }}</div>
             </div>
             <div class="dashboard-content-top-center-top-list">
@@ -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>
@@ -500,11 +500,13 @@ const airlineFunc = async () => {
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
     // const names: any = [...nameDatas];
     const names: any = [...nameDatas, { specialTypeName: "合计" }];
-    specialGoods.value = names[0]["specialTypeName"];
+    // specialGoods.value = names[0]["specialTypeName"];
+    specialGoods.value = "合计";
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
     const result = formatGoods(
-      names[0]["specialTypeName"],
+      // names[0]["specialTypeName"],
+      "合计",
       specialGoodsAll.value
     );
     airlineObj.value = pubFunc(result, newObj);

+ 7 - 5
src/views/dashboard/indexIn.vue

@@ -64,7 +64,7 @@
           <div v-loading="loading4" 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-center-top">
             <div class="dashboard-content-top-center-top-list">
               <div class="dashboard-content-top-center-top-list-txt">
-                今日计划航班数
+                今日计划航班数(班)
               </div>
               <div class="dashboard-content-top-center-top-list-num">
                 {{ flightNums }}
@@ -72,7 +72,7 @@
             </div>
             <div class="dashboard-content-top-center-top-list">
               <div class="dashboard-content-top-center-top-list-txt">
-                已完成航班数
+                已完成航班数(班)
               </div>
               <div class="dashboard-content-top-center-top-list-num">
                 {{ stockNums }}
@@ -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">
                   机型
@@ -529,11 +529,13 @@ const airlineFunc = async () => {
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
     // const names: any = [...nameDatas];
     const names: any = [...nameDatas, { specialTypeName: "合计" }];
-    specialGoods.value = names[0]["specialTypeName"];
+    // specialGoods.value = names[0]["specialTypeName"];
+    specialGoods.value = "合计";
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
     const result = formatGoods(
-      names[0]["specialTypeName"],
+      // names[0]["specialTypeName"],
+      "合计",
       specialGoodsAll.value
     );
     airlineObj.value = pubFunc(result, newObj);

+ 7 - 5
src/views/dashboard/indexOut.vue

@@ -64,7 +64,7 @@
           <div v-loading="loading4" 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-center-top">
             <div class="dashboard-content-top-center-top-list">
               <div class="dashboard-content-top-center-top-list-txt">
-                今日计划航班数
+                今日计划航班数(班)
               </div>
               <div class="dashboard-content-top-center-top-list-num">
                 {{ flightNums }}
@@ -72,7 +72,7 @@
             </div>
             <div class="dashboard-content-top-center-top-list">
               <div class="dashboard-content-top-center-top-list-txt">
-                已完成航班数
+                已完成航班数(班)
               </div>
               <div class="dashboard-content-top-center-top-list-num">
                 {{ stockNums }}
@@ -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">
                   机型
@@ -507,11 +507,13 @@ const airlineFunc = async () => {
     const nameDatas = _.unionBy(newDatas, "specialTypeName");
     // const names: any = [...nameDatas];
     const names: any = [...nameDatas, { specialTypeName: "合计" }];
-    specialGoods.value = names[0]["specialTypeName"];
+    // specialGoods.value = names[0]["specialTypeName"];
+    specialGoods.value = "合计";
     specialGoodsDatas.value = names;
     specialGoodsAll.value = listValues;
     const result = formatGoods(
-      names[0]["specialTypeName"],
+      // names[0]["specialTypeName"],
+      "合计",
       specialGoodsAll.value
     );
     airlineObj.value = pubFunc(result, newObj);

+ 8 - 4
src/views/realTime/components/AirportView/index.scss

@@ -67,16 +67,20 @@
             height: 50px;
             flex-direction: column;
             &.cell-warning {
-              background-color: #f6cda5 !important;
+              // background-color: #f6cda5 !important;
+              background-color: #fcffcd !important;
             }
             &.cell-alarm {
-              background-color: #f38080 !important;
+              // background-color: #f38080 !important;
+              background-color: #f8e6e6 !important;
             }
             &.cell-success {
-              background-color: #46af43 !important;
+              // background-color: #46af43 !important;
+              background-color: #dfe5df !important;
             }
             &.cell-striking {
-              background-color: #d89834 !important;
+              // background-color: #d89834 !important;
+              background-color: #f6eee1 !important;
             }
             &.cell-click .el-table__cell-text {
               color: #2d67e3;

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

@@ -5,12 +5,12 @@
       <div class="airport-count">
         <CountBox
           :count-number="airportCount.flightNum"
-          label="今日计划航班数"
+          label="今日计划航班数(班)"
           :length="3"
         />
         <CountBox
           :count-number="airportCount.finishFlightNum"
-          label="已完成航班数"
+          label="已完成航班数(班)"
           :length="3"
         />
         <CountBox

+ 2 - 6
src/views/realTime/components/AirportView/useAirportTable.ts

@@ -33,19 +33,16 @@ const columnGroupsMap: {
         {
           columnName: 'flightDate',
           columnLabel: '执飞日期',
-          width: 73,
           fixed: true,
         },
         {
           columnName: 'planDepartureTime',
           columnLabel: '计划起飞\n时间',
-          width: 73,
           fixed: true,
         },
         {
           columnName: 'acDepartureTime',
           columnLabel: '实际起飞\n时间',
-          width: 73,
           fixed: true,
         },
         {
@@ -86,6 +83,8 @@ const columnGroupsMap: {
         {
           columnName: 'jiahuo',
           columnLabel: '一个码标记',
+          needCount: 1,
+          countMode: 'notNull'
         },
       ],
     },
@@ -397,19 +396,16 @@ const columnGroupsMap: {
         {
           columnName: 'flightDate',
           columnLabel: '执飞日期',
-          width: 73,
           fixed: true,
         },
         {
           columnName: 'planDepartureTime',
           columnLabel: '计划起飞\n时间',
-          width: 73,
           fixed: true,
         },
         {
           columnName: 'acDepartureTime',
           columnLabel: '实际起飞\n时间',
-          width: 73,
           fixed: true,
         },
         {

+ 4 - 2
src/views/realTime/components/AirportView/useFormatter.ts

@@ -13,6 +13,9 @@ export function useFormatter(flag: Ref<boolean>) {
     cellValue,
     index
   ) => {
+    if (property === 'flightDate' && typeof cellValue === 'string') {
+      return cellValue.trim().slice(5)
+    }
     if (!unref(flag)) {
       const matched = label.match(/(?<=\()\S+(?=\))/)
       if (matched) {
@@ -53,9 +56,8 @@ export function useFormatter(flag: Ref<boolean>) {
       return datetimeToTime(cellValue, row.flightDate)
     }
     if (property === 'jiahuo') {
-      return cellValue ? '是' : ''
+      return cellValue ? '是' : ''
     }
-
     return String(cellValue ?? '')
   }
 

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

@@ -71,7 +71,7 @@ const tableColumnsMap = {
     { columnLabel: '拉下件数', columnName: 'pullNum', needCount: 1 },
     { columnLabel: '退运件数', columnName: 'returnNum', needCount: 1 },
     { columnLabel: '最新节点', columnName: 'nodeCode' },
-    { columnLabel: '最新位置', columnName: 'execPosition' },
+    // { columnLabel: '最新位置', columnName: 'execPosition' },
     { columnLabel: '处理结果', columnName: 'execResult' },
     { columnLabel: '处理时间', columnName: 'execTime', width: 130 },
   ],
@@ -100,7 +100,7 @@ const tableColumnsMap = {
       needCount: 1,
     },
     { columnLabel: '最新节点', columnName: 'nodeCode' },
-    { columnLabel: '最新位置', columnName: 'execPosition' },
+    // { columnLabel: '最新位置', columnName: 'execPosition' },
     { columnLabel: '处理结果', columnName: 'execResult' },
     { columnLabel: '处理时间', columnName: 'execTime', width: 130 },
   ],

+ 16 - 14
src/views/realTime/hooks/useTable.ts

@@ -29,11 +29,7 @@ const tableColumnsMap: {
     { columnLabel: '配载运单', columnName: 'list' },
     { columnLabel: '件数', columnName: 'number', needCount: 1 },
     { columnLabel: '重量', columnName: 'weight', needCount: 1 },
-    {
-      columnLabel: '拉下',
-      columnName: 'pull',
-      className: 'cell-filter cell-filter-yellow',
-    },
+
     {
       columnLabel: '加货',
       columnName: 'tally',
@@ -74,6 +70,11 @@ const tableColumnsMap: {
       columnName: 'pullSure',
       className: 'cell-filter cell-filter-yellow',
     },
+    {
+      columnLabel: '拉下',
+      columnName: 'pull',
+      className: 'cell-filter cell-filter-yellow',
+    },
   ],
   DepartureFlightWaybill: [
     { columnLabel: '运单号', columnName: 'stockCode', width: 120 },
@@ -92,8 +93,6 @@ const tableColumnsMap: {
     },
     { columnLabel: '运单件数', columnName: 'luggageCount', needCount: 1 },
     { columnLabel: '运单重量', columnName: 'weight', needCount: 1 },
-    { columnLabel: '拉下件数', columnName: 'pullNum', needCount: 1 },
-    { columnLabel: '退运件数', columnName: 'returnNum', needCount: 1 },
     { columnLabel: '最新节点', columnName: 'nodeCode' },
     // { columnLabel: '最新位置', columnName: 'execPosition' },
     { columnLabel: '处理结果', columnName: 'execResult' },
@@ -105,6 +104,8 @@ const tableColumnsMap: {
     //   width: 130,
     // },
     // { columnLabel: '装载序号', columnName: 'queueNo' },
+    { columnLabel: '拉下件数', columnName: 'pullNum', needCount: 1 },
+    { columnLabel: '退运件数', columnName: 'returnNum', needCount: 1 },
   ],
   DepartureWaybillGoods: [
     {
@@ -491,11 +492,7 @@ const tableColumnsMap: {
     { columnLabel: '配载运单', columnName: 'list' },
     { columnLabel: '件数', columnName: 'number', needCount: 1 },
     { columnLabel: '重量', columnName: 'weight', needCount: 1 },
-    {
-      columnLabel: '拉下',
-      columnName: 'pull',
-      className: 'cell-filter cell-filter-yellow',
-    },
+
     {
       columnLabel: '理货',
       columnName: 'tally',
@@ -532,6 +529,11 @@ const tableColumnsMap: {
       columnName: 'stowage',
       className: 'cell-filter cell-filter-yellow',
     },
+    {
+      columnLabel: '拉下',
+      columnName: 'pull',
+      className: 'cell-filter cell-filter-yellow',
+    },
     // {
     //   columnLabel: '拉回确认',
     //   columnName: 'pullSure',
@@ -556,8 +558,6 @@ const tableColumnsMap: {
     },
     { columnLabel: '运单件数', columnName: 'luggageCount', needCount: 1 },
     { columnLabel: '运单重量', columnName: 'weight', needCount: 1 },
-    { columnLabel: '拉下件数', columnName: 'pullNum', needCount: 1 },
-    { columnLabel: '退运件数', columnName: 'returnNum', needCount: 1 },
     { columnLabel: '最新节点', columnName: 'nodeCode' },
     // { columnLabel: '最新位置', columnName: 'execPosition' },
     { columnLabel: '处理结果', columnName: 'execResult' },
@@ -569,6 +569,8 @@ const tableColumnsMap: {
     //   width: 130,
     // },
     // { columnLabel: '装载序号', columnName: 'queueNo' },
+    { columnLabel: '拉下件数', columnName: 'pullNum', needCount: 1 },
+    { columnLabel: '退运件数', columnName: 'returnNum', needCount: 1 },
   ],
   InternationalDepartureWaybillGoods: [
     {