{"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\\Navigator.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Navigator.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/web.dom.iterable\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 LangSelect from '@/components/lang/LangSelect.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 IM from '@/components/instantMessag/IM';\nimport uc from '@/api/uc.js';\nexport default {\n  name: 'navigator',\n  components: {\n    HtAvatar: HtAvatar,\n    LangSelect: LangSelect,\n    projectMessageDrawer: projectMessageDrawer,\n    IM: IM\n  },\n  props: ['menuShow'],\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      isScreenFull: false,\n      styleSettingDialogVisible: false,\n      aboutPlatformDialogVisible: 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      platName: '',\n      timer: null\n    };\n  },\n  computed: _objectSpread({}, mapState({\n    hasToken: function hasToken(state) {\n      return state.login.hasToken;\n    },\n    menus: function menus(state) {\n      return state.menu.menus;\n    },\n    frontMenus: function frontMenus(state) {\n      return state.menu.frontMenus;\n    },\n    currentUser: function currentUser(state) {\n      return state.user.currentUserDetail;\n    },\n    platformVersion: function platformVersion(state) {\n      return state.user.platformVersion;\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  })),\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  mounted: function mounted() {\n    var _this3 = this;\n\n    if (this.hasToken) {\n      this.timer = setInterval(function () {\n        if (_this3.$store.state.login.currentUser) {\n          _this3.getDataSys();\n\n          clearInterval(_this3.timer);\n        }\n      }, 100);\n\n      this.$store._vm.$root.$on('getAuth', function () {\n        _this3.getDataSys();\n      });\n    } else {\n      this.getDataSys();\n    }\n  },\n  created: function created() {\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  methods: {\n    getDataSys: function getDataSys() {\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.name ? _this.platName = tenantManage.name : null;\n\n                if (tenantManage.manageLogo) {\n                  var manageLogo = JSON.parse(tenantManage.manageLogo);\n\n                  if (manageLogo && manageLogo.length > 0) {\n                    _this.showLogo = true;\n                    req.get(window.context.portal + '/file/onlinePreviewController/v1/getFileById_' + manageLogo[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      this.getUnread();\n    },\n    goIndex: function goIndex() {//暂时不用\n      // this.$router.push({\n      //     path: `/sysplat/sysIndex`,\n      // })\n    },\n    handleFrontPlat: function handleFrontPlat() {\n      var alias;\n\n      if (this.frontMenus.length && this.frontMenus[0].children && this.frontMenus[0].children.length) {\n        // 二级菜单\n        alias = this.frontMenus[0].children[0].alias;\n      } else if (this.frontMenus.length) {\n        // 一级菜单\n        alias = this.frontMenus[0].alias;\n      }\n\n      window.open(window.context.front + // 'http://localhost:8081/fvue' +\n      \"/frontPlat/\" + \"\".concat(alias ? alias : 'frontIndex' // 默认首页\n      ) + '?token=' + this.token, '_blank');\n    },\n    getUnread: function getUnread() {\n      var _this4 = this;\n\n      uc.messagelist().then(function (res) {\n        _this4.messageList = res.data.rows;\n\n        if (res.data.rows.length > 0) {\n          _this4.messnum = res.data.rows.length;\n        } else {\n          _this4.messnum = '';\n        }\n      });\n    },\n    getBizUrl: function getBizUrl() {\n      var _this5 = this;\n\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    clearCache: function clearCache(model, key) {\n      var this_ = this;\n      this.$confirm('是否确认清除缓存数据？', '提示', {\n        confirmButtonText: '确定',\n        cancelButtonText: '取消',\n        type: 'warning'\n      }).then(function () {\n        //分服务部署模式下，清除所有缓存。调用各个微服务的清除缓存方法\n        if (!model && key == 'eip') {\n          if (window.context.uc != window.context.portal) {\n            this_.$http.get('${uc}/base/tools/v1/clearCacheByKey?key=' + key);\n            this_.$http.get('${portal}/base/tools/v1/clearCacheByKey?key=' + key);\n            this_.$http.get('${form}/base/tools/v1/clearCacheByKey?key=' + key);\n            this_.$http.get('${bpmRunTime}/base/tools/v1/clearCacheByKey?key=' + key);\n            this_.$http.get('${bpmModel}/base/tools/v1/clearCacheByKey?key=' + key).then(function () {\n              this_.$message.success('操作成功');\n            });\n          } else {\n            this_.$http.get('${portal}/base/tools/v1/clearCacheByKey?key=' + key).then(function () {\n              this_.$message.success('操作成功');\n            });\n          }\n        } else {\n          this_.$http.get('${' + model + '}/base/tools/v1/clearCacheByKey?key=' + key).then(function () {\n            this_.$message.success('操作成功');\n          });\n        }\n      });\n    },\n    submitForm: function submitForm() {\n      var _this6 = this;\n\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\n            if (data && data.state) {\n              _this6.modifyPwdDialogVisible = false;\n\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.infoDialogVisible = true;\n    },\n    openMap: function openMap() {\n      this.$router.push({\n        path: \"/sysplat/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.$emit('update:menuShow', !this.menuShow);\n    },\n    logout: function logout() {\n      var _this7 = this;\n\n      var loginRouthPath = localStorage.getItem(this.$store.state.login.currentUser.account + 'loginRoutePath') || '/login';\n      this.$store.dispatch('menu/actionMenusEmpty');\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            _this7.$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 _this8 = this;\n\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\n      if (x.children) {\n        var r = x.children.filter(function (menu) {\n          _this9.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            _this9.searchMenus.push(y);\n          });\n        }\n      }\n    },\n    handleSelect: function handleSelect(item) {\n      if (!item.parentComponent) {\n        this.$router.push({\n          path: \"/sysplat/\".concat(item.alias)\n        });\n      } else {\n        this.$router.push({\n          path: \"/sysplat/\".concat(item.parentComponent.alias, \"#\").concat(item.alias)\n        });\n      }\n    },\n    readload: function readload(val) {\n      this.getUnread();\n    },\n    //获取系统默认配置 系统Logo、名称\n    sysSetting: function sysSetting() {\n      var _this10 = 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.name ? _this.platName = sysSettingData.name : null;\n\n          if (sysSettingData.manageLogo.length > 0) {\n            var manageLogo = sysSettingData.manageLogo;\n            _this.showLogo = true;\n            req.get(window.context.portal + '/file/onlinePreviewController/v1/getFileById_' + manageLogo[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            _this10.showLogo = false;\n          }\n        } else {\n          _this10.showLogo = false;\n        }\n      });\n    }\n  }\n};",null]}