Commit 530b7ab0 by 林家欣

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

parent 32dfa8dd
......@@ -94,6 +94,7 @@ export default {
// nav_.children &&
// nav_.children.length > 0 &&
// this.$store.commit("system/SET_SUB_NAV", nav_.children);
console.log(nav_, this.$route, 'this.$route.path');
if (nav_.link === this.$route.path) {
nav_.breadcrumb &&
this.$store.commit("system/SET_BREADCRUMB", nav_.breadcrumb);
......
......@@ -317,6 +317,18 @@ export const nav = [
{ 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"),
// name: "我要续展",
......
......@@ -48,6 +48,7 @@
import cate from "../comps/cate.vue";
import pages from "../comps/pages.vue";
import list from "./copms/list.vue";
import { nav } from "@/components/layout/header/mock";
export default {
components: {
......@@ -86,8 +87,13 @@ export default {
logoutFlag: "1",
};
},
created() {
this.init();
watch: {
$route: {
handler() {
this.init();
},
immediate: true,
}
},
methods: {
init() {
......@@ -154,6 +160,30 @@ export default {
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) {
// console.log(i);
......
......@@ -417,13 +417,13 @@ export default {
},
{
name: "条码注册公告",
path: "/Business/Notice",
path: "/Business/Notice?id=zhuce",
active: "",
id: "zhuce",
},
{
name: "条码注销公告",
path: "/Business/Notice",
path: "/Business/Notice?id=zhuxiao",
active: "",
id: "zhuxiao",
},
......
......@@ -26,12 +26,14 @@ export default {
computed: {
...mapState("system", ["breadcrumb"]),
bread() {
if(this.breadcrumb&&this.breadcrumb.length>0){
console.log(this.breadcrumb, 'bread');
if (this.breadcrumb && this.breadcrumb.length > 0) {
const bread = [...this.breadcrumb];
console.log(bread, 'bread');
bread[bread.length - 1].active = true;
return bread;
}else{
return []
} else {
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