菜单选择设置默认值

pull/22/head
RuoYi 2018-08-08 20:58:47 +08:00
parent c42f2d9f3a
commit 6bf77f610e
2 changed files with 3 additions and 3 deletions

View File

@ -178,7 +178,7 @@ public class MenuController extends BaseController
@GetMapping("/selectMenuTree/{menuId}") @GetMapping("/selectMenuTree/{menuId}")
public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap) public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap)
{ {
mmap.put("treeName", menuService.selectMenuById(menuId).getMenuName()); mmap.put("menu", menuService.selectMenuById(menuId));
return prefix + "/tree"; return prefix + "/tree";
} }
} }

View File

@ -8,8 +8,8 @@ body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;} button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style> </style>
<body class="hold-transition box box-main"> <body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden"/> <input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
<input id="treeName" name="treeName" type="hidden" th:value="${treeName}"/> <input id="treeName" name="treeName" type="hidden" th:value="${menu.menuName}"/>
<div class="wrapper"><div class="treeShowHideButton" onclick="search();"> <div class="wrapper"><div class="treeShowHideButton" onclick="search();">
<label id="btnShow" title="显示搜索" style="display:none;"></label> <label id="btnShow" title="显示搜索" style="display:none;"></label>
<label id="btnHide" title="隐藏搜索"></label> <label id="btnHide" title="隐藏搜索"></label>