{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\components\\layout\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\components\\layout\\Navigator.vue","mtime":1667462523061},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-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/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/examine-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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); 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//\nimport HtAvatar from '@/components/common/HtAvatar.vue';\nimport { mapState } from 'vuex';\nimport { Base64 } from 'js-base64';\nimport req from '@/request.js';\nimport menu from '@/api/menu.js';\nimport uc from '@/api/uc.js';\nexport default {\n  name: 'navigator',\n  components: {\n    HtAvatar: HtAvatar\n  },\n  props: ['menuShow', 'showTopMenu'],\n  data: function data() {\n    var _this = this;\n\n    var validateNew = function validateNew(rule, value, callback) {\n      if (value === '') {\n        callback(new Error('请输入新密码'));\n      }\n\n      var config = _this.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      currentMenu: 'Equipment',\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    };\n  },\n  created: function created() {},\n  beforeMount: function beforeMount() {// let arr = window.location.pathname.split('/')\n    // let num = arr.length\n    // this.currentMenu = arr[num - 1]\n    // console.log(this.currentMenu, arr)\n  },\n  mounted: function mounted() {\n    var _this2 = this;\n\n    !this.currentUser && this.$store.dispatch('user/loadCurrentUserDetail');\n    var currentUser = this.$store.state.login.currentUser;\n\n    if ((!this.frontMenus || this.frontMenus.length == 0) && currentUser) {\n      this.$store.dispatch('menu/actionFrontMenus').then(function (res) {\n        _this2.activePage();\n      });\n    }\n  },\n  computed: _objectSpread({}, mapState({\n    currentUser: function currentUser(state) {\n      return state.user.currentUserDetail;\n    },\n    token: function token(state) {\n      return state.login.currentUser.token;\n    },\n    frontMenus: function frontMenus(state) {\n      return state.menu.frontMenus;\n    },\n    sysMenus: function sysMenus(state) {\n      return state.menu.sysMenus;\n    },\n    userType: function userType() {\n      if (this.currentUser && this.currentUser.user) {\n        return this.currentUser.user.userType;\n      }\n    },\n    pwdStrategy: function pwdStrategy(state) {\n      return state.user.pwdStrategy;\n    }\n  })),\n  watch: {\n    $route: 'activePage'\n  },\n  methods: {\n    submitForm: function submitForm() {},\n    goIndex: function goIndex() {\n      this.$router.push({\n        path: \"/frontPlat/gis\"\n      });\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    handleSysPlat: function handleSysPlat() {\n      var _this3 = 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(_this3.sysMenus[0].children[0].alias) + '?token=' + _this3.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    logout: function logout() {\n      var _this4 = 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            _this4.$router.push({\n              path: loginRouthPath\n            });\n\n            break;\n        }\n      });\n    },\n    handleClickMenu: function handleClickMenu(item) {\n      if (item.alias == 'Equipment') {\n        this.$router.push('/frontPlat/Equipment/EquipmentIndex');\n      } else {\n        this.$router.push('/frontPlat/zhyw/zhywIndex');\n      }\n\n      this.currentMenu = item.alias;\n      return;\n      var hasSideMenu = item.children.length ? true : false;\n      this.$emit('update:menuShow', hasSideMenu);\n      this.currentMenu = item.alias;\n\n      if (item.children.length !== 0) {\n        var childrens = item.children;\n        var subPath = childrens[0].alias;\n\n        if (childrens[0].children && childrens[0].children.length !== 0) {\n          var threeChildrens = childrens[0].children;\n          var threePath = threeChildrens[0].alias;\n          this.$router.push('/frontPlat/' + item.alias + '/' + subPath + '/' + threePath);\n        } else {\n          this.$router.push('/frontPlat/' + item.alias + '/' + subPath);\n        }\n      } else {\n        this.$router.push('/frontPlat/' + item.alias);\n        this.currentMenu = item.alias;\n      }\n    },\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; // console.log(this.currentMenu)\n        }\n      });\n    }\n  }\n};",null]}