diff options
| author | wangwenrui <[email protected]> | 2018-10-23 17:25:29 +0800 |
|---|---|---|
| committer | wangwenrui <[email protected]> | 2018-10-23 17:25:29 +0800 |
| commit | ab59e338a154a1eca18fee247f8913f1ecb387f4 (patch) | |
| tree | 6eff16c20e77dc8882d940b66a662b576c320b18 | |
| parent | faefebe89a879087a897e5cd019b9014a6b9c3dd (diff) | |
用户管理功能调整
| -rw-r--r-- | WebRoot/i18n/globalMessages_en_US.properties | 6 | ||||
| -rw-r--r-- | WebRoot/i18n/globalMessages_zh_CN.properties | 10 | ||||
| -rw-r--r-- | WebRoot/page/system/addUser.jsp | 26 | ||||
| -rw-r--r-- | WebRoot/page/system/updateUser.jsp | 24 | ||||
| -rw-r--r-- | WebRoot/page/system/usergroup/giveGrouppermission/groupInfoList.jsp | 2 | ||||
| -rw-r--r-- | src/nis/nms/core/Constants.java | 8 | ||||
| -rw-r--r-- | src/nis/nms/web/actions/detection/MonitorDataAction.java | 9 | ||||
| -rw-r--r-- | src/nis/nms/web/actions/sysManage/SysPopedomManageAction.java | 22 |
8 files changed, 96 insertions, 11 deletions
diff --git a/WebRoot/i18n/globalMessages_en_US.properties b/WebRoot/i18n/globalMessages_en_US.properties index 0f90ab3..4e786c2 100644 --- a/WebRoot/i18n/globalMessages_en_US.properties +++ b/WebRoot/i18n/globalMessages_en_US.properties @@ -3754,10 +3754,10 @@ amki.message.state1=Invalid au.message.title=Add user information au.message.yhbh1=Username already exists! au.text.yhbh=Username -au.message.hasSpecialChar=There are special characters in the user name. Please re-enter it. -au.message.hasZH=Username cannot include Chinese, please re-enter +au.message.hasSpecialChar=Tip: only English letters and Numbers are allowed +au.message.hasZH=Tip: only English letters and Numbers are allowed au.message.onlyNumber=Username cannot be a pure number -au.message.cannotHasZH=Character and numbers are mixed,can not include specil character +au.message.cannotHasZH=Tip: only English letters and Numbers are allowed au.text.yhmc=Real Name au.message.email=E-mail format is incorrect, please re-enter! au.message.js=Please select at least one character! diff --git a/WebRoot/i18n/globalMessages_zh_CN.properties b/WebRoot/i18n/globalMessages_zh_CN.properties index 1ab3a0f..b6fbbf6 100644 --- a/WebRoot/i18n/globalMessages_zh_CN.properties +++ b/WebRoot/i18n/globalMessages_zh_CN.properties @@ -19,8 +19,8 @@ main.message.stateInfo2=全部成功 main.message.stateInfo3=全部失败 main.message.stateInfo4=部分成功 main.message.info=下列任务已完成 -main.text.logout=退出系统 -main.text.systemSelect=系统切换 +main.text.logout=退出视图 +main.text.systemSelect=视图切换 main.text.welcome=您好 main.text.systemName=当前视图 main.message.I3=浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。 @@ -3756,10 +3756,10 @@ amki.message.state1=无效 au.message.title=添加用户信息 au.message.yhbh1=用户名已存在! au.text.yhbh=用户名 -au.message.hasSpecialChar=用户名存在特殊字符,请重新输入 -au.message.hasZH=用户名不能包括中文,请重新输入 +au.message.hasSpecialChar=提示 :只允许英文字母和数字 +au.message.hasZH=提示 :只允许英文字母和数字 au.message.onlyNumber=用户名不能为纯数字 -au.message.cannotHasZH=字符和数字混合,不能包括特殊字符 +au.message.cannotHasZH=提示 :只允许英文字母和数字 au.text.yhmc=真实姓名 au.message.email=E-mail格式不正确,请重新输入! au.message.js=请至少选择一个角色! diff --git a/WebRoot/page/system/addUser.jsp b/WebRoot/page/system/addUser.jsp index e4e35a8..91c7265 100644 --- a/WebRoot/page/system/addUser.jsp +++ b/WebRoot/page/system/addUser.jsp @@ -193,7 +193,7 @@ $(function(){
var nationRole=${session.nationRole};//配置文件中获取
-
+ var preView=${preViewIds};
if(nationRole==null||nationRole=="-1"){
$("input[type='button']").attr("disabled","disabled");
alert("please add or modify 'myconfig.properties' ,there need a parameter 'nation.role.jsbh'");
@@ -213,7 +213,7 @@ });
}
}
-
+ preViewCheck(preView);
$(urole).click(function(){
var uroleVal=this.value;
@@ -224,6 +224,7 @@ }else{
$(group).removeProp("disabled");
$(group).removeProp("checked");
+ preViewCheck(preView);
$(group).click(function(){
if(this.checked||this.checked=="checked"){
$(group).removeProp("checked");
@@ -235,6 +236,27 @@ });
+ function preViewCheck(preView){
+ if(preView!=null&&preView!=""&&preView!=undefined){
+ var objGroup=$("input[name='group']");
+ var flag=false;
+ for(var i=0;i<objGroup.length;i++){
+ var value=$(objGroup[i]).val();
+ for(var j=0;j<preView.length;j++){
+ console.log(preView[j]+"-->"+$(objGroup[i]).val());
+ var preValue=preView[j];
+
+ if(value==preValue){
+ flag=true;
+ }
+ }
+ if(!flag){
+ $(objGroup[i]).attr("disabled","disabled");
+ }
+ flag=false;
+ }
+ }
+ }
</script>
</head>
<body>
diff --git a/WebRoot/page/system/updateUser.jsp b/WebRoot/page/system/updateUser.jsp index 9eddaab..5c73d98 100644 --- a/WebRoot/page/system/updateUser.jsp +++ b/WebRoot/page/system/updateUser.jsp @@ -107,6 +107,7 @@ $(function(){
var nationRole=${session.nationRole};//配置文件中获取
+ var preView=${preViewIds};
if(nationRole==null||nationRole=="-1"){
$("input[type='button']").attr("disabled","disabled");
alert("please add or modify 'myconfig.properties' ,there need a parameter 'nation.role.jsbh'");
@@ -127,6 +128,7 @@ });
}
}
+ preViewCheck(preView);
$(urole).click(function(){
var uroleVal=this.value;
if(uroleVal!=null&&uroleVal!=""&&uroleVal==nationRole){//角色选择为 nation role ,选择所有用户组,不允许修改
@@ -135,6 +137,7 @@ }else{
$(group).removeAttr("disabled");
$(group).removeAttr("checked");
+ preViewCheck(preView);
$(group).click(function(){
if(this.checked||this.checked=="checked"){
$(group).removeAttr("checked");
@@ -146,6 +149,27 @@ });
+ function preViewCheck(preView){
+ if(preView!=null&&preView!=""&&preView!=undefined){
+ var objGroup=$("input[name='group']");
+ var flag=false;
+ for(var i=0;i<objGroup.length;i++){
+ var value=$(objGroup[i]).val();
+ for(var j=0;j<preView.length;j++){
+ console.log(preView[j]+"-->"+$(objGroup[i]).val());
+ var preValue=preView[j];
+
+ if(value==preValue){
+ flag=true;
+ }
+ }
+ if(!flag){
+ $(objGroup[i]).attr("disabled","disabled");
+ }
+ flag=false;
+ }
+ }
+ }
</script>
</head>
<body>
diff --git a/WebRoot/page/system/usergroup/giveGrouppermission/groupInfoList.jsp b/WebRoot/page/system/usergroup/giveGrouppermission/groupInfoList.jsp index 6a7f30f..5e34a65 100644 --- a/WebRoot/page/system/usergroup/giveGrouppermission/groupInfoList.jsp +++ b/WebRoot/page/system/usergroup/giveGrouppermission/groupInfoList.jsp @@ -320,7 +320,7 @@ <table border="0" cellpadding="0" cellspacing="0" class="table" id="info">
<tr>
<td class="color_top"> i18n_gil.text.index_n81i </td>
- <td class="color_top">i18n_gil.text.userGroupDesc_n81i</td>
+ <td class="color_top">i18n_gil.text.userGroup_n81i</td>
<td class="color_top" >i18n_gil.text.userGroupDesc_n81i</td>
<td class="color_top">i18n_gil.text.state_n81i</td>
<td class="color_8" >i18n_gil.text.operation_n81i</td>
diff --git a/src/nis/nms/core/Constants.java b/src/nis/nms/core/Constants.java index d85a04f..2374c6d 100644 --- a/src/nis/nms/core/Constants.java +++ b/src/nis/nms/core/Constants.java @@ -234,7 +234,15 @@ public class Constants { public static final String NATION_ROLE; public static final String DEPT_MK_ID; + + public static final String PREFABRICATE_VIEW; static { + if(rb.containsKey("prefabricate.view")){ + PREFABRICATE_VIEW=rb.getString("prefabricate.view"); + }else{ + PREFABRICATE_VIEW=""; + } + if(rb.containsKey("dept.mk.id")){ DEPT_MK_ID=rb.getString("dept.mk.id"); }else{ diff --git a/src/nis/nms/web/actions/detection/MonitorDataAction.java b/src/nis/nms/web/actions/detection/MonitorDataAction.java index 3a9f9b6..e6b59c2 100644 --- a/src/nis/nms/web/actions/detection/MonitorDataAction.java +++ b/src/nis/nms/web/actions/detection/MonitorDataAction.java @@ -297,6 +297,9 @@ public class MonitorDataAction extends BaseAction { if (ctn != null && !"".equals(ctn)) {
sqlBuffer.append(" and cti.id =" + ctn);
}
+ if(checkType!=null&&checkType!=-1){
+ sqlBuffer.append(" and cti.id="+checkType);
+ }
if (!this.getAdminMark()) {
sqlBuffer.append(" and (((( cti.view_level=1 and cti.user_id=");
sqlBuffer.append(this.getUserID());
@@ -519,6 +522,9 @@ public class MonitorDataAction extends BaseAction { sqlBuffer.append(" and Upper(cti.Check_Type_Name1) like '%" + ctn.toUpperCase() + "%'");
}
+ if(checkType!=null&&checkType!=-1){
+ sqlBuffer.append(" and cti.id="+checkType);
+ }
if (StringUtils.isNotBlank(stateInfo)) {
sqlBuffer.append(" and din.detection_state_info like '%" + stateInfo + "%'");
}
@@ -646,6 +652,9 @@ public class MonitorDataAction extends BaseAction { if (cip != null && !"".equals(cip) && !"null".equals(cip)) {
sqlBuffer.append(" and nt.node_ip like '%" + cip.trim() + "%'");
}
+ if(checkType!=null&&checkType!=-1){
+ sqlBuffer.append(" and cti.id="+checkType);
+ }
if (nodeIpRange != null && !"".equals(nodeIpRange) && !"null".equals(nodeIpRange)) {
sqlBuffer.append(" and nt.node_ip like '" + nodeIpRange + "%'");
}
diff --git a/src/nis/nms/web/actions/sysManage/SysPopedomManageAction.java b/src/nis/nms/web/actions/sysManage/SysPopedomManageAction.java index 1be5e5e..17afc04 100644 --- a/src/nis/nms/web/actions/sysManage/SysPopedomManageAction.java +++ b/src/nis/nms/web/actions/sysManage/SysPopedomManageAction.java @@ -5,10 +5,13 @@ import java.io.FileInputStream; import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
+import nis.nms.core.Constants;
import nis.nms.core.Resource;
import nis.nms.domains.NodeTable;
import nis.nms.domains.TableDepartment;
@@ -1194,6 +1197,16 @@ public class SysPopedomManageAction extends BaseAction String sqlCondition = "where zxbz=0";// 将查询条件记录到操作日志中
// 将查询请求记入到操作日志表中
this.addDBOperationRpt(commonService, sqlCondition, "xt_js_jbxx");
+
+ //2018-10-22 新增,region role角色只能配置预制 视图(业务系统)
+ //从配置文件获取配置的预制视图
+ String preView=Constants.PREFABRICATE_VIEW;
+ if(!StringUtil.isBlank(preView)){
+ String[] split = preView.split(",");
+ List<String> preViewIds=Arrays.asList(split);
+ this.getRequest().setAttribute("preViewIds", preViewIds);
+ }
+
} catch (Exception e)
{
e.printStackTrace();
@@ -1299,6 +1312,15 @@ public class SysPopedomManageAction extends BaseAction yhzList.add(role);
}
this.getRequest().setAttribute("yhzList", yhzList);
+
+ //2018-10-22 新增,region role角色只能配置预制 视图(业务系统)
+ //从配置文件获取配置的预制视图
+ String preView=Constants.PREFABRICATE_VIEW;
+ if(!StringUtil.isBlank(preView)){
+ String[] split = preView.split(",");
+ List<String> preViewIds=Arrays.asList(split);
+ this.getRequest().setAttribute("preViewIds", preViewIds);
+ }
} catch (Exception e)
{
e.printStackTrace();
|
