Showing
1 changed file
with
53 additions
and
3 deletions
| ... | @@ -61,8 +61,7 @@ | ... | @@ -61,8 +61,7 @@ |
| 61 | :key="idx"> | 61 | :key="idx"> |
| 62 | <div> | 62 | <div> |
| 63 | <el-empty description="未设置规则!" v-if="!val.isLocation"> | 63 | <el-empty description="未设置规则!" v-if="!val.isLocation"> |
| 64 | - <el-button type="primary" size="small" | 64 | + <el-button type="primary" size="small" @click="newRoute(idx, val.flightRoute)">新增规则 |
| 65 | - @click="newRoute(idx, val.flightRoute)">新增规则 | ||
| 66 | </el-button> | 65 | </el-button> |
| 67 | </el-empty> | 66 | </el-empty> |
| 68 | <el-row class="rowPadding" v-else> | 67 | <el-row class="rowPadding" v-else> |
| ... | @@ -719,9 +718,58 @@ export default { | ... | @@ -719,9 +718,58 @@ export default { |
| 719 | this.infoForm.list.push(this.dataHandle(item)) | 718 | this.infoForm.list.push(this.dataHandle(item)) |
| 720 | }) | 719 | }) |
| 721 | } else { | 720 | } else { |
| 721 | + //航班类型为Purple Tail则显示所有航线维度 | ||
| 722 | let arr = this.$route.params.route.split(';') | 722 | let arr = this.$route.params.route.split(';') |
| 723 | this.infoRouteList = arr | 723 | this.infoRouteList = arr |
| 724 | - //航班类型为Purple Tail则显示所有航线维度 | 724 | + let params = { |
| 725 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 726 | + flightRoute: this.infoForm.route, | ||
| 727 | + flightRouteListStr: this.$route.params.route, | ||
| 728 | + status: this.$route.params.status | ||
| 729 | + } | ||
| 730 | + findDestinationFltRuleByFlightNo(params).then(response => { | ||
| 731 | + let infoRouteList = [] | ||
| 732 | + response.data.list.forEach(item => { | ||
| 733 | + //航线对应插入数据 | ||
| 734 | + infoRouteList.push(item.flightRoute) | ||
| 735 | + }) | ||
| 736 | + if (response.data.list.length > 0) { | ||
| 737 | + this.routeList.forEach((route, sub) => { | ||
| 738 | + if (arr.includes(route.route)) { | ||
| 739 | + let routeStatus = 1 | ||
| 740 | + res.data.list.forEach(item => { | ||
| 741 | + if (route.route === item.flightRoute) { | ||
| 742 | + //航线对应插入数据 | ||
| 743 | + routeStatus = 2 | ||
| 744 | + this.infoForm.list.push(this.dataHandle(item)) | ||
| 745 | + } | ||
| 746 | + }) | ||
| 747 | + if (routeStatus == 1) { | ||
| 748 | + if (infoRouteList.includes(route.route)) { | ||
| 749 | + response.data.list.forEach(item => { | ||
| 750 | + if (item.flightRoute == route.route) { | ||
| 751 | + item.id = undefined | ||
| 752 | + item.status = undefined | ||
| 753 | + routeStatus = 2 | ||
| 754 | + this.infoForm.list.push( | ||
| 755 | + this.dataHandle(item) | ||
| 756 | + ) | ||
| 757 | + } | ||
| 758 | + }) | ||
| 759 | + } else { | ||
| 760 | + //否则插入占位基础数据 | ||
| 761 | + this.infoForm.list.push({ | ||
| 762 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 763 | + ruleDate: this.infoForm.fltDate, | ||
| 764 | + flightRoute: route.route, | ||
| 765 | + routePriority: route.routePriority, | ||
| 766 | + }) | ||
| 767 | + this.newRoute(sub, route.route) | ||
| 768 | + } | ||
| 769 | + } | ||
| 770 | + } | ||
| 771 | + }) | ||
| 772 | + } else { | ||
| 725 | this.routeList.forEach((route, sub) => { | 773 | this.routeList.forEach((route, sub) => { |
| 726 | if (arr.includes(route.route)) { | 774 | if (arr.includes(route.route)) { |
| 727 | let routeStatus = 1 | 775 | let routeStatus = 1 |
| ... | @@ -745,6 +793,8 @@ export default { | ... | @@ -745,6 +793,8 @@ export default { |
| 745 | } | 793 | } |
| 746 | }) | 794 | }) |
| 747 | } | 795 | } |
| 796 | + }) | ||
| 797 | + } | ||
| 748 | } else { | 798 | } else { |
| 749 | //航班配舱编辑 | 799 | //航班配舱编辑 |
| 750 | if (this.routeSatus == 'FlightAllocConfig') { | 800 | if (this.routeSatus == 'FlightAllocConfig') { | ... | ... |
-
Please register or login to post a comment