mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
完成用户列表/资源列表改造
This commit is contained in:
parent
62f3885380
commit
43c44d30af
@ -39,9 +39,9 @@ namespace OpenAuth.App
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Delete(Guid id)
|
public void Delete(Guid[] ids)
|
||||||
{
|
{
|
||||||
_resManagerService.Delete(id);
|
_resManagerService.Delete(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddOrUpdate(Resource model)
|
public void AddOrUpdate(Resource model)
|
||||||
|
@ -47,17 +47,17 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
if (pageindex < 1) pageindex = 1; //TODO:如果列表为空新增加一个用户后,前端会传一个0过来,奇怪??
|
if (pageindex < 1) pageindex = 1; //TODO:如果列表为空新增加一个用户后,前端会传一个0过来,奇怪??
|
||||||
IEnumerable<User> users;
|
IEnumerable<User> users;
|
||||||
int total = 0;
|
int records = 0;
|
||||||
if (orgId ==Guid.Empty)
|
if (orgId ==Guid.Empty)
|
||||||
{
|
{
|
||||||
users = _repository.LoadUsers(pageindex, pagesize);
|
users = _repository.LoadUsers(pageindex, pagesize);
|
||||||
total = _repository.GetCount();
|
records = _repository.GetCount();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var ids = GetSubOrgIds(orgId);
|
var ids = GetSubOrgIds(orgId);
|
||||||
users = _repository.LoadInOrgs(pageindex, pagesize, ids);
|
users = _repository.LoadInOrgs(pageindex, pagesize, ids);
|
||||||
total = _repository.GetUserCntInOrgs(ids);
|
records = _repository.GetUserCntInOrgs(ids);
|
||||||
}
|
}
|
||||||
var userviews = new List<UserView>();
|
var userviews = new List<UserView>();
|
||||||
foreach (var user in users)
|
foreach (var user in users)
|
||||||
@ -71,7 +71,8 @@ namespace OpenAuth.App
|
|||||||
|
|
||||||
return new GridData
|
return new GridData
|
||||||
{
|
{
|
||||||
total = total,
|
records = records,
|
||||||
|
total = (int)Math.Ceiling((double)records / pagesize),
|
||||||
rows = userviews,
|
rows = userviews,
|
||||||
page = pageindex
|
page = pageindex
|
||||||
};
|
};
|
||||||
@ -103,12 +104,12 @@ namespace OpenAuth.App
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Delete(Guid id)
|
public void Delete(Guid[] ids)
|
||||||
{
|
{
|
||||||
_repository.Delete(u => u.Id == id);
|
_repository.Delete(u => ids.Contains(u.Id));
|
||||||
_relevanceRepository.DeleteBy("UserOrg", id);
|
_relevanceRepository.DeleteBy("UserOrg", ids);
|
||||||
_relevanceRepository.DeleteBy("UserModule", id);
|
_relevanceRepository.DeleteBy("UserModule", ids);
|
||||||
_relevanceRepository.DeleteBy("UserRole", id);
|
_relevanceRepository.DeleteBy("UserRole", ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddOrUpdate(UserView view)
|
public void AddOrUpdate(UserView view)
|
||||||
|
@ -94,9 +94,9 @@ namespace OpenAuth.Domain.Service
|
|||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Delete(Guid id)
|
public void Delete(Guid[] ids)
|
||||||
{
|
{
|
||||||
_repository.Delete(id);
|
_repository.Delete(u =>ids.Contains(u.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddOrUpdate(Resource resource)
|
public void AddOrUpdate(Resource resource)
|
||||||
|
@ -134,11 +134,11 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
$.post('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(this).alertmsg('warn', data.message);
|
$(this).alertmsg('warn', data.Message);
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
}
|
}
|
||||||
|
@ -264,12 +264,12 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
ztree.reload();
|
ztree.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(this).alertmsg('warn', data.message);
|
$(this).alertmsg('warn', data.Message);
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
}
|
}
|
||||||
|
@ -210,9 +210,11 @@ var editDlg = function () {
|
|||||||
add: function () { //弹出添加
|
add: function () { //弹出添加
|
||||||
update = false;
|
update = false;
|
||||||
show();
|
show();
|
||||||
vm.$set('$data', null);
|
vm.$set('$data',
|
||||||
vm.$set('Id', '00000000-0000-0000-0000-000000000000');
|
{
|
||||||
vm.$set('SortNo', 0);
|
Id: '00000000-0000-0000-0000-000000000000',
|
||||||
|
SortNo: 0
|
||||||
|
});
|
||||||
},
|
},
|
||||||
update: function (ret) { //弹出编辑框
|
update: function (ret) { //弹出编辑框
|
||||||
update = true;
|
update = true;
|
||||||
|
@ -39,11 +39,11 @@ $(function () {
|
|||||||
.on("click", function () { //执行命令
|
.on("click", function () { //执行命令
|
||||||
$.post("/CommonApplies/ExeCmd?id=" +$("#processId").val() +"&cmd=" +$(this).val() ,
|
$.post("/CommonApplies/ExeCmd?id=" +$("#processId").val() +"&cmd=" +$(this).val() ,
|
||||||
function (data) {
|
function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
BJUI.dialog('refresh', 'detailDlg');
|
BJUI.dialog('refresh', 'detailDlg');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(this).alertmsg('warn', data.message);
|
$(this).alertmsg('warn', data.Message);
|
||||||
}
|
}
|
||||||
},'json');
|
},'json');
|
||||||
});
|
});
|
||||||
|
@ -1,71 +1,10 @@
|
|||||||
|
$(function () {
|
||||||
//grid列表模块
|
$("#ParentName").on("click", function () {
|
||||||
function MainGrid() {
|
parent.reload();
|
||||||
var url = '/ResourceManager/Load?categoryId=';
|
|
||||||
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
|
||||||
this.maingrid = $('#maingrid').datagrid({
|
|
||||||
showToolbar: false,
|
|
||||||
filterThead: false,
|
|
||||||
loadType: 'GET',
|
|
||||||
target: $(this),
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
name: 'Id',
|
|
||||||
label: '资源表ID',
|
|
||||||
width: 100
|
|
||||||
, hide: true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: 'Key',
|
|
||||||
label: 'Key',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Name',
|
|
||||||
label: '名称',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: 'Status',
|
|
||||||
label: '当前状态',
|
|
||||||
width: 100
|
|
||||||
, align: 'center',
|
|
||||||
items: [{ '0': '默认' }, { '1': '状态1' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'SortNo',
|
|
||||||
label: '排序号',
|
|
||||||
width: 100
|
|
||||||
, align: 'center',
|
|
||||||
items: [{ '0': '默认' }, { '1': '状态1' }],
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: 'Description',
|
|
||||||
label: '描述',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
],
|
|
||||||
dataUrl: url + selectedId,
|
|
||||||
fullGrid: true,
|
|
||||||
showLinenumber: true,
|
|
||||||
showCheckboxcol: true,
|
|
||||||
paging: true,
|
|
||||||
filterMult: false,
|
|
||||||
showTfoot: false,
|
|
||||||
|
|
||||||
});
|
});
|
||||||
this.reload = function (id) {
|
});
|
||||||
if (id != undefined) selectedId = id;
|
|
||||||
this.maingrid.datagrid('reload', { dataUrl: url + selectedId });
|
|
||||||
};
|
|
||||||
};
|
|
||||||
MainGrid.prototype = new Grid();
|
|
||||||
var list = new MainGrid();
|
|
||||||
|
|
||||||
//左边分类导航树
|
//左边导航
|
||||||
var ztree = function () {
|
var ztree = function () {
|
||||||
var url = '/CategoryManager/LoadForTree';
|
var url = '/CategoryManager/LoadForTree';
|
||||||
var setting = {
|
var setting = {
|
||||||
@ -82,38 +21,106 @@ var ztree = function () {
|
|||||||
rootPId: 'null'
|
rootPId: 'null'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
callback: { onClick: zTreeOnClick }
|
callback: {
|
||||||
|
onClick: function (event, treeId, treeNode) {
|
||||||
|
list.reload(treeNode.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
$.getJSON(url, function (json) {
|
var load = function () {
|
||||||
$.fn.zTree.init($("#tree"), setting, json).expandAll(true);
|
$.getJSON(url, function (json) {
|
||||||
});
|
var zTreeObj = $.fn.zTree.init($("#orgtree"), setting, json);
|
||||||
function zTreeOnClick(event, treeId, treeNode) {
|
list.reload();
|
||||||
list.reload(treeNode.Id);
|
zTreeObj.expandAll(true);
|
||||||
}
|
});
|
||||||
|
};
|
||||||
|
load();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
reload: function () {
|
reload: load
|
||||||
$.getJSON(url, function (json) {
|
|
||||||
$.fn.zTree.init($("#tree"), setting, json).expandAll(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
//编辑时,选择上级弹出的树
|
//grid列表模块
|
||||||
var parentTree = function () {
|
function MainGrid() {
|
||||||
var nameDom = "#CategoryName";
|
var url = '/ResourceManager/Load?categoryId=';
|
||||||
var idDom = "#CategoryId";
|
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||||
|
this.maingrid = $('#maingrid')
|
||||||
|
.jqGrid({
|
||||||
|
colModel: [
|
||||||
|
{
|
||||||
|
name: 'Id',
|
||||||
|
index: 'Id',
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 'Key',
|
||||||
|
name: 'Key',
|
||||||
|
label: '资源标识'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 'Name',
|
||||||
|
name: 'Name',
|
||||||
|
label: '分类名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 'CategoryName',
|
||||||
|
name: 'CategoryName',
|
||||||
|
label: '所属分类'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 'CategoryId',
|
||||||
|
name: 'CategoryId',
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
index: 'SortNo',
|
||||||
|
name: 'SortNo',
|
||||||
|
label: '排序号'
|
||||||
|
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: url + selectedId,
|
||||||
|
datatype: "json",
|
||||||
|
|
||||||
|
viewrecords: true,
|
||||||
|
rowNum: 18,
|
||||||
|
pager: "#grid-pager",
|
||||||
|
altRows: true,
|
||||||
|
height: 'auto',
|
||||||
|
multiselect: true,
|
||||||
|
multiboxonly: true,
|
||||||
|
|
||||||
|
loadComplete: function () {
|
||||||
|
var table = this;
|
||||||
|
setTimeout(function () {
|
||||||
|
updatePagerIcons(table);
|
||||||
|
},
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
}).jqGrid('navGrid', "#grid-pager", {
|
||||||
|
edit: false, add: false, del: false, refresh: false, search: false
|
||||||
|
});
|
||||||
|
|
||||||
|
this.reload = function (id) {
|
||||||
|
if (id != undefined) selectedId = id;
|
||||||
|
this.maingrid.jqGrid("setGridParam", { url: url + selectedId })
|
||||||
|
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
MainGrid.prototype = new Grid();
|
||||||
|
var list = new MainGrid();
|
||||||
|
var vm = new Vue({
|
||||||
|
el: '#editDlg'
|
||||||
|
});
|
||||||
|
|
||||||
|
//上级机构选择框
|
||||||
|
var parent = function (name,id) { //ztree搜索框
|
||||||
var zTreeObj;
|
var zTreeObj;
|
||||||
var setting = {
|
var setting = {
|
||||||
view: {
|
view: { selectedMulti: false },
|
||||||
selectedMulti: false
|
|
||||||
},
|
|
||||||
check: {
|
|
||||||
enable: true,
|
|
||||||
chkStyle: "radio", //单选
|
|
||||||
radioType: "all"
|
|
||||||
},
|
|
||||||
data: {
|
data: {
|
||||||
key: {
|
key: {
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
@ -127,106 +134,107 @@ var parentTree = function () {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
callback: {
|
callback: {
|
||||||
onClick: zTreeOnClick,
|
onClick: onClick
|
||||||
onCheck: zTreeCheck
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var showMenu = function () {
|
||||||
|
$("#menuContent").css({ left: "10px", top: $("#"+name).outerHeight() + "px" }).slideDown("fast");
|
||||||
|
$("body").bind("mousedown", onBodyDown);
|
||||||
|
};
|
||||||
|
function onClick(e, treeId, treeNode) {
|
||||||
|
var nodes = zTreeObj.getSelectedNodes();
|
||||||
|
|
||||||
function zTreeCheck(event, treeId, treeNode) {
|
for (var i = 0, l = nodes.length; i < l; i++) {
|
||||||
var nodes = zTreeObj.getCheckedNodes(true);
|
vm.$set(name, nodes[i].Name);
|
||||||
var ids = nodes.map(function (e) { return e.Id; }).join(",");
|
vm.$set(id, nodes[i].Id);
|
||||||
var names = nodes.map(function (e) { return e.Name; }).join(",");
|
break;
|
||||||
|
}
|
||||||
$(nameDom).val(names);
|
hideMenu();
|
||||||
$(idDom).val(ids);
|
|
||||||
}
|
}
|
||||||
function zTreeOnClick(event, treeId, treeNode) {
|
function onBodyDown(event) {
|
||||||
zTreeObj.checkNode(treeNode, !treeNode.checked, true, true);
|
if (!(event.target.id == "menuContent" || $(event.target).parents("#menuContent").length > 0)) {
|
||||||
event.preventDefault();
|
hideMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function hideMenu() {
|
||||||
|
$("#menuContent").fadeOut("fast");
|
||||||
|
$("body").unbind("mousedown", onBodyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
show: function () {
|
reload: function () {
|
||||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
var index = layer.load();
|
||||||
zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
$.getJSON("/CategoryManager/LoadForTree", {
|
||||||
var orgstr = $(idDom).val();
|
page: 1, rows: 10000
|
||||||
var name = '';
|
}, function (json) {
|
||||||
if (orgstr != '') {
|
layer.close(index);
|
||||||
var nodeIds = orgstr.split(',');
|
if (json.length == 0) {
|
||||||
$.each(nodeIds, function () {
|
vm.$set(name, '');
|
||||||
var node = zTreeObj.getNodeByParam("Id", this, null);
|
vm.$set(id, '');
|
||||||
name += ',' + node.Name;
|
return;
|
||||||
zTreeObj.checkNode(node, true, true);
|
|
||||||
});
|
|
||||||
$(nameDom).val(name.substr(1)); //显示名称
|
|
||||||
}
|
}
|
||||||
|
zTreeObj = $.fn.zTree.init($("#org"), setting, json);
|
||||||
zTreeObj.expandAll(true);
|
zTreeObj.expandAll(true);
|
||||||
|
showMenu();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}();
|
}("CategoryName","CategoryId");
|
||||||
|
|
||||||
//添加(编辑)对话框
|
//添加(编辑)对话框
|
||||||
var editDlg = function () {
|
var editDlg = function () {
|
||||||
var update = false;
|
var update = false;
|
||||||
var show = function () {
|
var show = function () {
|
||||||
BJUI.dialog({ id: 'editDlg', title: '编辑对话框', target: '#editDlg' });
|
layer.open({
|
||||||
$("#btnSave").on("click", function () {
|
type: 1,
|
||||||
editDlg.save();
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
title: "用户管理", //不显示标题
|
||||||
|
area: ['400px', '300px'], //宽高
|
||||||
|
content: $('#editDlg'), //捕获的元素
|
||||||
|
btn: ['保存', '关闭'],
|
||||||
|
yes: function (index, layero) {
|
||||||
|
$.post("/CategoryManager/Add", vm.$data, function (data) {
|
||||||
|
layer.msg(data.Message);
|
||||||
|
if (data.Status) {
|
||||||
|
list.reload();
|
||||||
|
ztree.reload();
|
||||||
|
}
|
||||||
|
}, "json");
|
||||||
|
},
|
||||||
|
cancel: function (index) {
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: function () { //弹出添加
|
add: function () { //弹出添加
|
||||||
update = false;
|
update = false;
|
||||||
show();
|
show();
|
||||||
$.CurrentDialog.find("form")[0].reset(); //reset方法只能通过dom调用
|
vm.$set('$data', {
|
||||||
$("#Id").val('00000000-0000-0000-0000-000000000000');
|
Id: '00000000-0000-0000-0000-000000000000',
|
||||||
|
SortNo: 0
|
||||||
parentTree.show();
|
});
|
||||||
},
|
},
|
||||||
update: function (ret) { //弹出编辑框
|
update: function (ret) { //弹出编辑框
|
||||||
update = true;
|
update = true;
|
||||||
show();
|
show();
|
||||||
$('#Id').val(ret.Id);
|
vm.$set('$data', ret);
|
||||||
$('#Key').val(ret.Key);
|
|
||||||
$('#Name').val(ret.Name);
|
|
||||||
$('#Status').selectpicker('val', ret.Status);
|
|
||||||
$('#SortNo').val(ret.SortNo);
|
|
||||||
$('#CategoryId').val(ret.CategoryId);
|
|
||||||
$('#Description').val(ret.Description);
|
|
||||||
parentTree.show();
|
|
||||||
},
|
|
||||||
save: function () { //编辑-->保存
|
|
||||||
$('#editForm').isValid(function (v) {
|
|
||||||
if (!v) return; //验证没通过
|
|
||||||
$("#editForm").bjuiajax('ajaxForm', {
|
|
||||||
reload: false,
|
|
||||||
callback: function (json) {
|
|
||||||
if (json.statusCode != "200") {
|
|
||||||
$(this).alertmsg('warn', json.message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
list.reload();
|
|
||||||
ztree.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
function del() {
|
function del() {
|
||||||
var selected = list.getSelectedObj();
|
var selected = list.getSelectedProperties("Id");
|
||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/ResourceManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/ResourceManager/Delete',
|
||||||
if (data.statusCode == "200") {
|
{ ids: selected }, function (data) {
|
||||||
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
ztree.reload();
|
ztree.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(this).alertmsg('warn', data.message);
|
$(this).alertmsg('warn', data.Message);
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
orgtree.reload();
|
orgtree.reload();
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
ztree.reload();
|
ztree.reload();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
//左边分类导航树
|
$(function () {
|
||||||
var maintree = function () {
|
$("#Organizations").on("click", function () {
|
||||||
|
parent.reload();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//左边导航
|
||||||
|
var ztree = function () {
|
||||||
var url = '/OrgManager/LoadOrg';
|
var url = '/OrgManager/LoadOrg';
|
||||||
var setting = {
|
var setting = {
|
||||||
view: { selectedMulti: false },
|
view: { selectedMulti: false },
|
||||||
@ -24,13 +30,7 @@ var maintree = function () {
|
|||||||
var load = function () {
|
var load = function () {
|
||||||
$.getJSON(url, function (json) {
|
$.getJSON(url, function (json) {
|
||||||
var zTreeObj = $.fn.zTree.init($("#orgtree"), setting, json);
|
var zTreeObj = $.fn.zTree.init($("#orgtree"), setting, json);
|
||||||
var firstId; //tree的第一个ID
|
list.reload();
|
||||||
if (json.length > 0) {
|
|
||||||
firstId = json[0].Id;
|
|
||||||
} else {
|
|
||||||
firstId = -1;
|
|
||||||
}
|
|
||||||
list.reload(firstId);
|
|
||||||
zTreeObj.expandAll(true);
|
zTreeObj.expandAll(true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -44,79 +44,83 @@ var maintree = function () {
|
|||||||
//grid列表模块
|
//grid列表模块
|
||||||
function MainGrid() {
|
function MainGrid() {
|
||||||
var url = '/UserManager/Load?orgId=';
|
var url = '/UserManager/Load?orgId=';
|
||||||
var selectedId ='00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||||
this.maingrid = $('#maingrid').datagrid({
|
this.maingrid = $('#maingrid')
|
||||||
showToolbar: false,
|
.jqGrid({
|
||||||
filterThead: false,
|
colModel: [
|
||||||
target: $(this),
|
{
|
||||||
loadType: 'GET',
|
name: 'Id',
|
||||||
columns: [
|
index: 'Id',
|
||||||
{
|
hidden: true
|
||||||
name: 'Id',
|
},
|
||||||
label: 'Id',
|
{
|
||||||
width: 100
|
index: 'Name',
|
||||||
, hide: true
|
name: 'Name',
|
||||||
},
|
label: '姓名'
|
||||||
{
|
},
|
||||||
name: 'Account',
|
{
|
||||||
label: '账号',
|
index: 'Account',
|
||||||
width: 100
|
name: 'Account',
|
||||||
},
|
label: '账号'
|
||||||
{
|
},
|
||||||
name: 'Name',
|
{
|
||||||
label: '名称',
|
index: 'Sex',
|
||||||
width: 100
|
name: 'Sex',
|
||||||
},
|
label: '性别'
|
||||||
{
|
|
||||||
name: 'Sex',
|
|
||||||
label: '性别',
|
|
||||||
width: 100
|
|
||||||
, align: 'center',
|
|
||||||
items: [{ '0': '男' }, { '1': '女' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Status',
|
|
||||||
label: '状态',
|
|
||||||
width: 100
|
|
||||||
, align: 'center',
|
|
||||||
items: [{ '0': '默认' }, { '1': '状态1' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Type',
|
|
||||||
label: '用户类型',
|
|
||||||
width: 100
|
|
||||||
, align: 'center',
|
|
||||||
items: [{ '0': '默认' }, { '1': '类型' }],
|
|
||||||
}
|
|
||||||
|
|
||||||
],
|
},
|
||||||
dataUrl: url + selectedId, //todo:这里如果配置data:[]的话,不会自动加载,但在分页的下拉中会有undefined
|
{
|
||||||
fullGrid: true,
|
index: 'OrganizationIds',
|
||||||
showLinenumber: true,
|
name: 'OrganizationIds',
|
||||||
showCheckboxcol: true,
|
hidden:true
|
||||||
paging: true,
|
},
|
||||||
filterMult: false,
|
{
|
||||||
showTfoot: false,
|
index: 'Organizations',
|
||||||
|
name: 'Organizations',
|
||||||
|
label: '所属机构'
|
||||||
|
|
||||||
});
|
}
|
||||||
|
],
|
||||||
|
url: url + selectedId,
|
||||||
|
datatype: "json",
|
||||||
|
|
||||||
|
viewrecords: true,
|
||||||
|
rowNum: 18,
|
||||||
|
pager: "#grid-pager",
|
||||||
|
altRows: true,
|
||||||
|
height: 'auto',
|
||||||
|
multiselect: true,
|
||||||
|
multiboxonly: true,
|
||||||
|
|
||||||
|
loadComplete: function () {
|
||||||
|
var table = this;
|
||||||
|
setTimeout(function () {
|
||||||
|
updatePagerIcons(table);
|
||||||
|
},
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
}).jqGrid('navGrid', "#grid-pager", {
|
||||||
|
edit: false, add: false, del: false, refresh: false, search: false
|
||||||
|
});
|
||||||
|
|
||||||
this.reload = function (id) {
|
this.reload = function (id) {
|
||||||
if (id != undefined) selectedId = id;
|
if (id != undefined) selectedId = id;
|
||||||
this.maingrid.datagrid('reload', { dataUrl: url + selectedId });
|
this.maingrid.jqGrid("setGridParam", { url: url + selectedId })
|
||||||
|
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
MainGrid.prototype = new Grid();
|
MainGrid.prototype = new Grid();
|
||||||
var list = new MainGrid();
|
var list = new MainGrid();
|
||||||
|
var vm = new Vue({
|
||||||
|
el: '#editDlg'
|
||||||
|
});
|
||||||
|
|
||||||
//编辑时,选择上级弹出的树
|
//上级机构选择框
|
||||||
var parentTree = function () {
|
var parent = function () { //ztree搜索框
|
||||||
var nameDom = "#Organizations";
|
|
||||||
var idDom = "#OrganizationIds";
|
|
||||||
var zTreeObj;
|
var zTreeObj;
|
||||||
var setting = {
|
var setting = {
|
||||||
view: {
|
view: { selectedMulti: true },
|
||||||
selectedMulti: false
|
|
||||||
},
|
|
||||||
check: {
|
check: {
|
||||||
enable: true,
|
enable: true,
|
||||||
chkStyle: "checkbox",
|
chkStyle: "checkbox",
|
||||||
@ -135,113 +139,127 @@ var parentTree = function () {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
callback: {
|
callback: {
|
||||||
onClick: zTreeOnClick,
|
onClick: onClick,
|
||||||
onCheck: zTreeCheck
|
onCheck: onCheck
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var showMenu = function () {
|
||||||
|
$("#menuContent").css({ left: "10px", top: $("#Organizations").outerHeight() + "px" }).slideDown("fast");
|
||||||
|
$("body").bind("mousedown", onBodyDown);
|
||||||
|
};
|
||||||
|
function onClick(e, treeId, treeNode) {
|
||||||
|
var nodes = zTreeObj.getSelectedNodes();
|
||||||
|
|
||||||
|
for (var i = 0, l = nodes.length; i < l; i++) {
|
||||||
|
vm.$set('Organizations', nodes[i].Name);
|
||||||
|
vm.$set('OrganizationIds', nodes[i].Id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
hideMenu();
|
||||||
|
}
|
||||||
|
|
||||||
function zTreeCheck(event, treeId, treeNode) {
|
function onCheck(e, treeId, treeNode) {
|
||||||
var nodes = zTreeObj.getCheckedNodes(true);
|
var nodes = zTreeObj.getCheckedNodes(true);
|
||||||
|
|
||||||
var ids = nodes.map(function (e) { return e.Id; }).join(",");
|
var ids = nodes.map(function (e) { return e.Id; }).join(",");
|
||||||
var names = nodes.map(function (e) { return e.Name; }).join(",");
|
var names = nodes.map(function (e) { return e.Name; }).join(",");
|
||||||
|
|
||||||
$(nameDom).val(names);
|
vm.$set('Organizations', names);
|
||||||
$(idDom).val(ids);
|
vm.$set('OrganizationIds', ids);
|
||||||
}
|
}
|
||||||
function zTreeOnClick(event, treeId, treeNode) {
|
function onBodyDown(event) {
|
||||||
zTreeObj.checkNode(treeNode, !treeNode.checked, true, true);
|
if (!(event.target.id == "menuContent" || $(event.target).parents("#menuContent").length > 0)) {
|
||||||
event.preventDefault();
|
hideMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function hideMenu() {
|
||||||
|
$("#menuContent").fadeOut("fast");
|
||||||
|
$("body").unbind("mousedown", onBodyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
show: function () {
|
reload: function () {
|
||||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
var index = layer.load();
|
||||||
zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
$.getJSON("/OrgManager/LoadOrg", {
|
||||||
var orgstr = $(idDom).val();
|
page: 1, rows: 10000
|
||||||
var name = '';
|
}, function (json) {
|
||||||
if (orgstr != '') {
|
layer.close(index);
|
||||||
var nodeIds = orgstr.split(',');
|
if (json.length == 0) {
|
||||||
$.each(nodeIds, function () {
|
vm.$set('Organizations', '');
|
||||||
var node = zTreeObj.getNodeByParam("Id", this, null);
|
vm.$set('OrganizationIds', '');
|
||||||
name += ',' + node.Name;
|
return;
|
||||||
zTreeObj.checkNode(node, true, true);
|
|
||||||
});
|
|
||||||
$(nameDom).val(name.substr(1)); //显示名称
|
|
||||||
}
|
}
|
||||||
|
zTreeObj = $.fn.zTree.init($("#org"), setting, json);
|
||||||
zTreeObj.expandAll(true);
|
zTreeObj.expandAll(true);
|
||||||
|
showMenu();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
//添加(编辑)对话框
|
//添加(编辑)对话框
|
||||||
var editDlg = function () {
|
var editDlg = function () {
|
||||||
var update = false;
|
var update = false;
|
||||||
var show = function () {
|
var show = function () {
|
||||||
BJUI.dialog({ id: 'editDlg', title: '编辑对话框', target: '#editDlg' });
|
layer.open({
|
||||||
$("#btnSave").on("click", function () {
|
type: 1,
|
||||||
editDlg.save();
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
title: "用户管理", //不显示标题
|
||||||
|
area: ['400px', '300px'], //宽高
|
||||||
|
content: $('#editDlg'), //捕获的元素
|
||||||
|
btn: ['保存', '关闭'],
|
||||||
|
yes: function (index, layero) {
|
||||||
|
$.post("/UserManager/Add", vm.$data, function (data) {
|
||||||
|
layer.msg(data.Message);
|
||||||
|
if (data.Status) {
|
||||||
|
list.reload();
|
||||||
|
ztree.reload();
|
||||||
|
}
|
||||||
|
}, "json");
|
||||||
|
},
|
||||||
|
cancel: function (index) {
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: function () { //弹出添加
|
add: function () { //弹出添加
|
||||||
update = false;
|
update = false;
|
||||||
show();
|
show();
|
||||||
$.CurrentDialog.find("form")[0].reset(); //reset方法只能通过dom调用
|
vm.$set('$data',
|
||||||
$("#Id").val('00000000-0000-0000-0000-000000000000');
|
{
|
||||||
parentTree.show();
|
Id:'00000000-0000-0000-0000-000000000000',
|
||||||
|
Sex:0
|
||||||
|
});
|
||||||
},
|
},
|
||||||
update: function (ret) { //弹出编辑框
|
update: function (ret) { //弹出编辑框
|
||||||
update = true;
|
update = true;
|
||||||
show();
|
show();
|
||||||
$('#Id').val(ret.Id);
|
vm.$set('$data', ret);
|
||||||
$('#Account').val(ret.Account);
|
|
||||||
$('#Name').val(ret.Name);
|
|
||||||
$('#Sex').selectpicker('val', ret.Sex);
|
|
||||||
$('#Status').selectpicker('val', ret.Status);
|
|
||||||
$('#Type').selectpicker('val', ret.Type);
|
|
||||||
$("#OrganizationIds").val(ret.OrganizationIds);
|
|
||||||
parentTree.show();
|
|
||||||
},
|
|
||||||
save: function () { //编辑-->保存
|
|
||||||
$('#editForm').isValid(function (v) {
|
|
||||||
if (!v) return; //验证没通过
|
|
||||||
$("#editForm").bjuiajax('ajaxForm', {
|
|
||||||
reload: false,
|
|
||||||
callback: function (json) {
|
|
||||||
if (json.statusCode != "200") {
|
|
||||||
$(this).alertmsg('warn', json.message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
list.reload();
|
|
||||||
maintree.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
function del() {
|
function del() {
|
||||||
var selected = list.getSelectedObj();
|
var selected = list.getSelectedProperties("Id");
|
||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/UserManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/UserManager/Delete',
|
||||||
if (data.statusCode == "200") {
|
{ ids: selected },
|
||||||
|
function (data) {
|
||||||
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
maintree.reload();
|
ztree.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(this).alertmsg('warn', data.message);
|
layer.msg(data.Message);
|
||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//自定义的编辑按钮
|
//自定义的编辑按钮
|
||||||
function edit() {
|
function edit() {
|
||||||
var selected = list.getSelectedObj();
|
var selected = list.getSelectedObj();
|
||||||
@ -330,5 +348,3 @@ function openAssignUserElement(obj) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//@@ sourceURL=UserManager.js
|
|
@ -35,7 +35,7 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
ztree.reload();
|
ztree.reload();
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ function del() {
|
|||||||
if (selected == null) return;
|
if (selected == null) return;
|
||||||
|
|
||||||
$.post('/WorkflowSchemas/Del?code=' +selected.Code, function (data) {
|
$.post('/WorkflowSchemas/Del?code=' +selected.Code, function (data) {
|
||||||
if (data.statusCode == "200") {
|
if (data.Status) {
|
||||||
list.reload();
|
list.reload();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -56,11 +56,12 @@ namespace OpenAuth.Mvc.Controllers
|
|||||||
return JsonHelper.Instance.Serialize(models);
|
return JsonHelper.Instance.Serialize(models);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Delete(Guid Id)
|
[HttpPost]
|
||||||
|
public string Delete(Guid[] ids)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_app.Delete(Id);
|
_app.Delete(ids);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -50,15 +50,12 @@ namespace OpenAuth.Mvc.Controllers
|
|||||||
return JsonHelper.Instance.Serialize(_app.Load(orgId, pageCurrent, pageSize));
|
return JsonHelper.Instance.Serialize(_app.Load(orgId, pageCurrent, pageSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Delete(Guid Id)
|
[HttpPost]
|
||||||
|
public string Delete(Guid[] ids)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_app.Delete(Id);
|
_app.Delete(ids);
|
||||||
//foreach (var obj in Id.Split(','))
|
|
||||||
//{
|
|
||||||
// _app.Delete(int.Parse(obj));
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1,85 +1,95 @@
|
|||||||
@{
|
@{
|
||||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
}
|
}
|
||||||
|
<!-- #section:basics/content.breadcrumbs -->
|
||||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
<div class="breadcrumbs" id="breadcrumbs">
|
||||||
<div class="bjui-pageContent tableContent" style="position: relative">
|
<ul class="breadcrumb">
|
||||||
<div class="clearfix">
|
<li>
|
||||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
<i class="ace-icon fa fa-home home-icon"></i>
|
||||||
<ul id="tree" class="ztree"></ul>
|
<a href="#">资源管理</a>
|
||||||
</div>
|
</li>
|
||||||
|
<li class="active">列表</li>
|
||||||
<div id="detail" style="margin-left: 225px;">
|
</ul><!-- /.breadcrumb -->
|
||||||
<table id="maingrid" class="table table-bordered"></table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- /section:basics/content.breadcrumbs -->
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="widget-box widget-color-blue">
|
||||||
|
<div class="widget-header">
|
||||||
|
</div>
|
||||||
|
<div class="widget-body">
|
||||||
|
<div class="widget-main">
|
||||||
|
<ul id="orgtree" class="ztree" style="width: 100%"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="widget-box widget-color-blue">
|
||||||
|
<div class="widget-header">
|
||||||
|
@Html.Action("MenuHeader", "Home")
|
||||||
|
</div>
|
||||||
|
<div class="widget-body gridwidth">
|
||||||
|
<div class="widget-main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<table id="maingrid"></table>
|
||||||
|
<div id="grid-pager"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.page-content -->
|
||||||
|
|
||||||
<!--编辑对话框-->
|
<!--编辑对话框-->
|
||||||
<div class="bjui-dialog hidden bjui-dialog-container" id="editDlg" data-noinit="true">
|
<div id="editDlg" style="display: none">
|
||||||
<div class="bjui-pageContent">
|
<div class="col-xs-12">
|
||||||
<form action="/ResourceManager/Add" class="pageForm" data-toggle="validate" data-reload="false" id="editForm">
|
<form class="form-horizontal" id="editForm">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label no-padding-right" for=""> 资源标识 </label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" id="Key" check-type="required" v-model="Key"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="table table-condensed table-hover">
|
<div class="form-group">
|
||||||
<tbody>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 名称 </label>
|
||||||
<input type="text" id="Id" name="Id" value="" class="hidden" />
|
<div class="col-sm-9">
|
||||||
<tr>
|
<input type="text" id="Name" check-type="required" v-model="Name"/>
|
||||||
<td>
|
</div>
|
||||||
<label for="Key" class="control-label x120">资源标识:</label>
|
</div>
|
||||||
<input type="text" id="Key" name="Key" value="" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Name" class="control-label x120">名称:</label>
|
|
||||||
<input type="text" id="Name" name="Name" value="" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<div class="form-group">
|
||||||
<td>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 排序号 </label>
|
||||||
<label for="Status" class="control-label x120">当前状态:</label>
|
<div class="col-sm-9">
|
||||||
<select name="Status" id="Status" data-toggle="selectpicker" data-rule="required">
|
<input type="text" id="SortNo" check-type="required" v-model="SortNo"/>
|
||||||
<option value="0">默认</option>
|
</div>
|
||||||
<option value="1">状态1</option>
|
</div>
|
||||||
<option value="2">状态2</option>
|
|
||||||
</select>
|
<div class="form-group">
|
||||||
</td>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 资源分类</label>
|
||||||
</tr>
|
<div class="col-sm-9">
|
||||||
<tr>
|
<input id="CategoryName" type="text" v-model="CategoryName"/>
|
||||||
<td>
|
<input id="CategoryId" type="hidden" v-model="CategoryId"/>
|
||||||
<label for="SortNo" class="control-label x120">排序号:</label>
|
<div id="menuContent" class="menuContent" style="display: none;">
|
||||||
<input type="text" id="SortNo" name="SortNo" value=""/>
|
<ul id="org" class="ztree"></ul>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Description" class="control-label x120">描述:</label>
|
|
||||||
<input type="text" id="Description" name="Description" value="" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="CategoryName" class="control-label x120">所属分类:</label>
|
|
||||||
<input id="CategoryId" name="CategoryId" style="display: none" />
|
|
||||||
<input type="text" name="CategoryName" id="CategoryName"
|
|
||||||
data-toggle="selectztree" data-tree="#j_select_tree1">
|
|
||||||
<ul id="j_select_tree1" class="ztree hide" data-toggle="ztree"></ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="bjui-pageFooter">
|
|
||||||
<ul>
|
|
||||||
<li><button type="button" class="btn btn-close">关闭</button></li>
|
|
||||||
<li><button type="button" class="btn btn-primary" id="btnSave">保存</button></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="~/BllScripts/grid.js"></script>
|
<script src="~/BllScripts/grid.js"></script>
|
||||||
<script src="~/BllScripts/ResourceManager.js"></script>
|
<script src="~/BllScripts/ResourceManager.js"></script>
|
||||||
|
<script src="~/BllScripts/jqEvent.js"></script>
|
||||||
|
|
||||||
|
@ -1,88 +1,93 @@
|
|||||||
@{
|
@{
|
||||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
}
|
}
|
||||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
|
||||||
<div class="bjui-pageContent tableContent" style="position: relative">
|
|
||||||
<div class="clearfix">
|
|
||||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
|
||||||
<ul id="orgtree" class="ztree"></ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="detail" style="margin-left: 225px;">
|
<!-- #section:basics/content.breadcrumbs -->
|
||||||
<table id="maingrid" class="table table-bordered"></table>
|
<div class="breadcrumbs" id="breadcrumbs">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li>
|
||||||
|
<i class="ace-icon fa fa-home home-icon"></i>
|
||||||
|
<a href="#">机构管理</a>
|
||||||
|
</li>
|
||||||
|
<li class="active">列表</li>
|
||||||
|
</ul><!-- /.breadcrumb -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /section:basics/content.breadcrumbs -->
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="widget-box widget-color-blue">
|
||||||
|
<div class="widget-header">
|
||||||
|
</div>
|
||||||
|
<div class="widget-body">
|
||||||
|
<div class="widget-main">
|
||||||
|
<ul id="orgtree" class="ztree" style="width: 100%"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="widget-box widget-color-blue">
|
||||||
|
<div class="widget-header">
|
||||||
|
@Html.Action("MenuHeader", "Home")
|
||||||
|
</div>
|
||||||
|
<div class="widget-body gridwidth">
|
||||||
|
<div class="widget-main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<table id="maingrid"></table>
|
||||||
|
<div id="grid-pager"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- /.page-content -->
|
||||||
|
|
||||||
<!--编辑对话框-->
|
<!--编辑对话框-->
|
||||||
<div class="bjui-dialog hidden bjui-dialog-container" id="editDlg" data-noinit="true">
|
<div id="editDlg" style="display: none">
|
||||||
<div class="bjui-pageContent">
|
<div class="col-xs-12">
|
||||||
<form action="/UserManager/Add" class="pageForm" data-toggle="validate" data-reload="false" id="editForm">
|
<form class="form-horizontal" id="editForm">
|
||||||
|
|
||||||
<table class="table table-condensed table-hover">
|
<div class="form-group">
|
||||||
<tbody>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 账号 </label>
|
||||||
<input type="text" id="Id" name="Id" value="" class="hidden"/>
|
<div class="col-sm-9">
|
||||||
<tr>
|
<input type="text" id="Account" v-model="Account"/>
|
||||||
<td>
|
</div>
|
||||||
<label for="Account" class="control-label x120">账号:</label>
|
</div>
|
||||||
<input type="text" id="Account" name="Account" value="" />
|
|
||||||
</td>
|
<div class="form-group">
|
||||||
</tr>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 姓名 </label>
|
||||||
<tr>
|
<div class="col-sm-9">
|
||||||
<td>
|
<input type="text" id="Name" v-model="Name"/>
|
||||||
<label for="Name" class="control-label x120">姓名:</label>
|
</div>
|
||||||
<input type="text" id="Name" name="Name" value=""/>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class="form-group">
|
||||||
<tr>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 性别 </label>
|
||||||
<td>
|
<div class="col-sm-9">
|
||||||
<label for="Organizations" class="control-label x120">所属机构:</label>
|
<input type="text" id="Sex" v-model="Sex"/>
|
||||||
<input id="OrganizationIds" name="OrganizationIds" value="" style="display: none" />
|
</div>
|
||||||
<input type="text" name="Organizations" id="Organizations"
|
</div>
|
||||||
data-toggle="selectztree" data-tree="#j_select_tree1" >
|
<div class="form-group">
|
||||||
<ul id="j_select_tree1" class="ztree hide" data-toggle="ztree"></ul>
|
<label class="col-sm-3 control-label no-padding-right" for=""> 所属机构</label>
|
||||||
</td>
|
<div class="col-sm-9">
|
||||||
</tr>
|
<input id="Organizations" type="text" v-model="Organizations"/>
|
||||||
<tr>
|
<input id="OrganizationIds" type="hidden" v-model="OrganizationIds"/>
|
||||||
<td>
|
<div id="menuContent" class="menuContent" style="display: none;">
|
||||||
<label for="Sex" class="control-label x120">用户性别:</label>
|
<ul id="org" class="ztree"></ul>
|
||||||
<select name="Sex" id="Sex" data-toggle="selectpicker" data-rule="required">
|
</div>
|
||||||
<option value="0">男</option>
|
</div>
|
||||||
<option value="1">女</option>
|
</div>
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Status" class="control-label x120">用户状态:</label>
|
|
||||||
<select name="Status" id="Status" data-toggle="selectpicker" data-rule="required">
|
|
||||||
<option value="0">默认</option>
|
|
||||||
<option value="1">状态1</option>
|
|
||||||
<option value="2">状态2</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Type" class="control-label x120">用户类型:</label>
|
|
||||||
<select name="Type" id="Type" data-toggle="selectpicker" data-rule="required">
|
|
||||||
<option value="0">默认</option>
|
|
||||||
<option value="1">状态1</option>
|
|
||||||
<option value="2">状态2</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="bjui-pageFooter">
|
|
||||||
<ul>
|
|
||||||
<li><button type="button" class="btn btn-close">关闭</button></li>
|
|
||||||
<li><button type="button" class="btn btn-primary" id="btnSave">保存</button></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<script src="~/Content/plugins/zTree/js/jquery.ztree.excheck.js"></script>
|
||||||
<script src="~/BllScripts/grid.js"></script>
|
<script src="~/BllScripts/grid.js"></script>
|
||||||
<script src="~/BllScripts/UserManager.js"></script>
|
<script src="~/BllScripts/UserManager.js"></script>
|
||||||
|
<script src="~/BllScripts/jqEvent.js"></script>
|
Loading…
Reference in New Issue
Block a user