chenrui  2 жил өмнө
parent
commit
0c56a0227e

+ 6 - 2
public/config.js

@@ -1,9 +1,11 @@
 window.PLATFROM_CONFIG = {
-  baseNewUrl: 'http://10.211.67.163:16300', //登录前的http请求地址
+  // baseNewUrl: 'http://10.211.67.163:16300', //登录前的http请求地址
+  baseNewUrl: 'http://10.211.67.177:8043',
   baseUrl: 'http://10.211.67.163:16300', // 4A-http请求地址
   appSecret: '9inu7zpllz1folzsljm498dcpi0lsog1', //appSecret
   appId: 'q7kdjmmaf0kerwpf', //appid
-  baseURLCA: 'http://10.211.67.163:16300', // 登录后的http请求地址-测试
+  // baseURLCA: 'http://10.211.67.163:16300', // 登录后的http请求地址-测试
+  baseURLCA: 'http://10.211.67.177:8043',
   baggageMessageURL: '/openApi/query'
 }
 
@@ -101,9 +103,11 @@ window.DATACONTENT_ID = {
   stMapId: 18018,
   stCountryId: 18019,
   stTerminalId: 18020,
+  stBrsId: 18028,
 
   // 数据统计
   airlineOptions: 1806, // 航线下拉
+  termSeleid: 1156,//航站选择下拉
   areaOptions: 1807, // 大区/基地分公司下拉
   AirportId: 1808, // 航站下拉
   TerminalId: 1809, // 航站楼下拉

+ 9 - 1
src/views/statisticsCharts/components/tableform.vue

@@ -96,7 +96,14 @@
 </template>
 <script>
 import { setTableFilters } from "@/utils/table";
+import {
+  Query,
+  GeneralDataReception,
+  Start,
+  Stop,
+} from "@/api/dataIntegration";
 import NoData from "@/components/nodata";
+import { de } from "vis";
 export default {
   isDialog: {
     type: Boolean,
@@ -285,7 +292,8 @@ export default {
     },
   },
   mounted() {
-    this.initTableData();
+    // this.initTableData();
+    this.getQuery();
   },
   methods: {
     load() {

+ 87 - 16
src/views/statisticsCharts/components/tableformbrs.vue

@@ -10,22 +10,22 @@
     >
       <template v-if="tableData.length">
         <el-table :data="tableData" style="width: 100%">
-          <el-table-column prop="date" label="航站"> </el-table-column>
+          <el-table-column prop="A" label="航站"> </el-table-column>
           <el-table-column label="出港航班量">
-            <el-table-column prop="name" label="航班(架次)" width="240">
+            <el-table-column prop="flightno" label="航班(架次)" width="240">
             </el-table-column>
-            <el-table-column prop="province" label="行李(件数)" width="240">
+            <el-table-column prop="bagsno" label="行李(件数)" width="240">
             </el-table-column>
           </el-table-column>
           <el-table-column label="扫描航班量">
-            <el-table-column prop="city" label="航班(架次)">
+            <el-table-column prop="loadflightno" label="航班(架次)">
             </el-table-column>
-            <el-table-column prop="address" label="行李(件数)">
+            <el-table-column prop="loadbagsno" label="行李(件数)">
             </el-table-column>
           </el-table-column>
           <el-table-column label="扫描率">
-            <el-table-column prop="zip" label="航班"> </el-table-column>
-            <el-table-column prop="cp" label="行李"> </el-table-column>
+            <el-table-column prop="flightscan" label="航班"> </el-table-column>
+            <el-table-column prop="bagsscan" label="行李"> </el-table-column>
           </el-table-column>
         </el-table>
       </template>
@@ -37,26 +37,52 @@
 </template>
 <script>
 import NoData from "@/components/nodata";
+import { Query } from "@/api/dataIntegration";
 export default {
+  props: {
+    //接口ID
+    dataId: {
+      type: [String, Number],
+      default: "",
+    },
+    dataContent: {
+      type: Object,
+      default: () => [],
+    },
+  },
   data() {
     return {
       loading: false,
+      page: 0,
+      serviceId: null,
+      rowTitle: "",
+      tableCols: [], //表头数据
       tableData: [
-        {
-          date: "wnz(7月)",
-          name: "409",
-          province: "18946",
-          city: "409",
-          address: "18294",
-          zip: "100%",
-          cp: "96.56%",
-        },
+        // {
+        //   date: "wnz(7月)",
+        //   name: "409",
+        //   province: "18946",
+        //   city: "409",
+        //   address: "18294",
+        //   zip: "100%",
+        //   cp: "96.56%",
+        // },
       ],
     };
   },
   components: {
     NoData,
   },
+  watch: {
+    dataContent: {
+      handler(val) {
+        if (val) {
+          this.getQuery();
+        }
+      },
+      deep: true,
+    },
+  },
   computed: {
     dataTableContentStyle() {
       const style = {};
@@ -69,6 +95,51 @@ export default {
       return style;
     },
   },
+  mounted() {
+    this.getQuery();
+  },
+  methods: {
+    //获取表格数据
+    async getQuery() {
+      try {
+        this.loading = true;
+        const { code, returnData } = await Query({
+          id: this.dataId,
+          needPage: ++this.page,
+          dataContent: this.dataContent,
+        });
+        if (code == 0) {
+          if (returnData.listValues.length === 0) {
+            this.page--;
+            this.noMore = true;
+            this.loading = false;
+          }
+          const titleColumn = returnData.columnSet.find(
+            (item) => item.needShow === 1
+          );
+          if (titleColumn) {
+            this.rowTitle = titleColumn.columnName;
+          }
+          this.tableData.push(...returnData.listValues);
+          this.tableCols = returnData.columnSet;
+          this.serviceId = returnData.submitID;
+          this.loading = false;
+          // setTimeout(() => {
+          //   this.initTableData();
+          //   this.loading = false;
+          // }, 100);
+        } else {
+          this.page--;
+          this.loading = false;
+          this.$message.error("获取表格数据失败");
+        }
+      } catch (error) {
+        this.page--;
+        this.loading = false;
+        console.log(error);
+      }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 22 - 6
src/views/statisticsCharts/views/report/scanningStatistics.vue

@@ -8,8 +8,10 @@
       with-setting
       :withSetting="false"
       :withExport="false"
+      @getFormData="getFormData"
     />
-    <tableformbrs
+    <Tableformbrs
+      :data-id="dataId"
       :rows="12"
       label-width="140px"
       :min-height="70"
@@ -20,7 +22,7 @@
 </template>
 <script>
 import StatisticsHeader from "../../components/statisticsHeader.vue";
-import tableformbrs from "../../components/tableformbrs";
+import Tableformbrs from "../../components/tableformbrs";
 export default {
   name: "ReportStatistics",
   data() {
@@ -34,11 +36,11 @@ export default {
           prop: "airport",
           inputType: "select",
           placeholder: "航站选择",
-          filterable: true,
+          // filterable: true,
           clearable: true,
           // multiple: true,
-          disabled: true,
-          queryId: DATACONTENT_ID.nodeAirport,
+          // disabled: true,
+          queryId: DATACONTENT_ID.termSeleid,
           setKey: "a2",
           options: [],
         },
@@ -75,11 +77,25 @@ export default {
           options: [],
         },
       ],
+      dataId: DATACONTENT_ID.stBrsId,
+      dataContent: [],
     };
   },
   components: {
     StatisticsHeader,
-    tableformbrs,
+    Tableformbrs,
+  },
+  methods: {
+    getFormData(data) {
+      this.dataContent = [];
+      this.dataContent.push(
+        data.airport,
+        data.interval,
+        data.dateTime[0],
+        data.dateTime[1]
+      );
+      console.log(this.dataContent);
+    },
   },
 };
 </script>