Bläddra i källkod

添加数据异常统计

zhaoke 1 år sedan
förälder
incheckning
89df6bcd50

+ 9 - 1
public/config.js

@@ -112,7 +112,11 @@ var NEW_DATACONTENT_ID = [
   54025,
   54026,
   54027,
-  54028
+  54028,
+  52221,
+  52222,
+  52223,
+  52224
 ]
 
 var DATACONTENT_ID = {
@@ -431,6 +435,10 @@ var DATACONTENT_ID = {
   modeAgentbased: 51047, //基于代理人
   modeSpecialList: 51049, //特货明细
   modedeliverydetails: 51050, //拉货明细
+  dataGnDeparture: 52221, //数据异常统计-航班统计-国内离港
+  dataGnArrival: 52222, //数据异常统计-航班统计-国内进港
+  dataGjDeparture: 52223, //数据异常统计-航班统计-国际离港
+  dataGjArrival: 52224, //数据异常统计-航班统计-国际进港
 }
 
 var SERVICE_ID = {

+ 90 - 57
src/router/routes/routes-file-seven.ts

@@ -1,80 +1,113 @@
-import Layout from "@/layout";
+import Layout from '@/layout'
 
 const HomeRoutes = {
-  path: "/statisticalanalysis",
+  path: '/statisticalanalysis',
   component: Layout,
-  name: "Statisticalanalysis",
-  redirect: "/statisticalanalysis/loadingweight",
+  name: 'Statisticalanalysis',
+  redirect: '/statisticalanalysis/loadingweight',
   //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
   meta: {
-    title: "统计分析",
-    elSvgIcon: "analyseIcon",
+    title: '统计分析',
+    elSvgIcon: 'analyseIcon',
     breadcrumb: false,
-    roles: ["statistical_analysis_page"],
+    roles: ['statistical_analysis_page'],
   },
   children: [
     {
-      path: "/statisticalanalysis/loadingweight",
-      name: "Loadingweight",
+      path: '/statisticalanalysis/dataException',
+      name: 'DataException',
       meta: {
-        title: "加货重量统计",
+        title: '数据异常统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/loadingweight/index.vue"),
+        import('@/views/statisticalanalysis/dataException/index.vue'),
+      children: [
+        {
+          path: '/statisticalanalysis/dataException/flight',
+          name: 'dataExceptionFlight',
+          meta: {
+            title: '航班统计',
+          },
+          component: () =>
+            import(
+              '@/views/statisticalanalysis/dataException/views/flight.vue'
+            ),
+        },
+        {
+          path: '/statisticalanalysis/dataException/waybill',
+          name: 'dataExceptionWaybill',
+          meta: {
+            title: '运单统计',
+          },
+          component: () =>
+            import(
+              '@/views/statisticalanalysis/dataException/views/waybill.vue'
+            ),
+        },
+      ],
     },
     {
-      path: "/statisticalanalysis/flightvolume",
-      name: "Flightvolume",
+      path: '/statisticalanalysis/loadingweight',
+      name: 'Loadingweight',
       meta: {
-        title: "航班量统计",
+        title: '加货重量统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/flightvolume/index.vue"),
+        import('@/views/statisticalanalysis/loadingweight/index.vue'),
     },
     {
-      path: "/statisticalanalysis/specialGoodsStatistics",
-      name: "SpecialGoodsStatistics",
+      path: '/statisticalanalysis/flightvolume',
+      name: 'Flightvolume',
       meta: {
-        title: "特货统计",
+        title: '航班量统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/specialGoodsStatistics/index.vue"),
+        import('@/views/statisticalanalysis/flightvolume/index.vue'),
     },
     {
-      path: "/statisticalanalysis/cargovolume",
-      name: "Cargovolume",
+      path: '/statisticalanalysis/specialGoodsStatistics',
+      name: 'SpecialGoodsStatistics',
       meta: {
-        title: "货量统计",
+        title: '特货统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/cargovolume/index.vue"),
+        import('@/views/statisticalanalysis/specialGoodsStatistics/index.vue'),
     },
     {
-      path: "/statisticalanalysis/pickingstatistics",
-      name: "Pickingstatistics",
+      path: '/statisticalanalysis/cargovolume',
+      name: 'Cargovolume',
       meta: {
-        title: "拉货统计",
+        title: '货量统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/pickingstatistics/index.vue"),
+        import('@/views/statisticalanalysis/cargovolume/index.vue'),
     },
     {
-      path: "/statisticalanalysis/domesticinbound",
-      name: "Domesticinbound",
+      path: '/statisticalanalysis/pickingstatistics',
+      name: 'Pickingstatistics',
       meta: {
-        title: "国内进港保障时间统计",
+        title: '拉货统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/domesticinbound/index.vue"),
+        import('@/views/statisticalanalysis/pickingstatistics/index.vue'),
     },
     {
-      path: "/statisticalanalysis/domesticdeparture",
-      name: "Domesticdeparture",
+      path: '/statisticalanalysis/domesticinbound',
+      name: 'Domesticinbound',
       meta: {
-        title: "航班统计",
+        title: '国内进港保障时间统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/domesticdeparture/index.vue"),
+        import('@/views/statisticalanalysis/domesticinbound/index.vue'),
+    },
+    {
+      path: '/statisticalanalysis/domesticdeparture',
+      name: 'Domesticdeparture',
+      meta: {
+        title: '航班统计',
+      },
+      component: () =>
+        import('@/views/statisticalanalysis/domesticdeparture/index.vue'),
     },
     // {
     //   path: "/statisticalanalysis/domesticentry",
@@ -104,51 +137,51 @@ const HomeRoutes = {
     //     import("@/views/statisticalanalysis/Internationaladvance/index.vue"),
     // },
     {
-      path: "/statisticalanalysis/cargoflight",
-      name: "Cargoflight",
+      path: '/statisticalanalysis/cargoflight',
+      name: 'Cargoflight',
       meta: {
-        title: "货机航班综合查询",
+        title: '货机航班综合查询',
       },
       component: () =>
-        import("@/views/statisticalanalysis/cargoflight/index.vue"),
+        import('@/views/statisticalanalysis/cargoflight/index.vue'),
     },
     {
-      path: "/statisticalanalysis/cargoperiod",
-      name: "Cargoperiod",
+      path: '/statisticalanalysis/cargoperiod',
+      name: 'Cargoperiod',
       meta: {
-        title: "货机航班时段查询",
+        title: '货机航班时段查询',
       },
       component: () =>
-        import("@/views/statisticalanalysis/cargoperiod/index.vue"),
+        import('@/views/statisticalanalysis/cargoperiod/index.vue'),
     },
     {
-      path: "/statisticalanalysis/specialgoodsdelist",
-      name: "Specialgoodsdelist",
+      path: '/statisticalanalysis/specialgoodsdelist',
+      name: 'Specialgoodsdelist',
       meta: {
-        title: "特货明细统计",
+        title: '特货明细统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/specialgoodsdelist/index.vue"),
+        import('@/views/statisticalanalysis/specialgoodsdelist/index.vue'),
     },
     {
-      path: "/statisticalanalysis/deliverydetails",
-      name: "Deliverydetails",
+      path: '/statisticalanalysis/deliverydetails',
+      name: 'Deliverydetails',
       meta: {
-        title: "拉货明细统计",
+        title: '拉货明细统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/deliverydetails/index.vue"),
+        import('@/views/statisticalanalysis/deliverydetails/index.vue'),
     },
     {
-      path: "/statisticalanalysis/gantryframe",
-      name: "Gantryframe",
+      path: '/statisticalanalysis/gantryframe',
+      name: 'Gantryframe',
       meta: {
-        title: "龙门架统计",
+        title: '龙门架统计',
       },
       component: () =>
-        import("@/views/statisticalanalysis/gantryframe/index.vue"),
+        import('@/views/statisticalanalysis/gantryframe/index.vue'),
     },
   ],
-};
+}
 
-export default [HomeRoutes];
+export default [HomeRoutes]

+ 5 - 2
src/views/BasicsData/airportCompany/index.vue

@@ -35,7 +35,7 @@
               </el-col>
               <el-col>
                 <el-form-item label="上级公司ID" :rules="tableForm.parentID?formRules.isNotNull:''" size="default" prop="parentID">
-                  <el-input :disabled="!tableForm.parentID" v-model="tableForm.parentID" placeholder="请输入上级公司ID" />
+                  <el-input :disabled="tableForm.parentID == 'null'" v-model="tableForm.parentID" placeholder="请输入上级公司ID" />
                 </el-form-item>
               </el-col>
               <el-col>
@@ -172,7 +172,7 @@ const getSelectData = async (id?, name?) => {
   if (code == 0 && returnData.listValues.length) {
     const nomarlObj = _.cloneDeep(returnData.listValues[0]);
     nomarlObj.k = "无";
-    nomarlObj.v = null;
+    nomarlObj.v = "null";
     returnData.listValues.push(nomarlObj);
     tableOptionser.value = returnData.listValues;
     tableOptionCopys.value = _.cloneDeep(returnData.listValues);
@@ -276,6 +276,9 @@ const airportCompanyForm: any = ref(null);
 const submitForm = () => {
   airportCompanyForm.value.validate((valid: any) => {
     if (valid) {
+      if (tableForm.parentID == "null") {
+        tableForm.parentID = null;
+      }
       generalDataReception(tableForm);
     } else {
       return false;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 208 - 1057
src/views/statisticalanalysis/components/echart/tableforms.vue


+ 5 - 0
src/views/statisticalanalysis/dataException/index.vue

@@ -0,0 +1,5 @@
+<template>
+  <div class="data-exception">
+    <router-view />
+  </div>
+</template>

+ 287 - 0
src/views/statisticalanalysis/dataException/views/flight.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="airportInfo">
+    <div class="variable">
+      <StatisticsHeader :title="titleTop" :items="formItems" :data="formData" :eledata="eledata" with-setting :withSetting="false" :withExport="true" :set="set" :action="action" :asShow="asShow" @getFormData="getFormData" @export="tableToExcel" @upset="upset" />
+    </div>
+    <div class="echart">
+      <Echarts :id="dataid" :option="tableData" v-if="picShow == true ? true : false" />
+      <Tableformbrs :tableList="tableList" :action="action" v-if="!picShow" :set="set" />
+    </div>
+  </div>
+</template>
+
+<script>
+import Echarts from "../../components/echart/index.vue";
+import Tableformbrs from "../../components/echart/tableforms.vue";
+import StatisticsHeader from "../../components/echart/statisticsHeader.vue";
+import { export_json_to_excel } from "@/utils/Export2Excel";
+import { Query } from "@/api/webApi";
+import _ from 'lodash'
+export default {
+  name: "ChartsBar",
+  data () {
+    return {
+      asShow: true,
+      optiondata: [],
+      picShow: true, //图片表格切换
+      action: 16,
+      dataid: "collection_ecahrt1",
+      listqueryTemplateID: DATACONTENT_ID.modeFlightvolume,
+      eledata: 1,
+      set: "",
+      isShow: Echarts,
+      tableList: [],
+      tableListcop: [],
+      listname: "",
+      listHeader: [],
+      tableData: {
+        time: [],
+        data1: [],
+        data2: [],
+        kg: "",
+        tyol: "",
+      },
+      formData: {
+        flighttype: "",
+        dateTime: "",
+      },
+      titleTop: "航班统计",
+      levelList: [
+        {
+          name: "加货重量统计",
+        },
+        {
+          name: "航班量统计",
+        },
+        {
+          name: "特货统计",
+        },
+        {
+          name: "货量统计",
+        },
+        {
+          name: "拉货统计",
+        },
+        {
+          name: "国内进港保障时间统计",
+        },
+      ],
+      formItems: [
+        {
+          prop: "fttp",
+          inputType: "select",
+          placeholder: "国内国际",
+          requiredWarning: "请先选择国内国际",
+          clearable: true,
+          options: [
+            {
+              value: "52221",
+              label: "国内出港",
+            },
+            {
+              value: "52223",
+              label: "国际出港",
+            },
+            {
+              value: "52222",
+              label: "国内进港",
+            },
+            {
+              value: "52224",
+              label: "国际进港",
+            },
+          ],
+        },
+        {
+          prop: "flighttype",
+          inputType: "select",
+          placeholder: "客货类型",
+          requiredWarning: "请先选择客货类型",
+          clearable: true,
+          options: [
+            {
+              value: "客机",
+              label: "客机",
+            },
+            {
+              value: "货机",
+              label: "货机",
+            },
+            {
+              value: "全部",
+              label: "全部",
+            },
+          ],
+        },
+        {
+          prop: "dateTime",
+          inputType: "datePicker",
+          requiredWarning: "请先选择日期",
+          clearable: true,
+          width: "240px",
+          options: [],
+        },
+      ],
+    };
+  },
+  mounted () {
+    // this.getQuery([]);
+  },
+  watch: {
+    // 监听数据变化,重绘折线图
+    option: {
+      deep: true,
+      handler (newVal) { },
+    },
+  },
+  destroyed () { },
+  methods: {
+    getFormData (data) {
+      this.tableData.time = [];
+      this.tableData.data1 = [];
+      this.tableData.data2 = [];
+      let option = [
+        {
+          flighttype: data.flighttype,
+          fd1: data.dateTime[0],
+          fd2: data.dateTime[1]
+        },
+      ];
+      this.getQuery(data.fttp, option, null);
+      this.listname =
+        "航班统计" +
+        data.flighttype +
+        data.fd;
+      this.listHeader = ["序号", "时间", "航班(班)", "环比(%)"];
+    },
+    //获取表格数据
+    async getQuery (id, data, dat) {
+      try {
+        const { code, returnData } = await Query({
+          id: Number(id),
+          dataContent: data,
+        });
+        if (code == 0) {
+          this.tableData.time = [];
+          this.tableData.data1 = [];
+          this.tableData.data2 = [];
+          this.tableList = _.cloneDeep(returnData);
+          this.tableListcop = _.cloneDeep(returnData);
+          // returnData.listValues.forEach((element) => {
+          //   this.tableData.data2.push(
+          //     element.flightNum ? element.flightNum : 0
+          //   );
+          //   this.tableData.time.push(element.dat);
+          //   this.tableData.kg = "单位:班";
+          //   this.tableData.data1 = [];
+          // });
+          // this.tableData.data1.push(0);
+          // for (let index = 0; index < this.tableData.data2.length; index++) {
+          //   if (index > 0) {
+          //     const element =
+          //       (this.tableData.data2[index] -
+          //         this.tableData.data2[index - 1]) /
+          //       this.tableData.data2[index - 1];
+          //     this.tableData.data1.push(
+          //       element.toFixed(2) ? element.toFixed(2) : 0
+          //     );
+          //     this.tableData.data1.forEach((element) => {
+          //       element = Number(element);
+          //       if (typeof element !== "number") {
+          //         element = 0;
+          //       }
+          //     });
+          //   }
+          // }
+        } else {
+          console.log(code)
+        }
+      } catch (error) {
+        this.page--;
+      }
+    },
+    //导出
+    tableToExcel () {
+      import("@/utils/Export2Excel").then((excel) => {
+        // 设置导出表格的头部
+        const tHeader = this.listHeader;
+        // 将要导出的数据进行一个过滤
+        /**
+         * 源数据导入到excel的数据每一条重新拼成一个数组,数组里的每个元素就是filterVal里的每个字段
+         */
+        const data = this.tableListcop.map((item, index, arr) => {
+          return [item.indexs, item.dat, item.flightNum, index < arr.length - 1 ? `${item.flightChain ?? 0}%` : ''];
+        });
+        // 调用我们封装好的方法进行导出Excel
+        excel.export_json_to_excel({
+          // 导出的头部
+          header: tHeader,
+          // 导出的内容
+          data,
+          // 导出的文件名称
+          filename: this.listname,
+          // 导出的表格宽度是否自动
+          autoWidth: true,
+          // 导出文件的后缀类型
+          bookType: "xlsx",
+        });
+      });
+    },
+    upset (data) {
+      this.picShow = data;
+    },
+  },
+  components: {
+    Echarts,
+    StatisticsHeader,
+    Tableformbrs,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.airportInfo {
+  position: relative;
+  .header {
+    width: 103%;
+    height: 36px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: #f7f7f7;
+    position: relative;
+    left: -23px;
+    > .nav {
+      padding: 0 30px 0 30px;
+      cursor: pointer;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #101116;
+    }
+    > .navs {
+      height: 100%;
+      padding: 0 30px 0 30px;
+      cursor: pointer;
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: bold;
+      color: #ac014d;
+      border-bottom: 2px solid #ac014d;
+    }
+  }
+  .variable {
+    width: 100%;
+    height: 52px;
+  }
+  .echart {
+    width: 100%;
+    height: 746px;
+    position: absolute;
+    background: #ffffff;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
+    border-radius: 4px;
+  }
+}
+</style>

+ 384 - 0
src/views/statisticalanalysis/dataException/views/waybill.vue

@@ -0,0 +1,384 @@
+<template>
+  <div class="airportInfo">
+    <div class="variable">
+      <StatisticsHeader :title="titleTop" :items="formItems" :data="formData" :eledata="eledata" with-setting :withSetting="false" :withExport="true" :set="set" :action="action" :asShow="asShow" @getFormData="getFormData" @export="tableToExcel" @upset="upset" />
+    </div>
+    <div class="echart">
+      <Echarts :id="dataid" :option="tableData" v-if="picShow == true ? true : false" />
+      <Tableformbrs :tableList="tableList" :action="action" v-if="!picShow" :set="set" />
+    </div>
+  </div>
+</template>
+
+<script>
+import Echarts from "../../components/echart/index.vue";
+import Tableformbrs from "../../components/echart/tableforms.vue";
+import StatisticsHeader from "../../components/echart/statisticsHeader.vue";
+import { export_json_to_excel } from "@/utils/Export2Excel";
+import { Query } from "@/api/webApi";
+export default {
+  name: "ChartsBar",
+  data () {
+    return {
+      asShow: true,
+      optiondata: [],
+      picShow: true, //图片表格切换
+      action: 17,
+      dataid: "collection_ecahrt1",
+      listqueryTemplateID: DATACONTENT_ID.modeFlightvolume,
+      eledata: 1,
+      set: "",
+      isShow: Echarts,
+      tableList: [],
+      tableListcop: [],
+      listname: "",
+      listHeader: [],
+      tableData: {
+        time: [],
+        data1: [],
+        data2: [],
+        kg: "",
+        tyol: "",
+      },
+      formData: {
+        airport: "",
+        dateTime: "",
+      },
+      titleTop: "运单统计",
+      levelList: [
+        {
+          name: "加货重量统计",
+        },
+        {
+          name: "航班量统计",
+        },
+        {
+          name: "特货统计",
+        },
+        {
+          name: "货量统计",
+        },
+        {
+          name: "拉货统计",
+        },
+        {
+          name: "国内进港保障时间统计",
+        },
+      ],
+      formItems: [
+        {
+          prop: "fttp",
+          inputType: "select",
+          placeholder: "国内国际",
+          requiredWarning: "请先选择国内国际",
+          clearable: true,
+          options: [
+            {
+              value: "国内离港",
+              label: "国内出港",
+            },
+            {
+              value: "国际离港",
+              label: "国际出港",
+            },
+            {
+              value: "国内进港",
+              label: "国内进港",
+            },
+            {
+              value: "国际进港",
+              label: "国际进港",
+            },
+            {
+              value: "国内进港-全部",
+              label: "国内进港-全部",
+            },
+            {
+              value: "国内离港-全部",
+              label: "国内离港-全部",
+            },
+          ],
+        },
+        {
+          prop: "kht",
+          inputType: "select",
+          placeholder: "客货类型",
+          requiredWarning: "请先选择客货类型",
+          clearable: true,
+          options: [
+            {
+              value: "客机",
+              label: "客机",
+            },
+            {
+              value: "货机",
+              label: "货机",
+            },
+            {
+              value: "其它",
+              label: "其它",
+            },
+            {
+              value: "全部",
+              label: "全部",
+            },
+          ],
+        },
+        {
+          prop: "td",
+          inputType: "select",
+          placeholder: "统计维度",
+          requiredWarning: "请先选择统计时间维度",
+          clearable: true,
+          options: [
+            {
+              value: "月",
+              label: "月",
+            },
+            {
+              value: "年",
+              label: "年",
+            },
+          ],
+        },
+        {
+          prop: "dateTime",
+          inputType: "datePicker",
+          clearable: true,
+          width: "240px",
+          options: [],
+        },
+      ],
+    };
+  },
+  mounted () {
+    this.tableList = [{
+      date: '2016-05-03',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-02',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-04',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-01',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-08',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-06',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }, {
+      date: '2016-05-07',
+      name: '王小虎',
+      province: '上海',
+      city: '普陀区',
+      address: '上海市普陀区金沙江路 1518 弄',
+      zip: 200333
+    }]
+    // this.getQuery([]);
+  },
+  watch: {
+    // 监听数据变化,重绘折线图
+    option: {
+      deep: true,
+      handler (newVal) { },
+    },
+  },
+  destroyed () { },
+  methods: {
+    getFormData (data) {
+      this.tableData.time = [];
+      this.tableData.data1 = [];
+      this.tableData.data2 = [];
+      let option = [
+        {
+          fttp: data.fttp,
+          kht: data.kht,
+          td: data.td,
+          fd1: data.dateTime[0],
+          fd2: data.dateTime[1],
+        },
+      ];
+      this.getQuery(option, null);
+      this.listname =
+        "航班量统计" +
+        data.fttp +
+        data.kht +
+        data.td +
+        data.dateTime[0] +
+        "--" +
+        data.dateTime[1];
+      this.listHeader = ["序号", "时间", "航班(班)", "环比(%)"];
+    },
+    //获取表格数据
+    async getQuery (data, dat) {
+      try {
+        const { code, returnData } = await Query({
+          id: this.listqueryTemplateID,
+          dataContent: data,
+        });
+        if (code == 0) {
+          this.tableData.time = [];
+          this.tableData.data1 = [];
+          this.tableData.data2 = [];
+          this.tableList = JSON.parse(JSON.stringify(returnData.listValues));
+          this.tableListcop = JSON.parse(JSON.stringify(returnData.listValues));
+          this.tableList.forEach((item, index) => {
+            item.indexs = index + 1;
+          });
+          for (let i = 0; i < 10; i++) {
+            if (!this.tableList[i]) {
+              this.tableList.push({});
+            }
+          }
+          this.tableListcop.forEach((item, index) => {
+            item.indexs = index + 1;
+          });
+          let objar = {
+            indexs: "合计",
+            flightNum: returnData.listValues[0].totalFlightNum,
+          };
+          this.tableListcop.push(objar);
+          returnData.listValues.forEach((element) => {
+            this.tableData.data2.push(
+              element.flightNum ? element.flightNum : 0
+            );
+            this.tableData.time.push(element.dat);
+            this.tableData.kg = "单位:班";
+            this.tableData.data1 = [];
+          });
+          this.tableData.data1.push(0);
+          for (let index = 0; index < this.tableData.data2.length; index++) {
+            if (index > 0) {
+              const element =
+                (this.tableData.data2[index] -
+                  this.tableData.data2[index - 1]) /
+                this.tableData.data2[index - 1];
+              this.tableData.data1.push(
+                element.toFixed(2) ? element.toFixed(2) : 0
+              );
+              this.tableData.data1.forEach((element) => {
+                element = Number(element);
+                if (typeof element !== "number") {
+                  element = 0;
+                }
+              });
+            }
+          }
+        }
+      } catch (error) {
+        this.page--;
+      }
+    },
+    //导出
+    tableToExcel () {
+      import("@/utils/Export2Excel").then((excel) => {
+        // 设置导出表格的头部
+        const tHeader = this.listHeader;
+        // 将要导出的数据进行一个过滤
+        /**
+         * 源数据导入到excel的数据每一条重新拼成一个数组,数组里的每个元素就是filterVal里的每个字段
+         */
+        const data = this.tableListcop.map((item, index, arr) => {
+          return [item.indexs, item.dat, item.flightNum, index < arr.length - 1 ? `${item.flightChain ?? 0}%` : ''];
+        });
+        // 调用我们封装好的方法进行导出Excel
+        excel.export_json_to_excel({
+          // 导出的头部
+          header: tHeader,
+          // 导出的内容
+          data,
+          // 导出的文件名称
+          filename: this.listname,
+          // 导出的表格宽度是否自动
+          autoWidth: true,
+          // 导出文件的后缀类型
+          bookType: "xlsx",
+        });
+      });
+    },
+    upset (data) {
+      this.picShow = data;
+    },
+  },
+  components: {
+    Echarts,
+    StatisticsHeader,
+    Tableformbrs,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.airportInfo {
+  position: relative;
+  .header {
+    width: 103%;
+    height: 36px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: #f7f7f7;
+    position: relative;
+    left: -23px;
+    > .nav {
+      padding: 0 30px 0 30px;
+      cursor: pointer;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #101116;
+    }
+    > .navs {
+      height: 100%;
+      padding: 0 30px 0 30px;
+      cursor: pointer;
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: bold;
+      color: #ac014d;
+      border-bottom: 2px solid #ac014d;
+    }
+  }
+  .variable {
+    width: 100%;
+    height: 52px;
+  }
+  .echart {
+    width: 100%;
+    height: 746px;
+    position: absolute;
+    background: #ffffff;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
+    border-radius: 4px;
+  }
+}
+</style>

+ 5 - 1
src/views/systemSettings/warningSet/index.vue

@@ -527,7 +527,11 @@ const getQuery = async (data?) => {
         page.value--;
         noMore.value = true;
       }
-      tableData.value.push(...returnData);
+      if (data) {
+        tableData.value = [...returnData];
+      } else {
+        tableData.value.push(...returnData);
+      }
       tableCols.value = columnSet;
       // console.log(tableData);
       // const titleColumn = returnData.columnSet.find(

Vissa filer visades inte eftersom för många filer har ändrats