From 6b147281ad5adab2706b50f328131ac1486a34ea Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 31 Mar 2020 16:03:06 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=88=B6=E7=BA=A7class=EF=BC=8C=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/build/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index 0d8adef7c..4548012de 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -428,7 +428,7 @@ input, textarea{ padding: 12px 18px 15px 15px; } } -.el-scrollbar__wrap { +.left-scrollbar .el-scrollbar__wrap { box-sizing: border-box; overflow-x: hidden !important; margin-bottom: 0 !important; @@ -502,7 +502,7 @@ input, textarea{ } } -.el-scrollbar__view{ +.left-scrollbar .el-scrollbar__view{ overflow-x: hidden; } From f9799cd4446dfebc1327a5329675d2b7771d243e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 31 Mar 2020 16:40:26 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=B8=8D=E6=94=AF=E6=8C=81ios=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 380e3ce82..dc18b9122 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -17,6 +17,8 @@ export function parseTime(time, pattern) { } else { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/'); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000 From ed04c24eb35a16c122e4c32b2cc703b5c385760f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 09:52:49 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=88=97=E6=94=AF=E6=8C=81=E6=8B=96=E5=8A=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 + ruoyi-ui/src/assets/styles/ruoyi.scss | 7 +++++++ ruoyi-ui/src/views/tool/gen/editTable.vue | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 923126cc1..62c2bddb1 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -54,6 +54,7 @@ "nprogress": "0.2.0", "path-to-regexp": "2.4.0", "screenfull": "4.2.0", + "sortablejs": "1.8.4", "vue": "2.6.10", "vue-count-to": "1.0.13", "vue-quill-editor": "3.0.6", diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 77307e578..42d90a602 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -187,4 +187,11 @@ border-radius: 50%; box-shadow: 0 0 4px #ccc; overflow: hidden; +} + +/* 拖拽列样式 */ +.sortable-ghost{ + opacity: .8; + color: #fff!important; + background: #42b983!important; } \ No newline at end of file diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index cf76a27d6..6f950814a 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -5,7 +5,7 @@ - + table > tbody")[0]; + const sortable = Sortable.create(el, { + onEnd: evt => { + const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0]; + this.cloumns.splice(evt.newIndex, 0, targetRow); + for (let index in this.cloumns) { + this.cloumns[index].sort = parseInt(index) + 1; + } + } + }); } }; From 8132ae09132afd31c368ae0e16e41e7b19243dab Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 10:15:29 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=88=97=E5=B1=9E=E6=80=A7=E6=8E=92=E5=BA=8F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/gen/index.vue | 2 +- .../com/ruoyi/project/tool/gen/controller/GenController.java | 1 - ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 0c159a0fd..e71858a9b 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -80,7 +80,7 @@ - + From 992a63482c8d507d38e3016926a6b644b8fb79e3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 11:35:58 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=B8=83=E5=B1=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=89=A9=E5=A4=A7=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/Navbar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 5c4a31500..22427a81f 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -33,8 +33,8 @@ 个人中心 - - 布局设置 + + 布局设置 退出登录 From 441da7ecd798f8b51cdefc7d0f5cde54399a4ca3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 12:21:48 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0handle=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=8B=96=E5=8A=A8=E7=9A=84=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/gen/editTable.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index 6f950814a..5f88c1a3d 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -6,7 +6,7 @@ - + table > tbody")[0]; const sortable = Sortable.create(el, { + handle: ".allowDrag", onEnd: evt => { const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0]; this.cloumns.splice(evt.newIndex, 0, targetRow); From 8a394f03637ed06b3022c6c48e0daf86ce5a14f1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 13:09:27 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/project/monitor/domain/SysLogininfor.java | 2 ++ .../main/java/com/ruoyi/project/monitor/domain/SysOperLog.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysLogininfor.java b/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysLogininfor.java index 7519058ee..cea9373d4 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysLogininfor.java +++ b/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysLogininfor.java @@ -1,6 +1,7 @@ package com.ruoyi.project.monitor.domain; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.framework.web.domain.BaseEntity; @@ -47,6 +48,7 @@ public class SysLogininfor extends BaseEntity private String msg; /** 访问时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date loginTime; diff --git a/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysOperLog.java b/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysOperLog.java index 813100cb0..71d77fa83 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysOperLog.java +++ b/ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysOperLog.java @@ -1,6 +1,7 @@ package com.ruoyi.project.monitor.domain; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.framework.web.domain.BaseEntity; @@ -78,6 +79,7 @@ public class SysOperLog extends BaseEntity private String errorMsg; /** 操作时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date operTime; From ec65b1f7ec0e3c973151d4f6bc351ba0ffab2f4a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 1 Apr 2020 14:01:31 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AF=B7=E6=B1=82params?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E4=B8=BAdata=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E6=9A=B4=E9=9C=B2url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/login.js | 2 +- .../ruoyi/framework/security/LoginBody.java | 69 +++++++++++++++++++ .../system/controller/SysLoginController.java | 7 +- 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 ruoyi/src/main/java/com/ruoyi/framework/security/LoginBody.java diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js index faa7bbe76..9971357ed 100644 --- a/ruoyi-ui/src/api/login.js +++ b/ruoyi-ui/src/api/login.js @@ -11,7 +11,7 @@ export function login(username, password, code, uuid) { return request({ url: '/login', method: 'post', - params: data + data: data }) } diff --git a/ruoyi/src/main/java/com/ruoyi/framework/security/LoginBody.java b/ruoyi/src/main/java/com/ruoyi/framework/security/LoginBody.java new file mode 100644 index 000000000..59860537a --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/framework/security/LoginBody.java @@ -0,0 +1,69 @@ +package com.ruoyi.framework.security; + +/** + * 用户登录对象 + * + * @author ruoyi + */ +public class LoginBody +{ + /** + * 用户名 + */ + private String username; + + /** + * 用户密码 + */ + private String password; + + /** + * 验证码 + */ + private String code; + + /** + * 唯一标识 + */ + private String uuid = ""; + + public String getUsername() + { + return username; + } + + public void setUsername(String username) + { + this.username = username; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String password) + { + this.password = password; + } + + public String getCode() + { + return code; + } + + public void setCode(String code) + { + this.code = code; + } + + public String getUuid() + { + return uuid; + } + + public void setUuid(String uuid) + { + this.uuid = uuid; + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java index d7bf92355..6871d836a 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java @@ -5,9 +5,11 @@ import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.framework.security.LoginBody; import com.ruoyi.framework.security.LoginUser; import com.ruoyi.framework.security.service.SysLoginService; import com.ruoyi.framework.security.service.SysPermissionService; @@ -47,11 +49,12 @@ public class SysLoginController * @return 结果 */ @PostMapping("/login") - public AjaxResult login(String username, String password, String code, String uuid) + public AjaxResult login(@RequestBody LoginBody loginBody) { AjaxResult ajax = AjaxResult.success(); // 生成令牌 - String token = loginService.login(username, password, code, uuid); + String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), + loginBody.getUuid()); ajax.put(Constants.TOKEN, token); return ajax; }