{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/main_appbar.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/main_appbar.vue","mtime":1725957645725},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["\n// import API from \"@/api.js\";\n// import projectJSON from '@/assets/json/project.json';\n\nexport default {\n name: \"obpm-main-appbar\",\n data() {\n return {\n tabs: [],\n appid: \"km1\",\n options: [],\n isShowList: false, //是否展示软件列表\n };\n },\n\n created() {\n // this.getApplications();\n },\n\n computed: {\n //导航栏常用列表\n navCommonlyUsed() {\n let data = this.$store.getters.getNaviBarCommonlyUsed;\n return data;\n },\n\n data: function() {\n return this.$store.state.apps;\n }\n },\n methods: {\n onCommonlyUsedClick(menu) {\n if(menu.type == 'view') {\n this.$emit(\"add-tab\", {\n id: menu.id,\n name: menu.name,\n appId: menu.applicationId,\n linkType: '01',\n actionContent: menu.actionContent,//存放FORMID或VIEWID\n });\n }else if (menu.type == 'chart') {\n this.$emit(\"add-tab\", {\n id: menu.id,\n name: menu.name,\n appId: menu.applicationId,\n linkType: '02',\n actionContent: menu.actionContent,//存放FORMID或VIEWID\n });\n }else if (menu.type == 'customizeReport') {\n this.$emit(\"add-tab\", {\n id: menu.id,\n name: menu.name,\n appId: menu.applicationId,\n linkType: '09',\n actionContent: menu.actionContent,//存放FORMID或VIEWID\n });\n }else if (menu.type == 'page') {\n let url = menu.actionContent;\n let isForm = url.search(\"form.html\") != -1;\n let isView = url.search(\"view.html\") != -1;\n let isChart = url.search(\"chart.html\") != -1;\n let urlArrayF = url.split(\"?\");\n let urlArray = '';\n if(urlArrayF[1]) {\n urlArray = urlArrayF[1].split(\"&\");\n }\n let isExternalLink = false;\n let type = '';\n if(isForm) {\n type = '00';\n }else if(isView) {\n type = \"01\"\n }else if(isChart) {\n type = \"02\"\n }\n else if (!isForm && !isView) {\n type = \"103\"//widget链接内容链接地址\n isExternalLink = true\n }\n let obj = {};\n if(urlArray && urlArray.length > 0) {\n for(let i=0; i {\n this.options = res.data.data;\n }\n });\n },\n loadAppMenu: function(appId, name) {\n if (appId != \"km\" && appId != \"pm\" && appId != \"qm\") {\n this.$root.appid = appId;\n }\n // if(appId === 'km') {\n // let ary = projectJSON.km;\n // console.log(\"arr--->\",ary);\n // }else if(appId === 'qm') {\n // \n // }else {\n // this.$store.dispatch(\"loadMenus\", appId);\n\n // }\n this.$store.dispatch(\"loadMenus\", {appId, name});\n \n },\n\n activeHome: function() {\n this.tabs.forEach(function(value) {\n value.active = false;\n });\n },\n \n closeTab: function(tab) {\n \n let i = -1;\n this.tabs.forEach(function(value, index) {\n if (value.id == tab.id) {\n i = index;\n }\n });\n\n this.tabs.splice(i, 1);\n let act = this.tabs[i];\n if (act) {\n this.activeTab({ id: act.id });\n }\n },\n activeTab: function(tab) {\n this.tabs.forEach(function(value) {\n if (value.id == tab.id) {\n value.active = true;\n } else {\n value.active = false;\n }\n });\n }\n },\n beforeCreate: function() {\n let user = this.$root.user;\n let obj = {\n doId: user.domainId,\n userId: user.id,\n profile: user,\n }\n this.$store.commit('landingUser', obj);\n // this.$store.dispatch(\"landingUser\");\n let applications = this.$root.applications;\n this.$store.dispatch(\"loadApps\", applications); //异步执行\n }\n};\n",null]}