{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\components\\layout\\SideMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\components\\layout\\SideMenu.vue","mtime":1699938536887},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport _defineProperty from \"D:/jenkins/workspace/damDance-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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//\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//\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//\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//\n//\n//\n//\nimport { mapState } from 'vuex';\nimport menu from '@/api/menu.js';\nexport default {\n props: {\n menuShow: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n currentSubMenu: [],\n activeIndex: '',\n hasAuthTobigScreen: false,\n roleList: [],\n roleCode: '',\n admin: false,\n menuAll: [],\n platReady: undefined\n };\n },\n watch: {\n // 监听路由,如果为首页等非菜单页面,取消菜单选中项\n $route: function $route(to, from) {\n console.log(to.meta.isHome);\n\n if (to.meta.isHome) {\n this.activeIndex = '';\n } else {\n this.filterSubMenu();\n }\n }\n },\n computed: _objectSpread({}, mapState({\n frontMenus: function frontMenus(state) {\n return state.menu.frontMenus;\n },\n roleMenus: function roleMenus(state) {\n return state.menu.roleMenus;\n }\n })),\n mounted: function mounted() {\n var _this2 = this;\n\n this.platReady = sessionStorage.getItem('platReady');\n this.getMenus(); // this.getRoleList()\n\n this.$bus.$on('roterPush', function (path) {\n // console.log('监听到了')\n _this2.activeIndex = path;\n });\n },\n beforeDestroy: function beforeDestroy() {\n sessionStorage.removeItem('platReady');\n },\n methods: {\n changeRole: function changeRole(role) {\n var _this3 = this;\n\n this.roleCode = role;\n sessionStorage.setItem('currentRoleCode', role);\n this.$store.dispatch('menu/actionsRoleMenu', this.roleCode).then(function (data) {\n _this3.menuAll = data;\n\n _this3.filterSubMenu();\n\n _this3.toFirstMenu(data);\n });\n },\n toFirstMenu: function toFirstMenu(data) {\n var dataMenus = data && data.filter(function (item) {\n return item.alias === 'normal';\n });\n\n if (dataMenus && dataMenus.length !== 0) {\n if (dataMenus[0].children.length !== 0 && dataMenus[0].children[0].children.length) {\n this.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].children[0].alias)\n });\n this.activeIndex = \"/platLayout/\".concat(dataMenus[0].children[0].children[0].alias);\n } else {\n this.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].alias)\n });\n this.activeIndex = \"/platLayout/\".concat(dataMenus[0].children[0].alias);\n }\n } else {\n this.$router.push({\n path: \"/platLayout/empty\"\n });\n }\n },\n getRoleList: function getRoleList() {\n var _this4 = this;\n\n var UserDetail = JSON.parse(sessionStorage.getItem('currentUserDetail'));\n\n if (!UserDetail) {\n this.$store.dispatch('user/loadCurrentUserDetail').then(function (res) {\n UserDetail = res;\n _this4.roleList = UserDetail.roleList || [];\n sessionStorage.getItem('currentRoleCode', _this4.roleList[0].roleCode);\n\n _this4.currentRoleCode(UserDetail);\n\n _this4.getMenus();\n });\n } else {\n this.roleList = UserDetail.roleList;\n this.currentRoleCode(UserDetail);\n this.getMenus();\n }\n },\n currentRoleCode: function currentRoleCode(UserDetail) {\n var defaultRole = sessionStorage.getItem('currentRoleCode');\n\n if (!defaultRole) {\n defaultRole = this.roleList[0].roleCode;\n sessionStorage.setItem('currentRoleCode', defaultRole);\n }\n\n this.roleCode = defaultRole;\n var account = UserDetail.user.account; // 系统管理员使用frontMenus\n\n if (this.roleCode == 'sysRole' && account == 'admin') {\n this.admin = true;\n } else {\n this.admin = false;\n }\n },\n getMenus: function getMenus() {\n var _this5 = this;\n\n this.menuAll = []; // if (!this.admin) {\n // this.$store\n // .dispatch('menu/actionsRoleMenu', this.roleCode)\n // .then((data) => {\n // this.menuAll = data\n // this.filterSubMenu()\n // if (!this.platReady) {\n // this.toFirstMenu(data)\n // this.platReady = 'ready'\n // sessionStorage.setItem('platReady', 'ready')\n // }\n // })\n // } else {\n // this.$store.dispatch('menu/actionFrontMenus').then((data) => {\n // this.menuAll = data\n // this.filterSubMenu()\n // if (!this.platReady) {\n // this.toFirstMenu(data)\n // this.platReady = 'ready'\n // sessionStorage.setItem('platReady', 'ready')\n // }\n // })\n // }\n\n this.$store.dispatch('menu/actionFrontMenus').then(function (data) {\n _this5.menuAll = data;\n\n _this5.filterSubMenu();\n\n if (!_this5.platReady) {\n _this5.toFirstMenu(data);\n\n _this5.platReady = 'ready';\n sessionStorage.setItem('platReady', 'ready');\n }\n });\n },\n goIndex: function goIndex() {\n if (!this.hasAuthTobigScreen) return;\n var bigScreen = this.frontMenus.filter(function (item) {\n return item.alias === 'bigScreen';\n });\n var alise = bigScreen[0].children[0].alias;\n this.$router.push({\n path: \"/\".concat(alise)\n });\n },\n // 菜单的收折\n handleMenuCollapse: function handleMenuCollapse() {\n this.$emit('update:menuShow', !this.menuShow);\n },\n handleSelect: function handleSelect(path, isJump) {\n var _this6 = this;\n\n var alias;\n\n var _this = this;\n\n if (path && path.indexOf('/platLayout/href') == -1) {\n var i = path.lastIndexOf('/');\n alias = path.slice(i + 1);\n } else {\n alias = path.replace('/platLayout/', '');\n }\n\n menu.getMenuByAlias(alias, function (m) {\n m && _this.$emit('menuChange', m);\n\n if (m && m.openType == '2' && isJump) {\n if (m.alias.indexOf('href/') == -1) {\n var openPath = '/platLayout/' + m.alias;\n\n var routeUrl = _this6.$router.resolve({\n path: openPath\n });\n\n window.open(routeUrl.href, '_blank');\n } else {\n var tempwindow = window.open();\n tempwindow.location = m.href;\n }\n } else if (m && m.parent) {\n _this6.$router.push(path);\n\n _this6.activeIndex = path;\n }\n });\n },\n // 筛选出选中菜单\n filterSubMenu: function filterSubMenu() {\n console.log(this.menuAll, '角色菜单');\n\n if (this.menuAll && this.menuAll.length) {\n var currentMenu = this.menuAll.filter(function (item) {\n return item.alias == 'normal';\n })[0];\n\n if (currentMenu) {\n this.currentSubMenu = currentMenu.children;\n } else {\n this.currentSubMenu = [];\n }\n\n console.log(this.$route.path, 'this.$route.path');\n this.$refs.sidemenu.activeIndex = this.$route.path;\n var bigScreen = this.roleMenus.filter(function (item) {\n return item.alias === 'bigScreen';\n });\n this.hasAuthTobigScreen = bigScreen.length ? true : false;\n } else {\n this.currentSubMenu = [];\n }\n }\n }\n};",null]}