{"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\\Login.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Login.vue","mtime":1698778492361},{"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/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.string.starts-with\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.function.name\";\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//\nimport uc from '@/api/uc.js';\nimport Cookie from 'js-cookie';\nimport portal from '@/api/portal.js';\nimport { mapState } from 'vuex';\nexport default {\n  name: 'login',\n  props: ['tenant'],\n  data: function data() {\n    var checkAccount = function checkAccount(rule, value, callback) {\n      if (!value) {\n        return callback(new Error('请输入账号'));\n      }\n\n      if (/^[a-zA-Z0-9_-]{2,20}$/.test(value)) {\n        return callback();\n      } else {\n        return callback(new Error('账号格式不符合规范'));\n      }\n    };\n\n    return {\n      logo: '',\n      name: 'EDP',\n      showTenant: false,\n      showLogo: false,\n      companyName: '管理平台',\n      tenantName: '',\n      principal: {\n        tenantId: '',\n        account: '',\n        password: '',\n        remberPwd: 0\n      },\n      rules: {\n        account: [{\n          validator: checkAccount,\n          trigger: 'blur'\n        }],\n        password: [{\n          required: true,\n          message: '请输入密码',\n          trigger: 'blur'\n        }]\n      },\n      responseError: '',\n      loading: false,\n      backStyle: {\n        width: '100%',\n        height: '100%',\n        background: \"url(\".concat(require('@/assets/img/bg.jpg'), \") no-repeat center / 100% 100%\") // background: `url(${require('@/assets/img/loginbg.png')}) no-repeat center / 100% 100%`,\n        // background: `url(${require(\"@/assets/img/back.jpg\")}) center / 100% auto no-repeat`\n\n      },\n      totemStyle: {\n        width: '420px',\n        height: '420px',\n        float: 'left',\n        // backgroundColor: \"rgb(169 187 205 / 13%)\",\n        backgroundColor: '#282b33',\n        background: \"url(\".concat(require('@/assets/img/loginImg.jpg'), \") no-repeat center / 100% 100%\") // background: `#1975FF url(${require(\"@/assets/img/totem.png\")}) center / 100% auto no-repeat`\n        // background: `transparent url(${require(\"@/assets/img/totem1.png\")}) no-repeat center 30% / 100% 70% `\n\n      },\n      //负责的是登录页授权文件相关数据变量\n      isIeExplorer: false,\n      dialogVisible: false,\n      downLoading: false,\n      accept: '.lic',\n      files: [],\n      uploadingFiles: {}\n    };\n  },\n  mounted: function mounted() {\n    window.webSocket && window.webSocket.close();\n    this.setDefaultValue(); //获取租户信息\n\n    var tenant = this.tenant ? this.tenant : 'platform';\n\n    if (tenant) {\n      var url = '${uc}/uc/tenantManage/v1/getTenantByCode?code=' + tenant;\n\n      var _this = this;\n\n      this.$http.get(url).then(function (resp) {\n        if (resp.data) {\n          var tenantManage = resp.data;\n          _this.showTenant = true;\n          _this.companyName = tenantManage.name;\n\n          if (tenant != 'platform') {\n            _this.principal.tenantId = resp.data.id;\n          }\n\n          if (tenantManage.ico) {\n            var ico = JSON.parse(tenantManage.ico);\n\n            if (ico && ico.length > 0) {\n              _this.showLogo = true;\n              _this.logo = window.context.portal + '/file/v1/getLogoFile?logoType=manage&tenantId=' + tenantManage.id;\n            }\n          }\n        }\n      });\n    } else {\n      //不是租户\n      this.sysSetting();\n    }\n  },\n  computed: mapState({\n    downLoad: function downLoad() {\n      return \"\".concat(window.context.portal, \"/uc/AuthorizationModel/v1/uploadAuthorizationFile\");\n    },\n    headers: function headers(state) {\n      return {\n        Authorization: \"Bearer \".concat(state.login.currentUser.token)\n      };\n    }\n  }),\n  methods: {\n    //如果记住密码则默认表单赋值\n    setDefaultValue: function setDefaultValue() {\n      var account = Cookie.get('account'),\n          remberPwd = Number(Cookie.get('remberPwd')),\n          password = Cookie.get('accountPwd');\n\n      if (remberPwd) {\n        // 如果有记住密码 取密文解密放进输入框\n        var _Base = require('js-base64').Base64;\n\n        password = _Base.decode(password);\n      }\n\n      this.principal = _objectSpread(_objectSpread({}, this.principal), {\n        account: account,\n        password: password,\n        remberPwd: remberPwd\n      });\n    },\n    //获取系统默认配置 系统Logo、名称\n    sysSetting: function sysSetting() {\n      var _this = this;\n\n      var url = window.context.portal + '/sys/sysProperties/v1/getDecryptBySysSetting';\n      this.$http.get(url).then(function (response) {\n        if (response && response.data && response.data.value) {\n          _this.showTenant = true;\n          var sysSettingData = JSON.parse(response.data.value);\n\n          if (sysSettingData.manageName == '') {\n            _this.companyName = _this.name;\n          } else {\n            _this.companyName = sysSettingData.manageName;\n          }\n\n          if (sysSettingData.ico.length > 0) {\n            var ico = sysSettingData.ico;\n            _this.showLogo = true;\n            _this.logo = window.context.portal + '/file/v1/downloadFile?fileId=' + ico[0].id;\n          }\n        }\n      });\n    },\n    querySearch: function querySearch(queryString, cb) {\n      if (!queryString) {\n        return cb([]);\n      }\n\n      var queryFilter = {};\n      queryFilter.pageBean = {\n        page: 1,\n        pageSize: 20,\n        total: 0,\n        showTotal: true\n      };\n      var query = {\n        property: 'name_',\n        value: queryString,\n        group: 'main',\n        operation: 'LIKE',\n        relation: 'AND'\n      };\n\n      if (!queryFilter.querys) {\n        queryFilter.querys = [];\n      }\n\n      queryFilter.querys.push(query);\n      this.$http.post(\"\".concat(window.context.uc, \"/uc/tenantManage/v1/listJson\"), queryFilter).then(function (res) {\n        // 调用 callback 返回建议列表的数据\n        cb(res.data.rows);\n      });\n    },\n    handleSelect: function handleSelect(item) {\n      this.tenantName = item.name;\n      this.principal.tenantId = item.id;\n    },\n    setRouterPath: function setRouterPath() {\n      this.$store.dispatch('login/actionLoginAccount', this.principal.account);\n      localStorage.setItem(this.principal.account + 'loginRoutePath', this.$route.path);\n    },\n    submitForm: function submitForm(formName) {\n      var _this2 = this;\n\n      this.$refs[formName].validate(function (valid) {\n        if (valid) {\n          _this2.inputGetFocus();\n\n          _this2.loading = true;\n\n          _this2.setRouterPath();\n\n          _this2.$store.dispatch('login/loginByPrincipal', _this2.principal).then(function (loginStatus) {\n            if (loginStatus && loginStatus == true) {\n              _this2.$store.dispatch('menu/actionMenus').then(function (res) {\n                if (res.length) {\n                  if (res[0].children && res[0].children.length) {\n                    _this2.$router.push({\n                      path: \"/sysplat/\".concat(res[0].children[0].alias)\n                    }); // 无固定首页\n                    // this.$router.push({\n                    //     path: `/frontPlat/${res[0].alias}/${res[0].children[0].alias}`,\n                    // })\n                    //获取端口号,判断是否是养护系统\n                    //   let port = window.location.port\n                    //   if (port === '8198' || port === '8888') {\n                    //     this.$router.push({\n                    //       path: `/sysplat/${res[0].children[0].alias}`\n                    //     })\n                    //   } else {\n                    //     // 固定首页\n                    //     // this.$router.push({\n                    //     //  path: `/sysplat/sysIndex`\n                    //     // })\n                    //   }\n\n                  } // else {\n                  //     this.$router.push({\n                  //         path: `/frontPlat/${res[0].alias}`,\n                  //     })\n                  // }\n\n                }\n\n                _this2.loading = false;\n              });\n\n              _this2.$store.dispatch('menu/actionFrontMenus'); //     .then(res=>{\n              //         if(window.context.railway){\n              //             this.$router.push({\n              //                 path: `/frontPlat/${res[0].alias}`,\n              //             })\n              //         }else{\n              //             this.$router.push({\n              //                 path: `/frontPlat/frontIndex`,\n              //             });\n              //         }\n              //         this.loading = false\n              //     });\n              // 连接websocket\n\n\n              _this2.$bus.$emit('login');\n\n              _this2.getAllDict();\n            } else if (loginStatus == false) {\n              _this2.$router.push({\n                name: 'resetPwdView',\n                params: {\n                  account: _this2.principal.account\n                }\n              });\n            }\n          }).catch(function (msg) {\n            _this2.loading = false;\n\n            if (msg.startsWith('timeout of')) {\n              msg = '登录超时';\n            }\n\n            _this2.responseError = msg;\n          });\n        } else {\n          return false;\n        }\n      });\n    },\n    getAllDict: function getAllDict() {\n      portal.getSysDict().then(function (data) {\n        if (data) {\n          sessionStorage.setItem('dict_data', JSON.stringify(data));\n        }\n      });\n    },\n    inputGetFocus: function inputGetFocus() {\n      this.responseError = '';\n    },\n    resetForm: function resetForm(formName) {\n      this.responseError = '';\n      this.$refs[formName].resetFields();\n    },\n    //弹出授权模态框\n    authMan: function authMan() {\n      this.dialogVisible = true;\n    },\n    //关闭模态框\n    handleClose: function handleClose(done) {\n      done();\n    },\n    //授权文件下载信息文件\n    download: function download() {\n      var _this3 = this;\n\n      this.downLoading = true; //   console.log('ffff')\n\n      portal.downloadFileLic().then(function (res) {\n        _this3.downLoading = false; // const content = res\n        // const blob = new Blob([content])\n        // const fileName = 'license.lic'\n        // const elink = document.createElement('a')\n        // elink.download = fileName\n        // elink.style.display = 'none'\n        // elink.href = URL.createObjectURL(blob)\n        // document.body.appendChild(elink)\n        // elink.click()\n        // URL.revokeObjectURL(elink.href) // 释放URL 对象\n        // document.body.removeChild(elink)\n        // this.downLoading = false\n      });\n    },\n    //上传授权文件成功返回提示\n    success: function success(response, file, fileList) {\n      this.$message.success(response);\n      console.log(response, file, fileList);\n    },\n    //上传失败返回提示\n    error: function error(response, file, fileList) {\n      this.$message.error('文件上传失败');\n      delete this.uploadingFiles[Base64.encode(file.name)];\n    },\n    beforeAvatarUpload: function beforeAvatarUpload(file) {\n      // 文件类型限制\n      var name = file.name ? file.name : '';\n      var ext = name ? name.substr(name.lastIndexOf('.') + 1, name.length) : true;\n      var isExt = this.accept.indexOf(ext) < 0;\n      this.isChecking = !isExt;\n\n      if (isExt) {\n        if (this.accept == 'false') {\n          this.$message.error('请配置可上传文件的格式!');\n        } else {\n          this.$message.error('上传的附件只能是 ' + this.accept + '格式!');\n        }\n\n        return !isExt;\n      }\n\n      this.uploadingFiles[Base64.encode(name)] = 'eror';\n    }\n  },\n  created: function created() {\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  components: {}\n};",null]}