{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/views/Menu.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/views/Menu.vue","mtime":1740130327260},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/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\nimport { Toast } from 'mint-ui';\nimport API from \"@/api.js\";\nimport Constant from \"@/Constant.js\";\nexport default {\n name: \"Menu\",\n data: function() {\n return {\n menus: [],\n Constant,\n contextPath:'',\n appTitle:'',\n aToken:'',\n };\n },\n created() {\n this.aToken = \"?accessToken=\" + localStorage.getItem(\"accessToken\")\n this.contextPath = obpmConfig.obpmFilePath;\n API.getMenus(this.$root.appid, {\n onSucess: response => {\n this.menus = response.data.data;\n }\n });\n },\n activated() {\n let positionY = this.$store.state.scrollY\n let scrollId = document.getElementById(\"menu-bg\")\n if( positionY === 0 ) {\n scrollId.scrollTo(0, 0)\n }else {\n scrollId.scrollTo(0, positionY) //页面激活时控制滚动条滚动到指定的位置\n }\n },\n beforeRouteLeave(to, from, next) {\n // from.meta.keepAlive = true;\n let scrollY = document.getElementById(\"menu-bg\").scrollTop //离开之前记录此时滚动条的位置\n this.$store.commit('saveScrollY', scrollY)\n next();\n },\n\n methods: {\n doBack() {\n this.$router.go(-1)\n },\n nav_click(viewId, item) {\n //:to=\"{name:'open', query:{linkType:menu3.linkType,actionContent:menu3.actionContent}}\"\n let appId = this.$root.appid;\n let params = {};\n switch (item.linkType) {\n case \"00\": \n params = {linkType:'00',actionContent:viewId};\n if(item.queryString) {\n params.queryString = item.queryString;\n }\n this.$router.push({ \n name: 'open',\n query: params\n })\n break;\n case \"01\": \n this.$api.hasPermissionToView(appId, viewId, {\n onSucess: response => {\n if(response.data.data) {\n params = {linkType:'01',actionContent:viewId};\n this.$router.push({ \n name:'open',\n query:params,\n })\n }else {\n Toast(this.$t('notPermission'))\n }\n }\n });\n break;\n case \"02\": \n this.$router.push({ \n name:'chart',\n query:{linkType:'02',actionContent:viewId}\n })\n break;\n\t\t\t\tcase \"07\": \n params = {\n linkType:'103', \n actionContent:viewId, \n showBack: true\n };\n this.$router.push({ \n name:'open',\n query:params,\n });\n\t\t \tbreak;\n case \"09\": \n this.$api.getCustomreports(viewId,\n {\n onSucess: response => {\n let urls = obpmConfig.obpmFilePath + \"/\" + response.data;\n this.$router.push({ \n name:'report',\n query:{linkType:'09', actionContent:viewId, path:urls}\n })\n // if(urls.split(\"=\")[2]) {\n // let arr = urls.split(\"=\")[2];\n // if(arr.split(\";\")[0]) {\n // let arr2 = arr.split(\";\")[0];\n // if(arr2.split(\"'\")[1]) {\n // let currentUrl = arr2.split(\"'\")[1];\n // this.$router.push({ \n // name:'report',\n // query:{linkType:'09',actionContent:viewId,path:currentUrl}\n // })\n // }\n // }\n // }\n }\n }\n );\n break;\n default:\n break;\n }\n\n\n\n\n\n // if(item.linkType == \"09\") { //报表\n // this.$router.push({ \n // name:'report',\n // query:{linkType:'09',actionContent:viewId}\n // })\n // }else if(item.linkType == \"02\") { //图表\n // this.$router.push({ \n // name:'chart',\n // query:{linkType:'02',actionContent:viewId}\n // })\n // }else {\n // this.$api.hasPermissionToView(appId, viewId, {\n // onSucess: response => {\n // if(response.data.data) {\n // this.$router.push({ \n // name:'open',\n // query:{linkType:'01',actionContent:viewId}\n // })\n // }else {\n // Toast(this.$t('notPermission'))\n // }\n // }\n // })\n // }\n },\n setMenus(arr){\n for(let i=0;i0) {\n this.setMenus(arr[i].children)\n }else {\n if(arr[i].linkType && arr[i].linkType == \"00\"){\n arr.splice(i, 1);\n i--;\n }\n }\n }\n },\n },\n mounted(){\n this.appTitle=document.title\n },\n\n watch: {\n menus() {\n // this.setMenus(arr);\n \n },\n },\n\n};\n",null]}