Elements-SY

modify

......@@ -566,27 +566,8 @@ export default {
);
});
if (this.$route.query.flightKindName == "Purple Tail") {
let routesStr = this.$route.query.routesStr.split(";"); // 跳转传过来的航线
// 查找跳转传过来的对应的航线把包含的航线并且按照dateDataLists航线排序
let inRoutes = dateDataLists
.filter((item) => routesStr.includes(item.route))
.sort(
(a, b) => routesStr.indexOf(a.route) - routesStr.indexOf(b.route)
);
// 处理航线优先级展示ET86
let routes = [];
dateDataLists.map((item, i, arr) => {
if (arr[i].etesRule == "Y") {
routes.push(`${arr[i].route}(ET86)`);
} else {
routes.push(arr[i].route);
}
});
// 把处理ET86航线优先级展示
this.queryForm.routesStr = routes.join(";");
// this.defaultRouteData(result) // 默认航线配置信息数据;
this.routeList = dateRouteList; // 航线优先级
console.log(dateList);
this.routesInfo = dateList;
this.pageLoading = false;
} else {
......
......@@ -1341,13 +1341,29 @@ export default {
);
return;
}
queryRouteByFltNo({ fltNo: row.fltNo })
.then((res) => {
const { code, data, msg } = res;
if (code === 200) {
if (data.list.length) {
let include = data.list.filter((item) =>
row.route.split(";").some((val) => val == item.route)
); // 查询已被勾选的
let routes = [];
include.map((item, i, arr) => {
if (arr[i].isEtesRoute == "Y") {
routes.push(`${arr[i].route}(ET86)`);
} else {
routes.push(arr[i].route);
}
});
this.$router.push({
path: "/routeInfo",
query: {
flightDate: row.fltDate,
purposeOfFlightNo: row.fltNo,
flightRouteListStr: row.route,
routesStr: row.route,
routesStr: routes.join(";"),
status: row.status,
flightKindName: row.flightKindName,
pageName: "flightInformationMaintenance",
......@@ -1355,6 +1371,17 @@ export default {
},
});
}
if (data.list.length == 0) {
this.msgError("该航班没有设置航线");
}
} else {
this.msgWarning(res.msg);
}
})
.catch((err) => {
console.log(err);
});
}
})
.catch(() => {});
},
......