{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\layout\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\layout\\Navigator.vue","mtime":1681441192473},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\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/cssc-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/cssc-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.regexp.constructor\";\n\nvar _name$components$prop;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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//\nimport HtAvatar from '@/components/common/HtAvatar.vue';\nimport { mapState } from 'vuex';\nimport { Base64 } from 'js-base64';\nimport req from '@/request.js';\nimport uc from '@/api/uc.js';\nexport default (_name$components$prop = {\n name: 'navigator',\n components: {\n HtAvatar: HtAvatar\n },\n props: ['menuShow', 'showTopMenu'],\n data: function data() {\n var _this2 = this;\n\n var validateNew = function validateNew(rule, value, callback) {\n if (value === '') {\n callback(new Error('请输入新密码'));\n }\n\n var config = _this2.pwdStrategy;\n\n if (config.enable == 1) {\n var pwdRule = config.pwdRule;\n var pwdLength = config.pwdLength;\n\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\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\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\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\n var validateold = function validateold(rule, value, callback) {\n if (value === '') {\n callback(new Error('请输入旧密码'));\n } else {\n callback();\n }\n };\n\n var validateNewReapeat = function validateNewReapeat(rule, value, callback) {\n if (value === '') {\n callback(new Error('请再次输入新密码'));\n } else {\n callback();\n }\n };\n\n return {\n messageList: [],\n messnum: '',\n logo: '',\n bizUrl: '',\n showLogo: true,\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 frontMenus: [],\n currentMenu: '',\n companyName: ''\n };\n },\n created: function created() {\n var _this3 = this;\n\n // this.getUnread()\n this.getBizUrl();\n var USER_AGENT = navigator.userAgent.toLowerCase();\n var isChrome = /.*(chrome)\\/([\\w.]+).*/;\n\n if (!isChrome.test(USER_AGENT)) {\n this.isIeExplorer = true;\n }\n\n var currentUser = this.$store.state.login.currentUser;\n\n if ((!this.frontMenus || this.frontMenus.length == 0) && currentUser) {\n var this_ = this;\n this.$store.dispatch('menu/actionFrontMenus').then(function (data) {\n _this3.frontMenus = data;\n\n _this3.activePage();\n });\n }\n },\n mounted: function mounted() {\n var _this4 = this;\n\n !this.currentUser && this.$store.dispatch('user/loadCurrentUserDetail');\n var currentUser = this.$store.state.login.currentUser;\n\n if (currentUser) {\n var userAttrs = this.$store.state.login.currentUser.userAttrs;\n\n if (userAttrs) {\n //租户\n var tenantId = userAttrs.tenantId;\n\n if (tenantId) {\n var _this = this;\n\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 _this4.companyName = tenantManage.nameFront;\n\n if (tenantManage.frontLogo) {\n var frontLogo = JSON.parse(tenantManage.frontLogo);\n\n if (frontLogo && frontLogo.length > 0) {\n _this.showLogo = true; // 附件上传请求\n // req\n // .get(\n // window.context.portal +\n // '/file/onlinePreviewController/v1/getFileById_' +\n // frontLogo[0].id,\n // 'arraybuffer'\n // )\n // .then(response => {\n // let type = response.headers['content-type']\n // if (type) {\n // _this.logo = window.URL.createObjectURL(\n // new Blob([response.data], {type: type})\n // )\n // } else {\n // _this.logo = window.URL.createObjectURL(\n // new Blob([response.data])\n // )\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 },\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; // return this.bizUrl ? this.bizUrl : `${window.context.front}`\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}, _defineProperty(_name$components$prop, \"watch\", {\n $route: 'activePage'\n}), _defineProperty(_name$components$prop, \"methods\", {\n activePage: function activePage() {\n var _this5 = this;\n\n var fullPath = this.$route.path;\n var path = fullPath.split('/');\n var urlAnchor = path[path.indexOf('frontPlat') + 1];\n this.frontMenus.filter(function (item) {\n if (item.alias == urlAnchor) {\n _this5.currentMenu = urlAnchor;\n }\n });\n },\n changeMenu: function changeMenu(item) {\n this.currentMenu = item.alias;\n this.$router.push('/frontPlat/' + item.alias);\n },\n // ----------------------\n goIndex: function goIndex() {\n this.$router.push({\n path: \"/crewIndex\"\n });\n },\n handleSysPlat: function handleSysPlat() {\n var _this6 = this;\n\n if (!this.sysMenus.length) {\n this.$store.dispatch('menu/actionSysMenus').then(function (res) {\n if (res) {\n window.open(window.context.manage + // \"http://localhost:8081/mvue\"+\n '/sysplat/' + \"\".concat(_this6.sysMenus[0].children[0].alias) + '?token=' + _this6.token, '_blank');\n }\n });\n } else {\n window.open(window.context.manage + // \"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 _this7 = this;\n\n uc.messagelist().then(function (res) {\n if (res && res.data && res.data.rows) {\n _this7.messageList = res.data.rows;\n\n if (res.data.rows.length > 0) {\n _this7.messnum = res.data.rows.length;\n } else {\n _this7.messnum = '';\n }\n }\n\n console.log(_this7.messageList);\n });\n },\n getBizUrl: function getBizUrl() {\n var _this8 = this;\n\n this.$http.get('${portal}/sys/sysProperties/v1/getByAlias?alias=biz.url', {\n responseType: 'text'\n }).then(function (res) {\n _this8.bizUrl = res.data;\n });\n },\n showDrawer: function showDrawer() {\n this.$refs.messageDrawer.drawer = true;\n },\n submitForm: function submitForm() {\n var _this9 = this;\n\n var this_ = this;\n this.$refs['pwdForm'].validate(function (valid) {\n if (valid) {\n _this9.$http.post('${uc}/api/user/v1/user/changUserPsd', {\n oldPwd: _this9.pwdForm.old,\n newPwd: _this9.pwdForm.new\n }).then(function (resp) {\n var data = resp.data;\n\n if (data && data.state) {\n _this9.modifyPwdDialogVisible = false;\n\n _this9.$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 = ''; // this.infoDialogVisible = true\n },\n openResetPwdDialog: function openResetPwdDialog() {\n this.$store.dispatch('user/getDefPwdStrategy');\n this.modifyPwdDialogVisible = true;\n\n if (this.$refs['pwdForm']) {\n this.$refs['pwdForm'].resetFields();\n }\n },\n openPersonalCenter: function openPersonalCenter() {\n this.$router.push({\n path: '/frontPlat/PersonalInfo'\n });\n },\n handleMenuCollapse: function handleMenuCollapse() {\n this.$bus.$emit('frontMenuShow', !this.menuShow);\n },\n logout: function logout() {\n var _this10 = this;\n\n this.$store.dispatch('menu/clearMenus');\n this.$store.dispatch('user/clearUser');\n this.$store.dispatch('menu/setCopyMenus', []); //菜单\n\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\n default:\n _this10.$router.push({\n path: loginRouthPath\n });\n\n break;\n }\n });\n },\n handleStyleSettingDialog: function handleStyleSettingDialog() {\n var styleSetting = localStorage.getItem('styleSetting');\n\n if (styleSetting && styleSetting != 'null') {\n this.styleSetting = JSON.parse(styleSetting);\n }\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\n if (queryString) {\n this.searchMenus = [];\n this.preFilterMenus(this.menus, queryString);\n } else {\n this.searchMenus = menus;\n } // 调用 callback 返回建议列表的数据\n\n\n this.searchMenus = this.searchMenus.unique('alias');\n cb(this.searchMenus);\n },\n preFilterMenus: function preFilterMenus(menus, queryString) {\n var _this11 = this;\n\n if (menus instanceof Array) {\n menus.forEach(function (x) {\n _this11.filterMenus(x, queryString);\n });\n } else {\n this.filterMenus(menus, queryString, true);\n }\n },\n filterMenus: function filterMenus(x, queryString, isComponent) {\n var _this12 = this;\n\n if (x.children) {\n var r = x.children.filter(function (menu) {\n _this12.preFilterMenus(menu, queryString);\n\n return menu.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1 || menu.alias.toLowerCase().indexOf(queryString.toLowerCase()) != -1;\n });\n\n if (r && r.length >= 1) {\n r.forEach(function (y) {\n if (isComponent) {\n y.parentComponent = x;\n }\n\n _this12.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 _this13 = this;\n\n var _this = this;\n\n var url = window.context.portal + '/sys/sysProperties/v1/getDecryptBySysSetting';\n\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\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\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 }); //_this.logo = window.context.portal + \"/file/v1/downloadFile?fileId=\" + manageLogo[0].id;\n } else {\n _this13.showLogo = false;\n }\n } else {\n _this13.showLogo = false;\n }\n });\n }\n}), _name$components$prop);",null]}