|
@@ -187,6 +187,8 @@
|
|
|
:height="computedTableHeight"
|
|
|
show-summary
|
|
|
:summary-method="summaryMethod"
|
|
|
+ :span-method="arraySpanMethod"
|
|
|
+ @cell-click="cellClick"
|
|
|
border
|
|
|
stripe
|
|
|
>
|
|
@@ -384,6 +386,9 @@ export default {
|
|
|
loopEvent: null,
|
|
|
leaveCount: 0,
|
|
|
baggageCount: 0,
|
|
|
+ spanArr: [],
|
|
|
+ contactDot: 0,
|
|
|
+ flag: 0,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -398,6 +403,11 @@ export default {
|
|
|
// },
|
|
|
// },
|
|
|
methods: {
|
|
|
+ cellClick(row, column, cell, event) {
|
|
|
+ if (column.property == "PreFlightNO") {
|
|
|
+ this.$router.push({ path: "/advance/flightView", query: row });
|
|
|
+ }
|
|
|
+ },
|
|
|
changeView() {
|
|
|
this.$router.replace({
|
|
|
path: "/transfer/departure",
|
|
@@ -406,7 +416,7 @@ export default {
|
|
|
airPortChange() {
|
|
|
this.getAviationData();
|
|
|
this.upAviationData();
|
|
|
- this.getTableData();
|
|
|
+ // this.getTableData();
|
|
|
},
|
|
|
//选择机场
|
|
|
async getAirPortData() {
|
|
@@ -437,7 +447,7 @@ export default {
|
|
|
});
|
|
|
if (res.code == 0) {
|
|
|
this.carrierProps = res.returnData;
|
|
|
- this.getTableData();
|
|
|
+ // this.getTableData();
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -454,7 +464,7 @@ export default {
|
|
|
});
|
|
|
if (res.code == 0) {
|
|
|
this.carrierPropsop = res.returnData;
|
|
|
- this.getTableData();
|
|
|
+ // this.getTableData();
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -518,7 +528,27 @@ export default {
|
|
|
dataContent: [...arr],
|
|
|
});
|
|
|
if (res.code == 0) {
|
|
|
- this.initTableData(res.returnData);
|
|
|
+ // this.tableData = this._.sortBy(res.returnData, [
|
|
|
+ // "FlightDate",
|
|
|
+ // "PlanDepartureTime",
|
|
|
+ // ]);
|
|
|
+ this.tableData = res.returnData;
|
|
|
+ let contactDot = this.contactDot;
|
|
|
+ this.tableData.forEach((item, index) => {
|
|
|
+ item.index = index;
|
|
|
+ if (index === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ } else {
|
|
|
+ if (item.PreFlightNO === this.tableData[index - 1].PreFlightNO) {
|
|
|
+ this.spanArr[contactDot] += 1;
|
|
|
+ this.spanArr.push(0);
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ contactDot = index;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //this.initTableData(res.returnData);
|
|
|
} else {
|
|
|
console.log(res.message);
|
|
|
}
|
|
@@ -626,12 +656,25 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
+ arraySpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ for (let i = 0; i < 5; i++) {
|
|
|
+ if (columnIndex === i) {
|
|
|
+ const _row = this.spanArr[rowIndex];
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
- let that = this;
|
|
|
- this.loopEvent = setInterval(function () {
|
|
|
- that.getTableData();
|
|
|
- }, 3000);
|
|
|
+ // let that = this;
|
|
|
+ // this.loopEvent = setInterval(function () {
|
|
|
+ // console.log(this.contactDot);
|
|
|
+ // that.getTableData();
|
|
|
+ // }, 3000);
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearInterval(this.loopEvent);
|