{"remainingRequest":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\router\\dynamicMuen.js","dependencies":[{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\router\\dynamicMuen.js","mtime":1663828782929},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\babel.config.js","mtime":1663828782900},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000}],"contextDependencies":[],"result":["import _toConsumableArray from \"C:/Users/100zone/Desktop/baizong/community/SmartCommunity/videoSurveillance/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport store from \"../store/store.js\";\nvar staticMuen = [{\n path: '/msg',\n component: function component() {\n return import(\n /* webpackChunkName: \"messages\" */\n '@views/messages');\n },\n meta: {\n title: '消息中心'\n }\n}, {\n path: '/403',\n component: function component() {\n return import(\n /* webpackChunkName: \"404\" */\n '@views/errorPage/403.vue');\n },\n meta: {\n title: '403'\n }\n}, {\n path: '/404',\n component: function component() {\n return import(\n /* webpackChunkName: \"404\" */\n '@views/errorPage/404.vue');\n },\n meta: {\n title: '404'\n }\n}, {\n path: '*',\n redirect: '/404'\n}]; //路由格式\n// 自定义路由文件\n\nvar setListMunt = function setListMunt(arrList, item) {\n var newOb = {};\n newOb = {\n path: \"/\".concat(item.linkPath),\n component: function component() {\n return import(\"@/views/\".concat(item.linkPath, \".vue\"));\n },\n meta: {\n title: item.name\n }\n };\n arrList.push(newOb);\n};\n\nvar dimension = function dimension(arrList, arr) {\n arr.forEach(function (item, index) {\n if (!!item.children) {\n dimension(arrList, item.children);\n } else {\n setListMunt(arrList, item);\n }\n });\n}; //添加路由\n\n\nvar AddRt = function AddRt(router, dynamicMuenList) {\n var NEWdynamicMuenList = [].concat(_toConsumableArray(dynamicMuenList), staticMuen);\n\n if (NEWdynamicMuenList.length !== 0) {\n NEWdynamicMuenList.forEach(function (item) {\n router.options.routes[0].children.push(item);\n });\n router.addRoutes(router.options.routes);\n }\n};\n\nexport var funcRouter = function funcRouter(arr, data, router) {\n dimension(arr, data);\n store.commit('setMenuList', data);\n AddRt(router, arr);\n};",{"version":3,"sources":["C:/Users/100zone/Desktop/baizong/community/SmartCommunity/videoSurveillance/src/router/dynamicMuen.js"],"names":["store","staticMuen","path","component","meta","title","redirect","setListMunt","arrList","item","newOb","linkPath","name","push","dimension","arr","forEach","index","children","AddRt","router","dynamicMuenList","NEWdynamicMuenList","length","options","routes","addRoutes","funcRouter","data","commit"],"mappings":";;;AAAA,OAAOA,KAAP;AACA,IAAMC,UAAU,GAAG,CACf;AACIC,EAAAA,IAAI,EAAE,MADV;AAEIC,EAAAA,SAAS,EAAE;AAAA,WAAM;AAAO;AAAmC,qBAA1C,CAAN;AAAA,GAFf;AAGIC,EAAAA,IAAI,EAAE;AAAEC,IAAAA,KAAK,EAAE;AAAT;AAHV,CADe,EAMf;AACIH,EAAAA,IAAI,EAAE,MADV;AAEIC,EAAAA,SAAS,EAAE;AAAA,WAAM;AAAO;AAA8B,8BAArC,CAAN;AAAA,GAFf;AAGIC,EAAAA,IAAI,EAAE;AAAEC,IAAAA,KAAK,EAAE;AAAT;AAHV,CANe,EAWf;AACIH,EAAAA,IAAI,EAAE,MADV;AAEIC,EAAAA,SAAS,EAAE;AAAA,WAAM;AAAO;AAA8B,8BAArC,CAAN;AAAA,GAFf;AAGIC,EAAAA,IAAI,EAAE;AAAEC,IAAAA,KAAK,EAAE;AAAT;AAHV,CAXe,EAgBf;AAC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AAA,MAAM,CAACM,SAAP,CAAiBN,MAAM,CAACI,OAAP,CAAeC,MAAhC;AACH;AACJ,CARD;;AAUA,OAAO,IAAME,UAAU,GAAG,SAAbA,UAAa,CAACZ,GAAD,EAAMa,IAAN,EAAYR,MAAZ,EAAuB;AAC7CN,EAAAA,SAAS,CAACC,GAAD,EAAMa,IAAN,CAAT;AACA5B,EAAAA,KAAK,CAAC6B,MAAN,CAAa,aAAb,EAA4BD,IAA5B;AACAT,EAAAA,KAAK,CAACC,MAAD,EAASL,GAAT,CAAL;AACH,CAJM","sourcesContent":["import store from '../store/store.js';\r\nconst staticMuen = [\r\n {\r\n path: '/msg',\r\n component: () => import(/* webpackChunkName: \"messages\" */ '@views/messages'),\r\n meta: { title: '消息中心' }\r\n },\r\n {\r\n path: '/403',\r\n component: () => import(/* webpackChunkName: \"404\" */ '@views/errorPage/403.vue'),\r\n meta: { title: '403' }\r\n },\r\n {\r\n path: '/404',\r\n component: () => import(/* webpackChunkName: \"404\" */ '@views/errorPage/404.vue'),\r\n meta: { title: '404' }\r\n },\r\n {\r\n path: '*',\r\n redirect: '/404'\r\n }\r\n];\r\n//路由格式\r\n// 自定义路由文件\r\nconst setListMunt = (arrList, item) => {\r\n let newOb = {};\r\n newOb = {\r\n path: `/${item.linkPath}`,\r\n component: () => import(`@/views/${item.linkPath}.vue`),\r\n meta: { title: item.name }\r\n };\r\n arrList.push(newOb);\r\n};\r\nconst dimension = (arrList, arr) => {\r\n arr.forEach((item, index) => {\r\n if (!!item.children) {\r\n dimension(arrList, item.children);\r\n } else {\r\n setListMunt(arrList, item);\r\n }\r\n });\r\n};\r\n//添加路由\r\nconst AddRt = (router, dynamicMuenList) => {\r\n let NEWdynamicMuenList = [...dynamicMuenList, ...staticMuen];\r\n if (NEWdynamicMuenList.length !== 0) {\r\n NEWdynamicMuenList.forEach((item) => {\r\n router.options.routes[0].children.push(item);\r\n });\r\n router.addRoutes(router.options.routes);\r\n }\r\n};\r\n\r\nexport const funcRouter = (arr, data, router) => {\r\n dimension(arr, data);\r\n store.commit('setMenuList', data);\r\n AddRt(router, arr);\r\n};\r\n"]}]}