diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl index 00b4c9bd..8aeba97b 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl @@ -429,6 +429,7 @@ }, collapseSwitch: function () { this.prop.coll = !this.prop.coll; + this.onSaveState(); }, handleOpen: function () { @@ -525,9 +526,13 @@ } else { nav.screenNotFull() } + this.onSaveState(); }, onSaveState: function () { nav.setCookie("prop.menu", this.prop.menu); + nav.setCookie("prop.open", this.prop.open); + nav.setCookie("prop.coll", this.prop.coll); + nav.setCookie("prop.tran", this.prop.tran); nav.setCookie("prop.full", this.prop.full); var tab = this.tabs.filter(function (tab_) { return tab_.name == this.prop.tabName; @@ -540,8 +545,10 @@ created: function () { }, mounted: function () { - this.prop.menu = nav.getCookie("prop.menu"); - + this.prop.menu = nav.getCookie("prop.menu") === 'true'; + this.prop.open = nav.getCookie("prop.open") === 'true'; + this.prop.coll = nav.getCookie("prop.coll") === 'true'; + this.prop.tran = nav.getCookie("prop.tran") === 'true'; this.prop.full = nav.getCookie("prop.full") === 'true'; if (this.prop.full) { nav.screenFull(); diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl index 2bdbf4c9..99e4c4d4 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/dept.ftl @@ -186,7 +186,8 @@ :data="treeData" node-key="id" ref="tree" - default-expand-all + accordion + show-checkbox :filter-node-method="filterTree" :expand-on-click-node="false">
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl index 47490bc1..828c20b6 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/res.ftl @@ -243,8 +243,8 @@ :data="treeData" node-key="resCode" ref="tree" + accordion show-checkbox - default-expand-all :filter-node-method="onTreeFilter" :expand-on-click-node="false">
@@ -292,8 +292,8 @@ pageNumber: 1, pageSize: 10, totalCount: 0, - sortKey: 'CREATE_TIME', - sortType: 'DESC' + sortKey: 'RES_CODE', + sortType: 'ASC' }, form: {//待提交表单 formTitle: null, diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl index c1ad826c..b10536f3 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/wsys/role.ftl @@ -160,10 +160,11 @@ ref="tree" @check="onCheck" :check-strictly="true" - :default-expand-all="true" :expand-on-click-node="false">
- {{ data.resName }}[{{data.resCode}}] + + {{ data.resName }}[{{data.resCode}}] +
@@ -284,25 +285,32 @@ var isChecked = status.checkedKeys.indexOf(item.id) !== -1; var list = []; - [item].forTree(function(item){ + [item].forTree(function (item) { list.push(item); }) - list.forAsync(function(item, next){ - new Ajax("wsys", "roleRes", "check").post({ - roleId: roleId, - roleCode: roleCode, - resId: item.id, - resCode: item.resCode, - checked: isChecked, - }, function (response) { - if (response.errors.length > 0) { - nav.e(response.errors[0].message); - } else { - this.$refs.tree.setChecked(item.id, isChecked); - } + nav.tipShow("更新中"); + list.forAsync(function (item_, next) { + if (isChecked === (status.checkedKeys.indexOf(item_.id) !== -1) && item_.id !== item.id) { next(); - }.bind(this)); - }.bind(this)) + } else { + new Ajax("wsys", "roleRes", "check").post({ + roleId: roleId, + roleCode: roleCode, + resId: item_.id, + resCode: item_.resCode, + checked: isChecked, + }, function (response) { + if (response.errors.length > 0) { + nav.e(response.errors[0].message); + } else { + this.$refs.tree.setChecked(item_.id, isChecked); + } + next(); + }.bind(this)); + } + }.bind(this), function () { + nav.tipClose() + }) }, onLoadTree: function () { new Ajax("wsys", "res", "tree").post({}, function (response) { diff --git a/src/main/resources/modules/SpringBoot/test/DataInit.java b/src/main/resources/modules/SpringBoot/test/DataInit.java index ad4062fb..4371bc3c 100644 --- a/src/main/resources/modules/SpringBoot/test/DataInit.java +++ b/src/main/resources/modules/SpringBoot/test/DataInit.java @@ -90,196 +90,217 @@ public class DataInit { { List forDev = new ArrayList<>(); {// 初始化开发角色特有资源 - forDev.add(createRes("1DEV", "核心设置菜单", "WEB", "DEV")); - forDev.add(createRes("1DEV_PROFILES", "系统配置菜单", "WEB", "DEV_PROFILES")); - forDev.add(createRes("1DEV_PROFILES_HTM", "系统配置管理页", "WEB", "/wsys/profiles.htm")); - forDev.add(createRes("1DEV_PROFILES_TEMPLATE", "系统配置模板", "WEB", "/ajax/wsys/profiles/template")); - forDev.add(createRes("1DEV_PROFILES_IMPORT", "系统配置导入", "WEB", "/ajax/wsys/profiles/imports")); - forDev.add(createRes("1DEV_PROFILES_EXPORT", "系统配置导出", "WEB", "/ajax/wsys/profiles/exports")); - forDev.add(createRes("1DEV_PROFILES_CREATE", "系统配置新增", "WEB", "/ajax/wsys/profiles/create")); - forDev.add(createRes("1DEV_PROFILES_DELETE", "系统配置删除", "WEB", "/ajax/wsys/profiles/delete")); - forDev.add(createRes("1DEV_PROFILES_UPDATE", "系统配置编辑", "WEB", "/ajax/wsys/profiles/update")); - forDev.add(createRes("1DEV_PROFILES_FIND", "系统配置查询", "WEB", "/ajax/wsys/profiles/find")); - forDev.add(createRes("1DEV_PROFILES_GET", "系统配置获取", "WEB", "/ajax/wsys/profiles/get")); - forDev.add(createRes("1DEV_RES", "资源管理菜单", "WEB", "DEV_RES")); - forDev.add(createRes("1DEV_RES_HTM", "资源管理页", "WEB", "/wsys/res.htm")); - forDev.add(createRes("1DEV_RES_TEMPLATE", "资源模板", "WEB", "/ajax/wsys/res/template")); - forDev.add(createRes("1DEV_RES_IMPORT", "资源导入", "WEB", "/ajax/wsys/res/imports")); - forDev.add(createRes("1DEV_RES_EXPORT", "资源导出", "WEB", "/ajax/wsys/res/exports")); - forDev.add(createRes("1DEV_RES_CREATE", "资源新增", "WEB", "/ajax/wsys/res/create")); - forDev.add(createRes("1DEV_RES_DELETE", "资源删除", "WEB", "/ajax/wsys/res/delete")); - forDev.add(createRes("1DEV_RES_UPDATE", "资源编辑", "WEB", "/ajax/wsys/res/update")); - forDev.add(createRes("1DEV_RES_FIND", "资源查询", "WEB", "/ajax/wsys/res/find")); - forDev.add(createRes("1DEV_RES_GET", "资源获取", "WEB", "/ajax/wsys/res/get")); - forDev.add(createRes("1DEV_TASK_SQL", "SQL任务菜单", "WEB", "DEV_TASK_SQL")); - forDev.add(createRes("1DEV_TASK_SQL_HTM", "SQL任务管理页", "WEB", "/wsys/taskSql.htm")); - forDev.add(createRes("1DEV_TASK_SQL_TEMPLATE", "SQL任务模板", "WEB", "/ajax/wsys/taskSql/template")); - forDev.add(createRes("1DEV_TASK_SQL_IMPORT", "SQL任务导入", "WEB", "/ajax/wsys/taskSql/imports")); - forDev.add(createRes("1DEV_TASK_SQL_EXPORT", "SQL任务导出", "WEB", "/ajax/wsys/taskSql/exports")); - forDev.add(createRes("1DEV_TASK_SQL_CREATE", "SQL任务新增", "WEB", "/ajax/wsys/taskSql/create")); - forDev.add(createRes("1DEV_TASK_SQL_DELETE", "SQL任务删除", "WEB", "/ajax/wsys/taskSql/delete")); - forDev.add(createRes("1DEV_TASK_SQL_UPDATE", "SQL任务编辑", "WEB", "/ajax/wsys/taskSql/update")); - forDev.add(createRes("1DEV_TASK_SQL_FIND", "SQL任务查询", "WEB", "/ajax/wsys/taskSql/find")); - forDev.add(createRes("1DEV_TASK_SQL_GET", "SQL任务获取", "WEB", "/ajax/wsys/taskSql/get")); - forDev.add(createRes("1DEV_VISITOR", "应用接入管理菜单", "WEB", "DEV_VISITOR")); - forDev.add(createRes("1DEV_VISITOR_HTM", "应用接入管理页", "WEB", "/wsys/visitor.htm")); - forDev.add(createRes("1DEV_VISITOR_TEMPLATE", "应用接入模板", "WEB", "/ajax/wsys/visitor/template")); - forDev.add(createRes("1DEV_VISITOR_IMPORT", "应用接入导入", "WEB", "/ajax/wsys/visitor/imports")); - forDev.add(createRes("1DEV_VISITOR_EXPORT", "应用接入导出", "WEB", "/ajax/wsys/visitor/exports")); - forDev.add(createRes("1DEV_VISITOR_CREATE", "应用接入新增", "WEB", "/ajax/wsys/visitor/create")); - forDev.add(createRes("1DEV_VISITOR_DELETE", "应用接入删除", "WEB", "/ajax/wsys/visitor/delete")); - forDev.add(createRes("1DEV_VISITOR_UPDATE", "应用接入更新", "WEB", "/ajax/wsys/visitor/update")); - forDev.add(createRes("1DEV_VISITOR_FIND", "应用接入查询", "WEB", "/ajax/wsys/visitor/find")); - forDev.add(createRes("1DEV_VISITOR_RES_CREATE", "应用资源关系新增", "WEB", "/ajax/wsys/visitorRes/create")); - forDev.add(createRes("1DEV_VISITOR_RES_DELETE", "应用资源关系删除", "WEB", "/ajax/wsys/visitorRes/delete")); - forDev.add(createRes("1DEV_VISITOR_RES_UPDATE", "应用资源关系更新", "WEB", "/ajax/wsys/visitorRes/update")); - forDev.add(createRes("1DEV_VISITOR_RES_FIND", "应用资源关系查询", "WEB", "/ajax/wsys/visitorRes/find")); + forDev.add(createRes("01", "核心设置菜单", "WEB", "DEV")); + forDev.add(createRes("0101", "系统配置菜单", "WEB", "DEV_PROFILES")); + forDev.add(createRes("010101", "系统配置管理页", "WEB", "/wsys/profiles.htm")); + forDev.add(createRes("01010101", "系统配置模板", "WEB", "/ajax/wsys/profiles/template")); + forDev.add(createRes("01010102", "系统配置导入", "WEB", "/ajax/wsys/profiles/imports")); + forDev.add(createRes("01010103", "系统配置导出", "WEB", "/ajax/wsys/profiles/exports")); + forDev.add(createRes("01010104", "系统配置新增", "WEB", "/ajax/wsys/profiles/create")); + forDev.add(createRes("01010105", "系统配置删除", "WEB", "/ajax/wsys/profiles/delete")); + forDev.add(createRes("01010106", "系统配置编辑", "WEB", "/ajax/wsys/profiles/update")); + forDev.add(createRes("01010107", "系统配置查询", "WEB", "/ajax/wsys/profiles/find")); + forDev.add(createRes("01010108", "系统配置获取", "WEB", "/ajax/wsys/profiles/get")); + forDev.add(createRes("0102", "资源管理菜单", "WEB", "DEV_RES")); + forDev.add(createRes("010201", "资源管理页", "WEB", "/wsys/res.htm")); + forDev.add(createRes("01020101", "资源模板", "WEB", "/ajax/wsys/res/template")); + forDev.add(createRes("01020102", "资源导入", "WEB", "/ajax/wsys/res/imports")); + forDev.add(createRes("01020103", "资源导出", "WEB", "/ajax/wsys/res/exports")); + forDev.add(createRes("01020104", "资源新增", "WEB", "/ajax/wsys/res/create")); + forDev.add(createRes("01020105", "资源删除", "WEB", "/ajax/wsys/res/delete")); + forDev.add(createRes("01020106", "资源编辑", "WEB", "/ajax/wsys/res/update")); + forDev.add(createRes("01020107", "资源查询", "WEB", "/ajax/wsys/res/find")); + forDev.add(createRes("01020108", "资源获取", "WEB", "/ajax/wsys/res/get")); + forDev.add(createRes("0103", "SQL任务菜单", "WEB", "DEV_TASK_SQL")); + forDev.add(createRes("010301", "SQL任务管理页", "WEB", "/wsys/taskSql.htm")); + forDev.add(createRes("01030101", "SQL任务模板", "WEB", "/ajax/wsys/taskSql/template")); + forDev.add(createRes("01030102", "SQL任务导入", "WEB", "/ajax/wsys/taskSql/imports")); + forDev.add(createRes("01030103", "SQL任务导出", "WEB", "/ajax/wsys/taskSql/exports")); + forDev.add(createRes("01030104", "SQL任务新增", "WEB", "/ajax/wsys/taskSql/create")); + forDev.add(createRes("01030105", "SQL任务删除", "WEB", "/ajax/wsys/taskSql/delete")); + forDev.add(createRes("01030106", "SQL任务编辑", "WEB", "/ajax/wsys/taskSql/update")); + forDev.add(createRes("01030107", "SQL任务查询", "WEB", "/ajax/wsys/taskSql/find")); + forDev.add(createRes("01030108", "SQL任务获取", "WEB", "/ajax/wsys/taskSql/get")); + forDev.add(createRes("0104", "应用接入管理菜单", "WEB", "DEV_VISITOR")); + forDev.add(createRes("010401", "应用接入管理页", "WEB", "/wsys/visitor.htm")); + forDev.add(createRes("01040101", "应用接入模板", "WEB", "/ajax/wsys/visitor/template")); + forDev.add(createRes("01040102", "应用接入导入", "WEB", "/ajax/wsys/visitor/imports")); + forDev.add(createRes("01040103", "应用接入导出", "WEB", "/ajax/wsys/visitor/exports")); + forDev.add(createRes("01040104", "应用接入新增", "WEB", "/ajax/wsys/visitor/create")); + forDev.add(createRes("01040105", "应用接入删除", "WEB", "/ajax/wsys/visitor/delete")); + forDev.add(createRes("01040106", "应用接入更新", "WEB", "/ajax/wsys/visitor/update")); + forDev.add(createRes("01040107", "应用接入查询", "WEB", "/ajax/wsys/visitor/find")); + forDev.add(createRes("01040108", "应用资源关系新增", "WEB", "/ajax/wsys/visitorRes/create")); + forDev.add(createRes("01040109", "应用资源关系删除", "WEB", "/ajax/wsys/visitorRes/delete")); + forDev.add(createRes("01040110", "应用资源关系更新", "WEB", "/ajax/wsys/visitorRes/update")); + forDev.add(createRes("01040111", "应用资源关系查询", "WEB", "/ajax/wsys/visitorRes/find")); - forDev.add(createRes("2MNT", "监控运行菜单", "WEB", "MNT")); - forDev.add(createRes("2MNT_TOKENS", "登录管理菜单", "WEB", "MNT_TOKENS")); - forDev.add(createRes("2MNT_TOKENS_HTM", "登录管理页", "WEB", "/wsys/tokens.htm")); - forDev.add(createRes("2MNT_TOKENS_FIND", "登录查询", "WEB", "/ajax/wsys/tokens/find")); - forDev.add(createRes("2MNT_TOKENS_EXPORT", "登录导出", "WEB", "/ajax/wsys/tokens/exports")); - forDev.add(createRes("2MNT_TOKENS_LOGOUT", "登录注销", "WEB", "/ajax/wsys/tokens/logout")); - forDev.add(createRes("2MNT_SCHEDULE", "调度监控菜单", "WEB", "MNT_SCHEDULE")); - forDev.add(createRes("2MNT_SCHEDULE_HTM", "调度监控页", "WEB", "/wsys/schedule.htm")); - forDev.add(createRes("2MNT_SCHEDULE_FIND", "调度监控查询", "WEB", "/ajax/wsys/schedule/find")); - forDev.add(createRes("2MNT_SCHEDULE_START", "调度监控启动", "WEB", "/ajax/wsys/schedule/start")); - forDev.add(createRes("2MNT_SCHEDULE_STOP", "调度监控暂停", "WEB", "/ajax/wsys/schedule/stop")); - forDev.add(createRes("2MNT_LOGERR", "错误日志菜单", "WEB", "MNT_LOGERR")); - forDev.add(createRes("2MNT_LOGERR_HTM", "错误日志管理页", "WEB", "/wsys/logerr.htm")); - forDev.add(createRes("2MNT_LOGERR_DELETE", "错误日志删除", "WEB", "/ajax/wsys/logerr/delete")); - forDev.add(createRes("2MNT_LOGERR_UPDATE", "错误日志更新", "WEB", "/ajax/wsys/logerr/update")); - forDev.add(createRes("2MNT_LOGERR_FIND", "错误日志查询", "WEB", "/ajax/wsys/logerr/find")); + forDev.add(createRes("02", "监控运行菜单", "WEB", "MNT")); + forDev.add(createRes("0201", "登录管理菜单", "WEB", "MNT_TOKENS")); + forDev.add(createRes("020101", "登录管理页", "WEB", "/wsys/tokens.htm")); + forDev.add(createRes("02010101", "登录查询", "WEB", "/ajax/wsys/tokens/find")); + forDev.add(createRes("02010102", "登录导出", "WEB", "/ajax/wsys/tokens/exports")); + forDev.add(createRes("02010103", "登录注销", "WEB", "/ajax/wsys/tokens/logout")); + forDev.add(createRes("0202", "调度监控菜单", "WEB", "MNT_SCHEDULE")); + forDev.add(createRes("020201", "调度监控页", "WEB", "/wsys/schedule.htm")); + forDev.add(createRes("02020101", "调度监控查询", "WEB", "/ajax/wsys/schedule/find")); + forDev.add(createRes("02020102", "调度监控启动", "WEB", "/ajax/wsys/schedule/start")); + forDev.add(createRes("02020103", "调度监控暂停", "WEB", "/ajax/wsys/schedule/stop")); + forDev.add(createRes("0203", "错误日志菜单", "WEB", "MNT_LOGERR")); + forDev.add(createRes("020301", "错误日志管理页", "WEB", "/wsys/logerr.htm")); + forDev.add(createRes("02030101", "错误日志删除", "WEB", "/ajax/wsys/logerr/delete")); + forDev.add(createRes("02030102", "错误日志更新", "WEB", "/ajax/wsys/logerr/update")); + forDev.add(createRes("02030103", "错误日志查询", "WEB", "/ajax/wsys/logerr/find")); } List forMgr = new ArrayList<>(); {// 初始化管理资源 - forMgr.add(createRes("3SYS", "基础设置菜单", "WEB", "SYS")); - forMgr.add(createRes("3SYS_INDEX_ROOT", "根页", "WEB", "/", true)); - forMgr.add(createRes("3SYS_INDEX", "主页", "WEB", "/index.htm", true)); - forMgr.add(createRes("3SYS_INDEX_HOME", "首页", "WEB", "/home.htm", true)); - forMgr.add(createRes("3SYS_DICT", "字典管理菜单", "WEB", "SYS_DICT")); - forMgr.add(createRes("3SYS_DICT_HTM", "字典管理页", "WEB", "/wsys/dict.htm")); - forMgr.add(createRes("3SYS_DICT_TEMPLATE", "字典模板", "WEB", "/ajax/wsys/dict/template")); - forMgr.add(createRes("3SYS_DICT_IMPORT", "字典导入", "WEB", "/ajax/wsys/dict/imports")); - forMgr.add(createRes("3SYS_DICT_EXPORT", "字典导出", "WEB", "/ajax/wsys/dict/exports")); - forMgr.add(createRes("3SYS_DICT_CREATE", "字典新建", "WEB", "/ajax/wsys/dict/create")); - forMgr.add(createRes("3SYS_DICT_DELETE", "字典删除", "WEB", "/ajax/wsys/dict/delete")); - forMgr.add(createRes("3SYS_DICT_UPDATE", "字典更新", "WEB", "/ajax/wsys/dict/update")); - forMgr.add(createRes("3SYS_DICT_FIND", "字典查询", "WEB", "/ajax/wsys/dict/find")); - forMgr.add(createRes("3SYS_DICT_GET", "字典获取", "WEB", "/ajax/wsys/dict/get")); - forMgr.add(createRes("3SYS_DICT_LOAD", "字典详情", "WEB", "/ajax/wsys/dict/load", true)); - forMgr.add(createRes("3SYS_DICT_ITEM_HTM", "字典项管理页", "WEB", "/wsys/dictItem.htm")); - forMgr.add(createRes("3SYS_DICT_ITEM_TEMPLATE", "字典项模板", "WEB", "/ajax/wsys/dictItem/template")); - forMgr.add(createRes("3SYS_DICT_ITEM_IMPORT", "字典项导入", "WEB", "/ajax/wsys/dictItem/imports")); - forMgr.add(createRes("3SYS_DICT_ITEM_EXPORT", "字典项导出", "WEB", "/ajax/wsys/dictItem/exports")); - forMgr.add(createRes("3SYS_DICT_ITEM_CREATE", "字典项新增", "WEB", "/ajax/wsys/dictItem/create")); - forMgr.add(createRes("3SYS_DICT_ITEM_DELETE", "字典项删除", "WEB", "/ajax/wsys/dictItem/delete")); - forMgr.add(createRes("3SYS_DICT_ITEM_UPDATE", "字典项更新", "WEB", "/ajax/wsys/dictItem/update")); - forMgr.add(createRes("3SYS_DICT_ITEM_FIND", "字典项查找", "WEB", "/ajax/wsys/dictItem/find")); - forMgr.add(createRes("3SYS_DICT_ITEM_GET", "字典项获取", "WEB", "/ajax/wsys/dictItem/get")); - forMgr.add(createRes("3SYS_USER", "用户管理菜单", "WEB", "SYS_USER")); - forMgr.add(createRes("3SYS_USER_HTM", "用户管理页", "WEB", "/wsys/user.htm")); - forMgr.add(createRes("3SYS_USER_TEMPLATE", "字用户模板", "WEB", "/ajax/wsys/user/template")); - forMgr.add(createRes("3SYS_USER_IMPORT", "用户导入", "WEB", "/ajax/wsys/user/imports")); - forMgr.add(createRes("3SYS_USER_EXPORT", "用户导出", "WEB", "/ajax/wsys/user/exports")); - forMgr.add(createRes("3SYS_USER_CREATE", "用户新增", "WEB", "/ajax/wsys/user/create")); - forMgr.add(createRes("3SYS_USER_DELETE", "用户删除", "WEB", "/ajax/wsys/user/delete")); - forMgr.add(createRes("3SYS_USER_UPDATE", "用户更新", "WEB", "/ajax/wsys/user/update")); - forMgr.add(createRes("3SYS_USER_FIND", "用户查询", "WEB", "/ajax/wsys/user/find")); - forMgr.add(createRes("3SYS_USER_GET", "用户获取", "WEB", "/ajax/wsys/user/get")); - forMgr.add(createRes("3SYS_DEPT", "机构管理菜单", "WEB", "SYS_DEPT")); - forMgr.add(createRes("3SYS_DEPT_HTM", "机构管理页", "WEB", "/wsys/dept.htm")); - forMgr.add(createRes("3SYS_DEPT_CREATE", "机构新增", "WEB", "/ajax/wsys/dept/create")); - forMgr.add(createRes("3SYS_DEPT_DELETE", "机构删除", "WEB", "/ajax/wsys/dept/delete")); - forMgr.add(createRes("3SYS_DEPT_UPDATE", "机构更新", "WEB", "/ajax/wsys/dept/update")); - forMgr.add(createRes("3SYS_DEPT_FIND", "机构查询", "WEB", "/ajax/wsys/dept/find")); - forMgr.add(createRes("3SYS_DEPT_GET", "机构获取", "WEB", "/ajax/wsys/dept/get")); - forMgr.add(createRes("3SYS_DEPT_TREE", "机构树查询", "WEB", "/ajax/wsys/dept/tree")); - forMgr.add(createRes("3SYS_DEPT_TEMPLATE", "机构模板", "WEB", "/ajax/wsys/dept/template")); - forMgr.add(createRes("3SYS_DEPT_IMPORT", "机构导入", "WEB", "/ajax/wsys/dept/imports")); - forMgr.add(createRes("3SYS_DEPT_EXPORT", "机构导出", "WEB", "/ajax/wsys/dept/exports")); - forMgr.add(createRes("3SYS_FILE", "文件管理菜单", "WEB", "SYS_FILE")); - forMgr.add(createRes("3SYS_FILE_HTM", "文件管理页", "WEB", "/wsys/file.htm")); - forMgr.add(createRes("3SYS_FILE_DELETE", "文件删除", "WEB", "/ajax/wsys/file/delete")); - forMgr.add(createRes("3SYS_FILE_FIND", "文件查询", "WEB", "/ajax/wsys/file/find")); - forMgr.add(createRes("3SYS_ROLE", "角色管理菜单", "WEB", "SYS_ROLE")); - forMgr.add(createRes("3SYS_ROLE_HTM", "角色管理页", "WEB", "/wsys/role.htm")); - forMgr.add(createRes("3SYS_ROLE_TEMPLATE", "角色模板", "WEB", "/ajax/wsys/role/template")); - forMgr.add(createRes("3SYS_ROLE_IMPORT", "角色导入", "WEB", "/ajax/wsys/role/imports")); - forMgr.add(createRes("3SYS_ROLE_EXPORT", "角色导出", "WEB", "/ajax/wsys/role/exports")); - forMgr.add(createRes("3SYS_ROLE_CREATE", "角色新增", "WEB", "/ajax/wsys/role/create")); - forMgr.add(createRes("3SYS_ROLE_DELETE", "角色删除", "WEB", "/ajax/wsys/role/delete")); - forMgr.add(createRes("3SYS_ROLE_UPDATE", "角色更新", "WEB", "/ajax/wsys/role/update")); - forMgr.add(createRes("3SYS_ROLE_FIND", "角色查询", "WEB", "/ajax/wsys/role/find")); - forMgr.add(createRes("3SYS_ROLE_GET", "角色获取", "WEB", "/ajax/wsys/role/get")); - forMgr.add(createRes("3SYS_ROLE_RESCHECK", "角色资源分配", "WEB", "/ajax/wsys/roleRes/check")); - forMgr.add(createRes("3SYS_ROLE_ROLERES", "角色资源关系查询", "WEB", "/ajax/wsys/roleRes/find")); - forMgr.add(createRes("3SYS_ROLE_RES_TREE", "资源树查询", "WEB", "/ajax/wsys/res/tree")); + forMgr.add(createRes("03", "基础设置菜单", "WEB", "SYS")); + + forMgr.add(createRes("0301", "根页", "WEB", "/", true)); + forMgr.add(createRes("030101", "主页", "WEB", "/index.htm", true)); + forMgr.add(createRes("030102", "首页", "WEB", "/home.htm", true)); + + forMgr.add(createRes("0302", "字典管理菜单", "WEB", "SYS_DICT")); + forMgr.add(createRes("030201", "字典管理页", "WEB", "/wsys/dict.htm")); + forMgr.add(createRes("03020101", "字典模板", "WEB", "/ajax/wsys/dict/template")); + forMgr.add(createRes("03020102", "字典导入", "WEB", "/ajax/wsys/dict/imports")); + forMgr.add(createRes("03020103", "字典导出", "WEB", "/ajax/wsys/dict/exports")); + forMgr.add(createRes("03020104", "字典新建", "WEB", "/ajax/wsys/dict/create")); + forMgr.add(createRes("03020105", "字典删除", "WEB", "/ajax/wsys/dict/delete")); + forMgr.add(createRes("03020106", "字典更新", "WEB", "/ajax/wsys/dict/update")); + forMgr.add(createRes("03020107", "字典查询", "WEB", "/ajax/wsys/dict/find")); + forMgr.add(createRes("03020108", "字典获取", "WEB", "/ajax/wsys/dict/get")); + forMgr.add(createRes("03020109", "字典详情", "WEB", "/ajax/wsys/dict/load", true)); + forMgr.add(createRes("03020110", "字典项管理页", "WEB", "/wsys/dictItem.htm")); + forMgr.add(createRes("0302011001", "字典项模板", "WEB", "/ajax/wsys/dictItem/template")); + forMgr.add(createRes("0302011002", "字典项导入", "WEB", "/ajax/wsys/dictItem/imports")); + forMgr.add(createRes("0302011003", "字典项导出", "WEB", "/ajax/wsys/dictItem/exports")); + forMgr.add(createRes("0302011004", "字典项新增", "WEB", "/ajax/wsys/dictItem/create")); + forMgr.add(createRes("0302011005", "字典项删除", "WEB", "/ajax/wsys/dictItem/delete")); + forMgr.add(createRes("0302011006", "字典项更新", "WEB", "/ajax/wsys/dictItem/update")); + forMgr.add(createRes("0302011007", "字典项查找", "WEB", "/ajax/wsys/dictItem/find")); + forMgr.add(createRes("0302011008", "字典项获取", "WEB", "/ajax/wsys/dictItem/get")); + + forMgr.add(createRes("0303", "用户管理菜单", "WEB", "SYS_USER")); + forMgr.add(createRes("030301", "用户管理页", "WEB", "/wsys/user.htm")); + forMgr.add(createRes("03030101", "字用户模板", "WEB", "/ajax/wsys/user/template")); + forMgr.add(createRes("03030102", "用户导入", "WEB", "/ajax/wsys/user/imports")); + forMgr.add(createRes("03030103", "用户导出", "WEB", "/ajax/wsys/user/exports")); + forMgr.add(createRes("03030104", "用户新增", "WEB", "/ajax/wsys/user/create")); + forMgr.add(createRes("03030105", "用户删除", "WEB", "/ajax/wsys/user/delete")); + forMgr.add(createRes("03030106", "用户更新", "WEB", "/ajax/wsys/user/update")); + forMgr.add(createRes("03030107", "用户查询", "WEB", "/ajax/wsys/user/find")); + forMgr.add(createRes("03030108", "用户获取", "WEB", "/ajax/wsys/user/get")); + + forMgr.add(createRes("0304", "机构管理菜单", "WEB", "SYS_DEPT")); + forMgr.add(createRes("030401", "机构管理页", "WEB", "/wsys/dept.htm")); + forMgr.add(createRes("03040101", "机构新增", "WEB", "/ajax/wsys/dept/create")); + forMgr.add(createRes("03040102", "机构删除", "WEB", "/ajax/wsys/dept/delete")); + forMgr.add(createRes("03040103", "机构更新", "WEB", "/ajax/wsys/dept/update")); + forMgr.add(createRes("03040104", "机构查询", "WEB", "/ajax/wsys/dept/find")); + forMgr.add(createRes("03040105", "机构获取", "WEB", "/ajax/wsys/dept/get")); + forMgr.add(createRes("03040106", "机构树查询", "WEB", "/ajax/wsys/dept/tree")); + forMgr.add(createRes("03040107", "机构模板", "WEB", "/ajax/wsys/dept/template")); + forMgr.add(createRes("03040108", "机构导入", "WEB", "/ajax/wsys/dept/imports")); + forMgr.add(createRes("03040109", "机构导出", "WEB", "/ajax/wsys/dept/exports")); + + forMgr.add(createRes("0304", "文件管理菜单", "WEB", "SYS_FILE")); + forMgr.add(createRes("030401", "文件管理页", "WEB", "/wsys/file.htm")); + forMgr.add(createRes("03040101", "文件删除", "WEB", "/ajax/wsys/file/delete")); + forMgr.add(createRes("03040102", "文件查询", "WEB", "/ajax/wsys/file/find")); + + forMgr.add(createRes("0305", "角色管理菜单", "WEB", "SYS_ROLE")); + forMgr.add(createRes("030501", "角色管理页", "WEB", "/wsys/role.htm")); + forMgr.add(createRes("03050101", "角色模板", "WEB", "/ajax/wsys/role/template")); + forMgr.add(createRes("03050102", "角色导入", "WEB", "/ajax/wsys/role/imports")); + forMgr.add(createRes("03050103", "角色导出", "WEB", "/ajax/wsys/role/exports")); + forMgr.add(createRes("03050104", "角色新增", "WEB", "/ajax/wsys/role/create")); + forMgr.add(createRes("03050105", "角色删除", "WEB", "/ajax/wsys/role/delete")); + forMgr.add(createRes("03050106", "角色更新", "WEB", "/ajax/wsys/role/update")); + forMgr.add(createRes("03050107", "角色查询", "WEB", "/ajax/wsys/role/find")); + forMgr.add(createRes("03050108", "角色获取", "WEB", "/ajax/wsys/role/get")); + forMgr.add(createRes("03050109", "角色资源分配", "WEB", "/ajax/wsys/roleRes/check")); + forMgr.add(createRes("03050100", "角色资源关系查询", "WEB", "/ajax/wsys/roleRes/find")); + forMgr.add(createRes("03050110", "资源树查询", "WEB", "/ajax/wsys/res/tree")); <#list project.modules as module> +<#assign index = module_index + 4/> +<#if index<10> +<#assign index = "0"+index/> + <#if module.getNeedGenerate()> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}", "${module.moduleComment}菜单", "WEB", "${module.moduleName?upper_case}")); + forMgr.add(createRes("${index}", "${module.moduleComment}菜单", "WEB", "${module.moduleName?upper_case}")); <#list module.tables as table> <#if table.html> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}", "${table.tableComment}管理菜单", "WEB", "${module.moduleName?upper_case}_${table.tableName?upper_case}")); - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_HTM", "${table.tableComment}管理页", "WEB", "/${module.moduleName}/${table.getFName()}.htm")); - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_TEMPLATE", "${table.tableComment}模板", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/template")); - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_IMPORT", "${table.tableComment}导入", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/imports")); - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_EXPORT", "${table.tableComment}导出", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/exports")); + forMgr.add(createRes("${index}01", "${table.tableComment}管理菜单", "WEB", "${module.moduleName?upper_case}_${table.tableName?upper_case}")); + forMgr.add(createRes("${index}0101", "${table.tableComment}管理页", "WEB", "/${module.moduleName}/${table.getFName()}.htm")); + forMgr.add(createRes("${index}010101", "${table.tableComment}模板", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/template")); + forMgr.add(createRes("${index}010102", "${table.tableComment}导入", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/imports")); + forMgr.add(createRes("${index}010103", "${table.tableComment}导出", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/exports")); <#if table.create> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_CREATE", "${table.tableComment}新增", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/create")); + forMgr.add(createRes("${index}010104", "${table.tableComment}新增", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/create")); <#if table.delete> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_DELETE", "${table.tableComment}删除", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/delete")); + forMgr.add(createRes("${index}010105", "${table.tableComment}删除", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/delete")); <#if table.update> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_UPDATE", "${table.tableComment}更新", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/update")); + forMgr.add(createRes("${index}010106", "${table.tableComment}更新", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/update")); <#if table.find> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_FIND", "${table.tableComment}查询", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/find")); + forMgr.add(createRes("${index}010107", "${table.tableComment}查询", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/find")); <#if table.get> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_GET", "${table.tableComment}获取", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/get")); + forMgr.add(createRes("${index}010108", "${table.tableComment}获取", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/get")); <#if table.search> - forMgr.add(createRes("${module_index+4}${module.moduleName?upper_case}_${table.tableName?upper_case}_SEARCH", "${table.tableComment}搜索", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/search")); + forMgr.add(createRes("${index}010109", "${table.tableComment}搜索", "WEB", "/ajax/${module.moduleName}/${table.getFName()}/search")); + } <#if project.isNeedApi()> - forMgr.add(createRes("SYS_USER_LOGIN", "用户登录", "API", "/api/wsys/User/login")); - forMgr.add(createRes("SYS_DICT_FIND", "字典查询", "API", "/api/wsys/Dict/find")); - forMgr.add(createRes("SYS_DICT_LOAD", "加载字典", "API", "/api/wsys/Dict/load")); - forMgr.add(createRes("SYS_FILE_UPLOAD", "文件上传", "API", "/api/wsys/File/upload")); - forMgr.add(createRes("SYS_FILE_DOWNLOAD", "文件下载", "API", "/api/wsys/File/download")); + + {// API资源 + forMgr.add(createRes("A", "接口资源", "API", "A")); + forMgr.add(createRes("A01", "基础资源", "API", "A01")); + forMgr.add(createRes("A0101", "用户登录", "API", "/api/wsys/User/login")); + forMgr.add(createRes("A0102", "字典查询", "API", "/api/wsys/Dict/find")); + forMgr.add(createRes("A0103", "加载字典", "API", "/api/wsys/Dict/load")); + forMgr.add(createRes("A0104", "文件上传", "API", "/api/wsys/File/upload")); + forMgr.add(createRes("A0105", "文件下载", "API", "/api/wsys/File/download")); <#list project.modules as module> +<#assign index = module_index + 2/> +<#if index<10> +<#assign index = "0"+index/> + + forMgr.add(createRes("A${index}", "${module.moduleComment}", "API", "A${module.moduleName?upper_case}")); <#list module.tables as table> + forMgr.add(createRes("A${index}01", "${table.tableComment}", "API", "A${module.moduleName?upper_case}_${table.tableName?upper_case}")); <#if table.create> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_CREATE", "${table.tableComment}新增", "API", "/api/${module.moduleName}/${table.getFName()}/create")); + forMgr.add(createRes("A${index}0101", "${table.tableComment}新增", "API", "/api/${module.moduleName}/${table.getFName()}/create")); <#if table.delete> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_DELETE", "${table.tableComment}删除", "API", "/api/${module.moduleName}/${table.getFName()}/delete")); + forMgr.add(createRes("A${index}0102", "${table.tableComment}删除", "API", "/api/${module.moduleName}/${table.getFName()}/delete")); <#if table.update> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_UPDATE", "${table.tableComment}更新", "API", "/api/${module.moduleName}/${table.getFName()}/update")); + forMgr.add(createRes("A${index}0103", "${table.tableComment}更新", "API", "/api/${module.moduleName}/${table.getFName()}/update")); <#if table.find> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_FIND", "${table.tableComment}查询", "API", "/api/${module.moduleName}/${table.getFName()}/find")); + forMgr.add(createRes("A${index}0104", "${table.tableComment}查询", "API", "/api/${module.moduleName}/${table.getFName()}/find")); <#if table.get> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_GET", "${table.tableComment}获取", "API", "/api/${module.moduleName}/${table.getFName()}/get")); + forMgr.add(createRes("A${index}0105", "${table.tableComment}获取", "API", "/api/${module.moduleName}/${table.getFName()}/get")); <#if table.search> - forMgr.add(createRes("${module.moduleName?upper_case}_${table.tableName?upper_case}_SEARCH", "${table.tableComment}搜索", "API", "/api/${module.moduleName}/${table.getFName()}/search")); + forMgr.add(createRes("A${index}0107", "${table.tableComment}搜索", "API", "/api/${module.moduleName}/${table.getFName()}/search")); - } + {//初始化开发角色 Long roleId = createRole("developer", "开发", "开发");