diff --git a/pom.xml b/pom.xml index cd2825f0..ecd3414e 100644 --- a/pom.xml +++ b/pom.xml @@ -96,6 +96,7 @@ office-spring-boot-starter 1.0.0 + cn.stylefeng.roses log-spring-boot-starter @@ -108,6 +109,18 @@ 1.0.0 + + cn.stylefeng.roses + sms-spring-boot-starter + 1.0.0 + + + + cn.stylefeng.roses + message-spring-boot-starter + 1.0.0 + + org.springframework.boot spring-boot-starter-data-redis @@ -140,7 +153,6 @@ oshi-core ${oshi.version} - diff --git a/src/main/java/cn/stylefeng/guns/modular/api/ApiViewController.java b/src/main/java/cn/stylefeng/guns/modular/api/ApiViewController.java new file mode 100644 index 00000000..c07a7d01 --- /dev/null +++ b/src/main/java/cn/stylefeng/guns/modular/api/ApiViewController.java @@ -0,0 +1,30 @@ +package cn.stylefeng.guns.modular.api; + +import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource; +import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; + +/** + * API文档管理 + * + * @author fengshuonan + * @date 2021/1/14 21:05 + */ +@Controller +@Slf4j +@ApiResource(name = "API文档管理") +public class ApiViewController { + + /** + * 编辑应用界面 + * + * @author fengshuonan + * @date 2021/1/6 13:37 + */ + @GetResource(name = "API文档界面", path = "/view/api") + public String apiIndex() { + return "/modular/api/api.html"; + } + +} diff --git a/src/main/java/cn/stylefeng/guns/modular/position/PositionViewController.java b/src/main/java/cn/stylefeng/guns/modular/position/PositionViewController.java index 6a29d278..2c8a1899 100644 --- a/src/main/java/cn/stylefeng/guns/modular/position/PositionViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/position/PositionViewController.java @@ -12,7 +12,6 @@ import org.springframework.stereotype.Controller; * @date 2020/12/28 9:28 */ @Controller -@Slf4j @ApiResource(name = "职位管理相关的界面渲染") public class PositionViewController { diff --git a/src/main/java/cn/stylefeng/guns/modular/user/UserViewController.java b/src/main/java/cn/stylefeng/guns/modular/user/UserViewController.java index 07140b38..78bc4f67 100644 --- a/src/main/java/cn/stylefeng/guns/modular/user/UserViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/user/UserViewController.java @@ -60,4 +60,26 @@ public class UserViewController { return "/modular/system/user/user_role.html"; } + /** + * 用户管理-注册-视图 + * + * @author chenjinlong + * @date 2021/1/7 19:09 + */ + @GetResource(name = "用户管理-注册-视图", path = "/register", requiredPermission = false, requiredLogin = false) + public String registerView() { + return "register.html"; + } + + /** + * 用户管理-找回密码-视图 + * + * @author chenjinlong + * @date 2021/1/7 19:09 + */ + @GetResource(name = "用户管理-找回密码-视图", path = "/forget", requiredPermission = false, requiredLogin = false) + public String forgetView() { + return "forget.html"; + } + } diff --git a/src/main/webapp/assets/expand/css/style.css b/src/main/webapp/assets/expand/css/style.css index 9590501f..cf2db66b 100644 --- a/src/main/webapp/assets/expand/css/style.css +++ b/src/main/webapp/assets/expand/css/style.css @@ -36,7 +36,7 @@ border-top: 3px solid #d2d6de; margin-bottom: 20px; width: 100%; - box-shadow: 0 1px 1px rgba(0,0,0,0.1) + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) } .box-main { @@ -44,5 +44,21 @@ border: 0; padding-top: 2px; border-radius: 0; - box-shadow: none -} \ No newline at end of file + box-shadow: none; + overflow: scroll; +} + +.wide-layui-form-label { + float: left; + display: block; + padding: 9px 15px; + width: 130px; + font-weight: 400; + line-height: 20px; + text-align: right; +} + +.wide-layui-input-block { + margin-left: 160px; + min-height: 36px; +} diff --git a/src/main/webapp/assets/expand/module/func/func.js b/src/main/webapp/assets/expand/module/func/func.js index 57c1a911..58bf2442 100644 --- a/src/main/webapp/assets/expand/module/func/func.js +++ b/src/main/webapp/assets/expand/module/func/func.js @@ -83,7 +83,10 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) { param.shade = .1; } - var thisIndex = top.layui.layer.open(param); + //ifream 内遮罩层 + //var thisIndex = top.layui.layer.open(param); + //ifream 内遮罩层 + var thisIndex = admin.open(param); //按键监听esc关闭对话框 $(window).keydown(function (event) { diff --git a/src/main/webapp/assets/modular/api/api.js b/src/main/webapp/assets/modular/api/api.js new file mode 100644 index 00000000..23b49ebc --- /dev/null +++ b/src/main/webapp/assets/modular/api/api.js @@ -0,0 +1,88 @@ +layui.use(['layer', 'form', 'table', 'HttpRequest', 'func', 'tree'], function () { + var $ = layui.jquery; + var form = layui.form; + var table = layui.table; + var HttpRequest = layui.HttpRequest; + var func = layui.func; + var tree = layui.tree; + + /** + * Api管理的参数 + */ + var ApiManager = { + condition: { + resourceCode: "", + resourceName: "" + } + }; + + // 选择api树上的接口时 + ApiManager.onClickApi = function (obj) { + ApiManager.condition.resourceCode = obj.data.id; + + // 如果是具体接口,则查看接口详情 + if (obj.data.resourceFlag === true) { + ApiManager.search(); + } + }; + + // 点击查询按钮 + ApiManager.search = function () { + var detailRequest = new HttpRequest(Feng.ctxPath + "/resource/getDetail", 'get', function (data) { + form.val('apiDetailForm', data.data); + }, function (data) { + Feng.error("查询失败!" + data.message); + }); + detailRequest.set("resourceCode", ApiManager.condition.resourceCode); + var detailResult = detailRequest.start(false); + + // 参数的表头 + var columns = [[ + {field: 'chineseName', title: '中文名称', width: 150}, + {field: 'fieldClassType', title: '字段类型', width: 150}, + {field: 'fieldName', title: '字段名称', width: 200}, + { + field: 'groupAnnotations', title: '按校验组分的注解集合', templet: function (data) { + return JSON.stringify(data.groupAnnotations); + } + } + ]]; + + // 渲染请求参数列表 + table.render({ + elem: '#requestParamsTable', + cols: columns, + data: detailResult.data.paramFieldDescriptions, + even: true + }); + + // 渲染请求参数列表 + table.render({ + elem: '#responseParamsTable', + cols: columns, + data: detailResult.data.responseFieldDescriptions, + even: true + }); + + }; + + // 初始化api树 + var request = new HttpRequest(Feng.ctxPath + '/resource/getTree', 'get', function (data) { + tree.render({ + elem: '#apiTree', + data: data.data, + click: ApiManager.onClickApi, + onlyIconControl: true + }); + }); + request.start(); + +}); + +$(function () { + var panehHidden = false; + if ($(this).width() < 769) { + panehHidden = true; + } + $('#myContiner').layout({initClosed: panehHidden, west__size: 330}); +}); diff --git a/src/main/webapp/pages/forget.html b/src/main/webapp/pages/forget.html new file mode 100644 index 00000000..e79782a8 --- /dev/null +++ b/src/main/webapp/pages/forget.html @@ -0,0 +1,358 @@ + + + + + + + + ${constants.getSystemName()}-找回密码 + + + + + + +
+
+

重置密码

+
+ + +
+
+ + +
+
+ + +
+ + +
+ +
+
+
+ + +@/* 加入contextPath属性和session超时的配置 */ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/pages/layout/_tree_container.html b/src/main/webapp/pages/layout/_tree_container.html index a665e304..61b4dab2 100644 --- a/src/main/webapp/pages/layout/_tree_container.html +++ b/src/main/webapp/pages/layout/_tree_container.html @@ -62,7 +62,7 @@ ${layoutContent} @if(isNotEmpty(plugins)){ - @if(array.contain(plugins,"ztree")){ + @if(array.contain(plugins,"jquery-layout")){ @} @@ -77,4 +77,4 @@ ${layoutContent} @} @} - \ No newline at end of file + diff --git a/src/main/webapp/pages/login.html b/src/main/webapp/pages/login.html index 5ebbad93..c18e85f4 100644 --- a/src/main/webapp/pages/login.html +++ b/src/main/webapp/pages/login.html @@ -161,18 +161,31 @@
-
+

用户登录

- +
- + +
+ @if(constants.getCaptchaOpen()){ + + + @} +
- +
-
+ +
@@ -196,12 +210,16 @@ diff --git a/src/main/webapp/pages/modular/api/api.html b/src/main/webapp/pages/modular/api/api.html new file mode 100644 index 00000000..bc7293b4 --- /dev/null +++ b/src/main/webapp/pages/modular/api/api.html @@ -0,0 +1,109 @@ +@layout("/layout/_tree_container.html", {plugins:["jquery-layout"], js:["/assets/modular/api/api.js"]}){ + +
+ API接口文档 +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 接口详情 +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ 请求参数 +
+ +
+ +
+ 响应参数 +
+ +
+ +
+
+
+
+
+
+
+ +@} diff --git a/src/main/webapp/pages/modular/auth/resource/resource_detail.html b/src/main/webapp/pages/modular/auth/resource/resource_detail.html index 6c782ec6..2df32714 100644 --- a/src/main/webapp/pages/modular/auth/resource/resource_detail.html +++ b/src/main/webapp/pages/modular/auth/resource/resource_detail.html @@ -1,136 +1,108 @@ -@layout("/layout/_container.html",{js:["/assets/modular/auth/resource/resource_detail.js"]}){ +@layout("/layout/_form.html",{js:["/assets/modular/auth/resource/resource_detail.js"]}){ -
- 资源管理 -
-
-
-
-
-
-
+
+
+
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
+
+ +
+ +
+
+
+ +
+
+
+ +
-
- -
+ @} diff --git a/src/main/webapp/pages/modular/system/dept/dept.html b/src/main/webapp/pages/modular/system/dept/dept.html index a3687fc6..6b4b18b6 100644 --- a/src/main/webapp/pages/modular/system/dept/dept.html +++ b/src/main/webapp/pages/modular/system/dept/dept.html @@ -1,4 +1,4 @@ -@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/dept/dept.js"]}){ +@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/dept/dept.js"]}){
部门管理 @@ -50,4 +50,4 @@ 删除 @} -@} \ No newline at end of file +@} diff --git a/src/main/webapp/pages/modular/system/log/log_detail.html b/src/main/webapp/pages/modular/system/log/log_detail.html index 4011dcf3..7f329430 100644 --- a/src/main/webapp/pages/modular/system/log/log_detail.html +++ b/src/main/webapp/pages/modular/system/log/log_detail.html @@ -1,6 +1,6 @@ @layout("/layout/_form.html",{js:["/assets/modular/system/log/log_detail.js"]}){ -
+
diff --git a/src/main/webapp/pages/modular/system/organization/organization.html b/src/main/webapp/pages/modular/system/organization/organization.html index 5fe34848..97916dd6 100644 --- a/src/main/webapp/pages/modular/system/organization/organization.html +++ b/src/main/webapp/pages/modular/system/organization/organization.html @@ -1,4 +1,4 @@ -@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/organization/organization.js"]}){ +@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/organization/organization.js"]}){
机构管理 @@ -52,4 +52,4 @@ -@} \ No newline at end of file +@} diff --git a/src/main/webapp/pages/modular/system/user/user.html b/src/main/webapp/pages/modular/system/user/user.html index e653fc53..ba455193 100644 --- a/src/main/webapp/pages/modular/system/user/user.html +++ b/src/main/webapp/pages/modular/system/user/user.html @@ -1,4 +1,4 @@ -@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/user/user.js"]}){ +@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/user/user.js"]}){
用户管理 @@ -54,4 +54,4 @@ -@} \ No newline at end of file +@} diff --git a/src/main/webapp/pages/register.html b/src/main/webapp/pages/register.html new file mode 100644 index 00000000..062b6832 --- /dev/null +++ b/src/main/webapp/pages/register.html @@ -0,0 +1,380 @@ + + + + + + + + ${constants.getSystemName()}-用户注册 + + + + + + + + + +@/* 加入contextPath属性和session超时的配置 */ + + + + + + + + \ No newline at end of file