mirror of https://gitee.com/stylefeng/guns
【ORG】机构管理修改树样式 以及js
parent
0285031534
commit
44e3fb68a8
|
@ -1,85 +1,46 @@
|
||||||
layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'HttpRequest', 'func', 'tree', 'util'], function () {
|
layui.use(['layer', 'form', 'table', 'util', 'admin', 'tree', 'dropdown', 'xmSelect', 'treeTable', 'func', 'HttpRequest'], function () {
|
||||||
|
var $ = layui.jquery;
|
||||||
|
var layer = layui.layer;
|
||||||
var form = layui.form;
|
var form = layui.form;
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var HttpRequest = layui.HttpRequest;
|
var admin = layui.admin;
|
||||||
var func = layui.func;
|
|
||||||
var tree = layui.tree;
|
var tree = layui.tree;
|
||||||
|
var func = layui.func;
|
||||||
|
var HttpRequest = layui.HttpRequest;
|
||||||
|
var xmSelect = layui.xmSelect;
|
||||||
|
var selObj, treeData; // 左树选中数据
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统管理--用户管理
|
* 系统管理--用户管理
|
||||||
*/
|
*/
|
||||||
var Organization = {
|
var Organization = {
|
||||||
tableId: "userTable", //表格id
|
tableId: "organizationTable", //表格id
|
||||||
condition: {
|
|
||||||
orgName: "",
|
|
||||||
orgParentId: "",
|
|
||||||
orgCode: ""
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 初始化表格的列
|
/* 点击新增对话框 */
|
||||||
Organization.initColumn = function () {
|
|
||||||
return [[
|
|
||||||
{type: 'checkbox'},
|
|
||||||
{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: '操作'}
|
|
||||||
]];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 选择部门时
|
|
||||||
Organization.onClickDept = function (obj) {
|
|
||||||
Organization.condition.orgParentId = obj.data.id;
|
|
||||||
Organization.search();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// 点击查询按钮
|
|
||||||
Organization.search = function () {
|
|
||||||
var queryData = {};
|
|
||||||
queryData['orgParentId'] = Organization.condition.orgParentId;
|
|
||||||
queryData['orgName'] = $("#orgName").val();
|
|
||||||
queryData['orgCode'] = $("#orgCode").val();
|
|
||||||
table.reload(Organization.tableId, {
|
|
||||||
where: queryData, page: {curr: 1}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 弹出添加对话框
|
|
||||||
Organization.openAddDlg = function () {
|
Organization.openAddDlg = function () {
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '添加机构',
|
title: '添加机构',
|
||||||
content: Feng.ctxPath + '/view/organization/addView',
|
content: Feng.ctxPath + '/view/organization/addView',
|
||||||
tableId: Organization.tableId
|
tableId: Organization.tableId,
|
||||||
|
endCallback: function () {
|
||||||
|
renderTree();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 点击编辑
|
/* 点击编辑对话框 */
|
||||||
Organization.openEditDlg = function (data) {
|
Organization.openEditDlg = function (data) {
|
||||||
func.open({
|
func.open({
|
||||||
height: 800,
|
height: 800,
|
||||||
title: '修改机构',
|
title: '修改机构',
|
||||||
content: Feng.ctxPath + '/view/organization/editView?orgId=' + data.orgId,
|
content: Feng.ctxPath + '/view/organization/editView?orgId=' + data.id,
|
||||||
tableId: Organization.tableId
|
tableId: Organization.tableId
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 导出excel按钮
|
/* 点击删除 */
|
||||||
Organization.exportExcel = function () {
|
|
||||||
var checkRows = table.checkStatus(Organization.tableId);
|
|
||||||
if (checkRows.data.length === 0) {
|
|
||||||
Feng.error("请选择要导出的数据");
|
|
||||||
} else {
|
|
||||||
table.exportFile(tableResult.config.id, checkRows.data, 'xls');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 点击删除
|
|
||||||
Organization.delete = function (data) {
|
Organization.delete = function (data) {
|
||||||
var operation = function () {
|
var operation = function () {
|
||||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/hrOrganization/delete", 'post', function (data) {
|
var httpRequest = new HttpRequest(Feng.ctxPath + "/hrOrganization/delete", 'post', function (data) {
|
||||||
|
@ -94,80 +55,83 @@ layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'HttpRequest',
|
||||||
Feng.confirm("是否删除?", operation);
|
Feng.confirm("是否删除?", operation);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改职位状态
|
/* 渲染树形 */
|
||||||
Organization.updateStatus = function (orgId, checked) {
|
function renderTree() {
|
||||||
var httpRequest = new HttpRequest(Feng.ctxPath + "/hrOrganization/updateStatus", 'post', function (data) {
|
$.get(Feng.ctxPath + '/hrOrganization/treeLayui', function (res) {
|
||||||
table.reload(Organization.tableId);
|
|
||||||
Feng.success("修改成功!");
|
|
||||||
}, function (data) {
|
|
||||||
table.reload(Organization.tableId);
|
|
||||||
Feng.error("修改失败!" + data.message);
|
|
||||||
});
|
|
||||||
httpRequest.set({"orgId": orgId, "statusFlag": checked});
|
|
||||||
httpRequest.start(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 渲染表格
|
|
||||||
var tableResult = table.render({
|
|
||||||
elem: '#' + Organization.tableId,
|
|
||||||
url: Feng.ctxPath + '/hrOrganization/page',
|
|
||||||
page: true,
|
|
||||||
height: "full-98",
|
|
||||||
cellMinWidth: 100,
|
|
||||||
cols: Organization.initColumn(),
|
|
||||||
parseData: Feng.parseData
|
|
||||||
});
|
|
||||||
|
|
||||||
// 初始化部门树
|
|
||||||
var request = new HttpRequest(Feng.ctxPath + '/hrOrganization/treeLayui', 'get', function (data) {
|
|
||||||
tree.render({
|
tree.render({
|
||||||
elem: '#deptTree',
|
elem: '#organizationTree',
|
||||||
data: data.data,
|
onlyIconControl: true,
|
||||||
click: Organization.onClickDept,
|
data: res.data,
|
||||||
onlyIconControl: true
|
click: function (obj) {
|
||||||
});
|
selObj = obj;
|
||||||
});
|
$('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click');
|
||||||
request.start();
|
$(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click');
|
||||||
|
|
||||||
// 搜索按钮点击事件
|
console.log(obj.data);
|
||||||
$('#btnSearch').click(function () {
|
insTb.reload({
|
||||||
Organization.search();
|
where: {orgParentId: obj.data.id},
|
||||||
|
page: {curr: 1},
|
||||||
|
url: Feng.ctxPath + '/hrOrganization/page'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#organizationTree').find('.layui-tree-entry:first>.layui-tree-main>.layui-tree-txt').trigger('click');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 添加按钮点击事件
|
renderTree();
|
||||||
$('#btnAdd').click(function () {
|
|
||||||
|
/* 添加 */
|
||||||
|
$('#organizationAddBtn').click(function () {
|
||||||
Organization.openAddDlg();
|
Organization.openAddDlg();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 导出excel
|
/* 修改 */
|
||||||
$('#btnExp').click(function () {
|
$('#organizationEditBtn').click(function () {
|
||||||
Organization.exportExcel();
|
if (!selObj) return layer.msg('未选择机构', {icon: 2});
|
||||||
|
Organization.openEditDlg(selObj.data)
|
||||||
});
|
});
|
||||||
|
|
||||||
// 工具条点击事件
|
/* 删除 */
|
||||||
table.on('tool(' + Organization.tableId + ')', function (obj) {
|
$('#organizationDelBtn').click(function () {
|
||||||
var data = obj.data;
|
if (!selObj) return layer.msg('未选择机构', {icon: 2});
|
||||||
var event = obj.event;
|
selObj.data.orgId = selObj.data.id;
|
||||||
if (event === 'edit') {
|
Organization.delete(selObj.data)
|
||||||
Organization.openEditDlg(data);
|
|
||||||
} else if (event === 'delete') {
|
|
||||||
Organization.delete(data);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 修改状态
|
|
||||||
form.on('switch(status)', function (obj) {
|
/* 渲染表格 */
|
||||||
var orgId = obj.elem.value;
|
var insTb = table.render({
|
||||||
var checked = obj.elem.checked ? 1 : 2;
|
elem: '#organizationTable',
|
||||||
Organization.updateStatus(orgId, checked);
|
data: [],
|
||||||
|
height: 'full-100',
|
||||||
|
page: true,
|
||||||
|
//toolbar: '#organizationUserTbToolBar',
|
||||||
|
cellMinWidth: 100,
|
||||||
|
cols: [[
|
||||||
|
{type: 'checkbox'},
|
||||||
|
{type: 'numbers'},
|
||||||
|
{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: '备注'}
|
||||||
|
]],
|
||||||
|
done: function () {
|
||||||
|
// 表格搜索
|
||||||
|
form.on('submit(organizationUserTbSearch)', function (data) {
|
||||||
|
insTb.reload({where: data.field, page: {curr: 1}});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
parseData: Feng.parseData
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 点击搜索 */
|
||||||
|
form.on('submit(organizationTbSearch)', function (data) {
|
||||||
|
insTb.reload({where: data.field});
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function () {
|
|
||||||
var panehHidden = false;
|
|
||||||
if ($(this).width() < 769) {
|
|
||||||
panehHidden = true;
|
|
||||||
}
|
|
||||||
$('#myContiner').layout({initClosed: panehHidden, west__size: 260});
|
|
||||||
});
|
|
|
@ -1,235 +0,0 @@
|
||||||
layui.use(['layer', 'form', 'table', 'util', 'admin', 'tree', 'dropdown', 'xmSelect', 'treeTable'], function () {
|
|
||||||
var $ = layui.jquery;
|
|
||||||
var layer = layui.layer;
|
|
||||||
var form = layui.form;
|
|
||||||
var table = layui.table;
|
|
||||||
var util = layui.util;
|
|
||||||
var admin = layui.admin;
|
|
||||||
var tree = layui.tree;
|
|
||||||
var xmSelect = layui.xmSelect;
|
|
||||||
var selObj, treeData; // 左树选中数据
|
|
||||||
|
|
||||||
/* 渲染树形 */
|
|
||||||
function renderTree() {
|
|
||||||
$.get(Feng.ctxPath + '/hrOrganization/treeLayui', function (res) {
|
|
||||||
tree.render({
|
|
||||||
elem: '#organizationTree',
|
|
||||||
onlyIconControl: true,
|
|
||||||
data: res.data,
|
|
||||||
click: function (obj) {
|
|
||||||
selObj = obj;
|
|
||||||
$('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click');
|
|
||||||
$(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click');
|
|
||||||
insTb.reload({
|
|
||||||
where: {organizationId: obj.data.organizationId},
|
|
||||||
page: {curr: 1},
|
|
||||||
url: Feng.ctxPath + '/hrOrganization/page'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#organizationTree').find('.layui-tree-entry:first>.layui-tree-main>.layui-tree-txt').trigger('click');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
renderTree();
|
|
||||||
|
|
||||||
/* 添加 */
|
|
||||||
$('#organizationAddBtn').click(function () {
|
|
||||||
showEditModel(null, selObj ? selObj.data.parentId : null);
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 修改 */
|
|
||||||
$('#organizationEditBtn').click(function () {
|
|
||||||
if (!selObj) return layer.msg('未选择机构', {icon: 2});
|
|
||||||
showEditModel(selObj.data);
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 删除 */
|
|
||||||
$('#organizationDelBtn').click(function () {
|
|
||||||
if (!selObj) return layer.msg('未选择机构', {icon: 2});
|
|
||||||
doDel(selObj);
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 显示表单弹窗 */
|
|
||||||
function showEditModel(mData, pid) {
|
|
||||||
admin.open({
|
|
||||||
type: 1,
|
|
||||||
area: '600px',
|
|
||||||
title: (mData ? '修改' : '添加') + '机构',
|
|
||||||
content: $('#organizationEditDialog').html(),
|
|
||||||
success: function (layero, dIndex) {
|
|
||||||
// 回显表单数据
|
|
||||||
form.val('organizationEditForm', mData);
|
|
||||||
// 表单提交事件
|
|
||||||
form.on('submit(organizationEditSubmit)', function (data) {
|
|
||||||
data.field.parentId = insXmSel.getValue('valueStr');
|
|
||||||
var loadIndex = layer.load(2);
|
|
||||||
$.get(mData ? '../../json/ok.json' : '../../json/ok.json', data.field, function (res) {
|
|
||||||
layer.close(loadIndex);
|
|
||||||
if (200 === res.code) {
|
|
||||||
layer.close(dIndex);
|
|
||||||
layer.msg(res.msg, {icon: 1});
|
|
||||||
renderTree();
|
|
||||||
} else {
|
|
||||||
layer.msg(res.msg, {icon: 2});
|
|
||||||
}
|
|
||||||
}, 'json');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
// 渲染下拉树
|
|
||||||
var insXmSel = xmSelect.render({
|
|
||||||
el: '#organizationEditParentSel',
|
|
||||||
height: '250px',
|
|
||||||
data: treeData,
|
|
||||||
initValue: mData ? [mData.parentId] : (pid ? [pid] : []),
|
|
||||||
model: {label: {type: 'text'}},
|
|
||||||
prop: {
|
|
||||||
name: 'organizationName',
|
|
||||||
value: 'organizationId'
|
|
||||||
},
|
|
||||||
radio: true,
|
|
||||||
clickClose: true,
|
|
||||||
tree: {
|
|
||||||
show: true,
|
|
||||||
indent: 15,
|
|
||||||
strict: false,
|
|
||||||
expandedKeys: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 禁止弹窗出现滚动条
|
|
||||||
$(layero).children('.layui-layer-content').css('overflow', 'visible');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 删除 */
|
|
||||||
function doDel(obj) {
|
|
||||||
layer.confirm('确定要删除此机构吗?', {
|
|
||||||
skin: 'layui-layer-admin',
|
|
||||||
shade: .1
|
|
||||||
}, function (i) {
|
|
||||||
layer.close(i);
|
|
||||||
var loadIndex = layer.load(2);
|
|
||||||
$.get('../../json/ok.json', {
|
|
||||||
id: obj.data.organizationId,
|
|
||||||
}, function (res) {
|
|
||||||
layer.close(loadIndex);
|
|
||||||
if (200 === res.code) {
|
|
||||||
layer.msg(res.msg, {icon: 1});
|
|
||||||
renderTree();
|
|
||||||
} else {
|
|
||||||
layer.msg(res.msg, {icon: 2});
|
|
||||||
}
|
|
||||||
}, 'json');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 渲染表格 */
|
|
||||||
var insTb = table.render({
|
|
||||||
elem: '#organizationUserTable',
|
|
||||||
data: [],
|
|
||||||
height: 'full-100',
|
|
||||||
page: true,
|
|
||||||
//toolbar: '#organizationUserTbToolBar',
|
|
||||||
cellMinWidth: 100,
|
|
||||||
cols: [[
|
|
||||||
{type: 'checkbox'},
|
|
||||||
{type: 'numbers'},
|
|
||||||
{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: '备注'},
|
|
||||||
{title: '操作', toolbar: '#organizationUserTbBar', align: 'center', width: 120, minWidth: 120}
|
|
||||||
]],
|
|
||||||
done: function () {
|
|
||||||
// 表格搜索
|
|
||||||
form.on('submit(organizationUserTbSearch)', function (data) {
|
|
||||||
insTb.reload({where: data.field, page: {curr: 1}});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
parseData: Feng.parseData
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 表格工具条点击事件 */
|
|
||||||
table.on('tool(organizationUserTable)', function (obj) {
|
|
||||||
if (obj.event === 'edit') { // 修改
|
|
||||||
showEditModel2(obj.data);
|
|
||||||
} else if (obj.event === 'del') { // 删除
|
|
||||||
doDel2(obj);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 表格头工具栏点击事件 */
|
|
||||||
table.on('toolbar(organizationUserTable)', function (obj) {
|
|
||||||
if (obj.event === 'add') { // 添加
|
|
||||||
showEditModel2();
|
|
||||||
} else if (obj.event === 'del') { // 删除
|
|
||||||
var checkRows = table.checkStatus('organizationUserTable');
|
|
||||||
if (checkRows.data.length === 0) {
|
|
||||||
layer.msg('请选择要删除的数据', {icon: 2});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var ids = checkRows.data.map(function (d) {
|
|
||||||
return d.userId;
|
|
||||||
});
|
|
||||||
doDel2({ids: ids});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* 显示表单弹窗2 */
|
|
||||||
function showEditModel2(mData) {
|
|
||||||
admin.open({
|
|
||||||
type: 1,
|
|
||||||
title: (mData ? '修改' : '添加') + '用户',
|
|
||||||
content: $('#organizationUserEditDialog').html(),
|
|
||||||
success: function (layero, dIndex) {
|
|
||||||
// 回显表单数据
|
|
||||||
form.val('organizationUserEditForm', mData);
|
|
||||||
// 表单提交事件
|
|
||||||
form.on('submit(organizationUserEditSubmit)', function (data) {
|
|
||||||
data.field.organizationId = selObj ? selObj.data.organizationId : undefined;
|
|
||||||
var loadIndex = layer.load(2);
|
|
||||||
$.get(mData ? '../../json/ok.json' : '../../json/ok.json', data.field, function (res) {
|
|
||||||
layer.close(loadIndex);
|
|
||||||
if (200 === res.code) {
|
|
||||||
layer.close(dIndex);
|
|
||||||
layer.msg(res.msg, {icon: 1});
|
|
||||||
insTb.reload({page: {curr: 1}});
|
|
||||||
} else {
|
|
||||||
layer.msg(res.msg, {icon: 2});
|
|
||||||
}
|
|
||||||
}, 'json');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
// 禁止弹窗出现滚动条
|
|
||||||
$(layero).children('.layui-layer-content').css('overflow', 'visible');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 删除2 */
|
|
||||||
function doDel2(obj) {
|
|
||||||
layer.confirm('确定要删除选中用户吗?', {
|
|
||||||
skin: 'layui-layer-admin',
|
|
||||||
shade: .1
|
|
||||||
}, function (i) {
|
|
||||||
layer.close(i);
|
|
||||||
var loadIndex = layer.load(2);
|
|
||||||
$.get('../../json/ok.json', {
|
|
||||||
id: obj.data ? obj.data.userId : '',
|
|
||||||
ids: obj.ids ? obj.ids.join(',') : ''
|
|
||||||
}, function (res) {
|
|
||||||
layer.close(loadIndex);
|
|
||||||
if (200 === res.code) {
|
|
||||||
layer.msg(res.msg, {icon: 1});
|
|
||||||
insTb.reload({page: {curr: 1}});
|
|
||||||
} else {
|
|
||||||
layer.msg(res.msg, {icon: 2});
|
|
||||||
}
|
|
||||||
}, 'json');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,55 +1,97 @@
|
||||||
@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/organization/organization.js"]}){
|
@layout("/layout/_container.html",{js:["/assets/modular/system/organization/organization.js"]}){
|
||||||
|
<style>
|
||||||
|
/* 左树 */
|
||||||
|
#organizationTreeBar {
|
||||||
|
padding: 10px 15px;
|
||||||
|
border: 1px solid #e6e6e6;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
<div class="layui-body-header">
|
#organizationTree {
|
||||||
<span class="layui-body-header-title">机构管理</span>
|
border: 1px solid #e6e6e6;
|
||||||
</div>
|
border-top: none;
|
||||||
|
padding: 10px 5px;
|
||||||
|
overflow: auto;
|
||||||
|
height: -webkit-calc(100vh - 125px);
|
||||||
|
height: -moz-calc(100vh - 125px);
|
||||||
|
height: calc(100vh - 125px);
|
||||||
|
}
|
||||||
|
|
||||||
<div id="myContiner" style="height: 100%">
|
.layui-tree-entry .layui-tree-txt {
|
||||||
<div class="ui-layout-west">
|
padding: 0 5px;
|
||||||
<div class="box box-main">
|
border: 1px transparent solid;
|
||||||
<div class="ui-layout-content">
|
text-decoration: none !important;
|
||||||
<div id="deptTree"></div>
|
}
|
||||||
</div>
|
|
||||||
</div>
|
.layui-tree-entry.ew-tree-click .layui-tree-txt {
|
||||||
</div>
|
background-color: #fff3e0;
|
||||||
<div class="ui-layout-center">
|
border: 1px #FFE6B0 solid;
|
||||||
<div class="layui-fluid">
|
}
|
||||||
<div class="layui-row">
|
|
||||||
<div class="layui-col-md12">
|
/* 右表搜索表单 */
|
||||||
|
#organizationUserTbSearchForm .layui-form-label {
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
width: 90px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#organizationUserTbSearchForm .layui-input-block {
|
||||||
|
margin-left: 90px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- 正文开始 -->
|
||||||
|
<div class="layui-fluid" style="padding-bottom: 0;">
|
||||||
|
<div class="layui-row layui-col-space15">
|
||||||
|
<div class="layui-col-md2">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body" style="padding: 10px;">
|
||||||
<div class="layui-form toolbar">
|
<!-- 树工具栏 -->
|
||||||
|
<div class="layui-form toolbar" id="organizationTreeBar">
|
||||||
<input id="defaultPassword" class="layui-input" type="hidden" value="${constants.getDefaultPassWord()}"/>
|
<button id="organizationAddBtn" class="layui-btn layui-btn-sm icon-btn">
|
||||||
|
<i class="layui-icon"></i>添加
|
||||||
|
</button>
|
||||||
|
<button id="organizationEditBtn" class="layui-btn layui-btn-sm layui-btn-warm icon-btn">
|
||||||
|
<i class="layui-icon"></i>修改
|
||||||
|
</button>
|
||||||
|
<button id="organizationDelBtn" class="layui-btn layui-btn-sm layui-btn-danger icon-btn">
|
||||||
|
<i class="layui-icon"></i>删除
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- 左树 -->
|
||||||
|
<div id="organizationTree"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md10">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body" style="padding: 10px;">
|
||||||
|
<!-- 表格工具栏2 -->
|
||||||
|
<form class="layui-form toolbar">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input id="orgName" class="layui-input" type="text" placeholder="组织名称"/>
|
<label class="layui-form-label">组织名称:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input name="orgName" class="layui-input" placeholder="组织名称"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<input id="orgCode" class="layui-input" type="text" placeholder="组织编码"/>
|
<label class="layui-form-label">组织编码:</label>
|
||||||
</div>
|
<div class="layui-input-inline">
|
||||||
<div class="layui-inline">
|
<input name="orgCode" class="layui-input" placeholder="组织编码"/>
|
||||||
<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>
|
</div>
|
||||||
</div>
|
<div class="layui-inline"> 
|
||||||
<table class="layui-table" id="userTable" lay-filter="userTable"></table>
|
<button class="layui-btn icon-btn" lay-filter="organizationTbSearch" lay-submit><i class="layui-icon"></i>搜索</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- 数据表格 -->
|
||||||
|
<table id="organizationTable" lay-filter="organizationTable"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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="statusTpl">
|
|
||||||
<input type="checkbox" lay-filter="status" value="{{d.userId}}" lay-skin="switch" lay-text="正常|锁定" {{d.statusFlag=='1'?'checked':''}}/>
|
|
||||||
</script>
|
|
||||||
@}
|
@}
|
|
@ -1,104 +0,0 @@
|
||||||
@layout("/layout/_container.html",{js:["/assets/modular/system/organization/organization_1.js"]}){
|
|
||||||
<style>
|
|
||||||
/* 左树 */
|
|
||||||
#organizationTreeBar {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border: 1px solid #e6e6e6;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#organizationTree {
|
|
||||||
border: 1px solid #e6e6e6;
|
|
||||||
border-top: none;
|
|
||||||
padding: 10px 5px;
|
|
||||||
overflow: auto;
|
|
||||||
height: -webkit-calc(100vh - 125px);
|
|
||||||
height: -moz-calc(100vh - 125px);
|
|
||||||
height: calc(100vh - 125px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-tree-entry .layui-tree-txt {
|
|
||||||
padding: 0 5px;
|
|
||||||
border: 1px transparent solid;
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-tree-entry.ew-tree-click .layui-tree-txt {
|
|
||||||
background-color: #fff3e0;
|
|
||||||
border: 1px #FFE6B0 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 右表搜索表单 */
|
|
||||||
#organizationUserTbSearchForm .layui-form-label {
|
|
||||||
box-sizing: border-box !important;
|
|
||||||
width: 90px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#organizationUserTbSearchForm .layui-input-block {
|
|
||||||
margin-left: 90px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- 正文开始 -->
|
|
||||||
<div class="layui-fluid" style="padding-bottom: 0;">
|
|
||||||
<div class="layui-row layui-col-space15">
|
|
||||||
<div class="layui-col-md3">
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-body" style="padding: 10px;">
|
|
||||||
<!-- 树工具栏 -->
|
|
||||||
<div class="layui-form toolbar" id="organizationTreeBar">
|
|
||||||
<button id="organizationAddBtn" class="layui-btn layui-btn-sm icon-btn">
|
|
||||||
<i class="layui-icon"></i>添加
|
|
||||||
</button>
|
|
||||||
<button id="organizationEditBtn" class="layui-btn layui-btn-sm layui-btn-warm icon-btn">
|
|
||||||
<i class="layui-icon"></i>修改
|
|
||||||
</button>
|
|
||||||
<button id="organizationDelBtn"
|
|
||||||
class="layui-btn layui-btn-sm layui-btn-danger icon-btn">
|
|
||||||
<i class="layui-icon"></i>删除
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<!-- 左树 -->
|
|
||||||
<div id="organizationTree"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-col-md9">
|
|
||||||
<div class="layui-card">
|
|
||||||
<div class="layui-card-body" style="padding: 10px;">
|
|
||||||
<!-- 表格工具栏2 -->
|
|
||||||
<form class="layui-form toolbar">
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">组织名称:</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input name="orgName" class="layui-input" placeholder="组织名称"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">组织编码:</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input name="orgCode" class="layui-input" placeholder="组织编码"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline"> 
|
|
||||||
<button class="layui-btn icon-btn" lay-filter="dictTbSearch" lay-submit><i class="layui-icon"></i>搜索</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<!-- 数据表格 -->
|
|
||||||
<table id="organizationUserTable" lay-filter="organizationUserTable"></table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 表格操作列 -->
|
|
||||||
<script type="text/html" id="organizationUserTbBar">
|
|
||||||
<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="del">删除</a>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@}
|
|
|
@ -3,37 +3,36 @@
|
||||||
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
||||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">基本信息</div>
|
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="layui-form-item layui-row">
|
<div class="layui-form-item layui-row">
|
||||||
<input name="orgId" type="hidden"/>
|
<input name="orgId" type="hidden"/>
|
||||||
|
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<div id="organization" class="ew-xmselect-tree"></div>
|
<div id="organization" class="ew-xmselect-tree"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgName" name="orgName" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgCode" name="orgCode" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgSort" name="orgSort" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<label class="layui-form-label">备注</label>
|
<label class="layui-form-label layui-form-required">备注</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,37 +3,36 @@
|
||||||
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
<form class="layui-form" id="organizationForm" lay-filter="organizationForm">
|
||||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">基本信息</div>
|
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="layui-form-item layui-row">
|
<div class="layui-form-item layui-row">
|
||||||
<input name="orgId" type="hidden"/>
|
<input name="orgId" type="hidden"/>
|
||||||
|
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<div id="organization" class="ew-xmselect-tree"></div>
|
<div id="organization" class="ew-xmselect-tree"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgName" name="orgName" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgCode" name="orgCode" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<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">
|
<div class="layui-input-block">
|
||||||
<input id="orgSort" name="orgSort" 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>
|
</div>
|
||||||
<div class="layui-inline layui-col-md12">
|
<div class="layui-inline layui-col-md12">
|
||||||
<label class="layui-form-label">备注</label>
|
<label class="layui-form-label layui-form-required">备注</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
<textarea id="orgRemark" name="orgRemark" placeholder="请输入备注" class="layui-textarea"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue