diff --git a/common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js b/common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js index 245e728f76596cf06c1872ee6bc6d5bcaa07328b..dabc1a937e81124fad844e3543c824db3cf9e82f 100644 --- a/common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js +++ b/common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js @@ -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() { diff --git a/web/src/main/resources/template/assets/lib/layui/custom.js b/web/src/main/resources/template/assets/lib/layui/custom.js index 959122f07cf39d53360ed9f2bcd7c2c6dcd07493..222e34a70a596d53c2a9de38c2e3852359d00950 100644 --- a/web/src/main/resources/template/assets/lib/layui/custom.js +++ b/web/src/main/resources/template/assets/lib/layui/custom.js @@ -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", // 团队成员权限插件 }; //系统基础信息 diff --git a/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..35dd61d0bbe2a8204df0f2eda12ace5d45a31a83 --- /dev/null +++ b/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js @@ -0,0 +1,56 @@ + +// 团队成员权限工具 +var teamObjectPermissionUtil = { + + template: `{{#json}} +
成员 | + {{#each rows}} +{{name}} | + {{/each}} +
---|---|
{{name}} | + {{#each ../rows}} +{{name}} | + {{/each}} +