{"remainingRequest":"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\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\jd_cgpt_fvue\\src\\components\\layout\\Navigator.vue","mtime":1719693626504},{"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":["//\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//\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\r\nimport topMenu from './TopMenu.vue'\r\nimport HtAvatar from '@/components/common/HtAvatar.vue'\r\nimport langSelect from '@/components/langSelect'\r\nimport {mapState} from 'vuex'\r\nimport ScrollView from './ScrollView.vue'\r\nexport default {\r\n name: 'navigator',\r\n components: {topMenu, HtAvatar, langSelect, ScrollView},\r\n props: ['menuShow', 'navMode', 'aliasPath', 'bizMenuIndex', 'bizMenuAlias'],\r\n data() {\r\n return {\r\n hasAuthToBigScreen: null, //是否有大屏菜单\r\n companyName: '', //系统名称\r\n logoUrl: '', //logo地址\r\n bizMenu: [], // 工作台菜单\r\n bigScreen: [] //大屏菜单\r\n }\r\n },\r\n created() {\r\n if (this.navMode == 'topMenu' || this.navMode == 'topSideMenu-UD')\r\n this.getSysInfo()\r\n },\r\n mounted() {\r\n this.$store.dispatch('user/loadCurrentUserDetail')\r\n this.filterBizMenu(this.frontMenus)\r\n this.checkBigScreenAuth()\r\n },\r\n computed: {\r\n ...mapState({\r\n currentUser: state => state.user.currentUserDetail,\r\n token: state => state.login.currentUser.token,\r\n frontMenus: state => {\r\n return state.menu.frontMenus\r\n },\r\n sysMenus: state => state.menu.sysMenus,\r\n userType: function() {\r\n if (this.currentUser && this.currentUser.user) {\r\n return this.currentUser.user.userType\r\n }\r\n }\r\n }),\r\n activeMenu: {\r\n get: function() {\r\n return this.aliasPath[this.bizMenuIndex]\r\n },\r\n set: function(value) {\r\n return value\r\n }\r\n }\r\n },\r\n methods: {\r\n // 菜单的收折\r\n handleMenuCollapse() {\r\n this.$emit('update:menuShow', !this.menuShow)\r\n },\r\n // 获取系统信息\r\n getSysInfo() {\r\n let url = '${uc}/uc/tenantManage/v1/getTenantByCode?code=platform'\r\n this.$http.get(url).then(resp => {\r\n if (resp.data) {\r\n let tenantManage = resp.data\r\n this.companyName = tenantManage.nameFront\r\n if (tenantManage.frontLogo) {\r\n let frontLogo = JSON.parse(tenantManage.frontLogo)\r\n if (frontLogo && frontLogo.length > 0) {\r\n this.$http\r\n .get(\r\n window.context.portal +\r\n '/file/onlinePreviewController/v1/getFileById_' +\r\n frontLogo[0].id,\r\n 'arraybuffer'\r\n )\r\n .then(response => {\r\n let type = response.headers['content-type']\r\n if (type) {\r\n this.logoUrl = window.URL.createObjectURL(\r\n new Blob([response.data], {\r\n type: type\r\n })\r\n )\r\n } else {\r\n this.logoUrl = window.URL.createObjectURL(\r\n new Blob([response.data])\r\n )\r\n }\r\n })\r\n }\r\n }\r\n }\r\n })\r\n },\r\n openResetPwdDialog() {\r\n this.$router.push({\r\n path: '/platLayout/resetPwdView',\r\n query: {type: 'settings'}\r\n })\r\n },\r\n openPersonalCenter() {\r\n this.$router.push({\r\n path: '/platLayout/PersonalInfo'\r\n })\r\n },\r\n handleSysPlat() {\r\n // let url = window.context.manage + '/getAuth?token=' + this.token\r\n // window.open(url, '_blank')\r\n if (!this.sysMenus.length) {\r\n this.$store.dispatch('menu/actionSysMenus').then((res) => {\r\n if (res) {\r\n window.open(\r\n window.context.manage +\r\n // \"http://localhost:8081/mvue\"+\r\n '/sysplat/' +\r\n `${this.sysMenus[0].children[0].alias}` +\r\n '?token=' +\r\n this.token,\r\n '_blank'\r\n )\r\n }\r\n })\r\n } else {\r\n window.open(\r\n window.context.manage +\r\n // \"http://localhost:8081/mvue\"+\r\n '/sysplat/' +\r\n `${this.sysMenus[0].children[0].alias}` +\r\n '?token=' +\r\n this.token,\r\n '_blank'\r\n )\r\n }\r\n },\r\n logout() {\r\n this.$store.dispatch('menu/clearMenus')\r\n this.$store.dispatch('user/clearUser')\r\n this.$store.dispatch('menu/setCopyMenus', [])\r\n let loginRouthPath =\r\n localStorage.getItem(\r\n this.$store.state.login.currentUser.account + 'loginRoutePath'\r\n ) || '/login'\r\n this.$store.dispatch('login/logoutAndCleanUp').then(() => {\r\n switch (window.ssoConfig.mode) {\r\n case 'cas':\r\n case 'oauth':\r\n window.sessionStorage.removeItem('currentUser')\r\n window.location.href =\r\n window.ssoConfig.logout +\r\n '?service=' +\r\n window.location.href.split('?')[0]\r\n break\r\n default:\r\n this.$router.push({\r\n path: loginRouthPath\r\n })\r\n break\r\n }\r\n })\r\n },\r\n // 是否有大屏菜单\r\n checkBigScreenAuth() {\r\n this.bigScreen = this.frontMenus.filter(\r\n item => item.alias === 'bigScreen'\r\n )\r\n this.hasAuthToBigScreen = this.bigScreen.length ? true : false\r\n },\r\n // 跳转回到大屏\r\n toBigScreenIndex() {\r\n if (!this.hasAuthToBigScreen) return\r\n let alise = this.bigScreen[0].children[0].alias\r\n console.log(alise)\r\n this.$router.push({\r\n path: `/${alise}`\r\n })\r\n },\r\n // 过滤出业务菜单\r\n filterBizMenu(menus) {\r\n menus.forEach(item => {\r\n if (item.alias === this.bizMenuAlias) {\r\n this.bizMenu = item.children\r\n } else if (item.children && item.children.length) {\r\n this.filterBizMenu(item.children)\r\n }\r\n })\r\n },\r\n handleClickMenu(item) {\r\n console.log(item)\r\n let hasSideMenu = item.children.length ? true : false\r\n this.$emit('update:menuShow', hasSideMenu)\r\n this.activeMenu = item.alias\r\n if (hasSideMenu) {\r\n let childrens = item.children\r\n let subPath = childrens[0].alias\r\n if (childrens[0].children && childrens[0].children.length !== 0) {\r\n let threeChildrens = childrens[0].children\r\n let threePath = threeChildrens[0].alias\r\n this.$router.push('/platLayout/' + threePath)\r\n } else {\r\n this.$router.push('/platLayout/' + subPath)\r\n }\r\n } else {\r\n this.$router.push('/platLayout/' + item.alias)\r\n this.activeMenu = item.alias\r\n }\r\n }\r\n }\r\n}\r\n",null]}