|
@@ -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>
|