Commit 530b7ab0 by 林家欣

fix: 修改条码公告详情面包靴

parent 32dfa8dd
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
// nav_.children && // nav_.children &&
// nav_.children.length > 0 && // nav_.children.length > 0 &&
// this.$store.commit("system/SET_SUB_NAV", nav_.children); // this.$store.commit("system/SET_SUB_NAV", nav_.children);
console.log(nav_, this.$route, 'this.$route.path');
if (nav_.link === this.$route.path) { if (nav_.link === this.$route.path) {
nav_.breadcrumb && nav_.breadcrumb &&
this.$store.commit("system/SET_BREADCRUMB", nav_.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", nav_.breadcrumb);
......
...@@ -317,6 +317,18 @@ export const nav = [ ...@@ -317,6 +317,18 @@ export const nav = [
{ name: "条码注销公告" }, { name: "条码注销公告" },
], ],
}, },
{
id: uuid("gs_nav"),
name: "条码公告",
index: 2,
link: "/Business/Msg",
breadcrumb: [
{ name: "业务大厅", path: "/Business" },
{ name: "我还不是系统成员", path: "/Business/Register" },
{ name: "条码公告", path: "/Business/Notice?id=zhuce" },
{ name: "企业信息" },
],
},
// { // {
// id: uuid("gs_nav"), // id: uuid("gs_nav"),
// name: "我要续展", // name: "我要续展",
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import pages from "../comps/pages.vue"; import pages from "../comps/pages.vue";
import list from "./copms/list.vue"; import list from "./copms/list.vue";
import { nav } from "@/components/layout/header/mock";
export default { export default {
components: { components: {
...@@ -86,9 +87,14 @@ export default { ...@@ -86,9 +87,14 @@ export default {
logoutFlag: "1", logoutFlag: "1",
}; };
}, },
created() { watch: {
$route: {
handler() {
this.init(); this.init();
}, },
immediate: true,
}
},
methods: { methods: {
init() { init() {
this.setLogoutFlag(this.$route.query.id); this.setLogoutFlag(this.$route.query.id);
...@@ -154,6 +160,30 @@ export default { ...@@ -154,6 +160,30 @@ export default {
code: obj.code, code: obj.code,
}, },
}); });
const result = this.deepFindBreadcrumb(nav, '/Business/Msg');
this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb);
},
deepFindBreadcrumb(menuList, activePath) {
let current = [];
const deep = (arr, activePath) => {
for (let i = 0; i < arr.length; i += 1) {
if (
arr[i].link !== activePath &&
arr[i].children &&
arr[i].children.length > 0
) {
deep(arr[i].children, activePath);
} else if (arr[i].link === activePath) {
current = arr[i];
break;
}
if (current.length > 0) {
break;
}
}
};
deep(menuList, activePath);
return current;
}, },
jump(i) { jump(i) {
// console.log(i); // console.log(i);
......
...@@ -417,13 +417,13 @@ export default { ...@@ -417,13 +417,13 @@ export default {
}, },
{ {
name: "条码注册公告", name: "条码注册公告",
path: "/Business/Notice", path: "/Business/Notice?id=zhuce",
active: "", active: "",
id: "zhuce", id: "zhuce",
}, },
{ {
name: "条码注销公告", name: "条码注销公告",
path: "/Business/Notice", path: "/Business/Notice?id=zhuxiao",
active: "", active: "",
id: "zhuxiao", id: "zhuxiao",
}, },
......
...@@ -26,12 +26,14 @@ export default { ...@@ -26,12 +26,14 @@ export default {
computed: { computed: {
...mapState("system", ["breadcrumb"]), ...mapState("system", ["breadcrumb"]),
bread() { bread() {
if(this.breadcrumb&&this.breadcrumb.length>0){ console.log(this.breadcrumb, 'bread');
if (this.breadcrumb && this.breadcrumb.length > 0) {
const bread = [...this.breadcrumb]; const bread = [...this.breadcrumb];
console.log(bread, 'bread');
bread[bread.length - 1].active = true; bread[bread.length - 1].active = true;
return bread; return bread;
}else{ } else {
return [] return [];
} }
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment