|
@@ -37,12 +37,33 @@ export default class extends Vue {
|
|
|
private getBreadcrumb() {
|
|
|
let matched = this.$route.matched.filter((item) => item.meta && item.meta.title);
|
|
|
const first = matched[0];
|
|
|
+ //针对关系模块添加面包屑
|
|
|
+ if(first) {
|
|
|
+ matched = this.relationModel(matched)
|
|
|
+ }
|
|
|
|
|
|
this.breadcrumbs = matched.filter((item) => {
|
|
|
return item.meta && item.meta.title && item.meta.breadcrumb !== false;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 关系模块
|
|
|
+ *
|
|
|
+ */
|
|
|
+ relationModel(matched:any = []){
|
|
|
+ if(matched.length >= 2 && matched[1].path == '/maintain/relation'){
|
|
|
+ matched[2] = {
|
|
|
+ path: "/maintain/relationship",
|
|
|
+ meta:{
|
|
|
+ title:this.$route.query.relationTypeName,
|
|
|
+ hidden: true,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return matched
|
|
|
+ }
|
|
|
+
|
|
|
// private isDashboard(route: RouteRecord) {
|
|
|
// const name = route && route.meta && route.meta.title;
|
|
|
// return name === "Dashboard";
|