From ef60a6ec7caa761af4b7f9b7387587001bf870fb Mon Sep 17 00:00:00 2001 From: chenjinlong <22208488@qq.com> Date: Tue, 26 Jan 2021 20:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90role=E3=80=91=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=B1=BB=E5=9E=8B=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/expand/module/gunsSelect/gunsSelect.js | 1 + src/main/webapp/assets/modular/system/role/role.js | 4 ++-- .../webapp/assets/modular/system/role/role_add.js | 11 ++++++++++- .../webapp/assets/modular/system/role/role_edit.js | 12 +++++++++++- .../webapp/pages/modular/system/role/role_add.html | 9 +++++++++ .../webapp/pages/modular/system/role/role_edit.html | 9 +++++++++ 6 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/assets/expand/module/gunsSelect/gunsSelect.js b/src/main/webapp/assets/expand/module/gunsSelect/gunsSelect.js index ac02165d..34ee1ab1 100644 --- a/src/main/webapp/assets/expand/module/gunsSelect/gunsSelect.js +++ b/src/main/webapp/assets/expand/module/gunsSelect/gunsSelect.js @@ -29,6 +29,7 @@ layui.define(['jquery', 'HttpRequest', 'xmSelect', 'form'], function (exports) { var a = { init: function () { + console.log(JSON.stringify(where)); new HttpRequest(url, method, function (obj) { for (var i = 0; i < obj.data.length; i++) { $(elem).append(''); diff --git a/src/main/webapp/assets/modular/system/role/role.js b/src/main/webapp/assets/modular/system/role/role.js index 4dc8f888..e0b94d1e 100644 --- a/src/main/webapp/assets/modular/system/role/role.js +++ b/src/main/webapp/assets/modular/system/role/role.js @@ -77,7 +77,7 @@ layui.use(['layer', 'form', 'table', 'admin', 'HttpRequest', 'func', 'dropdown'] */ Role.openAddRole = function () { func.open({ - height: 470, + height: 680, title: '添加角色', content: Feng.ctxPath + '/view/role/add', tableId: Role.tableId @@ -91,7 +91,7 @@ layui.use(['layer', 'form', 'table', 'admin', 'HttpRequest', 'func', 'dropdown'] */ Role.onEditRole = function (data) { func.open({ - height: 470, + height: 680, title: '修改角色', content: Feng.ctxPath + "/view/role/edit?roleId=" + data.roleId, tableId: Role.tableId diff --git a/src/main/webapp/assets/modular/system/role/role_add.js b/src/main/webapp/assets/modular/system/role/role_add.js index 6e1ae263..d8bf633c 100644 --- a/src/main/webapp/assets/modular/system/role/role_add.js +++ b/src/main/webapp/assets/modular/system/role/role_add.js @@ -1,10 +1,19 @@ /** * 角色详情对话框 */ -layui.use(['form', 'admin', 'HttpRequest'], function () { +layui.use(['form', 'admin', 'HttpRequest', 'gunsSelect'], function () { var HttpRequest = layui.HttpRequest; var form = layui.form; var admin = layui.admin; + var gunsSelect = layui.gunsSelect; + + // 角色类型 + gunsSelect.render({ + url: Feng.ctxPath + '/dict/getDictList', + elem: '#roleType', + fields: {name: 'dictName', value: 'dictCode'}, + where: {dictTypeCode: 'role_type'} + }); // 表单提交事件 form.on('submit(btnSubmit)', function (data) { diff --git a/src/main/webapp/assets/modular/system/role/role_edit.js b/src/main/webapp/assets/modular/system/role/role_edit.js index 957b9042..a23f834f 100644 --- a/src/main/webapp/assets/modular/system/role/role_edit.js +++ b/src/main/webapp/assets/modular/system/role/role_edit.js @@ -1,10 +1,20 @@ /** * 角色详情对话框 */ -layui.use(['form', 'admin', 'HttpRequest'], function () { +layui.use(['form', 'admin', 'HttpRequest', 'gunsSelect'], function () { var HttpRequest = layui.HttpRequest; var form = layui.form; var admin = layui.admin; + var gunsSelect = layui.gunsSelect; + + + // 角色类型 + gunsSelect.render({ + url: Feng.ctxPath + '/dict/getDictList', + elem: '#roleType', + fields: {name: 'dictName', value: 'dictCode'}, + where: {dictTypeCode: 'role_type'} + }); //初始化角色的详情数据 var detailRequest = new HttpRequest(Feng.ctxPath + "/sysRole/detail?roleId=" + Feng.getUrlParam("roleId"), 'get'); diff --git a/src/main/webapp/pages/modular/system/role/role_add.html b/src/main/webapp/pages/modular/system/role/role_add.html index 6f92b94d..e2b0bc3e 100644 --- a/src/main/webapp/pages/modular/system/role/role_add.html +++ b/src/main/webapp/pages/modular/system/role/role_add.html @@ -7,6 +7,15 @@