代码拉取完成,页面将自动刷新
同步操作将从 天辰/AssetsSysHtml 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>学校固定资产管理系统</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="x-nav">
<span class="layui-breadcrumb">
<a>首页</a>
<a>角色管理</a>
<a>
<cite>部门管理</cite>
</a>
</span>
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
</a>
</div>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-header">
<button class="layui-btn" onclick="xadmin.open('新增部门','./department-add.html',451,300)">
<i class="layui-icon"></i>添加</button>
</div>
<div class="layui-card-body layui-form">
<table id="department"></table>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
layui.use('table', function () {
var table = layui.table;
var from = layui.from;
//表格实例化
table.render({
elem: '#department'
, height: 500
, headers: { 'token': sessionStorage.getItem("token") }
, url: sessionStorage.getItem("api") + 'department/infos'
, where: { StatusStr: status }
, page: false
, parseData: function (res) {
return {
"code": res.Data.Code,
"msg": res.Data.Msg,
"count": res.Data.Count,
"data": res.Data.Data
};
}
, cols: [
[
{ type: 'numbers', title: '序号' , width: 80}
, { field: 'DepartmentName', title: '部门名称', width: 150}
, { field: 'PermissionName', title: '权限名称' , width: 100}
, {
field: 'PermissionMenu', title: '权限内容'
, templet: function (d) {
var content=JSON.parse(d.PermissionMenu)
var str="";
for(i=0;i<content.length;i++){
var parent=content[i];
str+=parent.Name+":(";
for(j=0;j<parent.Child.length ;j++){
var child=parent.Child[j]
str+=child.Name+",";
}
str=str.substring(0,str.length-1)+")";
}
return str;
},
}
, {
title: '操作',
templet: '#button',width:400
}
]
]
});
});
var pid = "";
layui.use('form', function () {
var form = layui.form;
form.on('submit(edit)', function (data) {
console.log(data.elem.attributes.id.nodeValue) //获取当前元素的ID
pid = data.elem.attributes.id.nodeValue
layer.open({
type: 2,
area: ['451px', '300px'],
fix: false,
maxmin: true,
shadeClose: true,
shade: 0.4,
title: "编辑用户",
content: 'department-edit.html'
});
});
});
</script>
<script type="text/html" id="button">
<input type="button" class="layui-btn layui-btn-radius layui-btn-normal" lay-submit lay-filter = "edit" id="{{d.Id}}" value="修改信息">
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。