Commit ee4e62ba68cc50ab605d79a26e55605b996a8370

Authored by fangcheng
1 parent 664b5c6eef
Exists in master

高危版本、高危项、自定义高危项管理

Showing 14 changed files with 965 additions and 3 deletions

parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskConf.java View file @ ee4e62b
... ... @@ -5,6 +5,7 @@
5 5 import org.apache.ibatis.type.Alias;
6 6  
7 7 import com.baomidou.mybatisplus.annotations.TableField;
  8 +import com.baomidou.mybatisplus.annotations.TableId;
8 9 import com.baomidou.mybatisplus.annotations.TableName;
9 10  
10 11 /**
... ... @@ -24,7 +25,7 @@
24 25 /**
25 26 *
26 27 */
27   - @TableField(value = "ID")
  28 + @TableId(value = "ID")
28 29 private String id;
29 30 /**
30 31 * 高危项定义资源表ID
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskSource.java View file @ ee4e62b
... ... @@ -3,6 +3,7 @@
3 3 import java.io.Serializable;
4 4  
5 5 import com.baomidou.mybatisplus.annotations.TableField;
  6 +import com.baomidou.mybatisplus.annotations.TableId;
6 7 import com.baomidou.mybatisplus.annotations.TableName;
7 8 import com.lyms.base.common.enums.StatusEnum;
8 9  
... ... @@ -22,7 +23,7 @@
22 23 /**
23 24 *
24 25 */
25   - @TableField(value = "ID")
  26 + @TableId(value = "ID")
26 27 private String id;
27 28 /**
28 29 * 高危项名称
... ... @@ -34,6 +35,9 @@
34 35 */
35 36 @TableField(value = "TYPE")
36 37 private String type;
  38 +
  39 + @TableField(value = "ITEMORDER")
  40 + private String itemorder;
37 41 /**
38 42 * 是否启用,默认1启用
39 43 */
... ... @@ -71,6 +75,14 @@
71 75 public void setEnable(Integer enable) {
72 76 this.enable = enable;
73 77 }
  78 +
  79 + public String getItemorder() {
  80 + return itemorder;
  81 + }
  82 +
  83 + public void setItemorder(String itemorder) {
  84 + this.itemorder = itemorder;
  85 + }
74 86  
75 87 }
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskVersion.java View file @ ee4e62b
... ... @@ -5,6 +5,7 @@
5 5 import org.apache.ibatis.type.Alias;
6 6  
7 7 import com.baomidou.mybatisplus.annotations.TableField;
  8 +import com.baomidou.mybatisplus.annotations.TableId;
8 9 import com.baomidou.mybatisplus.annotations.TableName;
9 10  
10 11 /**
... ... @@ -24,7 +25,7 @@
24 25 /**
25 26 *
26 27 */
27   - @TableField(value = "ID")
  28 + @TableId(value = "ID")
28 29 private String id;
29 30 /**
30 31 * 高危版本名称
... ... @@ -36,6 +37,11 @@
36 37 */
37 38 @TableField(value = "ENABLE")
38 39 private Integer enable;
  40 + /**
  41 + * 是否删除
  42 + */
  43 + @TableField(value = "IFDEL")
  44 + private Integer ifdel;
39 45  
40 46 public String getId() {
41 47 return id;
... ... @@ -61,5 +67,13 @@
61 67 this.enable = enable;
62 68 }
63 69  
  70 + public Integer getIfdel() {
  71 + return ifdel;
  72 + }
  73 +
  74 + public void setIfdel(Integer ifdel) {
  75 + this.ifdel = ifdel;
  76 + }
  77 +
64 78 }
parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskVersionService.java View file @ ee4e62b
... ... @@ -58,6 +58,17 @@
58 58 * <li>修改时间:
59 59 */
60 60 public String createVersion(HighriskVersion version) throws SystemException;
  61 +
  62 + /**
  63 + * <li>@Description:复制一个版本
  64 + * <li>@param id
  65 + * <li>@return
  66 + * <li>创建人:方承
  67 + * <li>创建时间:2017年4月6日
  68 + * <li>修改人:
  69 + * <li>修改时间:
  70 + */
  71 + public Integer copy(Serializable id);
61 72  
62 73 }
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskVersionServiceImpl.java View file @ ee4e62b
... ... @@ -9,11 +9,14 @@
9 9  
10 10 import com.baomidou.mybatisplus.mapper.EntityWrapper;
11 11 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
  12 +import com.lyms.base.common.dao.conf.HighriskConfMapper;
12 13 import com.lyms.base.common.dao.conf.HighriskVersionMapper;
  14 +import com.lyms.base.common.entity.conf.HighriskConf;
13 15 import com.lyms.base.common.entity.conf.HighriskVersion;
14 16 import com.lyms.base.common.enums.StatusEnum;
15 17 import com.lyms.base.common.service.conf.HighriskVersionService;
16 18 import com.lyms.exception.SystemException;
  19 +import com.lyms.util.DateTimeUtils;
17 20 import com.lyms.util.StrUtils;
18 21  
19 22 /**
... ... @@ -30,6 +33,8 @@
30 33  
31 34 @Autowired
32 35 private HighriskVersionMapper versionMapper;
  36 + @Autowired
  37 + private HighriskConfMapper confMapper;
33 38  
34 39 @Override
35 40 public Integer deleteLogicById(Serializable id) {
... ... @@ -88,6 +93,25 @@
88 93 Integer tag = versionMapper.insert(version);
89 94 return tag != null && tag >= 1 ? id : null;
90 95 }
  96 +
  97 + @Override
  98 + @Transactional
  99 + public Integer copy(Serializable id) {
  100 + HighriskVersion version = baseMapper.selectById(id);
  101 + HighriskVersion newVersion = new HighriskVersion();
  102 + String time = DateTimeUtils.getDateTime("yyyy_MM_dd_HH_mm_ss");
  103 + String versionId = time;
  104 + newVersion.setId(versionId);
  105 + newVersion.setName(version.getName()+time);
  106 + Integer tag = baseMapper.insert(newVersion);
  107 + List<HighriskConf> confList = confMapper.selectList(new EntityWrapper<HighriskConf>().where("version_id={0}", version.getId()));
  108 + for(HighriskConf conf : confList){
  109 + conf.setId(StrUtils.uuid());
  110 + conf.setVersionId(versionId);
  111 + confMapper.insert(conf);
  112 + }
  113 + return tag;
  114 + }
91 115  
92 116 }
parent/center.manager/src/main/java/com/lyms/cm/controller/conf/HighriskConfController.java View file @ ee4e62b
  1 +package com.lyms.cm.controller.conf;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Controller;
  8 +import org.springframework.ui.Model;
  9 +import org.springframework.web.bind.annotation.PathVariable;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import com.baomidou.mybatisplus.mapper.EntityWrapper;
  15 +import com.baomidou.mybatisplus.plugins.Page;
  16 +import com.lyms.base.common.entity.conf.HighriskConf;
  17 +import com.lyms.base.common.service.conf.HighriskConfService;
  18 +import com.lyms.constants.OperationName;
  19 +import com.lyms.util.StrUtils;
  20 +import com.lyms.web.bean.AjaxResult;
  21 +import com.lyms.web.controller.BaseController;
  22 +
  23 +/**
  24 + * <p>
  25 + * 前端控制器
  26 + * </p>
  27 + *
  28 + * @author fangcheng
  29 + * @since 2017-04-06
  30 + */
  31 +@Controller
  32 +@RequestMapping("/highriskConf")
  33 +public class HighriskConfController extends BaseController {
  34 +
  35 + @Autowired
  36 + private HighriskConfService highriskConfService;
  37 +
  38 +
  39 + /**
  40 + * 跳转到列表页面
  41 + *
  42 + * @return
  43 + */
  44 + @RequestMapping(value = "/toList", method = { RequestMethod.GET })
  45 + public String toList() {
  46 + return "/conf/highrisk/conf_list";
  47 + }
  48 +
  49 + /**
  50 + * 列表
  51 + *
  52 + * @param page
  53 + * @param model
  54 + * @return
  55 + */
  56 + @RequestMapping(value = "/list", method = { RequestMethod.POST, RequestMethod.GET })
  57 + @ResponseBody
  58 + public Map<String, Object> list(Model model) {
  59 + Page<HighriskConf> page = getPage();
  60 + EntityWrapper<HighriskConf> ew = new EntityWrapper<HighriskConf>();
  61 +
  62 + String versionId = getParameter("versionId");
  63 + String searchName = getParameter("name");
  64 + if (StrUtils.isNotEmpty(searchName)) {
  65 + ew.and("name like {0}", searchName.trim() + "%");
  66 + }
  67 + if (StrUtils.isNotEmpty(versionId)) {
  68 + ew.and("version_id like {0}", versionId.trim() + "%");
  69 + }
  70 + ew.orderBy("grouporder,itemorder");
  71 + page = highriskConfService.selectPage(page,ew);
  72 + return toGridData(page);
  73 + }
  74 +
  75 + /**
  76 + * 跳转到编辑页面
  77 + *
  78 + * @return
  79 + */
  80 + @RequestMapping(value = { "/{id}/toEdit" }, method = RequestMethod.GET)
  81 + public String toEdit(@PathVariable String id, Model model) {
  82 + if (!StringUtils.isBlank(id) && !"0".equals(id)) {
  83 + HighriskConf entity = highriskConfService.selectById(id);
  84 + model.addAttribute("conf", entity);
  85 + }
  86 + return "/conf/highrisk/conf_edit";
  87 + }
  88 +
  89 + /**
  90 + * 创建
  91 + * <p>
  92 + * TODO
  93 + *
  94 + * @param user
  95 + * @return
  96 + */
  97 + @RequestMapping(value = "/create", method = RequestMethod.POST)
  98 + @ResponseBody
  99 + public AjaxResult create(HighriskConf HighriskConf, AjaxResult ajaxResult) {
  100 + boolean tag = highriskConfService.insert(HighriskConf);
  101 + return handleAjaxResult(ajaxResult, tag, OperationName.CREATE);
  102 + }
  103 +
  104 + /**
  105 + * 修改信息
  106 + */
  107 + @RequestMapping(value = "/update", method = { RequestMethod.POST })
  108 + @ResponseBody
  109 + public AjaxResult update(HighriskConf HighriskConf, AjaxResult ajaxResult) {
  110 + boolean tag = highriskConfService.updateById(HighriskConf);
  111 + return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE);
  112 + }
  113 +
  114 + /**
  115 + * 删除
  116 + *
  117 + * @return
  118 + */
  119 + @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST })
  120 + @ResponseBody
  121 + public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) {
  122 + int tag = highriskConfService.deleteLogicById(id);
  123 + return handleAjaxResult(ajaxResult, tag, OperationName.DELETE);
  124 + }
  125 +
  126 +}
parent/center.manager/src/main/java/com/lyms/cm/controller/conf/HighriskSourceController.java View file @ ee4e62b
  1 +package com.lyms.cm.controller.conf;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Controller;
  8 +import org.springframework.ui.Model;
  9 +import org.springframework.web.bind.annotation.PathVariable;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import com.baomidou.mybatisplus.mapper.EntityWrapper;
  15 +import com.baomidou.mybatisplus.plugins.Page;
  16 +import com.lyms.base.common.entity.conf.HighriskSource;
  17 +import com.lyms.base.common.entity.conf.HighriskVersion;
  18 +import com.lyms.base.common.service.conf.HighriskSourceService;
  19 +import com.lyms.base.common.service.conf.HighriskVersionService;
  20 +import com.lyms.constants.OperationName;
  21 +import com.lyms.util.StrUtils;
  22 +import com.lyms.web.bean.AjaxResult;
  23 +import com.lyms.web.controller.BaseController;
  24 +
  25 +/**
  26 + * <p>
  27 + * 前端控制器
  28 + * </p>
  29 + *
  30 + * @author fangcheng
  31 + * @since 2017-04-06
  32 + */
  33 +@Controller
  34 +@RequestMapping("/highriskSource")
  35 +public class HighriskSourceController extends BaseController {
  36 +
  37 + @Autowired
  38 + private HighriskSourceService highriskSourceService;
  39 +
  40 +
  41 + /**
  42 + * 跳转到列表页面
  43 + *
  44 + * @return
  45 + */
  46 + @RequestMapping(value = "/toList", method = { RequestMethod.GET })
  47 + public String toList() {
  48 + return "/conf/highrisk/source_list";
  49 + }
  50 +
  51 + /**
  52 + * 列表
  53 + *
  54 + * @param page
  55 + * @param model
  56 + * @return
  57 + */
  58 + @RequestMapping(value = "/list", method = { RequestMethod.POST, RequestMethod.GET })
  59 + @ResponseBody
  60 + public Map<String, Object> list(Model model) {
  61 + Page<HighriskSource> page = getPage();
  62 + EntityWrapper<HighriskSource> ew = new EntityWrapper<HighriskSource>();
  63 + String searchName = getParameter("name");
  64 + if (StrUtils.isNotEmpty(searchName)) {
  65 + ew.and("name like {0}", searchName.trim() + "%");
  66 + }
  67 + ew.orderBy("itemorder");
  68 + page = highriskSourceService.selectPage(page,ew);
  69 + return toGridData(page);
  70 + }
  71 +
  72 + /**
  73 + * 跳转到编辑页面
  74 + *
  75 + * @return
  76 + */
  77 + @RequestMapping(value = { "/{id}/toEdit" }, method = RequestMethod.GET)
  78 + public String toEdit(@PathVariable String id, Model model) {
  79 + if (!StringUtils.isBlank(id)&&!"0".equals(id)) {
  80 + HighriskSource entity = highriskSourceService.selectById(id);
  81 + model.addAttribute("source", entity);
  82 + }
  83 + return "/conf/highrisk/source_edit";
  84 + }
  85 +
  86 + /**
  87 + * 创建用户
  88 + * <p>
  89 + * TODO
  90 + *
  91 + * @param user
  92 + * @return
  93 + */
  94 + @RequestMapping(value = "/create", method = RequestMethod.POST)
  95 + @ResponseBody
  96 + public AjaxResult create(HighriskSource HighriskSource, AjaxResult ajaxResult) {
  97 + boolean tag = highriskSourceService.insert(HighriskSource);
  98 + return handleAjaxResult(ajaxResult, tag, OperationName.CREATE);
  99 + }
  100 +
  101 + /**
  102 + * 修改信息
  103 + */
  104 + @RequestMapping(value = "/update", method = { RequestMethod.POST })
  105 + @ResponseBody
  106 + public AjaxResult update(HighriskSource HighriskSource, AjaxResult ajaxResult) {
  107 + boolean tag = highriskSourceService.updateById(HighriskSource);
  108 + return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE);
  109 + }
  110 +
  111 + /**
  112 + * 删除
  113 + *
  114 + * @return
  115 + */
  116 + @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST })
  117 + @ResponseBody
  118 + public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) {
  119 + int tag = highriskSourceService.deleteLogicById(id);
  120 + return handleAjaxResult(ajaxResult, tag, OperationName.DELETE);
  121 + }
  122 +
  123 +}
parent/center.manager/src/main/java/com/lyms/cm/controller/conf/HighriskVersionController.java View file @ ee4e62b
  1 +package com.lyms.cm.controller.conf;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Controller;
  8 +import org.springframework.ui.Model;
  9 +import org.springframework.web.bind.annotation.PathVariable;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import com.baomidou.mybatisplus.mapper.EntityWrapper;
  15 +import com.baomidou.mybatisplus.plugins.Page;
  16 +import com.lyms.base.common.entity.conf.HighriskVersion;
  17 +import com.lyms.base.common.service.conf.HighriskVersionService;
  18 +import com.lyms.constants.OperationName;
  19 +import com.lyms.util.StrUtils;
  20 +import com.lyms.web.bean.AjaxResult;
  21 +import com.lyms.web.controller.BaseController;
  22 +
  23 +/**
  24 + * <p>
  25 + * 前端控制器
  26 + * </p>
  27 + *
  28 + * @author fangcheng
  29 + * @since 2017-04-06
  30 + */
  31 +@Controller
  32 +@RequestMapping("/highriskVersion")
  33 +public class HighriskVersionController extends BaseController {
  34 +
  35 + @Autowired
  36 + private HighriskVersionService highriskVersionService;
  37 +
  38 +
  39 + /**
  40 + * 跳转到用户列表页面
  41 + *
  42 + * @return
  43 + */
  44 + @RequestMapping(value = "/toList", method = { RequestMethod.GET })
  45 + public String toList() {
  46 + return "/conf/highrisk/version_list";
  47 + }
  48 +
  49 + /**
  50 + * 列表
  51 + *
  52 + * @param page
  53 + * @param model
  54 + * @return
  55 + */
  56 + @RequestMapping(value = "/list", method = { RequestMethod.POST, RequestMethod.GET })
  57 + @ResponseBody
  58 + public Map<String, Object> list(Model model) {
  59 + Page<HighriskVersion> page = getPage();
  60 + EntityWrapper<HighriskVersion> ew = new EntityWrapper<HighriskVersion>();
  61 + ew.where("ifDel=0");
  62 + String searchName = getParameter("name");
  63 + if (StrUtils.isNotEmpty(searchName)) {
  64 + ew.and("name like {0}", searchName.trim() + "%");
  65 + }
  66 + page = highriskVersionService.selectPage(page,ew);
  67 + return toGridData(page);
  68 + }
  69 +
  70 + /**
  71 + * 跳转到编辑页面
  72 + *
  73 + * @return
  74 + */
  75 + @RequestMapping(value = { "/{id}/toEdit" }, method = RequestMethod.GET)
  76 + public String toEdit(@PathVariable String id, Model model) {
  77 + if (!StringUtils.isBlank(id)&&!"0".equals(id)) {
  78 + HighriskVersion entity = highriskVersionService.selectById(id);
  79 + model.addAttribute("version", entity);
  80 + }
  81 + return "/conf/highrisk/version_edit";
  82 + }
  83 +
  84 + /**
  85 + * 创建用户
  86 + * <p>
  87 + * TODO
  88 + *
  89 + * @param user
  90 + * @return
  91 + */
  92 + @RequestMapping(value = "/create", method = RequestMethod.POST)
  93 + @ResponseBody
  94 + public AjaxResult create(HighriskVersion highriskVersion, AjaxResult ajaxResult) {
  95 + boolean tag = highriskVersionService.insert(highriskVersion);
  96 + return handleAjaxResult(ajaxResult, tag, OperationName.CREATE);
  97 + }
  98 +
  99 + /**
  100 + * 修改信息
  101 + */
  102 + @RequestMapping(value = "/update", method = { RequestMethod.POST })
  103 + @ResponseBody
  104 + public AjaxResult update(HighriskVersion highriskVersion, AjaxResult ajaxResult) {
  105 + boolean tag = highriskVersionService.updateById(highriskVersion);
  106 + return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE);
  107 + }
  108 +
  109 + /**
  110 + * 删除
  111 + *
  112 + * @return
  113 + */
  114 + @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST })
  115 + @ResponseBody
  116 + public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) {
  117 + int tag = highriskVersionService.deleteLogicById(id);
  118 + return handleAjaxResult(ajaxResult, tag, OperationName.DELETE);
  119 + }
  120 +
  121 + /**
  122 + * 复制
  123 + *
  124 + * @return
  125 + */
  126 + @RequestMapping(value = "/{id}/copy", method = { RequestMethod.GET, RequestMethod.POST })
  127 + @ResponseBody
  128 + public AjaxResult copy(@PathVariable String id, AjaxResult ajaxResult){
  129 + int tag = highriskVersionService.copy(id);
  130 + return handleAjaxResult(ajaxResult, tag, "复制");
  131 + }
  132 +
  133 +}
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/conf_edit.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="ibox float-e-margins">
  3 + <div class="ibox-content">
  4 + <form id="validForm" class="form-horizontal m-t" novalidate="novalidate">
  5 + <div class="form-group">
  6 + <label class="col-sm-3 control-label">id编号:</label>
  7 + <div class="col-sm-8">
  8 + <input type="text" placeholder="id编号" value="$!conf.id" #if ($conf.id) readOnly="true" #end aria-required="true" required="true" class="form-control" minlength="2" name="id" id="id">
  9 + </div>
  10 + </div>
  11 + <div class="form-group">
  12 + <label class="col-sm-3 control-label">source_id:</label>
  13 + <div class="col-sm-8">
  14 + <input type="text" placeholder="source_id" value="$!conf.sourceId" aria-required="true" required="true" class="form-control" minlength="2" name="sourceId" id="sourceId">
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="col-sm-3 control-label">版本id:</label>
  19 + <div class="col-sm-8">
  20 + <input type="text" placeholder="version_id" value="$!conf.versionId" aria-required="true" required="true" class="form-control" minlength="2" name="versionId" id="versionId">
  21 + </div>
  22 + </div>
  23 + <div class="form-group">
  24 + <label class="col-sm-3 control-label">自定义高危项名称:</label>
  25 + <div class="col-sm-8">
  26 + <input type="text" placeholder="自定义高危项名称" value="$!conf.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name">
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="col-sm-3 control-label">高危评分:</label>
  31 + <div class="col-sm-8">
  32 + <input type="text" placeholder="高危评分:如‘10’" value="$!conf.grade" aria-required="true" required="true" class="form-control" minlength="2" name="grade" id="grade">
  33 + </div>
  34 + </div>
  35 + <div class="form-group">
  36 + <label class="col-sm-3 control-label">颜色编码:</label>
  37 + <div class="col-sm-8">
  38 + <input type="text" placeholder="颜色编码:如‘#000000’" value="$!conf.colorcode" aria-required="true" required="true" class="form-control" minlength="2" name="colorcode" id="colorcode">
  39 + </div>
  40 + </div>
  41 + <div class="form-group">
  42 + <label class="col-sm-3 control-label">颜色文本:</label>
  43 + <div class="col-sm-8">
  44 + <input type="text" placeholder="颜色文本:如‘红色高危’" value="$!conf.colortext" aria-required="true" required="true" class="form-control" minlength="2" name="colortext" id="colortext">
  45 + </div>
  46 + </div>
  47 + <div class="form-group">
  48 + <label class="col-sm-3 control-label">组排序序号:</label>
  49 + <div class="col-sm-8">
  50 + <input type="text" placeholder="组排序序号:如‘1’" value="$!conf.grouporder" aria-required="true" required="true" class="form-control" minlength="2" name="grouporder" id="grouporder">
  51 + </div>
  52 + </div>
  53 + <div class="form-group">
  54 + <label class="col-sm-3 control-label">项排序序号:</label>
  55 + <div class="col-sm-8">
  56 + <input type="text" placeholder="项排序序号:如‘2’" value="$!conf.itemorder" aria-required="true" required="true" class="form-control" minlength="2" name="itemorder" id="itemorder">
  57 + </div>
  58 + </div>
  59 + <div class="form-group">
  60 + <label class="col-sm-3 control-label"></label>
  61 + <div class="col-sm-8">
  62 + <label class="checkbox-inline i-checks">
  63 + <div class="icheckbox_square-green" style="position: relative;">
  64 + <input type="checkbox" value="0" name="enable" #if ($conf.enable == 0) checked="checked" #end
  65 + style="position: absolute; opacity: 0;" >
  66 + <ins class="iCheck-helper"
  67 + style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
  68 + </div>是否禁用(选中禁用,不选中可用)
  69 + </label>
  70 + </div>
  71 + </div>
  72 + <div class="hr-line-dashed"></div>
  73 + <div class="form-group">
  74 + <div class="col-sm-4 col-sm-offset-3 pull-right">
  75 + <button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i>&nbsp;提交</button>
  76 + <button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i>&nbsp;取消</button>
  77 + </div>
  78 + </div>
  79 + </form>
  80 + </div>
  81 +</div>
  82 +<script type="text/javascript">
  83 + function save(){
  84 + if($('#validForm').valid()){
  85 + var data = $('#validForm').serialize();
  86 + //console.log(data);
  87 + if("$!conf.id" == ""){
  88 + ajaxPost(APP.PATH + "/highriskConf/create",data);
  89 + }else{
  90 + ajaxPost(APP.PATH + "/highriskConf/update",data);
  91 + }
  92 + parent.reloadGrid('dataTable');
  93 + }
  94 + }
  95 +</script>
  96 +#end
  97 +#extends("/common/base_list.html")
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/conf_list.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="row wrapper border-bottom white-bg page-heading">
  3 + <div class="col-sm-10">
  4 + <div style="padding-top:30px;">
  5 + <form role="form" class="form-inline">
  6 + <div class="form-group">
  7 + <input type="text" placeholder="version_id" id="versionIdSearch" class="form-control">
  8 + </div>
  9 + <div class="form-group">
  10 + <input type="text" placeholder="请输入自定义高危项名称" id="nameSearch" class="form-control">
  11 + </div>
  12 + </form>
  13 + </div>
  14 + </div>
  15 + <div class="col-sm-2">
  16 + <div class="title-action" onclick="search();">
  17 + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a>
  18 + </div>
  19 + </div>
  20 +</div>
  21 +<div class="wrapper wrapper-content">
  22 + <div class="row">
  23 + <div class="col-sm-12">
  24 + <div id="toolbar">
  25 + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button>
  26 + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button>
  27 + <!--
  28 + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button>
  29 + -->
  30 + </div>
  31 + <table id="dataTable"></table>
  32 + </div>
  33 + </div>
  34 +</div>
  35 +#end
  36 +#override("js")
  37 +<script type="text/javascript">
  38 +function search(){
  39 + var queryParams = {
  40 + query:{
  41 + versionId: $("#versionIdSearch").val(),
  42 + name:$("#nameSearch").val()
  43 + }
  44 + }
  45 + $('#dataTable').bootstrapTable('refresh', queryParams );
  46 +}
  47 +var controllerRequestMappint = "/highriskConf/";
  48 +
  49 +function add() {
  50 + fullWindow("新增自定义高危项", APP.PATH + controllerRequestMappint + "0/toEdit");
  51 +}
  52 +
  53 +function edit(){
  54 + var id = getSingleSelectedValue("dataTable","id");
  55 + if(id){
  56 + fullWindow("修改自定义高危项", APP.PATH + controllerRequestMappint + id + "/toEdit");
  57 + }
  58 +}
  59 +
  60 +function del(){
  61 + goDelete("dataTable","id", APP.PATH + controllerRequestMappint + "@value@/delete");
  62 +}
  63 +## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table
  64 +## 注意:自己创建的特殊的table不能extends base_list.html
  65 +var default_dataUrl = APP.PATH + controllerRequestMappint + "list";
  66 +var default_dataColumns = [{
  67 + field: 'check_state',
  68 + title: '',
  69 + checkbox: true
  70 + },{
  71 + field: 'id',
  72 + title: '编号'
  73 + },{
  74 + field: 'sourceId',
  75 + title: 'source_id'
  76 + },{
  77 + field: 'versionId',
  78 + title: 'version_id'
  79 + },{
  80 + field: 'name',
  81 + title: '自定义高危项名称'
  82 + },{
  83 + field: 'grade',
  84 + title: '评分'
  85 + },{
  86 + field: 'colortext',
  87 + title: 'colortext'
  88 + },{
  89 + field: 'colorcode',
  90 + title: 'colorcode'
  91 + },{
  92 + field: 'grouporder',
  93 + title: 'grouporder'
  94 + },{
  95 + field: 'itemorder',
  96 + title: 'itemorder'
  97 + },{
  98 + field: 'enable',
  99 + title: '启/停用',
  100 + formatter:enableFormatter
  101 + }];
  102 +
  103 +</script>
  104 +#end
  105 +#extends("/common/base_list.html")
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/source_edit.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="ibox float-e-margins">
  3 + <div class="ibox-content">
  4 + <form id="validForm" class="form-horizontal m-t" novalidate="novalidate">
  5 + <div class="form-group">
  6 + <label class="col-sm-3 control-label">id编号:</label>
  7 + <div class="col-sm-8">
  8 + <input type="text" placeholder="id编号" value="$!source.id" #if ($source.id) readOnly="true" #end aria-required="true" required="true" class="form-control" minlength="2" name="id" id="id">
  9 + </div>
  10 + </div>
  11 + <div class="form-group">
  12 + <label class="col-sm-3 control-label">高危项名称:</label>
  13 + <div class="col-sm-8">
  14 + <input type="text" placeholder="版本名称" value="$!source.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name">
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="col-sm-3 control-label">高危项类型:</label>
  19 + <div class="col-sm-8">
  20 + <select class="form-control m-b" name="type">
  21 + <option value="1" #if ($source.type == 1) selected="selected" #end >女性高危</option>
  22 + <option value="0" #if ($source.type == 2) selected="selected" #end >男性高危</option>
  23 + <option value="0" #if ($source.type == 3) selected="selected" #end >儿童高危</option>
  24 + </select>
  25 + </div>
  26 + </div>
  27 + <div class="form-group">
  28 + <label class="col-sm-3 control-label"></label>
  29 + <div class="col-sm-8">
  30 + <label class="checkbox-inline i-checks">
  31 + <div class="icheckbox_square-green" style="position: relative;">
  32 + <input type="checkbox" value="0" name="enable" #if ($source.enable == 0) checked="checked" #end
  33 + style="position: absolute; opacity: 0;" >
  34 + <ins class="iCheck-helper"
  35 + style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
  36 + </div>是否禁用(选中禁用,不选中可用)
  37 + </label>
  38 + </div>
  39 + </div>
  40 + <div class="hr-line-dashed"></div>
  41 + <div class="form-group">
  42 + <div class="col-sm-4 col-sm-offset-3 pull-right">
  43 + <button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i>&nbsp;提交</button>
  44 + <button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i>&nbsp;取消</button>
  45 + </div>
  46 + </div>
  47 + </form>
  48 + </div>
  49 +</div>
  50 +<script type="text/javascript">
  51 + function save(){
  52 + if($('#validForm').valid()){
  53 + var data = $('#validForm').serialize();
  54 + //console.log(data);
  55 + if("$!source.id" == ""){
  56 + ajaxPost(APP.PATH + "/highriskSource/create",data);
  57 + }else{
  58 + ajaxPost(APP.PATH + "/highriskSource/update",data);
  59 + }
  60 + parent.reloadGrid('dataTable');
  61 + }
  62 + }
  63 +</script>
  64 +#end
  65 +#extends("/common/base_list.html")
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/source_list.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="row wrapper border-bottom white-bg page-heading">
  3 + <div class="col-sm-10">
  4 + <div style="padding-top:30px;">
  5 + <form role="form" class="form-inline">
  6 + <div class="form-group">
  7 + <input type="text" placeholder="请输入高危项名称" id="nameSearch" class="form-control">
  8 + </div>
  9 + </form>
  10 + </div>
  11 + </div>
  12 + <div class="col-sm-2">
  13 + <div class="title-action" onclick="search();">
  14 + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a>
  15 + </div>
  16 + </div>
  17 +</div>
  18 +<div class="wrapper wrapper-content">
  19 + <div class="row">
  20 + <div class="col-sm-12">
  21 + <div id="toolbar">
  22 + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button>
  23 + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button>
  24 + <!--
  25 + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button>
  26 + -->
  27 + </div>
  28 + <table id="dataTable"></table>
  29 + </div>
  30 + </div>
  31 +</div>
  32 +#end
  33 +#override("js")
  34 +<script type="text/javascript">
  35 +function search(){
  36 + var queryParams = {
  37 + query:{
  38 + name: $("#nameSearch").val()
  39 + }
  40 + }
  41 + $('#dataTable').bootstrapTable('refresh', queryParams );
  42 +}
  43 +var controllerRequestMappint = "/highriskSource/";
  44 +
  45 +function add() {
  46 + fullWindow("新增高危项", APP.PATH + controllerRequestMappint + "0/toEdit");
  47 +}
  48 +
  49 +function edit(){
  50 + var id = getSingleSelectedValue("dataTable","id");
  51 + if(id){
  52 + fullWindow("修改高危项", APP.PATH + controllerRequestMappint + id + "/toEdit");
  53 + }
  54 +}
  55 +
  56 +function del(){
  57 + goDelete("dataTable","id", APP.PATH + controllerRequestMappint + "@value@/delete");
  58 +}
  59 +## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table
  60 +## 注意:自己创建的特殊的table不能extends base_list.html
  61 +var default_dataUrl = APP.PATH + controllerRequestMappint + "list";
  62 +var default_dataColumns = [{
  63 + field: 'check_state',
  64 + title: '',
  65 + checkbox: true
  66 + },{
  67 + field: 'id',
  68 + title: '编号'
  69 + },{
  70 + field: 'name',
  71 + title: '高危项名称'
  72 + },{
  73 + field: 'type',
  74 + title: '类型',
  75 + formatter:function(value,row,index){
  76 + if(value == 1){
  77 + return '女性高危'
  78 + }else if(value == 2){
  79 + return '男性高危'
  80 + }else if(value == 1){
  81 + return '儿童高危'
  82 + }
  83 + }
  84 + },{
  85 + field: 'enable',
  86 + title: '启/停用',
  87 + formatter:enableFormatter
  88 + }];
  89 +
  90 +</script>
  91 +#end
  92 +#extends("/common/base_list.html")
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/version_edit.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="ibox float-e-margins">
  3 + <div class="ibox-content">
  4 + <form id="validForm" class="form-horizontal m-t" novalidate="novalidate">
  5 + <div class="form-group">
  6 + <label class="col-sm-3 control-label">id编号:</label>
  7 + <div class="col-sm-8">
  8 + <input type="text" placeholder="id编号" value="$!version.id" #if ($version.id) readOnly="true" #end aria-required="true" required="true" class="form-control" minlength="2" name="id" id="id">
  9 + </div>
  10 + </div>
  11 + <div class="form-group">
  12 + <label class="col-sm-3 control-label">版本名称:</label>
  13 + <div class="col-sm-8">
  14 + <input type="text" placeholder="版本名称" value="$!version.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name">
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="col-sm-3 control-label"></label>
  19 + <div class="col-sm-8">
  20 + <label class="checkbox-inline i-checks">
  21 + <div class="icheckbox_square-green" style="position: relative;">
  22 + <input type="checkbox" value="0" name="enable" #if ($version.enable == 0) checked="checked" #end
  23 + style="position: absolute; opacity: 0;" >
  24 + <ins class="iCheck-helper"
  25 + style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
  26 + </div>是否禁用(选中禁用,不选中可用)
  27 + </label>
  28 + </div>
  29 + </div>
  30 + <div class="hr-line-dashed"></div>
  31 + <div class="form-group">
  32 + <div class="col-sm-4 col-sm-offset-3 pull-right">
  33 + <button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i>&nbsp;提交</button>
  34 + <button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i>&nbsp;取消</button>
  35 + </div>
  36 + </div>
  37 + </form>
  38 + </div>
  39 +</div>
  40 +<script type="text/javascript">
  41 + function save(){
  42 + if($('#validForm').valid()){
  43 + var data = $('#validForm').serialize();
  44 + //console.log(data);
  45 + if("$!version.id" == ""){
  46 + ajaxPost(APP.PATH + "/highriskVersion/create",data);
  47 + }else{
  48 + ajaxPost(APP.PATH + "/highriskVersion/update",data);
  49 + }
  50 + parent.reloadGrid('dataTable');
  51 + }
  52 + }
  53 +</script>
  54 +#end
  55 +#extends("/common/base_list.html")
parent/center.manager/src/main/webapp/WEB-INF/views/conf/highrisk/version_list.html View file @ ee4e62b
  1 +#override("body")
  2 +<div class="row wrapper border-bottom white-bg page-heading">
  3 + <div class="col-sm-10">
  4 + <div style="padding-top:30px;">
  5 + <form role="form" class="form-inline">
  6 + <div class="form-group">
  7 + <input type="text" placeholder="请输入版本名称" id="versionSearch" class="form-control">
  8 + </div>
  9 + </form>
  10 + </div>
  11 + </div>
  12 + <div class="col-sm-2">
  13 + <div class="title-action" onclick="search();">
  14 + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a>
  15 + </div>
  16 + </div>
  17 +</div>
  18 +<div class="wrapper wrapper-content">
  19 + <div class="row">
  20 + <div class="col-sm-12">
  21 + <div id="toolbar">
  22 + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button>
  23 + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button>
  24 + <button class="btn btn-info " type="button" onclick="copy();"><i class="fa fa-paste"></i> 复制</button>
  25 + <!--
  26 + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button>
  27 + -->
  28 + </div>
  29 + <table id="dataTable"></table>
  30 + </div>
  31 + </div>
  32 +</div>
  33 +#end
  34 +#override("js")
  35 +<script type="text/javascript">
  36 +function search(){
  37 + var queryParams = {
  38 + query:{
  39 + name: $("#versionSearch").val()
  40 + }
  41 + }
  42 + $('#dataTable').bootstrapTable('refresh', queryParams );
  43 +}
  44 +var controllerRequestMappint = "/highriskVersion/";
  45 +
  46 +function add() {
  47 + fullWindow("新增高危版本", APP.PATH + controllerRequestMappint + "0/toEdit");
  48 +}
  49 +
  50 +function edit(){
  51 + var id = getSingleSelectedValue("dataTable","id");
  52 + if(id){
  53 + fullWindow("修改高危版本", APP.PATH + controllerRequestMappint + id + "/toEdit");
  54 + }
  55 +}
  56 +function copy() {
  57 + var val = getSelectedValue("dataTable","id");
  58 + if(val){
  59 + layer.confirm('确定复制选中的数据', {
  60 + btn: ['确定','取消'] //按钮
  61 + }, function(){
  62 + url = APP.PATH + controllerRequestMappint + val + "/copy";
  63 + ajaxPost(url,null,function(r){
  64 + if(r.success){
  65 + reloadGrid(gridId);
  66 + }
  67 + msg(r.message);
  68 + });
  69 + }, function(){
  70 +
  71 + });
  72 + }else{
  73 + msg("请选择需要复制的数据");
  74 + }
  75 +}
  76 +
  77 +function del(){
  78 + goDelete("dataTable","id", APP.PATH + controllerRequestMappint + "@value@/delete");
  79 +}
  80 +## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table
  81 +## 注意:自己创建的特殊的table不能extends base_list.html
  82 +var default_dataUrl = APP.PATH + controllerRequestMappint + "list";
  83 +var default_dataColumns = [{
  84 + field: 'check_state',
  85 + title: '',
  86 + checkbox: true
  87 + },{
  88 + field: 'id',
  89 + title: '编号'
  90 + },{
  91 + field: 'name',
  92 + title: '版本名称'
  93 + },{
  94 + field: 'enable',
  95 + title: '启/停用',
  96 + formatter:enableFormatter
  97 + }];
  98 +
  99 +</script>
  100 +#end
  101 +#extends("/common/base_list.html")