提交 d512420c 编写于 作者: doc_wei's avatar doc_wei

新增权限插件

上级 d30a93ef
......@@ -40,25 +40,7 @@ layui.config({
function loadAuthList() {
var objectType = $('#objectType').val();
if (isNull(objectType)) {
$('#authList').html('');
} else {
jsGetJsonFile("../../json/teamObjectLink.json", function(data) {
var authStrList = data[objectType];
var str = ``;
$.each(authStrList, function(i, item) {
var bean = {
key: item,
name: skyeyeClassEnum[item].name
};
var authBtnJson = skyeyeClassEnumUtil.getEnumDataListByClassName(item);
authBtnJson["bean"] = bean;
str += getDataUseHandlebars($('#authTableTemplate').html(), {json: authBtnJson});
});
$('#authList').html(str);
});
}
form.render();
teamObjectPermissionUtil.insertPageShow(objectType, 'authList', form);
}
$("body").on("click", "#cancle", function() {
......
......@@ -39,6 +39,7 @@ var customerJS = {
"sysDictDataUtil": "../../assets/lib/layui/customer/skyeye/sysDictDataUtil.js", // 数据字典插件
"initTableSearchUtil": "../../assets/lib/layui/customer/tableUtil/initTableSearchUtil.js", // 表格高级查询插件
"skyeyeClassEnumUtil": "../../assets/lib/layui/customer/skyeye/skyeyeClassEnumUtil.js", // 动态枚举插件
"teamObjectPermissionUtil": "../../assets/lib/layui/customer/teamObjectPermissionUtil.js", // 团队成员权限插件
};
//系统基础信息
......
// 团队成员权限工具
var teamObjectPermissionUtil = {
template: `{{#json}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">{{bean.name}}<i class="red">*</i></label>
<div class="layui-input-block">
<table class="layui-table">
<thead>
<tr>
<th>成员</th>
{{#each rows}}
<th>{{name}}</th>
{{/each}}
</tr>
</thead>
<tbody id="{{bean.key}}" class="insurance-table">
{{#each roleList}}
<tr>
<td>{{name}}</td>
{{#each ../rows}}
<th>{{name}}</th>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/json}}`;
// 新增时的展示
insertPageShow: function (objectType, showBoxId, form) {
if (isNull(objectType)) {
$('#authList').html('');
} else {
jsGetJsonFile("../../json/teamObjectLink.json", function(data) {
var authStrList = data[objectType];
var str = ``;
$.each(authStrList, function(i, item) {
var bean = {
key: item,
name: skyeyeClassEnum[item].name
};
var authBtnJson = skyeyeClassEnumUtil.getEnumDataListByClassName(item);
authBtnJson["bean"] = bean;
str += getDataUseHandlebars($('#authTableTemplate').html(), {json: authBtnJson});
});
$('#authList').html(str);
});
}
form.render();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册