{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\components\\layout\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\layout\\Navigator.vue","mtime":1719339193803},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _toConsumableArray from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.regexp.constructor\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport HtAvatar from '@/components/common/HtAvatar.vue';\n// import LangSelect from '@/components/lang/LangSelect.vue'\n// import FrontMenu from '../layout/FrontMenu.vue'\nimport screenfull from 'screenfull';\nimport { mapState } from 'vuex';\nimport { Base64 } from 'js-base64';\nimport req from '@/request.js';\nimport projectMessageDrawer from '@/components/message/projectMessageDrawer';\nimport uc from '@/api/uc.js';\nimport QRCode from 'qrcode';\nimport { now } from 'moment';\nexport default {\n name: 'navigator',\n components: {\n projectMessageDrawer: projectMessageDrawer,\n HtAvatar: HtAvatar\n },\n props: ['menuShow', 'showTopMenu'],\n data: function data() {\n var _this2 = this;\n var validateNew = function validateNew(rule, value, callback) {\n if (value === '') {\n callback(new Error('请输入新密码'));\n }\n var config = _this2.pwdStrategy;\n if (config.enable == 1) {\n var pwdRule = config.pwdRule;\n var pwdLength = config.pwdLength;\n if (pwdRule) {\n if (value.length < pwdLength) {\n callback(new Error('新密码长度至少为' + pwdLength));\n } else if (pwdRule == 2) {\n var re = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');\n if (!re.test(value)) {\n callback(new Error('新密码必须包含数字、字母'));\n } else {\n callback();\n }\n } else if (pwdRule == 3) {\n var re = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9])');\n if (!re.test(value)) {\n callback(new Error('新密码必须包含数字、字母、特殊字符'));\n } else {\n callback();\n }\n } else if (pwdRule == 4) {\n var re = new RegExp('(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9])');\n if (!re.test(value)) {\n callback(new Error('新密码必须包含数字、大小字母、特殊字符'));\n } else {\n callback();\n }\n } else {\n callback();\n }\n }\n } else {\n if (value.length < 6) {\n callback(new Error('新密码长度至少为6'));\n } else {\n callback();\n }\n }\n };\n var validateold = function validateold(rule, value, callback) {\n if (value === '') {\n callback(new Error('请输入旧密码'));\n } else {\n callback();\n }\n };\n var validateNewReapeat = function validateNewReapeat(rule, value, callback) {\n if (value === '') {\n callback(new Error('请再次输入新密码'));\n } else {\n callback();\n }\n };\n return {\n messageList: [],\n messnum: '',\n logo: '',\n bizUrl: '',\n showLogo: true,\n isScreenFull: false,\n styleSettingDialogVisible: false,\n styleSetting: {\n tabsStyle: {\n tabPosition: 'top',\n tabType: 'border-card'\n },\n elementUI: {\n theme: 'day-theme'\n }\n },\n searchWork: '',\n searchMenus: [],\n infoDialogVisible: false,\n modifyPwdDialogVisible: false,\n pwdForm: {\n old: '',\n new: '',\n newRepeat: ''\n },\n pwdRules: {\n old: [{\n validator: validateold,\n trigger: 'blur'\n }],\n new: [{\n validator: validateNew,\n trigger: 'blur'\n }],\n newRepeat: [{\n validator: validateNewReapeat,\n trigger: 'blur'\n }]\n },\n isIeExplorer: false,\n sysPath: '',\n platName: '管理平台',\n groupCodeArr: [],\n //角色编码\n showQrcode: false\n };\n },\n computed: _objectSpread({}, mapState({\n sysMenus: function sysMenus(state) {\n return state.menu.sysMenus;\n },\n currentUser: function currentUser(state) {\n return state.user.currentUserDetail;\n },\n token: function token(state) {\n return state.login.currentUser.token;\n },\n frontUrl: function frontUrl() {\n if (this.currentUser && this.currentUser.user && this.currentUser.user.account && (!window.ssoConfig.mode || window.ssoConfig.mode == 'jwt')) {\n return \"\".concat(this.bizUrl, \"?token= \") + this.token;\n } else {\n return this.bizUrl;\n // return this.bizUrl ? this.bizUrl : `${window.context.front}`\n }\n },\n\n mobileUrl: function mobileUrl() {\n if (this.currentUser && this.currentUser.user && this.currentUser.user.account && (!window.ssoConfig.mode || window.ssoConfig.mode == 'jwt')) {\n return \"\".concat(window.context.mobile, \"?token= \") + this.token;\n } else {\n return \"\".concat(window.context.mobile);\n }\n },\n pwdStrategy: function pwdStrategy(state) {\n return state.user.pwdStrategy;\n },\n userType: function userType() {\n if (this.currentUser && this.currentUser.user) {\n return this.currentUser.user.userType;\n }\n }\n })),\n watch: {\n styleSetting: {\n handler: function handler(val, oldval) {\n var str = JSON.stringify(val);\n localStorage.setItem('styleSetting', str);\n this.$store.dispatch('styleSetting/actionStyleSetting', JSON.parse(str));\n },\n deep: true //对象内部的属性监听,也叫深度监听\n }\n },\n\n methods: {\n //首页进入大屏\n showBigScreen: function showBigScreen() {\n this.$router.push({\n path: \"/newOpen/cockpit\" //直接跳转到大屏可视化\n });\n },\n goIndex: function goIndex() {\n // this.$router.push({\n // path: `/frontPlat/frontIndex`\n // })\n // this.$router.push({\n // path: `/newOpen/cockpit` //直接跳转到大屏可视化\n // })\n window.open('http://183.64.175.153:20003/#/curingManageyh');\n },\n handleSysPlat: function handleSysPlat() {\n var _this3 = this;\n // if (!this.sysMenus.length) {\n // this.$store.dispatch('menu/actionSysMenus')\n // }\n // window.open(\n // window.context.manage +\n // // \"http://localhost:8081/mvue\"+\n // '/sysplat/' +\n // `${this.sysMenus[0].children[0].alias}` +\n // '?token=' +\n // this.token,\n // '_blank'\n // )\n\n if (!this.sysMenus.length) {\n this.$store.dispatch('menu/actionSysMenus').then(function (res) {\n if (res) {\n window.open(window.context.manage +\n // \"http://localhost:8081/mvue\"+\n '/sysplat/' + \"\".concat(_this3.sysMenus[0].children[0].alias) + '?token=' + _this3.token, '_blank');\n }\n });\n } else {\n window.open(window.context.manage +\n // \"http://localhost:8081/mvue\"+\n '/sysplat/' + \"\".concat(this.sysMenus[0].children[0].alias) + '?token=' + this.token, '_blank');\n }\n },\n readload: function readload(val) {\n this.getUnread();\n },\n getUnread: function getUnread() {\n var _this4 = this;\n uc.messagelist().then(function (res) {\n _this4.messageList = res.data.rows;\n if (res.data.rows.length > 0) {\n _this4.messnum = res.data.rows.length;\n } else {\n _this4.messnum = '';\n }\n console.log(_this4.messageList);\n });\n },\n getBizUrl: function getBizUrl() {\n var _this5 = this;\n this.$http.get('${portal}/sys/sysProperties/v1/getByAlias?alias=biz.url', {\n responseType: 'text'\n }).then(function (res) {\n _this5.bizUrl = res.data;\n });\n },\n showDrawer: function showDrawer() {\n this.$refs.messageDrawer.drawer = true;\n },\n submitForm: function submitForm() {\n var _this6 = this;\n var this_ = this;\n this.$refs['pwdForm'].validate(function (valid) {\n if (valid) {\n _this6.$http.post('${uc}/api/user/v1/user/changUserPsd', {\n oldPwd: _this6.pwdForm.old,\n newPwd: _this6.pwdForm.new\n }).then(function (resp) {\n var data = resp.data;\n if (data && data.state) {\n _this6.modifyPwdDialogVisible = false;\n _this6.$alert('修改密码成功, 请使用新密码重新登录。', '提示', {\n confirmButtonText: '确定',\n callback: function callback(action) {\n //退出登录\n this_.logout();\n }\n });\n }\n });\n }\n });\n },\n openInfoDialog: function openInfoDialog() {\n this.$router.push({\n path: '/frontPlat/personMenus/personInfo'\n });\n this.$refs.frontMenu.activeIndex = '';\n // this.infoDialogVisible = true\n },\n openMap: function openMap() {\n this.$router.push({\n path: \"/frontPlat/maptest\"\n });\n this.handleMenuCollapse();\n },\n openResetPwdDialog: function openResetPwdDialog() {\n this.$store.dispatch('user/getDefPwdStrategy');\n this.modifyPwdDialogVisible = true;\n if (this.$refs['pwdForm']) {\n this.$refs['pwdForm'].resetFields();\n }\n },\n handleMenuCollapse: function handleMenuCollapse() {\n this.$bus.$emit('frontMenuShow', !this.menuShow);\n },\n logout: function logout() {\n var _this7 = this;\n this.$store.dispatch('menu/clearMenus');\n this.$store.dispatch('user/clearUser');\n this.$store.dispatch('menu/setCopyMenus', []); //菜单\n var loginRouthPath = localStorage.getItem(this.$store.state.login.currentUser.account + 'loginRoutePath') || '/login';\n this.$store.dispatch('login/logoutAndCleanUp').then(function () {\n switch (window.ssoConfig.mode) {\n case 'cas':\n case 'oauth':\n window.sessionStorage.removeItem('currentUser');\n window.location.href = window.ssoConfig.logout + '?service=' + window.location.href.split('?')[0];\n break;\n default:\n _this7.$router.push({\n path: loginRouthPath\n });\n break;\n }\n });\n },\n handleScreenFull: function handleScreenFull(type) {\n if (!screenfull.isEnabled) {\n this.$message({\n message: '不支持全屏',\n type: 'warning'\n });\n return false;\n }\n screenfull.toggle(document.getElementsByTagName('body')[0]);\n this.isScreenFull = !this.isScreenFull;\n },\n handleStyleSettingDialog: function handleStyleSettingDialog() {\n var styleSetting = localStorage.getItem('styleSetting');\n if (styleSetting && styleSetting != 'null') {\n this.styleSetting = JSON.parse(styleSetting);\n }\n this.styleSettingDialogVisible = true;\n },\n handleStyleSettingDialogClose: function handleStyleSettingDialogClose() {\n this.styleSettingDialogVisible = false;\n this.infoDialogVisible = false;\n this.modifyPwdDialogVisible = false;\n },\n querySearch: function querySearch(queryString, cb) {\n // 查询出二级三级的菜单\n var menus = [];\n menus = _toConsumableArray(this.menus);\n if (queryString) {\n this.searchMenus = [];\n this.preFilterMenus(this.menus, queryString);\n } else {\n this.searchMenus = menus;\n }\n // 调用 callback 返回建议列表的数据\n this.searchMenus = this.searchMenus.unique('alias');\n cb(this.searchMenus);\n },\n preFilterMenus: function preFilterMenus(menus, queryString) {\n var _this8 = this;\n if (menus instanceof Array) {\n menus.forEach(function (x) {\n _this8.filterMenus(x, queryString);\n });\n } else {\n this.filterMenus(menus, queryString, true);\n }\n },\n filterMenus: function filterMenus(x, queryString, isComponent) {\n var _this9 = this;\n if (x.children) {\n var r = x.children.filter(function (menu) {\n _this9.preFilterMenus(menu, queryString);\n return menu.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1 || menu.alias.toLowerCase().indexOf(queryString.toLowerCase()) != -1;\n });\n if (r && r.length >= 1) {\n r.forEach(function (y) {\n if (isComponent) {\n y.parentComponent = x;\n }\n _this9.searchMenus.push(y);\n });\n }\n }\n },\n handleSelect: function handleSelect(item) {\n if (!item.parentComponent) {\n this.$router.push({\n path: \"/\".concat(item.alias)\n });\n } else {\n this.$router.push({\n path: \"/\".concat(item.parentComponent.alias, \"#\").concat(item.alias)\n });\n }\n },\n //获取系统默认配置 系统Logo、名称\n sysSetting: function sysSetting() {\n var _this10 = this;\n var _this = this;\n var url = window.context.portal + '/sys/sysProperties/v1/getDecryptBySysSetting';\n _this.$http.get(url).then(function (response) {\n if (response && response.data && response.data.value) {\n var sysSettingData = JSON.parse(response.data.value);\n sysSettingData.nameFront ? _this.platName = sysSettingData.nameFront : null;\n if (sysSettingData.frontLogo.length > 0) {\n var frontLogo = sysSettingData.frontLogo;\n _this.showLogo = true;\n req.get(window.context.portal + '/file/onlinePreviewController/v1/getFileById_' + frontLogo[0].id, 'arraybuffer').then(function (response) {\n var type = response.headers['content-type'];\n if (type) {\n _this.logo = window.URL.createObjectURL(new Blob([response.data], {\n type: type\n }));\n } else {\n _this.logo = window.URL.createObjectURL(new Blob([response.data]));\n }\n });\n //_this.logo = window.context.portal + \"/file/v1/downloadFile?fileId=\" + manageLogo[0].id;\n } else {\n _this10.showLogo = false;\n }\n } else {\n _this10.showLogo = false;\n }\n });\n },\n //获取级角色信息\n getOrgInfo: function getOrgInfo(orgAccount) {\n var _this11 = this;\n this.$http.get('${yhxt}/api/role/v1/role/getRolesByUser?account=' + orgAccount).then(function (res) {\n if (res.data.length != 0) {\n res.data.forEach(function (item) {\n _this11.groupCodeArr.push(item.groupCode);\n });\n console.log(_this11.groupCodeArr, 'd');\n }\n });\n },\n //动态生成二维码\n useqrcode: function useqrcode() {\n //生成的二维码内容,可以添加变量\n this.QueryDetail = window.getModuleRootUrl('yhxt') + '/bizAPP/v1/appDownload';\n var canvas = document.getElementById('canvas');\n QRCode.toCanvas(canvas, this.QueryDetail, function (error) {\n if (error) console.error(error);\n console.log('success!');\n });\n }\n },\n mounted: function mounted() {\n !this.currentUser && this.$store.dispatch('user/loadCurrentUserDetail');\n var currentUser = this.$store.state.login.currentUser;\n if (currentUser) {\n var userAttrs = this.$store.state.login.currentUser.userAttrs;\n if (userAttrs) {\n //租户\n var tenantId = userAttrs.tenantId;\n if (tenantId) {\n var _this = this;\n var url = '${uc}/uc/tenantManage/v1/getJson?id=' + tenantId;\n this.$http.get(url).then(function (resp) {\n if (resp.data) {\n var tenantManage = resp.data;\n tenantManage.nameFront ? _this.platName = tenantManage.nameFront : null;\n if (tenantManage.frontLogo) {\n var frontLogo = JSON.parse(tenantManage.frontLogo);\n if (frontLogo && frontLogo.length > 0) {\n _this.showLogo = true;\n req.get(window.context.portal + '/file/onlinePreviewController/v1/getFileById_' + frontLogo[0].id, 'arraybuffer').then(function (response) {\n var type = response.headers['content-type'];\n if (type) {\n _this.logo = window.URL.createObjectURL(new Blob([response.data], {\n type: type\n }));\n } else {\n _this.logo = window.URL.createObjectURL(new Blob([response.data]));\n }\n });\n }\n } else {\n _this.showLogo = false;\n }\n }\n }, function (error) {\n _this.showLogo = false;\n reject(error);\n });\n } else {\n //不是租户\n this.sysSetting();\n }\n } else {\n //不是租户\n this.sysSetting();\n }\n } else {\n //不是租户\n this.sysSetting();\n }\n this.useqrcode();\n },\n created: function created() {\n this.getUnread();\n this.getBizUrl();\n var USER_AGENT = navigator.userAgent.toLowerCase();\n var isChrome = /.*(chrome)\\/([\\w.]+).*/;\n if (!isChrome.test(USER_AGENT)) {\n this.isIeExplorer = true;\n }\n var orgAccount = JSON.parse(window.sessionStorage.getItem('currentUser')).account;\n this.getOrgInfo(orgAccount);\n }\n};",null]}