Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
3
.tern-project
Normal file
3
.tern-project
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class SystemServiceInfo extends BaseEntity<SystemServiceInfo> {
|
||||
private String serviceDesc;//业务描述
|
||||
private Integer action;//业务动作 1:阻断;2:监测;5:FD白名单;6:监测白名单;7:FD监测白名单;8:灰名单;
|
||||
private Integer isValid;//有效标识 0:无效;1:有效;
|
||||
private Integer serviceType;//业务类型 1:常规(单域)业务配置;2:多域业务配置;
|
||||
private Integer serviceType;//业务类型 1:常规(单域)业务配置;2:多域业务配置;3.特定服务配置;
|
||||
private SysUser creator;
|
||||
private Date createTime;
|
||||
private SysUser editor;
|
||||
@@ -105,4 +105,13 @@ public class SystemServiceInfo extends BaseEntity<SystemServiceInfo> {
|
||||
return e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
private Integer serviceIdPre;//辅助用,用来存放serviceId前四位以获得最新serviceId
|
||||
|
||||
public Integer getServiceIdPre() {
|
||||
return serviceIdPre;
|
||||
}
|
||||
public void setServiceIdPre(Integer serviceIdPre) {
|
||||
this.serviceIdPre = serviceIdPre;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,19 +128,19 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
this.endDate = endDate;
|
||||
}
|
||||
@JsonIgnore
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Long parentId, boolean cascade){
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Integer parentId, boolean cascade){
|
||||
for (int i=0; i<sourcelist.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = sourcelist.get(i);
|
||||
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getId()!=null
|
||||
&& serviceDictInfo.getParent().getId().equals(parentId)){
|
||||
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getServiceDictId()!=null
|
||||
&& serviceDictInfo.getParent().getServiceDictId().equals(parentId)){
|
||||
list.add(serviceDictInfo);
|
||||
if (cascade){
|
||||
// 判断是否还有子节点, 有则继续获取子节点
|
||||
for (int j=0; j<sourcelist.size(); j++){
|
||||
ServiceDictInfo child = sourcelist.get(j);
|
||||
if (child.getParent()!=null && child.getParent().getId()!=null
|
||||
&& child.getParent().getId().equals(serviceDictInfo.getId())){
|
||||
sortList(list, sourcelist, serviceDictInfo.getId(), true);
|
||||
if (child.getParent()!=null && child.getParent().getServiceDictId()!=null
|
||||
&& child.getParent().getServiceDictId().equals(serviceDictInfo.getServiceDictId())){
|
||||
sortList(list, sourcelist, serviceDictInfo.getServiceDictId(), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -148,4 +148,31 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public static void checkList(List<ServiceDictInfo> list,List<ServiceDictInfo> parentList, List<ServiceDictInfo> sourcelist, boolean cascade){
|
||||
for(ServiceDictInfo serviceUp:parentList){
|
||||
list.add(serviceUp);
|
||||
//判断是否有子节点,有则继续获取子节点
|
||||
sortList(list, sourcelist, serviceUp.getServiceDictId(), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//顶层的数量
|
||||
|
||||
public static Integer topCount(List<ServiceDictInfo> list,Integer parentId){
|
||||
Integer count = 0;
|
||||
List<ServiceDictInfo> listTemp = new ArrayList<ServiceDictInfo>();
|
||||
for(ServiceDictInfo serviceDictInfo:list){
|
||||
if(serviceDictInfo.getParent()!=null&&serviceDictInfo.getParent().getServiceDictId()!=null&&serviceDictInfo.getParent().getServiceDictId()==parentId){
|
||||
listTemp.add(serviceDictInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return listTemp.size();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryName;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
@@ -58,7 +56,7 @@ public class ServiceDictInfoController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表
|
||||
* 查询业务辅助表-业务字典信息列表(无条件分页查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
@@ -68,13 +66,66 @@ public class ServiceDictInfoController extends BaseController {
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
//查出顶层分页数据
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
//查出所有数据
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
ServiceDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getServiceDictId()!=null&&temp.getParent().getServiceDictId()==0){
|
||||
for(ServiceDictInfo topTemp:page.getList()){
|
||||
if(temp.getServiceDictId()==topTemp.getServiceDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
//ServiceDictInfo.sortList(list, allList, 0, true);
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/serviceDictList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"searchList"})
|
||||
public String searchList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
||||
&&serviceDictInfo.getItemCode()==null
|
||||
&&serviceDictInfo.getItemType()==null
|
||||
&&serviceDictInfo.getBeginDate()==null
|
||||
&&serviceDictInfo.getEditTime()==null){
|
||||
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictSearchList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
return "/cfg/serviceDictInfoSearchList";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 进入添加或修改页面
|
||||
* @param serviceDictInfo
|
||||
@@ -86,6 +137,13 @@ public class ServiceDictInfoController extends BaseController {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/serviceDictInfo";
|
||||
}
|
||||
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getId() == null) {
|
||||
ServiceDictInfo parent = new ServiceDictInfo();
|
||||
parent.setServiceDictId(0);
|
||||
serviceDictInfo.setParent(parent);
|
||||
}
|
||||
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
||||
|
||||
return "/cfg/serviceDictForm";
|
||||
}
|
||||
/**
|
||||
@@ -106,13 +164,17 @@ public class ServiceDictInfoController extends BaseController {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "保存配置失败!");
|
||||
}
|
||||
if(serviceDictInfo.getItemType()==3){
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}else{
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/list";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除(删除时删除所有下级菜单)
|
||||
* @param serviceDictInfo
|
||||
* @param model
|
||||
* @return
|
||||
@@ -142,11 +204,12 @@ public class ServiceDictInfoController extends BaseController {
|
||||
@RequestMapping(value = "treeData")
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllDict();
|
||||
//找出所有的非叶子配置
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllNoLeafDictList();
|
||||
for (int i=0; i<list.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = list.get(i);
|
||||
if (StringUtils.isBlank(extId) || (extId !=null && !extId.equals(serviceDictInfo.getServiceDictId().toString()))) {
|
||||
if(isShowHide != null && isShowHide.equals("0") && serviceDictInfo.getIsValid().equals(0)){
|
||||
if(serviceDictInfo.getIsValid().equals(0)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
@@ -178,12 +241,19 @@ public class ServiceDictInfoController extends BaseController {
|
||||
if(doAction!=null&&doAction.equals("0")){
|
||||
return "/cfg/serviceDictMarkInfo";
|
||||
}
|
||||
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getId() == null) {
|
||||
ServiceDictInfo parent = new ServiceDictInfo();
|
||||
parent.setServiceDictId(0);
|
||||
serviceDictInfo.setParent(parent);
|
||||
}
|
||||
model.addAttribute("serviceDictInfo", serviceDictInfo);
|
||||
|
||||
return "/cfg/serviceDictMarkForm";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表
|
||||
* 查询标签列表(无条件分页查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
@@ -191,15 +261,67 @@ public class ServiceDictInfoController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"markList"})
|
||||
@RequestMapping(value = {"markList", ""})
|
||||
public String markList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
//查出顶层分页数据
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findTopDictMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
//查出所有数据
|
||||
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictMarkList();
|
||||
//处理数据,保留顶层中的所有下层数据
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
boolean flag = false;
|
||||
for(int i=allList.size()-1;i>=0;i--){
|
||||
ServiceDictInfo temp = allList.get(i);
|
||||
if(temp.getParent()!=null&&temp.getParent().getServiceDictId()!=null&&temp.getParent().getServiceDictId()==0){
|
||||
for(ServiceDictInfo topTemp:page.getList()){
|
||||
if(temp.getServiceDictId()==topTemp.getServiceDictId()){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
allList.remove(temp);
|
||||
flag=false;
|
||||
}else{
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
ServiceDictInfo.sortList(list,allList,0,true);
|
||||
//ServiceDictInfo.sortList(list, allList, 0, true);
|
||||
model.addAttribute("list", list);
|
||||
return "/cfg/serviceDictMarkList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @param request
|
||||
* @param response
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:dict:view")
|
||||
@RequestMapping(value = {"searchMarkList"})
|
||||
public String searchMarkList(ServiceDictInfo serviceDictInfo,HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
|
||||
&&serviceDictInfo.getItemCode()==null
|
||||
&&serviceDictInfo.getItemType()==null
|
||||
&&serviceDictInfo.getBeginDate()==null
|
||||
&&serviceDictInfo.getEditTime()==null){
|
||||
|
||||
return "redirect:"+ adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}
|
||||
Page<ServiceDictInfo> page = serviceDictInfoService.findDictSearchMarkList(new Page<ServiceDictInfo>(request, response), serviceDictInfo);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
return "/cfg/serviceDictInfoSearchMarkList";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
@@ -242,4 +364,34 @@ public class ServiceDictInfoController extends BaseController {
|
||||
return "redirect:" + adminPath + "/configuration/serviceDictInfo/markList";
|
||||
}
|
||||
|
||||
/**
|
||||
* isShowHide是否显示隐藏菜单
|
||||
* @param extId
|
||||
* @param isShowHidden
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "treeMarkData")
|
||||
public List<Map<String, Object>> treeMarkData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response) {
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
//找出所有的非叶子配置
|
||||
List<ServiceDictInfo> list = serviceDictInfoService.findAllNoLeafDictMarkList();
|
||||
for (int i=0; i<list.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = list.get(i);
|
||||
if (StringUtils.isBlank(extId) || (extId !=null && !extId.equals(serviceDictInfo.getServiceDictId().toString()))) {
|
||||
if(serviceDictInfo.getIsValid().equals(0)){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("id", serviceDictInfo.getServiceDictId());
|
||||
map.put("pId", serviceDictInfo.getParent().getServiceDictId());
|
||||
map.put("name",serviceDictInfo.getItemValue());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.nis.web.controller.systemService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -12,11 +14,13 @@ import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
import com.nis.util.Collections3;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -30,8 +34,6 @@ public class SystemServiceController extends BaseController {
|
||||
@ModelAttribute
|
||||
public SystemServiceInfo get(Long id) {
|
||||
if (!StringUtil.isEmpty(id)){
|
||||
// SystemServiceInfo systemServiceInfo = new SystemServiceInfo();
|
||||
// systemServiceInfo.setId(id);
|
||||
return systemServiceService.get(id);
|
||||
}else{
|
||||
return new SystemServiceInfo();
|
||||
@@ -123,5 +125,44 @@ public class SystemServiceController extends BaseController {
|
||||
return "/systemService/list";
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "serviceIdValidate")
|
||||
public String serviceIdValidate(String serviceId, Long id) {
|
||||
List<SystemServiceInfo> list = systemServiceService.getSystemServiceByServiceId(serviceId);
|
||||
if (Collections3.isEmpty(list)) {
|
||||
return "true";
|
||||
} else {
|
||||
if (id != null) {
|
||||
if (list.get(0).getId() == id) {
|
||||
return "true";
|
||||
} else {
|
||||
return "false";
|
||||
}
|
||||
} else {
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "newServiceId")
|
||||
public Integer getNewServiceId(Integer serviceIdPre) {
|
||||
if (serviceIdPre != null) {
|
||||
SystemServiceInfo ssi = new SystemServiceInfo();
|
||||
ssi.setServiceIdPre(serviceIdPre);
|
||||
List<SystemServiceInfo> list = systemServiceService.findList(ssi);
|
||||
if (!Collections3.isEmpty(list)) {
|
||||
Collections.sort(list, new Comparator<SystemServiceInfo>() {
|
||||
@Override
|
||||
public int compare(SystemServiceInfo arg0, SystemServiceInfo arg1) {
|
||||
return arg1.getServiceId().compareTo(arg0.getServiceId());
|
||||
}
|
||||
});
|
||||
return list.get(0).getServiceId() + 1;
|
||||
} else {
|
||||
return serviceIdPre * 100;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
@@ -12,18 +13,25 @@ import com.nis.web.dao.MyBatisDao;
|
||||
public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
|
||||
/**
|
||||
* 查询分类性质字典列表,
|
||||
* 查询分类性质顶层字典列表(无条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictList(ServiceDictInfo serviceDictInfo);
|
||||
|
||||
List<ServiceDictInfo> findTopDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询标签字典列表
|
||||
* 查出所有分类性质
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
List<ServiceDictInfo> findAllNoLeafDictList();
|
||||
/**
|
||||
* 查询分类性质字典列表(含条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
List<ServiceDictInfo> findDictSearchList(ServiceDictInfo serviceDictInfo);
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,14 +47,40 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
*/
|
||||
ServiceDictInfo getDictById(Integer serviceDictId);
|
||||
|
||||
/**
|
||||
* 查询所有非叶子节点字典配置信息
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDict();
|
||||
|
||||
//标签管理
|
||||
/**
|
||||
* 查询标签顶层字典列表(无条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findTopDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查出所有标签
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDictMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询标签字典列表(条件查询)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findDictSearchMarkList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllNoLeafDictMarkList();
|
||||
|
||||
|
||||
List<ServiceDictInfo> findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid);
|
||||
List<ServiceDictInfo> findAllItemDict(@Param("itemType")int itemType);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
|
||||
|
||||
|
||||
<!-- 查询分类性质列表 -->
|
||||
<select id="findDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3
|
||||
<!-- 查询分类性质顶层分页列表 -->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3 AND parent_id = 0
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type like '%${itemType}%'
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
@@ -81,8 +81,110 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询标签列表 -->
|
||||
<select id="findDictMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
|
||||
<!-- 查询标签顶层分页列表 -->
|
||||
<select id="findTopDictMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type = 3 AND parent_id = 0
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 查出所有分类性质 -->
|
||||
<select id="findAllDictList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1 AND s.item_type <![CDATA[<>]]> 3
|
||||
</select>
|
||||
|
||||
<!-- 查出所有标签-->
|
||||
<select id="findAllDictMarkList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
<include refid="menuJoins"/>
|
||||
WHERE s.is_valid =1 AND s.item_type = 3
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询所有非叶子配置 -->
|
||||
<select id="findAllNoLeafDictList" resultType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type <![CDATA[<>]]> 3
|
||||
</select>
|
||||
<!-- 查询所有非叶子标签配置 -->
|
||||
<select id="findAllNoLeafDictMarkList" resultType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
FROM service_dict_info s
|
||||
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = 3
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分类性质条件查询 -->
|
||||
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type <![CDATA[<>]]> 3
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND item_type like '%${itemType}%'
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 标签条件查询 -->
|
||||
<select id="findDictSearchMarkList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1 AND item_type=3
|
||||
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
@@ -91,7 +193,9 @@
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND item_code like '%${itemCode}%'
|
||||
</if>
|
||||
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
@@ -133,12 +237,12 @@
|
||||
|
||||
|
||||
<!-- 查询非叶子节点的所有字典信息 -->
|
||||
|
||||
<!--
|
||||
<select id="findAllDict">
|
||||
select
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0;
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="update">
|
||||
@@ -172,5 +276,15 @@
|
||||
<include refid="serviceDictInfoColumns" />
|
||||
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType};
|
||||
</select>
|
||||
|
||||
<sql id="menuJoins">
|
||||
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.nis.web.dao.systemService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
@@ -8,4 +10,6 @@ import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface SystemServiceInfoDao extends CrudDao<SystemServiceInfo> {
|
||||
|
||||
List<SystemServiceInfo> getSystemServiceByServiceId(String serviceId);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
<if test="serviceType != null">
|
||||
and ssi.service_type=#{serviceType}
|
||||
</if>
|
||||
<if test="serviceIdPre != null">
|
||||
and service_id like concat(#{serviceIdPre}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="get" resultMap="systemServiceInfoMap">
|
||||
@@ -87,6 +90,15 @@
|
||||
service_id=#{service_id} and is_valid=1
|
||||
</select>
|
||||
|
||||
<select id="getSystemServiceByServiceId" resultType="systemServiceInfo">
|
||||
select
|
||||
id
|
||||
from
|
||||
system_service_info
|
||||
where
|
||||
service_id=#{serviceId} and is_valid=1
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into system_service_info (
|
||||
service_id, service_name, service_desc, action, is_valid, service_type,
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
@@ -23,40 +24,51 @@ public class ServiceDictInfoService extends BaseService{
|
||||
private ServiceDictInfoDao serviceDictInfoDao;
|
||||
|
||||
/**
|
||||
* 查询分类性质字典分页
|
||||
* 查询分类性质字典分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findTopDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效字典配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签分页
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictList();
|
||||
}
|
||||
/**
|
||||
* 查询分类性质字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findDictSearchList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictMarkList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
return page;
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询字典详细信息
|
||||
* @param serviceDictId
|
||||
@@ -99,19 +111,82 @@ public class ServiceDictInfoService extends BaseService{
|
||||
* 查询所有非叶子节点字典配置信息
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDict() {
|
||||
/* public List<ServiceDictInfo> findAllDict() {
|
||||
|
||||
return serviceDictInfoDao.findAllDict();
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param serviceDictInfo
|
||||
*/
|
||||
public void deleteDict(ServiceDictInfo serviceDictInfo) {
|
||||
serviceDictInfo.setIsValid(0);
|
||||
serviceDictInfoDao.delete(serviceDictInfo);
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
//找出所有下级
|
||||
//查出所有节点
|
||||
ServiceDictInfo.sortList(list, serviceDictInfoDao.findAllDictList(new ServiceDictInfo()), serviceDictInfo.getServiceDictId(), true);
|
||||
list.add(serviceDictInfo);
|
||||
for(ServiceDictInfo se:list){
|
||||
se.setIsValid(0);
|
||||
serviceDictInfoDao.delete(se);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//标签管理
|
||||
|
||||
/**
|
||||
* 查询标签分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findTopDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效标签配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictMarkList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictMarkList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictSearchMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictMarkList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictMarkList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* findFlDict(查找所有有效的分类)
|
||||
@@ -185,5 +260,10 @@ public class ServiceDictInfoService extends BaseService{
|
||||
public List<ServiceDictInfo> findAllLableDict() {
|
||||
return serviceDictInfoDao.findAllItemDict(Constants.ITEM_TYPE_LABEL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -58,4 +58,8 @@ public class SystemServiceService extends CrudService<SystemServiceInfoDao, Syst
|
||||
|
||||
}
|
||||
|
||||
public List<SystemServiceInfo> getSystemServiceByServiceId(String serviceId) {
|
||||
return dao.getSystemServiceByServiceId(serviceId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,14 +91,9 @@
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<%-- <div class="col-md-4">
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
|
||||
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
|
||||
</div> --%>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
|
||||
<form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
|
||||
title="菜单" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">描述信息:</label>
|
||||
<div class="col-md-4">
|
||||
<input value="${serviceDictInfo.itemDesc}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
122
src/main/webapp/WEB-INF/views/cfg/serviceDictInfoSearchList.jsp
Normal file
122
src/main/webapp/WEB-INF/views/cfg/serviceDictInfoSearchList.jsp
Normal file
@@ -0,0 +1,122 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>分类性质配置信息</title>
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'"><spring:message code="add_request"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
分类性质管理
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i>分类性质搜索结果
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode ne '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td>${serviceDictInfo.serviceDictCreator.id}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${serviceDictInfo.serviceDictEditor.name}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,122 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>标签配置信息</title>
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'"><spring:message code="add_request"></spring:message></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
标签管理
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i>标签搜索结果
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td>${serviceDictInfo.serviceDictCreator.id}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${serviceDictInfo.serviceDictEditor.name}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,137 +3,134 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>分类性质配置信息</title>
|
||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function page2(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'">新增</button>
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i><spring:message code="分类性质配置列表"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="requestInfo" action="${ctx}/configuration/serviceDictInfo/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
|
||||
<label class="search-lable">开始时间:</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<label class="search-lable">结束时间:</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
<h3 class="page-title">
|
||||
分类性质管理
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i>分类性质配置列表
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-column mark" width="5%">编码</th>
|
||||
<th class="sort-column mark" width="10%">编码对应值</th>
|
||||
<th class="sort-column mark" width="20%">描述信息</th>
|
||||
<th class="sort-column mark" width="9%">数据类型</th>
|
||||
<th class="sort-column create_time" width="15%">创建时间</th>
|
||||
<!-- <th width="10%">修改记录</th> -->
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<th width="10%">操作</th>
|
||||
</shiro:hasPermission>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<%-- <td>
|
||||
<button class="btn revision popovers purple-stripe" data-content="${serviceDictInfo.itemDesc}">修改记录查看</button>
|
||||
</td> --%>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> 操作</a>
|
||||
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0"><i class="icon-list"></i>查看</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)"><i class="icon-edit"></i> 修改</a></li>
|
||||
<li class="divider"></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)"><i class="icon-trash"></i> 删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode ne '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">${page}</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -86,26 +86,31 @@
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/markSaveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<form:hidden path="serviceDictId"/>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">上级配置:</label>
|
||||
<%-- <div class="col-md-4">
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
|
||||
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
|
||||
</div> --%>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
|
||||
<form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
|
||||
title="菜单" url="/configuration/serviceDictInfo/treeMarkData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
|
||||
<div class="col-md-4">
|
||||
<input name="itemType" value="3" type="hidden" />
|
||||
<input id="itemType" class="form-control" value="${fns:getDictLabel('SERVICE_DICT_ITM_TYPE','3','0')}"/>
|
||||
<select id="itemType" name="itemType" class="form-control">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -2,138 +2,135 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>分标签配置信息</title>
|
||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/markList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
<title>标签配置信息</title>
|
||||
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
|
||||
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/markList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function page2(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.dropdown-menu {
|
||||
min-width: 70px;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'">新增</button>
|
||||
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'">新增配置</button>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i><spring:message code="标签配置列表"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="requestInfo" action="${ctx}/configuration/serviceDictInfo/markList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="50" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
|
||||
<label class="search-lable">开始时间:</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<label class="search-lable">结束时间:</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
<h3 class="page-title">
|
||||
标签配置管理
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-cogs"></i>标签配置列表
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-column mark" width="5%">编码</th>
|
||||
<th class="sort-column mark" width="10%">编码对应值</th>
|
||||
<th class="sort-column mark" width="20%">描述信息</th>
|
||||
<th class="sort-column mark" width="9%">数据类型</th>
|
||||
<th class="sort-column create_time" width="15%">创建时间</th>
|
||||
<!-- <th width="10%">修改记录</th> -->
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<th width="10%">操作</th>
|
||||
</shiro:hasPermission>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="serviceDictInfo">
|
||||
<tr>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td>${serviceDictInfo.itemValue}</td>
|
||||
<td>${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<%-- <td>
|
||||
<button class="btn revision popovers purple-stripe" data-content="${serviceDictInfo.itemDesc}">修改记录查看</button>
|
||||
</td> --%>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> 操作</a>
|
||||
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0"><i class="icon-list"></i>查看</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)"><i class="icon-edit"></i> 修改</a></li>
|
||||
<li class="divider"></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)"><i class="icon-trash"></i> 删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-12">
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<div class="col-md-12">
|
||||
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
|
||||
<option selected="selected"></option>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
|
||||
<c:if test="${dict.itemCode eq '3'}">
|
||||
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
|
||||
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
|
||||
<option value="${dict.itemCode}">${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
|
||||
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${list}" var="serviceDictInfo">
|
||||
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
|
||||
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
|
||||
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
|
||||
</c:if></td>
|
||||
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
|
||||
</shiro:hasPermission>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">${page}</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -14,7 +14,8 @@
|
||||
required:true
|
||||
},
|
||||
'serviceId':{
|
||||
required:true
|
||||
required:true,
|
||||
remote:"${ctx}/systemService/serviceIdValidate?id=" + encodeURIComponent($("#id").val())
|
||||
},
|
||||
'action':{
|
||||
required:true
|
||||
@@ -31,7 +32,8 @@
|
||||
required:'必填项'
|
||||
},
|
||||
'serviceId':{
|
||||
required:'必填项'
|
||||
required:'必填项',
|
||||
remote:'重复的serviceId'
|
||||
},
|
||||
'action':{
|
||||
required:'必填项'
|
||||
@@ -56,6 +58,7 @@
|
||||
}
|
||||
if (flag) {
|
||||
loading('正在提交,请稍等...');
|
||||
$("[disabled=disabled]").attr("disabled", false);
|
||||
form.submit();
|
||||
} else {
|
||||
flag = true;
|
||||
@@ -72,8 +75,78 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
changeType($("#serviceType").val(), $("#serviceType"));
|
||||
|
||||
//类型、动作不允许修改
|
||||
if ("${systemServiceInfo.id}") {
|
||||
$("#action").attr("disabled", true);
|
||||
$("#serviceType").attr("disabled", true);
|
||||
$("[name=tableType]").attr("disabled", true);
|
||||
}
|
||||
});
|
||||
|
||||
function changeType(v, obj) {
|
||||
if ($(obj).val() == '') {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
} else if ($(obj).val() == '1') {
|
||||
if ($(".table-list").length > 1) {
|
||||
alert("单域业务只能关联一个表");
|
||||
$(obj).val(v);
|
||||
} else if ($(".table-list").length == 1) {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
} else if ($(".table-list").length == 0) {
|
||||
$("#addBtn").attr("disabled", false);
|
||||
}
|
||||
} else if ($(obj).val() == '2') {
|
||||
$("#addBtn").attr("disabled", false);
|
||||
} else if ($(obj).val() == '3') {
|
||||
if ($(".table-list").length > 1) {
|
||||
alert("特定服务只能关联一个表");
|
||||
$(obj).val(v);
|
||||
} else if ($(".table-list").length == 1) {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
} else if ($(".table-list").length == 0) {
|
||||
$("#addBtn").attr("disabled", false);
|
||||
}
|
||||
}
|
||||
|
||||
autoServiceId();
|
||||
}
|
||||
|
||||
//自动获取serviceId
|
||||
function autoServiceId() {
|
||||
var type = $("[name=tableType]").val();
|
||||
var action = $("#action").val();
|
||||
var serviceIdPre;
|
||||
if ($("#serviceType").val() == "1" && action && type) {
|
||||
serviceIdPre = type + "0" + (action < 10 ? ("0" + action) : action);
|
||||
} else if ($("#serviceType").val() == "2" && action) {
|
||||
type = "60";
|
||||
serviceIdPre = type + (action < 10 ? ("0" + action) : action);
|
||||
} else if ($("#serviceType").val() == "3" && action) {
|
||||
type = "50";
|
||||
serviceIdPre = type + (action < 10 ? ("0" + action) : action);
|
||||
} else {
|
||||
serviceIdPre = "";
|
||||
}
|
||||
|
||||
if (serviceIdPre) {
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url:"${ctx}/systemService/newServiceId?serviceIdPre=" + serviceIdPre,
|
||||
dataType:"text",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$("#serviceIdInput").val(data);
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$("#serviceIdInput").val("");
|
||||
}
|
||||
}
|
||||
|
||||
function addDatatable() {
|
||||
$("#datatables").append(
|
||||
'<div class="table-list col-md-10">' +
|
||||
@@ -84,7 +157,7 @@
|
||||
'<span><input class="child-required form-control child-input" name="tableName"/></span> ' +
|
||||
'<span class="child-label"><font color="red">*</font>表类型:</span> ' +
|
||||
'<span> ' +
|
||||
'<select class="child-required" name="tableType"> ' +
|
||||
'<select class="child-required" name="tableType" onchange="autoServiceId()"> ' +
|
||||
'<option value="">请选择</option>' +
|
||||
'<option value="1">IP</option>' +
|
||||
'<option value="2">字符串</option>' +
|
||||
@@ -102,15 +175,21 @@
|
||||
'</div>' +
|
||||
'</div>'
|
||||
);
|
||||
|
||||
if ($("#serviceType").val() == '1' || $("#serviceType").val() == '3') {
|
||||
$("#addBtn").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
function del(obj) {
|
||||
$(obj).parent().parent().find("[name=sciIsValid]").val("0");
|
||||
$(obj).parent().parent().css("display", "none");
|
||||
$(obj).parent().parent().css("display", "none").attr("class", "table-delete");
|
||||
changeType($("#serviceType").val(), $("#serviceType"));
|
||||
}
|
||||
|
||||
function del2(obj) {
|
||||
$(obj).parent().parent().remove();
|
||||
changeType($("#serviceType").val(), $("#serviceType"));
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -138,7 +217,7 @@
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="systemServiceInfo" action="${ctx}/systemService/save" method="post" class="form-horizontal">
|
||||
<form:hidden path="id"/>
|
||||
<form:hidden path="id" id="id"/>
|
||||
<sys:message content="${message}"/>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -148,17 +227,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>业务ID:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="serviceId" htmlEscape="false" maxlength="30" class="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>动作:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="action" class="required form-control">
|
||||
<form:select id="action" path="action" class="required form-control" onchange="autoServiceId()">
|
||||
<form:option value="">请选择</form:option>
|
||||
<form:option value="1">阻断</form:option>
|
||||
<form:option value="2">监测</form:option>
|
||||
@@ -173,10 +245,11 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>类型:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="serviceType" class="required form-control">
|
||||
<form:select id="serviceType" path="serviceType" class="required form-control" onclick="now=this.value" onchange="changeType(now, this)">
|
||||
<form:option value="">请选择</form:option>
|
||||
<form:option value="1">单域</form:option>
|
||||
<form:option value="2">多域</form:option>
|
||||
<form:option value="3">特定服务</form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -186,7 +259,7 @@
|
||||
<div class="col-md-8" id="datatables">
|
||||
<shiro:hasPermission name="system:service:edit">
|
||||
<div>
|
||||
<button type="button" class="btn btn-default" onclick="addDatatable()">增加</button>
|
||||
<button id="addBtn" type="button" class="btn btn-default" onclick="addDatatable()">增加</button>
|
||||
<label for="childTableFlag" class="error" style="display:none">有未填项</label>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
@@ -223,6 +296,13 @@
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>业务ID:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="serviceIdInput" class="required form-control" name="serviceId" value="${systemServiceInfo.serviceId }" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>描述:</label>
|
||||
|
||||
@@ -74,6 +74,7 @@ function deleteService(id) {
|
||||
<form:option value="">请选择</form:option>
|
||||
<form:option value="1">单域</form:option>
|
||||
<form:option value="2">多域</form:option>
|
||||
<form:option value="3">特定服务</form:option>
|
||||
</form:select>
|
||||
</span>
|
||||
|
||||
@@ -121,6 +122,7 @@ function deleteService(id) {
|
||||
<td>
|
||||
<c:if test="${1 eq ssi.serviceType }">单域</c:if>
|
||||
<c:if test="${2 eq ssi.serviceType }">多域</c:if>
|
||||
<c:if test="${3 eq ssi.serviceType }">特定服务</c:if>
|
||||
</td>
|
||||
<td>${ssi.creator.loginId }</td>
|
||||
<td><fmt:formatDate value="${ssi.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
@@ -6,3 +6,16 @@ sysDict serviceDict
|
||||
margin-right: 5px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.input-medium {
|
||||
width: 155px !important;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
|
||||
34
src/main/webapp/static/pages/scripts/dict.js
Normal file
34
src/main/webapp/static/pages/scripts/dict.js
Normal file
@@ -0,0 +1,34 @@
|
||||
$(document).ready(function() {
|
||||
jQuery.validator.addMethod("codeNumber",function(value,element){
|
||||
return value>=0&value<=20000000},"请填写正确的数值");
|
||||
$("#name").focus();
|
||||
$("#searchForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'itemCode':{
|
||||
digits:true,
|
||||
codeNumber:true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
'itemCode':{
|
||||
digits:'请填写整数值',
|
||||
codeNumber:'请填写合适的数值(0~200000000)'
|
||||
}
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
loading('正在处理,请稍等...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
$("#messageBox").text("输入有误,请先更正。");
|
||||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user