Showing
2 changed files
with
24 additions
and
4 deletions
| ... | @@ -102,12 +102,14 @@ export default { | ... | @@ -102,12 +102,14 @@ export default { |
| 102 | serviceCode: [], // Service Code | 102 | serviceCode: [], // Service Code |
| 103 | handlingCode: [], // Handling Code | 103 | handlingCode: [], // Handling Code |
| 104 | subCategory: [], // Sub Category | 104 | subCategory: [], // Sub Category |
| 105 | + flightRouteList: [], // 航班信息维护查询 | ||
| 105 | }; | 106 | }; |
| 106 | }, | 107 | }, |
| 107 | /* | 108 | /* |
| 108 | 判断有日期的找到了就走有日期的,如果日期级别的没有找到再去走一次普通级别的接口 | 109 | 判断有日期的找到了就走有日期的,如果日期级别的没有找到再去走一次普通级别的接口 |
| 109 | */ | 110 | */ |
| 110 | created() { | 111 | created() { |
| 112 | + // console.log(this.$route.query.flightRouteListStr); | ||
| 111 | const parmas = { | 113 | const parmas = { |
| 112 | querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段 1、2 | 114 | querySpecifyData: this.$route.query.querySpecifyData || "", // 查询特殊数据字段 1、2 |
| 113 | purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号 | 115 | purposeOfFlightNo: this.$route.query.purposeOfFlightNo || "", // 航班号 |
| ... | @@ -140,7 +142,10 @@ export default { | ... | @@ -140,7 +142,10 @@ export default { |
| 140 | queryFindAllFltDataApi(parmas) { | 142 | queryFindAllFltDataApi(parmas) { |
| 141 | findAllFltDataApi(parmas) | 143 | findAllFltDataApi(parmas) |
| 142 | .then((res) => { | 144 | .then((res) => { |
| 143 | - console.log(res); | 145 | + const { code, data, msg } = res; |
| 146 | + if(code == 200){ | ||
| 147 | + this.flightRouteList = data.list; | ||
| 148 | + } | ||
| 144 | }) | 149 | }) |
| 145 | .catch((error) => {}); | 150 | .catch((error) => {}); |
| 146 | }, | 151 | }, | ... | ... |
| ... | @@ -487,8 +487,21 @@ export default { | ... | @@ -487,8 +487,21 @@ export default { |
| 487 | if (this.$route.query.flightKindName == "White Tail") { | 487 | if (this.$route.query.flightKindName == "White Tail") { |
| 488 | // White Tail只展示当前查询的一条 | 488 | // White Tail只展示当前查询的一条 |
| 489 | const route = this.$route.query.flightRouteListStr; | 489 | const route = this.$route.query.flightRouteListStr; |
| 490 | - let noDateRouteInfo, result; | 490 | + let noDateRouteInfo, result, byFlightRouteListSort; |
| 491 | - this.routeList = dateRouteList; | 491 | + byFlightRouteListSort = dateRouteList |
| 492 | + .filter((item2) => { | ||
| 493 | + return this.flightRouteList.some((item1) => { | ||
| 494 | + return item1.route === item2.route; | ||
| 495 | + }); | ||
| 496 | + }) | ||
| 497 | + .sort((a, b) => { | ||
| 498 | + return ( | ||
| 499 | + this.flightRouteList.findIndex((item) => item.route === a.route) - | ||
| 500 | + this.flightRouteList.findIndex((item) => item.route === b.route) | ||
| 501 | + ); | ||
| 502 | + }); | ||
| 503 | + // this.routeList = dateRouteList; | ||
| 504 | + this.routeList = byFlightRouteListSort; | ||
| 492 | // 从日期取 | 505 | // 从日期取 |
| 493 | if (dateListHas.length) { | 506 | if (dateListHas.length) { |
| 494 | const dateRouteInfo = dateListHas.filter( | 507 | const dateRouteInfo = dateListHas.filter( |
| ... | @@ -559,7 +572,6 @@ export default { | ... | @@ -559,7 +572,6 @@ export default { |
| 559 | this.setattrVal(item); // 设置属性值 | 572 | this.setattrVal(item); // 设置属性值 |
| 560 | } | 573 | } |
| 561 | }); | 574 | }); |
| 562 | - this.routeList = dateRouteList; // 航线优先级 | ||
| 563 | // 查找包含的航线并且按照dateList航线排序 | 575 | // 查找包含的航线并且按照dateList航线排序 |
| 564 | dateList.sort((a, b) => { | 576 | dateList.sort((a, b) => { |
| 565 | return ( | 577 | return ( |
| ... | @@ -589,6 +601,7 @@ export default { | ... | @@ -589,6 +601,7 @@ export default { |
| 589 | }); | 601 | }); |
| 590 | // 把处理ET86航线优先级展示 | 602 | // 把处理ET86航线优先级展示 |
| 591 | this.queryForm.flightRouteListStr = routes.join(";"); | 603 | this.queryForm.flightRouteListStr = routes.join(";"); |
| 604 | + // console.log(this.queryForm); | ||
| 592 | // 跳转传过来的对应的航线把ET86航线的过滤掉 | 605 | // 跳转传过来的对应的航线把ET86航线的过滤掉 |
| 593 | let noEtesRoutes = inRoutes.filter((item) => item.etesRule == "N"); | 606 | let noEtesRoutes = inRoutes.filter((item) => item.etesRule == "N"); |
| 594 | let noRoutes = dateList.filter((item) => { | 607 | let noRoutes = dateList.filter((item) => { |
| ... | @@ -607,9 +620,11 @@ export default { | ... | @@ -607,9 +620,11 @@ export default { |
| 607 | ); | 620 | ); |
| 608 | }); | 621 | }); |
| 609 | // this.defaultRouteData(result) // 默认航线配置信息数据; | 622 | // this.defaultRouteData(result) // 默认航线配置信息数据; |
| 623 | + this.routeList = dateRouteList; // 航线优先级 | ||
| 610 | this.routesInfo = result; | 624 | this.routesInfo = result; |
| 611 | this.pageLoading = false; | 625 | this.pageLoading = false; |
| 612 | } else { | 626 | } else { |
| 627 | + this.routeList = dateRouteList; // 航线优先级 | ||
| 613 | this.queryForm = this.$route.query; // 获取跳转过来的参数 | 628 | this.queryForm = this.$route.query; // 获取跳转过来的参数 |
| 614 | this.routesInfo = dateList; | 629 | this.routesInfo = dateList; |
| 615 | this.pageLoading = false; | 630 | this.pageLoading = false; | ... | ... |
-
Please register or login to post a comment