mirror of https://gitee.com/stylefeng/guns
Merge branch 'master' of https://git.stylefeng.cn/guns-technology/guns-standalone-beetl
commit
6b3fa84872
|
@ -0,0 +1,52 @@
|
|||
package cn.stylefeng.guns.modular.app;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 应用管理界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:32
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "应用管理界面")
|
||||
public class AppViewController {
|
||||
|
||||
/**
|
||||
* 应用管理首页
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:32
|
||||
*/
|
||||
@GetResource(name = "应用管理首页", path = "/view/app")
|
||||
public String appIndex() {
|
||||
return "/modular/auth/app/app.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增角色界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:37
|
||||
*/
|
||||
@GetResource(name = "新增角色界面", path = "/view/app/add")
|
||||
public String appAdd() {
|
||||
return "/modular/auth/app/app_add.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑角色界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:37
|
||||
*/
|
||||
@GetResource(name = "编辑角色界面", path = "/view/app/edit")
|
||||
public String appEdit() {
|
||||
return "/modular/auth/app/app_edit.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package cn.stylefeng.guns.modular.common;
|
||||
|
||||
import cn.stylefeng.guns.modular.common.pojo.CommonTreeRequest;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.enums.defaults.DefaultBusinessExceptionEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
/**
|
||||
* 通用界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 20:18
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "通用界面")
|
||||
public class CommonViewController {
|
||||
|
||||
/**
|
||||
* 通用的树列表选择器
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 20:19
|
||||
*/
|
||||
@GetResource(name = "通用的树列表选择器", path = "/view/common/tree")
|
||||
public String commonTreeSelect(@Valid CommonTreeRequest commonTreeRequest, Model model) {
|
||||
try {
|
||||
model.addAttribute("formName", URLDecoder.decode(commonTreeRequest.getFormName(), "UTF-8"));
|
||||
model.addAttribute("formId", URLDecoder.decode(commonTreeRequest.getFormId(), "UTF-8"));
|
||||
model.addAttribute("treeUrl", URLDecoder.decode(commonTreeRequest.getTreeUrl(), "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error("解析url的参数出错!", e);
|
||||
throw new ServiceException("guns-standalone-beetl", DefaultBusinessExceptionEnum.SYSTEM_RUNTIME_ERROR);
|
||||
}
|
||||
return "/modular/common/tree_dlg.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package cn.stylefeng.guns.modular.common.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 通用树选择器界面的请求参数
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 20:20
|
||||
*/
|
||||
@Data
|
||||
public class CommonTreeRequest {
|
||||
|
||||
/**
|
||||
* 传递给上级页面的哪个字段,例如 parent.MenuInfoDlg.data.pcodeName
|
||||
*/
|
||||
@NotBlank(message = "fromName不能为空")
|
||||
private String formName;
|
||||
|
||||
/**
|
||||
* 传递给上级页面的哪个id值,例如 parent.MenuInfoDlg.data.pid
|
||||
*/
|
||||
@NotBlank(message = "formId不能为空")
|
||||
private String formId;
|
||||
|
||||
/**
|
||||
* 渲染出数据的url,例如/menu/selectMenuTreeList
|
||||
*/
|
||||
@NotBlank(message = "tree渲染的url参数不能为空")
|
||||
private String treeUrl;
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package cn.stylefeng.guns.modular.config;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 系统配置相关页面渲染
|
||||
*
|
||||
* @author: jiawei
|
||||
* @date: 2021/01/04 12:02
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "系统配置相关页面", path = "config")
|
||||
public class ConfigViewController {
|
||||
private String PREFIX = "/modular/sysConfig";
|
||||
|
||||
/**
|
||||
* 系统配置-首页-视图
|
||||
*
|
||||
* @author jiawei
|
||||
* @date 2021/1/4 13:33
|
||||
*/
|
||||
@GetResource(name = "系统配置-列表-视图", path = "", requiredPermission = false, requiredLogin = false)
|
||||
public String indexView() {
|
||||
return PREFIX + "/sysConfig.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统配置—新增-视图
|
||||
*
|
||||
* @author jiawei
|
||||
* @date 2021/1/4 13:34
|
||||
* @param
|
||||
*/
|
||||
@GetResource(name = "系统配置—新增-视图", path = "/addView", requiredPermission = false, requiredLogin = false)
|
||||
public String addView() {
|
||||
return PREFIX + "/sysConfig_add.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统配置-修改-视图
|
||||
*
|
||||
* @author jiawei
|
||||
* @date 2021/1/4 13:35
|
||||
* @param
|
||||
*/
|
||||
@GetResource(name = "系统配置-修改-视图", path = "editView", requiredPermission = false, requiredLogin = false)
|
||||
public String editView() {
|
||||
return PREFIX + "/sysConfig_edit.html";
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ public class DashboardViewController {
|
|||
*/
|
||||
@GetResource(name = "工作台", path = "/view/dashboard/workplace", requiredPermission = false)
|
||||
public String platform() {
|
||||
return "/modular/blackboard/board_platform.html";
|
||||
return "/modular/dashboard/board_platform.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ public class DashboardViewController {
|
|||
*/
|
||||
@GetResource(name = "分析页面", path = "/view/dashboard/analysis", requiredPermission = false)
|
||||
public String analyse() {
|
||||
return "/modular/blackboard/board_analyse.html";
|
||||
return "/modular/dashboard/board_analyse.html";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package cn.stylefeng.guns.modular.menu;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 菜单管理界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 16:43
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "菜单管理界面")
|
||||
public class MenuViewController {
|
||||
|
||||
/**
|
||||
* 菜单管理首页
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:32
|
||||
*/
|
||||
@GetResource(name = "菜单管理首页", path = "/view/menu")
|
||||
public String menuIndex() {
|
||||
return "/modular/auth/menu/menu.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜单界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:37
|
||||
*/
|
||||
@GetResource(name = "新增菜单界面", path = "/view/menu/add")
|
||||
public String menuAdd() {
|
||||
return "/modular/auth/menu/menu_add.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜单界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:37
|
||||
*/
|
||||
@GetResource(name = "修改菜单界面", path = "/view/menu/edit")
|
||||
public String menuEdit() {
|
||||
return "/modular/auth/menu/menu_edit.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -16,7 +16,7 @@ spring:
|
|||
max-file-size: 200MB
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss.SSS
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
locale: zh_CN
|
||||
serialization:
|
||||
indent_output: false
|
||||
|
@ -40,4 +40,4 @@ mybatis-plus:
|
|||
enable-sql-runner: true
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
table-underline: true
|
||||
table-underline: true
|
||||
|
|
|
@ -21,4 +21,8 @@
|
|||
|
||||
.layui-card-body {
|
||||
padding-right: 55px;
|
||||
}
|
||||
|
||||
input[readonly]{
|
||||
background-color: #efefef;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
layui.define(['jquery','ax'], function (exports) {
|
||||
layui.define(['jquery', 'HttpRequest'], function (exports) {
|
||||
|
||||
var $ = layui.$;
|
||||
var $ax = layui.ax;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
var $ZTree = function(id, url) {
|
||||
this.id = id;
|
||||
|
@ -70,12 +70,12 @@ layui.define(['jquery','ax'], function (exports) {
|
|||
*/
|
||||
loadNodes : function() {
|
||||
var zNodes = null;
|
||||
var ajax = new $ax(Feng.ctxPath + this.url, function(data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + this.url, 'get', function(data) {
|
||||
zNodes = data;
|
||||
}, function(data) {
|
||||
Feng.error("加载ztree信息失败!");
|
||||
});
|
||||
ajax.start();
|
||||
request.start();
|
||||
return zNodes;
|
||||
},
|
||||
|
||||
|
@ -91,4 +91,4 @@ layui.define(['jquery','ax'], function (exports) {
|
|||
|
||||
exports('ztree', $ZTree);
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
layui.use(['table', 'HttpRequest', 'func', 'form'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var func = layui.func;
|
||||
var form = layui.form;
|
||||
|
||||
/**
|
||||
* 初始化参数
|
||||
*/
|
||||
var App = {
|
||||
tableId: "appTable"
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格的列
|
||||
*/
|
||||
App.initColumn = function () {
|
||||
return [[
|
||||
{type: 'radio'},
|
||||
{field: 'appId', hide: true, title: '主键'},
|
||||
{field: 'appName', sort: true, align: "center", title: '应用名称'},
|
||||
{field: 'appCode', sort: true, align: "center", title: '应用编码'},
|
||||
{field: 'activeFlag', sort: true, align: "center", title: '是否激活', templet: '#activeTpl'},
|
||||
{field: 'statusFlag', sort: true, align: "center", title: '是否启用', templet: '#statusTpl'},
|
||||
{field: 'createTime', sort: true, align: "center", title: '创建时间'},
|
||||
{field: 'updateTime', sort: true, align: "center", title: '更新时间'},
|
||||
{align: 'center', toolbar: '#tableBar', title: '操作'}
|
||||
]];
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击查询按钮
|
||||
*/
|
||||
App.search = function () {
|
||||
var queryData = {};
|
||||
queryData['appName'] = $("#appName").val();
|
||||
queryData['appCode'] = $("#appCode").val();
|
||||
table.reload(App.tableId, {
|
||||
where: queryData, page: {curr: 1}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加应用对话框
|
||||
*/
|
||||
App.openAddDlg = function () {
|
||||
func.open({
|
||||
height: 500,
|
||||
title: '添加应用',
|
||||
content: Feng.ctxPath + '/view/app/add',
|
||||
tableId: App.tableId
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 编辑应用对话框
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
App.openEditDlg = function (data) {
|
||||
func.open({
|
||||
height: 500,
|
||||
title: '修改应用',
|
||||
content: Feng.ctxPath + '/view/app/edit?appId=' + data.appId,
|
||||
tableId: App.tableId
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新应用为激活状态
|
||||
*/
|
||||
App.updateActiveFlag = function (appId) {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysApp/updateActiveFlag", 'post', function (data) {
|
||||
Feng.success("激活成功!");
|
||||
table.reload(App.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("激活失败!" + data.message);
|
||||
table.reload(App.tableId);
|
||||
});
|
||||
httpRequest.set("appId", appId);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新应用状态
|
||||
*/
|
||||
App.updateStatus = function (appId, statusFlag) {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysApp/updateStatus", 'post', function (data) {
|
||||
Feng.success("修改成功!");
|
||||
}, function (data) {
|
||||
Feng.error("修改失败!" + data.message);
|
||||
table.reload(App.tableId);
|
||||
});
|
||||
httpRequest.set("appId", appId);
|
||||
httpRequest.set("statusFlag", statusFlag);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 点击删除
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
App.onDeleteItem = function (data) {
|
||||
var operation = function () {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sysApp/delete", 'post', function (data) {
|
||||
Feng.success("删除成功!");
|
||||
table.reload(App.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("删除失败!" + data.message + "!");
|
||||
});
|
||||
request.set("appId", data.appId);
|
||||
request.start(true);
|
||||
};
|
||||
Feng.confirm("是否删除?", operation);
|
||||
};
|
||||
|
||||
// 渲染表格
|
||||
var tableResult = table.render({
|
||||
elem: '#' + App.tableId,
|
||||
url: Feng.ctxPath + '/sysApp/page',
|
||||
page: true,
|
||||
height: "full-158",
|
||||
cellMinWidth: 100,
|
||||
cols: App.initColumn(),
|
||||
request: {pageName: 'pageNo', limitName: 'pageSize'},
|
||||
parseData: Feng.parseData
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
$('#btnSearch').click(function () {
|
||||
App.search();
|
||||
});
|
||||
|
||||
// 添加按钮点击事件
|
||||
$('#btnAdd').click(function () {
|
||||
App.openAddDlg();
|
||||
});
|
||||
|
||||
// 工具条点击事件
|
||||
table.on('tool(' + App.tableId + ')', function (obj) {
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
|
||||
if (layEvent === 'edit') {
|
||||
App.openEditDlg(data);
|
||||
} else if (layEvent === 'delete') {
|
||||
App.onDeleteItem(data);
|
||||
}
|
||||
});
|
||||
|
||||
// 修改激活标识
|
||||
form.on('switch(activeFilter)', function (obj) {
|
||||
var appId = obj.elem.value;
|
||||
App.updateActiveFlag(appId);
|
||||
});
|
||||
|
||||
// 修改状态
|
||||
form.on('switch(statusFilter)', function (obj) {
|
||||
var appId = obj.elem.value;
|
||||
var checked = obj.elem.checked ? 1 : 2;
|
||||
App.updateStatus(appId, checked);
|
||||
});
|
||||
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 添加应用
|
||||
*/
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sysApp/add", 'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("添加成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
}, function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("添加失败!" + data.message);
|
||||
});
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
});
|
||||
|
||||
});
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* 编辑应用
|
||||
*/
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
// 获取应用详情
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sysApp/detail?appId=" + Feng.getUrlParam("appId"), 'get');
|
||||
var result = request.start();
|
||||
|
||||
form.val('appForm', result.data);
|
||||
|
||||
// 表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sysApp/edit", 'post', function (data) {
|
||||
Feng.success("修改成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
admin.closeThisDialog();
|
||||
}, function (data) {
|
||||
Feng.error("修改失败!" + data.message);
|
||||
admin.closeThisDialog();
|
||||
});
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
});
|
||||
|
||||
});
|
|
@ -0,0 +1,181 @@
|
|||
layui.use(['HttpRequest', 'treeTable', 'func'], function () {
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var treeTable = layui.treeTable;
|
||||
var func = layui.func;
|
||||
|
||||
/**
|
||||
* 系统管理--菜单管理
|
||||
*/
|
||||
var Menu = {
|
||||
tableId: "menuTable",
|
||||
condition: {
|
||||
menuName: "",
|
||||
menuCode: ""
|
||||
},
|
||||
|
||||
// treeTable实例
|
||||
treeTableInstance: null
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格的列
|
||||
*/
|
||||
Menu.initColumn = function () {
|
||||
return [
|
||||
{type: 'numbers'},
|
||||
{field: 'menuName', align: "left", sort: true, title: '菜单名称', minWidth: 120},
|
||||
{field: 'menuCode', align: "center", sort: true, title: '菜单编号', minWidth: 120},
|
||||
{field: 'appName', align: "center", sort: true, title: '应用名称'},
|
||||
{field: 'layuiPath', align: "center", sort: true, title: '请求地址', minWidth: 180},
|
||||
{
|
||||
field: 'layuiIcon', align: "center", sort: true, title: '图标', templet: '<p><i class="{{d.layuiIcon}}"></i></p>'
|
||||
},
|
||||
{
|
||||
field: 'visible', align: "center", sort: true, title: '是否可见', templet: function (data) {
|
||||
if (data.visible === 'Y') {
|
||||
return '<span class="layui-badge layui-badge-green">可见</span>';
|
||||
} else {
|
||||
return '<span class="layui-badge layui-badge-gray">不可见</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{field: 'menuSort', align: "center", sort: true, title: '排序'},
|
||||
{
|
||||
field: 'statusFlag', align: "center", sort: true, title: '状态', templet: function (data) {
|
||||
if (data.statusFlag === 1) {
|
||||
return '<span class="layui-badge layui-badge-green">启用</span>';
|
||||
} else {
|
||||
return '<span class="layui-badge layui-badge-gray">禁用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{field: 'createTime', align: "center", sort: true, title: '创建时间', minWidth: 120},
|
||||
{field: 'updateTime', align: "center", sort: true, title: '更新时间', minWidth: 120},
|
||||
{align: 'center', toolbar: '#menuTableBar', title: '操作', minWidth: 120}
|
||||
];
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击查询按钮
|
||||
*/
|
||||
Menu.search = function () {
|
||||
var queryData = {};
|
||||
queryData['menuName'] = $("#menuName").val();
|
||||
queryData['menuCode'] = $("#menuCode").val();
|
||||
Menu.initTable(Menu.tableId, queryData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 弹出添加菜单对话框
|
||||
*/
|
||||
Menu.openAddMenu = function () {
|
||||
func.open({
|
||||
height: 720,
|
||||
title: '添加菜单',
|
||||
content: Feng.ctxPath + '/view/menu/add',
|
||||
tableId: Menu.tableId,
|
||||
endCallback: function () {
|
||||
Menu.initTable(Menu.tableId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击编辑菜单按钮时
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
Menu.onEditMenu = function (data) {
|
||||
func.open({
|
||||
height: 720,
|
||||
title: '修改菜单',
|
||||
content: Feng.ctxPath + "/view/menu/edit?menuId=" + data.menuId,
|
||||
tableId: Menu.tableId,
|
||||
endCallback: function () {
|
||||
Menu.initTable(Menu.tableId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击删除菜单按钮
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
Menu.onDeleteMenu = function (data) {
|
||||
var operation = function () {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sysMenu/delete", 'post', function () {
|
||||
Feng.success("删除成功!");
|
||||
Menu.condition.menuId = "";
|
||||
Menu.initTable(Menu.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("删除失败!" + data.message + "!");
|
||||
});
|
||||
request.set("menuId", data.menuId);
|
||||
request.start(true);
|
||||
};
|
||||
Feng.confirm("是否删除菜单" + data.menuName + "?", operation);
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格
|
||||
*/
|
||||
Menu.initTable = function (menuId, reqData) {
|
||||
return treeTable.render({
|
||||
elem: '#' + menuId,
|
||||
tree: {
|
||||
iconIndex: 1, // 折叠图标显示在第几列
|
||||
idName: 'menuId', // 自定义id字段的名称
|
||||
pidName: 'menuParentId', // 自定义标识是否还有子节点的字段名称
|
||||
isPidData: true // 是否是pid形式数据
|
||||
},
|
||||
height: "full-98",
|
||||
cols: Menu.initColumn(),
|
||||
reqData: function (data, callback) {
|
||||
var request = new HttpRequest(Feng.ctxPath + '/sysMenu/layuiList', 'get', function (res) {
|
||||
callback(res.data);
|
||||
}, function (res) {
|
||||
Feng.error("删除失败!" + res.message + "!");
|
||||
});
|
||||
request.set(reqData);
|
||||
request.start();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 渲染表格
|
||||
Menu.treeTableInstance = Menu.initTable(Menu.tableId);
|
||||
|
||||
// 展开所有按钮
|
||||
$('#expandAll').click(function () {
|
||||
Menu.treeTableInstance.expandAll();
|
||||
});
|
||||
|
||||
// 折叠所有按钮
|
||||
$('#foldAll').click(function () {
|
||||
Menu.treeTableInstance.foldAll();
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
$('#btnSearch').click(function () {
|
||||
Menu.search();
|
||||
});
|
||||
|
||||
// 添加按钮点击事件
|
||||
$('#btnAdd').click(function () {
|
||||
Menu.openAddMenu();
|
||||
});
|
||||
|
||||
// 工具条点击事件
|
||||
treeTable.on('tool(menuTable)', function (obj) {
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
|
||||
if (layEvent === 'edit') {
|
||||
Menu.onEditMenu(data);
|
||||
} else if (layEvent === 'delete') {
|
||||
Menu.onDeleteMenu(data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -8,9 +8,9 @@ var MenuInfoDlg = {
|
|||
}
|
||||
};
|
||||
|
||||
layui.use(['layer', 'form', 'admin', 'laydate', 'ax', 'iconPicker'], function () {
|
||||
layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'iconPicker'], function () {
|
||||
var $ = layui.jquery;
|
||||
var $ax = layui.ax;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
|
@ -85,4 +85,4 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'ax', 'iconPicker'], function ()
|
|||
ajax.set("dictTypeCode", "SYSTEM_TYPE");
|
||||
ajax.start();
|
||||
|
||||
});
|
||||
});
|
|
@ -1,8 +1,10 @@
|
|||
layui.use(['table', 'admin', 'ax'], function () {
|
||||
layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var $ax = layui.ax;
|
||||
var func = layui.func;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var admin = layui.admin;
|
||||
var util = layui.util;
|
||||
|
||||
/**
|
||||
* 参数配置管理
|
||||
|
@ -17,10 +19,10 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
SysConfig.initColumn = function () {
|
||||
return [[
|
||||
{type: 'checkbox'},
|
||||
{field: 'id', hide: true, title: '主键'},
|
||||
{field: 'name', sort: true, align: "center", title: '名称'},
|
||||
{field: 'code', sort: true, align: "center", title: '属性编码'},
|
||||
{field: 'value', sort: true, align: "center", title: '属性值'},
|
||||
{field: 'configId', hide: true, title: '主键'},
|
||||
{field: 'configName', sort: true, align: "center", title: '名称'},
|
||||
{field: 'configCode', sort: true, align: "center", title: '属性编码'},
|
||||
{field: 'configValue', sort: true, align: "center", title: '属性值'},
|
||||
{field: 'remark', sort: true, align: "center", title: '备注'},
|
||||
{field: 'createTime', sort: true, align: "center", title: '创建时间'},
|
||||
{field: 'updateTime', sort: true, align: "center", title: '更新时间'},
|
||||
|
@ -33,7 +35,7 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
*/
|
||||
SysConfig.search = function () {
|
||||
var queryData = {};
|
||||
queryData['condition'] = $("#condition").val();
|
||||
queryData['configName'] = $("#configName").val();
|
||||
table.reload(SysConfig.tableId, {
|
||||
where: queryData, page: {curr: 1}
|
||||
});
|
||||
|
@ -43,7 +45,12 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
* 弹出添加对话框
|
||||
*/
|
||||
SysConfig.openAddDlg = function () {
|
||||
window.location.href = Feng.ctxPath + '/sysConfig/add';
|
||||
func.open({
|
||||
height: 800,
|
||||
title: '添加系统配置',
|
||||
content: Feng.ctxPath + '/config/addView',
|
||||
tableId: SysConfig.tableId
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -64,7 +71,12 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
SysConfig.openEditDlg = function (data) {
|
||||
window.location.href = Feng.ctxPath + '/sysConfig/edit?id=' + data.id;
|
||||
func.open({
|
||||
height: 800,
|
||||
title: '修改系统配置',
|
||||
content: Feng.ctxPath + '/config/editView?configId=' + data.configId,
|
||||
tableId: SysConfig.tableId
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -74,14 +86,14 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
*/
|
||||
SysConfig.onDeleteItem = function (data) {
|
||||
var operation = function () {
|
||||
var ajax = new $ax(Feng.ctxPath + "/sysConfig/delete", function (data) {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/delete",'post', function (data) {
|
||||
Feng.success("删除成功!");
|
||||
table.reload(SysConfig.tableId);
|
||||
}, function (data) {
|
||||
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
||||
Feng.error(data.message + "!");
|
||||
});
|
||||
ajax.set("id", data.id);
|
||||
ajax.start();
|
||||
httpRequest.set(data);
|
||||
httpRequest.start(true);
|
||||
};
|
||||
Feng.confirm("是否删除?", operation);
|
||||
};
|
||||
|
@ -89,11 +101,13 @@ layui.use(['table', 'admin', 'ax'], function () {
|
|||
// 渲染表格
|
||||
var tableResult = table.render({
|
||||
elem: '#' + SysConfig.tableId,
|
||||
url: Feng.ctxPath + '/sysConfig/list',
|
||||
url: Feng.ctxPath + '/sysConfig/page',
|
||||
page: true,
|
||||
request: {pageName: 'pageNo', limitName: 'pageSize'}, //自定义分页参数
|
||||
height: "full-158",
|
||||
cellMinWidth: 100,
|
||||
cols: SysConfig.initColumn()
|
||||
cols: SysConfig.initColumn(),
|
||||
parseData: Feng.parseData
|
||||
});
|
||||
|
||||
// 搜索按钮点击事件
|
||||
|
|
|
@ -1,128 +1,61 @@
|
|||
/**
|
||||
* 添加或者修改页面
|
||||
* 修改
|
||||
*/
|
||||
var SysConfigInfoDlg = {
|
||||
data: {
|
||||
name: "",
|
||||
dictFlag: "",
|
||||
code: "",
|
||||
value: "",
|
||||
remark: "",
|
||||
createTime: "",
|
||||
createUser: "",
|
||||
updateTime: "",
|
||||
updateUser: ""
|
||||
}
|
||||
data: {}
|
||||
};
|
||||
|
||||
layui.use(['form', 'admin', 'ax'], function () {
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var $ = layui.jquery;
|
||||
var $ax = layui.ax;
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
//默认的激活状态 dict 或者 custom
|
||||
var status = "dict";
|
||||
|
||||
//初始化字典选择框
|
||||
// 初始化所属分类字典下拉
|
||||
var activeDictSelect = function () {
|
||||
$("#dictCodeDiv").show();
|
||||
$("#customCodeDiv").hide();
|
||||
status = "dict";
|
||||
|
||||
//初始化所有字典类型
|
||||
$("#dictTypeId").html('<option value="">请选择系统字典类型</option>');
|
||||
var ajax = new $ax(Feng.ctxPath + "/dictType/listTypes", function (data) {
|
||||
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
||||
// var httpRequest = new HttpRequest(Feng.ctxPath + "/dictType/dropDown", function (data) {
|
||||
// var dictTypeList = res.data;
|
||||
// dictTypeList.forEach(function (v, i) {
|
||||
// $("#groupCode").append('<option value="' + v.dictCode+ '">' + v.dictName + '</option>');
|
||||
// })
|
||||
// form.render();
|
||||
//
|
||||
// }, function (data) {
|
||||
// });
|
||||
// httpRequest.start();
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
var dictTypeId = data.data[i].dictTypeId;
|
||||
var name = data.data[i].name;
|
||||
var code = data.data[i].code;
|
||||
$("#dictTypeId").append('<option value="' + dictTypeId + '">' + code + '--' + name + '</option>');
|
||||
}
|
||||
form.render();
|
||||
|
||||
}, function (data) {
|
||||
});
|
||||
ajax.start();
|
||||
};
|
||||
|
||||
//初始化非字典选择
|
||||
var activeCustomSelect = function () {
|
||||
$("#dictCodeDiv").hide();
|
||||
$("#customCodeDiv").show();
|
||||
status = "custom";
|
||||
//要删掉
|
||||
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
||||
form.render();
|
||||
};
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
|
||||
//如果是选择字典
|
||||
if (status === "dict") {
|
||||
SysConfigInfoDlg.data = $.extend({"sysFlag":data.field.sysFlag?data.field.sysFlag:'N'},data.field)
|
||||
|
||||
var radio = $('input:radio[name="dictValue"]:checked').val();
|
||||
|
||||
if (!$("#dictTypeId").val() || !radio) {
|
||||
Feng.error("请选择具体字典!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!$("#value").val()) {
|
||||
Feng.error("请填写参数值!");
|
||||
return false;
|
||||
}
|
||||
var groupCode = $("#groupCode").find("option:selected").val()
|
||||
if(!groupCode){
|
||||
Feng.error("所属分类不能为空")
|
||||
return false;
|
||||
}
|
||||
SysConfigInfoDlg.data = $.extend({"groupCode":groupCode},data.field)
|
||||
|
||||
var ajax = new $ax(Feng.ctxPath + "/sysConfig/addItem", function (data) {
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/add",'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("添加成功!");
|
||||
window.location.href = Feng.ctxPath + '/sysConfig'
|
||||
admin.putTempData('formOk', true);
|
||||
}, function (data) {
|
||||
Feng.error("添加失败!" + data.responseJSON.message)
|
||||
admin.closeThisDialog();
|
||||
Feng.error("添加失败!" + data.message)
|
||||
});
|
||||
ajax.set(data.field);
|
||||
ajax.start();
|
||||
|
||||
return false;
|
||||
httpRequest.set(SysConfigInfoDlg.data);
|
||||
httpRequest.start(true);
|
||||
});
|
||||
|
||||
//监听单选切换
|
||||
form.on('radio(dictChecked)', function (data) {
|
||||
if (data.value === "Y") {
|
||||
activeDictSelect();
|
||||
} else {
|
||||
activeCustomSelect();
|
||||
}
|
||||
});
|
||||
|
||||
//监听字典选择
|
||||
form.on('select(dictTypeId)', function (data) {
|
||||
|
||||
var dictTypeId = data.value;
|
||||
|
||||
//初始化字典详细列表
|
||||
$("#dictDetails").html('');
|
||||
var ajax = new $ax(Feng.ctxPath + "/dict/listDicts", function (data) {
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
var name = data.data[i].name;
|
||||
var code = data.data[i].code;
|
||||
$("#dictDetails").append('<input type="radio" name="dictValue" value="' + code + '" title="' + name + '">');
|
||||
}
|
||||
form.render();
|
||||
|
||||
}, function (data) {
|
||||
});
|
||||
ajax.set("dictTypeId", dictTypeId);
|
||||
ajax.start();
|
||||
|
||||
});
|
||||
|
||||
//返回按钮
|
||||
$("#backupPage").click(function () {
|
||||
window.location.href = Feng.ctxPath + '/sysConfig'
|
||||
});
|
||||
|
||||
//显示字典编码选择
|
||||
// 常量所属分类动态赋值
|
||||
activeDictSelect();
|
||||
|
||||
});
|
|
@ -2,158 +2,83 @@
|
|||
* 详情对话框
|
||||
*/
|
||||
var SysConfigInfoDlg = {
|
||||
data: {
|
||||
name: "",
|
||||
dictFlag: "",
|
||||
code: "",
|
||||
value: "",
|
||||
remark: "",
|
||||
createTime: "",
|
||||
createUser: "",
|
||||
updateTime: "",
|
||||
updateUser: ""
|
||||
}
|
||||
data: {}
|
||||
};
|
||||
|
||||
layui.use(['form', 'admin', 'ax'], function () {
|
||||
layui.use(['form', 'admin','selectPlus', 'HttpRequest'], function () {
|
||||
var $ = layui.jquery;
|
||||
var $ax = layui.ax;
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var selectPlus = layui.selectPlus;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
//获取详情信息,填充表单
|
||||
var ajax = new $ax(Feng.ctxPath + "/sysConfig/detail?id=" + Feng.getUrlParam("id"));
|
||||
var result = ajax.start();
|
||||
// 获取详情信息,填充表单
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/detail?configId=" + Feng.getUrlParam("configId"),'get');
|
||||
var result = httpRequest.start();
|
||||
form.val('sysConfigForm', result.data);
|
||||
|
||||
//初始化字典选择框
|
||||
var activeDictSelect = function () {
|
||||
$("#dictCodeDiv").show();
|
||||
$("#customCodeDiv").hide();
|
||||
status = "dict";
|
||||
|
||||
//初始化所有字典类型
|
||||
$("#dictTypeId").html('<option value="">请选择系统字典类型</option>');
|
||||
var ajax = new $ax(Feng.ctxPath + "/dictType/listTypes", function (data) {
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
var dictTypeId = data.data[i].dictTypeId;
|
||||
var name = data.data[i].name;
|
||||
var code = data.data[i].code;
|
||||
$("#dictTypeId").append('<option value="' + dictTypeId + '">' + code + '--' + name + '</option>');
|
||||
}
|
||||
form.render();
|
||||
|
||||
}, function (data) {
|
||||
});
|
||||
ajax.start();
|
||||
};
|
||||
|
||||
//初始化非字典选择
|
||||
var activeCustomSelect = function () {
|
||||
$("#dictCodeDiv").hide();
|
||||
$("#customCodeDiv").show();
|
||||
status = "custom";
|
||||
};
|
||||
|
||||
//更新字典详情列表
|
||||
var updateDictDetail = function (dictTypeId, activeCode) {
|
||||
$("#dictDetails").html('');
|
||||
var ajax = new $ax(Feng.ctxPath + "/dict/listDicts", function (data) {
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
var name = data.data[i].name;
|
||||
var code = data.data[i].code;
|
||||
|
||||
if (activeCode === code) {
|
||||
$("#dictDetails").append('<input type="radio" name="dictValue" value="' + code + '" title="' + name + '" checked="checked">');
|
||||
} else {
|
||||
$("#dictDetails").append('<input type="radio" name="dictValue" value="' + code + '" title="' + name + '">');
|
||||
}
|
||||
|
||||
}
|
||||
form.render();
|
||||
|
||||
}, function (data) {
|
||||
});
|
||||
ajax.set("dictTypeId", dictTypeId);
|
||||
ajax.start();
|
||||
};
|
||||
|
||||
//监听单选切换
|
||||
form.on('radio(dictChecked)', function (data) {
|
||||
if (data.value === "Y") {
|
||||
activeDictSelect();
|
||||
} else {
|
||||
activeCustomSelect();
|
||||
// 系统参数样式
|
||||
if(result.data){
|
||||
var mData = result.data;
|
||||
if(mData.sysFlag == 'Y'){
|
||||
$('input[name="sysFlag"]').attr('checked', 'checked'); //改变开关为 开
|
||||
}else{
|
||||
$('input[name="sysFlag"]').removeAttr('checked'); //改变开关为 关
|
||||
}
|
||||
});
|
||||
/*改变是否系统参数样式*/
|
||||
$("input[name='sysFlag']").attr("disabled", "true"); form.render(); //系统参数禁用
|
||||
$("input[name='sysFlag']").next().removeClass("layui-form-onswitch"); // 系统参数去掉样式
|
||||
}
|
||||
|
||||
// 初始化所属分类字典下拉
|
||||
var activeDictSelect = function () {
|
||||
|
||||
$("#groupCode").html('<option value="">请选择所属分类</option>');
|
||||
// var httpRequest = new HttpRequest(Feng.ctxPath + "/dictType/dropDown", function (data) {
|
||||
// var dictTypeList = res.data;
|
||||
// dictTypeList.forEach(function (v, i) {
|
||||
// $("#groupCode").append('<option value="' + v.dictCode+ '">' + v.dictName + '</option>');
|
||||
// })
|
||||
// form.render();
|
||||
//
|
||||
// }, function (data) {
|
||||
// });
|
||||
// httpRequest.start();
|
||||
|
||||
//要删掉
|
||||
$("#groupCode").append('<option value="sys_config">' + '默认常量' + '</option>');
|
||||
$("#groupCode").val(result.data.groupCode);
|
||||
form.render();
|
||||
};
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
|
||||
//如果是选择字典
|
||||
if (status === "dict") {
|
||||
|
||||
var radio = $('input:radio[name="dictValue"]:checked').val();
|
||||
SysConfigInfoDlg.data = $.extend({"sysFlag":data.field.sysFlag?data.field.sysFlag:'N'},data.field)
|
||||
|
||||
if (!$("#dictTypeId").val() || !radio) {
|
||||
Feng.error("请选择具体字典!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!$("#value").val()) {
|
||||
Feng.error("请填写参数值!");
|
||||
return false;
|
||||
}
|
||||
var groupCode = $("#groupCode").find("option:selected").val()
|
||||
if(!groupCode){
|
||||
Feng.error("所属分类不能为空")
|
||||
return false;
|
||||
}
|
||||
SysConfigInfoDlg.data = $.extend({"groupCode":groupCode},data.field)
|
||||
|
||||
var ajax = new $ax(Feng.ctxPath + "/sysConfig/editItem", function (data) {
|
||||
Feng.success("更新成功!");
|
||||
window.location.href = Feng.ctxPath + '/sysConfig'
|
||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/edit",'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("修改成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
}, function (data) {
|
||||
Feng.error("更新失败!" + data.responseJSON.message)
|
||||
admin.closeThisDialog();
|
||||
Feng.error("修改失败!" + data.message)
|
||||
});
|
||||
ajax.set(data.field);
|
||||
ajax.start();
|
||||
|
||||
return false;
|
||||
httpRequest.set(SysConfigInfoDlg.data);
|
||||
httpRequest.start(true);
|
||||
});
|
||||
|
||||
//监听字典选择
|
||||
form.on('select(dictTypeId)', function (data) {
|
||||
|
||||
var dictTypeId = data.value;
|
||||
|
||||
//初始化字典详细列表
|
||||
updateDictDetail(dictTypeId);
|
||||
|
||||
});
|
||||
|
||||
//返回按钮
|
||||
$("#backupPage").click(function () {
|
||||
window.location.href = Feng.ctxPath + '/sysConfig'
|
||||
});
|
||||
|
||||
//如果当前配置是带字典类型,则初始化字典类型选择
|
||||
if (result.data.dictFlag === 'Y') {
|
||||
activeDictSelect();
|
||||
|
||||
//更新选项
|
||||
$("#dictTypeId").val(result.data.dictTypeId);
|
||||
form.render();
|
||||
|
||||
//更新字典类型的详情
|
||||
updateDictDetail(result.data.dictTypeId, result.data.value);
|
||||
} else {
|
||||
activeCustomSelect();
|
||||
}
|
||||
|
||||
//如果是系统类型,则不能改变取值范围和字典类型
|
||||
if(result.data.code.indexOf('GUNS_') === 0){
|
||||
$("[name='dictFlag']").attr("disabled","disabled");
|
||||
$("#dictTypeId").attr("disabled","disabled");
|
||||
form.render();
|
||||
}
|
||||
// 常量所属分类动态赋值
|
||||
activeDictSelect();
|
||||
|
||||
});
|
|
@ -1,184 +0,0 @@
|
|||
layui.use(['layer', 'form', 'ztree', 'laydate', 'admin', 'ax', 'treeTable', 'func'], function () {
|
||||
var layer = layui.layer;
|
||||
var form = layui.form;
|
||||
var $ZTree = layui.ztree;
|
||||
var $ax = layui.ax;
|
||||
var laydate = layui.laydate;
|
||||
var admin = layui.admin;
|
||||
var treeTable = layui.treeTable;
|
||||
var func = layui.func;
|
||||
|
||||
//table的初始化实例
|
||||
var insTb;
|
||||
|
||||
/**
|
||||
* 系统管理--菜单管理
|
||||
*/
|
||||
var Menu = {
|
||||
tableId: "menuTable", //表格id
|
||||
condition: {
|
||||
menuId: "",
|
||||
menuName: "",
|
||||
level: ""
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格的列
|
||||
*/
|
||||
Menu.initColumn = function () {
|
||||
return [
|
||||
{type: 'numbers'},
|
||||
{field: 'name', align: "left", sort: true, title: '菜单名称', minWidth: 240},
|
||||
{field: 'code', align: "center", sort: true, title: '菜单编号', minWidth: 120},
|
||||
{field: 'pcode', align: "center", sort: true, title: '菜单父编号'},
|
||||
{field: 'url', align: "center", sort: true, title: '请求地址'},
|
||||
{field: 'sort', align: "center", sort: true, title: '排序'},
|
||||
{field: 'levels', align: "center", sort: true, title: '层级'},
|
||||
{field: 'isMenuName', align: "center", sort: true, title: '是否是菜单'},
|
||||
{field: 'statusName', align: "center", sort: true, title: '状态'},
|
||||
{align: 'center', toolbar: '#menuTableBar', title: '操作', minWidth: 200}
|
||||
];
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击菜单树时
|
||||
*/
|
||||
Menu.onClickMenu = function (e, treeId, treeNode) {
|
||||
Menu.condition.menuId = treeNode.id;
|
||||
Menu.search();
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击查询按钮
|
||||
*/
|
||||
Menu.search = function () {
|
||||
var queryData = {};
|
||||
queryData['menuName'] = $("#menuName").val();
|
||||
queryData['level'] = $("#level").val();
|
||||
Menu.initTable(Menu.tableId, queryData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 弹出添加菜单对话框
|
||||
*/
|
||||
Menu.openAddMenu = function () {
|
||||
func.open({
|
||||
height: 720,
|
||||
title: '添加菜单',
|
||||
content: Feng.ctxPath + '/menu/menu_add',
|
||||
tableId: Menu.tableId,
|
||||
endCallback: function () {
|
||||
Menu.initTable(Menu.tableId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击编辑菜单按钮时
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
Menu.onEditMenu = function (data) {
|
||||
func.open({
|
||||
height: 720,
|
||||
title: '修改菜单',
|
||||
content: Feng.ctxPath + "/menu/menu_edit?menuId=" + data.menuId,
|
||||
tableId: Menu.tableId,
|
||||
endCallback: function () {
|
||||
Menu.initTable(Menu.tableId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击删除菜单按钮
|
||||
*
|
||||
* @param data 点击按钮时候的行数据
|
||||
*/
|
||||
Menu.onDeleteMenu = function (data) {
|
||||
var operation = function () {
|
||||
var ajax = new $ax(Feng.ctxPath + "/menu/remove", function () {
|
||||
Feng.success("删除成功!");
|
||||
Menu.condition.menuId = "";
|
||||
Menu.initTable(Menu.tableId);
|
||||
}, function (xhr) {
|
||||
Feng.error("删除失败!" + xhr.responseJSON.message + "!");
|
||||
});
|
||||
ajax.set("menuId", data.menuId);
|
||||
ajax.start();
|
||||
};
|
||||
Feng.confirm("是否删除菜单" + data.name + "?", operation);
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化表格
|
||||
*/
|
||||
Menu.initTable = function (menuId, reqData) {
|
||||
return treeTable.render({
|
||||
elem: '#' + menuId,
|
||||
tree: {
|
||||
iconIndex: 1, // 折叠图标显示在第几列
|
||||
idName: 'code', // 自定义id字段的名称
|
||||
pidName: 'pcode', // 自定义标识是否还有子节点的字段名称
|
||||
haveChildName: 'haveChild', // 自定义标识是否还有子节点的字段名称
|
||||
isPidData: true // 是否是pid形式数据
|
||||
},
|
||||
height: "full-98",
|
||||
cols: Menu.initColumn(),
|
||||
reqData: function (data, callback) {
|
||||
var ajax = new $ax(Feng.ctxPath + '/menu/listTree', function (res) {
|
||||
callback(res.data);
|
||||
}, function (res) {
|
||||
Feng.error("删除失败!" + res.responseJSON.message + "!");
|
||||
});
|
||||
ajax.setData(reqData);
|
||||
ajax.start();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 渲染表格
|
||||
insTb = Menu.initTable(Menu.tableId);
|
||||
$('#expandAll').click(function () {
|
||||
insTb.expandAll();
|
||||
});
|
||||
$('#foldAll').click(function () {
|
||||
insTb.foldAll();
|
||||
});
|
||||
|
||||
//渲染时间选择框
|
||||
laydate.render({
|
||||
elem: '#timeLimit',
|
||||
range: true,
|
||||
max: Feng.currentDate()
|
||||
});
|
||||
|
||||
//初始化左侧部门树
|
||||
var ztree = new $ZTree("menuTree", "/menu/selectMenuTreeList");
|
||||
ztree.bindOnClick(Menu.onClickMenu);
|
||||
ztree.init();
|
||||
|
||||
// 搜索按钮点击事件
|
||||
$('#btnSearch').click(function () {
|
||||
Menu.search();
|
||||
});
|
||||
|
||||
// 添加按钮点击事件
|
||||
$('#btnAdd').click(function () {
|
||||
Menu.openAddMenu();
|
||||
});
|
||||
|
||||
// 工具条点击事件
|
||||
treeTable.on('tool(menuTable)', function (obj) {
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
|
||||
if (layEvent === 'edit') {
|
||||
Menu.onEditMenu(data);
|
||||
} else if (layEvent === 'delete') {
|
||||
Menu.onDeleteMenu(data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -1,11 +1,10 @@
|
|||
layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'], function () {
|
||||
layui.use(['table', 'form', 'func', 'HttpRequest', 'xmSelect', 'util'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var func = layui.func;
|
||||
var ajaxUtil = layui.ajaxUtil;
|
||||
var dropdown = layui.dropdown;
|
||||
var util = layui.util;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var xmSelect = layui.xmSelect;
|
||||
|
||||
// 职位表管理
|
||||
var Organization = {
|
||||
|
@ -16,17 +15,11 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
Organization.initColumn = function () {
|
||||
return [[
|
||||
{type: 'checkbox'},
|
||||
{field: 'positionId', hide: true, title: '主键id'},
|
||||
{field: 'positionName', sort: true, title: '职位名称'},
|
||||
{field: 'positionCode', sort: true, title: '职位编码'},
|
||||
{field: 'positionRemark', sort: true, title: '备注'},
|
||||
{field: 'createTime', sort: true, title: '创建时间',templet: function (d) {
|
||||
return util.toDateString(d.createTime);
|
||||
}},
|
||||
{field: 'updateTime', sort: true, title: '更新时间',templet: function (d) {
|
||||
console.log(d.updateTime);
|
||||
return d.updateTime==null?'': util.toDateString(d.updateTime);
|
||||
}},
|
||||
{field: 'orgId', hide: true, title: '主键id'},
|
||||
{field: 'orgName', sort: true, title: '机构名称'},
|
||||
{field: 'orgCode', sort: true, title: '机构编码'},
|
||||
{field: 'orgSort', sort: true, title: '排序'},
|
||||
{field: 'orgRemark', sort: true, title: '备注'},
|
||||
{field: 'statusFlag', sort: true, templet: '#statusTpl', title: '状态'},
|
||||
{align: 'center', toolbar: '#tableBar', title: '操作'}
|
||||
]];
|
||||
|
@ -35,8 +28,7 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
// 点击查询按钮
|
||||
Organization.search = function () {
|
||||
var queryData = {};
|
||||
queryData['positionName'] = $("#positionName").val();
|
||||
//queryData['positionCode'] = $("#positionCode").val();
|
||||
queryData['orgName'] = $("#orgName").val();
|
||||
table.reload(Organization.tableId, {
|
||||
where: queryData,
|
||||
page: {curr: 1}
|
||||
|
@ -47,7 +39,7 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
Organization.openAddDlg = function () {
|
||||
func.open({
|
||||
height: 800,
|
||||
title: '添加职位',
|
||||
title: '添加机构',
|
||||
content: Feng.ctxPath + '/hrOrganization/addView',
|
||||
tableId: Organization.tableId
|
||||
});
|
||||
|
@ -57,8 +49,8 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
Organization.openEditDlg = function (data) {
|
||||
func.open({
|
||||
height: 800,
|
||||
title: '修改职位',
|
||||
content: Feng.ctxPath + '/organization/editView?positionId=' + data.positionId,
|
||||
title: '修改机构',
|
||||
content: Feng.ctxPath + '/organization/editView?orgId=' + data.orgId,
|
||||
tableId: Organization.tableId
|
||||
});
|
||||
};
|
||||
|
@ -76,7 +68,7 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
// 点击删除
|
||||
Organization.delete = function (data) {
|
||||
var operation = function () {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/delete", {"positionId":data.positionId},function (data) {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/delete", {"orgId":data.positionId},function (data) {
|
||||
Feng.success("删除成功!");
|
||||
table.reload(Organization.tableId);
|
||||
},function (data) {
|
||||
|
@ -88,7 +80,7 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
|
||||
// 修改职位状态
|
||||
Organization.updateStatus = function (positionId, checked) {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/updateStatus", {"positionId":positionId,"statusFlag":checked},function (data) {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/updateStatus", {"orgId":positionId,"statusFlag":checked},function (data) {
|
||||
Feng.success("修改成功!");
|
||||
},function (data) {
|
||||
Feng.error("修改失败!" + data.responseJSON.message);
|
||||
|
@ -132,7 +124,6 @@ layui.use(['table', 'admin', 'ax', 'form', 'func', 'ajaxUtil', 'dropdown','util'
|
|||
} else if (event === 'delete') {
|
||||
Organization.delete(data);
|
||||
}
|
||||
dropdown.hideAll();
|
||||
});
|
||||
|
||||
// 修改状态
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
layui.use(['form', 'admin', 'ax', 'ajaxUtil'], function () {
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var ajaxUtil = layui.ajaxUtil;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/add", data.field, function (res) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/hrOrganization/add", 'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("添加成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
|
||||
}, function (res) {
|
||||
}, function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("添加失败!" + res.responseJSON.message);
|
||||
Feng.error("添加失败!" + data.message);
|
||||
});
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
});
|
||||
});
|
|
@ -1,25 +1,25 @@
|
|||
layui.use(['form', 'admin', 'ajaxUtil'], function () {
|
||||
layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var ajaxUtil = layui.ajaxUtil;
|
||||
//获取详情信息,填充表单
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
|
||||
ajaxUtil.get("/hrOrganization/detail?orgId=" + Feng.getUrlParam("positionId"), function (res) {
|
||||
form.val('positionForm', res.data);
|
||||
}, function (res) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("编辑异常!" + res.responseJSON.message);
|
||||
});
|
||||
//获取信息详情填充表单
|
||||
var request = new HttpRequest(Feng.ctxPath + "/hrOrganization/detail?orgId=" + Feng.getUrlParam("orgId"), 'get');
|
||||
var result = request.start();
|
||||
console.log(result);
|
||||
form.val('organizationForm', result.data);
|
||||
|
||||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
ajaxUtil.post(Feng.ctxPath + "/hrOrganization/edit", data.field, function (res) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/hrOrganization/edit", 'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("修改成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
}, function (data) {
|
||||
admin.closeThisDialog();
|
||||
}, function (res) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("修改失败!" + res.responseJSON.message);
|
||||
Feng.error("修改失败!" + data.message);
|
||||
});
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
});
|
||||
});
|
|
@ -1,10 +1,9 @@
|
|||
layui.use(['table', 'admin', 'form', 'func', 'HttpRequest', 'dropdown', 'util'], function () {
|
||||
layui.use(['table', 'form', 'func', 'HttpRequest', 'util'], function () {
|
||||
var $ = layui.$;
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var func = layui.func;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var dropdown = layui.dropdown;
|
||||
var util = layui.util;
|
||||
|
||||
// 职位表管理
|
||||
|
|
|
@ -2,10 +2,8 @@ layui.use(['form', 'admin', 'HttpRequest'], function () {
|
|||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
//获取详情信息,填充表单
|
||||
|
||||
|
||||
//获取用户详情
|
||||
//获取信息详情填充表单
|
||||
var request = new HttpRequest(Feng.ctxPath + "/hrPosition/detail?positionId=" + Feng.getUrlParam("positionId"), 'get');
|
||||
var result = request.start();
|
||||
form.val('positionForm', result.data);
|
||||
|
@ -13,9 +11,9 @@ layui.use(['form', 'admin', 'HttpRequest'], function () {
|
|||
//表单提交事件
|
||||
form.on('submit(btnSubmit)', function (data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/hrPosition/edit", 'post', function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.success("修改成功!");
|
||||
admin.putTempData('formOk', true);
|
||||
admin.closeThisDialog();
|
||||
}, function (data) {
|
||||
admin.closeThisDialog();
|
||||
Feng.error("修改失败!" + data.message);
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
type: 2,
|
||||
title: "修改密码",
|
||||
shade: 0,
|
||||
content: '${ctxPath}/changePassword'
|
||||
content: '${ctxPath}/view/changePassword'
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect>
|
||||
<a ew-event="lockScreen" title="锁屏" data-url="${ctxPath}/lock"><i class="layui-icon layui-icon-password"></i></a>
|
||||
<a ew-event="lockScreen" title="锁屏" data-url="${ctxPath}/view/lock"><i class="layui-icon layui-icon-password"></i></a>
|
||||
</li>
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a>
|
||||
|
@ -38,7 +38,7 @@
|
|||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd lay-unselect>
|
||||
<a ew-href="${ctxPath}/personal">个人中心</a>
|
||||
<a ew-href="${ctxPath}/view/personal">个人中心</a>
|
||||
</dd>
|
||||
<dd lay-unselect>
|
||||
<a id="setPsw">修改密码</a>
|
||||
|
@ -50,7 +50,7 @@
|
|||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a ew-event="theme" title="主题" data-url="${ctxPath}/theme"><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
<a ew-event="theme" title="主题" data-url="${ctxPath}/view/theme"><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -8,21 +8,21 @@
|
|||
@if(objectUtil.isEmpty(menu.children)){
|
||||
<li class="layui-nav-item">
|
||||
@if(itemLP.first && menuLP.first){
|
||||
<a id="firstPageAction" lay-href="${menu.router}"><i class="layui-icon ${menu.icon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
<a id="firstPageAction" lay-href="${menu.layuiPath}"><i class="layui-icon ${menu.layuiIcon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
@}else{
|
||||
<a lay-href="${menu.router}"><i class="layui-icon ${menu.icon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
<a lay-href="${menu.layuiPath}"><i class="layui-icon ${menu.layuiIcon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
@}
|
||||
</li>
|
||||
@}else{
|
||||
<li class="layui-nav-item">
|
||||
<a><i class="layui-icon ${menu.icon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
<a><i class="layui-icon ${menu.layuiIcon}"></i> <cite>${menu.menuName}</cite></a>
|
||||
<dl class="layui-nav-child">
|
||||
@for(subMenu in menu.children){
|
||||
@if(objectUtil.isEmpty(subMenu.children)){
|
||||
@if(itemLP.first && menuLP.first && subMenuLP.first){
|
||||
<dd><a id="firstPageAction" lay-href="${subMenu.router}">${subMenu.menuName}</a></dd>
|
||||
<dd><a id="firstPageAction" lay-href="${subMenu.layuiPath}">${subMenu.menuName}</a></dd>
|
||||
@}else{
|
||||
<dd><a lay-href="${subMenu.router}">${subMenu.menuName}</a></dd>
|
||||
<dd><a lay-href="${subMenu.layuiPath}">${subMenu.menuName}</a></dd>
|
||||
@}
|
||||
@}else{
|
||||
<dd>
|
||||
|
@ -31,9 +31,9 @@
|
|||
@for(subSubMenu in subMenu.children){
|
||||
@if(objectUtil.isEmpty(subSubMenu.children)){
|
||||
@if(itemLP.first && menuLP.first && subMenuLP.first && subSubMenuLP.first){
|
||||
<dd><a id="firstPageAction" lay-href="${subSubMenu.router}">${subSubMenu.menuName}</a></dd>
|
||||
<dd><a id="firstPageAction" lay-href="${subSubMenu.layuiPath}">${subSubMenu.menuName}</a></dd>
|
||||
@}else{
|
||||
<dd><a lay-href="${subSubMenu.router}">${subSubMenu.menuName}</a></dd>
|
||||
<dd><a lay-href="${subSubMenu.layuiPath}">${subSubMenu.menuName}</a></dd>
|
||||
@}
|
||||
@}else{
|
||||
<dd>
|
||||
|
@ -41,9 +41,9 @@
|
|||
<dl class="layui-nav-child">
|
||||
@for(subSubSubMenu in subSubMenu.children){
|
||||
@if(itemLP.first && menuLP.first && subMenuLP.first && subSubMenuLP.first && subSubSubMenuLP.first){
|
||||
<dd><a id="firstPageAction" lay-href="${subSubSubMenu.router}">${subSubSubMenu.menuName}</a></dd>
|
||||
<dd><a id="firstPageAction" lay-href="${subSubSubMenu.layuiPath}">${subSubSubMenu.menuName}</a></dd>
|
||||
@}else{
|
||||
<dd><a lay-href="${subSubSubMenu.router}">${subSubSubMenu.menuName}</a></dd>
|
||||
<dd><a lay-href="${subSubSubMenu.layuiPath}">${subSubSubMenu.menuName}</a></dd>
|
||||
@}
|
||||
@}
|
||||
</dl>
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
@layout("/layout/_container.html", {js:["/assets/modular/auth/app/app.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">应用管理</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<input id="appName" class="layui-input" type="text" placeholder="应用名称"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input id="appCode" class="layui-input" type="text" placeholder="应用编码"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
<button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>添加</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-table" id="appTable" lay-filter="appTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="tableBar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="activeTpl">
|
||||
<input type="checkbox" lay-filter="activeFilter" value="{{d.appId}}" lay-skin="switch" lay-text="已激活|未激活" {{d.activeFlag=='Y'?'checked':''}}/>
|
||||
</script>
|
||||
<script type="text/html" id="statusTpl">
|
||||
<input type="checkbox" lay-filter="statusFilter" value="{{d.appId}}" lay-skin="switch" lay-text="启用|禁用" {{d.statusFlag=='1'?'checked':''}}/>
|
||||
</script>
|
||||
@}
|
|
@ -0,0 +1,31 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/auth/app/app_add.js"]}){
|
||||
|
||||
<form class="layui-form" id="appForm" lay-filter="appForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form-item layui-row">
|
||||
<input name="deptId" type="hidden"/>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">应用名称<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input name="appName" placeholder="请输入应用名称" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">应用编码<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input name="appCode" placeholder="请输入应用编码" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-bottom text-center">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit> 提交 </button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> 取消 </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@}
|
|
@ -0,0 +1,31 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/auth/app/app_edit.js"]}){
|
||||
|
||||
<form class="layui-form" id="appForm" lay-filter="appForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form-item layui-row">
|
||||
<input name="appId" type="hidden"/>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">应用名称<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input name="appName" placeholder="请输入应用名称" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">应用编码<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input name="appCode" placeholder="请输入应用编码" type="text" class="layui-input layui-disabled" lay-verify="required" disabled required autocomplete="off"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-bottom text-center">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit> 提交 </button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> 取消 </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@}
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_container.html",{plugins:["ztree"],js:["/assets/modular/system/menu/menu.js"]}){
|
||||
@layout("/layout/_container.html",{plugins:["ztree"], js:["/assets/modular/auth/menu/menu.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">菜单管理</span>
|
||||
|
@ -12,16 +12,14 @@
|
|||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<input id="menuName" class="layui-input" type="text" placeholder="菜单名称/编码"/>
|
||||
<input id="menuName" class="layui-input" type="text" placeholder="菜单名称"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input id="level" class="layui-input" type="text" placeholder="层级"/>
|
||||
<input id="menuCode" class="layui-input" type="text" placeholder="菜单编码"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
@if(shiro.hasPermission("/menu/add")){
|
||||
<button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>添加</button>
|
||||
@}
|
||||
<button id="expandAll" class="layui-btn icon-btn"><i class="layui-icon"></i>展开所有</button>
|
||||
<button id="foldAll" class="layui-btn icon-btn"><i class="layui-icon"></i>折叠所有</button>
|
||||
</div>
|
||||
|
@ -35,12 +33,8 @@
|
|||
</div>
|
||||
|
||||
<script type="text/html" id="menuTableBar">
|
||||
@if(shiro.hasPermission("/menu/edit")){
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
|
||||
@}
|
||||
@if(shiro.hasPermission("/menu/remove")){
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
|
||||
@}
|
||||
</script>
|
||||
|
||||
@}
|
||||
@}
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/menu/menu_add.js"]}){
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/auth/menu/menu_add.js"]}){
|
||||
|
||||
<form class="layui-form" id="menuForm" lay-filter="menuForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/menu/menu_edit.js"]}){
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/auth/menu/menu_edit.js"]}){
|
||||
|
||||
<form class="layui-form" id="menuForm" lay-filter="menuForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
|
@ -16,11 +16,11 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['util', 'admin', 'ax'], function () {
|
||||
layui.use(['util', 'admin', 'HttpRequest'], function () {
|
||||
var $ = layui.jquery;
|
||||
var util = layui.util;
|
||||
var admin = layui.admin;
|
||||
var $ax = layui.ax;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var rightPsw = 'e10adc3949ba59abbe56e057f20f883e'; // 正确密码的MD5密文
|
||||
|
||||
// 获取各个组件
|
||||
|
@ -36,13 +36,13 @@
|
|||
//解锁锁屏
|
||||
admin.unlockScreen();
|
||||
|
||||
var ajax = new $ax(Feng.ctxPath + "/logout", function (data) {
|
||||
var request = new HttpRequest(Feng.ctxPath + "/logout", 'post', function (data) {
|
||||
Feng.success("退出成功!");
|
||||
location.replace(Feng.ctxPath + "/");
|
||||
}, function (data) {
|
||||
layer.msg("退出失败!" + data.responseJSON.message, {icon: 5, anim: 6});
|
||||
layer.msg("退出失败!" + data.message, {icon: 5, anim: 6});
|
||||
});
|
||||
ajax.start();
|
||||
request.start();
|
||||
});
|
||||
|
||||
// 监听enter键
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<input id="condition" class="layui-input" type="text" placeholder="名称"/>
|
||||
<input id="configName" class="layui-input" type="text" placeholder="参数名称"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
|
|
|
@ -1,59 +1,48 @@
|
|||
@layout("/layout/_container.html",{js:["/assets/modular/sysConfig/sysConfig_add.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">添加</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-fluid " style="">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<form id="sysConfigForm" lay-filter="sysConfigForm" class="layui-form model-form" style="max-width: 700px;margin: 40px auto;">
|
||||
<input name="id" type="hidden"/>
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/sysConfig/sysConfig_add.js"]}){
|
||||
<form class="layui-form" id="sysConfigForm" lay-filter="sysConfigForm" >
|
||||
<div class="layui-fluid " style="">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">基本信息</div>
|
||||
<div class="layui-card-body">
|
||||
<input name="configId" type="hidden"/>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">参数名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="name" name="name" placeholder="请输入名称" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
<input id="configName" name="configName" placeholder="请输入参数名称" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">编码<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">唯一编码</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="code" name="code" placeholder="属性编码" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
<input id="configCode" name="configCode" placeholder="请输入唯一编码" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-required">系统参数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="sysFlag" lay-skin="switch" lay-text="是|否" value="Y" checked>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux form-tips">推荐采用下划线大写风格,例如,KAPTCH_OPEN,若以GUNS_开头则是系统常量不可删除。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">取值范围<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="dictFlag" value="Y" title="字典" lay-filter="dictChecked" checked="checked">
|
||||
<input type="radio" name="dictFlag" value="N" title="非字典" lay-filter="dictChecked">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">如果选择字典,则取值来自于 系统管理->字典管理</div>
|
||||
</div>
|
||||
|
||||
<!-- 从字典取值 -->
|
||||
<div id="dictCodeDiv">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">字典类型<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="dictTypeId" id="dictTypeId" lay-filter="dictTypeId">
|
||||
<option value="">请选择系统字典类型</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">参数值<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block" id="dictDetails">
|
||||
<input type="radio" name="dictValue" value="" title="无" disabled="disabled">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-required">所属分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="groupCode" id="groupCode" lay-filter="dictTypeId">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 手动输入 -->
|
||||
<div class="layui-form-item" id="customCodeDiv">
|
||||
<label class="layui-form-label">参数值<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">参数值</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="value" name="value" placeholder="属性值" type="text" autocomplete="off" class="layui-input"/>
|
||||
<input id="configValue" name="configValue" placeholder="请输入属性值" type="text" autocomplete="off" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -65,12 +54,11 @@
|
|||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit> 提交 </button>
|
||||
<button class="layui-btn layui-btn-primary" type="button" id="backupPage"> 返回 </button>
|
||||
<button class="layui-btn layui-btn-primary" ew-event="closeDialog"> 取消 </button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@}
|
|
@ -1,59 +1,49 @@
|
|||
@layout("/layout/_container.html",{js:["/assets/modular/sysConfig/sysConfig_edit.js"]}){
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/sysConfig/sysConfig_edit.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">修改</span>
|
||||
</div>
|
||||
|
||||
<div class="layui-fluid " style="">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<form id="sysConfigForm" lay-filter="sysConfigForm" class="layui-form model-form" style="max-width: 700px;margin: 40px auto;">
|
||||
<input name="id" type="hidden"/>
|
||||
<form class="layui-form" id="sysConfigForm" lay-filter="sysConfigForm" >
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">基本信息</div>
|
||||
<div class="layui-card-body">
|
||||
<input name="configId" type="hidden"/>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">参数名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="name" name="name" placeholder="请输入名称" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
<input id="configName" name="configName" placeholder="请输入参数名称" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">编码<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">唯一编码</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="code" disabled="disabled" name="code" placeholder="属性编码" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
<input id="configCode" readonly disabled="disabled" name="configCode" placeholder="请输入唯一编码" type="text" class="layui-input" autocomplete="off" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-required">系统参数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="sysFlag" lay-skin="switch" lay-text="是|否" value="Y" checked>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux form-tips">编码填写后不可修改,系统字典(GUNS_开头)添加后不可修改取值范围和字典类型</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">取值范围<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="dictFlag" value="Y" title="字典" lay-filter="dictChecked" checked="checked">
|
||||
<input type="radio" name="dictFlag" value="N" title="非字典" lay-filter="dictChecked">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">如果选择字典,则取值来自于 系统管理->字典管理</div>
|
||||
</div>
|
||||
|
||||
<!-- 从字典取值 -->
|
||||
<div id="dictCodeDiv">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">字典类型<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="dictTypeId" id="dictTypeId" lay-filter="dictTypeId">
|
||||
<option value="">请选择系统字典类型</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">参数值<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block" id="dictDetails">
|
||||
<input type="radio" name="dictValue" value="" title="无" disabled="disabled">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-required">所属分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="groupCode" id="groupCode" lay-filter="dictTypeId" disabled="disabled">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 手动输入 -->
|
||||
<div class="layui-form-item" id="customCodeDiv">
|
||||
<label class="layui-form-label">参数值<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label layui-form-required">参数值</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="value" name="value" placeholder="属性值" type="text" autocomplete="off" class="layui-input"/>
|
||||
<input id="configValue" name="configValue" placeholder="请输入属性值" type="text" autocomplete="off" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -65,12 +55,12 @@
|
|||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-filter="btnSubmit" lay-submit> 提交 </button>
|
||||
<button class="layui-btn layui-btn-primary" type="button" id="backupPage"> 返回 </button>
|
||||
<button class="layui-btn layui-btn-primary" ew-event="closeDialog"> 取消 </button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@}
|
|
@ -30,8 +30,20 @@
|
|||
<div class="layui-col-md9">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 10px;">
|
||||
<div class="layui-form toolbar">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<input id="orgName" class="layui-input" type="text" placeholder="机构名称"/>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button>
|
||||
<button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>添加</button>
|
||||
<button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>导出</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 数据表格 -->
|
||||
<table id="organizationUserTable" lay-filter="organizationUserTable"></table>
|
||||
<table id="organizationTable" lay-filter="organizationTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,21 +53,6 @@
|
|||
<script type="text/html" id="tableBar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
|
||||
<a class="layui-btn layui-btn-xs" data-dropdown="#userTbDrop{{d.LAY_INDEX}}" no-shade="true">
|
||||
更多<i class="layui-icon layui-icon-drop" style="font-size: 12px;margin-right: 0;"></i></a>
|
||||
<!-- 下拉菜单 -->
|
||||
<ul class="dropdown-menu-nav dropdown-bottom-right layui-hide" id="userTbDrop{{d.LAY_INDEX}}">
|
||||
<div class="dropdown-anchor"></div>
|
||||
<li><a lay-event="lock"><i class="layui-icon layui-icon-password"></i>锁定用户</a></li>
|
||||
<li><a lay-event="reset"><i class="layui-icon layui-icon-key"></i>重置密码</a></li>
|
||||
<li class="have-more show-left">
|
||||
<a><i class="layui-icon layui-icon-upload-drag"></i>上传资料 </a>
|
||||
<ul class="dropdown-menu-nav-child">
|
||||
<li><a><i class="layui-icon layui-icon-camera"></i>上传头像</a></li>
|
||||
<li><a><i class="layui-icon layui-icon-picture-fine"></i>上传照片</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="statusTpl">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/organization/organization_add.js"]}){
|
||||
|
||||
<form class="layui-form" id="positionForm" lay-filter="positionForm">
|
||||
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">基本信息</div>
|
||||
|
@ -9,27 +9,27 @@
|
|||
<input name="positionId" type="hidden"/>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">职位名称<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label">机构名称<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionName" name="positionName" placeholder="请输入职位名称" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgName" name="orgName" placeholder="请输入机构名称" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">职位编码<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label">机构编码<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionCode" name="positionCode" placeholder="请输入职位编码" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgCode" name="orgCode" placeholder="请输入机构编码" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">顺序<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionSort" name="positionSort" placeholder="请输入顺序" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgSort" name="orgSort" placeholder="请输入顺序" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">备注<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="positionRemark" name="positionRemark" placeholder="请输入备注" class="layui-textarea" lay-verify="required" required></textarea>
|
||||
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea" lay-verify="required" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/organization/organization_edit.js"]}){
|
||||
|
||||
<form class="layui-form" id="positionForm" lay-filter="positionForm">
|
||||
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">基本信息</div>
|
||||
|
@ -9,27 +9,27 @@
|
|||
<input name="positionId" type="hidden"/>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">职位名称<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label">机构名称<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionName" name="positionName" placeholder="请输入职位名称" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgName" name="orgName" placeholder="请输入机构名称" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">职位编码<span style="color: red;">*</span></label>
|
||||
<label class="layui-form-label">机构编码<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionCode" name="positionCode" placeholder="请输入职位编码" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgCode" name="orgCode" placeholder="请输入机构编码" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">顺序<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input id="positionSort" name="positionSort" placeholder="请输入顺序" type="text" class="layui-input" lay-verify="required" required/>
|
||||
<input id="orgSort" name="orgSort" placeholder="请输入顺序" type="text" class="layui-input" lay-verify="required" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">备注<span style="color: red;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="positionRemark" name="positionRemark" placeholder="请输入备注" class="layui-textarea" lay-verify="required" required></textarea>
|
||||
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea" lay-verify="required" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue