|
|
|
|
@ -287,6 +287,363 @@ const user = { |
|
|
|
|
// console.log(8888,'获取userid',state.userInfo)
|
|
|
|
|
|
|
|
|
|
getRoutes(userId).then((res) => { |
|
|
|
|
// console.log('接口获取路由信息',res)
|
|
|
|
|
// let res = {
|
|
|
|
|
// data: {
|
|
|
|
|
// success: true,
|
|
|
|
|
// message: "操作成功!",
|
|
|
|
|
// code: 200,
|
|
|
|
|
// result: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769923",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "firstOrder",
|
|
|
|
|
// name: "一级库管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/firstOrder",
|
|
|
|
|
// source: "iconfont iconicon_roundadd",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 1,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769924",
|
|
|
|
|
// parentId: "1946092006130769923",
|
|
|
|
|
// code: "firstOrderList",
|
|
|
|
|
// name: "库存列表",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/firstOrder/list",
|
|
|
|
|
// source: "iconfont iconicon_task_done",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 1,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769925",
|
|
|
|
|
// parentId: "1946092006130769923",
|
|
|
|
|
// code: "firstOrderInbound",
|
|
|
|
|
// name: "一级库入库",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/firstOrder/inbound",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 2,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769926",
|
|
|
|
|
// parentId: "1946092006130769923",
|
|
|
|
|
// code: "firstOrderOutbound",
|
|
|
|
|
// name: "一级库出库",
|
|
|
|
|
// alias: "memu",
|
|
|
|
|
// path: "/firstOrder/outbound",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 3,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769927",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "secondOrder",
|
|
|
|
|
// name: "二级库管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/secondOrder",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 2,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769928",
|
|
|
|
|
// parentId: "1946092006130769927",
|
|
|
|
|
// code: "secondOrderList",
|
|
|
|
|
// name: "易耗品列表",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/secondOrder/list",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 1,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769929",
|
|
|
|
|
// parentId: "1946092006130769927",
|
|
|
|
|
// code: "secondOrderInbound",
|
|
|
|
|
// name: "二级库入库",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/secondOrder/inbound",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 2,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769930",
|
|
|
|
|
// parentId: "1946092006130769927",
|
|
|
|
|
// code: "secondOrderOutbound",
|
|
|
|
|
// name: "二级库出库",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/secondOrder/outbound",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 3,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769931",
|
|
|
|
|
// parentId: "1946092006130769927",
|
|
|
|
|
// code: "materialsExpend",
|
|
|
|
|
// name: "耐用品列表",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/materials/expend",
|
|
|
|
|
// source: "iconfont iconicon_share",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 4,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769932",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "materials",
|
|
|
|
|
// name: "物资管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/materials",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 3,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769933",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "purchaseOrders",
|
|
|
|
|
// name: "采购单管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/purchaseOrders",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 4,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769934",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "demandOrder",
|
|
|
|
|
// name: "需求单管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/demandOrder",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 5,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1946092006130769935",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "dataAnalysis",
|
|
|
|
|
// name: "数据分析",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/dataAnalysis",
|
|
|
|
|
// source: "iconfont iconicon_voipphone",
|
|
|
|
|
// component: null,
|
|
|
|
|
// sort: 6,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: "",
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1123598815738675203",
|
|
|
|
|
// parentId: "0",
|
|
|
|
|
// code: "system",
|
|
|
|
|
// name: "系统管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/system",
|
|
|
|
|
// source: "iconfont iconicon_setting",
|
|
|
|
|
// component: "",
|
|
|
|
|
// sort: 99,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: null,
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "1123598815738675308",
|
|
|
|
|
// parentId: "1123598815738675203",
|
|
|
|
|
// code: "role",
|
|
|
|
|
// name: "角色管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/authority/role",
|
|
|
|
|
// source: "iconfont icon-hezuohuobanmiyueguanli",
|
|
|
|
|
// component: "",
|
|
|
|
|
// sort: 1,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: null,
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1123598815738675206",
|
|
|
|
|
// parentId: "1123598815738675203",
|
|
|
|
|
// code: "dict",
|
|
|
|
|
// name: "系统字典",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/system/dict",
|
|
|
|
|
// source: "iconfont iconicon_addresslist",
|
|
|
|
|
// component: "",
|
|
|
|
|
// sort: 4,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: null,
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "1123598815738675207",
|
|
|
|
|
// parentId: "1123598815738675203",
|
|
|
|
|
// code: "menu",
|
|
|
|
|
// name: "菜单管理",
|
|
|
|
|
// alias: "menu",
|
|
|
|
|
// path: "/system/menu",
|
|
|
|
|
// source: "iconfont iconicon_subordinate",
|
|
|
|
|
// component: "",
|
|
|
|
|
// sort: 6,
|
|
|
|
|
// category: 1,
|
|
|
|
|
// action: 0,
|
|
|
|
|
// isOpen: 1,
|
|
|
|
|
// remark: null,
|
|
|
|
|
// isDeleted: 0,
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// parentName: null,
|
|
|
|
|
// categoryName: null,
|
|
|
|
|
// actionName: null,
|
|
|
|
|
// isOpenName: null,
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// timestamp: 1769062184895,
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
const data = res.data.result |
|
|
|
|
let menu = deepClone(data); |
|
|
|
|
menu.forEach(ele => { |
|
|
|
|
|