{"remainingRequest":"/Users/lihai/jolijoli/pad_spa/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/lihai/jolijoli/pad_spa/src/components/common/layout/layout.vue?vue&type=script&lang=js&","dependencies":[{"path":"/Users/lihai/jolijoli/pad_spa/src/components/common/layout/layout.vue","mtime":1652253575810},{"path":"/Users/lihai/jolijoli/pad_spa/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/lihai/jolijoli/pad_spa/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/Users/lihai/jolijoli/pad_spa/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/lihai/jolijoli/pad_spa/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport leftMenu from './leftMenu'\nimport api from '@/server/home'\nimport { mapState } from 'vuex'\n\nexport default {\n data () {\n return {\n isFold: false, //导航菜单面板是否折叠\n userId: 0,\n menuIndex: 0,\n isback: false\n }\n },\n created () {\n this.initData();\n },\n components: {\n leftMenu,\n },\n methods: {\n initData () {\n let sskey = tool.getYdUserKey(\"session_key\");\n let userId = tool.getYdUserKey('user_id');\n let enterprise_id = tool.getYdUserKey('enterprise_id');\n if (!userId || !sskey) {\n tool.toLogin();\n return;\n }\n this.userId = userId;\n // this.$router.replace('/home');\n },\n loginOut () {\n let keys = document.cookie.match(/[^ =;]+(?=\\=)/g);\n if (keys) {\n for (let i = keys.length; i--;)\n document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()\n }\n tool.toLogin();\n },\n changeMenu (index) {\n this.menuIndex = index\n },\n goBack () {\n this.$router.back()\n }\n },\n computed: {\n ...mapState(['user']),\n routerItems () {\n let resultArr = [];\n let routeNow = this.$route;\n let RootName = routeNow.matched[0].name; //当前路由的根路由name\n resultArr.push({\n name: RootName,\n path: ''\n })\n if (routeNow.matched[0].path !== '' && RootName !== routeNow.name) {\n if (RootName !== routeNow.name) {\n resultArr.push({\n name: routeNow.matched[1].name,\n path: routeNow.matched[1].path\n })\n }\n }\n return resultArr;\n }\n },\n}\n\n",{"version":3,"sources":["layout.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"layout.vue","sourceRoot":"src/components/common/layout","sourcesContent":["\n\n\n\n"]}]}