1、文件样例配置审核通过后,删除本地文件;2、修正配置列表时间查询条件与排序设置。
This commit is contained in:
@@ -33,7 +33,7 @@ public class AvController extends BaseController {
|
|||||||
//音视频文件样例配置列表
|
//音视频文件样例配置列表
|
||||||
@RequestMapping(value = {"/sample/fileSampleList"})
|
@RequestMapping(value = {"/sample/fileSampleList"})
|
||||||
public String fileSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvFileSampleCfg entity){
|
public String fileSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvFileSampleCfg entity){
|
||||||
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response), entity);
|
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response,"a"), entity);
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model);
|
initPageCondition(model);
|
||||||
return "/cfg/av/fileSampleList";
|
return "/cfg/av/fileSampleList";
|
||||||
@@ -41,7 +41,7 @@ public class AvController extends BaseController {
|
|||||||
//音视频标志样例配置列表
|
//音视频标志样例配置列表
|
||||||
@RequestMapping(value = {"/sample/signSampleList"})
|
@RequestMapping(value = {"/sample/signSampleList"})
|
||||||
public String signSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvSignSampleCfg entity){
|
public String signSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvSignSampleCfg entity){
|
||||||
Page<AvSignSampleCfg> page = avCfgService.getAvSignSampleList(new Page<AvSignSampleCfg>(request, response), entity);
|
Page<AvSignSampleCfg> page = avCfgService.getAvSignSampleList(new Page<AvSignSampleCfg>(request, response,"a"), entity);
|
||||||
model.addAttribute("page", page);
|
model.addAttribute("page", page);
|
||||||
initPageCondition(model);
|
initPageCondition(model);
|
||||||
return "/cfg/av/signSampleList";
|
return "/cfg/av/signSampleList";
|
||||||
@@ -86,7 +86,7 @@ public class AvController extends BaseController {
|
|||||||
File uploadSampleFile = new File(sampleFilePath+sep+sampleFileName);
|
File uploadSampleFile = new File(sampleFilePath+sep+sampleFileName);
|
||||||
FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);
|
FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);
|
||||||
FileCopyUtils.copy(sampleFile.getBytes(),uploadSampleFile);
|
FileCopyUtils.copy(sampleFile.getBytes(),uploadSampleFile);
|
||||||
String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+request.getContextPath();
|
String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();
|
||||||
String srcUrl = host+"/srcFile/"+uploadSrcFile.getName();
|
String srcUrl = host+"/srcFile/"+uploadSrcFile.getName();
|
||||||
String sampleUrl = host+"/sampleFile/"+uploadSampleFile.getName();
|
String sampleUrl = host+"/sampleFile/"+uploadSampleFile.getName();
|
||||||
logger.info("srcUrl:"+srcUrl);
|
logger.info("srcUrl:"+srcUrl);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.nis.domain.configuration.AvSignSampleCfg;
|
|||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.FileUtils;
|
import com.nis.util.FileUtils;
|
||||||
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.AvCfgDao;
|
import com.nis.web.dao.configuration.AvCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
@@ -149,44 +150,73 @@ public class AvCfgService extends BaseService{
|
|||||||
entity.setIsValid(isValid);
|
entity.setIsValid(isValid);
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
entity.setAuditTime(new Date());
|
entity.setAuditTime(new Date());
|
||||||
|
|
||||||
|
String oldSrcUrl = entity.getSrcPath();
|
||||||
|
String oldSampleUrl = entity.getSamplePath();
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
//音视频文件上传接口调用
|
//音视频文件上传接口调用
|
||||||
try {
|
try {
|
||||||
File srcFile = new File(entity.getSrcPath());
|
File srcFile = new File(oldSrcUrl);
|
||||||
Map<String,Object> srcMap = new HashMap();
|
Map<String,Object> srcMap = new HashMap();
|
||||||
srcMap.put("filetype", FileUtils.getSuffix(srcFile.getName(), false));
|
srcMap.put("filetype", FileUtils.getSuffix(srcFile.getName(), false));
|
||||||
|
srcMap.put("datatype", "dbSystem");//源文件存入数据中心
|
||||||
srcMap.put("createTime", entity.getCreateTime());
|
srcMap.put("createTime", entity.getCreateTime());
|
||||||
srcMap.put("key",FileUtils.getPrefix(srcFile.getName(), false));
|
srcMap.put("key",FileUtils.getPrefix(srcFile.getName(), false));
|
||||||
srcMap.put("fileName", srcFile.getName());
|
srcMap.put("fileName", srcFile.getName());
|
||||||
srcMap.put("checksum", entity.getSrcMd5());
|
srcMap.put("checksum", entity.getSrcMd5());
|
||||||
String result1 = ConfigServiceUtil.postFileCfg(null, srcFile, JSONObject.fromObject(srcMap));
|
String result1 = ConfigServiceUtil.postFileCfg(null, srcFile, JSONObject.fromObject(srcMap));
|
||||||
logger.info("音视频源文件上传响应信息:"+result1);
|
logger.info("音视频源文件上传响应信息:"+result1);
|
||||||
//获取文件上传响应信息(文件访问路径)
|
//获取文件上传响应信息(新的文件访问路径)
|
||||||
Map<String, Object> srcRes = gson.fromJson(result1,Map.class);
|
Map<String, Object> srcRes = gson.fromJson(result1,Map.class);
|
||||||
entity.setSrcUrl(srcRes.get("data").toString());
|
String srcAccessUrl = null;
|
||||||
|
if(!StringUtil.isEmpty(srcRes.get("data"))){
|
||||||
File smapleFile = new File(entity.getSamplePath());
|
Map<String,Object> data = (Map<String,Object>)srcRes.get("data");
|
||||||
|
if(!StringUtil.isEmpty(data.get("accessUrl"))){
|
||||||
|
srcAccessUrl=data.get("accessUrl").toString();
|
||||||
|
entity.setSrcUrl(srcAccessUrl);
|
||||||
|
// entity.setSrcPath("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
File sampleFile = new File(oldSampleUrl);
|
||||||
Map<String,Object> sampleMap = new HashMap();
|
Map<String,Object> sampleMap = new HashMap();
|
||||||
sampleMap.put("filetype", FileUtils.getSuffix(smapleFile.getName(), false));
|
sampleMap.put("filetype", FileUtils.getSuffix(sampleFile.getName(), false));
|
||||||
|
srcMap.put("datatype", "fileSystem");//样例文件存入fastdfs
|
||||||
sampleMap.put("createTime", entity.getCreateTime());
|
sampleMap.put("createTime", entity.getCreateTime());
|
||||||
sampleMap.put("key",FileUtils.getPrefix(smapleFile.getName(), false));
|
sampleMap.put("key",FileUtils.getPrefix(sampleFile.getName(), false));
|
||||||
sampleMap.put("fileName", smapleFile.getName());
|
sampleMap.put("fileName", sampleFile.getName());
|
||||||
sampleMap.put("checksum", entity.getSampleMd5());
|
sampleMap.put("checksum", entity.getSampleMd5());
|
||||||
String result2 = ConfigServiceUtil.postFileCfg(null, srcFile, JSONObject.fromObject(sampleMap));
|
String result2 = ConfigServiceUtil.postFileCfg(null, srcFile, JSONObject.fromObject(sampleMap));
|
||||||
logger.info("音视频样例文件上传响应信息:"+result2);
|
logger.info("音视频样例文件上传响应信息:"+result2);
|
||||||
|
|
||||||
|
//获取文件上传响应信息(新的文件访问路径)
|
||||||
Map<String, Object> sampleRes = gson.fromJson(result1,Map.class);
|
Map<String, Object> sampleRes = gson.fromJson(result1,Map.class);
|
||||||
//获取文件上传响应信息(文件访问路径)
|
String sampleAccessUrl = null;
|
||||||
entity.setSampleUrl(sampleRes.get("data").toString());
|
if(!StringUtil.isEmpty(sampleRes.get("data"))){
|
||||||
|
Map<String,Object> data = (Map<String,Object>)sampleRes.get("data");
|
||||||
|
if(!StringUtil.isEmpty(data.get("accessUrl"))){
|
||||||
|
sampleAccessUrl = data.get("accessUrl").toString();
|
||||||
|
entity.setSampleUrl(sampleAccessUrl);
|
||||||
|
// entity.setSamplePath("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.info("音视频文件样例配置下发失败");
|
logger.info("音视频文件样例配置下发失败");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
avCfgDao.auditAvFileSample(entity);
|
||||||
avCfgDao.auditAvFileSample(entity);
|
//删除本地源文件和样例文件
|
||||||
|
if(!oldSrcUrl.equals(entity.getSrcUrl())){
|
||||||
|
FileUtils.deleteFile(oldSrcUrl);
|
||||||
|
}
|
||||||
|
if(!oldSampleUrl.equals(entity.getSampleUrl())){
|
||||||
|
FileUtils.deleteFile(oldSampleUrl);
|
||||||
|
}
|
||||||
list.add(entity);
|
list.add(entity);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ src_file=src file
|
|||||||
select_file=please select file
|
select_file=please select file
|
||||||
sample_file=sample file
|
sample_file=sample file
|
||||||
sample_sign=sample sign
|
sample_sign=sample sign
|
||||||
click_detail=please click\u201Cshow detail\u201Dbutton\uFF0Cview detailed error information\uFF0Cthanks\uFF01
|
click_detail=please click\u201Cview detail\u201Dbutton\uFF0Cview detailed error information\uFF0Cthanks\uFF01
|
||||||
return_lastpage=return last page
|
return_lastpage=return last page
|
||||||
show_detail=view detail
|
show_detail=view detail
|
||||||
hidden_detail=hide detail
|
hidden_detail=hide detail
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ src_file=src file
|
|||||||
select_file=please select file
|
select_file=please select file
|
||||||
sample_file=sample file
|
sample_file=sample file
|
||||||
sample_sign=sample sign
|
sample_sign=sample sign
|
||||||
click_detail=please click\u201Cshow detail\u201Dbutton\uFF0Cview detailed error information\uFF0Cthanks\uFF01
|
click_detail=please click\u201Cview detail\u201Dbutton\uFF0Cview detailed error information\uFF0Cthanks\uFF01
|
||||||
return_lastpage=return last page
|
return_lastpage=return last page
|
||||||
show_detail=view detail
|
show_detail=view detail
|
||||||
hidden_detail=hide detail
|
hidden_detail=hide detail
|
||||||
|
|||||||
@@ -282,11 +282,11 @@
|
|||||||
<th><spring:message code="valid_identifier"/></th>
|
<th><spring:message code="valid_identifier"/></th>
|
||||||
<th><spring:message code="is_audit"/></th>
|
<th><spring:message code="is_audit"/></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||||
<th><spring:message code="editor"/></th>
|
<th><spring:message code="editor"/></th>
|
||||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||||
<th><spring:message code="auditor"/></th>
|
<th><spring:message code="auditor"/></th>
|
||||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -117,11 +117,11 @@
|
|||||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<shiro:hasPermission name="avFileSample:config">
|
<shiro:hasPermission name="avSignSample:config">
|
||||||
<sys:delRow url="${ctx}/ntc/av/sample/signSampleForm" id="contentTable" label="update"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/sample/signSampleForm" id="contentTable" label="update"></sys:delRow>
|
||||||
<sys:delRow url="${ctx}/ntc/av/sample/updateAvSignSampleValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
<sys:delRow url="${ctx}/ntc/av/sample/updateAvSignSampleValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>
|
||||||
<shiro:hasPermission name="avFileSample:audit">
|
<shiro:hasPermission name="avSignSample:audit">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||||
@@ -285,11 +285,11 @@
|
|||||||
<th><spring:message code="valid_identifier"/></th>
|
<th><spring:message code="valid_identifier"/></th>
|
||||||
<th><spring:message code="is_audit"/></th>
|
<th><spring:message code="is_audit"/></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||||
<th><spring:message code="editor"/></th>
|
<th><spring:message code="editor"/></th>
|
||||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||||
<th><spring:message code="auditor"/></th>
|
<th><spring:message code="auditor"/></th>
|
||||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if (Servlets.isAjaxRequest(request)) {
|
|||||||
if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
|
if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
|
||||||
out.print(StringUtils.replace(ex.getMessage(), "msg:", ""));
|
out.print(StringUtils.replace(ex.getMessage(), "msg:", ""));
|
||||||
}else{
|
}else{
|
||||||
out.print("操作权限不足.");
|
out.print("<spring:message code=\"no_permission\"/>.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +1,141 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>菜单管理</title>
|
<title>菜单管理</title>
|
||||||
|
|
||||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
<link
|
||||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css"
|
||||||
|
rel="stylesheet" type="text/css" />
|
||||||
<script type="text/javascript">
|
<script
|
||||||
$(document).ready(function() {
|
src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js"
|
||||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
type="text/javascript"></script>
|
||||||
});
|
|
||||||
function updateSort() {
|
<script type="text/javascript">
|
||||||
loading('正在提交,请稍等...');
|
$(document).ready(function() {
|
||||||
$("#listForm").attr("action", "${ctx}/sys/menu/updateSort");
|
$("#treeTable").treeTable({
|
||||||
$("#listForm").submit();
|
expandLevel : 3
|
||||||
}
|
}).show();
|
||||||
</script>
|
});
|
||||||
|
function updateSort() {
|
||||||
|
loading('正在提交,请稍等...');
|
||||||
|
$("#listForm").attr("action", "${ctx}/sys/menu/updateSort");
|
||||||
|
$("#listForm").submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="theme-panel hidden-xs hidden-sm">
|
<div class="theme-panel hidden-xs hidden-sm">
|
||||||
|
|
||||||
<shiro:hasPermission name="sys:menu:edit"><button type="button" class="btn btn-primary"
|
<shiro:hasPermission name="sys:menu:edit">
|
||||||
onClick="javascript:window.location='${ctx}/sys/menu/form'"> <spring:message code="add"/> </button></shiro:hasPermission>
|
<button type="button" class="btn btn-primary"
|
||||||
|
onClick="javascript:window.location='${ctx}/sys/menu/form'">
|
||||||
|
|
||||||
|
<spring:message code="add" />
|
||||||
|
|
||||||
|
</button>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="menuManage"/>
|
<spring:message code="menuManage" />
|
||||||
<small><spring:message code="date_list"/></small>
|
<small><spring:message code="date_list" /></small>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<h5 class="page-header"></h5>
|
<h5 class="page-header"></h5>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
|
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
||||||
<div class="row" >
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<sys:message content="${message}"/>
|
<sys:message content="${message}" />
|
||||||
<form id="listForm" method="post">
|
<form id="listForm" method="post">
|
||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable"
|
||||||
<thead><tr><th><spring:message code="menu_name"/></th><th><spring:message code="unicode"/></th><th><spring:message code="link"/></th><th style="text-align:center;"><spring:message code="sort"/></th><th><spring:message code="visible"/></th><th><spring:message code="permission_mark"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
|
class="table table-striped table-bordered table-condensed">
|
||||||
<tbody><c:forEach items="${list}" var="menu">
|
<thead>
|
||||||
<tr id="${menu.id}" pId="${menu.parent.id ne 1?menu.parent.id:0}">
|
<tr>
|
||||||
<td nowrap><i class="${not empty menu.icon?menu.icon:' hide'} font-blue-sharp"></i> <a href="${ctx}/sys/menu/form?id=${menu.id}">${menu.name}</a></td>
|
<th><spring:message code="menu_name" /></th>
|
||||||
<td>${menu.code}</td>
|
<th><spring:message code="unicode" /></th>
|
||||||
<td title="${menu.href}">${fns:abbr(menu.href,30)}</td>
|
<th><spring:message code="functionId" /></th>
|
||||||
<td style="text-align:center;">
|
<th><spring:message code="link" /></th>
|
||||||
<shiro:hasPermission name="sys:menu:edit">
|
<th style="text-align:center;"><spring:message
|
||||||
<input type="hidden" name="ids" value="${menu.id}"/>
|
code="sort" /></th>
|
||||||
<input name="sorts" type="text" value="${menu.sort}" style="width:50px;margin:0;padding:0;text-align:center;border: 1px solid #ddd;">
|
<th><spring:message code="visible" /></th>
|
||||||
</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">
|
<th><spring:message code="permission_mark" /></th>
|
||||||
${menu.sort}
|
<shiro:hasPermission name="sys:menu:edit">
|
||||||
</shiro:lacksPermission>
|
<th><spring:message code="operation" /></th>
|
||||||
</td>
|
</shiro:hasPermission>
|
||||||
<td><c:choose><c:when test="${menu.isShow eq '1'}"><spring:message code="display"/></c:when><c:otherwise><spring:message code="hide"/></c:otherwise></c:choose></td>
|
|
||||||
<td title="${menu.permission}">${fns:abbr(menu.permission,30)}</td>
|
|
||||||
<shiro:hasPermission name="sys:menu:edit"><td nowrap>
|
|
||||||
<a href="${ctx}/sys/menu/form?id=${menu.id}"><spring:message code="edit"/></a>
|
|
||||||
<a href="${ctx}/sys/menu/delete?id=${menu.id}" onclick="return confirmx('<spring:message code="delete_all_child"/>', this.href)"><spring:message code="delete"/></a>
|
|
||||||
<a href="${ctx}/sys/menu/form?parent.id=${menu.id}"><spring:message code="add_child_menu"></spring:message></a>
|
|
||||||
</td></shiro:hasPermission>
|
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach></tbody>
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="${list}" var="menu">
|
||||||
|
<tr id="${menu.id}"
|
||||||
|
pId="${menu.parent.id ne 1?menu.parent.id:0}">
|
||||||
|
<td nowrap><i
|
||||||
|
class="${not empty menu.icon?menu.icon:' hide'} font-blue-sharp"></i>
|
||||||
|
<a href="${ctx}/sys/menu/form?id=${menu.id}">${menu.name}</a></td>
|
||||||
|
<td>${menu.code}</td>
|
||||||
|
<td>${menu.functionId}</td>
|
||||||
|
<td title="${menu.href}">${fns:abbr(menu.href,30)}</td>
|
||||||
|
<td style="text-align:center;"><shiro:hasPermission
|
||||||
|
name="sys:menu:edit">
|
||||||
|
<input type="hidden" name="ids" value="${menu.id}" />
|
||||||
|
<input name="sorts" type="text" value="${menu.sort}"
|
||||||
|
style="width:50px;margin:0;padding:0;text-align:center;border: 1px solid #ddd;">
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<shiro:lacksPermission name="sys:menu:edit">
|
||||||
|
${menu.sort}
|
||||||
|
</shiro:lacksPermission></td>
|
||||||
|
<td><c:choose>
|
||||||
|
<c:when test="${menu.isShow eq '1'}">
|
||||||
|
<spring:message code="display" />
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<spring:message code="hide" />
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose></td>
|
||||||
|
<td title="${menu.permission}">${fns:abbr(menu.permission,30)}</td>
|
||||||
|
<shiro:hasPermission name="sys:menu:edit">
|
||||||
|
<td nowrap><a
|
||||||
|
href="${ctx}/sys/menu/form?id=${menu.id}"><spring:message
|
||||||
|
code="edit" /></a> <a
|
||||||
|
href="${ctx}/sys/menu/delete?id=${menu.id}"
|
||||||
|
onclick="return confirmx('<spring:message code="delete_all_child"/>', this.href)"><spring:message
|
||||||
|
code="delete" /></a> <a
|
||||||
|
href="${ctx}/sys/menu/form?parent.id=${menu.id}"><spring:message
|
||||||
|
code="add_child_menu"></spring:message></a></td>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<shiro:hasPermission name="sys:menu:edit"><div class="form-actions pagination-left">
|
<shiro:hasPermission name="sys:menu:edit">
|
||||||
<button id="btnSubmit" class="btn btn-primary" type="button" onclick="updateSort();"><spring:message code="save_sort"/></button>
|
<div class="form-actions pagination-left">
|
||||||
</div></shiro:hasPermission>
|
<button id="btnSubmit" class="btn btn-primary" type="button"
|
||||||
</form>
|
onclick="updateSort();">
|
||||||
|
<spring:message code="save_sort" />
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</shiro:hasPermission>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user