mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
优化列表显示
This commit is contained in:
parent
d6a018a8b7
commit
4bfdfba503
@ -34,8 +34,6 @@ namespace OpenAuth.Mvc.Controllers
|
||||
};
|
||||
Response.Cookies.Add(cookie);
|
||||
resp.Result = "/home/index";
|
||||
///拿掉地址栏Token,因为特别不安全。
|
||||
///小王,xxx系统的地址是多少。。。然后账号就
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -53,34 +51,34 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 开发者登录
|
||||
/// </summary>
|
||||
public ActionResult LoginByDev()
|
||||
public string LoginByDev()
|
||||
{
|
||||
var resp = new Response();
|
||||
try
|
||||
{
|
||||
var result = AuthUtil.Login(_appKey, "System", "123456");
|
||||
if (result.Code == 200)
|
||||
{
|
||||
|
||||
var cookie = new HttpCookie("Token", result.Token)
|
||||
{
|
||||
Expires = DateTime.Now.AddDays(10)
|
||||
};
|
||||
Response.Cookies.Add(cookie);
|
||||
return Redirect("/home/index");
|
||||
///拿掉地址栏Token,因为特别不安全。
|
||||
///小王,xxx系统的地址是多少。。。然后账号就
|
||||
}
|
||||
else
|
||||
{
|
||||
return RedirectToAction("Index", "Login");
|
||||
|
||||
resp.Code = 500;
|
||||
resp.Message = result.Message;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return RedirectToAction("Index", "Login");
|
||||
resp.Code = 500;
|
||||
resp.Message = e.Message;
|
||||
}
|
||||
|
||||
return JsonHelper.Instance.Serialize(resp);
|
||||
}
|
||||
|
||||
public ActionResult Logout()
|
||||
|
@ -6,37 +6,44 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Id', width:150}">主键Id</th>
|
||||
<th lay-data="{field:'IsFinish', width:150, templet:'#IsFinish'}">是否完成</th>
|
||||
<th lay-data="{field:'CustomName', width:150}">实例名称</th>
|
||||
<th lay-data="{field:'Code', width:150}">实例编号</th>
|
||||
<th lay-data="{field:'ActivityName', width:150}">当前节点名称</th>
|
||||
<th lay-data="{field:'CreateDate', width:150}">创建时间</th>
|
||||
<th lay-data="{field:'CreateUserName', width:150}">创建用户</th>
|
||||
<th lay-data="{field:'Description', width:150}">实例备注</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Id', width:150}">主键Id</th>
|
||||
<th lay-data="{field:'IsFinish', width:150, templet:'#IsFinish'}">是否完成</th>
|
||||
<th lay-data="{field:'CustomName', width:150}">实例名称</th>
|
||||
<th lay-data="{field:'Code', width:150}">实例编号</th>
|
||||
<th lay-data="{field:'ActivityName', width:150}">当前节点名称</th>
|
||||
<th lay-data="{field:'CreateDate', width:150}">创建时间</th>
|
||||
<th lay-data="{field:'CreateUserName', width:150}">创建用户</th>
|
||||
<th lay-data="{field:'Description', width:150}">实例备注</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<script type="text/html" id="IsFinish">
|
||||
{{# if(d.IsFinish == 0){ }}
|
||||
<span class="layui-badge layui-bg-blue">正在运行</span>
|
||||
{{# } else if(d.IsFinish == 4){ }}
|
||||
<span class="layui-badge">被驳回</span>
|
||||
{{# } else{}}
|
||||
<span class="layui-badge layui-bg-green">已完成</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="IsFinish">
|
||||
{{# if(d.IsFinish == 0){ }}
|
||||
<span class="layui-badge layui-bg-blue">正在运行</span>
|
||||
{{# } else if(d.IsFinish == 4){ }}
|
||||
<span class="layui-badge">被驳回</span>
|
||||
{{# } else{}}
|
||||
<span class="layui-badge layui-bg-green">已完成</span>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</script>
|
||||
|
@ -6,12 +6,17 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Id', width:150}">主键Id</th>
|
||||
@ -27,9 +32,11 @@
|
||||
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</script>
|
||||
|
@ -6,12 +6,17 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Id', width:150}">表单模板Id</th>
|
||||
@ -25,9 +30,11 @@
|
||||
<th lay-data="{field:'ModifyDate', width:150}">修改时间</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</script>
|
||||
|
@ -6,23 +6,29 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:150, sort: true, fixed: true}">组织名称</th>
|
||||
<th lay-data="{field:'CascadeId', width:150}">层级ID</th>
|
||||
<th lay-data="{field:'ParentName', width:135}">父节点名称</th>
|
||||
<th lay-data="{field:'SortNo', width:180}">排序号</th>
|
||||
<th lay-data="{field:'Id', width:180}">ID</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:150, sort: true, fixed: true}">组织名称</th>
|
||||
<th lay-data="{field:'CascadeId', width:150}">层级ID</th>
|
||||
<th lay-data="{field:'ParentName', width:135}">父节点名称</th>
|
||||
<th lay-data="{field:'SortNo', width:180}">排序号</th>
|
||||
<th lay-data="{field:'Id', width:180}">ID</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--列表右边的按钮-->
|
||||
|
@ -6,21 +6,27 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:150}">角色名称</th>
|
||||
<th lay-data="{field:'Organizations', width:250}">所属部门</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:150}">角色名称</th>
|
||||
<th lay-data="{field:'Organizations', width:250}">所属部门</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</script>
|
||||
|
@ -6,24 +6,31 @@
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</blockquote>
|
||||
|
||||
<div style="display: flex;">
|
||||
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Account', width:150, sort: true, fixed: true}">账号</th>
|
||||
<th lay-data="{field:'Name', width:150}">用户名</th>
|
||||
<th lay-data="{field:'Organizations', width:135}">所属部门</th>
|
||||
<th lay-data="{field:'CreateTime', width:180}">创建时间</th>
|
||||
<th lay-data="{field:'Id', width:180}">ID</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3">
|
||||
<ul id="tree" class="ztree"
|
||||
style="padding: 2px; border: 1px solid #ddd; overflow: auto;">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-col-xs9">
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Account', width:150, sort: true, fixed: true}">账号</th>
|
||||
<th lay-data="{field:'Name', width:150}">用户名</th>
|
||||
<th lay-data="{field:'Organizations', width:135}">所属部门</th>
|
||||
<th lay-data="{field:'CreateTime', width:180}">创建时间</th>
|
||||
<th lay-data="{field:'Id', width:180}">ID</th>
|
||||
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</script>
|
||||
|
@ -59,6 +59,7 @@
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
|
@ -60,7 +60,7 @@
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
|
@ -62,6 +62,7 @@
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
|
@ -92,7 +92,14 @@ layui.config({
|
||||
|
||||
//登录按钮事件
|
||||
form.on("submit(login)", function (data) {
|
||||
window.location.href = "/Login/LoginByDev";
|
||||
$.getJSON("/Login/LoginByDev",
|
||||
function(data) {
|
||||
if (data.Code == 200) {
|
||||
window.location.href = "/Home/Index";
|
||||
} else {
|
||||
layer.msg(data.Message);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
})
|
||||
})
|
||||
|
@ -59,6 +59,7 @@ layui.config({
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
|
@ -59,6 +59,7 @@ layui.config({
|
||||
reload: load
|
||||
}
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
|
@ -60,6 +60,8 @@ layui.config({
|
||||
}
|
||||
}();
|
||||
|
||||
$("#tree").height( $("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm = new Vue({
|
||||
|
Loading…
Reference in New Issue
Block a user