Pārlūkot izejas kodu

限制清障人员只有查看操作权限

minitiger 8 gadi atpakaļ
vecāks
revīzija
2c856a373a

+ 19 - 4
VisualInspection/js/other_check/other_check.js

@@ -203,6 +203,14 @@ function queryTable(){
         "dept_id":$("#second").val(),
         "check_type":check_type
     }
+    hide = true;
+    if(check_type==5){
+        hide = false;
+    }
+    operation = true;
+    if(check_type==5){
+        hide = false;
+    }
     var cols = [
                     {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
                     {width: 50, text: '时间', flex: false,colClass: '',field:'check_time'},
@@ -212,11 +220,13 @@ function queryTable(){
                     {width: 50, text: '扣分值', flex: false,colClass: '',field:'check_score'},
                     {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'},
                     {width: 50, text: '扣分描述', flex: false,colClass: '',field:'remark'},
-                    {width: 50, text: '操作',  flex: false, colClass: '',field:'id',oper:[
-                        {func:'updateCheckTeam',text:'修改',icon_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',icon_class:'icon-remove-circle'}
-                    ]},
+                    {width: 50, text: '检查类型', flex: false,hide: hide,field:'wrecker_check_type_name'}
                 ] ;
-    
+    if(roleContains("JICHA") || hasRole("ROLE_ADMIN")){
+        cols.push({width: 50, text: '操作',  flex: false,hide: hide,field:'id',oper:[
+            {func:'updateCheckTeam',text:'修改',icon_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',icon_class:'icon-remove-circle'}
+        ]});
+    }
     $('.datatable').mytable({'cols':cols,
                             'url':"checkOther/getCheckByDeptId",
                             'param':data}
@@ -320,6 +330,11 @@ function refreshUploader(){
         if (roleContains("ROAD_MANAGER")) {
             $("#first").attr("disabled", "disabled");
         }
+
+        if (!(roleContains("JICHA")|| hasRole("ROLE_ADMIN"))) {
+            $("#add_btn").hide();
+            // $("#second").hide();
+        }
     }
      /**
      * 根据道管中心获取收费站列表(下拉框)

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckOther.java

@@ -52,4 +52,6 @@ public class CheckOther {
     private String check_item_name;
     // 清障检查类型
     private Integer wrecker_check_type;
+    // 清障检查类型
+    private String wrecker_check_type_name;
 }

+ 6 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckOtherController.java

@@ -20,6 +20,7 @@ import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.Team;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.CheckOtherService;
+import com.xintong.visualinspection.util.CodeUtil;
 import com.xintong.visualinspection.util.Constants;
 
 /**
@@ -77,6 +78,11 @@ public class CheckOtherController extends BaseController {
     public String getCheckByDeptId(@RequestBody CheckOther checkOther,@PathVariable Integer page,@PathVariable Integer size){
     	PageHelper.startPage(page, size);
     	List<CheckOther> checkOtherList = checkOtherService.getCheckByDeptId(checkOther);
+    	for(CheckOther co : checkOtherList){
+    		if(co.getWrecker_check_type()!=null){
+    			co.setWrecker_check_type_name(CodeUtil.getCodeNameByFlagAndValue("wrecker_group_check_type", co.getWrecker_check_type()+""));
+    		}
+    	}
     	return super.returnSuccessResult(new PageInfo(checkOtherList));
     }
 }