Browse Source

Merge remote-tracking branch 'origin/master'

user5 5 years ago
parent
commit
a66a6f2eac

+ 5 - 3
src/main/java/com/jeeplus/modules/projectplanweekly/web/ProjectPlanWeeklyController.java

@@ -9,6 +9,8 @@ import com.jeeplus.modules.projectplanweekly.entity.ProjectPlanWeekly;
 import com.jeeplus.modules.projectplanweekly.service.ProjectPlanWeeklyService;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -41,7 +43,7 @@ public class ProjectPlanWeeklyController extends BaseController {
 //        }
 //        return entity;
 //    }
-
+    @RequiresPermissions("projectplan:weekly:list")
     @RequestMapping(value = {"list",""})
     public String list(ProjectPlanWeekly projectPlanWeekly, HttpServletRequest request, HttpServletResponse response, Model model){
         if (null==projectPlanWeekly.getBeginDate()&&null==projectPlanWeekly.getEndDate()){
@@ -60,7 +62,7 @@ public class ProjectPlanWeeklyController extends BaseController {
         model.addAttribute("endDate", projectPlanWeekly.getEndDate());
         return "modules/projectplanweekly/projectPlanWeeklyList";
     }
-
+    @RequiresPermissions(value={"projectplan:weekly:view","projectplan:weekly:add","projectplan:weekly:edit"},logical= Logical.OR)
     @RequestMapping(value = "form")
     public String form(ProjectPlanWeekly projectPlanWeekly, HttpServletRequest request,Model model) {
         if (null!=projectPlanWeekly.getId()&&!projectPlanWeekly.getId().equals("")){
@@ -81,7 +83,7 @@ public class ProjectPlanWeeklyController extends BaseController {
         }
         return "modules/projectplanweekly/projectPlanWeeklyForm";
     }
-
+    @RequiresPermissions(value={"projectplan:weekly:view"},logical=Logical.OR)
     @RequestMapping(value = "view")
     public String view(ProjectPlanWeekly projectPlanWeekly, HttpServletRequest request,Model model){
         if (null!=projectPlanWeekly&&!projectPlanWeekly.getProjectId().equals("")){

+ 17 - 7
src/main/webapp/webpage/modules/projectplanweekly/projectPlanWeeklyList.jsp

@@ -216,8 +216,10 @@
 		<div class="full-width fl">
 			<div class="layui-form contentDetails contentShadow shadowLBR">
 				<div class="nav-btns">
+                    <shiro:hasPermission name="projectplan:weekly:add">
 					<a href="javascript:void(0)" onclick="openDialog('新增个人周报', '${ctx}/projectplan/weekly/form?tabId=1','95%','95%')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp;添加</a>
-					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                    </shiro:hasPermission>
+                    <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
 					<div style="clear: both;"></div>
 				</div>
 				<table class="oa-table layui-table" id="workPlanWeekly"></table>
@@ -243,7 +245,7 @@
                 ,{align:'center',title:'周报内容',width:200,templet:function(d){
                     var xml = "";
                     if (d.remarks != undefined && d.remarks != '' && d.remarks != null) {
-                      xml+= "<a class=\"attention-info\" title=\"" + d.remarks + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/projectplan/weekly/view?id=" + d.id +"&projectId="+d.projectId+"','95%', '95%')\">" + d.remarks + "</a>";
+                        xml+= "<a class=\"attention-info\" title=\"" + d.remarks + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/projectplan/weekly/view?id=" + d.id +"&projectId="+d.projectId+"','95%', '95%')\">" + d.remarks + "</a>";
                     }
 					return xml;
 				}}
@@ -277,16 +279,24 @@
                     }
                     return xml;
 				}}
-                ,{field:'op',align:'center',width:300,title:"操作",templet:function(d){
+                ,{align:'center',width:300,title:"操作",templet:function(d){
                         ////对操作进行初始化
                         var xml="";
                         if(d.weeklyStatus != undefined && d.weeklyStatus =="0")
                         {
                             if (d.btnAgent != undefined && d.btnAgent == '0'){
-                                xml+="<a href=\"#\" onclick=\"openDialog('修改周报信息', '${ctx}/projectplan/weekly/form?id=" + d.id +"','95%', '95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
-                            	xml+="<a href=\"${ctx}/projectplan/weekly/sureWeeklyStatus?id=" + d.id + "&projectId="+d.projectId+"\" onclick=\"return confirmx('确认要完成该工作计划吗?', this.href)\" class=\"op-btn op-btn-op-btn-revert\" style=\"color: white;background: darkseagreen\"><i class=\"fa fa-check\"></i>确认完成</a>";
-                            	xml+="<a href=\"#\" onclick=\"weeklyText('" + d.id+"','"+d.projectId+"')\" class=\"op-btn op-btn-op-btn-revert\" style=\"color: white;background: #ffa44e\" ><i class=\"fa fa-plus-square-o\"></i> 备注</a>";
-                            	xml+="<a href=\"${ctx}/projectplan/weekly/delete?id=" + d.id + "&projectId="+d.projectId+"\" onclick=\"return confirmx('确认要删除该计划信息吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                                <shiro:hasPermission name="projectplan:weekly:edit">
+                                    xml+="<a href=\"#\" onclick=\"openDialog('修改周报信息', '${ctx}/projectplan/weekly/form?id=" + d.id +"','95%', '95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                                </shiro:hasPermission>
+                                <shiro:hasPermission name="projectplan:weekly:del">
+                                xml+="<a href=\"${ctx}/projectplan/weekly/delete?id=" + d.id + "&projectId="+d.projectId+"\" onclick=\"return confirmx('确认要删除该计划信息吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                                </shiro:hasPermission>
+								<shiro:hasPermission name="projectplan:weekly:complete">
+                                    xml+="<a href=\"${ctx}/projectplan/weekly/sureWeeklyStatus?id=" + d.id + "&projectId="+d.projectId+"\" onclick=\"return confirmx('确认要完成该工作计划吗?', this.href)\" class=\"op-btn op-btn-op-btn-revert\" style=\"color: white;background: darkseagreen\"><i class=\"fa fa-check\"></i>确认完成</a>";
+                                </shiro:hasPermission>
+                                <shiro:hasPermission name="projectplan:weekly:text">
+                                    xml+="<a href=\"#\" onclick=\"weeklyText('" + d.id+"','"+d.projectId+"')\" class=\"op-btn op-btn-op-btn-revert\" style=\"color: white;background: #ffa44e\" ><i class=\"fa fa-plus-square-o\"></i> 备注</a>";
+                                </shiro:hasPermission>
                             }
 						}
                         return xml;

+ 1 - 1
src/main/webapp/webpage/modules/projectplanweekly/projectPlanWeeklyView.jsp

@@ -114,7 +114,7 @@
                         <form:textarea path="remarks"  htmlEscape="false" rows="5" maxlength="127" readonly="true" class="form-control"/>
                     </div>
                 </div>
-                <c:if test="${weeklyStatus} =='0'">
+                <c:if test="${weeklyStatus == '0'}">
                     <div class="layui-item layui-col-sm12  with-textarea" style="margin-top: 10px">
                         <label class="layui-form-label">未完成原因:</label>
                         <div class="layui-input-block">