{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Menu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Menu.vue","mtime":1675071992678},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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//\nimport menu from '@/api/menu.js';\nimport utils from '@/hotent-ui-util.js';\nimport { mapState } from 'vuex';\nexport default {\n  props: {\n    menuShow: {\n      type: Boolean,\n      default: true\n    }\n  },\n  computed: _objectSpread({}, mapState({\n    menus: function menus(state) {\n      return state.menu.menus;\n    }\n  })),\n  watch: {\n    collapseItemActive: function collapseItemActive(n, o) {\n      this.oldCollapseItemActive = o;\n    },\n    $route: function $route(to, from) {\n      if (to.meta.isHome) {\n        this.collapseItemActive = '';\n        this.menuItemActive = '';\n      }\n    }\n  },\n  data: function data() {\n    return {\n      collapseItemActive: '',\n      menuItemActive: '',\n      oldCollapseItemActive: '',\n      isLeftBtnValue: false\n    };\n  },\n  created: function created() {\n    var _this2 = this;\n\n    this.$router.afterEach(function (_) {\n      _this2.syncUrlToMenu();\n    }); // 默认进入到首页，不选中菜单\n    // if (this.menus[0] && this.menus[0].children[0]) {\n    //     this.collapseItemActive = this.menus[0].alias\n    //     this.menuItemActive = this.menus[0].children[0].alias\n    // }\n  },\n  mounted: function mounted() {\n    var _this3 = this;\n\n    var this_ = this;\n    setTimeout(function () {\n      !this_.currentUser && this_.$store.dispatch('user/loadCurrentUserDetail');\n    }, 2000);\n    var currentUser = this.$store.state.login.currentUser;\n\n    if ((!this.menus || this.menus.length == 0) && currentUser) {\n      var _this_ = this;\n\n      this.$store.dispatch('menu/actionMenus').then(function (data) {\n        if (_this3.isHasCurrentUrlRight()) {\n          _this3.syncUrlToMenu();\n        } else {// this_.$router.push('home')\n        }\n      });\n    } else {\n      this.syncUrlToMenu();\n    }\n  },\n  methods: {\n    handleMenuCollapse: function handleMenuCollapse() {\n      this.$emit('update:menuShow', !this.menuShow);\n\n      if (this.menuShow == true) {\n        this.collapseItemActive = '';\n      } else {\n        this.collapseItemActive = this.oldCollapseItemActive;\n      } //控制向左按钮的值\n\n\n      this.isLeftBtnValue = !this.isLeftBtnValue;\n    },\n    // 同步当前url地址到目录菜单中，选中对应的目录菜单\n    syncUrlToMenu: function syncUrlToMenu() {\n      var routePath = this.$route.path;\n\n      if (routePath) {\n        if (!this.$route.meta.isHome) {\n          this.handleSelect(routePath, false);\n        }\n      }\n    },\n    // 判断是否拥有当前url地址的权限\n    isHasCurrentUrlRight: function isHasCurrentUrlRight() {\n      var routePath = this.$route.path;\n\n      if (routePath) {\n        var hasRight = false;\n\n        if (!this.menus || this.menus.length < 1) {\n          return hasRight;\n        }\n\n        var tempMenu = JSON.parse(JSON.stringify(this.menus));\n        var listMenu = utils.nest2tile(tempMenu, '', true);\n        var ruterArr = routePath.split('/');\n        var lastRuter = ruterArr[ruterArr.length - 1];\n        listMenu.forEach(function (menu) {\n          if (lastRuter.indexOf(menu.alias) > -1) {\n            hasRight = true;\n            return;\n          }\n        });\n        return hasRight;\n      }\n    },\n    handleSelect: function handleSelect(path, isJump) {\n      var _this4 = this;\n\n      if (alias != 'tenant') {\n        this.$store.dispatch('tenant/actionTenantId', null);\n      }\n\n      var alias;\n\n      var _this = this;\n\n      if (path && path.indexOf('/sysplat/href') == -1) {\n        var i = path.lastIndexOf('/');\n        alias = path.slice(i + 1);\n      } else {\n        alias = path.replace('/sysplat/', '');\n      }\n\n      menu.getMenuByAlias(alias, function (m) {\n        m && _this.$emit('menuChange', m);\n\n        if (m && m.parent) {\n          _this.collapseItemActive = m.parent.alias;\n          _this.menuItemActive = m.alias;\n        }\n\n        if (m && m.openType == '2' && isJump) {\n          if (m.alias.indexOf(\"href/\") == -1) {\n            var routeUrl = _this4.$router.resolve({\n              path: path\n            });\n\n            window.open(routeUrl.href, '_blank');\n          } else {\n            var tempwindow = window.open();\n            tempwindow.location = m.href;\n          }\n        }\n      });\n    }\n  }\n};",null]}