@@ -161,13 +193,19 @@
+
+
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/CodeGenerator/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/CodeGenerator/Index.cshtml
index 082c82c4afd32242585633fc0c25254621db871e..5c1463077ceacdc5fa895c06266eba3e5b51ccca 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/CodeGenerator/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/CodeGenerator/Index.cshtml
@@ -11,12 +11,14 @@
//加载数据
wcLoading.close();
//权限控制(js是值传递)
+ currentTableBar.innerHTML = common.authorizeButtonNew(currentTableBar.innerHTML);
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
commonTable.rendertable({
elem: '#currentTableId',
url: '/SystemManage/CodeGenerator/GetTablePageListJson',
sqlkey: 'TableName',//数据库主键
cols: [[
+ { type: "radio", width: 50 },
{ field: 'TableName', title: '表名称', width: 200, sort: true },
{ field: 'TableKeyName', title: '主键名称', minWidth: 250 },
{ field: 'TableKey', title: '主键字段', width: 150 },
@@ -32,6 +34,7 @@
}
},
{ field: 'Remark', title: '备注', minWidth: 150 },
+ { title: '操作', width: 170, toolbar: '#currentTableBar', align: "center" }
]]
});
// 监听搜索操作
@@ -42,48 +45,46 @@
curr: 1,
where: { keyword: data.field.txt_keyword}
});
- entity = null;
return false;
});
- var entity;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- entity = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-entitycode", "NF-add", "NF-details"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
/**
* toolbar监听事件
*/
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
if (obj.event === 'add') { // 监听删除操作
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.openNewTabByIframe({
title: "模板代码生成",
- href: "/SystemManage/CodeGenerator/Form?keyValue=" + entity.data.TableName,
+ href: "/SystemManage/CodeGenerator/Form?keyValue=" + data[0].TableName,
});
}
else if (obj.event === 'entitycode') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "实体类生成",
- url: "/SystemManage/CodeGenerator/EntityCode?keyValue=" + entity.data.TableName,
+ url: "/SystemManage/CodeGenerator/EntityCode?keyValue=" + data[0].TableName,
width: "700px",
height: "600px",
});
}
else if (obj.event === 'details') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看数据表",
- url: "/SystemManage/CodeGenerator/Details?keyValue=" + entity.data.TableName,
+ url: "/SystemManage/CodeGenerator/Details?keyValue=" + data[0].TableName,
width: "700px",
height: "600px",
btn: []
@@ -99,6 +100,33 @@
}
return false;
});
+ //toolrow监听事件
+ table.on('tool(currentTableFilter)', function (obj) {
+ if (obj.event === 'add') { // 监听
+ common.openNewTabByIframe({
+ title: "模板代码生成",
+ href: "/SystemManage/CodeGenerator/Form?keyValue=" + obj.data.TableName,
+ });
+ }
+ else if (obj.event === 'entitycode') {
+ common.modalOpen({
+ title: "实体类生成",
+ url: "/SystemManage/CodeGenerator/EntityCode?keyValue=" + obj.data.TableName,
+ width: "700px",
+ height: "600px",
+ });
+ }
+ else if (obj.event === 'details') {
+ common.modalOpen({
+ title: "查看数据表",
+ url: "/SystemManage/CodeGenerator/Details?keyValue=" + obj.data.TableName,
+ width: "700px",
+ height: "600px",
+ btn: []
+ });
+ }
+ return false;
+ });
});
@@ -124,12 +152,16 @@
-
+
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/Flowscheme/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/Flowscheme/Index.cshtml
index 84e51d2bbfff248c36c47329cb5c47270334246e..b7f9a4a31d0e36ef07f2c7e550dbd171583d859e 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/Flowscheme/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/Flowscheme/Index.cshtml
@@ -42,10 +42,10 @@
@@ -101,7 +101,7 @@
search: false,
height: 'full-160',
cols: [[
- //此处需修改
+ { type: "radio", width: 50 },
{ field: 'F_SchemeCode', title: '流程编号', width: 150, sort: true },
{ field: 'F_SchemeName', title: '流程名称', width: 200, sort: true },
{ field: 'F_SchemeVersion', title: '流程版本', width: 120, sort: true, hide: true },
@@ -137,7 +137,6 @@
where: { keyword: queryJson },
});
itemId = null;
- entity = null;
return false;
});
// 监听搜索操作
@@ -156,10 +155,9 @@
return false;
});
wcLoading.close();
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- entity = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-delete", "NF-details"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
treeTable.on('row(currentTable)', function (obj) {
obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
ItemId = obj.data.F_Id;
@@ -167,6 +165,7 @@
})
//toolbar监听事件
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
if (obj.event === 'add') { // 监听添加操作
common.openNewTabByIframe({
title: "添加流程",
@@ -174,13 +173,13 @@
});
}
else if (obj.event === 'delete') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemManage/Flowscheme/DeleteForm",
- param: { keyValue: entity.data.F_Id },
+ param: { keyValue: data[0].F_Id },
success: function () {
common.reload('data-search-btn');
entity = null;
@@ -188,23 +187,23 @@
});
}
else if (obj.event === 'edit') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.openNewTabByIframe({
title: "编辑流程",
- href: "/SystemManage/Flowscheme/Form?keyValue=" + entity.data.F_Id,
+ href: "/SystemManage/Flowscheme/Form?keyValue=" + data[0].F_Id,
});
}
else if (obj.event === 'details') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.openNewTabByIframe({
title: "预览流程",
- href: "/SystemManage/Flowscheme/Details?keyValue=" + entity.data.F_Id,
+ href: "/SystemManage/Flowscheme/Details?keyValue=" + data[0].F_Id,
});
}
return false;
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/Form/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/Form/Index.cshtml
index 3cab8a8c22827b4f21e4e6411107fe139d7bd696..aebd2d06977a7b07b216529d0e9949dc379c5250 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/Form/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/Form/Index.cshtml
@@ -42,10 +42,10 @@
@@ -60,7 +60,6 @@
commonTable = layui.commonTable,
treeTable = layui.treeTable,
common = layui.common;
- var entity;
var ItemId;
//权限控制(js是值传递)
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
@@ -101,7 +100,7 @@
search:false,
height: 'full-160',
cols: [[
- //此处需修改
+ { type: "radio", width: 50 },
{ field: 'F_Name', title: '表单名称', width: 150, sort: true },
{ field: 'F_Description', title: '备注', minWidth: 250 },
{ field: 'F_Fields', title: '字段数', width: 100, sort: true, hide: true },
@@ -141,7 +140,6 @@
where: { keyword: queryJson },
});
itemId = null;
- entity = null;
return false;
});
// 监听搜索操作
@@ -155,7 +153,6 @@
},
where: { ItemId: ItemId,keyword: data.field.txt_keyword }
});
- entity = null;
return false;
});
wcLoading.close();
@@ -164,12 +161,12 @@
ItemId = obj.data.F_Id;
$('button[lay-filter="data-search-btn"]').click();//按钮刷新
})
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- entity = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-delete", "NF-details"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
//toolbar监听事件
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
if (obj.event === 'add') { // 监听添加操作
common.openNewTabByIframe({
title: "添加表单",
@@ -177,13 +174,13 @@
});
}
else if (obj.event === 'delete') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemManage/Form/DeleteForm",
- param: { keyValue: entity.data.F_Id },
+ param: { keyValue: data[0].F_Id },
success: function () {
common.reload('data-search-btn');
entity = null;
@@ -191,23 +188,23 @@
});
}
else if (obj.event === 'edit') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.openNewTabByIframe({
title: "编辑表单",
- href: "/SystemManage/Form/Form?keyValue=" + entity.data.F_Id,
+ href: "/SystemManage/Form/Form?keyValue=" + data[0].F_Id,
});
}
else if (obj.event === 'details') {
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "预览表单",
- url: "/SystemManage/Form/Details?keyValue=" + entity.data.F_Id,
+ url: "/SystemManage/Form/Details?keyValue=" + data[0].F_Id,
width: "600px",
height: "600px",
btn: []
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/ItemsData/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/ItemsData/Index.cshtml
index 1c8c1fef01a68800e2d560e5f31374ededae4d0f..d84f889b2ed681dbd6e9981ee951205e92b2c39f 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/ItemsData/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/ItemsData/Index.cshtml
@@ -71,6 +71,7 @@
},
height: 'full-110',
cols: [[
+ { type: "radio", width: 50 },
{ field: 'F_ItemName', title: '名称', width: 120 },
{ field: 'F_ItemCode', title: '编号', width: 120 },
{ field: 'F_SortCode', title: '排序', width: 60 },
@@ -126,7 +127,6 @@
keyword: data.field.txt_keyword,
},
});
- item = null;
return false;
});
// 监听搜索操作
@@ -135,15 +135,14 @@
DemoTree.fuzzySearch(data.field.item_keyword);
return false;
});
- var item;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- item = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-delete", "NF-details"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
/**
* toolbar监听事件
*/
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
if (obj.event === 'add') { // 监听操作
if (!treeid) {
return false;
@@ -156,38 +155,38 @@
});
}
else if (obj.event === 'delete') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemManage/ItemsData/DeleteForm",
- param: { keyValue: item.data.F_Id },
+ param: { keyValue: data[0].F_Id },
success: function () {
common.reload('data-search-btn');
}
});
}
else if (obj.event === 'edit') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "编辑字典",
- url: "/SystemManage/ItemsData/Form?itemId=" + treeid + "&keyValue=" + item.data.F_Id,
+ url: "/SystemManage/ItemsData/Form?itemId=" + treeid + "&keyValue=" + data[0].F_Id,
width: "450px",
height: "350px",
});
}
else if (obj.event === 'details') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看字典",
- url: "/SystemManage/ItemsData/Details?keyValue=" + item.data.F_Id,
+ url: "/SystemManage/ItemsData/Details?keyValue=" + data[0].F_Id,
width: "450px",
height: "350px",
btn: []
@@ -240,10 +239,10 @@
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/ItemsType/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/ItemsType/Index.cshtml
index 29ac680037474a510a8c0d5cb3440c928008e3b4..7f8bba23475220ac842c18eb7606aacdf63f2eb2 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/ItemsType/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/ItemsType/Index.cshtml
@@ -13,61 +13,71 @@
//加载数据
wcLoading.close();
//权限控制(js是值传递)
+ currentTableBar.innerHTML = common.authorizeButtonNew(currentTableBar.innerHTML);
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
var rendertree = common.rendertreetable({
- elem: '#currentTableId',
- url: '/SystemManage/ItemsType/GetGridJson',
- cols: [[
- { field: 'F_FullName', title: '名称', width: 200 },
- { field: 'F_EnCode', title: '编号', width: 120 },
- { field: 'F_SortCode', title: '排序', width: 60 },
- {
- field: 'F_EnabledMark', title: '状态', width: 80,
- templet: function (d) {
- if (d.F_EnabledMark == true) {
- return "
有效";
- } else {
- return "
无效";
- }
+ elem: '#currentTableId',
+ url: '/SystemManage/ItemsType/GetGridJson',
+ tree: {
+ iconIndex: 1, // 折叠图标显示在第几列
+ isPidData: true, // 是否是id、pid形式数据
+ idName: 'F_Id', // id字段名称
+ pidName: 'F_ParentId', // pid字段名称
+ arrowType: 'arrow2',
+ getIcon: 'ew-tree-icon-style2',
+ },
+ cols: [[
+ { type: "radio", width: 50 },
+ { field: 'F_FullName', title: '名称', width: 200 },
+ { field: 'F_EnCode', title: '编号', width: 120 },
+ { field: 'F_SortCode', title: '排序', width: 60 },
+ {
+ field: 'F_EnabledMark', title: '状态', width: 80,
+ templet: function (d) {
+ if (d.F_EnabledMark == true) {
+ return "
有效";
+ } else {
+ return "
无效";
}
- },
- {
- field: 'F_CreatorTime', title: '创建时间', width: 120,
- templet: function (d) {
- if (d.F_CreatorTime) {
- var time = new Date(d.F_CreatorTime);
- return time.Format("yyyy-MM-dd");
- }
- return '';
+ }
+ },
+ {
+ field: 'F_CreatorTime', title: '创建时间', width: 120,
+ templet: function (d) {
+ if (d.F_CreatorTime) {
+ var time = new Date(d.F_CreatorTime);
+ return time.Format("yyyy-MM-dd");
}
- },
- { field: 'F_Description', title: '备注', minWidth: 150 },
- ]],
- done: function () {
- //展开全部
- rendertree.expandAll();
- }
+ return '';
+ }
+ },
+ { field: 'F_Description', title: '备注', minWidth: 150 },
+ { title: '操作', width: 170, toolbar: '#currentTableBar', align: "center" }
+ ]],
+ done: function () {
+ //展开全部
+ rendertree.expandAll();
+ }
});
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
queryJson = data.field.txt_keyword;
common.reloadtreetable(rendertree, {
where: { keyword: queryJson },
- });
- item = null;
+ });
return false;
});
- var item;
- treeTable.on('row(currentTableId)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- item = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-details", "NF-delete"];//选择1条显示
+ //var morerList = ["NF-delete"];//选中1条以上
+ common.treeTableRowClick("radio", rendertree, "currentTableId", oneList);
/**
* toolbar监听事件
*/
treeTable.on('toolbar(currentTableId)', function (obj) {
+ var data = rendertree.checkStatus(false);
if (obj.event === 'add') { // 监听操作
- keyValue = !!item ? item.data.F_Id : null;
+ keyValue = data.length > 0 ? data[0].F_Id : null;
common.modalOpen({
title: "添加分类",
url: "/SystemManage/ItemsType/Form?event=add&keyValue=" + keyValue,
@@ -76,38 +86,38 @@
});
}
else if (obj.event === 'delete') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemManage/ItemsType/DeleteForm",
- param: { keyValue: item.data.F_Id },
+ param: { keyValue: data[0].F_Id },
success: function () {
common.reload('data-search-btn');
}
});
}
else if (obj.event === 'edit') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "编辑分类",
- url: "/SystemManage/ItemsType/Form?event=edit&keyValue=" + item.data.F_Id,
+ url: "/SystemManage/ItemsType/Form?event=edit&keyValue=" + data[0].F_Id,
width: "450px",
height: "380px",
});
}
else if (obj.event === 'details') {
- if (item == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看分类",
- url: "/SystemManage/ItemsType/Details?keyValue=" + item.data.F_Id,
+ url: "/SystemManage/ItemsType/Details?keyValue=" + data[0].F_Id,
width: "450px",
height: "380px",
btn: []
@@ -123,6 +133,38 @@
}
return false;
});
+ //toolbar监听事件
+ treeTable.on('tool(currentTableId)', function (obj) {
+ if (obj.event === 'delete') {
+ common.deleteForm({
+ url: "/SystemManage/ItemsType/DeleteForm",
+ param: { keyValue: obj.data.F_Id },
+ success: function () {
+ obj.del();
+ }
+ });
+ }
+ else if (obj.event === 'edit') {
+ common.modalOpen({
+ title: "编辑界面",
+ url: "/SystemManage/ItemsType/Form?event=edit&keyValue=" + obj.data.F_Id,
+ width: "500px",
+ height: "500px",
+ data: obj.data,
+ });
+ }
+ else if (obj.event === 'details') {
+ common.modalOpen({
+ title: "查看界面",
+ url: "/SystemManage/ItemsType/Details?keyValue=" + obj.data.F_Id,
+ width: "500px",
+ height: "500px",
+ data: obj.data,
+ btn: []
+ });
+ }
+ return false;
+ });
});
@@ -147,15 +189,19 @@
-
+
\ No newline at end of file
diff --git a/WaterCloud.Web/Areas/SystemManage/Views/Module/Index.cshtml b/WaterCloud.Web/Areas/SystemManage/Views/Module/Index.cshtml
index dcc381b301c94b27f72a83f75cef18ca80859207..d36e490a030a3cbb02b107e8fab119e7da7b9a16 100644
--- a/WaterCloud.Web/Areas/SystemManage/Views/Module/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemManage/Views/Module/Index.cshtml
@@ -2,218 +2,270 @@
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Index.cshtml";
}
-
+ });
+
@@ -146,11 +186,16 @@
+
diff --git a/WaterCloud.Web/Areas/SystemOrganize/Views/Organize/Index.cshtml b/WaterCloud.Web/Areas/SystemOrganize/Views/Organize/Index.cshtml
index 51436b7fd9d8ddc69f6479e9088ab1ce36718600..b1e963714a5755bed1b68a167ffecae15b3ee4eb 100644
--- a/WaterCloud.Web/Areas/SystemOrganize/Views/Organize/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemOrganize/Views/Organize/Index.cshtml
@@ -16,8 +16,17 @@
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
var rendertree = common.rendertreetable({
elem: '#currentTableId',
- url: '/SystemOrganize/Organize/GetTreeGridJson' ,
+ url: '/SystemOrganize/Organize/GetTreeGridJson',
+ tree: {
+ iconIndex: 1, // 折叠图标显示在第几列
+ isPidData: true, // 是否是id、pid形式数据
+ idName: 'F_Id', // id字段名称
+ pidName: 'F_ParentId', // pid字段名称
+ arrowType: 'arrow2',
+ getIcon: 'ew-tree-icon-style2',
+ },
cols: [[
+ { type: "radio", width: 50 },
{ field: 'F_FullName', title: '名称', width: 250 },
{ field: 'F_EnCode', title: '编号', width: 200 },
{
@@ -47,6 +56,7 @@
}
},
{ field: 'F_Description', title: '备注', minWidth: 150 },
+ { title: '操作', width: 170, toolbar: '#currentTableBar', align: "center" }
]],
done: function () {
//展开全部
@@ -63,17 +73,17 @@
duty = null;
return false;
});
- var duty;
- treeTable.on('row(currentTableId)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- duty = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-details", "NF-delete"];//选择1条显示
+ common.treeTableRowClick("radio", rendertree, "currentTableId", oneList);
/**
* toolbar监听事件
*/
treeTable.on('toolbar(currentTableId)', function (obj) {
+ var data = rendertree.checkStatus(false);
+ var keyValue = data.length > 0 ? data[0].F_Id : null;
+ var duty = data.length > 0 ? data[0] : null;
if (obj.event === 'add') { // 监听操作
- keyValue = !!duty ? duty.data.F_Id : null;
common.modalOpen({
title: "添加机构",
url: "/SystemOrganize/Organize/Form?event=add&keyValue=" + keyValue,
@@ -101,7 +111,7 @@
}
common.modalOpen({
title: "编辑机构",
- url: "/SystemOrganize/Organize/Form?event=edit&keyValue=" + duty.data.F_Id,
+ url: "/SystemOrganize/Organize/Form?event=edit&keyValue=" + keyValue,
width: "450px",
height: "520px",
});
@@ -113,7 +123,7 @@
}
common.modalOpen({
title: "查看机构",
- url: "/SystemOrganize/Organize/Details?keyValue=" + duty.data.F_Id,
+ url: "/SystemOrganize/Organize/Details?keyValue=" + keyValue,
width: "450px",
height: "520px",
btn: []
@@ -129,6 +139,36 @@
}
return false;
});
+ treeTable.on('tool(currentTableId)', function (obj) {
+ var keyValue = obj.data.F_Id;
+ if (obj.event === 'delete') {
+ common.deleteForm({
+ url: "/SystemOrganize/Organize/DeleteForm",
+ param: { keyValue: keyValue },
+ success: function () {
+ obj.del();
+ }
+ });
+ }
+ else if (obj.event === 'edit') {
+ common.modalOpen({
+ title: "编辑机构",
+ url: "/SystemOrganize/Organize/Form?event=edit&keyValue=" + keyValue,
+ width: "450px",
+ height: "520px",
+ });
+ }
+ else if (obj.event === 'details') {
+ common.modalOpen({
+ title: "查看机构",
+ url: "/SystemOrganize/Organize/Details?keyValue=" + keyValue,
+ width: "450px",
+ height: "520px",
+ btn: []
+ });
+ }
+ return false;
+ });
});
@@ -154,13 +194,17 @@
-
+
diff --git a/WaterCloud.Web/Areas/SystemOrganize/Views/Role/Index.cshtml b/WaterCloud.Web/Areas/SystemOrganize/Views/Role/Index.cshtml
index e98220d34776c609619c30408cab66d8164eb0fe..21061d887bd2ffac9688ed8b4c192ea6e0a08f48 100644
--- a/WaterCloud.Web/Areas/SystemOrganize/Views/Role/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemOrganize/Views/Role/Index.cshtml
@@ -16,20 +16,24 @@
elem: '#currentTableId',
id: 'currentTableId',
url: '/SystemOrganize/Role/GetGridJson',
+ filter: {
+ clearFilter: false
+ },
cols: [[
- { field: 'F_FullName', title: '角色名称', width: 200, sort: true },
- { field: 'F_EnCode', title: '角色编号', width: 200, sort: true },
+ { type: "radio", width: 50 },
+ { field: 'F_FullName', title: '角色名称', width: 200, sort: true, filter: true },
+ { field: 'F_EnCode', title: '角色编号', width: 200, sort: true, filter: true },
{
- field: 'F_Type', title: '角色类型', width: 120, sort: true,
+ field: 'F_Type', title: '角色类型', width: 120, sort: true, filter: true,
templet: function (d) {
return top.clients.dataItems["RoleType"][d.F_Type] == undefined ? "" : top.clients.dataItems["RoleType"][d.F_Type];
}
},
{
- field: 'F_CompanyName', title: '归属公司', width: 120, sort: true,
+ field: 'F_CompanyName', title: '归属公司', width: 120, sort: true, filter: true,
},
{
- field: 'F_EnabledMark', title: '状态', width: 80, sort: true,
+ field: 'F_EnabledMark', title: '状态', width: 80, sort: true, filter: true,
templet: function (d) {
if (d.F_EnabledMark == true) {
return "
有效";
@@ -39,7 +43,7 @@
}
},
{
- field: 'F_CreatorTime', title: '创建时间', width: 120, sort: true,
+ field: 'F_CreatorTime', title: '创建时间', width: 120, sort: true, filter: true,
templet: function (d) {
if (d.F_CreatorTime) {
var time = new Date(d.F_CreatorTime);
@@ -48,12 +52,12 @@
return '';
}
},
- { field: 'F_Description', title: '备注', minWidth: 150, sort: true },
+ { field: 'F_Description', title: '备注', minWidth: 150, sort: true, filter: true },
+ { title: '操作', width: 170, toolbar: '#currentTableBar', align: "center" }
]]
});
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
- var queryJson = data.field.txt_keyword;
//执行搜索重载
commonTable.reloadtable({
elem: 'currentTableId',
@@ -63,15 +67,15 @@
role = null;
return false;
});
- var role;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- role = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-details", "NF-delete"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
/**
* toolbar监听事件
*/
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
+ var id = data.length > 0 ? data[0].F_Id : null;
if (obj.event === 'add') { // 监听操作
common.modalOpen({
title: "添加角色",
@@ -82,39 +86,39 @@
});
}
else if (obj.event === 'delete') {
- if (role == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemOrganize/Role/DeleteForm",
- param: { keyValue: role.data.F_Id },
+ param: { keyValue: id },
success: function () {
common.reload('data-search-btn');
}
});
}
else if (obj.event === 'edit') {
- if (role == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "编辑角色",
- url: "/SystemOrganize/Role/Form?keyValue=" + role.data.F_Id,
+ url: "/SystemOrganize/Role/Form?keyValue=" + id,
width: "550px",
height: "550px",
btn: []
});
}
else if (obj.event === 'details') {
- if (role == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看角色",
- url: "/SystemOrganize/Role/Details?keyValue=" + role.data.F_Id,
+ url: "/SystemOrganize/Role/Details?keyValue=" + id,
width: "550px",
height: "550px",
btn: []
@@ -130,6 +134,38 @@
}
return false;
});
+ //toolrow监听事件
+ table.on('tool(currentTableFilter)', function (obj) {
+ var id = obj.data.F_Id;
+ if (obj.event === 'delete') {
+ common.deleteForm({
+ url: "/SystemOrganize/Role/DeleteForm",
+ param: { keyValue: id },
+ success: function () {
+ obj.del();
+ }
+ });
+ }
+ else if (obj.event === 'edit') {
+ common.modalOpen({
+ title: "编辑角色",
+ url: "/SystemOrganize/Role/Form?keyValue=" + id,
+ width: "550px",
+ height: "550px",
+ btn: []
+ });
+ }
+ else if (obj.event === 'details') {
+ common.modalOpen({
+ title: "查看角色",
+ url: "/SystemOrganize/Role/Details?keyValue=" + id,
+ width: "550px",
+ height: "550px",
+ btn: []
+ });
+ }
+ return false;
+ });
});
@@ -156,11 +192,16 @@
+
diff --git a/WaterCloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml b/WaterCloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml
index 34ce006b5179fda7917b845ed72e5d5d3e2b82f9..2d2dc581e4c0e4698db3f0193688b678580f31a7 100644
--- a/WaterCloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml
@@ -6,15 +6,15 @@
@@ -45,7 +49,7 @@
id: 'currentTableId',
url: '/SystemOrganize/SystemSet/GetGridJson',
cols: [[
- //此处需修改
+ { type: "radio", width: 50 },
{ field: 'F_ProjectName', title: '项目名称', width: 120, sort: true },
{ field: 'F_CompanyName', title: '公司名称', width: 120, sort: true },
{ field: 'F_PrincipalMan', title: '联系人', width: 120, sort: true },
@@ -85,7 +89,8 @@
}
}
},
- { field: 'F_Description', title: '备注', minWidth: 120, sort: true }
+ { field: 'F_Description', title: '备注', minWidth: 120, sort: true },
+ { title: '操作', width: 170, toolbar: '#currentTableBar', align: "center" }
]]
});
// 监听搜索操作
@@ -96,16 +101,15 @@
curr: 1,
where: { keyword: data.field.txt_keyword }
});
- entity = null;
return false;
});
- var entity;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- entity = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-details", "NF-delete"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
//toolbar监听事件
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
+ var id = data.length > 0 ? data[0].F_Id : null;
if (obj.event === 'add') { // 监听添加操作
common.modalOpen({
title: "添加界面",
@@ -115,25 +119,25 @@
});
}
else if (obj.event === 'edit') {
- if (entity == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "编辑界面",
- url: "/SystemOrganize/SystemSet/Form?keyValue=" + entity.data.F_Id,
+ url: "/SystemOrganize/SystemSet/Form?keyValue=" + id,
width: "700px",
height: "500px",
});
}
else if (obj.event === 'details') {
- if (entity == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看界面",
- url: "/SystemOrganize/SystemSet/Details?keyValue=" + entity.data.F_Id,
+ url: "/SystemOrganize/SystemSet/Details?keyValue=" + id,
width: "700px",
height: "500px",
btn: []
@@ -149,5 +153,27 @@
}
return false;
});
+ //toolrow监听事件
+ table.on('tool(currentTableFilter)', function (obj) {
+ var id = obj.data.F_Id;
+ if (obj.event === 'edit') {
+ common.modalOpen({
+ title: "编辑界面",
+ url: "/SystemOrganize/SystemSet/Form?keyValue=" + id,
+ width: "700px",
+ height: "500px",
+ });
+ }
+ else if (obj.event === 'details') {
+ common.modalOpen({
+ title: "查看界面",
+ url: "/SystemOrganize/SystemSet/Details?keyValue=" + id,
+ width: "700px",
+ height: "500px",
+ btn: []
+ });
+ }
+ return false;
+ });
});
diff --git a/WaterCloud.Web/Areas/SystemOrganize/Views/User/Index.cshtml b/WaterCloud.Web/Areas/SystemOrganize/Views/User/Index.cshtml
index f770b81a93cc91e0d1a67b6559f2780062e19407..559eec136f9ea704b003bb51cae00232d9fa6893 100644
--- a/WaterCloud.Web/Areas/SystemOrganize/Views/User/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemOrganize/Views/User/Index.cshtml
@@ -17,10 +17,11 @@
id: 'currentTableId',
url: '/SystemOrganize/User/GetGridJson',
cols: [[
- { field: 'F_Account', title: '账户', width: 150, sort: true},
- { field: 'F_RealName', title: '姓名', width: 120, sort: true },
+ { type: "radio", width: 50 },
+ { field: 'F_Account', title: '账户', width: 150, sort: true, filter: true},
+ { field: 'F_RealName', title: '姓名', width: 120, sort: true, filter: true },
{
- field: 'F_Gender', title: '性别', width: 80, sort: true,
+ field: 'F_Gender', title: '性别', width: 80, sort: true, filter: true,
templet: function (d) {
if (d.F_Gender == true) {
return "男";
@@ -29,18 +30,18 @@
}
}
},
- { field: 'F_MobilePhone', title: '手机', width: 120, sort: true },
+ { field: 'F_MobilePhone', title: '手机', width: 120, sort: true, filter: true },
{
- field: 'F_CompanyName', title: '公司名称', width: 150, sort: true
+ field: 'F_CompanyName', title: '公司名称', width: 150, sort: true, filter: true
},
{
- field: 'F_DepartmentName', title: '部门名称', width: 200, sort: true
+ field: 'F_DepartmentName', title: '部门名称', width: 200, sort: true, filter: true
},
{
- field: 'F_DutyName', title: '岗位名称', width: 120, sort: true
+ field: 'F_DutyName', title: '岗位名称', width: 120, sort: true, filter: true
},
{
- field: 'F_EnabledMark', title: '状态', width: 80, sort: true,
+ field: 'F_EnabledMark', title: '状态', width: 80, sort: true, filter: true,
templet: function (d) {
if (d.F_EnabledMark == true) {
return "
有效";
@@ -50,7 +51,7 @@
}
},
{
- field: 'F_CreatorTime', title: '创建时间', width: 120, sort: true,
+ field: 'F_CreatorTime', title: '创建时间', width: 120, sort: true, filter: { type: 'date[yyyy-MM-dd]' },
templet: function (d) {
if (d.F_CreatorTime) {
var time = new Date(d.F_CreatorTime);
@@ -59,7 +60,8 @@
return '';
}
},
- { field: 'F_Description', title: '备注', minWidth: 150, sort: true },
+ { field: 'F_Description', title: '备注', minWidth: 150, sort: true, filter: true },
+ { title: '操作', width: 250, toolbar: '#currentTableBar', align: "center" }
]]
});
// 监听搜索操作
@@ -70,18 +72,17 @@
curr: 1,
where: { keyword: data.field.txt_keyword }
});
- user = null;
return false;
});
- var user;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- user = obj;
- })
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-edit", "NF-details", "NF-revisepassword", "NF-disabled", "NF-enabled","NF-delete"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
/**
* toolbar监听事件
*/
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
+ var id = data.length > 0 ? data[0].F_Id : null;
if (obj.event === 'add') { // 监听删除操作
common.modalOpen({
title: "添加用户",
@@ -95,20 +96,20 @@
});
}
else if (obj.event === 'delete') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.deleteForm({
url: "/SystemOrganize/User/DeleteForm",
- param: { keyValue: user.data.F_Id },
+ param: { keyValue: id },
success: function () {
common.reload('data-search-btn');
}
});
}
else if (obj.event === 'disabled') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
@@ -116,7 +117,7 @@
if (r) {
common.submitForm({
url: "/SystemOrganize/User/DisabledAccount",
- param: { keyValue: user.data.F_Id },
+ param: { keyValue: id },
close: false,
success: function () {
common.reload('data-search-btn');
@@ -126,7 +127,7 @@
});
}
else if (obj.event === 'enabled') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
@@ -134,7 +135,7 @@
if (r) {
common.submitForm({
url: "/SystemOrganize/User/EnabledAccount",
- param: { keyValue: user.data.F_Id },
+ param: { keyValue: id },
close: false,
success: function () {
common.reload('data-search-btn');
@@ -144,13 +145,13 @@
});
}
else if (obj.event === 'edit') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "编辑用户",
- url: "/SystemOrganize/User/Form?keyValue=" + user.data.F_Id,
+ url: "/SystemOrganize/User/Form?keyValue=" + id,
width: "750px",
height: "550px",
//callBack: function (index) {
@@ -160,13 +161,13 @@
});
}
else if (obj.event === 'details') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "查看用户",
- url: "/SystemOrganize/User/Details?keyValue=" + user.data.F_Id,
+ url: "/SystemOrganize/User/Details?keyValue=" + id,
width: "750px",
height: "550px",
btn: []
@@ -177,13 +178,13 @@
});
}
else if (obj.event === 'revisepassword') {
- if (user == null) {
+ if (id == null) {
common.modalMsg("未选中数据", "warning");
return false;
}
common.modalOpen({
title: "重置密码",
- url: '/SystemOrganize/User/RevisePassword?keyValue=' + user.data.F_Id,
+ url: '/SystemOrganize/User/RevisePassword?keyValue=' + id,
width: "400px",
height: "300px",
//callBack: function (index) {
@@ -202,6 +203,64 @@
}
return false;
});
+ //toolrow监听事件
+ table.on('tool(currentTableFilter)', function (obj) {
+ var id = obj.data.F_Id;
+ if (obj.event === 'delete') {
+ common.deleteForm({
+ url: "/SystemOrganize/User/DeleteForm",
+ param: { keyValue: id },
+ success: function () {
+ common.reload('data-search-btn');
+ }
+ });
+ }
+ else if (obj.event === 'disabled') {
+ common.modalConfirm("注:您确定要【禁用】该项账户吗?", function (r) {
+ if (r) {
+ common.submitForm({
+ url: "/SystemOrganize/User/DisabledAccount",
+ param: { keyValue: id },
+ close: false,
+ success: function () {
+ common.reload('data-search-btn');
+ }
+ })
+ }
+ });
+ }
+ else if (obj.event === 'enabled') {
+ common.modalConfirm("注:您确定要【启用】该项账户吗?", function (r) {
+ if (r) {
+ common.submitForm({
+ url: "/SystemOrganize/User/EnabledAccount",
+ param: { keyValue: id },
+ close: false,
+ success: function () {
+ common.reload('data-search-btn');
+ }
+ })
+ }
+ });
+ }
+ else if (obj.event === 'edit') {
+ common.modalOpen({
+ title: "编辑用户",
+ url: "/SystemOrganize/User/Form?keyValue=" + id,
+ width: "750px",
+ height: "550px",
+ });
+ }
+ else if (obj.event === 'revisepassword') {
+ common.modalOpen({
+ title: "重置密码",
+ url: '/SystemOrganize/User/RevisePassword?keyValue=' + id,
+ width: "400px",
+ height: "300px",
+ });
+ }
+ return false;
+ });
});
@@ -228,15 +287,21 @@
-
+
diff --git a/WaterCloud.Web/Areas/SystemSecurity/Views/AppLog/Index.cshtml b/WaterCloud.Web/Areas/SystemSecurity/Views/AppLog/Index.cshtml
index 6a4d657faa13c2b7f41e0445a56159fe61ed15b2..a75e34cee461d6adb899b074d2f2db174f9165e9 100644
--- a/WaterCloud.Web/Areas/SystemSecurity/Views/AppLog/Index.cshtml
+++ b/WaterCloud.Web/Areas/SystemSecurity/Views/AppLog/Index.cshtml
@@ -43,9 +43,12 @@
+
@@ -60,6 +63,7 @@
//加载数据
wcLoading.close();
//权限控制(js是值传递)
+ currentTableBar.innerHTML = common.authorizeButtonNew(currentTableBar.innerHTML);
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
commonTable.rendertable({
elem: '#currentTableId',
@@ -67,7 +71,9 @@
url: '/SystemSecurity/AppLog/GetGridJson',
sqlkey: 'FileName',//数据库主键
cols: [[
+ { type: "radio", width: 50 },
{ field: 'FileName', title: '文件名称', minWidth: 100, sort: true },
+ { title: '操作', width: 90, toolbar: '#currentTableBar', align: "center" }
]]
});
//select验证
@@ -96,23 +102,22 @@
});
return false;
});
- var entity;
- table.on('row(currentTableFilter)', function (obj) {
- obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
- entity = obj;
- });
+ //行点击事件监听,控制按钮显示
+ var oneList = ["NF-details"];//选择1条显示
+ commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
/**
* toolbar监听事件
*/
table.on('toolbar(currentTableFilter)', function (obj) {
+ var data = table.checkStatus('currentTableId').data;
if (obj.event === 'details') { // 监听删除操作
- if (entity == null) {
+ if (data.length == 0) {
common.modalMsg("未选中数据", "warning");
return false;
}
var html = "";
//高度宽度超出就适应屏幕
- var _width = document.body.clientWidth >500 ? '500px' : document.body.clientWidth - 20 + 'px';
+ var _width = document.body.clientWidth > 500 ? '500px' : document.body.clientWidth - 20 + 'px';
var _height = document.body.clientHeight > 500 ? '500px' : document.body.clientHeight - 20 + 'px';
if (common.currentWindow()) {
_width = common.currentWindow().document.body.clientWidth > 500 ? '500px' : common.currentWindow().document.body.clientWidth - 20 + 'px';
@@ -121,7 +126,7 @@
common.ajax({
url: "/SystemSecurity/AppLog/GetFormJson",
dataType: "json",
- data: { keyValue: entity.data.FileName },
+ data: { keyValue: data[0].FileName },
async: false,
success: function (data) {
html = "