{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/main_appbar.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/src/components/main_appbar.vue","mtime":1739760944318},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/babel.config.js","mtime":1739760943855},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/es6.function.name\";\n// import API from \"@/api.js\";\n// import projectJSON from '@/assets/json/project.json';\n\nexport default {\n name: \"obpm-main-appbar\",\n data: function data() {\n return {\n tabs: [],\n appid: \"km1\",\n options: [],\n isShowList: false //是否展示软件列表\n };\n },\n created: function created() {\n // this.getApplications();\n },\n computed: {\n //导航栏常用列表\n navCommonlyUsed: function navCommonlyUsed() {\n var data = this.$store.getters.getNaviBarCommonlyUsed;\n return data;\n },\n data: function data() {\n return this.$store.state.apps;\n }\n },\n methods: {\n onCommonlyUsedClick: function 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 var url = menu.actionContent;\n var isForm = url.search(\"form.html\") != -1;\n var isView = url.search(\"view.html\") != -1;\n var isChart = url.search(\"chart.html\") != -1;\n var urlArrayF = url.split(\"?\");\n var urlArray = '';\n if (urlArrayF[1]) {\n urlArray = urlArrayF[1].split(\"&\");\n }\n var isExternalLink = false;\n var type = '';\n if (isForm) {\n type = '00';\n } else if (isView) {\n type = \"01\";\n } else if (isChart) {\n type = \"02\";\n } else if (!isForm && !isView) {\n type = \"103\"; //widget链接内容链接地址\n isExternalLink = true;\n }\n var obj = {};\n if (urlArray && urlArray.length > 0) {\n for (var i = 0; i < urlArray.length; i++) {\n var val = urlArray[i].split(\"=\");\n obj[val[0]] = val[1];\n }\n }\n if (isExternalLink) {\n this.$emit(\"add-tab\", {\n linkType: type,\n appId: menu.applicationId,\n actionContent: menu.actionContent,\n name: menu.name,\n _select: '',\n viewId: \"\"\n });\n } else {\n this.$emit(\"add-tab\", {\n linkType: type,\n appId: menu.applicationId,\n actionContent: obj.viewId ? obj.viewId : obj.formId ? obj.formId : obj.chartId,\n name: menu.name,\n _select: '',\n viewId: \"\"\n });\n }\n // this.$emit(\"add-tab\", {\n // id: menu.id,\n // name: menu.name,\n // appId: this.data.appId,\n // linkType: '103',\n // actionContent: menu.actionContent,//存放FORMID或VIEWID\n // });\n }\n },\n getApplications: function getApplications() {\n var _this = this;\n this.$api.getApplications({\n onSucess: function onSucess(res) {\n _this.options = res.data.data;\n }\n });\n },\n loadAppMenu: function loadAppMenu(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\", {\n appId: appId,\n name: name\n });\n },\n activeHome: function activeHome() {\n this.tabs.forEach(function (value) {\n value.active = false;\n });\n },\n closeTab: function closeTab(tab) {\n var i = -1;\n this.tabs.forEach(function (value, index) {\n if (value.id == tab.id) {\n i = index;\n }\n });\n this.tabs.splice(i, 1);\n var act = this.tabs[i];\n if (act) {\n this.activeTab({\n id: act.id\n });\n }\n },\n activeTab: function activeTab(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 beforeCreate() {\n var user = this.$root.user;\n var 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 var applications = this.$root.applications;\n this.$store.dispatch(\"loadApps\", applications); //异步执行\n }\n};",null]}