{"remainingRequest":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\components\\layout\\SideMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\components\\layout\\SideMenu.vue","mtime":1701745911888},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\jd_cgpt_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/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/jd_cgpt_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//\nimport { mapState } from 'vuex';\nimport menu from '@/api/menu.js';\nexport default {\n props: ['menuShow', 'navMode', 'bizMenuIndex', 'bizMenuAlias'],\n data: function data() {\n return {\n logoUrl: '',\n companyName: '机电采购平台',\n currentMenu: [],\n activeIndex: '',\n hasAuthTobigScreen: false,\n roleList: [],\n roleCode: '',\n admin: false,\n menuAll: [],\n platReady: undefined\n };\n },\n mounted: function mounted() {\n var _this2 = this;\n\n this.$bus.$on('menuPathReady', function (aliasPath) {\n var menuKey;\n\n if (_this2.navMode == 'topSideMenu-LR' || _this2.navMode == 'topSideMenu-UD') {\n // 根据获取到的全路径取得对应的侧边栏菜单\n menuKey = aliasPath[_this2.bizMenuIndex];\n } else {\n menuKey = _this2.bizMenuAlias; // 非联动菜单则是固定的侧边栏别名,这个别名根据每个业务系统的配置来确定。\n }\n\n _this2.filterBizMenu(_this2.frontMenus, menuKey); // 没有子菜单则隐藏侧边栏\n\n\n var hasSideMenu = _this2.currentMenu.length ? true : false;\n\n _this2.$emit('update:menuShow', hasSideMenu); // 设置菜单高亮\n\n\n _this2.getActiveIndex();\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 created: function created() {\n this.getSysInfo(); // this.getRoleList()\n },\n beforeDestroy: function beforeDestroy() {\n sessionStorage.removeItem('platReady');\n },\n methods: {\n // 页面刷新过滤出当前菜单\n getActiveIndex: function getActiveIndex(to) {\n this.activeIndex = this.$route.path;\n },\n // 筛选出业务菜单\n filterBizMenu: function filterBizMenu(menus, aliasKey) {\n var _this3 = this;\n\n menus.forEach(function (item) {\n if (item.alias === aliasKey) {\n _this3.currentMenu = item.children;\n } else if (item.children && item.children.length) {\n _this3.filterBizMenu(item.children, aliasKey);\n }\n });\n },\n // 获取系统名称、logo\n getSysInfo: function getSysInfo() {\n var _this4 = this;\n\n var url = '${uc}/uc/tenantManage/v1/getTenantByCode?code=platform';\n this.$http.get(url).then(function (resp) {\n if (resp.data) {\n var tenantManage = resp.data; // this.companyName = tenantManage.nameFront\n\n if (tenantManage.frontLogo) {\n var frontLogo = JSON.parse(tenantManage.frontLogo);\n\n if (frontLogo && frontLogo.length > 0) {\n _this4.$http.get(window.context.portal + '/file/onlinePreviewController/v1/getFileById_' + frontLogo[0].id, 'arraybuffer').then(function (response) {\n var type = response.headers['content-type'];\n\n if (type) {\n _this4.logoUrl = window.URL.createObjectURL(new Blob([response.data], {\n type: type\n }));\n } else {\n _this4.logoUrl = window.URL.createObjectURL(new Blob([response.data]));\n }\n });\n }\n }\n }\n });\n },\n // 点击菜单跳转路由\n handleSelect: function handleSelect(path, isJump) {\n var _this5 = 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 = _this5.$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 _this5.$router.push(path);\n\n _this5.activeIndex = path;\n }\n });\n },\n\n /**角色菜单相关 start*/\n changeRole: function changeRole(role) {\n var _this6 = this;\n\n this.roleCode = role;\n sessionStorage.setItem('currentRoleCode', role);\n this.$store.dispatch('menu/actionsRoleMenu', this.roleCode).then(function (data) {\n _this6.menuAll = data;\n\n _this6.filterBizMenu();\n\n _this6.toFirstMenu(data);\n });\n },\n toFirstMenu: function toFirstMenu(data) {\n var fullDataMenus = data && data.filter(function (item) {\n return item.alias === 'bigscreen';\n });\n var dataMenus = fullDataMenus.children[5].children[5].children;\n console.log(dataMenus);\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 _this7 = 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 _this7.roleList = UserDetail.roleList || [];\n sessionStorage.getItem('currentRoleCode', _this7.roleList[0].roleCode);\n\n _this7.currentRoleCode(UserDetail);\n\n _this7.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 /**角色菜单相关 end*/\n\n }\n};",null]}