{"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\\views\\system\\TenantMailServerManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\system\\TenantMailServerManager.vue","mtime":1667327530216},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n  name: \"tenantMailSereverManager\",\n  props: {\n    tenantId: String\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      tenantMailServer: {}\n    };\n  },\n  mounted: function mounted() {\n    var _this = this;\n\n    this.$validator = this.$root.$validator;\n    var url = \"${uc}/uc/tenantMailServer/v1/getByCurrent\";\n\n    if (this.tenantId) {\n      url += \"?tenantId=\" + this.tenantId;\n    }\n\n    this.$http.get(url).then(function (resp) {\n      _this.tenantMailServer = resp.data;\n    }, function (error) {\n      reject(error);\n    });\n  },\n  methods: {\n    saveData: function saveData() {\n      this.$refs.tenantMailSaveBtn.$el.click();\n    },\n    testConnect: function testConnect() {\n      var _this2 = this;\n\n      var this_ = this;\n      this_.$validator.validateAll(\"tenantMailServerForm\").then(function (result) {\n        if (result) {\n          var mailType = _this2.tenantMailServer.mailType;\n          var mailSetting = {\n            mailType: _this2.tenantMailServer.mailType,\n            mailAddress: _this2.tenantMailServer.userName,\n            password: _this2.tenantMailServer.mailPass,\n            nickName: _this2.tenantMailServer.nickName,\n            validate: true,\n            isDeleteRemote: false,\n            isHandleAttach: true\n          };\n\n          if (_this2.tenantMailServer.useSsl == \"0\") {\n            mailSetting.ssl = false;\n          } else {\n            mailSetting.ssl = true;\n          }\n\n          if (mailType == \"pop3\") {\n            mailSetting.popHost = _this2.tenantMailServer.mailHost;\n            mailSetting.popPort = _this2.tenantMailServer.mailPort;\n          } else if (mailType == \"imap\") {\n            mailSetting.imapHost = _this2.tenantMailServer.mailHost;\n            mailSetting.imapPort = _this2.tenantMailServer.mailPort;\n          }\n\n          var address = _this2.tenantMailServer.userName;\n          var s = address.substring(address.indexOf('@') + 1, address.length + 1).trim();\n          mailSetting.smtpHost = 'smtp.' + s;\n          mailSetting.smtpPort = 25;\n          var url = \"${portal}/mail/mail/mailSetting/v1/test?isOriginPwd=false\";\n\n          _this2.$http.post(url, mailSetting).then(function (resp) {\n            if (resp.data.state) {\n              _this2.$message.success(\"测试连接成功!\");\n            }\n          });\n        } else {\n          var arr = this_.$validator.errors.items.filter(function (item) {\n            return item.scope == \"tenantMailServerForm\";\n          });\n          var errorLength = arr.length;\n          this_.$message({\n            showClose: true,\n            message: \"\\u6709\".concat(errorLength, \"\\u4E2A\\u5B57\\u6BB5\\u672A\\u901A\\u8FC7\\u6821\\u9A8C\\uFF0C\\u8BF7\\u6B63\\u786E\\u586B\\u5199\\u8868\\u5355\\u5185\\u5BB9\\u3002\"),\n            type: \"warning\"\n          });\n        }\n      });\n    },\n    mailTypeChange: function mailTypeChange(change) {\n      if (this.tenantMailServer.userName) {\n        var address = this.tenantMailServer.userName;\n        var s = address.substring(address.indexOf('@') + 1, address.length + 1).trim();\n\n        if (change == 'pop3') {\n          this.tenantMailServer.mailHost = 'pop.' + s;\n        }\n\n        if (change == 'pop3') {\n          if (!(s == 'gmail.com' || s == 'msn.com' || s == 'live.cn' || s == 'live.com' || s == 'hotmail.com')) {\n            this.tenantMailServer.mailPort = '110';\n          }\n        } else if (change == 'imap') {\n          if (!(s == 'gmail.com' || s == 'msn.com' || s == 'live.cn' || s == 'live.com' || s == 'hotmail.com')) {\n            this.tenantMailServer.mailPort = '143';\n          }\n\n          this.tenantMailServer.mailHost = 'imap' + '.' + s;\n        }\n      }\n    }\n  }\n};",null]}