|
@@ -79,6 +79,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log(this.$route.name);
|
|
|
if (this.$route.query.name) {
|
|
|
this.sidebarRoutersfun();
|
|
|
} else {
|
|
@@ -94,19 +95,25 @@ export default {
|
|
|
if (item.path == this.$route.query.name) {
|
|
|
// console.log(item);
|
|
|
this.routs.push(item);
|
|
|
- if (this.routs[0].children[0].children) {
|
|
|
- this.defaultpath = [this.routs[0].children[0].path];
|
|
|
- this.p =
|
|
|
- this.routs[0].path +
|
|
|
- "/" +
|
|
|
- this.routs[0].children[0].path +
|
|
|
- "/" +
|
|
|
- this.routs[0].children[0].children[0].path;
|
|
|
- this.$router.push({ path: this.p });
|
|
|
+ if (this.$route.name == "Notice") {
|
|
|
+ // this.p = this.routs[0].path + "/" + this.routs[0].children[0].path;
|
|
|
+ this.$router.push({ path: "/system/notice" });
|
|
|
} else {
|
|
|
- this.defaultpath = [this.routs[0].path];
|
|
|
- this.p = this.routs[0].path + "/" + this.routs[0].children[0].path;
|
|
|
- this.$router.push({ path: this.p });
|
|
|
+ if (this.routs[0].children[0].children) {
|
|
|
+ this.defaultpath = [this.routs[0].children[0].path];
|
|
|
+ this.p =
|
|
|
+ this.routs[0].path +
|
|
|
+ "/" +
|
|
|
+ this.routs[0].children[0].path +
|
|
|
+ "/" +
|
|
|
+ this.routs[0].children[0].children[0].path;
|
|
|
+ this.$router.push({ path: this.p });
|
|
|
+ } else {
|
|
|
+ this.defaultpath = [this.routs[0].path];
|
|
|
+ this.p =
|
|
|
+ this.routs[0].path + "/" + this.routs[0].children[0].path;
|
|
|
+ this.$router.push({ path: this.p });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// console.log(this.routs.length)
|