{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\layout\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\layout\\Navigator.vue","mtime":1667327529575},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-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/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.regexp.constructor\";\n\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; }\n\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//\n//\n//\n//\nimport HtAvatar from '@/components/common/HtAvatar.vue'; // import LangSelect from '@/components/lang/LangSelect.vue'\n// import FrontMenu from '../layout/FrontMenu.vue'\n\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';\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\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 logowenzi: require('@/assets/img/logowenzi.png'),\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 searchValue: '',\n //搜索输入值\n MenuList: [{\n id: 1,\n alias: 'projectBefore',\n name: '前期手续',\n iconName: 'el-icon-tickets'\n }, {\n id: 2,\n alias: 'bidContract',\n name: '招投标与合同',\n iconName: 'el-icon-medal'\n }, {\n id: 3,\n alias: 'workProcess',\n name: '施工过程',\n iconName: 'el-icon-office-building'\n }, {\n id: 4,\n alias: 'completed',\n name: '竣工验收',\n iconName: 'el-icon-document-checked'\n }],\n activeMenu: ''\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 $route: 'currentTab'\n },\n methods: {\n // 刷新页面保持当前路由\n currentTab: function currentTab() {\n var _this3 = this;\n\n var pullpath = this.$route.path;\n var path = pullpath.split('/');\n var urlAnchor = path[path.indexOf('projectLayout') + 1];\n this.MenuList.filter(function (item) {\n if (item.alias == urlAnchor) {\n _this3.activeMenu = urlAnchor;\n }\n });\n },\n // 切换Tabs\n activeTab: function activeTab(item) {\n this.activeMenu = item.alias;\n this.$router.push({\n name: item.alias\n });\n },\n goIndex: function goIndex() {// this.$router.push({\n // path: `/frontPlat/frontIndex`,\n // })\n },\n handleSysPlat: function handleSysPlat() {\n var _this4 = 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(_this4.sysMenus[0].children[0].alias) + '?token=' + _this4.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 _this5 = this;\n\n uc.messagelist().then(function (res) {\n _this5.messageList = res.data.rows;\n\n if (res.data.rows.length > 0) {\n _this5.messnum = res.data.rows.length;\n } else {\n _this5.messnum = '';\n }\n\n console.log(_this5.messageList);\n });\n },\n getBizUrl: function getBizUrl() {\n var _this6 = this;\n\n this.$http.get('${portal}/sys/sysProperties/v1/getByAlias?alias=biz.url', {\n responseType: 'text'\n }).then(function (res) {\n _this6.bizUrl = res.data;\n });\n },\n showDrawer: function showDrawer() {\n this.$refs.messageDrawer.drawer = true;\n },\n submitForm: function submitForm() {\n var _this7 = this;\n\n var this_ = this;\n this.$refs['pwdForm'].validate(function (valid) {\n if (valid) {\n _this7.$http.post('${uc}/api/user/v1/user/changUserPsd', {\n oldPwd: _this7.pwdForm.old,\n newPwd: _this7.pwdForm.new\n }).then(function (resp) {\n var data = resp.data;\n\n if (data && data.state) {\n _this7.modifyPwdDialogVisible = false;\n\n _this7.$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 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\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 _this8 = 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 _this8.$router.push({\n path: loginRouthPath\n });\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\n screenfull.toggle(document.getElementsByTagName('body')[0]);\n this.isScreenFull = !this.isScreenFull;\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 _this9 = this;\n\n if (menus instanceof Array) {\n menus.forEach(function (x) {\n _this9.filterMenus(x, queryString);\n });\n } else {\n this.filterMenus(menus, queryString, true);\n }\n },\n filterMenus: function filterMenus(x, queryString, isComponent) {\n var _this10 = this;\n\n if (x.children) {\n var r = x.children.filter(function (menu) {\n _this10.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 _this10.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 _this11 = 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 _this11.showLogo = false;\n }\n } else {\n _this11.showLogo = false;\n }\n });\n }\n },\n mounted: function mounted() {\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\n if (tenantManage.frontLogo) {\n var frontLogo = JSON.parse(tenantManage.frontLogo);\n\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\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 },\n created: function created() {\n this.currentTab();\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};",null]}