Showing
1 changed file
with
55 additions
and
40 deletions
| ... | @@ -779,55 +779,70 @@ export default { | ... | @@ -779,55 +779,70 @@ export default { |
| 779 | ) | 779 | ) |
| 780 | infoRouteList.push(dateItem.flightRoute) | 780 | infoRouteList.push(dateItem.flightRoute) |
| 781 | }) | 781 | }) |
| 782 | - findDestinationFltRuleByFlightNo({ | 782 | + //判断是否有日期,看是否需要查询无日期维度 |
| 783 | - purposeOfFlightNo: this.infoForm.fltNo, | 783 | + if (obj.flightDate != null && obj.flightDate != '' && obj.flightDate != ' ') { |
| 784 | - fltDate: '', | 784 | + findDestinationFltRuleByFlightNo({ |
| 785 | - flightRoute: this.infoForm.route, | 785 | + purposeOfFlightNo: this.infoForm.fltNo, |
| 786 | - flightRouteListStr: this.$route.params.route, | 786 | + fltDate: '', |
| 787 | - status: this.$route.params.status | 787 | + flightRoute: this.infoForm.route, |
| 788 | - }).then(resData => { | 788 | + flightRouteListStr: this.$route.params.route, |
| 789 | - if (resData.data.list.length > 0) { | 789 | + status: this.$route.params.status |
| 790 | - this.routeList.forEach((route, sub) => { | 790 | + }).then(resData => { |
| 791 | - if (!infoRouteList.includes(route.route)) { | 791 | + if (resData.data.list.length > 0) { |
| 792 | - let routeStatus = 1 | 792 | + this.routeList.forEach((route, sub) => { |
| 793 | - resData.data.list.forEach(item => { | 793 | + if (!infoRouteList.includes(route.route)) { |
| 794 | - if (item.flightRoute == route.route) { | 794 | + let routeStatus = 1 |
| 795 | - item.id = undefined | 795 | + resData.data.list.forEach(item => { |
| 796 | - item.status = undefined | 796 | + if (item.flightRoute == route.route) { |
| 797 | - routeStatus = 2 | 797 | + item.id = undefined |
| 798 | - this.infoForm.list.push( | 798 | + item.status = undefined |
| 799 | - this.dataHandle(item) | 799 | + routeStatus = 2 |
| 800 | - ) | 800 | + this.infoForm.list.push( |
| 801 | - } | 801 | + this.dataHandle(item) |
| 802 | - }) | 802 | + ) |
| 803 | - if (routeStatus == 1) { | 803 | + } |
| 804 | - // 否则插入占位基础数据 | ||
| 805 | - this.infoForm.list.push({ | ||
| 806 | - purposeOfFlightNo: this.infoForm.fltNo, | ||
| 807 | - ruleDate: this.infoForm.fltDate, | ||
| 808 | - flightRoute: route.route, | ||
| 809 | - routePriority: route.routePriority, | ||
| 810 | }) | 804 | }) |
| 811 | - this.newRoute(sub) | 805 | + if (routeStatus == 1) { |
| 806 | + // 否则插入占位基础数据 | ||
| 807 | + this.infoForm.list.push({ | ||
| 808 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 809 | + ruleDate: this.infoForm.fltDate, | ||
| 810 | + flightRoute: route.route, | ||
| 811 | + routePriority: route.routePriority, | ||
| 812 | + }) | ||
| 813 | + this.newRoute(sub) | ||
| 814 | + } | ||
| 812 | } | 815 | } |
| 813 | - } | 816 | + }) |
| 814 | - }) | 817 | + } |
| 815 | - } | 818 | + else { |
| 816 | - else { | 819 | + this.routeList.forEach((route) => { |
| 817 | - this.routeList.forEach((route) => { | 820 | + this.infoForm.list.push({ |
| 821 | + purposeOfFlightNo: this.infoForm.fltNo, | ||
| 822 | + ruleDate: this.infoForm.fltDate, | ||
| 823 | + flightRoute: route.route, | ||
| 824 | + routePriority: route.routePriority, | ||
| 825 | + }) | ||
| 826 | + }) | ||
| 827 | + } | ||
| 828 | + }).catch(err => { | ||
| 829 | + this.isEmpty = true | ||
| 830 | + console.log(err) | ||
| 831 | + }) | ||
| 832 | + } else { | ||
| 833 | + this.routeList.forEach((route, sub) => { | ||
| 834 | + if (!infoRouteList.includes(route.route)) { | ||
| 818 | this.infoForm.list.push({ | 835 | this.infoForm.list.push({ |
| 819 | purposeOfFlightNo: this.infoForm.fltNo, | 836 | purposeOfFlightNo: this.infoForm.fltNo, |
| 820 | ruleDate: this.infoForm.fltDate, | 837 | ruleDate: this.infoForm.fltDate, |
| 821 | flightRoute: route.route, | 838 | flightRoute: route.route, |
| 822 | routePriority: route.routePriority, | 839 | routePriority: route.routePriority, |
| 823 | }) | 840 | }) |
| 824 | - }) | 841 | + } |
| 825 | - } | 842 | + }) |
| 826 | - }).catch(err => { | 843 | + } |
| 827 | - this.isEmpty = true | ||
| 828 | - console.log(err) | ||
| 829 | - }) | ||
| 830 | } else { | 844 | } else { |
| 845 | + //航班维护跳转编辑 | ||
| 831 | let params = { | 846 | let params = { |
| 832 | purposeOfFlightNo: this.infoForm.fltNo, | 847 | purposeOfFlightNo: this.infoForm.fltNo, |
| 833 | flightRoute: this.infoForm.route, | 848 | flightRoute: this.infoForm.route, | ... | ... |
-
Please register or login to post a comment