{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/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/views/Main.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/views/Main.vue","mtime":1725957645735},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/babel.config.js","mtime":1725957645200},{"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":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport main_appbar from \"@/components/main_appbar.vue\";\nimport main_navbar from \"@/components/main_navbar.vue\";\nimport main_content from \"@/components/main_content.vue\";\nimport main_domain from \"@/components/domain.vue\";\nimport Constant from \"@/Constant.js\";\nimport config from \"../../public/js/obpm.config.js\";\nimport API from \"@/api.js\";\nvar Base64 = require(\"js-base64\").Base64;\nvar statiContextPath = config.statiContextPath;\nvar signonContextPath = config.signonContextPath;\nexport default {\n name: \"mainpage\",\n provide: function provide() {\n return {\n addTab: this.addTab\n };\n },\n components: {\n \"obpm-main-appbar\": main_appbar,\n main_navbar: main_navbar,\n main_content: main_content,\n main_domain: main_domain\n },\n computed: {\n applicationName: function applicationName() {\n return this.$store.getters.currentAppName;\n },\n showInstance: function showInstance() {\n return this.$store.state.isInstance;\n }\n },\n created: function created() {\n var _this = this;\n this.getLock();\n window.setInterval(function () {\n setTimeout(_this.getOnlineNumber, 0);\n }, 60000);\n var radomNum = new Date().getTime();\n this.$api.getMessage(radomNum, {\n onSucess: function onSucess(res) {\n _this.notice = res.data.data.notice;\n }\n });\n this.$api.getDomainList({\n onSucess: function onSucess(res) {\n if (res.data.data.length) {\n // if(res.data.data[0].systemName){\n // document.title = res.data.data[0].systemName\n // }\n //当前企业域的domainId\n var domainId = _this.$store.state.domainId;\n _this.domainList = res.data.data;\n var data = res.data.data;\n //显示对应的企业域的systemName\n for (var i = 0; i < data.length; i++) {\n if (domainId === data[i].id) {\n document.title = data[i].systemName;\n break;\n }\n }\n if (res.data.data.length > 1) {\n _this.isChangeDomain = true;\n }\n }\n }\n });\n this.$api.getNotificationNum({\n onSucess: function onSucess(res) {\n var otherNotice = res.data.data;\n var arr = [];\n for (var key in otherNotice) {\n var obj = {};\n if (otherNotice[key] > 0 && key != \"size\") {\n obj.type = key.toString();\n obj.value = otherNotice[key];\n arr.push(obj);\n }\n }\n _this.otherNotice = arr;\n }\n });\n },\n data: function data() {\n return {\n appid: \"km1\",\n tabs: [],\n password: \"\",\n isLock: \"false\",\n notice: 0,\n otherNotice: [],\n showMessagePopup: true,\n showMenu: true,\n Constant: Constant,\n updateMenu: \"\",\n updateMenuData: {},\n dialogVisible: false,\n domainDialogVisible: false,\n pwd: \"\",\n isPasswordError: \"\",\n isChangeDomain: false,\n domainList: [],\n nullPrompt: \"\"\n };\n },\n methods: {\n updateViewNumber: function updateViewNumber(menuData) {\n this.updateMenuData = menuData;\n this.updateMenu = new Date().getTime();\n },\n hiddenMenu: function hiddenMenu() {\n this.showMenu = !this.showMenu;\n this.$refs.mychild.setMaincontent(); // 调用子组件的方法\n },\n jumpToInfo: function jumpToInfo(val) {\n this.showMessagePopup = false;\n this.addTab(val);\n },\n closeMessagePopup: function closeMessagePopup() {\n this.showMessagePopup = false;\n },\n signOut: function signOut() {\n this.$api.LogOut({\n onSucess: function onSucess(res) {\n window.localStorage.clear();\n var statiContextPath = obpmConfig.statiContextPath;\n var signonContextPath = obpmConfig.signonContextPath;\n var url = \"\";\n if (statiContextPath) {\n //5.0 trunk\n url = window.location.origin + statiContextPath + signonContextPath + \"/index.html\";\n } else {\n //4.4 stable\n url = window.location.origin + signonContextPath + \"/index.html\";\n }\n window.location.href = url;\n }\n });\n },\n getLock: function getLock() {\n var val = localStorage.getItem(\"screenLock\");\n if (val) {\n this.isLock = val;\n } else {\n this.isLock = \"false\";\n }\n },\n getOnlineNumber: function getOnlineNumber() {\n var _this2 = this;\n this.$api.getNotification({\n onSucess: function onSucess(res) {\n if (res.data.data.data && res.data.data.data.length > 0) {\n var data = res.data.data.data[0];\n _this2.$notify({\n title: \"\",\n dangerouslyUseHTMLString: true,\n message: \"你有一条新消息\",\n duration: 5000,\n customClass: \"fontclass\"\n });\n }\n }\n });\n },\n systemManagement: function systemManagement() {\n var domainid = this.$store.state.domainId;\n var domainName; //企业域名称\n for (var i = 0; i < this.domainList.length; i++) {\n if (domainid === this.domainList[i].id) {\n domainName = this.domainList[i].name;\n }\n }\n var statiContextPath = obpmConfig.statiContextPath;\n var systemUrl = \"\";\n if (statiContextPath) {\n //5.0 trunk\n systemUrl = obpmConfig.statiContextPath + \"/domain/index.html#/domain?domainid=\" + domainid + \"&from=systemManagement\" + \"&name=\" + domainName; //&from=systemManagement让deisgner那边可以获取到标识\n } else {\n //4.4 stable\n systemUrl = obpmConfig.obpmFilePath + \"/domain/index.html#/domain?domainid=\" + domainid + \"&from=systemManagement\" + \"&name=\" + domainName;\n }\n window.open(systemUrl);\n },\n changeDomain: function changeDomain() {\n this.domainDialogVisible = true;\n },\n //退出系统\n Actionquit: function Actionquit() {\n API.LogOut({\n onSucess: function onSucess(response) {\n if (response.status == 200) {\n window.location = \"http://localhost:8080/signon/\";\n }\n },\n onError: function onError(error) {}\n });\n },\n hanleClickLogin: function hanleClickLogin() {\n var statiContextPath = obpmConfig.statiContextPath;\n var url = \"\";\n if (statiContextPath) {\n //5.0 trunk\n url = window.location.origin + statiContextPath + \"/signon/index.html\";\n } else {\n //4.4 stable\n url = window.location.origin + \"/signon/index.html\";\n }\n window.location.href = url;\n },\n hanleClick: function hanleClick() {\n var _this3 = this;\n var cookie = document.cookie.split(\";\");\n var language, url, path;\n for (var i = 0; i < cookie.length; i++) {\n if (cookie[i].indexOf(\"USERLANGUAGE\") >= 0) {\n language = cookie[i].split(\"=\")[1];\n }\n }\n var str = Base64.encode(this.pwd);\n var userPwd;\n if (str.length > 2) {\n var lp = str.substr(0, 2);\n var rp = str.substr(2, str.length);\n userPwd = rp + lp;\n }\n var data = {\n username: this.$store.state.myProfile.loginNo,\n password: userPwd,\n remember: \"0\",\n debug: false,\n domainName: this.$store.state.myProfile.domainName,\n checkcode: \"\",\n language: language,\n url: url,\n path: path\n };\n this.$api.signonLogin(data, {\n onSucess: function onSucess(res) {\n if (res.data.resultCode != 0) {\n //更新accessToken\n document.cookie = res.data.accessToken;\n localStorage.setItem(\"accessToken\", res.data.accessToken);\n _this3.pwd = \"\";\n _this3.dialogVisible = false;\n _this3.$message({\n message: _this3.$t(\"msg.login_ss\"),\n type: \"success\"\n });\n } else {\n _this3.$message.error(_this3.$t(\"msg.fail_login\"));\n }\n }\n });\n },\n //解除锁屏\n unlockScreen: function unlockScreen() {\n var _this4 = this;\n if (!this.password) {\n this.nullPrompt = this.$t(\"e_password\");\n this.isPasswordError = \"true\";\n setTimeout(function () {\n _this4.isPasswordError = \"\";\n }, 2000);\n } else {\n this.$api.isLock(this.password, {\n onSucess: function onSucess(res) {\n _this4.nullPrompt = \"\";\n if (res.data.data == true) {\n _this4.isLock = \"false\";\n localStorage.setItem(\"screenLock\", \"false\");\n } else {\n _this4.isLock = \"true\";\n _this4.isPasswordError = \"true\";\n setTimeout(function () {\n _this4.isPasswordError = \"\";\n }, 2000);\n }\n }\n });\n }\n //let val = localStorage.getItem('screenLock');\n },\n //一键锁频\n lockScreen: function lockScreen() {\n this.password = \"\";\n this.isLock = \"true\";\n localStorage.setItem(\"screenLock\", \"true\");\n },\n changeMenu: function changeMenu(appid) {\n this.appid = appid;\n },\n activeHome: function activeHome() {\n this.tabs.forEach(function (value) {\n value.active = false;\n });\n },\n addTab: function addTab(param) {\n var flag = false;\n this.tabs.forEach(function (value) {\n if (value.id && value.id == param.id) {\n value.active = true;\n if (param.linkType == \"01\") {\n //视图\n value.randomNumber = param.randomNumber;\n }\n flag = flag || true;\n } else {\n value.active = false;\n }\n });\n if (flag) return;\n this.tabs.forEach(function (value) {\n value.active = false;\n });\n param.active = true;\n this.tabs.push(param);\n },\n closeAllTab: function closeAllTab() {\n this.tabs = [];\n },\n closeTab: function closeTab(tab, tabindex) {\n var tabs = this.tabs;\n if (tabindex >= 0) {\n //点击X关闭\n var currentIndex = \"\";\n var haveParentTab = tabs.some(function (item, index) {\n if (item.id == tab.refreshId) {\n currentIndex = index;\n return true;\n }\n });\n if (haveParentTab) {\n tabs.splice(tabindex, 1);\n tabs.forEach(function (item) {\n item.active = false;\n });\n tabs[currentIndex].active = true;\n } else {\n tabs.splice(tabindex, 1);\n if (tab.active) {\n if (tabs.length > 0 && tabs.length - 1 >= tabindex) {\n tabs[tabindex].active = true;\n } else if (tabs.length > 0 && tabs.length - 1 < tabindex) {\n if (tabindex > 0) {\n tabs[tabindex - 1].active = true;\n }\n }\n }\n }\n } else {\n //单击返回按钮\n var i = -1;\n tabs.forEach(function (value, index) {\n if (value.id && value.id == tab.id || value._select && value._select == tab._select) {\n i = index;\n }\n });\n var _currentIndex = \"\";\n var _haveParentTab = tabs.some(function (item, index) {\n if (item.id == tab.refreshId) {\n _currentIndex = index;\n return true;\n }\n });\n if (_haveParentTab) {\n tabs.splice(i, 1);\n tabs[_currentIndex].active = true;\n } else {\n tabs.splice(i, 1);\n var act = tabs[i];\n if (act) {\n this.activeTab({\n id: act._select ? act._select : act.id\n });\n } else if (i >= 1) {\n var _act = this.tabs[i - 1];\n this.activeTab({\n id: _act._select ? _act._select : _act.id\n });\n } else {\n if (tabs.length > 0) {\n tabs[tabs.length - 1].active = true;\n }\n }\n }\n }\n },\n activeTab: function activeTab(tab, index) {\n if (index >= 0) {\n this.tabs.forEach(function (value, i) {\n if (i == index) {\n value.active = true;\n } else {\n value.active = false;\n }\n });\n } else {\n this.tabs.forEach(function (value) {\n if (value.id && value.id == tab.id || value._select && value._select == tab._select || value._select && value._select == tab.id) {\n value.active = true;\n return;\n } else {\n value.active = false;\n }\n });\n }\n }\n },\n watch: {\n showInstance: function showInstance(val) {\n if (val) {\n this.dialogVisible = true;\n }\n }\n }\n};",null]}