权限细化

master
wangbingit@outlook.com 4 years ago
parent 76660cba71
commit 413638238b

@ -92,7 +92,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<#if table.isPageAdd()> <#if table.isPageAdd()>
${print('<#if token.hasRes("/ajax/${module.name}/${table.getFName()}/create")>')} ${print('<#if token.hasRes("/ajax/${module.name}/${table.getFName()}/create")>')}
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -38,7 +38,7 @@
<el-divider><i class="el-icon-search"></i></el-divider> <el-divider><i class="el-icon-search"></i></el-divider>
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/dept/create")> <#if token.hasRes("/ajax/wsys/dept/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -28,7 +28,7 @@
</el-card> </el-card>
<el-card class="box-card data"> <el-card class="box-card data">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/dict/create")> <#if token.hasRes("/ajax/wsys/dict/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -31,7 +31,7 @@
</el-card> </el-card>
<el-card class="box-card data"> <el-card class="box-card data">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/dictItem/create")> <#if token.hasRes("/ajax/wsys/dictItem/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -31,7 +31,7 @@
</el-card> </el-card>
<el-card class="box-card data"> <el-card class="box-card data">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/file/create")> <#if token.hasRes("/ajax/wsys/file/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -32,7 +32,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<el-button type="success" size="mini" icon="el-icon-shopping-cart-full" @click="onBatchStart">开始处理</el-button> <el-button type="success" size="mini" icon="el-icon-shopping-cart-full" @click="onBatchStart">开始处理</el-button>

@ -48,7 +48,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/logtask/delete")> <#if token.hasRes("/ajax/wsys/logtask/delete")>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="onBitchDelete">删除</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="onBitchDelete">删除</el-button>

@ -24,7 +24,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/profiles/create")> <#if token.hasRes("/ajax/wsys/profiles/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -44,7 +44,7 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/res/create")> <#if token.hasRes("/ajax/wsys/res/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -24,7 +24,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/role/create")> <#if token.hasRes("/ajax/wsys/role/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -34,7 +34,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/taskSql/create")> <#if token.hasRes("/ajax/wsys/taskSql/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -50,7 +50,7 @@
</el-card> </el-card>
<el-card class="box-card data"> <el-card class="box-card data">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/dept/exports")> <#if token.hasRes("/ajax/wsys/dept/exports")>
<el-button type="warning" size="mini" icon="el-icon-download" @click="onExport">导出</el-button> <el-button type="warning" size="mini" icon="el-icon-download" @click="onExport">导出</el-button>

@ -35,7 +35,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/user/create")> <#if token.hasRes("/ajax/wsys/user/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -32,7 +32,7 @@
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
<el-row> <el-row type="flex" justify="space-between">
<el-col :span="12"> <el-col :span="12">
<#if token.hasRes("/ajax/wsys/visitor/create")> <#if token.hasRes("/ajax/wsys/visitor/create")>
<el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button> <el-button type="success" size="mini" icon="el-icon-plus" @click="onCreate">新增</el-button>

@ -244,32 +244,32 @@ public class DataInit {
<#assign index = "0"+index/> <#assign index = "0"+index/>
</#if> </#if>
<#if module.getNeedGenerate()> <#if module.getNeedGenerate()>
forMgr.add(createRes("${index}", "${module.note}菜单", "WEB", "${module.name?upper_case}")); forMgr.add(createRes("00${index}", "${module.note}菜单", "WEB", "${module.name?upper_case}"));
<#list module.tables as table> <#list module.tables as table>
<#if table.isPage()> <#if table.isPage()>
forMgr.add(createRes("${index}01", "${table.tableComment}管理菜单", "WEB", "${module.name?upper_case}_${table.tableName?upper_case}")); forMgr.add(createRes("00${index}01", "${table.tableComment}管理菜单", "WEB", "${module.name?upper_case}_${table.tableName?upper_case}"));
forMgr.add(createRes("${index}0101", "${table.tableComment}管理页", "WEB", "/${module.name}/${table.getFName()}.htm")); forMgr.add(createRes("00${index}0101", "${table.tableComment}管理页", "WEB", "/${module.name}/${table.getFName()}.htm"));
forMgr.add(createRes("${index}010101", "${table.tableComment}模板", "WEB", "/ajax/${module.name}/${table.getFName()}/template")); forMgr.add(createRes("00${index}010101", "${table.tableComment}模板", "WEB", "/ajax/${module.name}/${table.getFName()}/template"));
forMgr.add(createRes("${index}010102", "${table.tableComment}导入", "WEB", "/ajax/${module.name}/${table.getFName()}/imports")); forMgr.add(createRes("00${index}010102", "${table.tableComment}导入", "WEB", "/ajax/${module.name}/${table.getFName()}/imports"));
forMgr.add(createRes("${index}010103", "${table.tableComment}导出", "WEB", "/ajax/${module.name}/${table.getFName()}/exports")); forMgr.add(createRes("00${index}010103", "${table.tableComment}导出", "WEB", "/ajax/${module.name}/${table.getFName()}/exports"));
</#if> </#if>
<#if table.create> <#if table.create>
forMgr.add(createRes("${index}010104", "${table.tableComment}新增", "WEB", "/ajax/${module.name}/${table.getFName()}/create")); forMgr.add(createRes("00${index}010104", "${table.tableComment}新增", "WEB", "/ajax/${module.name}/${table.getFName()}/create"));
</#if> </#if>
<#if table.delete> <#if table.delete>
forMgr.add(createRes("${index}010105", "${table.tableComment}删除", "WEB", "/ajax/${module.name}/${table.getFName()}/delete")); forMgr.add(createRes("00${index}010105", "${table.tableComment}删除", "WEB", "/ajax/${module.name}/${table.getFName()}/delete"));
</#if> </#if>
<#if table.update> <#if table.update>
forMgr.add(createRes("${index}010106", "${table.tableComment}更新", "WEB", "/ajax/${module.name}/${table.getFName()}/update")); forMgr.add(createRes("00${index}010106", "${table.tableComment}更新", "WEB", "/ajax/${module.name}/${table.getFName()}/update"));
</#if> </#if>
<#if table.find> <#if table.find>
forMgr.add(createRes("${index}010107", "${table.tableComment}查询", "WEB", "/ajax/${module.name}/${table.getFName()}/find")); forMgr.add(createRes("00${index}010107", "${table.tableComment}查询", "WEB", "/ajax/${module.name}/${table.getFName()}/find"));
</#if> </#if>
<#if table.get> <#if table.get>
forMgr.add(createRes("${index}010108", "${table.tableComment}获取", "WEB", "/ajax/${module.name}/${table.getFName()}/get")); forMgr.add(createRes("00${index}010108", "${table.tableComment}获取", "WEB", "/ajax/${module.name}/${table.getFName()}/get"));
</#if> </#if>
<#if table.search> <#if table.search>
forMgr.add(createRes("${index}010109", "${table.tableComment}搜索", "WEB", "/ajax/${module.name}/${table.getFName()}/search")); forMgr.add(createRes("00${index}010109", "${table.tableComment}搜索", "WEB", "/ajax/${module.name}/${table.getFName()}/search"));
</#if> </#if>
</#list> </#list>
</#if> </#if>
@ -278,38 +278,38 @@ public class DataInit {
<#if project.isNeedApi()> <#if project.isNeedApi()>
{// API资源 {// API资源
forMgr.add(createRes("A", "接口资源", "API", "A")); forMgr.add(createRes("01", "接口资源", "API", "A"));
forMgr.add(createRes("A01", "基础资源", "API", "A01")); forMgr.add(createRes("0101", "基础资源", "API", "A01"));
forMgr.add(createRes("A0101", "用户登录", "API", "/api/wsys/User/login")); forMgr.add(createRes("010101", "用户登录", "API", "/api/wsys/User/login"));
forMgr.add(createRes("A0102", "字典查询", "API", "/api/wsys/Dict/find")); forMgr.add(createRes("010102", "字典查询", "API", "/api/wsys/Dict/find"));
forMgr.add(createRes("A0103", "加载字典", "API", "/api/wsys/Dict/load")); forMgr.add(createRes("010103", "加载字典", "API", "/api/wsys/Dict/load"));
forMgr.add(createRes("A0104", "文件上传", "API", "/api/wsys/File/upload")); forMgr.add(createRes("010104", "文件上传", "API", "/api/wsys/File/upload"));
forMgr.add(createRes("A0105", "文件下载", "API", "/api/wsys/File/download")); forMgr.add(createRes("010105", "文件下载", "API", "/api/wsys/File/download"));
<#list project.modules as module> <#list project.modules as module>
<#assign index = module_index + 2/> <#assign index = module_index + 2/>
<#if index<10> <#if index<10>
<#assign index = "0"+index/> <#assign index = "0"+index/>
</#if> </#if>
forMgr.add(createRes("A${index}", "${module.note}", "API", "A${module.name?upper_case}")); forMgr.add(createRes("01${index}", "${module.note}", "API", "A${module.name?upper_case}"));
<#list module.tables as table> <#list module.tables as table>
forMgr.add(createRes("A${index}01", "${table.tableComment}", "API", "A${module.name?upper_case}_${table.tableName?upper_case}")); forMgr.add(createRes("01${index}01", "${table.tableComment}", "API", "A${module.name?upper_case}_${table.tableName?upper_case}"));
<#if table.create> <#if table.create>
forMgr.add(createRes("A${index}0101", "${table.tableComment}新增", "API", "/api/${module.name}/${table.getFName()}/create")); forMgr.add(createRes("01${index}0101", "${table.tableComment}新增", "API", "/api/${module.name}/${table.getFName()}/create"));
</#if> </#if>
<#if table.delete> <#if table.delete>
forMgr.add(createRes("A${index}0102", "${table.tableComment}删除", "API", "/api/${module.name}/${table.getFName()}/delete")); forMgr.add(createRes("01${index}0102", "${table.tableComment}删除", "API", "/api/${module.name}/${table.getFName()}/delete"));
</#if> </#if>
<#if table.update> <#if table.update>
forMgr.add(createRes("A${index}0103", "${table.tableComment}更新", "API", "/api/${module.name}/${table.getFName()}/update")); forMgr.add(createRes("01${index}0103", "${table.tableComment}更新", "API", "/api/${module.name}/${table.getFName()}/update"));
</#if> </#if>
<#if table.find> <#if table.find>
forMgr.add(createRes("A${index}0104", "${table.tableComment}查询", "API", "/api/${module.name}/${table.getFName()}/find")); forMgr.add(createRes("01${index}0104", "${table.tableComment}查询", "API", "/api/${module.name}/${table.getFName()}/find"));
</#if> </#if>
<#if table.get> <#if table.get>
forMgr.add(createRes("A${index}0105", "${table.tableComment}获取", "API", "/api/${module.name}/${table.getFName()}/get")); forMgr.add(createRes("01${index}0105", "${table.tableComment}获取", "API", "/api/${module.name}/${table.getFName()}/get"));
</#if> </#if>
<#if table.search> <#if table.search>
forMgr.add(createRes("A${index}0107", "${table.tableComment}搜索", "API", "/api/${module.name}/${table.getFName()}/search")); forMgr.add(createRes("01${index}0107", "${table.tableComment}搜索", "API", "/api/${module.name}/${table.getFName()}/search"));
</#if> </#if>
</#list> </#list>
</#list> </#list>

Loading…
Cancel
Save

Powered by TurnKey Linux.