From 379d1e90119982979253233aaafb379bc00527ed Mon Sep 17 00:00:00 2001 From: zhangshilin Date: Wed, 28 Mar 2018 08:42:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=9E=8D=E5=90=88=E4=BB=A3=E7=A0=81=20?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/domain/basics/ServiceDictInfo.java | 8 +-- .../java/com/nis/util/ConfigDictUtils.java | 54 ++++++++++---- .../basics/ServiceDictInfoController.java | 24 ++++--- .../basics/SysDictInfoController.java | 23 +++--- .../SpecificServiceCfgController.java | 8 ++- .../SpecificServiceHostCfgController.java | 6 +- .../nis/web/dao/basics/ServiceDictInfoDao.xml | 5 ++ .../resources/messages/message_en.properties | 70 ++++++++++++++++++- .../resources/messages/message_ru.properties | 56 ++++++++++++++- .../messages/message_zh_CN.properties | 58 ++++++++++++++- src/main/webapp/WEB-INF/tlds/fns.tld | 12 +++- .../WEB-INF/views/basics/serviceDictForm.jsp | 38 +++++----- .../WEB-INF/views/basics/serviceDictInfo.jsp | 7 +- .../WEB-INF/views/basics/serviceDictList.jsp | 40 +++++------ .../WEB-INF/views/basics/sysDictForm.jsp | 39 ++++++----- .../WEB-INF/views/basics/sysDictInfo.jsp | 7 +- .../WEB-INF/views/basics/sysDictList.jsp | 36 +++++----- .../views/specific/specificServiceCfgForm.jsp | 2 +- 18 files changed, 354 insertions(+), 139 deletions(-) diff --git a/src/main/java/com/nis/domain/basics/ServiceDictInfo.java b/src/main/java/com/nis/domain/basics/ServiceDictInfo.java index 738bc8f5d..7f98c861e 100644 --- a/src/main/java/com/nis/domain/basics/ServiceDictInfo.java +++ b/src/main/java/com/nis/domain/basics/ServiceDictInfo.java @@ -32,7 +32,7 @@ public class ServiceDictInfo extends BaseEntity{ private SysUser serviceDictEditor; //editor_id 修改人员 int Y 取自sys_user.id private Date editTime; //edit_time 修改时间 date Y private Integer levelNo; //层级 - private List ChildrenList = new ArrayList();//子列表 + private List childrenList = new ArrayList();//子列表 private Date beginDate; // 开始日期 private Date endDate; // 结束日期 @@ -123,11 +123,11 @@ public class ServiceDictInfo extends BaseEntity{ public void setEditTime(Date editTime) { this.editTime = editTime; } - public List getChildrenList() { - return ChildrenList; + public List getChildrenList() { + return childrenList; } public void setChildrenList(List childrenList) { - ChildrenList = childrenList; + this.childrenList = childrenList; } public Date getBeginDate() { return beginDate; diff --git a/src/main/java/com/nis/util/ConfigDictUtils.java b/src/main/java/com/nis/util/ConfigDictUtils.java index 1bb59471e..70e5324f7 100644 --- a/src/main/java/com/nis/util/ConfigDictUtils.java +++ b/src/main/java/com/nis/util/ConfigDictUtils.java @@ -77,23 +77,53 @@ public class ConfigDictUtils { public static String getItemTypeByNo(String dictKey, List intArr){ String result = ""; String value = DictUtils.getDictLabel(dictKey,intArr.get(0).toString()); - if(value.trim().equals("分类")){ - result = "分类"; + if(value.trim().equals("classification")){ + result = "classification_manage"; } - if(value.trim().equals("性质")){ - result = "性质"; + if(value.trim().equals("attribute")){ + result = "attribute_manage"; } - if(value.trim().equals("标签")){ - result = "标签"; + if(value.trim().equals("label")){ + result = "label_manage"; } - if(value.trim().equals("地域")){ - result = "地域"; + if(value.trim().equals("area")){ + result = "area_manage"; } - if(value.trim().equals("运营商")){ - result = "运营商"; + if(value.trim().equals("isp")){ + result = "isp_manage"; } - if(value.trim().equals("特征作用域")){ - result = "特征作用域"; + if(value.trim().equals("scope")){ + result = "feature_scope_manage"; + } + return result; + } + + /** + * 根据数据类型编码取出权限标识码 + * @param dictKey + * @param intArr + * @return + */ + public static String getPermissionByNo(String dictKey, List intArr){ + String result = ""; + String value = DictUtils.getDictLabel(dictKey,intArr.get(0).toString()); + if(value.trim().equals("classification")){ + result = "classification"; + } + if(value.trim().equals("attribute")){ + result = "attribute"; + } + if(value.trim().equals("label")){ + result = "label"; + } + if(value.trim().equals("area")){ + result = "area"; + } + if(value.trim().equals("isp")){ + result = "isp"; + } + if(value.trim().equals("scope")){ + result = "scope"; } return result; } diff --git a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java index d55e82581..266555c27 100644 --- a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java @@ -7,6 +7,7 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.zookeeper.ZooDefs.Ids; import org.springframework.stereotype.Controller; @@ -67,11 +68,10 @@ public class ServiceDictInfoController extends BaseController { * @param model * @return */ - @RequiresPermissions("sys:dict:view") + @RequiresPermissions(value={"basics:classification:view","basics:attribute:view","basics:label:view"},logical=Logical.OR) @RequestMapping(value = {"list", ""}) - public String list(String itType, ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model,Integer selectedType,boolean isFilterAction) { + public String list(String itType, ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) { //处理数据 - serviceDictInfo.setIsFilterAction(isFilterAction); String[] strArr = itType.split("-"); Integer[] intArr = new Integer[strArr.length]; for(int i=0;i intList = Lists.newArrayList(); for(ServiceDictInfo tempSe : page.getList()) { @@ -140,6 +140,7 @@ public class ServiceDictInfoController extends BaseController { * @param model * @return */ + @RequiresPermissions(value={"basics:classification:edit","basics:attribute:edit","basics:label:edit"},logical=Logical.OR) @RequestMapping(value={"form"}) public String form(ServiceDictInfo serviceDictInfo, Model model,String doAction,String itType, String mulitId) { if(doAction!=null&&doAction.equals("0")){ @@ -156,7 +157,7 @@ public class ServiceDictInfoController extends BaseController { if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getServiceDictId() == null||serviceDictInfo.getParent().getServiceDictId() == 0) { ServiceDictInfo parent = new ServiceDictInfo(); parent.setServiceDictId(0); - parent.setItemValue("根节点"); + parent.setItemValue("root_node"); serviceDictInfo.setParent(parent); } String[] strArr = itType.split("-"); @@ -176,16 +177,16 @@ public class ServiceDictInfoController extends BaseController { * @param redirectAttributes * @return */ - @RequiresPermissions("sys:dict:edit") + @RequiresPermissions(value={"basics:classification:edit","basics:attribute:edit","basics:label:edit"},logical=Logical.OR) @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(ServiceDictInfo serviceDictInfo,Model model, RedirectAttributes redirectAttributes,String itType) { try { serviceDictInfoService.saveOrUpdate(serviceDictInfo); - addMessage(redirectAttributes, "保存成功"); + addMessage(redirectAttributes, "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "保存失败!"); + addMessage(redirectAttributes, "save_failed"); } return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType; @@ -200,14 +201,15 @@ public class ServiceDictInfoController extends BaseController { * @param model * @return */ + @RequiresPermissions(value={"basics:classification:edit","basics:attribute:edit","basics:label:edit"},logical=Logical.OR) @RequestMapping(value={"delete"}) public String delete(ServiceDictInfo serviceDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) { try { serviceDictInfoService.deleteDict(mulitId); - addMessage(redirectAttributes, "删除成功"); + addMessage(redirectAttributes, "delete_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "删除失败!"); + addMessage(redirectAttributes, "delete_failed"); } return "redirect:" + adminPath + "/basics/serviceDictInfo/list?itType="+itType; } @@ -228,7 +230,7 @@ public class ServiceDictInfoController extends BaseController { Map map2 = Maps.newHashMap(); map2.put("id", 0); map2.put("pId", 0); - map2.put("name","根节点"); + map2.put("name","root_node"); //map2.put("placeholder","0"); mapList.add(map2); //找出该类型所有的非叶子配置 diff --git a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java index bd424e66b..ba4b87420 100644 --- a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java @@ -7,6 +7,7 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -66,11 +67,10 @@ public class SysDictInfoController extends BaseController { * @param model * @return */ - @RequiresPermissions("sys:dict:view") + @RequiresPermissions(value={"basics:area:view","basics:isp:view","basics:scope:view"},logical=Logical.OR) @RequestMapping(value = {"list", ""}) - public String list(String itType, SysDictInfo sysDictInfo,HttpServletRequest request, HttpServletResponse response, Model model, Integer selectedType,boolean isFilterAction) { + public String list(String itType, SysDictInfo sysDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) { //处理数据 - sysDictInfo.setIsFilterAction(isFilterAction); String[] strArr = itType.split("-"); Integer[] intArr = new Integer[strArr.length]; for(int i=0;i pageCondition = new Page(request, response); //查询符合条件总数 @@ -111,7 +106,7 @@ public class SysDictInfoController extends BaseController { } model.addAttribute("page", page); - //处理数据,取出主键优化处理 + //处理数据,取出主键 List intList = Lists.newArrayList(); for(SysDictInfo se:page.getList()){ if(se!=null){ @@ -143,6 +138,7 @@ public class SysDictInfoController extends BaseController { * @param model * @return */ + @RequiresPermissions(value={"basics:area:edit","basics:isp:edit","basics:scope:edit"},logical=Logical.OR) @RequestMapping(value={"form"}) public String form(SysDictInfo sysDictInfo, Model model, String doAction, String itType, String mulitId) { if(doAction!=null&&doAction.equals("0")){ @@ -160,7 +156,7 @@ public class SysDictInfoController extends BaseController { if (sysDictInfo.getParent() == null || sysDictInfo.getParent().getSysDictId() == null||sysDictInfo.getParent().getSysDictId() == 0) { SysDictInfo parent = new SysDictInfo(); parent.setSysDictId(0); - parent.setItemValue("根节点"); + parent.setItemValue("root_node"); sysDictInfo.setParent(parent); } String[] strArr = itType.split("-"); @@ -183,7 +179,7 @@ public class SysDictInfoController extends BaseController { * @param redirectAttributes * @return */ - @RequiresPermissions("sys:dict:edit") + @RequiresPermissions(value={"basics:area:edit","basics:isp:edit","basics:scope:edit"},logical=Logical.OR) @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(SysDictInfo sysDictInfo,Model model, RedirectAttributes redirectAttributes, String itType) { @@ -204,6 +200,7 @@ public class SysDictInfoController extends BaseController { * @param model * @return */ + @RequiresPermissions(value={"basics:area:edit","basics:isp:edit","basics:scope:edit"},logical=Logical.OR) @RequestMapping(value={"delete"}) public String delete(SysDictInfo sysDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) { try { @@ -232,7 +229,7 @@ public class SysDictInfoController extends BaseController { Map map2 = Maps.newHashMap(); map2.put("id", 0); map2.put("pId", 0); - map2.put("name","根节点"); + map2.put("name","root_node"); //map2.put("placeholder","0"); mapList.add(map2); //找出该类型所有的非叶子配置 diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java index c59599481..4ada24610 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java @@ -46,7 +46,7 @@ public class SpecificServiceCfgController extends BaseController { * @param model * @return */ - @RequiresPermissions("sys:dict:view") + @RequiresPermissions("specific:service:view") @RequestMapping(value = "list") public String list(SpecificServiceCfg specificServiceCfg, HttpServletRequest request, HttpServletResponse response, Model model) { @@ -83,7 +83,7 @@ public class SpecificServiceCfgController extends BaseController { page.getList().get(i).setShowSequence("" + (i + 1 + ((page.getPageNo() - 1) * page.getPageSize()))); } model.addAttribute("page", page); - // 删除顶层数据、取出id 优化处理 + // 删除顶层数据、取出id List intList = Lists.newArrayList(); for (SpecificServiceCfg tempSS : page.getList()) { if (tempSS != null) { @@ -118,6 +118,7 @@ public class SpecificServiceCfgController extends BaseController { * @param mulitId * @return */ + @RequiresPermissions("specific:service:edit") @RequestMapping(value = { "form" }) public String form(SpecificServiceCfg specificServiceCfg, Model model, String doAction, String mulitId) { @@ -150,7 +151,7 @@ public class SpecificServiceCfgController extends BaseController { * @param redirectAttributes * @return */ - @RequiresPermissions("sys:dict:edit") + @RequiresPermissions("specific:service:edit") @RequestMapping(value="saveOrUpdate") public String saveOrUpdate(SpecificServiceCfg specificServiceCfg, Model model, RedirectAttributes redirectAttributes,Integer oldId) { @@ -171,6 +172,7 @@ public class SpecificServiceCfgController extends BaseController { * @param mulitId * @return */ + @RequiresPermissions("specific:service:edit") @RequestMapping(value="delete") public String delete(SpecificServiceCfg specificServiceCfg, RedirectAttributes redirectAttributes, String mulitId){ try{ diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java index d437ea461..fea170b84 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceHostCfgController.java @@ -45,7 +45,7 @@ public class SpecificServiceHostCfgController extends BaseController { * @param model * @return */ - @RequiresPermissions("sys:dict:view") + @RequiresPermissions("specific:serviceIp:view") @RequestMapping(value = "list") public String list(SpecificServiceHostCfg specificServiceHostCfg, HttpServletRequest request, HttpServletResponse response, Model model) { @@ -67,7 +67,7 @@ public class SpecificServiceHostCfgController extends BaseController { * @param model * @return */ - @RequiresPermissions("sys:dict:view") + @RequiresPermissions("specific:serviceIp:edit") @RequestMapping(value = "form") public String form(SpecificServiceHostCfg specificServiceHostCfg, HttpServletRequest request, HttpServletResponse response, Model model) { //查询协议id供下拉选择 @@ -84,6 +84,7 @@ public class SpecificServiceHostCfgController extends BaseController { * @param mulitId * @return */ + @RequiresPermissions("specific:serviceIp:edit") @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg,Model model,RedirectAttributes redirectAttributes){ try { @@ -102,6 +103,7 @@ public class SpecificServiceHostCfgController extends BaseController { * @param mulitId * @return */ + @RequiresPermissions("specific:serviceIp:edit") @RequestMapping(value="delete") public String delete(SpecificServiceHostCfg specificServiceHostCfg, RedirectAttributes redirectAttributes, String mulitId){ try{ diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml index 1248f2295..202027d2e 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml @@ -29,6 +29,11 @@ + + + + + diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 79f2a8f02..b3370d051 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -45,7 +45,6 @@ domain_control=domain control dns_control=dns control basic_configuration=basic configuration letter_from=letter from -classification=classification classification_manage=classification manage attribute_manage=attribute manage area_manage=area manage @@ -96,6 +95,47 @@ sysService_manage=system service manage service_manage=service type manage system_service_manage=system service type manage specific_service_cfg=specific service cfg +features_area=features area +attribute_manage=attribute manage +isp_manage=isp manage +feature_scope_manage=feature scope manage +plaintext_manage=plaintext manage +ip_multiple_control=ip multiple control +ip_port_control=ip port control +website_multiple_control=website multiple control +mail_multiple_control=mail multiple control +request_header_control=request header control +plaintext_monitor=plaintext monitor +ip_address_monitor=ip address monitor +ip_port_monitor=ip port monitor +domain_monitor=domain monitor +dns_monitor=dns monitor +dns_response_monitor=dns response monitor +website_monite=website monite +host_monitor=host monitor +url_monitor=url monitor +website_keyword_monitor=website keyword monitor +mail_monitor=mail monitor +recipient_monitor=recipient monitor +sender_monitor=sender monitor +subject_monitor=subject monitor +mail_keyword_monitor=mail keyword monitor +mail_attachment_name_monitor=mail attachment name monitor +specific_service_cfg=specific service cfg +mail_attachment_content_monitor=mail attachment content monitor +file_transfer_monitor=file transfer monitor +ftp_address_monitor=ftp address monitor +encryption_monitor=encryption monitor +tunnel_protocol_monitor=tunnel protocol monitor +pptp_ip_monitor=pptp ip monitor +l2tp_ip_monitor=l2tp ip monitor +ssh_monitor=ssh monitor +ssl_monitor=ssl monitor +ssl_feature_monitor=ssl feature monitor +ssl_sni_monitor=ssl sni monitor +ssl_address_monitor=ssl address monitor +specific_service_host_cfg=specific service host cfg + #============menu end====================== #============yewu begin====================== @@ -105,13 +145,19 @@ item_code=itemcode item_value=itemvalue desc=description parent_id=parentid -is_leaf=whether subnode +is_leaf=whether leaf node is_valid=whether valid create_time=createtime edit_time=edittime superior_config=superior configuration config_content=configuration content - +root_node=root node +leafChange=this configuration includes subnode,cannot be leaf node +typeChild=this data type will be not same with subnode +typeSame=please select the consistent upper and lower data types +isLevelNoSure=more than the maximum level +is_repeat=field content is repeat +submitting=submitting #============yewu end====================== #============laihan begin====================== @@ -179,6 +225,20 @@ maxlength_128=The maxlength is 128\uff01 maxlength_256=The maxlength is 256\uff01 maxlength_512=The maxlength is 512\uff01 maxlength_4000=The maxlength is 4000\uff01 +ok=ok +clear=clear +close=close +reselect=please re-select +no_root=Root node can not be selected +no_parent=Parent node can not be selected +no_public_model=The public model can not be selected +no_outside_column=You can not select the other column models except the current column +send_org=please select the sending organization +department=department +sendind_org=sending organization +no_node=Node can not be selected +select_icon=select icon +nothing=nothing #==========message end===================== #==========yewuliexingguanli begin===================== @@ -227,8 +287,12 @@ key_word=key word block_type=block type letter=letter whether_area_block=whether area block +classification=classification label=label attribute=attribute +area=area +isp=isp +scope=scope valid_identifier=valid identifier is_audit=whether audit creator=creator diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index abebceb7a..85a155908 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -45,7 +45,6 @@ domain_control=domain control dns_control=dns control basic_configuration=basic configuration letter_from=letter from -classification=classification classification_manage=classification manage attribute_manage=attribute manage area_manage=area manage @@ -96,6 +95,47 @@ sysService_manage=system service manage service_manage=service type manage system_service_manage=system service type manage specific_service_cfg=specific service cfg +features_area=features area +attribute_manage=attribute manage +isp_manage=isp manage +feature_scope_manage=feature scope manage +plaintext_manage=plaintext manage +ip_multiple_control=ip multiple control +ip_port_control=ip port control +website_multiple_control=website multiple control +mail_multiple_control=mail multiple control +request_header_control=request header control +plaintext_monitor=plaintext monitor +ip_address_monitor=ip address monitor +ip_port_monitor=ip port monitor +domain_monitor=domain monitor +dns_monitor=dns monitor +dns_response_monitor=dns response monitor +website_monite=website monite +host_monitor=host monitor +url_monitor=url monitor +website_keyword_monitor=website keyword monitor +mail_monitor=mail monitor +recipient_monitor=recipient monitor +sender_monitor=sender monitor +subject_monitor=subject monitor +mail_keyword_monitor=mail keyword monitor +mail_attachment_name_monitor=mail attachment name monitor +specific_service_cfg=specific service cfg +mail_attachment_content_monitor=mail attachment content monitor +file_transfer_monitor=file transfer monitor +ftp_address_monitor=ftp address monitor +encryption_monitor=encryption monitor +tunnel_protocol_monitor=tunnel protocol monitor +pptp_ip_monitor=pptp ip monitor +l2tp_ip_monitor=l2tp ip monitor +ssh_monitor=ssh monitor +ssl_monitor=ssl monitor +ssl_feature_monitor=ssl feature monitor +ssl_sni_monitor=ssl sni monitor +ssl_address_monitor=ssl address monitor +specific_service_host_cfg=specific service host cfg + #============menu end====================== #============yewu begin====================== @@ -105,13 +145,19 @@ item_code=itemcode item_value=itemvalue desc=description parent_id=parentid -is_leaf=whether subnode +is_leaf=whether leaf node is_valid=whether valid create_time=createtime edit_time=edittime superior_config=superior configuration config_content=configuration content - +root_node=root node +leafChange=this configuration includes subnode,cannot be leaf node +typeChild=this data type will be not same with subnode +typeSame=please select the consistent upper and lower data types +isLevelNoSure=more than the maximum level +is_repeat=field content is repeat +submitting=submitting #============yewu end====================== #============laihan begin====================== @@ -227,8 +273,12 @@ key_word=key word block_type=block type letter=letter whether_area_block=whether area block +classification=classification label=label attribute=attribute +area=area +isp=isp +scope=scope valid_identifier=valid identifier is_audit=whether audit creator=creator diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 0988255a7..2a5269352 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -43,7 +43,6 @@ domain_control=\u57df\u540d\u7ba1\u63a7 dns_control=DNS\u7ba1\u63a7 basic_configuration=\u57fa\u672c\u914d\u7f6e letter_from=\u6765\u51fd\u5355\u4f4d -classification=\u5206\u7c7b\u6027\u8d28 classification_manage=\u5206\u7c7b\u7ba1\u7406 attribute_manage=\u6027\u8d28\u7ba1\u7406 area_manage=\u5730\u57df\u7ba1\u7406 @@ -96,6 +95,37 @@ sysService_manage=\u7cfb\u7edf\u4e1a\u52a1\u7ba1\u7406 service_manage=\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406 system_service_manage=\u7cfb\u7edf\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406 specific_service_cfg=\u7279\u5b9a\u670d\u52a1\u7ba1\u7406 +request_header_control=\u8bf7\u6c42\u5934\u57df\u7ba1\u63a7 +plaintext_monitor=\u660e\u6587\u5185\u5bb9\u76d1\u6d4b +ip_address_monitor=IP\u5730\u5740\u76d1\u6d4b +ip_port_monitor=IP+\u7aef\u53e3\u76d1\u6d4b +domain_monitor=\u57df\u540d\u76d1\u6d4b +dns_monitor=DNS\u76d1\u6d4b +dns_response_monitor=DNS\u5e94\u7b54\u76d1\u6d4b +website_monite=\u7f51\u7ad9\u76d1\u6d4b +host_monitor=HOST\u76d1\u6d4b +url_monitor=URL\u76d1\u6d4b +website_keyword_monitor=\u7f51\u9875\u5185\u5bb9\u5173\u952e\u5b57\u76d1\u6d4b +mail_monitor=\u90ae\u4ef6\u76d1\u6d4b +recipient_monitor=\u6536\u4ef6\u4eba\u76d1\u6d4b +sender_monitor=\u53d1\u4ef6\u4eba\u76d1\u6d4b +subject_monitor=\u4e3b\u9898\u76d1\u6d4b +mail_keyword_monitor=\u90ae\u4ef6\u5185\u5bb9\u5173\u952e\u5b57\u76d1\u6d4b +mail_attachment_name_monitor=\u90ae\u4ef6\u9644\u4ef6\u540d\u5173\u952e\u5b57\u76d1\u6d4b +mail_attachment_content_monitor=\u90ae\u4ef6\u9644\u4ef6\u5185\u5bb9\u5173\u952e\u5b57\u76d1\u6d4b +file_transfer_monitor=\u6587\u4ef6\u4f20\u8f93\u76d1\u6d4b +ftp_address_monitor=FTP\u5730\u5740\u76d1\u6d4b +encryption_monitor=\u52a0\u5bc6\u5185\u5bb9\u76d1\u6d4b +tunnel_protocol_monitor=\u96a7\u9053\u534f\u8bae\u76d1\u6d4b +pptp_ip_monitor=PPTP\u534f\u8bae\u76d1\u6d4b +l2tp_ip_monitor=L2TP\u534f\u8bae\u76d1\u6d4b +ssh_monitor=SSH\u76d1\u6d4b +ssl_monitor=SSL\u76d1\u6d4b +ssl_feature_monitor=SSL\u8bc1\u4e66\u7279\u5f81\u76d1\u6d4b +ssl_sni_monitor=SSL\uff08SNI\uff09\u76d1\u6d4b +ssl_address_monitor=SSL\u5730\u5740\u76d1\u6d4b +specific_service_host_cfg=\u7279\u5b9a\u670d\u52a1\u670d\u52a1\u5668IP\u7ba1\u7406 + #==========menu end===================== #==========yewu zidian begin===================== @@ -111,7 +141,13 @@ create_time=\u521b\u5efa\u65f6\u95f4 edit_time=\u4fee\u6539\u65f6\u95f4 superior_config=\u4e0a\u7ea7\u914d\u7f6e config_content=\u914d\u7f6e\u5185\u5bb9 - +root_node=\u6839\u8282\u70b9 +leafChange=\u8be5\u914d\u7f6e\u5305\u542b\u4e0b\u7ea7\u914d\u7f6e\uff0c\u4e0d\u5f97\u6539\u4e3a\u53f6\u5b50\u8282\u70b9 +typeChild=\u8be5\u914d\u7f6e\u5305\u542b\u4e0b\u7ea7\u914d\u7f6e\uff0c\u6570\u636e\u7c7b\u578b\u66f4\u6539\u540e\u4e0e\u5b50\u7c7b\u4e0d\u4e00\u81f4 +typeSame=\u8bf7\u9009\u62e9\u4e00\u81f4\u7684\u4e0a\u4e0b\u7ea7\u914d\u7f6e\u6570\u636e\u7c7b\u578b +isLevelNoSure=\u9009\u62e9\u6b64\u914d\u7f6e\u4e0a\u4e0b\u5c42\u7ea7\u6570\u5c06\u8d85\u8fc7\u6700\u5927\u5c42\u7ea7 +is_repeat=\u8be5\u914d\u7f6e\u5185\u5bb9\u5df2\u5b58\u5728\uff0c\u8bf7\u586b\u5199\u5176\u5b83\u5185\u5bb9 +submitting=submitting #==========yewu zidian end===================== #==========laihan begin===================== @@ -178,6 +214,20 @@ maxlength_128=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u6700\u591a\u662f 128\u maxlength_256=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u6700\u591a\u662f256\u7684\u5b57\u7b26\u4e32\uff01 maxlength_512=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u6700\u591a\u662f512\u7684\u5b57\u7b26\u4e32\uff01 maxlength_4000=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u6700\u591a\u662f4000\u7684\u5b57\u7b26\u4e32\uff01 +ok=\u786e\u5b9a +clear=\u6e05\u9664 +close=\u5173\u95ed +reselect=\u8bf7\u91cd\u65b0\u9009\u62e9 +no_root=\u4e0d\u80fd\u9009\u62e9\u6839\u8282\u70b9 +no_parent=\u4e0d\u80fd\u9009\u62e9\u7236\u8282\u70b9 +no_public_model=\u4e0d\u80fd\u9009\u62e9\u516c\u5171\u6a21\u578b +no_outside_column=\u4e0d\u80fd\u9009\u62e9\u5f53\u524d\u680f\u76ee\u4ee5\u5916\u7684\u680f\u76ee\u6a21\u578b +send_org=\u8bf7\u9009\u62e9\u4e0b\u53d1\u5355\u4f4d +department=\u90e8\u95e8 +sendind_org=\u4e0b\u53d1\u5355\u4f4d +no_node=\u4e0d\u80fd\u9009\u62e9\u8282\u70b9 +select_icon=\u9009\u62e9\u56fe\u6807 +nothing=\u65e0 #==========message end===================== #==========yewuliexingguanli begin===================== @@ -226,8 +276,12 @@ key_word=\u5173\u952e\u5b57 block_type=\u7ba1\u63a7\u7c7b\u578b letter=\u6765\u51fd whether_area_block=\u662f\u5426\u533a\u57df\u7ba1\u63a7 +classification=\u5206\u7c7b label=\u6807\u7b7e attribute=\u6027\u8d28 +area=\u5730\u57df +isp=\u8fd0\u8425\u5546 +scope=\u7279\u5f81\u4f5c\u7528\u57df valid_identifier=\u6709\u6548\u6807\u8bc6 is_audit=\u662f\u5426\u5ba1\u6838 creator=\u521b\u5efa\u4eba\u5458 diff --git a/src/main/webapp/WEB-INF/tlds/fns.tld b/src/main/webapp/WEB-INF/tlds/fns.tld index d94a1c3b6..d0dc8fae7 100644 --- a/src/main/webapp/WEB-INF/tlds/fns.tld +++ b/src/main/webapp/WEB-INF/tlds/fns.tld @@ -331,13 +331,23 @@ - 计算序号 + 取出数据类型 getItemTypeByNo com.nis.util.ConfigDictUtils java.lang.String getItemTypeByNo(java.lang.String,java.util.List) ${fns:getItemTypeByNo(str1,list)} + + + + 取出权限编码 + getPermissionByNo + com.nis.util.ConfigDictUtils + java.lang.String getPermissionByNo(java.lang.String,java.util.List) + ${fns:getPermissionByNo(str1,list)} + + diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index 921ed6656..cff7bde40 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -126,35 +126,35 @@ typeChild:true }, 'isLeaf':{ - leafChange:true, - leafHasTree:true + leafChange:true + //leafHasTree:true } }, messages: { 'parent.itemValue':{ - isLevelNoSure:"选择此配置上下层级数将超过最大层级" + isLevelNoSure:'' }, 'itemCode':{ //isLevelNoSure:"选择此配置上下层级数将超过四级", - required:'请填写配置编码', - remote:'该配置编码已存在' + required:'', + remote:'' }, 'itemValue':{ - required:'编码对应值必须填写' + required:'' }, 'itemType':{ - typeSame:'请选择一致的上下级配置数据类型', - typeChild:'该配置包含下级配置,数据类型更改后与子类不一致' + typeSame:'', + typeChild:'' }, 'isLeaf':{ - leafChange:'该配置包含下级配置,不得改为叶子节点', - leafHasTree:'该配置上级为根节点,不得设为叶子节点' + leafChange:'' + //leafHasTree:'该配置上级为根节点,不得设为叶子节点' } }, submitHandler: function(form){ - loading('正在提交,请稍等...'); + loading(''); form.submit(); }, errorContainer: "#messageBox", @@ -191,7 +191,7 @@
- ${not empty serviceDictInfo.serviceDictId?'修改':'添加'}
+
@@ -282,9 +278,9 @@ ${sysDictInfo.itemCode} ${sysDictInfo.itemValue} ${fns:abbr(sysDictInfo.itemDesc,15)} - ${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")} + - ${fns:getDictLabel("SYS_YES_NO",sysDictInfo.isLeaf,"0")} + ${fns:getUserById(sysDictInfo.sysDictCreator.id).name} diff --git a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp index 9e1d840b3..b838a183f 100644 --- a/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp @@ -170,7 +170,7 @@
- + " itemValue="itemCode" htmlEscape="false"/>
From 03e14ab15a545adb0eacdc9241133040685a55bc Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Wed, 28 Mar 2018 11:43:37 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E6=A0=87=E7=AD=BE=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/sys/officeForm.jsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/sys/officeForm.jsp b/src/main/webapp/WEB-INF/views/sys/officeForm.jsp index 9b979a9b2..e33449f40 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeForm.jsp @@ -35,7 +35,7 @@
-
+
@@ -166,8 +166,8 @@
-
+
@@ -175,8 +175,8 @@
-
+
From 6e533fca4187acf4499b0f8f978a3ea0b0979f96 Mon Sep 17 00:00:00 2001 From: zhangshilin Date: Wed, 28 Mar 2018 13:05:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=9E=8D=E5=90=88=E4=BB=A3=E7=A0=81=20?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .settings/org.eclipse.wst.common.component | 3 ++ .../basics/ServiceDictInfoController.java | 33 ++++++++++++++- .../basics/SysDictInfoController.java | 8 ++-- .../nis/web/dao/basics/ServiceDictInfoDao.xml | 2 +- .../com/nis/web/dao/basics/SysDictInfoDao.xml | 2 +- .../resources/messages/message_en.properties | 6 +-- .../resources/messages/message_ru.properties | 2 +- .../messages/message_zh_CN.properties | 3 +- .../webapp/WEB-INF/tags/sys/treeselect.tag | 4 +- .../WEB-INF/views/basics/serviceDictForm.jsp | 42 +++++++++++++++---- 10 files changed, 79 insertions(+), 26 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index dbec03a4c..02aec5565 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,6 +4,9 @@ + + uses + diff --git a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java index 266555c27..d995d1eaf 100644 --- a/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/ServiceDictInfoController.java @@ -1,6 +1,7 @@ package com.nis.web.controller.basics; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -396,14 +397,42 @@ public class ServiceDictInfoController extends BaseController { } }else{ ServiceDictInfo c = serviceDictInfoService.getDictById(currentId); - if((p.getLevelNo()+c.getLevelNo())<(max+1)){ - return true; + if(p.getLevelNo() list = serviceDictInfoService.getDictByParentId(currentId); + if(list==null||list.size()==0){ + return true; + } + List resultList = Lists.newArrayList(); + List intList = Lists.newArrayList(); + allTreeNode(1,list,resultList); + for(ServiceDictInfo se:resultList){ + intList.add(se.getLevelNo()); + } + int x = Collections.max(intList); + if((p.getLevelNo()+x)<(max+1)){ + return true; + } } } } return false; } + /** + * 查出所该节点下有树形子节点 + */ + + void allTreeNode(Integer levelNo, List list,List resultList){ + if(list!=null&&list.size()>0){ + for(ServiceDictInfo se:list){ + se.setLevelNo(levelNo+1); + resultList.add(se); + List newList = serviceDictInfoService.getDictByParentId(se.getServiceDictId()); + allTreeNode(se.getLevelNo(),newList,resultList); + } + } + } } diff --git a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java index ba4b87420..d8379797c 100644 --- a/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java +++ b/src/main/java/com/nis/web/controller/basics/SysDictInfoController.java @@ -185,10 +185,10 @@ public class SysDictInfoController extends BaseController { try { sysDictInfoService.saveOrUpdate(sysDictInfo); - addMessage(redirectAttributes, "保存成功"); + addMessage(redirectAttributes, "save_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "保存失败!"); + addMessage(redirectAttributes, "save_failed"); } return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType; @@ -205,10 +205,10 @@ public class SysDictInfoController extends BaseController { public String delete(SysDictInfo sysDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) { try { sysDictInfoService.deleteDict(mulitId); - addMessage(redirectAttributes, "删除成功"); + addMessage(redirectAttributes, "delete_success"); } catch (Exception e) { e.printStackTrace(); - addMessage(redirectAttributes, "删除失败!"); + addMessage(redirectAttributes, "delete_failed"); } return "redirect:" + adminPath + "/basics/sysDictInfo/list?itType="+itType; } diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml index 202027d2e..fbac199f3 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml @@ -300,7 +300,7 @@ diff --git a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml index b3193b41b..7385a81a3 100644 --- a/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/SysDictInfoDao.xml @@ -313,7 +313,7 @@ diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index b3370d051..596f0bc20 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -147,8 +147,7 @@ desc=description parent_id=parentid is_leaf=whether leaf node is_valid=whether valid -create_time=createtime -edit_time=edittime +create_time=create time superior_config=superior configuration config_content=configuration content root_node=root node @@ -156,7 +155,7 @@ leafChange=this configuration includes subnode,cannot be leaf node typeChild=this data type will be not same with subnode typeSame=please select the consistent upper and lower data types isLevelNoSure=more than the maximum level -is_repeat=field content is repeat +is_repeat=content is repeat submitting=submitting #============yewu end====================== @@ -304,7 +303,6 @@ audit_time=audit time yes=yes no=no deleted=deleted -cancel_approved=cancel approved #==========youjianguankong end===================== diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 85a155908..f9927ae5e 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -156,7 +156,7 @@ leafChange=this configuration includes subnode,cannot be leaf node typeChild=this data type will be not same with subnode typeSame=please select the consistent upper and lower data types isLevelNoSure=more than the maximum level -is_repeat=field content is repeat +is_repeat=content is repeat submitting=submitting #============yewu end====================== diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 2a5269352..a308afc51 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -19,6 +19,7 @@ show=\u67e5\u770b edit=\u4fee\u6539 hi=\u4f60\u597d exit=\u9000\u51fa +choose=\u9009\u62e9 #==========menu begin===================== requestInfo=\u6765\u51fd\u4fe1\u606f @@ -138,7 +139,6 @@ parent_id=\u7236ID is_leaf=\u662f\u5426\u53f6\u5b50\u8282\u70b9 is_valid=\u6709\u6548\u6807\u5fd7 create_time=\u521b\u5efa\u65f6\u95f4 -edit_time=\u4fee\u6539\u65f6\u95f4 superior_config=\u4e0a\u7ea7\u914d\u7f6e config_content=\u914d\u7f6e\u5185\u5bb9 root_node=\u6839\u8282\u70b9 @@ -174,7 +174,6 @@ begin_date=\u5f00\u59cb\u65f6\u95f4 end_date=\u7ed3\u675f\u65f6\u95f4 delete=\u5220\u9664 special_task=\u4e13\u9879\u4efb\u52a1 -cancel_approved=\u914d\u7f6e\u53d6\u6d88 task_name=\u4e13\u9879\u540d\u79f0 task_org=\u62a5\u9001\u5355\u4f4d task_time=\u62a5\u9001\u65f6\u95f4 diff --git a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag index c551f505b..83ac743de 100644 --- a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag +++ b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag @@ -43,8 +43,8 @@ return true; } // 正常打开 - top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "选择${title}", 320, 420, { - ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"":"ok", ${allowClear?"\"\":\"clear\", ":""}"":true}, submit:function(v, h, f){ + top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "${title}", 320, 420, { + ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"ok":"ok", ${allowClear?"\"clear\":\"clear\", ":""}"close":true}, submit:function(v, h, f){ if (v=="ok"){ var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents(); var ids = [], names = [], nodes = []; diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index cff7bde40..25682aab4 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -23,18 +23,36 @@ } }); - + errorShow(); } + function errorShow(){ + var flaelNoSure = false; + $.ajax({ + type:'post', + async:false, + url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure', + data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'}, + success:function(data){ + if(data){ + $(".errorShow").hide(); + }else{ + $(".errorShow").show(); + } + flaelNoSure = data; + } + }); + return flaelNoSure; + } $(document).ready(function() { + $("#serviceDictInfoId").on('onchange',errorShow); - //层级校验 - jQuery.validator.addMethod("isLevelNoSure",function(value,element){ + //层级校验 + /* jQuery.validator.addMethod("isLevelNoSure",function(value,element){ var flagIsLevelNoSure = false; $.ajax({ type:'post', async:false, - cache:false, url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure', data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'}, success:function(data){ @@ -43,7 +61,7 @@ }); return flagIsLevelNoSure; - },"选择此配置上下层级数将超过最大层级"); + },"选择此配置上下层级数将超过最大层级"); */ //类型选择与上级是否冲突 jQuery.validator.addMethod("typeSame",function(value,element){ @@ -109,9 +127,9 @@ //ignore:[], //需验证 item_code item_value rules: { - 'parent.itemValue':{ + /* 'parent.itemValue':{ isLevelNoSure:true - }, + }, */ 'itemCode':{ //isLevelNoSure:true, @@ -132,9 +150,9 @@ }, messages: { - 'parent.itemValue':{ + /* 'parent.itemValue':{ isLevelNoSure:'' - }, + }, */ 'itemCode':{ //isLevelNoSure:"选择此配置上下层级数将超过四级", required:'', @@ -154,6 +172,11 @@ }, submitHandler: function(form){ + var is_level_wrong=errorShow(); + if(!is_level_wrong){ + return false; + $(".errorShow").show(); + } loading(''); form.submit(); }, @@ -215,6 +238,7 @@ +
From cca4102f4ed92880c8107fe19e5c320efe6b32d0 Mon Sep 17 00:00:00 2001 From: zhangshilin Date: Wed, 28 Mar 2018 13:19:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=9E=8D=E5=90=88=E4=BB=A3=E7=A0=81=20?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3treeselect=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=8F=8A=E6=97=B6=E6=A0=A1=E9=AA=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=AE=8C=E6=88=90=E5=88=86=E7=B1=BB/?= =?UTF-8?q?=E6=80=A7=E8=B4=A8/=E6=A0=87=E7=AD=BE=EF=BC=8C=E5=9C=B0?= =?UTF-8?q?=E5=9F=9F/=E8=BF=90=E8=90=A5=E5=95=86/=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E4=BD=9C=E7=94=A8=E5=9F=9F=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/messages/message_en.properties | 1 - src/main/resources/messages/message_ru.properties | 1 - src/main/resources/messages/message_zh_CN.properties | 1 - src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp | 2 +- src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp | 2 +- 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 4cd4e9d83..fe5c6bb3e 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -150,7 +150,6 @@ leafChange=this configuration includes subnode,cannot be leaf node typeChild=this data type will be not same with subnode typeSame=please select the consistent upper and lower data types isLevelNoSure=more than the maximum level -is_repeat=content is repeat submitting=submitting #============yewu end====================== diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index f9927ae5e..b41500f86 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -156,7 +156,6 @@ leafChange=this configuration includes subnode,cannot be leaf node typeChild=this data type will be not same with subnode typeSame=please select the consistent upper and lower data types isLevelNoSure=more than the maximum level -is_repeat=content is repeat submitting=submitting #============yewu end====================== diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index a308afc51..4597af09f 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -146,7 +146,6 @@ leafChange=\u8be5\u914d\u7f6e\u5305\u542b\u4e0b\u7ea7\u914d\u7f6e\uff0c\u4e0d\u5 typeChild=\u8be5\u914d\u7f6e\u5305\u542b\u4e0b\u7ea7\u914d\u7f6e\uff0c\u6570\u636e\u7c7b\u578b\u66f4\u6539\u540e\u4e0e\u5b50\u7c7b\u4e0d\u4e00\u81f4 typeSame=\u8bf7\u9009\u62e9\u4e00\u81f4\u7684\u4e0a\u4e0b\u7ea7\u914d\u7f6e\u6570\u636e\u7c7b\u578b isLevelNoSure=\u9009\u62e9\u6b64\u914d\u7f6e\u4e0a\u4e0b\u5c42\u7ea7\u6570\u5c06\u8d85\u8fc7\u6700\u5927\u5c42\u7ea7 -is_repeat=\u8be5\u914d\u7f6e\u5185\u5bb9\u5df2\u5b58\u5728\uff0c\u8bf7\u586b\u5199\u5176\u5b83\u5185\u5bb9 submitting=submitting #==========yewu zidian end===================== diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index 25682aab4..b374af6e0 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -156,7 +156,7 @@ 'itemCode':{ //isLevelNoSure:"选择此配置上下层级数将超过四级", required:'', - remote:'' + remote:'' }, 'itemValue':{ required:'' diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp index 253081e3b..a0c77b625 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictForm.jsp @@ -129,7 +129,7 @@ }, 'itemCode':{ required:'', - remote:'' + remote:'' }, 'itemValue':{ required:''