Feature/readme (#29)

* feat: update frontend resource

* fix: oauth2 login callback exception

* feat: update README
This commit is contained in:
vran 2022-03-03 23:12:26 +08:00 committed by GitHub
parent 905d7d5543
commit b1b3d55147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
113 changed files with 341 additions and 58 deletions

View File

@ -6,20 +6,22 @@
- [部署指引](README/deploy.md) - [部署指引](README/deploy.md)
- [构建指引](README/build.md) - [构建指引](README/build.md)
## 快速上手
- [Databasir 之 Github 一键登录OAuth2配置](README/github-oauth2/github-oauth2.md)
- [Databasir 之 Gitlab 一键登录OAuth2配置](README/gitlab-oauth2/gitlab-oauth2.md)
## 简介 ## 简介
**Databasir** 是一款集中式的数据库文档管理工具,提供了自动化、版本化、扁平化的数据库文档管理能力,主要功能如下 **Databasir** 是一款集中式的数据库文档管理工具,提供了自动化、版本化、扁平化的数据库文档管理能力,主要功能如下
1. 支持多种数据库 1. 理论上支持所有拥有 JDBC 驱动的数据库,目前 mysql、postgresql 可以开箱即用
1. 自动或手动同步数据库 Schema 并生成文档 2. 支持 github / github-enterprise / gitlab 的 OAuth2 登录,全图形化配置
2. 项目 Schema 历史版本文档查看 3. 支持手动、定时同步数据库结构并自动生成可读性优秀的文档、UML 图
3. 项目文档导出,提供 markdown、excel研发中 等格式 4. 支持多文件格式导出,如 markdown
4. 团队管理、成员管理一应俱全,扁平化的权限管理模式 5. 历史模型版本化,一键查看历史版本
5. 安全系数高:数据库密码加密存储,存储后不会再返回前端 6. 多人协作字段批注,不再害怕没有注释
7. 扁平化的团队管理模式,灵活适应不同团队组织架构
## 支持数据库 ## 支持数据库
@ -29,14 +31,16 @@
4. - [ ] SqlServer 4. - [ ] SqlServer
## 功能规划 ## 功能规划
- [x] 用户操作审计日志 - [x] 用户操作审计日志
- [x] 文档自动同步日志 - [x] 文档自动同步日志
- [ ] Excel 文档导出 - [ ] Excel 文档导出
- [x] Markdown 文档导出 - [x] Markdown 文档导出
- [x] Github OAuth2 登录模式
- [x] Gitlab OAuth2 登录模式
- [x] 模型 UML 生成
- [ ] UML 图片导出
## 展示 ## 展示

View File

@ -0,0 +1,60 @@
# Databasir 配置 Github OAuth2 登录
1. **创建 Github OAuth Application**
![github-app-create](img/1-github-oauth2-app-create.png)
2. **填写 Github 应用资料**
Homepage URL 填写你部署 databasir 后,可访问的公网域名。
Authorization callback URL 你可以先填写 {{ databasir 域名 }}/login/oauth2/{{ registrationId }},这里的 registrationId 你可以任意填写,只需要稍后在 Databasir 中配置时保持一致即可,我这里填写了 vran_github
![github-oauth2](img/2-github-oauth2-create.png)
3. 申请 client secret
点击 `Generate a new client secret`,生成秘钥以后记得复制暂存一下,以后是看不见原始秘钥的了
![oauth2-github](img/3-github-oauth2-create.png)
4. 保存 Client Id 和刚刚生成的 Client Secret
![oauth2-github](img/4-github-oauth2-create.png)
5. 进入 Databasir 系统管理 -> 登录设置
![databasir](img/5-github-oauth-create.png)
6. 最后一步,创建并保存登录应用
还记得我在第 2 步时候说的 `registrationId` 吗?那个就对应 databasir 中的 `应用 ID` ,只要两者保持一致就可以成功接受 github 的回调,要是前面配错了也可以在当前页面复制自动生成的 URL 去 github 重新填写 Authorization callback URL 就可以了。
注意授权地址和资源地址
- 授权地址:获取 access_token 的请求地址
- 资源地址:获取用户信息的请求地址
这里填写不一样是因为 github 官方将授权和资源地址分开的,如果你使用的时 github enterprise 版本,授权地址和资源地址其实是一样的。
![](img/6-github-oauth-create.png)
配置完成以后,注销登录后再次进入登录页面就会发现多了一个 github 的小图标,点击就可以使用 github 进行登录
![](img/7-github-oauth-create.png)
点击就会进入授权页面,授权完成就会创建一个新的 databasir 用户,并直接登录成功
![](img/8-github-oauth-create.png)
## 配置 Gitlab OAuth2 登录

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,36 @@
1. 创建 Gitlab 应用,填写应用名称、回调地址等信息,注意下面授权一定记得勾选上 **read_user**
回调地址填写你访问 databasir 的公网地址 {{ databasir 地址 }}/login/oauth2/{{ 应用ID }}
这里我的应用 id 为 vran-gitlab后面在 databasir 配置的时候需要用上
![](img/1-gitlab-oauth2.png)
2. 保存好应用以后,就可以看见 Application Id 和 Secret复制这两个值
![](img/2-gitlab-oauth2.png)
3. 进入 Databasir 系统管理 -> 登录设置页面
![](img/3-gitlab-oauth2.png)
4. 创建并保存应用信息
- client Id 就对应申请到的 Application Id
- client secret 就对应申请到的 Application secret
- 应用 id 记得和我们第一步填写 redirect uri 时的应用 id 保持一致
![image-20220303225811673](img/4-gitlab-oauth2.png)
5. 保存完成以后注销登录,进入登录页面就可以看见多了一个 gitlab 的登录图标,点击就可以使用 gitlab 来登录了
![](img/5-gitlab-oauth2.png)
注意:如果登录出现 The redirect URI included is not valid. 这样的错误,请检查回调地址是否与 databasir 的地址一致,以及协议是否一致(比如 http 和 https
点击登录以后就会进入授权页面,授权完成以后就会新建一个 databasir 用户并自动完成登录
![](img/6-gitlab-oauth2.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -1,7 +1,9 @@
package com.databasir.api; package com.databasir.api;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
@Controller @Controller
public class IndexController { public class IndexController {
@ -11,4 +13,8 @@ public class IndexController {
return "index.html"; return "index.html";
} }
@ResponseStatus(HttpStatus.NOT_FOUND)
public String handleResourceNotFoundException() {
return "/index.html";
}
} }

View File

@ -45,7 +45,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.and() .and()
.authorizeRequests() .authorizeRequests()
.antMatchers("/login", Routes.Login.REFRESH_ACCESS_TOKEN).permitAll() .antMatchers("/login", Routes.Login.REFRESH_ACCESS_TOKEN).permitAll()
.antMatchers("/oauth2/apps", "/oauth2/failure", "/oauth2/authorization/*", "/oauth2/login/*") .antMatchers("/oauth2/apps", "/oauth2/failure", "/oauth2/authorization/*",
"/oauth2/login/*", "/login/oauth2/*")
.permitAll() .permitAll()
.antMatchers("/", "/*.html", "/js/**", "/css/**", "/img/**", "/*.ico").permitAll() .antMatchers("/", "/*.html", "/js/**", "/css/**", "/img/**", "/*.ico").permitAll()
.anyRequest().authenticated() .anyRequest().authenticated()

View File

@ -3,10 +3,15 @@ package com.databasir.api.config;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.data.web.config.EnableSpringDataWebSupport; import org.springframework.data.web.config.EnableSpringDataWebSupport;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
@ -22,6 +27,16 @@ public class WebConfig extends WebMvcConfigurerAdapter {
.allowedMethods("GET", "POST", "DELETE", "PATCH", "PUT"); .allowedMethods("GET", "POST", "DELETE", "PATCH", "PUT");
} }
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/notFound").setViewName("forward:/index.html");
}
@Bean
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> containerCustomizer() {
return container -> container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/notFound"));
}
@Bean @Bean
public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() { public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() {
final String dateTimeFormat = "yyyy-MM-dd HH:mm:ss"; final String dateTimeFormat = "yyyy-MM-dd HH:mm:ss";

View File

@ -0,0 +1 @@
.login-main{margin:0 auto;margin-top:200px}.login-input{border-width:0 0 1px 0;border-style:solid;width:100%;min-height:33px}.login-input::-moz-placeholder{color:hsla(0,0%,71%,.808)}.login-input:-ms-input-placeholder{color:hsla(0,0%,71%,.808)}.login-input::placeholder{color:hsla(0,0%,71%,.808)}.login-input:focus{outline:none;border-color:#000}.login-card{max-width:600px;min-width:500px;border-color:#000}.app-icon{--el-avatar-bg-color:transparent}

View File

@ -1 +1 @@
.el-row{margin-bottom:20px}.remark-card{margin-bottom:30px}.remark-header{display:flex;justify-content:space-between;align-items:center}.remark-header .remark-user{color:#6d6d6d}.remark-header .remark-time{color:#6d6d6d;font-size:.8rem;margin-left:10px}.remark-content{white-space:pre-wrap;text-align:left}.text{font-size:14px;line-height:1.3rem}.item{margin-top:10px;margin-right:40px}.toc-wrapper{right:0;z-index:0;bottom:auto;padding-left:12px;margin-left:10px}.toc{top:130px;margin-left:0;transform:scale(1);bottom:0;position:fixed;overflow-y:hidden;overflow-x:hidden}.toc:hover{overflow-y:auto;overflow-x:auto}.toc-wrapper .toc ul{list-style:none;line-height:1.7;inline-size:200px;overflow-wrap:break-word}.toc-wrapper .toc a{display:inherit} .el-row{margin-bottom:20px}.remark-card{margin-bottom:30px}.remark-header{display:flex;justify-content:space-between;align-items:center}.remark-header .remark-user{color:#6d6d6d}.remark-header .remark-time{color:#6d6d6d;font-size:.8rem;margin-left:10px}.remark-content{white-space:pre-wrap;text-align:left}.text{font-size:14px;line-height:1.3rem}.item{margin-top:10px;margin-right:40px}.toc-wrapper{right:0;z-index:0;bottom:auto;padding-left:12px;margin-left:10px}.toc{top:180px;margin-left:0;transform:scale(1);bottom:0;position:fixed;overflow-y:hidden;overflow-x:hidden}.toc:hover{overflow-y:auto;overflow-x:auto}.toc-wrapper .toc ul{list-style:none;line-height:1.7;inline-size:200px;overflow-wrap:break-word}.toc-wrapper .toc a{display:inherit}

View File

@ -0,0 +1 @@
.login-main{margin:0 auto;margin-top:200px}

View File

@ -1 +0,0 @@
.login-main{margin:0 auto;margin-top:200px}.login-input{border-width:0 0 1px 0;border-style:solid;width:100%;min-height:33px}.login-input::-moz-placeholder{color:hsla(0,0%,70.6%,.808)}.login-input:-ms-input-placeholder{color:hsla(0,0%,70.6%,.808)}.login-input::placeholder{color:hsla(0,0%,70.6%,.808)}.login-input:focus{outline:none;border-color:#000}.login-card{max-width:600px;min-width:500px;border-color:#000}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646202801627" class="icon" viewBox="0 0 1049 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4100" width="49.171875" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M524.979332 0C234.676191 0 0 234.676191 0 524.979332c0 232.068678 150.366597 428.501342 358.967656 498.035028 26.075132 5.215026 35.636014-11.299224 35.636014-25.205961 0-12.168395-0.869171-53.888607-0.869171-97.347161-146.020741 31.290159-176.441729-62.580318-176.441729-62.580318-23.467619-60.841976-58.234462-76.487055-58.234463-76.487055-47.804409-32.15933 3.476684-32.15933 3.476685-32.15933 53.019436 3.476684 80.83291 53.888607 80.83291 53.888607 46.935238 79.963739 122.553122 57.365291 152.97411 43.458554 4.345855-33.897672 18.252593-57.365291 33.028501-70.402857-116.468925-12.168395-239.022047-57.365291-239.022047-259.012982 0-57.365291 20.860106-104.300529 53.888607-140.805715-5.215026-13.037566-23.467619-66.926173 5.215027-139.067372 0 0 44.327725-13.906737 144.282399 53.888607 41.720212-11.299224 86.917108-17.383422 131.244833-17.383422s89.524621 6.084198 131.244833 17.383422C756.178839 203.386032 800.506564 217.29277 800.506564 217.29277c28.682646 72.1412 10.430053 126.029806 5.215026 139.067372 33.897672 36.505185 53.888607 83.440424 53.888607 140.805715 0 201.64769-122.553122 245.975415-239.891218 259.012982 19.121764 16.514251 35.636014 47.804409 35.636015 97.347161 0 70.402857-0.869171 126.898978-0.869172 144.282399 0 13.906737 9.560882 30.420988 35.636015 25.205961 208.601059-69.533686 358.967656-265.96635 358.967655-498.035028C1049.958663 234.676191 814.413301 0 524.979332 0z" fill="#191717" p-id="4101"></path><path d="M199.040177 753.571326c-0.869171 2.607513-5.215026 3.476684-8.691711 1.738342s-6.084198-5.215026-4.345855-7.82254c0.869171-2.607513 5.215026-3.476684 8.691711-1.738342s5.215026 5.215026 4.345855 7.82254z m-6.953369-4.345856M219.900283 777.038945c-2.607513 2.607513-7.82254 0.869171-10.430053-2.607514-3.476684-3.476684-4.345855-8.691711-1.738342-11.299224 2.607513-2.607513 6.953369-0.869171 10.430053 2.607514 3.476684 4.345855 4.345855 9.560882 1.738342 11.299224z m-5.215026-5.215027M240.760389 807.459932c-3.476684 2.607513-8.691711 0-11.299224-4.345855-3.476684-4.345855-3.476684-10.430053 0-12.168395 3.476684-2.607513 8.691711 0 11.299224 4.345855 3.476684 4.345855 3.476684 9.560882 0 12.168395z m0 0M269.443034 837.011749c-2.607513 3.476684-8.691711 2.607513-13.906737-1.738342-4.345855-4.345855-6.084198-10.430053-2.607513-13.037566 2.607513-3.476684 8.691711-2.607513 13.906737 1.738342 4.345855 3.476684 5.215026 9.560882 2.607513 13.037566z m0 0M308.555733 853.526c-0.869171 4.345855-6.953369 6.084198-13.037566 4.345855-6.084198-1.738342-9.560882-6.953369-8.691711-10.430053 0.869171-4.345855 6.953369-6.084198 13.037566-4.345855 6.084198 1.738342 9.560882 6.084198 8.691711 10.430053z m0 0M351.145116 857.002684c0 4.345855-5.215026 7.82254-11.299224 7.82254-6.084198 0-11.299224-3.476684-11.299224-7.82254s5.215026-7.82254 11.299224-7.82254c6.084198 0 11.299224 3.476684 11.299224 7.82254z m0 0M391.126986 850.049315c0.869171 4.345855-3.476684 8.691711-9.560882 9.560882-6.084198 0.869171-11.299224-1.738342-12.168395-6.084197-0.869171-4.345855 3.476684-8.691711 9.560881-9.560882 6.084198-0.869171 11.299224 1.738342 12.168396 6.084197z m0 0" fill="#191717" p-id="4102"></path></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646202833083" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4955" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M59.544137 403.419429L512.115566 983.405714 16.09728 623.396571a39.936 39.936 0 0 1-14.299429-43.995428l57.709715-176.018286z m264.009143 0h377.161143L512.152137 983.405714zM210.40128 53.723429l113.152 349.696H59.544137l113.152-349.696a20.041143 20.041143 0 0 1 37.705143 0z m754.285714 349.696l57.709715 176.018285a39.862857 39.862857 0 0 1-14.299429 43.995429l-496.018286 360.009143 452.571429-579.986286z m0 0h-264.009143l113.152-349.696a20.041143 20.041143 0 0 1 37.705143 0z" fill="" p-id="4956"></path></svg>

After

Width:  |  Height:  |  Size: 889 B

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir-frontend</title><link href="/css/chunk-0888fe78.e51aa148.css" rel="prefetch"><link href="/css/chunk-152d8fda.24a020fa.css" rel="prefetch"><link href="/css/chunk-2be10a43.3284ac4c.css" rel="prefetch"><link href="/css/chunk-af715350.06814884.css" rel="prefetch"><link href="/js/chunk-0888fe78.b3edc7bf.js" rel="prefetch"><link href="/js/chunk-152d8fda.21133535.js" rel="prefetch"><link href="/js/chunk-2be10a43.e440181e.js" rel="prefetch"><link href="/js/chunk-2d0cc811.c5d1ef9e.js" rel="prefetch"><link href="/js/chunk-48cebeac.162363c9.js" rel="prefetch"><link href="/js/chunk-76185686.f269c8f3.js" rel="prefetch"><link href="/js/chunk-af715350.f0eb72e9.js" rel="prefetch"><link href="/js/chunk-e421509c.b47034f5.js" rel="prefetch"><link href="/js/chunk-fffb1b64.1ffb9f27.js" rel="prefetch"><link href="/css/app.36ecf611.css" rel="preload" as="style"><link href="/css/chunk-vendors.d4aa889d.css" rel="preload" as="style"><link href="/js/app.f350e7fd.js" rel="preload" as="script"><link href="/js/chunk-vendors.ec0aa4ac.js" rel="preload" as="script"><link href="/css/chunk-vendors.d4aa889d.css" rel="stylesheet"><link href="/css/app.36ecf611.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but databasir-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.ec0aa4ac.js"></script><script src="/js/app.f350e7fd.js"></script></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir-frontend</title><script defer="defer" type="module" src="/js/chunk-vendors.a3ab3c52.js"></script><script defer="defer" type="module" src="/js/app.b83d3650.js"></script><link href="/css/chunk-vendors.8e1003a6.css" rel="stylesheet"><link href="/css/app.92bd32f6.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.4c3febeb.js" nomodule></script><script defer="defer" src="/js/app-legacy.22ad12cd.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[243],{6243:function(e,t,r){r.r(t),r.d(t,{default:function(){return w}});var n=r(6252),u=(0,n.Uk)(" : "),l=(0,n.Uk)("保存");function o(e,t,r,o,a,s){var m=(0,n.up)("el-input"),i=(0,n.up)("el-form-item"),f=(0,n.up)("el-col"),d=(0,n.up)("el-button"),p=(0,n.up)("el-form"),c=(0,n.up)("el-card"),w=(0,n.up)("el-main"),h=(0,n.up)("el-container");return(0,n.wg)(),(0,n.j4)(h,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(w,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(c,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(p,{model:a.form,"label-position":"top",rules:a.formRule,ref:"formRef",style:{"max-width":"900px"}},{default:(0,n.w5)((function(){return[(0,n.Wm)(i,{label:"邮箱账号",prop:"username"},{default:(0,n.w5)((function(){return[(0,n.Wm)(m,{modelValue:a.form.username,"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.form.username=e})},null,8,["modelValue"])]})),_:1}),(0,n.Wm)(i,{label:"邮箱密码",prop:"password"},{default:(0,n.w5)((function(){return[(0,n.Wm)(m,{modelValue:a.form.password,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.password=e}),type:"password",placeholder:"请输入密码","show-password":""},null,8,["modelValue"])]})),_:1}),(0,n.Wm)(i,{label:"SMTP",prop:"smtpHost"},{default:(0,n.w5)((function(){return[(0,n.Wm)(f,{span:12},{default:(0,n.w5)((function(){return[(0,n.Wm)(m,{modelValue:a.form.smtpHost,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.form.smtpHost=e}),placeholder:"SMTP Host"},null,8,["modelValue"])]})),_:1}),(0,n.Wm)(f,{span:1,style:{"text-align":"center"}},{default:(0,n.w5)((function(){return[u]})),_:1}),(0,n.Wm)(f,{span:6},{default:(0,n.w5)((function(){return[(0,n.Wm)(m,{modelValue:a.form.smtpPort,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.form.smtpPort=e}),placeholder:"SMTP Port"},null,8,["modelValue"])]})),_:1})]})),_:1}),(0,n.Wm)(i,{style:{"margin-top":"38px"}},{default:(0,n.w5)((function(){return[(0,n.Wm)(d,{type:"primary",onClick:t[4]||(t[4]=function(e){return s.onSubmit("formRef")})},{default:(0,n.w5)((function(){return[l]})),_:1})]})),_:1})]})),_:1},8,["model","rules"])]})),_:1})]})),_:1})]})),_:1})}var a=r(8534),s=(r(5666),r(3872)),m="/api/v1.0/settings",i=function(){return s.Z.get(m+"/sys_email")},f=function(e){return s.Z.post(m+"/sys_email",e)},d={data:function(){return{form:{smtpHost:null,smtpPort:null,username:null,password:null},formRule:{username:[this.requiredInputValidRule("请输入邮箱账号"),{type:"email",message:"邮箱格式不正确",trigger:"blur"}],password:[this.requiredInputValidRule("请输入邮箱密码")],smtpHost:[this.requiredInputValidRule("请输入 SMTP 地址")],smtpPort:[this.requiredInputValidRule("请输入 SMTP 端口"),{min:1,max:65535,message:"端口有效值为 1~65535",trigger:"blur"}]}}},mounted:function(){this.fetchSysMail()},methods:{requiredInputValidRule:function(e){return{required:!0,message:e,trigger:"blur"}},fetchSysMail:function(){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i().then((function(e){return e.data}));case 2:r=t.sent,r&&(e.form=r);case 4:case"end":return t.stop()}}),t)})))()},onSubmit:function(){var e=this;this.$refs.formRef.validate((function(t){return t?(f(e.form).then((function(t){t.errCode||e.$message.success("更新成功")})),!0):(e.$message.error("请完善表单相关信息!"),!1)}))}}},p=r(3744);const c=(0,p.Z)(d,[["render",o]]);var w=c}}]);
//# sourceMappingURL=243-legacy.30b5fe0c.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[243],{6243:function(e,l,t){t.r(l),t.d(l,{default:function(){return w}});var r=t(6252);const a=(0,r.Uk)(" : "),s=(0,r.Uk)("保存");function u(e,l,t,u,o,m){const n=(0,r.up)("el-input"),d=(0,r.up)("el-form-item"),p=(0,r.up)("el-col"),i=(0,r.up)("el-button"),f=(0,r.up)("el-form"),w=(0,r.up)("el-card"),c=(0,r.up)("el-main"),h=(0,r.up)("el-container");return(0,r.wg)(),(0,r.j4)(h,null,{default:(0,r.w5)((()=>[(0,r.Wm)(c,null,{default:(0,r.w5)((()=>[(0,r.Wm)(w,null,{default:(0,r.w5)((()=>[(0,r.Wm)(f,{model:o.form,"label-position":"top",rules:o.formRule,ref:"formRef",style:{"max-width":"900px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(d,{label:"邮箱账号",prop:"username"},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{modelValue:o.form.username,"onUpdate:modelValue":l[0]||(l[0]=e=>o.form.username=e)},null,8,["modelValue"])])),_:1}),(0,r.Wm)(d,{label:"邮箱密码",prop:"password"},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{modelValue:o.form.password,"onUpdate:modelValue":l[1]||(l[1]=e=>o.form.password=e),type:"password",placeholder:"请输入密码","show-password":""},null,8,["modelValue"])])),_:1}),(0,r.Wm)(d,{label:"SMTP",prop:"smtpHost"},{default:(0,r.w5)((()=>[(0,r.Wm)(p,{span:12},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{modelValue:o.form.smtpHost,"onUpdate:modelValue":l[2]||(l[2]=e=>o.form.smtpHost=e),placeholder:"SMTP Host"},null,8,["modelValue"])])),_:1}),(0,r.Wm)(p,{span:1,style:{"text-align":"center"}},{default:(0,r.w5)((()=>[a])),_:1}),(0,r.Wm)(p,{span:6},{default:(0,r.w5)((()=>[(0,r.Wm)(n,{modelValue:o.form.smtpPort,"onUpdate:modelValue":l[3]||(l[3]=e=>o.form.smtpPort=e),placeholder:"SMTP Port"},null,8,["modelValue"])])),_:1})])),_:1}),(0,r.Wm)(d,{style:{"margin-top":"38px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(i,{type:"primary",onClick:l[4]||(l[4]=e=>m.onSubmit("formRef"))},{default:(0,r.w5)((()=>[s])),_:1})])),_:1})])),_:1},8,["model","rules"])])),_:1})])),_:1})])),_:1})}var o=t(3872);const m="/api/v1.0/settings",n=()=>o.Z.get(m+"/sys_email"),d=e=>o.Z.post(m+"/sys_email",e);var p={data(){return{form:{smtpHost:null,smtpPort:null,username:null,password:null},formRule:{username:[this.requiredInputValidRule("请输入邮箱账号"),{type:"email",message:"邮箱格式不正确",trigger:"blur"}],password:[this.requiredInputValidRule("请输入邮箱密码")],smtpHost:[this.requiredInputValidRule("请输入 SMTP 地址")],smtpPort:[this.requiredInputValidRule("请输入 SMTP 端口"),{min:1,max:65535,message:"端口有效值为 1~65535",trigger:"blur"}]}}},mounted(){this.fetchSysMail()},methods:{requiredInputValidRule(e){return{required:!0,message:e,trigger:"blur"}},async fetchSysMail(){const e=await n().then((e=>e.data));e&&(this.form=e)},onSubmit(){this.$refs.formRef.validate((e=>e?(d(this.form).then((e=>{e.errCode||this.$message.success("更新成功")})),!0):(this.$message.error("请完善表单相关信息!"),!1)))}}},i=t(3744);const f=(0,i.Z)(p,[["render",u]]);var w=f}}]);
//# sourceMappingURL=243.9a892caa.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[700],{5430:function(e,t,a){a.d(t,{v:function(){return r}});var n=a(3872),o="/api/v1.0/operation_logs",r=function(e){return n.Z.get(o,{params:e})}},8700:function(e,t,a){a.r(t),a.d(t,{default:function(){return P}});var n=a(6252),o=a(3577),r={key:0},u=(0,n.Uk)("成功"),l={key:1},p=(0,n.Uk)("失败"),i={key:0},c={key:1};function g(e,t,a,g,s,d){var f=(0,n.up)("el-row"),m=(0,n.up)("el-header"),P=(0,n.up)("el-table-column"),h=(0,n.up)("el-option"),j=(0,n.up)("el-select"),w=(0,n.up)("el-tag"),b=(0,n.up)("el-table"),L=(0,n.up)("el-main"),O=(0,n.up)("el-pagination"),v=(0,n.up)("el-footer"),W=(0,n.up)("el-container");return(0,n.wg)(),(0,n.j4)(W,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(m,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(f,{gutter:10})]})),_:1}),(0,n.Wm)(L,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(b,{data:s.projectOperationLogPageData.data},{default:(0,n.w5)((function(){return[(0,n.Wm)(P,{prop:"id",label:""}),(0,n.Wm)(P,{prop:"operationModule",label:"系统模块"}),(0,n.Wm)(P,{prop:"operatorNickname",label:"操作人"}),(0,n.Wm)(P,{prop:"operationName",label:"操作"}),(0,n.Wm)(P,{label:"状态"},{header:(0,n.w5)((function(){return[(0,n.Wm)(j,{modelValue:s.projectOperationLogPageQuery.isSuccess,"onUpdate:modelValue":t[0]||(t[0]=function(e){return s.projectOperationLogPageQuery.isSuccess=e}),placeholder:"状态",onChange:d.onQuery,clearable:"",size:"small","tag-type":"success"},{default:(0,n.w5)((function(){return[((0,n.wg)(),(0,n.iD)(n.HY,null,(0,n.Ko)([!0,!1],(function(e){return(0,n.Wm)(h,{key:e,label:e?"成功":"失败",value:e},null,8,["label","value"])})),64))]})),_:1},8,["modelValue","onChange"])]})),default:(0,n.w5)((function(e){return[e.row.isSuccess?((0,n.wg)(),(0,n.iD)("span",r,[(0,n.Wm)(w,{type:"success"},{default:(0,n.w5)((function(){return[u]})),_:1})])):((0,n.wg)(),(0,n.iD)("span",l,[(0,n.Wm)(w,{type:"danger"},{default:(0,n.w5)((function(){return[p]})),_:1})]))]})),_:1}),(0,n.Wm)(P,{label:"错误信息"},{default:(0,n.w5)((function(e){return[e.row.isSuccess?((0,n.wg)(),(0,n.iD)("span",i)):((0,n.wg)(),(0,n.iD)("span",c,(0,o.zw)(e.row.operationResponse.errMessage),1))]})),_:1}),(0,n.Wm)(P,{prop:"involvedGroupId",label:"涉及分组"}),(0,n.Wm)(P,{prop:"involvedProjectId",label:"涉及项目"}),(0,n.Wm)(P,{prop:"involvedUserId",label:"涉及用户"}),(0,n.Wm)(P,{prop:"createAt",label:"记录时间"})]})),_:1},8,["data"])]})),_:1}),(0,n.Wm)(v,null,{default:(0,n.w5)((function(){return[(0,n.Wm)(O,{layout:"prev, pager, next","hide-on-single-page":!1,currentPage:s.projectOperationLogPageData.number,"page-size":s.projectOperationLogPageData.size,"page-count":s.projectOperationLogPageData.totalPages,onCurrentChange:d.onProjectOperationLogCurrentPageChange},null,8,["currentPage","page-size","page-count","onCurrentChange"])]})),_:1})]})),_:1})}var s=a(5430),d={data:function(){return{projectOperationLogPageData:{data:[],number:1,size:10,totalElements:0,totalPages:1},projectOperationLogPageQuery:{page:0,size:10,isSuccess:null,involveProjectId:null,module:null}}},created:function(){this.fetchProjectOperationLogs()},methods:{fetchProjectOperationLogs:function(e){var t=this;this.projectOperationLogPageQuery.page=e?e-1:null,(0,s.v)(this.projectOperationLogPageQuery).then((function(e){e.errCode||(t.projectOperationLogPageData.data=e.data.content,t.projectOperationLogPageData.number=e.data.number+1,t.projectOperationLogPageData.size=e.data.size,t.projectOperationLogPageData.totalPages=e.data.totalPages,t.projectOperationLogPageData.totalElements=e.data.totalElements)}))},onProjectOperationLogCurrentPageChange:function(e){e&&e-1!=this.projectOperationLogPageQuery.page&&(this.projectOperationLogPageQuery.page=e-1,this.fetchProjectOperationLogs(e))},onQuery:function(){this.fetchProjectOperationLogs()}}},f=a(3744);const m=(0,f.Z)(d,[["render",g]]);var P=m}}]);
//# sourceMappingURL=700-legacy.c1c436e7.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[700],{5430:function(e,a,t){t.d(a,{v:function(){return n}});var o=t(3872);const r="/api/v1.0/operation_logs",n=e=>o.Z.get(r,{params:e})},8700:function(e,a,t){t.r(a),t.d(a,{default:function(){return h}});var o=t(6252),r=t(3577);const n={key:0},l=(0,o.Uk)("成功"),p={key:1},u=(0,o.Uk)("失败"),g={key:0},i={key:1};function s(e,a,t,s,c,d){const m=(0,o.up)("el-row"),P=(0,o.up)("el-header"),h=(0,o.up)("el-table-column"),j=(0,o.up)("el-option"),f=(0,o.up)("el-select"),w=(0,o.up)("el-tag"),b=(0,o.up)("el-table"),L=(0,o.up)("el-main"),O=(0,o.up)("el-pagination"),W=(0,o.up)("el-footer"),v=(0,o.up)("el-container");return(0,o.wg)(),(0,o.j4)(v,null,{default:(0,o.w5)((()=>[(0,o.Wm)(P,null,{default:(0,o.w5)((()=>[(0,o.Wm)(m,{gutter:10})])),_:1}),(0,o.Wm)(L,null,{default:(0,o.w5)((()=>[(0,o.Wm)(b,{data:c.projectOperationLogPageData.data},{default:(0,o.w5)((()=>[(0,o.Wm)(h,{prop:"id",label:""}),(0,o.Wm)(h,{prop:"operationModule",label:"系统模块"}),(0,o.Wm)(h,{prop:"operatorNickname",label:"操作人"}),(0,o.Wm)(h,{prop:"operationName",label:"操作"}),(0,o.Wm)(h,{label:"状态"},{header:(0,o.w5)((()=>[(0,o.Wm)(f,{modelValue:c.projectOperationLogPageQuery.isSuccess,"onUpdate:modelValue":a[0]||(a[0]=e=>c.projectOperationLogPageQuery.isSuccess=e),placeholder:"状态",onChange:d.onQuery,clearable:"",size:"small","tag-type":"success"},{default:(0,o.w5)((()=>[((0,o.wg)(),(0,o.iD)(o.HY,null,(0,o.Ko)([!0,!1],(e=>(0,o.Wm)(j,{key:e,label:e?"成功":"失败",value:e},null,8,["label","value"]))),64))])),_:1},8,["modelValue","onChange"])])),default:(0,o.w5)((e=>[e.row.isSuccess?((0,o.wg)(),(0,o.iD)("span",n,[(0,o.Wm)(w,{type:"success"},{default:(0,o.w5)((()=>[l])),_:1})])):((0,o.wg)(),(0,o.iD)("span",p,[(0,o.Wm)(w,{type:"danger"},{default:(0,o.w5)((()=>[u])),_:1})]))])),_:1}),(0,o.Wm)(h,{label:"错误信息"},{default:(0,o.w5)((e=>[e.row.isSuccess?((0,o.wg)(),(0,o.iD)("span",g)):((0,o.wg)(),(0,o.iD)("span",i,(0,r.zw)(e.row.operationResponse.errMessage),1))])),_:1}),(0,o.Wm)(h,{prop:"involvedGroupId",label:"涉及分组"}),(0,o.Wm)(h,{prop:"involvedProjectId",label:"涉及项目"}),(0,o.Wm)(h,{prop:"involvedUserId",label:"涉及用户"}),(0,o.Wm)(h,{prop:"createAt",label:"记录时间"})])),_:1},8,["data"])])),_:1}),(0,o.Wm)(W,null,{default:(0,o.w5)((()=>[(0,o.Wm)(O,{layout:"prev, pager, next","hide-on-single-page":!1,currentPage:c.projectOperationLogPageData.number,"page-size":c.projectOperationLogPageData.size,"page-count":c.projectOperationLogPageData.totalPages,onCurrentChange:d.onProjectOperationLogCurrentPageChange},null,8,["currentPage","page-size","page-count","onCurrentChange"])])),_:1})])),_:1})}var c=t(5430),d={data(){return{projectOperationLogPageData:{data:[],number:1,size:10,totalElements:0,totalPages:1},projectOperationLogPageQuery:{page:0,size:10,isSuccess:null,involveProjectId:null,module:null}}},created(){this.fetchProjectOperationLogs()},methods:{fetchProjectOperationLogs(e){this.projectOperationLogPageQuery.page=e?e-1:null,(0,c.v)(this.projectOperationLogPageQuery).then((e=>{e.errCode||(this.projectOperationLogPageData.data=e.data.content,this.projectOperationLogPageData.number=e.data.number+1,this.projectOperationLogPageData.size=e.data.size,this.projectOperationLogPageData.totalPages=e.data.totalPages,this.projectOperationLogPageData.totalElements=e.data.totalElements)}))},onProjectOperationLogCurrentPageChange(e){e&&e-1!=this.projectOperationLogPageQuery.page&&(this.projectOperationLogPageQuery.page=e-1,this.fetchProjectOperationLogs(e))},onQuery(){this.fetchProjectOperationLogs()}}},m=t(3744);const P=(0,m.Z)(d,[["render",s]]);var h=P}}]);
//# sourceMappingURL=700.742269a6.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[865],{8865:function(t,n,e){e.r(n),e.d(n,{default:function(){return f}});var i=e(6252),r=e(9963),a=(0,i.Uk)("立即跳转");function o(t,n,e,o,u,l){var s=(0,i.up)("el-button"),c=(0,i.up)("el-result"),d=(0,i.up)("el-main"),f=(0,i.up)("el-container"),g=(0,i.Q2)("loading");return(0,i.wg)(),(0,i.j4)(f,null,{default:(0,i.w5)((function(){return[(0,i.wy)(((0,i.wg)(),(0,i.j4)(d,{class:"login-main"},{default:(0,i.w5)((function(){return[(0,i.wy)((0,i.Wm)(c,{icon:u.icon,title:u.title,"sub-title":u.subTitle},{extra:(0,i.w5)((function(){return[(0,i.Wm)(s,{type:"primary",onClick:n[0]||(n[0]=function(t){return l.toIndexPage()})},{default:(0,i.w5)((function(){return[a]})),_:1})]})),_:1},8,["icon","title","sub-title"]),[[r.F8,!u.loading]])]})),_:1})),[[g,u.loading]])]})),_:1})}var u=e(152),l=e(1836),s={data:function(){return{registrationId:null,icon:"",title:"",subTitle:"",loading:!0}},created:function(){this.registrationId=this.$route.params.id,this.login()},methods:{login:function(){var t=this,n=window.location.href,e=this.$route.query;e.redirect_uri=n,(0,u.rd)(this.registrationId,e).then((function(n){n.errCode?(t.title=n.errMessage,t.icon="error"):(l.E.saveUserLoginData(n.data),t.$store.commit("userUpdate",{nickname:n.data.nickname,username:n.data.username,email:n.data.email,avatar:n.data.avatar}),t.icon="success",t.$router.push({path:"/groups"})),t.loading=!1})).catch((function(n){console.log("login failed: "+n),t.icon="error",t.title="登陆失败,请重试",t.loading=!1}))},toIndexPage:function(){this.$router.push({path:"/"})}}},c=e(3744);const d=(0,c.Z)(s,[["render",o]]);var f=d}}]);
//# sourceMappingURL=865-legacy.fc2fd7b3.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"js/865-legacy.fc2fd7b3.js","mappings":"mNAUiE,Q,qKAT7DA,EAAAA,EAAAA,IAaeC,EAAA,M,kBAZX,iBAWU,uBAXVD,EAAAA,EAAAA,IAWUE,EAAA,CAXmBC,MAAM,cAAY,C,kBAC3C,iBASY,WATZC,EAAAA,EAAAA,IASYC,EAAA,CARPC,KAAMC,EAAAA,KACNC,MAAOD,EAAAA,MACP,YAAWA,EAAAA,UAHhB,CAMeE,OAAK,SAChB,iBAAiE,EAAjEL,EAAAA,EAAAA,IAAiEM,EAAA,CAAtDC,KAAK,UAAWC,QAAK,+BAAEC,EAAAA,iBAAlC,C,kBAAiD,iBAAI,O,eAPzD,wCAIaN,EAAAA,e,OALjB,IAAoBA,EAAAA,e,6BA2B5B,GACIO,KADW,WAEP,MAAO,CACHC,eAAgB,KAChBT,KAAM,GACNE,MAAO,GACPQ,SAAU,GACVC,SAAS,IAIjBC,QAXW,WAYPC,KAAKJ,eAAiBI,KAAKC,OAAOC,OAAOC,GACzCH,KAAKI,SAGTC,QAAS,CACJD,MADI,WACI,WACCE,EAAcC,OAAOC,SAASC,KAC9BP,EAASF,KAAKC,OAAOS,MAC3BR,EAAOS,aAAeL,GACtBM,EAAAA,EAAAA,IAAYZ,KAAKJ,eAAgBM,GAAQW,MAAK,SAAAC,GACrCA,EAAKC,SAWN,EAAK1B,MAAQyB,EAAKE,WAClB,EAAK7B,KAAO,UAXZ8B,EAAAA,EAAAA,kBAAuBH,EAAKnB,MAC5B,EAAKuB,OAAOC,OAAO,aAAc,CAC7BC,SAAUN,EAAKnB,KAAKyB,SACpBC,SAAUP,EAAKnB,KAAK0B,SACpBC,MAAOR,EAAKnB,KAAK2B,MACjBC,OAAQT,EAAKnB,KAAK4B,SAEtB,EAAKpC,KAAK,UACV,EAAKqC,QAAQC,KAAK,CAACC,KAAM,aAK7B,EAAK5B,SAAU,KAChB6B,OAAM,SAAAC,GACLC,QAAQC,IAAI,iBAAiBF,GAC7B,EAAKzC,KAAO,QACZ,EAAKE,MAAQ,WACb,EAAKS,SAAU,MAIvBiC,YA7BK,WA8BD/B,KAAKwB,QAAQC,KAAK,CAACC,KAAM,S,UCpErC,MAAMM,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,KAEpE","sources":["webpack://databasir-frontend/./src/views/OAuth2Login.vue","webpack://databasir-frontend/./src/views/OAuth2Login.vue?b6ea"],"sourcesContent":["<template>\r\n <el-container>\r\n <el-main v-loading=\"loading\" class=\"login-main\">\r\n <el-result\r\n :icon=\"icon\"\r\n :title=\"title\"\r\n :sub-title=\"subTitle\"\r\n v-show=\"!loading\"\r\n >\r\n <template #extra>\r\n <el-button type=\"primary\" @click=\"toIndexPage()\">立即跳转</el-button>\r\n </template>\r\n </el-result>\r\n </el-main>\r\n </el-container>\r\n</template>\r\n\r\n<style>\r\n.login-main {\r\n margin: 0 auto;\r\n margin-top: 200px;\r\n}\r\n\r\n</style>\r\n<script>\r\nimport { oauth2Login } from \"../api/Login\"\r\nimport { user } from \"../utils/auth\"\r\n\r\n\r\nexport default {\r\n data() {\r\n return {\r\n registrationId: null,\r\n icon: '',\r\n title: '',\r\n subTitle: '',\r\n loading: true,\r\n }\r\n },\r\n\r\n created() {\r\n this.registrationId = this.$route.params.id\r\n this.login()\r\n },\r\n\r\n methods: {\r\n login() {\r\n const redirectUri = window.location.href\r\n const params = this.$route.query\r\n params.redirect_uri = redirectUri\r\n oauth2Login(this.registrationId, params).then(resp => {\r\n if (!resp.errCode) {\r\n user.saveUserLoginData(resp.data)\r\n this.$store.commit('userUpdate', {\r\n nickname: resp.data.nickname,\r\n username: resp.data.username,\r\n email: resp.data.email,\r\n avatar: resp.data.avatar\r\n })\r\n this.icon='success'\r\n this.$router.push({path: '/groups'})\r\n } else {\r\n this.title = resp.errMessage\r\n this.icon = 'error'\r\n }\r\n this.loading = false\r\n }).catch(err => {\r\n console.log('login failed: '+err)\r\n this.icon = 'error'\r\n this.title = '登陆失败,请重试'\r\n this.loading = false\r\n })\r\n },\r\n\r\n toIndexPage() {\r\n this.$router.push({path: '/'})\r\n }\r\n }\r\n}\r\n</script>","import { render } from \"./OAuth2Login.vue?vue&type=template&id=65bc9922\"\nimport script from \"./OAuth2Login.vue?vue&type=script&lang=js\"\nexport * from \"./OAuth2Login.vue?vue&type=script&lang=js\"\n\nimport \"./OAuth2Login.vue?vue&type=style&index=0&id=65bc9922&lang=css\"\n\nimport exportComponent from \"E:\\\\git_workspace\\\\databasir-frontend\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_createBlock","_component_el_container","_component_el_main","class","_createVNode","_component_el_result","icon","$data","title","extra","_component_el_button","type","onClick","$options","data","registrationId","subTitle","loading","created","this","$route","params","id","login","methods","redirectUri","window","location","href","query","redirect_uri","oauth2Login","then","resp","errCode","errMessage","user","$store","commit","nickname","username","email","avatar","$router","push","path","catch","err","console","log","toIndexPage","__exports__","render"],"sourceRoot":""}

View File

@ -0,0 +1,2 @@
"use strict";(self["webpackChunkdatabasir_frontend"]=self["webpackChunkdatabasir_frontend"]||[]).push([[865],{8865:function(t,e,i){i.r(e),i.d(e,{default:function(){return h}});var a=i(6252),n=i(9963);const r=(0,a.Uk)("立即跳转");function s(t,e,i,s,o,l){const u=(0,a.up)("el-button"),d=(0,a.up)("el-result"),c=(0,a.up)("el-main"),h=(0,a.up)("el-container"),g=(0,a.Q2)("loading");return(0,a.wg)(),(0,a.j4)(h,null,{default:(0,a.w5)((()=>[(0,a.wy)(((0,a.wg)(),(0,a.j4)(c,{class:"login-main"},{default:(0,a.w5)((()=>[(0,a.wy)((0,a.Wm)(d,{icon:o.icon,title:o.title,"sub-title":o.subTitle},{extra:(0,a.w5)((()=>[(0,a.Wm)(u,{type:"primary",onClick:e[0]||(e[0]=t=>l.toIndexPage())},{default:(0,a.w5)((()=>[r])),_:1})])),_:1},8,["icon","title","sub-title"]),[[n.F8,!o.loading]])])),_:1})),[[g,o.loading]])])),_:1})}var o=i(152),l=i(1836),u={data(){return{registrationId:null,icon:"",title:"",subTitle:"",loading:!0}},created(){this.registrationId=this.$route.params.id,this.login()},methods:{login(){const t=window.location.href,e=this.$route.query;e.redirect_uri=t,(0,o.rd)(this.registrationId,e).then((t=>{t.errCode?(this.title=t.errMessage,this.icon="error"):(l.E.saveUserLoginData(t.data),this.$store.commit("userUpdate",{nickname:t.data.nickname,username:t.data.username,email:t.data.email,avatar:t.data.avatar}),this.icon="success",this.$router.push({path:"/groups"})),this.loading=!1})).catch((t=>{console.log("login failed: "+t),this.icon="error",this.title="登陆失败,请重试",this.loading=!1}))},toIndexPage(){this.$router.push({path:"/"})}}},d=i(3744);const c=(0,d.Z)(u,[["render",s]]);var h=c}}]);
//# sourceMappingURL=865.ebbb1893.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"js/865.ebbb1893.js","mappings":"yNAUiE,Q,uKAT7DA,EAAAA,EAAAA,IAaeC,EAAA,M,kBAZX,IAWU,uBAXVD,EAAAA,EAAAA,IAWUE,EAAA,CAXmBC,MAAM,cAAY,C,kBAC3C,IASY,WATZC,EAAAA,EAAAA,IASYC,EAAA,CARPC,KAAMC,EAAAA,KACNC,MAAOD,EAAAA,MACP,YAAWA,EAAAA,UAHhB,CAMeE,OAAK,SAChB,IAAiE,EAAjEL,EAAAA,EAAAA,IAAiEM,EAAA,CAAtDC,KAAK,UAAWC,QAAK,eAAEC,EAAAA,gBAAlC,C,kBAAiD,IAAI,M,cAPzD,wCAIaN,EAAAA,c,OALjB,IAAoBA,EAAAA,c,6BA2B5B,GACIO,OACI,MAAO,CACHC,eAAgB,KAChBT,KAAM,GACNE,MAAO,GACPQ,SAAU,GACVC,SAAS,IAIjBC,UACIC,KAAKJ,eAAiBI,KAAKC,OAAOC,OAAOC,GACzCH,KAAKI,SAGTC,QAAS,CACJD,QACG,MAAME,EAAcC,OAAOC,SAASC,KAC9BP,EAASF,KAAKC,OAAOS,MAC3BR,EAAOS,aAAeL,GACtBM,EAAAA,EAAAA,IAAYZ,KAAKJ,eAAgBM,GAAQW,MAAKC,IACrCA,EAAKC,SAWNf,KAAKX,MAAQyB,EAAKE,WAClBhB,KAAKb,KAAO,UAXZ8B,EAAAA,EAAAA,kBAAuBH,EAAKnB,MAC5BK,KAAKkB,OAAOC,OAAO,aAAc,CAC7BC,SAAUN,EAAKnB,KAAKyB,SACpBC,SAAUP,EAAKnB,KAAK0B,SACpBC,MAAOR,EAAKnB,KAAK2B,MACjBC,OAAQT,EAAKnB,KAAK4B,SAEtBvB,KAAKb,KAAK,UACVa,KAAKwB,QAAQC,KAAK,CAACC,KAAM,aAK7B1B,KAAKF,SAAU,KAChB6B,OAAMC,IACLC,QAAQC,IAAI,iBAAiBF,GAC7B5B,KAAKb,KAAO,QACZa,KAAKX,MAAQ,WACbW,KAAKF,SAAU,MAIvBiC,cACI/B,KAAKwB,QAAQC,KAAK,CAACC,KAAM,S,UCpErC,MAAMM,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,KAEpE","sources":["webpack://databasir-frontend/./src/views/OAuth2Login.vue","webpack://databasir-frontend/./src/views/OAuth2Login.vue?b6ea"],"sourcesContent":["<template>\r\n <el-container>\r\n <el-main v-loading=\"loading\" class=\"login-main\">\r\n <el-result\r\n :icon=\"icon\"\r\n :title=\"title\"\r\n :sub-title=\"subTitle\"\r\n v-show=\"!loading\"\r\n >\r\n <template #extra>\r\n <el-button type=\"primary\" @click=\"toIndexPage()\">立即跳转</el-button>\r\n </template>\r\n </el-result>\r\n </el-main>\r\n </el-container>\r\n</template>\r\n\r\n<style>\r\n.login-main {\r\n margin: 0 auto;\r\n margin-top: 200px;\r\n}\r\n\r\n</style>\r\n<script>\r\nimport { oauth2Login } from \"../api/Login\"\r\nimport { user } from \"../utils/auth\"\r\n\r\n\r\nexport default {\r\n data() {\r\n return {\r\n registrationId: null,\r\n icon: '',\r\n title: '',\r\n subTitle: '',\r\n loading: true,\r\n }\r\n },\r\n\r\n created() {\r\n this.registrationId = this.$route.params.id\r\n this.login()\r\n },\r\n\r\n methods: {\r\n login() {\r\n const redirectUri = window.location.href\r\n const params = this.$route.query\r\n params.redirect_uri = redirectUri\r\n oauth2Login(this.registrationId, params).then(resp => {\r\n if (!resp.errCode) {\r\n user.saveUserLoginData(resp.data)\r\n this.$store.commit('userUpdate', {\r\n nickname: resp.data.nickname,\r\n username: resp.data.username,\r\n email: resp.data.email,\r\n avatar: resp.data.avatar\r\n })\r\n this.icon='success'\r\n this.$router.push({path: '/groups'})\r\n } else {\r\n this.title = resp.errMessage\r\n this.icon = 'error'\r\n }\r\n this.loading = false\r\n }).catch(err => {\r\n console.log('login failed: '+err)\r\n this.icon = 'error'\r\n this.title = '登陆失败,请重试'\r\n this.loading = false\r\n })\r\n },\r\n\r\n toIndexPage() {\r\n this.$router.push({path: '/'})\r\n }\r\n }\r\n}\r\n</script>","import { render } from \"./OAuth2Login.vue?vue&type=template&id=65bc9922\"\nimport script from \"./OAuth2Login.vue?vue&type=script&lang=js\"\nexport * from \"./OAuth2Login.vue?vue&type=script&lang=js\"\n\nimport \"./OAuth2Login.vue?vue&type=style&index=0&id=65bc9922&lang=css\"\n\nimport exportComponent from \"E:\\\\git_workspace\\\\databasir-frontend\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_createBlock","_component_el_container","_component_el_main","class","_createVNode","_component_el_result","icon","$data","title","extra","_component_el_button","type","onClick","$options","data","registrationId","subTitle","loading","created","this","$route","params","id","login","methods","redirectUri","window","location","href","query","redirect_uri","oauth2Login","then","resp","errCode","errMessage","user","$store","commit","nickname","username","email","avatar","$router","push","path","catch","err","console","log","toIndexPage","__exports__","render"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0888fe78"],{"0625":function(e,t,n){"use strict";n("191d")},"191d":function(e,t,n){},a55b:function(e,t,n){"use strict";n.r(t);var o=n("7a23"),r={class:"login-card"},c=Object(o["createElementVNode"])("h1",null,"Databasir",-1),a=Object(o["createTextVNode"])(" 登录 "),u=Object(o["createTextVNode"])(" 忘记密码? ");function i(e,t,n,i,l,d){var s=Object(o["resolveComponent"])("el-header"),f=Object(o["resolveComponent"])("el-link"),b=Object(o["resolveComponent"])("el-divider"),m=Object(o["resolveComponent"])("el-form-item"),j=Object(o["resolveComponent"])("el-button"),p=Object(o["resolveComponent"])("el-tooltip"),O=Object(o["resolveComponent"])("el-space"),h=Object(o["resolveComponent"])("el-form"),w=Object(o["resolveComponent"])("el-main"),C=Object(o["resolveComponent"])("el-footer"),v=Object(o["resolveComponent"])("el-container");return Object(o["openBlock"])(),Object(o["createBlock"])(v,null,{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(s),Object(o["createVNode"])(w,{class:"login-main"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",r,[Object(o["createVNode"])(h,{ref:"formRef",rules:l.formRule,model:l.form,style:{border:"none"}},{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(m,null,{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(b,{"content-position":"left"},{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(f,{href:"https://github.com/vran-dev/databasir",target:"_blank",underline:!1,type:"info"},{default:Object(o["withCtx"])((function(){return[c]})),_:1})]})),_:1})]})),_:1}),Object(o["createVNode"])(m,{prop:"username"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",class:"login-input",placeholder:"用户名或邮箱","onUpdate:modelValue":t[0]||(t[0]=function(e){return l.form.username=e}),onKeyup:t[1]||(t[1]=Object(o["withKeys"])((function(e){return d.onLogin("formRef")}),["enter"]))},null,544),[[o["vModelText"],l.form.username]])]})),_:1}),Object(o["createVNode"])(m,{prop:"password"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"password",class:"login-input",placeholder:"密码","onUpdate:modelValue":t[2]||(t[2]=function(e){return l.form.password=e}),onKeyup:t[3]||(t[3]=Object(o["withKeys"])((function(e){return d.onLogin("formRef")}),["enter"]))},null,544),[[o["vModelText"],l.form.password]])]})),_:1}),Object(o["createVNode"])(m,null,{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(O,{size:32},{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(j,{style:{width:"120px","margin-top":"10px"},color:"#000",onClick:t[4]||(t[4]=function(e){return d.onLogin("formRef")}),plain:"",round:""},{default:Object(o["withCtx"])((function(){return[a]})),_:1}),Object(o["createVNode"])(p,{content:"请联系管理员为您重置密码"},{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(f,{target:"_blank",underline:!1,type:"info"},{default:Object(o["withCtx"])((function(){return[u]})),_:1})]})),_:1})]})),_:1})]})),_:1})]})),_:1},8,["rules","model"])])]})),_:1}),Object(o["createVNode"])(C,null,{default:Object(o["withCtx"])((function(){return[Object(o["createVNode"])(O)]})),_:1})]})),_:1})}var l=n("b0af"),d=n("5f87"),s={data:function(){return{form:{username:null,password:null},formRule:{username:[{required:!0,message:"请输入用户名或邮箱",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}}},methods:{toIndexPage:function(){this.$router.push({path:"/groups"})},onLogin:function(){var e=this;this.$refs.formRef.validate((function(t){t&&Object(l["a"])(e.form).then((function(t){t.errCode||(d["b"].saveUserLoginData(t.data),e.$store.commit("userUpdate",{nickname:t.data.nickname,username:t.data.username,email:t.data.email}),e.toIndexPage())}))}))}}},f=(n("0625"),n("6b0d")),b=n.n(f);const m=b()(s,[["render",i]]);t["default"]=m}}]);
//# sourceMappingURL=chunk-0888fe78.b3edc7bf.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cc811"],{"4de0":function(e,t,r){"use strict";r.r(t);var n=r("7a23"),o=Object(n["createTextVNode"])(" : "),u=Object(n["createTextVNode"])("保存");function l(e,t,r,l,a,c){var s=Object(n["resolveComponent"])("el-input"),i=Object(n["resolveComponent"])("el-form-item"),d=Object(n["resolveComponent"])("el-col"),m=Object(n["resolveComponent"])("el-button"),f=Object(n["resolveComponent"])("el-form"),p=Object(n["resolveComponent"])("el-card"),b=Object(n["resolveComponent"])("el-main"),j=Object(n["resolveComponent"])("el-container");return Object(n["openBlock"])(),Object(n["createBlock"])(j,null,{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(b,null,{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(p,null,{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(f,{model:a.form,"label-position":"top",rules:a.formRule,ref:"formRef",style:{"max-width":"900px"}},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(i,{label:"邮箱账号",prop:"username"},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(s,{modelValue:a.form.username,"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.form.username=e})},null,8,["modelValue"])]})),_:1}),Object(n["createVNode"])(i,{label:"邮箱密码",prop:"password"},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(s,{modelValue:a.form.password,"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.form.password=e}),type:"password",placeholder:"请输入密码","show-password":""},null,8,["modelValue"])]})),_:1}),Object(n["createVNode"])(i,{label:"SMTP",prop:"smtpHost"},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(d,{span:12},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(s,{modelValue:a.form.smtpHost,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.form.smtpHost=e}),placeholder:"SMTP Host"},null,8,["modelValue"])]})),_:1}),Object(n["createVNode"])(d,{span:1,style:{"text-align":"center"}},{default:Object(n["withCtx"])((function(){return[o]})),_:1}),Object(n["createVNode"])(d,{span:6},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(s,{modelValue:a.form.smtpPort,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.form.smtpPort=e}),placeholder:"SMTP Port"},null,8,["modelValue"])]})),_:1})]})),_:1}),Object(n["createVNode"])(i,{style:{"margin-top":"38px"}},{default:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(m,{type:"primary",onClick:t[4]||(t[4]=function(e){return c.onSubmit("formRef")})},{default:Object(n["withCtx"])((function(){return[u]})),_:1})]})),_:1})]})),_:1},8,["model","rules"])]})),_:1})]})),_:1})]})),_:1})}var a=r("1da1"),c=(r("96cf"),r("1c1e")),s="/api/v1.0/settings",i=function(){return c["a"].get(s+"/sys_email")},d=function(e){return c["a"].post(s+"/sys_email",e)},m={data:function(){return{form:{smtpHost:null,smtpPort:null,username:null,password:null},formRule:{username:[this.requiredInputValidRule("请输入邮箱账号"),{type:"email",message:"邮箱格式不正确",trigger:"blur"}],password:[this.requiredInputValidRule("请输入邮箱密码")],smtpHost:[this.requiredInputValidRule("请输入 SMTP 地址")],smtpPort:[this.requiredInputValidRule("请输入 SMTP 端口"),{min:1,max:65535,message:"端口有效值为 1~65535",trigger:"blur"}]}}},mounted:function(){this.fetchSysMail()},methods:{requiredInputValidRule:function(e){return{required:!0,message:e,trigger:"blur"}},fetchSysMail:function(){var e=this;return Object(a["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i().then((function(e){return e.data}));case 2:r=t.sent,r&&(e.form=r);case 4:case"end":return t.stop()}}),t)})))()},onSubmit:function(){var e=this;this.$refs.formRef.validate((function(t){return t?(d(e.form).then((function(t){t.errCode||e.$message.success("更新成功")})),!0):(e.$message.error("请完善表单相关信息!"),!1)}))}}},f=r("6b0d"),p=r.n(f);const b=p()(m,[["render",l]]);t["default"]=b}}]);
//# sourceMappingURL=chunk-2d0cc811.c5d1ef9e.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More