Elements-SY

modify

......@@ -147,6 +147,7 @@ export default {
},
closeSelectedTag(view) {
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
console.log(view)
if (this.isActive(view)) {
this.toLastView(visitedViews, view)
}
......
......@@ -498,11 +498,10 @@ export default {
*/
if (item.status == "3" || (item.status == "1" && item.ruleDate)) {
return true;
} else if (item.status == "1" && item.remark) {
} else if (item.status == "1" && this.$route.query.querySpecifyData) {
// 航班配舱设置非日期级别情况下
return true;
} else if (item.status == "2") {
// 航班配舱设置非日期级别情况下
return true;
} else {
return false;
......
import {
allDictData, // 获取全部字典
} from "@/api/destinationFlight";
export default {
computed: {
// 获取路由参数
......
......@@ -506,7 +506,7 @@ export default {
const { code, msg } = res;
if (code == 200) {
this.msgSuccess(msg || "创建成功!");
this.$router.push("/et86RuleConfig");
this.closeTagMenu(this.$route)
} else {
this.msgError(msg || "创建失败!");
}
......@@ -556,6 +556,16 @@ export default {
} else {
this.checkboxClassType = [];
}
// 人民币
if (data.list.fltRuleDto.currencyCd == "CNY") {
this.minCNYCustomVal = data.list.fltRuleDto.minCustomVal;
this.maxCNYCustomVal = data.list.fltRuleDto.maxCustomVal;
}
// 美元
if (data.list.fltRuleDto.currencyCd == "USD") {
this.minSUDCustomVal = data.list.fltRuleDto.minCustomVal;
this.maxSUDCustomVal = data.list.fltRuleDto.maxCustomVal;
}
this.queryForm = data.list.fltRuleDto; // ET86配舱航班顺位维度
} else {
this.msgError(msg || "获取查看失败");
......@@ -570,7 +580,7 @@ export default {
const { code, msg } = res;
if (code == 200) {
this.msgSuccess(msg || "修改成功!");
this.$router.push("/et86RuleConfig");
this.closeTagMenu(this.$route)
} else {
this.msgError(msg || "修改失败!");
}
......@@ -785,6 +795,34 @@ export default {
});
this.$emit("handleSearch");
},
isActive(route) {
return route.path === this.$route.path;
},
toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0];
if (latestView) {
this.$router.push(latestView.fullPath);
} else {
// now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs.
if (view.name === "Dashboard") {
// to reload home page
this.$router.replace({ path: "/redirect" + view.fullPath });
} else {
this.$router.push("/");
}
}
},
// 关闭当前标签菜单
closeTagMenu(view) {
this.$store
.dispatch("tagsView/delView", view)
.then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view);
}
});
},
},
};
</script>
......