Browse Source

修改驾驶舱

zhaoke 2 years ago
parent
commit
b0ff4972b7

+ 3 - 0
public/config.js

@@ -54,6 +54,9 @@ var DATACONTENT_ID = {
   jscGgPullId: 1803609, //驾驶舱-国内离港-拉货统计分析-id
   jscGjPullId: 1803610, //驾驶舱-国际离港-拉货统计分析-id
 
+  jscTallyId: 1803621, //驾驶舱-国内离港-拉货统计分析-id
+  jscGoodsId: 1803622, //驾驶舱-国际离港-拉货统计分析-id
+
   /***-----权限管理------***/
   authTreeId: 40, //权限管理-权限树
   authTreeNewId: 92, //权限管理-权限树

+ 8 - 0
src/views/dashboard/css/index.scss

@@ -101,6 +101,14 @@
             // margin-top: 10px;
           }
         }
+        .icons {
+          &-txt {
+            font-size: 14px;
+            font-family: Microsoft YaHei;
+            font-weight: 400;
+            color: #ffffff;
+          }
+        }
       }
       &-center {
         width: 40%;

+ 20 - 7
src/views/dashboard/hooks/usePublic.ts

@@ -9,6 +9,7 @@ export enum showTimeMsg {
   AirlineTraffic, //航司统计
   AirlineAbnormal, //航班统计
   PickingStatistics, //拉货统计
+  TallyWeight, //理货重量
 }
 
 export function usePublic() {
@@ -335,15 +336,12 @@ export function usePublic() {
         // },
         tooltip: {
           trigger: 'axis',
-          valueFormatter: function (value) {
-            return value + '单'
-          },
         },
-        color: ['#51DEE9', '#4C88E1'],
+        color: ['#4C88E1'],
         grid: {
           bottom: '10%',
-          left: '5%',
-          right: '1%',
+          left: '13%',
+          right: '8%',
           top: '17%',
         },
         xAxis: {
@@ -372,12 +370,13 @@ export function usePublic() {
               color: 'rgba(196,194,225, 0.54)',
             },
           },
-          name: '',
+          name: '',
         },
         series: [
           {
             type: 'bar',
             data: [12, 10, 15],
+            barWidth: 10,
           },
         ],
       },
@@ -487,6 +486,19 @@ export function usePublic() {
     const result = newArr.filter((item) => item[dot] && item[dot] != undefined)
     return result
   }
+  const parseDate = (date: string) => {
+    const dates = date.split('-')
+    const newDate = dates.shift()
+    return dates.join('-')
+  }
+  const formatGoods = (name: string, datas: any) => {
+    const res = datas.filter((item) => item['specialTypeName'] == name)
+    res.forEach((item) => {
+      item.jobTime = parseDate(item['flightDate'])
+      item.weight = item['flightNum']
+    })
+    return res
+  }
   return {
     optionLeft,
     airlineAbnormalBaggage,
@@ -495,5 +507,6 @@ export function usePublic() {
     hourPeak,
     getPublicData,
     findData,
+    formatGoods,
   }
 }

+ 86 - 23
src/views/dashboard/index.vue

@@ -126,19 +126,44 @@
           <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.AirlineAbnormal)">
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleCommand">
+                  <span class="icons">
+                    <span class="icons-txt">{{ specialGoods }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </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-menu>
+                  </template>
+                </el-dropdown>
+              </div>
+            </div>
+            <div v-loading="loading7" 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="ww44" :option="airlineObj" />
+            </div>
+          </div>
+          <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)">
                 <el-icon color="#ffffff" size="18">
                   <Calendar />
                 </el-icon>
                 <el-icon color="#ffffff">
                   <CaretBottom />
                 </el-icon>
-              </div>
+              </div> -->
             </div>
-            <div v-loading="loading7" 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="ww44" :option="airlineObj" />
+            <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" />
             </div>
           </div>
         </div>
@@ -172,8 +197,9 @@ const {
   optionLeft,
   airCompaneBaggage,
   airlineAbnormalBaggage,
+  airStutas,
   getPublicData,
-  findData,
+  formatGoods,
 } = usePublic();
 const timePickerName = ref<number>(0);
 const limitScrollNum = ref<number>(13);
@@ -186,14 +212,19 @@ const loading4 = ref<boolean>(false);
 const loading5 = ref<boolean>(false);
 const loading6 = ref<boolean>(false);
 const loading7 = ref<boolean>(false);
+const loading8 = ref<boolean>(false);
 const hourlyPeakObj = ref<any>({});
 const waybillTrendObj = ref<any>({});
 const nodePeakObj = ref<any>({});
 const airlineTrafficObj = ref<any>({});
 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 form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
   endDate: parseTime(Date.now(), "{y}-{m}-{d}"),
@@ -235,6 +266,9 @@ const submitForm = () => {
     case showTimeMsg.AirlineAbnormal:
       airlineFunc();
       break;
+    case showTimeMsg.TallyWeight:
+      tallyWeightFunc();
+      break;
     default:
       break;
   }
@@ -288,6 +322,14 @@ const parseDate = (date: string) => {
   return dates.join("-");
 };
 
+// 特货分类统计-选取下拉数据
+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);
+};
+
 //获取小时峰值分布
 const hourlyPeakFunc = async () => {
   loading1.value = true;
@@ -401,34 +443,54 @@ const airlineAbnormalFunc = async () => {
 //航班动态统计
 const airlineFunc = async () => {
   loading7.value = true;
-  const listValues = (await getPublicData(DATACONTENT_ID.jscCgAirlineId, [
+  const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
+      fttp: "国内进港",
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
-    const res = findData(nodeCode.arrival, listValues, "nodeCode", "flightNum");
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
-    (newObj.dataZoom = [
-      {
-        id: "dataZoomX",
-        type: "slider",
-        xAxisIndex: [0],
-        filterMode: "filter",
-        start: 0,
-        end: 40,
-      },
-    ]),
-      res.forEach((item) => {
-        item.jobTime = item["name"] ?? item["nodeCode"];
-        item.weight = item["flightNum"];
-      });
-    airlineObj.value = pubFunc(res, newObj);
+    const newDatas = _.cloneDeep(listValues);
+    const nameDatas = _.unionBy(newDatas, "specialTypeName");
+    const names: any = [...nameDatas];
+    specialGoods.value = names[0]["specialTypeName"];
+    specialGoodsDatas.value = names;
+    specialGoodsAll.value = listValues;
+    const result = formatGoods(
+      names[0]["specialTypeName"],
+      specialGoodsAll.value
+    );
+    airlineObj.value = pubFunc(result, newObj);
   }
   loading7.value = false;
 };
 
+//理货重量
+const tallyWeightFunc = async () => {
+  loading8.value = true;
+  const listValues = (await getPublicData(DATACONTENT_ID.jscTallyId, [
+    {
+      fd1: form.value.startDate,
+      fd2: form.value.endDate,
+      fttp: "国内进港",
+    },
+  ])) as any;
+  if (listValues && isValue(listValues)) {
+    const newObj: any = _.cloneDeep(airStutas.option.baseOption);
+    const [datas, weights] = [<any>[], <any>[]];
+    listValues.forEach((item) => {
+      datas.push(item.flightDate);
+      weights.push(item.weight);
+    });
+    newObj.xAxis.data = datas;
+    newObj.series[0].data = weights;
+    tallyObj.value = newObj;
+  }
+  loading8.value = false;
+};
+
 onMounted(() => {
   hourlyPeakFunc();
   waybillTrendFunc();
@@ -437,6 +499,7 @@ onMounted(() => {
   airlineTrafficFunc();
   airlineAbnormalFunc();
   airlineFunc();
+  tallyWeightFunc();
 });
 </script>
 

+ 76 - 31
src/views/dashboard/indexHomeOut.vue

@@ -125,15 +125,22 @@
           <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.AirlineAbnormal)">
-                <el-icon color="#ffffff" size="18">
-                  <Calendar />
-                </el-icon>
-                <el-icon color="#ffffff">
-                  <CaretBottom />
-                </el-icon>
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleCommand">
+                  <span class="icons">
+                    <span class="icons-txt">{{ specialGoods }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </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-menu>
+                  </template>
+                </el-dropdown>
               </div>
             </div>
             <div v-loading="loading7" 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">
@@ -190,7 +197,7 @@ const {
   airCompaneBaggage,
   airlineAbnormalBaggage,
   getPublicData,
-  findData,
+  formatGoods,
 } = usePublic();
 const timePickerName = ref<number>(0);
 const limitScrollNum = ref<number>(13);
@@ -212,6 +219,9 @@ const airlineObj = ref<any>({});
 const pickingObj = ref<any>({});
 const flightNums = ref<number>(0);
 const stockNums = ref<number>(0);
+const specialGoods = ref<string>("");
+const specialGoodsDatas = ref<any>([]);
+const specialGoodsAll = ref<any>([]);
 const weightNums = ref<number | string>(0);
 const form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
@@ -310,6 +320,14 @@ const parseDate = (date: string) => {
   return dates.join("-");
 };
 
+// 特货分类统计-选取下拉数据
+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);
+};
+
 //获取小时峰值分布
 const hourlyPeakFunc = async () => {
   loading1.value = true;
@@ -419,37 +437,64 @@ const airlineAbnormalFunc = async () => {
 };
 
 //航班动态统计
+// const airlineFunc = async () => {
+//   loading7.value = true;
+//   const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineId, [
+//     {
+//       fd1: form.value.startDate,
+//       fd2: form.value.endDate,
+//     },
+//   ])) as any;
+//   if (listValues && isValue(listValues)) {
+//     const res = findData(
+//       nodeCode.departure,
+//       listValues,
+//       "nodeCode",
+//       "flightNum"
+//     );
+//     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
+//     (newObj.dataZoom = [
+//       {
+//         id: "dataZoomX",
+//         type: "slider",
+//         xAxisIndex: [0],
+//         filterMode: "filter",
+//         start: 0,
+//         end: 40,
+//       },
+//     ]),
+//       res.forEach((item) => {
+//         item.jobTime = item["name"] ?? item["nodeCode"];
+//         item.weight = item["flightNum"];
+//       });
+//     airlineObj.value = pubFunc(res, newObj);
+//   }
+//   loading7.value = false;
+// };
+
+//特货分类统计
 const airlineFunc = async () => {
   loading7.value = true;
-  const listValues = (await getPublicData(DATACONTENT_ID.jscAirlineId, [
+  const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
+      fttp: "国内离港",
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
-    const res = findData(
-      nodeCode.departure,
-      listValues,
-      "nodeCode",
-      "flightNum"
-    );
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
-    (newObj.dataZoom = [
-      {
-        id: "dataZoomX",
-        type: "slider",
-        xAxisIndex: [0],
-        filterMode: "filter",
-        start: 0,
-        end: 40,
-      },
-    ]),
-      res.forEach((item) => {
-        item.jobTime = item["name"] ?? item["nodeCode"];
-        item.weight = item["flightNum"];
-      });
-    airlineObj.value = pubFunc(res, newObj);
+    const newDatas = _.cloneDeep(listValues);
+    const nameDatas = _.unionBy(newDatas, "specialTypeName");
+    const names: any = [...nameDatas];
+    specialGoods.value = names[0]["specialTypeName"];
+    specialGoodsDatas.value = names;
+    specialGoodsAll.value = listValues;
+    const result = formatGoods(
+      names[0]["specialTypeName"],
+      specialGoodsAll.value
+    );
+    airlineObj.value = pubFunc(result, newObj);
   }
   loading7.value = false;
 };

+ 86 - 28
src/views/dashboard/indexIn.vue

@@ -170,19 +170,44 @@
           <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.AirlineAbnormal)">
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleCommand">
+                  <span class="icons">
+                    <span class="icons-txt">{{ specialGoods }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </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-menu>
+                  </template>
+                </el-dropdown>
+              </div>
+            </div>
+            <div v-loading="loading7" 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="ww44" :option="airlineObj" />
+            </div>
+          </div>
+          <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)">
                 <el-icon color="#ffffff" size="18">
                   <Calendar />
                 </el-icon>
                 <el-icon color="#ffffff">
                   <CaretBottom />
                 </el-icon>
-              </div>
+              </div> -->
             </div>
-            <div v-loading="loading7" 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="ww44" :option="airlineObj" />
+            <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" />
             </div>
           </div>
         </div>
@@ -216,8 +241,9 @@ const {
   optionLeft,
   airCompaneBaggage,
   airlineAbnormalBaggage,
+  airStutas,
   getPublicData,
-  findData,
+  formatGoods,
 } = usePublic();
 const timePickerName = ref<number>(0);
 const limitScrollNum = ref<number>(13);
@@ -230,13 +256,18 @@ const loading4 = ref<boolean>(false);
 const loading5 = ref<boolean>(false);
 const loading6 = ref<boolean>(false);
 const loading7 = ref<boolean>(false);
+const loading8 = ref<boolean>(false);
 const hourlyPeakObj = ref<any>({});
 const waybillTrendObj = ref<any>({});
 const nodePeakObj = ref<any>({});
 const airlineTrafficObj = ref<any>({});
 const airlineObj = ref<any>({});
+const tallyObj = ref<any>({});
 const flightNums = ref<number>(0);
 const stockNums = ref<number>(0);
+const specialGoods = ref<string>("");
+const specialGoodsDatas = ref<any>([]);
+const specialGoodsAll = ref<any>([]);
 const weightNums = ref<number | string>(0);
 const form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
@@ -279,6 +310,9 @@ const submitForm = () => {
     case showTimeMsg.AirlineAbnormal:
       airlineFunc();
       break;
+    case showTimeMsg.TallyWeight:
+      tallyWeightFunc();
+      break;
     default:
       break;
   }
@@ -332,6 +366,14 @@ const parseDate = (date: string) => {
   return dates.join("-");
 };
 
+// 特货分类统计-选取下拉数据
+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);
+};
+
 //获取小时峰值分布
 const hourlyPeakFunc = async () => {
   loading1.value = true;
@@ -444,39 +486,54 @@ const airlineAbnormalFunc = async () => {
 //航班动态统计
 const airlineFunc = async () => {
   loading7.value = true;
-  const listValues = (await getPublicData(DATACONTENT_ID.jscJgAirlineId, [
+  const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
+      fttp: "国际进港",
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
-    const res = findData(
-      nodeCode.internationalArrival,
-      listValues,
-      "nodeCode",
-      "flightNum"
-    );
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
-    (newObj.dataZoom = [
-      {
-        id: "dataZoomX",
-        type: "slider",
-        xAxisIndex: [0],
-        filterMode: "filter",
-        start: 0,
-        end: 40,
-      },
-    ]),
-      res.forEach((item) => {
-        item.jobTime = item["name"] ?? item["nodeCode"];
-        item.weight = item["flightNum"];
-      });
-    airlineObj.value = pubFunc(res, newObj);
+    const newDatas = _.cloneDeep(listValues);
+    const nameDatas = _.unionBy(newDatas, "specialTypeName");
+    const names: any = [...nameDatas];
+    specialGoods.value = names[0]["specialTypeName"];
+    specialGoodsDatas.value = names;
+    specialGoodsAll.value = listValues;
+    const result = formatGoods(
+      names[0]["specialTypeName"],
+      specialGoodsAll.value
+    );
+    airlineObj.value = pubFunc(result, newObj);
   }
   loading7.value = false;
 };
 
+//理货重量
+const tallyWeightFunc = async () => {
+  loading8.value = true;
+  const listValues = (await getPublicData(DATACONTENT_ID.jscTallyId, [
+    {
+      fd1: form.value.startDate,
+      fd2: form.value.endDate,
+      fttp: "国际进港",
+    },
+  ])) as any;
+  if (listValues && isValue(listValues)) {
+    const newObj: any = _.cloneDeep(airStutas.option.baseOption);
+    const [datas, weights] = [<any>[], <any>[]];
+    listValues.forEach((item) => {
+      datas.push(item.flightDate);
+      weights.push(item.weight);
+    });
+    newObj.xAxis.data = datas;
+    newObj.series[0].data = weights;
+    tallyObj.value = newObj;
+  }
+  loading8.value = false;
+};
+
 onMounted(() => {
   hourlyPeakFunc();
   waybillTrendFunc();
@@ -485,6 +542,7 @@ onMounted(() => {
   airlineTrafficFunc();
   airlineAbnormalFunc();
   airlineFunc();
+  tallyWeightFunc();
 });
 </script>
 

+ 40 - 31
src/views/dashboard/indexOut.vue

@@ -167,15 +167,22 @@
           <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.AirlineAbnormal)">
-                <el-icon color="#ffffff" size="18">
-                  <Calendar />
-                </el-icon>
-                <el-icon color="#ffffff">
-                  <CaretBottom />
-                </el-icon>
+              <div class="dashboard-content-top-right-item-top-time">
+                <el-dropdown trigger="click" @command="handleCommand">
+                  <span class="icons">
+                    <span class="icons-txt">{{ specialGoods }}</span>
+                    <el-icon color="#ffffff">
+                      <CaretBottom />
+                    </el-icon>
+                  </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-menu>
+                  </template>
+                </el-dropdown>
               </div>
             </div>
             <div v-loading="loading7" 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">
@@ -232,7 +239,7 @@ const {
   airCompaneBaggage,
   airlineAbnormalBaggage,
   getPublicData,
-  findData,
+  formatGoods,
 } = usePublic();
 const timePickerName = ref<number>(0);
 const limitScrollNum = ref<number>(13);
@@ -254,6 +261,9 @@ const airlineObj = ref<any>({});
 const pickingObj = ref<any>({});
 const flightNums = ref<number>(0);
 const stockNums = ref<number>(0);
+const specialGoods = ref<string>("");
+const specialGoodsDatas = ref<any>([]);
+const specialGoodsAll = ref<any>([]);
 const weightNums = ref<number | string>(0);
 const form = ref({
   startDate: parseTime(Date.now() - 24 * 60 * 60 * 1000 * 7, "{y}-{m}-{d}"),
@@ -346,6 +356,14 @@ const pubFunc = (listValues, target, type?) => {
   return newObj;
 };
 
+// 特货分类统计-选取下拉数据
+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);
+};
+
 //获取小时峰值分布
 const hourlyPeakFunc = async () => {
   loading1.value = true;
@@ -458,35 +476,26 @@ const airlineAbnormalFunc = async () => {
 //航班动态统计
 const airlineFunc = async () => {
   loading7.value = true;
-  const listValues = (await getPublicData(DATACONTENT_ID.jscGjAirlineId, [
+  const listValues = (await getPublicData(DATACONTENT_ID.jscGoodsId, [
     {
       fd1: form.value.startDate,
       fd2: form.value.endDate,
+      fttp: "国际离港",
     },
   ])) as any;
   if (listValues && isValue(listValues)) {
-    const res = findData(
-      nodeCode.internationalDeparture,
-      listValues,
-      "nodeCode",
-      "flightNum"
-    );
     const newObj: any = _.cloneDeep(airlineAbnormalBaggage.option.baseOption);
-    (newObj.dataZoom = [
-      {
-        id: "dataZoomX",
-        type: "slider",
-        xAxisIndex: [0],
-        filterMode: "filter",
-        start: 0,
-        end: 40,
-      },
-    ]),
-      res.forEach((item) => {
-        item.jobTime = item["name"] ?? item["nodeCode"];
-        item.weight = item["flightNum"];
-      });
-    airlineObj.value = pubFunc(res, newObj);
+    const newDatas = _.cloneDeep(listValues);
+    const nameDatas = _.unionBy(newDatas, "specialTypeName");
+    const names: any = [...nameDatas];
+    specialGoods.value = names[0]["specialTypeName"];
+    specialGoodsDatas.value = names;
+    specialGoodsAll.value = listValues;
+    const result = formatGoods(
+      names[0]["specialTypeName"],
+      specialGoodsAll.value
+    );
+    airlineObj.value = pubFunc(result, newObj);
   }
   loading7.value = false;
 };

+ 2 - 2
src/views/login/Login.vue

@@ -9,11 +9,11 @@
         <h3 class="title">{{ title }}</h3>
       </div>
       <el-form-item prop="username" :rules="formRules.isNotNull">
-        <el-input size="large" v-model="formInline.username" placeholder="用户名" />
+        <el-input size="large" autocomplete="on" v-model="formInline.username" placeholder="用户名" />
       </el-form-item>
       <!--<el-form-item prop="password" :rules="formRules.passwordValid">-->
       <el-form-item prop="password" :rules="formRules.isNotNull">
-        <el-input size="large" show-password ref="refPassword" v-model="formInline.password" type="password" name="password" placeholder="密码" />
+        <el-input size="large" show-password ref="refPassword" autocomplete="on" v-model="formInline.password" type="password" name="password" placeholder="密码" />
       </el-form-item>
       <div class="rowSS">
         <el-form-item prop="verificationCode" :rules="formRules.isNotNull">