Commit d7886f353c880ae516016265cf7a98e296bbecce
Exists in
master
Merge branch 'master' of https://git.healthbaby.com.cn/jiangjiazhi/center.git
Showing 20 changed files
- center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
- center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganGroupController.java
- center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganizationsController.java
- center.manager/src/main/java/com/lyms/cm/controller/sys/SysRolePermissionMapsController.java
- center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganGroupMapper.java
- center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganGroupMapper.xml
- center.manager/src/main/java/com/lyms/cm/entity/sys/SysOrganGroup.java
- center.manager/src/main/java/com/lyms/cm/enums/ValidityEnum.java
- center.manager/src/main/java/com/lyms/cm/service/sys/SysDepartmentsService.java
- center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganGroupService.java
- center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganizationsService.java
- center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysDepartmentsServiceImpl.java
- center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganGroupServiceImpl.java
- center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganizationsServiceImpl.java
- center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
- center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
- center.manager/src/main/webapp/WEB-INF/views/group/group_list.html
- center.manager/src/main/webapp/WEB-INF/views/group/org_edit.html
- center.manager/src/main/webapp/WEB-INF/views/organ/org_edit.html
- center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
View file @
d7886f3
| 1 | 1 | package com.lyms.cm.controller.sys; |
| 2 | 2 | |
| 3 | +import java.util.Map; | |
| 4 | + | |
| 5 | +import org.apache.commons.lang3.StringUtils; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 3 | 7 | import org.springframework.stereotype.Controller; |
| 8 | +import org.springframework.ui.Model; | |
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 4 | 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.cm.entity.sys.SysDepartments; | |
| 17 | +import com.lyms.cm.enums.ValidityEnum; | |
| 18 | +import com.lyms.cm.service.sys.SysDepartmentsService; | |
| 19 | +import com.lyms.constants.OperationName; | |
| 20 | +import com.lyms.web.bean.AjaxResult; | |
| 5 | 21 | import com.lyms.web.controller.BaseController; |
| 6 | 22 | |
| 7 | 23 | /** |
| 8 | 24 | * <p> |
| 9 | - * 部门 科室表 前端控制器 | |
| 25 | + * 部门 科室表 前端控制器 | |
| 10 | 26 | * </p> |
| 11 | 27 | * |
| 12 | 28 | * @author maliang |
| ... | ... | @@ -15,6 +31,110 @@ |
| 15 | 31 | @Controller |
| 16 | 32 | @RequestMapping("/sysDepartments") |
| 17 | 33 | public class SysDepartmentsController extends BaseController { |
| 18 | - | |
| 34 | + | |
| 35 | + @Autowired | |
| 36 | + private SysDepartmentsService departmentService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * <li>@Description:到部门科室列表 | |
| 40 | + * <li>@return | |
| 41 | + * <li>创建人:maliang | |
| 42 | + * <li>创建时间:2017年3月9日 | |
| 43 | + * <li>修改人: | |
| 44 | + * <li>修改时间: | |
| 45 | + */ | |
| 46 | + @RequestMapping(value = "/toList", method = RequestMethod.GET) | |
| 47 | + public String toList() { | |
| 48 | + return "/depart/depart_list"; | |
| 49 | + } | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * <li>@Description:列表信息查询 | |
| 53 | + * <li> | |
| 54 | + * <li>创建人:maliang | |
| 55 | + * <li>创建时间:2017年3月9日 | |
| 56 | + * <li>修改人: | |
| 57 | + * <li>修改时间: | |
| 58 | + * | |
| 59 | + * @return | |
| 60 | + */ | |
| 61 | + @ResponseBody | |
| 62 | + @RequestMapping(value = "/list", method = { RequestMethod.GET, RequestMethod.POST }) | |
| 63 | + public Map<String, Object> list() { | |
| 64 | + Page<SysDepartments> page = getPage(); | |
| 65 | + EntityWrapper<SysDepartments> ew = new EntityWrapper<SysDepartments>(); | |
| 66 | + ew.where("ifdel=" + ValidityEnum.VALIDITY.getValidity()); | |
| 67 | + page = departmentService.selectPage(page, ew); | |
| 68 | + return toGridData(page); | |
| 69 | + } | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * <li>@Description:跳转到添加页面 | |
| 73 | + * <li>@return | |
| 74 | + * <li>创建人:maliang | |
| 75 | + * <li>创建时间:2017年3月9日 | |
| 76 | + * <li>修改人: | |
| 77 | + * <li>修改时间: | |
| 78 | + */ | |
| 79 | + @RequestMapping(value = "/toEdit", method = { RequestMethod.GET }) | |
| 80 | + public String toEdit(String id, Model model) { | |
| 81 | + if (StringUtils.isNotBlank(id)) { | |
| 82 | + SysDepartments departments = departmentService.selectById(id); | |
| 83 | + model.addAttribute("depart", departments); | |
| 84 | + } | |
| 85 | + return "/depart/depart_edit"; | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * <li>@Description:修改部门,科室信息 | |
| 90 | + * <li>@param organizations | |
| 91 | + * <li>@param ajaxResult | |
| 92 | + * <li>@return | |
| 93 | + * <li>创建人:maliang | |
| 94 | + * <li>创建时间:2017年3月9日 | |
| 95 | + * <li>修改人: | |
| 96 | + * <li>修改时间: | |
| 97 | + */ | |
| 98 | + @ResponseBody | |
| 99 | + @RequestMapping(value = "/update", method = { RequestMethod.POST }) | |
| 100 | + public AjaxResult edit(SysDepartments departments, AjaxResult ajaxResult) { | |
| 101 | + boolean tag = departmentService.updateDepart(departments); | |
| 102 | + return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE); | |
| 103 | + } | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * <li>@Description:添加部门/科室信息 | |
| 107 | + * <li>@param organizations | |
| 108 | + * <li>@param ajaxResult | |
| 109 | + * <li>@return | |
| 110 | + * <li>创建人:maliang | |
| 111 | + * <li>创建时间:2017年3月9日 | |
| 112 | + * <li>修改人: | |
| 113 | + * <li>修改时间: | |
| 114 | + */ | |
| 115 | + @ResponseBody | |
| 116 | + @RequestMapping(value = "/create", method = { RequestMethod.POST }) | |
| 117 | + public AjaxResult add(SysDepartments departments, AjaxResult ajaxResult) { | |
| 118 | + boolean tag = departmentService.createDepart(departments); | |
| 119 | + return handleAjaxResult(ajaxResult, tag, OperationName.CREATE); | |
| 120 | + } | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * <li>@Description:删除部门/科室信息 | |
| 124 | + * <li>@param id | |
| 125 | + * <li>@param ajaxResult | |
| 126 | + * <li>@return | |
| 127 | + * <li>创建人:maliang | |
| 128 | + * <li>创建时间:2017年3月9日 | |
| 129 | + * <li>修改人: | |
| 130 | + * <li>修改时间: | |
| 131 | + */ | |
| 132 | + @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST }) | |
| 133 | + @ResponseBody | |
| 134 | + public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) { | |
| 135 | + boolean tag = departmentService.deleteDepartById(id); | |
| 136 | + return handleAjaxResult(ajaxResult, tag, OperationName.DELETE); | |
| 137 | + } | |
| 138 | + | |
| 19 | 139 | } |
center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganGroupController.java
View file @
d7886f3
| 1 | +package com.lyms.cm.controller.sys; | |
| 2 | + | |
| 3 | +import java.util.Map; | |
| 4 | + | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.stereotype.Controller; | |
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 9 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 10 | + | |
| 11 | +import com.baomidou.mybatisplus.mapper.EntityWrapper; | |
| 12 | +import com.baomidou.mybatisplus.plugins.Page; | |
| 13 | +import com.lyms.cm.entity.sys.SysOrganGroup; | |
| 14 | +import com.lyms.cm.enums.ValidityEnum; | |
| 15 | +import com.lyms.cm.service.sys.SysOrganGroupService; | |
| 16 | +import com.lyms.web.controller.BaseController; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * <p> | |
| 20 | + * 机构组信息 | |
| 21 | + * </p> | |
| 22 | + * | |
| 23 | + * @author maliang | |
| 24 | + * @since 2017-03-09 | |
| 25 | + */ | |
| 26 | +@Controller | |
| 27 | +@RequestMapping("/sysOrganGroup") | |
| 28 | +public class SysOrganGroupController extends BaseController { | |
| 29 | + | |
| 30 | + @Autowired | |
| 31 | + private SysOrganGroupService groupService; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * <li>@Description:跳转到租列表 | |
| 35 | + * <li>@return | |
| 36 | + * <li>创建人:maliang | |
| 37 | + * <li>创建时间:2017年3月9日 | |
| 38 | + * <li>修改人: | |
| 39 | + * <li>修改时间: | |
| 40 | + */ | |
| 41 | + @RequestMapping(value = "/toList", method = RequestMethod.GET) | |
| 42 | + public String toList() { | |
| 43 | + return "/group/group_list"; | |
| 44 | + } | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * <li>@Description:列表信息查询 | |
| 48 | + * <li> | |
| 49 | + * <li>创建人:maliang | |
| 50 | + * <li>创建时间:2017年3月9日 | |
| 51 | + * <li>修改人: | |
| 52 | + * <li>修改时间: | |
| 53 | + * | |
| 54 | + * @return | |
| 55 | + */ | |
| 56 | + @ResponseBody | |
| 57 | + @RequestMapping(value = "/list", method = { RequestMethod.GET, RequestMethod.POST }) | |
| 58 | + public Map<String, Object> list() { | |
| 59 | + Page<SysOrganGroup> page = getPage(); | |
| 60 | + EntityWrapper<SysOrganGroup> ew = new EntityWrapper<SysOrganGroup>(); | |
| 61 | + ew.where("ifdel=" + ValidityEnum.VALIDITY.getValidity()); | |
| 62 | + page = groupService.selectPage(page, ew); | |
| 63 | + return toGridData(page); | |
| 64 | + } | |
| 65 | + | |
| 66 | +} |
center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganizationsController.java
View file @
d7886f3
| ... | ... | @@ -116,7 +116,7 @@ |
| 116 | 116 | @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST }) |
| 117 | 117 | @ResponseBody |
| 118 | 118 | public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) { |
| 119 | - boolean tag = organService.deleteById(id); | |
| 119 | + boolean tag = organService.deleteOrganById(id); | |
| 120 | 120 | return handleAjaxResult(ajaxResult, tag, OperationName.DELETE); |
| 121 | 121 | } |
| 122 | 122 |
center.manager/src/main/java/com/lyms/cm/controller/sys/SysRolePermissionMapsController.java
View file @
d7886f3
| ... | ... | @@ -2,11 +2,12 @@ |
| 2 | 2 | |
| 3 | 3 | import org.springframework.stereotype.Controller; |
| 4 | 4 | import org.springframework.web.bind.annotation.RequestMapping; |
| 5 | + | |
| 5 | 6 | import com.lyms.web.controller.BaseController; |
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * <p> |
| 9 | - * 角色权限映射表 前端控制器 | |
| 10 | + * 角色权限映射表 前端控制器 | |
| 10 | 11 | * </p> |
| 11 | 12 | * |
| 12 | 13 | * @author fangcheng |
| ... | ... | @@ -15,6 +16,7 @@ |
| 15 | 16 | @Controller |
| 16 | 17 | @RequestMapping("/sysRolePermissionMaps") |
| 17 | 18 | public class SysRolePermissionMapsController extends BaseController { |
| 18 | - | |
| 19 | + public static void main(String[] args) { | |
| 20 | + } | |
| 19 | 21 | } |
center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganGroupMapper.java
View file @
d7886f3
| 1 | +package com.lyms.cm.dao.sys; | |
| 2 | + | |
| 3 | +import com.lyms.cm.entity.sys.SysOrganGroup; | |
| 4 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | +import java.io.Serializable; | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * Mapper接口 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author maliang | |
| 13 | + * @since 2017-03-09 | |
| 14 | + */ | |
| 15 | +@Repository | |
| 16 | +public interface SysOrganGroupMapper extends BaseMapper<SysOrganGroup> { | |
| 17 | + | |
| 18 | + public Integer deleteLogicById(Serializable id); | |
| 19 | + | |
| 20 | +} |
center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganGroupMapper.xml
View file @
d7886f3
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.cm.dao.sys.SysOrganGroupMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.cm.entity.sys.SysOrganGroup"> | |
| 7 | + <id column="ID" property="id" /> | |
| 8 | + <result column="NAME" property="name" /> | |
| 9 | + <result column="TYPE" property="type" /> | |
| 10 | + <result column="ORGNUMBER" property="orgnumber" /> | |
| 11 | + <result column="CLIENTADDRESS" property="clientaddress" /> | |
| 12 | + <result column="IFDEl" property="ifdel" /> | |
| 13 | + </resultMap> | |
| 14 | + | |
| 15 | + <!-- 通用查询结果列 --> | |
| 16 | + <sql id="Base_Column_List"> | |
| 17 | + ID AS id, NAME AS name, TYPE AS type, ORGNUMBER AS orgnumber, CLIENTADDRESS AS clientaddress ,IFDEL AS ifdel | |
| 18 | + </sql> | |
| 19 | +</mapper> |
center.manager/src/main/java/com/lyms/cm/entity/sys/SysOrganGroup.java
View file @
d7886f3
| 1 | +package com.lyms.cm.entity.sys; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableId; | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author maliang | |
| 15 | + * @since 2017-03-09 | |
| 16 | + */ | |
| 17 | +@TableName("SYS_ORGAN_GROUP") | |
| 18 | +public class SysOrganGroup implements Serializable { | |
| 19 | + | |
| 20 | + private static final long serialVersionUID = 1L; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + @TableId(value = "ID") | |
| 26 | + private String id; | |
| 27 | + /** | |
| 28 | + * | |
| 29 | + */ | |
| 30 | + @TableField(value = "NAME") | |
| 31 | + private String name; | |
| 32 | + /** | |
| 33 | + * 建档方式 | |
| 34 | + */ | |
| 35 | + @TableField(value = "TYPE") | |
| 36 | + private String type; | |
| 37 | + /** | |
| 38 | + * | |
| 39 | + */ | |
| 40 | + @TableField(value = "ORGNUMBER") | |
| 41 | + private Integer orgnumber; | |
| 42 | + /** | |
| 43 | + * 数据推送地址 | |
| 44 | + */ | |
| 45 | + @TableField(value = "CLIENTADDRESS") | |
| 46 | + private String clientaddress; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 0:可用 1:不可用 | |
| 50 | + */ | |
| 51 | + @TableField(value = "IFDEL") | |
| 52 | + private Integer ifdel; | |
| 53 | + | |
| 54 | + public String getId() { | |
| 55 | + return id; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setId(String id) { | |
| 59 | + this.id = id; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public String getName() { | |
| 63 | + return name; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setName(String name) { | |
| 67 | + this.name = name; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public String getType() { | |
| 71 | + return type; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setType(String type) { | |
| 75 | + this.type = type; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public Integer getOrgnumber() { | |
| 79 | + return orgnumber; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void setOrgnumber(Integer orgnumber) { | |
| 83 | + this.orgnumber = orgnumber; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public String getClientaddress() { | |
| 87 | + return clientaddress; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setClientaddress(String clientaddress) { | |
| 91 | + this.clientaddress = clientaddress; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public Integer getIfdel() { | |
| 95 | + return ifdel; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public void setIfdel(Integer ifdel) { | |
| 99 | + this.ifdel = ifdel; | |
| 100 | + } | |
| 101 | + | |
| 102 | +} |
center.manager/src/main/java/com/lyms/cm/enums/ValidityEnum.java
View file @
d7886f3
center.manager/src/main/java/com/lyms/cm/service/sys/SysDepartmentsService.java
View file @
d7886f3
| 1 | 1 | package com.lyms.cm.service.sys; |
| 2 | 2 | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 3 | 5 | import com.lyms.cm.entity.sys.SysDepartments; |
| 6 | +import com.lyms.exception.SystemException; | |
| 4 | 7 | import com.lyms.web.service.BaseService; |
| 5 | -import java.io.Serializable; | |
| 6 | 8 | |
| 7 | 9 | /** |
| 8 | 10 | * <p> |
| ... | ... | @@ -14,12 +16,45 @@ |
| 14 | 16 | */ |
| 15 | 17 | public interface SysDepartmentsService extends BaseService<SysDepartments> { |
| 16 | 18 | |
| 17 | - /** | |
| 18 | - * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 19 | - * <li>@param id 删除主键id | |
| 20 | - * <li>@return 大于0修改成功,否则为失败 | |
| 21 | - */ | |
| 22 | - public Integer deleteLogicById(Serializable id); | |
| 23 | - | |
| 19 | + /** | |
| 20 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 21 | + * <li>@param id 删除主键id | |
| 22 | + * <li>@return 大于0修改成功,否则为失败 | |
| 23 | + */ | |
| 24 | + public Integer deleteLogicById(Serializable id); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * <li>@Description:添加机构/部门信息 | |
| 28 | + * <li>@param departments | |
| 29 | + * <li>@return | |
| 30 | + * <li>创建人:maliang | |
| 31 | + * <li>创建时间:2017年3月9日 | |
| 32 | + * <li>修改人: | |
| 33 | + * <li>修改时间: | |
| 34 | + */ | |
| 35 | + public boolean createDepart(SysDepartments departments) throws SystemException; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * <li>@Description:删除机构/部门信息 | |
| 39 | + * <li>@param id | |
| 40 | + * <li>@return | |
| 41 | + * <li>创建人:maliang | |
| 42 | + * <li>创建时间:2017年3月9日 | |
| 43 | + * <li>修改人: | |
| 44 | + * <li>修改时间: | |
| 45 | + */ | |
| 46 | + public boolean deleteDepartById(String id) throws SystemException; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * <li>@Description:修改部门/机构信息 | |
| 50 | + * <li>@param departments | |
| 51 | + * <li>@return | |
| 52 | + * <li>创建人:maliang | |
| 53 | + * <li>创建时间:2017年3月9日 | |
| 54 | + * <li>修改人: | |
| 55 | + * <li>修改时间: | |
| 56 | + */ | |
| 57 | + public boolean updateDepart(SysDepartments departments) throws SystemException; | |
| 58 | + | |
| 24 | 59 | } |
center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganGroupService.java
View file @
d7886f3
| 1 | +package com.lyms.cm.service.sys; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.lyms.cm.entity.sys.SysOrganGroup; | |
| 6 | +import com.lyms.exception.SystemException; | |
| 7 | +import com.lyms.web.service.BaseService; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * 服务类 | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author maliang | |
| 15 | + * @since 2017-03-09 | |
| 16 | + */ | |
| 17 | +public interface SysOrganGroupService extends BaseService<SysOrganGroup> { | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 21 | + * <li>@param id 删除主键id | |
| 22 | + * <li>@return 大于0修改成功,否则为失败 | |
| 23 | + */ | |
| 24 | + public Integer deleteLogicById(Serializable id); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * <li>@Description:创建机构组 | |
| 28 | + * <li>@param organGroup | |
| 29 | + * <li>@return | |
| 30 | + * <li>@throws SystemException | |
| 31 | + * <li>创建人:maliang | |
| 32 | + * <li>创建时间:2017年3月9日 | |
| 33 | + * <li>修改人: | |
| 34 | + * <li>修改时间: | |
| 35 | + */ | |
| 36 | + public boolean create(SysOrganGroup organGroup) throws SystemException; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * <li>@Description:根据ID删除机构信息 | |
| 40 | + * <li>@param groupId | |
| 41 | + * <li>@return | |
| 42 | + * <li>@throws SystemException | |
| 43 | + * <li>创建人:maliang | |
| 44 | + * <li>创建时间:2017年3月9日 | |
| 45 | + * <li>修改人: | |
| 46 | + * <li>修改时间: | |
| 47 | + */ | |
| 48 | + public boolean deleteGroupById(String groupId) throws SystemException; | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * <li>@Description:修改机构组信息 | |
| 52 | + * <li>@param organGrooup | |
| 53 | + * <li>@return | |
| 54 | + * <li>@throws SystemException | |
| 55 | + * <li>创建人:maliang | |
| 56 | + * <li>创建时间:2017年3月9日 | |
| 57 | + * <li>修改人: | |
| 58 | + * <li>修改时间: | |
| 59 | + */ | |
| 60 | + public boolean updateGroup(SysOrganGroup organGrooup) throws SystemException; | |
| 61 | + | |
| 62 | +} |
center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganizationsService.java
View file @
d7886f3
center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysDepartmentsServiceImpl.java
View file @
d7886f3
| 1 | 1 | package com.lyms.cm.service.sys.impl; |
| 2 | 2 | |
| 3 | -import com.lyms.cm.entity.sys.SysDepartments; | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.apache.commons.lang3.StringUtils; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 4 | 10 | import com.lyms.cm.dao.sys.SysDepartmentsMapper; |
| 11 | +import com.lyms.cm.entity.sys.SysDepartments; | |
| 5 | 12 | import com.lyms.cm.service.sys.SysDepartmentsService; |
| 6 | -import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 7 | -import org.springframework.stereotype.Service; | |
| 8 | -import java.io.Serializable; | |
| 13 | +import com.lyms.exception.SystemException; | |
| 9 | 14 | |
| 10 | 15 | /** |
| 11 | 16 | * <p> |
| 12 | - * 部门 科室表 服务实现类 | |
| 17 | + * 部门 科室表 服务实现类 | |
| 13 | 18 | * </p> |
| 14 | 19 | * |
| 15 | 20 | * @author maliang |
| 16 | 21 | * @since 2017-03-08 |
| 17 | 22 | */ |
| 18 | 23 | @Service |
| 19 | -public class SysDepartmentsServiceImpl extends ServiceImpl<SysDepartmentsMapper, SysDepartments> implements SysDepartmentsService { | |
| 20 | - | |
| 21 | - public Integer deleteLogicById(Serializable id){ | |
| 22 | - return baseMapper.deleteLogicById(id); | |
| 24 | +public class SysDepartmentsServiceImpl extends ServiceImpl<SysDepartmentsMapper, SysDepartments> | |
| 25 | + implements SysDepartmentsService { | |
| 26 | + | |
| 27 | + public Integer deleteLogicById(Serializable id) { | |
| 28 | + return baseMapper.deleteLogicById(id); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + @Transactional | |
| 33 | + public boolean createDepart(SysDepartments departments) throws SystemException { | |
| 34 | + if (departments == null) | |
| 35 | + return false; | |
| 36 | + Integer tag = baseMapper.insert(departments); | |
| 37 | + return tag != null && tag >= 1; | |
| 38 | + } | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + @Transactional | |
| 42 | + public boolean deleteDepartById(String id) throws SystemException { | |
| 43 | + if (StringUtils.isBlank(id)) | |
| 44 | + return false; | |
| 45 | + Integer tag = baseMapper.deleteById(id); | |
| 46 | + return tag != null && tag > 0; | |
| 47 | + } | |
| 48 | + | |
| 49 | + @Override | |
| 50 | + @Transactional | |
| 51 | + public boolean updateDepart(SysDepartments departments) throws SystemException { | |
| 52 | + if (departments == null) | |
| 53 | + return false; | |
| 54 | + Integer tag = baseMapper.updateById(departments); | |
| 55 | + return tag != null && tag > 0; | |
| 23 | 56 | } |
| 24 | 57 | } |
center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganGroupServiceImpl.java
View file @
d7886f3
| 1 | +package com.lyms.cm.service.sys.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.apache.commons.lang3.StringUtils; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 10 | +import com.lyms.cm.dao.sys.SysOrganGroupMapper; | |
| 11 | +import com.lyms.cm.entity.sys.SysOrganGroup; | |
| 12 | +import com.lyms.cm.service.sys.SysOrganGroupService; | |
| 13 | +import com.lyms.exception.SystemException; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * <p> | |
| 17 | + * 服务实现类 | |
| 18 | + * </p> | |
| 19 | + * | |
| 20 | + * @author maliang | |
| 21 | + * @since 2017-03-09 | |
| 22 | + */ | |
| 23 | +@Service | |
| 24 | +public class SysOrganGroupServiceImpl extends ServiceImpl<SysOrganGroupMapper, SysOrganGroup> | |
| 25 | + implements SysOrganGroupService { | |
| 26 | + | |
| 27 | + public Integer deleteLogicById(Serializable id) { | |
| 28 | + return baseMapper.deleteLogicById(id); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + @Transactional | |
| 33 | + public boolean create(SysOrganGroup organGroup) throws SystemException { | |
| 34 | + | |
| 35 | + if (organGroup == null) | |
| 36 | + return false; | |
| 37 | + Integer tag = baseMapper.insert(organGroup); | |
| 38 | + return tag != null && tag > 0; | |
| 39 | + | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + @Transactional | |
| 44 | + public boolean deleteGroupById(String groupId) throws SystemException { | |
| 45 | + | |
| 46 | + if (StringUtils.isBlank(groupId)) | |
| 47 | + return false; | |
| 48 | + Integer tag = baseMapper.deleteById(groupId); | |
| 49 | + return tag != null && tag > 0; | |
| 50 | + | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Override | |
| 54 | + @Transactional | |
| 55 | + public boolean updateGroup(SysOrganGroup organGroup) throws SystemException { | |
| 56 | + | |
| 57 | + if (organGroup == null) | |
| 58 | + return false; | |
| 59 | + Integer tag = baseMapper.updateById(organGroup); | |
| 60 | + return tag != null && tag > 0; | |
| 61 | + | |
| 62 | + } | |
| 63 | +} |
center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganizationsServiceImpl.java
View file @
d7886f3
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | |
| 50 | 50 | @Override |
| 51 | 51 | @Transactional |
| 52 | - public boolean deleteById(String id) throws SystemException { | |
| 52 | + public boolean deleteOrganById(String id) throws SystemException { | |
| 53 | 53 | Integer tag = baseMapper.deleteLogicById(id); |
| 54 | 54 | return tag != null && tag >= 1; |
| 55 | 55 | } |
center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
View file @
d7886f3
| 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 | + <input type="hidden" id="org.id" name="id" value="$!org.id"/> | |
| 6 | + <div class="form-group"> | |
| 7 | + <label class="col-sm-3 control-label">名称:</label> | |
| 8 | + <div class="col-sm-8"> | |
| 9 | + <input type="text" placeholder="机构名称" value="$!org.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 10 | + </div> | |
| 11 | + </div> | |
| 12 | + <div class="form-group"> | |
| 13 | + <label class="col-sm-3 control-label">类型:</label> | |
| 14 | + <div class="col-sm-8"> | |
| 15 | + <!-- 1:卫生与计划生育委员会,2:妇幼保健院/站,3:妇产(科)医院,4:综合医院,5:计生站,6:卫生院,7:卫生所,8:其他 --> | |
| 16 | + <select class="form-control" name="type"> | |
| 17 | + <option value="1" >卫生与计划生育委员会</option> | |
| 18 | + <option value="2">妇幼保健院/站</option> | |
| 19 | + <option value="3">妇产(科)医院</option> | |
| 20 | + <option value="4">综合医院</option> | |
| 21 | + <option value="5">计生站</option> | |
| 22 | + <option value="6">卫生院</option> | |
| 23 | + <option value="7">卫生所</option> | |
| 24 | + <option value="8">其他</option> | |
| 25 | + </select> | |
| 26 | + <!-- <input type="text" placeholder="类型" aria-required="true" required="true" minlength="3" name="type" class="form-control" id="type"> --> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + | |
| 30 | + <div class="form-group"> | |
| 31 | + <label class="col-sm-3 control-label">简码:</label> | |
| 32 | + <div class="col-sm-8"> | |
| 33 | + <input type="text" value="$!org.shortCode" placeholder="简码" aria-required="true" required="true" minlength="3" name="shortCode" class="form-control" id="shortCode"> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | + | |
| 37 | + | |
| 38 | + <div class="form-group"> | |
| 39 | + <label class="col-sm-3 control-label">等级:</label> | |
| 40 | + <div class="col-sm-8"> | |
| 41 | + <!-- 1省,2市,3区县,4乡镇,5村,6其他 --> | |
| 42 | + <!-- <input type="text" placeholder="等级" aria-required="true" required="true" minlength="1" name="gradeLevel" class="form-control" id="gradeLevel"> --> | |
| 43 | + <select class="form-control" name="gradeLevel"> | |
| 44 | + <option value="1" #if($!org.gradeLevel==1) selected="selected" #end>省</option> | |
| 45 | + <option value="2" #if($!org.gradeLevel==2) selected="selected" #end>市</option> | |
| 46 | + <option value="3" #if($!org.gradeLevel==3) selected="selected" #end>区县</option> | |
| 47 | + <option value="4" #if($!org.gradeLevel==4) selected="selected" #end>乡镇</option> | |
| 48 | + <option value="5" #if($!org.gradeLevel==5) selected="selected" #end>村</option> | |
| 49 | + <option value="6" #if($!org.gradeLevel==6) selected="selected" #end>其他</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + | |
| 54 | + <div class="form-group"> | |
| 55 | + <label class="col-sm-3 control-label">服务热线:</label> | |
| 56 | + <div class="col-sm-8"> | |
| 57 | + <input type="text" value="$!org.mobile" placeholder="服务热线" aria-required="true" required="true" minlength="3" name="mobile" class="form-control" id="mobile"> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + <div class="form-group"> | |
| 61 | + <label class="col-sm-3 control-label">星级:</label> | |
| 62 | + <div class="col-sm-8"> | |
| 63 | + <input type="text" value="$!org.starLevel" placeholder="星级" aria-required="true" required="true" minlength="1" name="starLevel" class="form-control" id="starLevel"> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + <div class="form-group"> | |
| 67 | + <label class="col-sm-3 control-label">区域:</label> | |
| 68 | + <div class="col-sm-8"> | |
| 69 | + #extends("/organ/org.html") | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + <div class="form-group"> | |
| 73 | + <label class="col-sm-3 control-label">详细地址:</label> | |
| 74 | + <div class="col-sm-8"> | |
| 75 | + <input type="text" value="$!org.address" placeholder="详细地址" aria-required="true" required="true" minlength="3" name="address" class="form-control" id="address"> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + | |
| 79 | + <div class="form-group"> | |
| 80 | + <label class="col-sm-3 control-label">是否有效:</label> | |
| 81 | + <div class="col-sm-8"> | |
| 82 | + <input class="col-sm-4" checked="checked" type="radio" name="ifdel" #if($!org.ifdel==0) checked="checked" #end value="0"/>是 | |
| 83 | + <input class="col-sm-4" type="radio" name="ifdel" #if($!org.ifdel==1) checked="checked" #end value="1"/>否 | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + | |
| 87 | + <div class="form-group"> | |
| 88 | + <label class="col-sm-3 control-label">状态:</label> | |
| 89 | + <div class="col-sm-8"> | |
| 90 | + <!-- 0,"正式运行" 1,"试运行" 2,"停止运行" --> | |
| 91 | + <select class="form-control" name="status"> | |
| 92 | + <option value="0" #if($!org.status==0) selected="selected" #end>正式运行</option> | |
| 93 | + <option value="1" #if($!org.status==1) selected="selected" #end>试运行</option> | |
| 94 | + <option value="2" #if($!org.status==2) selected="selected" #end>停止运行</option> | |
| 95 | + </select> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | + <div class="form-group"> | |
| 99 | + <label class="col-sm-3 control-label">简介:</label> | |
| 100 | + <div class="col-sm-8"> | |
| 101 | + <!-- 0,"正式运行" 1,"试运行" 2,"停止运行" --> | |
| 102 | + <textarea class="control-label" cols="80" rows="6" name="description">$!org.description</textarea> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + | |
| 106 | + | |
| 107 | + <div class="hr-line-dashed"></div> | |
| 108 | + <div class="form-group"> | |
| 109 | + <div class="col-sm-4 col-sm-offset-3 pull-right"> | |
| 110 | + <button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i> 提交</button> | |
| 111 | + <button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i> 取消</button> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + </form> | |
| 115 | + </div> | |
| 116 | +</div> | |
| 117 | +<script type="text/javascript"> | |
| 118 | + function save(){ | |
| 119 | + if($('#validForm').valid()){ | |
| 120 | + var data = $('#validForm').serialize(); | |
| 121 | + data = data + "&" + $('#roleForm').serialize(); | |
| 122 | + //console.log(data); | |
| 123 | + if("$!org.id" == ""){ | |
| 124 | + ajaxPost(APP.PATH + "/sysOrganizations/create",data); | |
| 125 | + }else{ | |
| 126 | + ajaxPost(APP.PATH + "/sysOrganizations/update",data); | |
| 127 | + } | |
| 128 | + parent.reloadGrid('dataTable'); | |
| 129 | + } | |
| 130 | + } | |
| 131 | +</script> | |
| 132 | +#end | |
| 133 | +#extends("/common/base_list.html") | |
| 134 | +<script src="${ctx}/static/js/area.js"></script> | |
| 135 | +<script type="text/javascript"> | |
| 136 | + //获取所有区县 | |
| 137 | + get("",function(data){ | |
| 138 | + handlerSelect(data,"leve0","$!org.provinceId"); | |
| 139 | + get("$!org.provinceId",function(data){ | |
| 140 | + handlerSelect(data,"leve1","$!org.cityId"); | |
| 141 | + get("$!org.cityId",function(data){ | |
| 142 | + handlerSelect(data,"leve2","$!org.areaId"); | |
| 143 | + }); | |
| 144 | + }); | |
| 145 | + }); | |
| 146 | + | |
| 147 | +</script> |
center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
View file @
d7886f3
| 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" id="leve"> | |
| 7 | + <span class="form-control">机构组</span> | |
| 8 | + <input type="text" placeholder="请输入机构组名称" id="usernameSearch" class="form-control"> | |
| 9 | + </div> | |
| 10 | + </form> | |
| 11 | + </div> | |
| 12 | + </div> | |
| 13 | + <div class="col-sm-2"> | |
| 14 | + <div class="title-action"> | |
| 15 | + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> | |
| 16 | + </div> | |
| 17 | + </div> | |
| 18 | +</div> | |
| 19 | +<div class="wrapper wrapper-content"> | |
| 20 | + <div class="row"> | |
| 21 | + <div class="col-sm-12"> | |
| 22 | + <div id="toolbar"> | |
| 23 | + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button> | |
| 24 | + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button> | |
| 25 | + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button> | |
| 26 | + </div> | |
| 27 | + <table id="dataTable"></table> | |
| 28 | + </div> | |
| 29 | + </div> | |
| 30 | +</div> | |
| 31 | +#end | |
| 32 | +#override("js") | |
| 33 | +<script type="text/javascript"> | |
| 34 | + | |
| 35 | +var controllerRequestMappint = "/sysDepartments/"; | |
| 36 | + | |
| 37 | +function add() { | |
| 38 | + popWindow("添加部门/科室", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); | |
| 39 | +} | |
| 40 | + | |
| 41 | +function edit(){ | |
| 42 | + var id = getSingleSelectedValue("dataTable","id"); | |
| 43 | + if(id){ | |
| 44 | + popWindow("修改部门/科室", APP.PATH + controllerRequestMappint + "toEdit?orgId="+id,700,550); | |
| 45 | + } | |
| 46 | +} | |
| 47 | + | |
| 48 | +function del(){ | |
| 49 | + goDelete("dataTable","id", APP.PATH + controllerRequestMappint + "@value@/delete"); | |
| 50 | +} | |
| 51 | +## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table | |
| 52 | +## 注意:自己创建的特殊的table不能extends base_list.html | |
| 53 | +var default_dataUrl = APP.PATH + controllerRequestMappint + "list"; | |
| 54 | +var default_dataColumns = [{ | |
| 55 | + field: 'check_state', | |
| 56 | + title: '', | |
| 57 | + checkbox: true | |
| 58 | + },{ | |
| 59 | + field: 'id', | |
| 60 | + title: '编号' | |
| 61 | + },{ | |
| 62 | + field: 'name', | |
| 63 | + title: '名称' | |
| 64 | + },{ | |
| 65 | + field: 'type', | |
| 66 | + title: '类型' | |
| 67 | + },{ | |
| 68 | + field: 'shortCode', | |
| 69 | + title: '简码' | |
| 70 | + },{ | |
| 71 | + field: 'gradeLevel', | |
| 72 | + title: '等级' | |
| 73 | + },{ | |
| 74 | + field: 'mobile', | |
| 75 | + title: '服务热线' | |
| 76 | + },{ | |
| 77 | + field: 'starLevel', | |
| 78 | + title: '星级' | |
| 79 | + },{ | |
| 80 | + field: 'status', | |
| 81 | + title: '状态' | |
| 82 | + },{ | |
| 83 | + field: 'ifdel', | |
| 84 | + title: '是否删除' | |
| 85 | + },{ | |
| 86 | + field: 'address', | |
| 87 | + title: '地址' | |
| 88 | + }]; | |
| 89 | +</script> | |
| 90 | +#end | |
| 91 | +#extends("/common/base_list.html") | |
| 92 | +<script src="${ctx}/static/js/area.js"></script> |
center.manager/src/main/webapp/WEB-INF/views/group/group_list.html
View file @
d7886f3
| 1 | +#override("body") | |
| 2 | + | |
| 3 | +<div class="ibox float-e-margins"> | |
| 4 | + <div class="rows" style="width: 100%"> | |
| 5 | + <div class="col-sm-6"> | |
| 6 | + <div class="row wrapper border-bottom white-bg page-heading"> | |
| 7 | + <div class="col-sm-4"> | |
| 8 | + <div style="padding-top:30px;"> | |
| 9 | + <form role="form" class="form-inline"> | |
| 10 | + <div class="form-group"> | |
| 11 | + <span class="form-control"> 机构组</span> | |
| 12 | + <input type="text" placeholder="请输入机构组名称" id="usernameSearch" class="form-control"> | |
| 13 | + </div> | |
| 14 | + </form> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | + | |
| 18 | + <div class="col-sm-2"> | |
| 19 | + <div class="title-action"> | |
| 20 | + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> | |
| 21 | + </div> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | + <div class="wrapper wrapper-content"> | |
| 25 | + <div class="row"> | |
| 26 | + <div class="col-sm-12"> | |
| 27 | + <div id="toolbar"> | |
| 28 | + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button> | |
| 29 | + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button> | |
| 30 | + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button> | |
| 31 | + </div> | |
| 32 | + <table id="dataTable"></table> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | + </div> | |
| 37 | + | |
| 38 | + <div class="col-sm-6" style="padding-top: 4%"> | |
| 39 | + <input id='resources' name='role.resources' type='hidden'/> | |
| 40 | + <div id='treeContent_resources' class='menuContent' > | |
| 41 | + <ul id='tree_resources' class='ztree' style='margin-top:0; width:180px; height: 250px;'></ul></div> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 44 | +</div> | |
| 45 | +#end | |
| 46 | +#override("js") | |
| 47 | +<script type="text/javascript"> | |
| 48 | + | |
| 49 | +var controllerRequestMappint = "/sysOrganGroup/"; | |
| 50 | + | |
| 51 | +function add() { | |
| 52 | + popWindow("添加结构", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); | |
| 53 | +} | |
| 54 | + | |
| 55 | +function edit(){ | |
| 56 | + var id = getSingleSelectedValue("dataTable","id"); | |
| 57 | + if(id){ | |
| 58 | + popWindow("修改机构", APP.PATH + controllerRequestMappint + "toEdit?orgId="+id,700,550); | |
| 59 | + } | |
| 60 | +} | |
| 61 | + | |
| 62 | +function del(){ | |
| 63 | + goDelete("dataTable","id", APP.PATH + controllerRequestMappint + "@value@/delete"); | |
| 64 | +} | |
| 65 | +## 参考 base_table_init.js 或者根据empty_bootstrap_table_init.js 来自己创建特殊的table | |
| 66 | +## 注意:自己创建的特殊的table不能extends base_list.html | |
| 67 | +var default_dataUrl = APP.PATH + controllerRequestMappint + "list"; | |
| 68 | +var default_dataColumns = [{ | |
| 69 | + field: 'check_state', | |
| 70 | + title: '', | |
| 71 | + checkbox: true | |
| 72 | + },{ | |
| 73 | + field: 'id', | |
| 74 | + title: '编号' | |
| 75 | + },{ | |
| 76 | + field: 'name', | |
| 77 | + title: '组名称' | |
| 78 | + },{ | |
| 79 | + field: 'type', | |
| 80 | + title: '建档方式' | |
| 81 | + },{ | |
| 82 | + field: 'orgnumber', | |
| 83 | + title: '机构数' | |
| 84 | + },{ | |
| 85 | + field: 'clientaddress', | |
| 86 | + title: '连接地址' | |
| 87 | + }]; | |
| 88 | +</script> | |
| 89 | +#end | |
| 90 | +#extends("/common/base_list.html") | |
| 91 | + | |
| 92 | + | |
| 93 | +<link rel="stylesheet" href="${ctx}/static/js/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css" /> | |
| 94 | +<script src="${ctx}/static/js/zTree_v3/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script> | |
| 95 | +<script src="${ctx}/static/js/area.js"></script> | |
| 96 | +<script type="text/javascript"> | |
| 97 | +/* var reNodes = [ | |
| 98 | + { id:"1", name:"菜单",pid:"0",type:"hospital"} | |
| 99 | + ,{ id:"999", name:"系统管理",pid:"1",type:"hospital"} | |
| 100 | + ,{ id:"07559D3EEE524B348B28A7D9E4FD9720", name:"测试",pid:"1",type:"hospital"} | |
| 101 | + ,{ id:"817411CD8A0C4726AA9D5FBA36D4169B", name:"测试_1",pid:"07559D3EEE524B348B28A7D9E4FD9720",type:"hospital"} | |
| 102 | + ,{ id:"2", name:"用户管理",pid:"999",type:"aaa"} | |
| 103 | + ,{ id:"6", name:"用户列表",pid:"2",type:"aaa"} | |
| 104 | + ,{ id:"9", name:"创建用户",pid:"2",type:"hospital"} | |
| 105 | + ,{ id:"7", name:"编辑用户",pid:"2",type:"hospital"} | |
| 106 | + ,{ id:"8", name:"删除用户",pid:"2",type:"hospital"} | |
| 107 | + ,{ id:"3", name:"角色管理",pid:"999",type:"hospital"} | |
| 108 | + ,{ id:"10", name:"创建角色",pid:"3",type:"hospital"} | |
| 109 | + ,{ id:"11", name:"编辑角色",pid:"3",type:"hospital"} | |
| 110 | + ,{ id:"12", name:"删除角色",pid:"3",type:"hospital"} | |
| 111 | + ,{ id:"13", name:"角色列表",pid:"3",type:"hospital"} | |
| 112 | + ,{ id:"4", name:"资源管理",pid:"999",type:"hospital"} | |
| 113 | + ,{ id:"15", name:"资源列表",pid:"4",type:"hospital"} | |
| 114 | + ,{ id:"16", name:"添加资源",pid:"4",type:"hospital"} | |
| 115 | + ,{ id:"17", name:"编辑资源",pid:"4",type:"hospital"} | |
| 116 | + ,{ id:"18", name:"删除资源",pid:"4",type:"hospital"} | |
| 117 | + ,{ id:"5", name:"会话管理",pid:"999",type:"hospital"} | |
| 118 | + | |
| 119 | + ]; */ | |
| 120 | +</script> | |
| 121 | +<script> | |
| 122 | +var setting_resources = { | |
| 123 | + check: { | |
| 124 | + enable: true, | |
| 125 | + chkboxType: { | |
| 126 | + 'Y': 's', | |
| 127 | + 'N': 's' | |
| 128 | + } | |
| 129 | + | |
| 130 | + }, | |
| 131 | + async:{ | |
| 132 | + autoParam:["id"], | |
| 133 | + type:"get", | |
| 134 | + url:APP.PATH+"/sysRegions/find?_size=10000&_offset=0", | |
| 135 | + enable:true | |
| 136 | + }, | |
| 137 | + view: { | |
| 138 | + dblClickExpand: false, | |
| 139 | + showIcon : false | |
| 140 | + }, | |
| 141 | + data: { | |
| 142 | + simpleData: { | |
| 143 | + enable: true, | |
| 144 | + pIdKey: 'pid' | |
| 145 | + } | |
| 146 | + }, | |
| 147 | + callback: { | |
| 148 | + beforeClick: beforeClick_resources, | |
| 149 | + onCheck: onCheck_resources, | |
| 150 | + onNodeCreated: zTreeOnNodeCreated_resources, | |
| 151 | + onAsyncSuccess: zTreeOnAsyncSuccess | |
| 152 | + } | |
| 153 | +}; | |
| 154 | + | |
| 155 | +/** | |
| 156 | + * 异步数据加载返回处理 | |
| 157 | + */ | |
| 158 | +function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) { | |
| 159 | + console.log(msg) | |
| 160 | +}; | |
| 161 | + | |
| 162 | +function beforeClick_resources(treeId, treeNode) { | |
| 163 | + var zTree = $.fn.zTree.getZTreeObj('tree_resources'); | |
| 164 | + zTree.expandNode(treeNode); | |
| 165 | + zTree.checkNode(treeNode, !treeNode.checked, null, true); | |
| 166 | + //console.log(treeNode.type) | |
| 167 | + return false; | |
| 168 | +} | |
| 169 | +function selectTreeNode_resources(id) { | |
| 170 | + var zTree = $.fn.zTree.getZTreeObj('tree_resources'); | |
| 171 | + var node = zTree.getNodeByParam('id', id); | |
| 172 | + var pNode = node.getParentNode(); | |
| 173 | + while (pNode != null) { | |
| 174 | + pNode = analParentNode(pNode, zTree); | |
| 175 | + } | |
| 176 | + zTree.cancelSelectedNode(); | |
| 177 | + zTree.checkNode(node, true); | |
| 178 | + zTree.selectNode(node, true); | |
| 179 | +} | |
| 180 | +function analParentNode(node, zTree) { | |
| 181 | + zTree.expandNode(node, true); | |
| 182 | + var pNode = node.getParentNode(); | |
| 183 | + if (pNode) { | |
| 184 | + return pNode; | |
| 185 | + } | |
| 186 | + return null; | |
| 187 | +} | |
| 188 | +function zTreeOnNodeCreated_resources(event, treeId, treeNode) { | |
| 189 | + var selectModels = 'leve1'; | |
| 190 | + var types = selectModels.split(','); | |
| 191 | + for (var i = 0; i < types.length; i++) { | |
| 192 | + if (treeNode.type == types[i]) { | |
| 193 | + //console.log(treeNode) | |
| 194 | + //treeNode.isParent=true; | |
| 195 | + return; | |
| 196 | + } | |
| 197 | + } | |
| 198 | + treeNode.nocheck = true; | |
| 199 | + $.fn.zTree.getZTreeObj(treeId).updateNode(treeNode); | |
| 200 | +}; | |
| 201 | +function onClick_resources(e, treeId, treeNode) { | |
| 202 | + var zTree = $.fn.zTree.getZTreeObj('tree_resources'); | |
| 203 | + zTree.expandNode(treeNode); | |
| 204 | + zTree.checkNode(treeNode, !treeNode.checked, null, true); | |
| 205 | + return false; | |
| 206 | +} | |
| 207 | +function onCheck_resources(e, treeId, treeNode) { | |
| 208 | + var zTree = $.fn.zTree.getZTreeObj('tree_resources'), | |
| 209 | + nodes = zTree.getCheckedNodes(true), | |
| 210 | + v_txt = ''; | |
| 211 | + v_value = ''; | |
| 212 | + v_type = ''; | |
| 213 | + for (var i = 0, | |
| 214 | + l = nodes.length; i < l; i++) { | |
| 215 | + var pNode = nodes[i].getParentNode(); | |
| 216 | + if (pNode && pNode.checked) { | |
| 217 | + continue; | |
| 218 | + } | |
| 219 | + v_txt += nodes[i].name + ','; | |
| 220 | + v_value += nodes[i].id + ','; | |
| 221 | + if (nodes[i].type) { | |
| 222 | + v_type += nodes[i].type + ','; | |
| 223 | + } | |
| 224 | + } | |
| 225 | + if (v_txt.length > 0) { | |
| 226 | + v_txt = v_txt.substring(0, v_txt.length - 1); | |
| 227 | + v_value = v_value.substring(0, v_value.length - 1); | |
| 228 | + v_type = v_type.substring(0, v_type.length - 1); | |
| 229 | + } | |
| 230 | + $('#resources').attr('value', v_value); | |
| 231 | +} | |
| 232 | +var zNodes_resources = null; | |
| 233 | +var zTree_selectMode_resources = 'area'; | |
| 234 | +$(function() { | |
| 235 | + | |
| 236 | + //获取资源数据信息 | |
| 237 | + var firstNodes=new Array(); | |
| 238 | + firstNodes.push( { "id":"-1" , "name":"区域信息","pid":"0","type":"flag"}); | |
| 239 | + get("",function(data) { | |
| 240 | + if(data!=null) { | |
| 241 | + var areas = data.records; | |
| 242 | + for(var i=0;i<areas.length;i++) { | |
| 243 | + firstNodes.push({"isParent":true,"id":""+areas[i].id+"","name":""+areas[i].name+"","pid":"-1","type":"leve1"}) | |
| 244 | + } | |
| 245 | + zNodes_resources = firstNodes; | |
| 246 | + } | |
| 247 | + init("tree_resources" , setting_resources,zNodes_resources) | |
| 248 | + }) | |
| 249 | + | |
| 250 | + function init(tree_resources,setting_resources,zNodes_resources) { | |
| 251 | + var zTree = $.fn.zTree.init($('#'+tree_resources), setting_resources, zNodes_resources); | |
| 252 | + if (zTree_selectMode_resources.indexOf('all') < 0) { | |
| 253 | + var types = zTree_selectMode_resources.split(','); | |
| 254 | + for (var i = 0; i < types.length; i++) { | |
| 255 | + nodes = zTree.getNodesByParam('type', types[i]); | |
| 256 | + for (var j = 0; j < nodes.length; j++) { | |
| 257 | + zTree.setChkDisabled(nodes[j], true); | |
| 258 | + } | |
| 259 | + } | |
| 260 | + } | |
| 261 | + var resTree = $.fn.zTree.getZTreeObj('tree_resources'); | |
| 262 | + | |
| 263 | + resTree.expandAll(false); | |
| 264 | + } | |
| 265 | +}); | |
| 266 | + | |
| 267 | +</script> |
center.manager/src/main/webapp/WEB-INF/views/group/org_edit.html
View file @
d7886f3
| 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 | + <input type="hidden" id="org.id" name="id" value="$!org.id"/> | |
| 6 | + <div class="form-group"> | |
| 7 | + <label class="col-sm-3 control-label">名称:</label> | |
| 8 | + <div class="col-sm-8"> | |
| 9 | + <input type="text" placeholder="机构名称" value="$!org.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 10 | + </div> | |
| 11 | + </div> | |
| 12 | + <div class="form-group"> | |
| 13 | + <label class="col-sm-3 control-label">类型:</label> | |
| 14 | + <div class="col-sm-8"> | |
| 15 | + <!-- 1:卫生与计划生育委员会,2:妇幼保健院/站,3:妇产(科)医院,4:综合医院,5:计生站,6:卫生院,7:卫生所,8:其他 --> | |
| 16 | + <select class="form-control" name="type"> | |
| 17 | + <option value="1" >卫生与计划生育委员会</option> | |
| 18 | + <option value="2">妇幼保健院/站</option> | |
| 19 | + <option value="3">妇产(科)医院</option> | |
| 20 | + <option value="4">综合医院</option> | |
| 21 | + <option value="5">计生站</option> | |
| 22 | + <option value="6">卫生院</option> | |
| 23 | + <option value="7">卫生所</option> | |
| 24 | + <option value="8">其他</option> | |
| 25 | + </select> | |
| 26 | + <!-- <input type="text" placeholder="类型" aria-required="true" required="true" minlength="3" name="type" class="form-control" id="type"> --> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + | |
| 30 | + <div class="form-group"> | |
| 31 | + <label class="col-sm-3 control-label">简码:</label> | |
| 32 | + <div class="col-sm-8"> | |
| 33 | + <input type="text" value="$!org.shortCode" placeholder="简码" aria-required="true" required="true" minlength="3" name="shortCode" class="form-control" id="shortCode"> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | + | |
| 37 | + | |
| 38 | + <div class="form-group"> | |
| 39 | + <label class="col-sm-3 control-label">等级:</label> | |
| 40 | + <div class="col-sm-8"> | |
| 41 | + <!-- 1省,2市,3区县,4乡镇,5村,6其他 --> | |
| 42 | + <!-- <input type="text" placeholder="等级" aria-required="true" required="true" minlength="1" name="gradeLevel" class="form-control" id="gradeLevel"> --> | |
| 43 | + <select class="form-control" name="level"> | |
| 44 | + <option value="1" #if($!org.gradeLevel==1) selected="selected" #end>省</option> | |
| 45 | + <option value="2" #if($!org.gradeLevel==2) selected="selected" #end>市</option> | |
| 46 | + <option value="3" #if($!org.gradeLevel==3) selected="selected" #end>区县</option> | |
| 47 | + <option value="4" #if($!org.gradeLevel==4) selected="selected" #end>乡镇</option> | |
| 48 | + <option value="5" #if($!org.gradeLevel==5) selected="selected" #end>村</option> | |
| 49 | + <option value="6" #if($!org.gradeLevel==6) selected="selected" #end>其他</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + | |
| 54 | + <div class="form-group"> | |
| 55 | + <label class="col-sm-3 control-label">简码:</label> | |
| 56 | + <div class="col-sm-8"> | |
| 57 | + <input type="text" value="$!org.shortCode" placeholder="简码" aria-required="true" required="true" minlength="3" name="shortCode" class="form-control" id="shortCode"> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + | |
| 61 | + <div class="form-group"> | |
| 62 | + <label class="col-sm-3 control-label">服务热线:</label> | |
| 63 | + <div class="col-sm-8"> | |
| 64 | + <input type="text" value="$!org.mobile" placeholder="服务热线" aria-required="true" required="true" minlength="3" name="mobile" class="form-control" id="mobile"> | |
| 65 | + </div> | |
| 66 | + </div> | |
| 67 | + <div class="form-group"> | |
| 68 | + <label class="col-sm-3 control-label">星级:</label> | |
| 69 | + <div class="col-sm-8"> | |
| 70 | + <input type="text" value="$!org.starLevel" placeholder="星级" aria-required="true" required="true" minlength="1" name="starLevel" class="form-control" id="starLevel"> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + <div class="form-group"> | |
| 74 | + <label class="col-sm-3 control-label">区域:</label> | |
| 75 | + <div class="col-sm-8"> | |
| 76 | + #extends("/organ/org.html") | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <div class="form-group"> | |
| 80 | + <label class="col-sm-3 control-label">详细地址:</label> | |
| 81 | + <div class="col-sm-8"> | |
| 82 | + <input type="text" value="$!org.address" placeholder="详细地址" aria-required="true" required="true" minlength="3" name="address" class="form-control" id="address"> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + | |
| 86 | + <div class="form-group"> | |
| 87 | + <label class="col-sm-3 control-label">是否有效:</label> | |
| 88 | + <div class="col-sm-8"> | |
| 89 | + <input class="col-sm-4" checked="checked" type="radio" name="ifdel" #if($!org.ifdel==0) checked="checked" #end value="0"/>是 | |
| 90 | + <input class="col-sm-4" type="radio" name="ifdel" #if($!org.ifdel==1) checked="checked" #end value="1"/>否 | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + | |
| 94 | + <div class="form-group"> | |
| 95 | + <label class="col-sm-3 control-label">状态:</label> | |
| 96 | + <div class="col-sm-8"> | |
| 97 | + <!-- 0,"正式运行" 1,"试运行" 2,"停止运行" --> | |
| 98 | + <select class="form-control" name="status"> | |
| 99 | + <option value="0" #if($!org.status==0) selected="selected" #end>正式运行</option> | |
| 100 | + <option value="1" #if($!org.status==1) selected="selected" #end>试运行</option> | |
| 101 | + <option value="2" #if($!org.status==2) selected="selected" #end>停止运行</option> | |
| 102 | + </select> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + <div class="form-group"> | |
| 106 | + <label class="col-sm-3 control-label">简介:</label> | |
| 107 | + <div class="col-sm-8"> | |
| 108 | + <!-- 0,"正式运行" 1,"试运行" 2,"停止运行" --> | |
| 109 | + <textarea class="control-label" cols="80" rows="6" name="description">$!org.description</textarea> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + | |
| 114 | + <div class="hr-line-dashed"></div> | |
| 115 | + <div class="form-group"> | |
| 116 | + <div class="col-sm-4 col-sm-offset-3 pull-right"> | |
| 117 | + <button type="button" class="btn btn-primary" onclick="save();"><i class="fa fa-check"></i> 提交</button> | |
| 118 | + <button type="button" class="btn btn-white" onclick="parent.closeAll();"><i class="fa fa-close"></i> 取消</button> | |
| 119 | + </div> | |
| 120 | + </div> | |
| 121 | + </form> | |
| 122 | + </div> | |
| 123 | +</div> | |
| 124 | +<script type="text/javascript"> | |
| 125 | + function save(){ | |
| 126 | + if($('#validForm').valid()){ | |
| 127 | + var data = $('#validForm').serialize(); | |
| 128 | + data = data + "&" + $('#roleForm').serialize(); | |
| 129 | + //console.log(data); | |
| 130 | + if("$!org.id" == ""){ | |
| 131 | + ajaxPost(APP.PATH + "/sysOrganizations/create",data); | |
| 132 | + }else{ | |
| 133 | + ajaxPost(APP.PATH + "/sysOrganizations/update",data); | |
| 134 | + } | |
| 135 | + parent.reloadGrid('dataTable'); | |
| 136 | + } | |
| 137 | + } | |
| 138 | +</script> | |
| 139 | +#end | |
| 140 | +#extends("/common/base_list.html") | |
| 141 | +<script src="${ctx}/static/js/area.js"></script> | |
| 142 | +<script type="text/javascript"> | |
| 143 | + //获取所有区县 | |
| 144 | + get("",function(data){ | |
| 145 | + handlerSelect(data,"leve0","$!org.provinceId"); | |
| 146 | + get("$!org.provinceId",function(data){ | |
| 147 | + handlerSelect(data,"leve1","$!org.cityId"); | |
| 148 | + get("$!org.cityId",function(data){ | |
| 149 | + handlerSelect(data,"leve2","$!org.areaId"); | |
| 150 | + }); | |
| 151 | + }); | |
| 152 | + }); | |
| 153 | + | |
| 154 | +</script> |
center.manager/src/main/webapp/WEB-INF/views/organ/org_edit.html
View file @
d7886f3
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | <div class="col-sm-8"> |
| 41 | 41 | <!-- 1省,2市,3区县,4乡镇,5村,6其他 --> |
| 42 | 42 | <!-- <input type="text" placeholder="等级" aria-required="true" required="true" minlength="1" name="gradeLevel" class="form-control" id="gradeLevel"> --> |
| 43 | - <select class="form-control" name="gradeLevel"> | |
| 43 | + <select class="form-control" name="level"> | |
| 44 | 44 | <option value="1" #if($!org.gradeLevel==1) selected="selected" #end>省</option> |
| 45 | 45 | <option value="2" #if($!org.gradeLevel==2) selected="selected" #end>市</option> |
| 46 | 46 | <option value="3" #if($!org.gradeLevel==3) selected="selected" #end>区县</option> |
| ... | ... | @@ -48,6 +48,13 @@ |
| 48 | 48 | <option value="5" #if($!org.gradeLevel==5) selected="selected" #end>村</option> |
| 49 | 49 | <option value="6" #if($!org.gradeLevel==6) selected="selected" #end>其他</option> |
| 50 | 50 | </select> |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + | |
| 54 | + <div class="form-group"> | |
| 55 | + <label class="col-sm-3 control-label">简码:</label> | |
| 56 | + <div class="col-sm-8"> | |
| 57 | + <input type="text" value="$!org.shortCode" placeholder="简码" aria-required="true" required="true" minlength="3" name="shortCode" class="form-control" id="shortCode"> | |
| 51 | 58 | </div> |
| 52 | 59 | </div> |
| 53 | 60 |
center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
View file @
d7886f3
| ... | ... | @@ -70,13 +70,42 @@ |
| 70 | 70 | title: '名称' |
| 71 | 71 | },{ |
| 72 | 72 | field: 'type', |
| 73 | - title: '类型' | |
| 73 | + title: '类型', | |
| 74 | + formatter:function(value,row,index){ | |
| 75 | + //1:卫生与计划生育委员会,2:妇幼保健院/站,3:妇产(科)医院,4:综合医院,5:计生站,6:卫生院,7:卫生所,8:其他 | |
| 76 | + switch(value){ | |
| 77 | + case 1:return "卫生与计划生育委员会"; | |
| 78 | + case 2:return "妇幼保健院/站"; | |
| 79 | + case 3:return "妇产(科)医院"; | |
| 80 | + case 4:return "综合医院"; | |
| 81 | + case 5:return "计生站"; | |
| 82 | + case 6:return "卫生院"; | |
| 83 | + case 7:return "卫生所"; | |
| 84 | + case 8:return "其他"; | |
| 85 | + } | |
| 86 | + } | |
| 74 | 87 | },{ |
| 75 | 88 | field: 'shortCode', |
| 76 | 89 | title: '简码' |
| 77 | 90 | },{ |
| 91 | + field: 'level', | |
| 92 | + title: '等级', | |
| 93 | + formatter:function(value,row,index){ | |
| 94 | + switch (value) { | |
| 95 | + case 1:return "省"; | |
| 96 | + case 2:return "市"; | |
| 97 | + case 3:return "区县"; | |
| 98 | + case 4:return "乡镇"; | |
| 99 | + case 5:return "村"; | |
| 100 | + case 6:return "其他"; | |
| 101 | + | |
| 102 | + default: | |
| 103 | + return ""; | |
| 104 | + } | |
| 105 | + } | |
| 106 | + },{ | |
| 78 | 107 | field: 'gradeLevel', |
| 79 | - title: '等级' | |
| 108 | + title: '医院等级' | |
| 80 | 109 | },{ |
| 81 | 110 | field: 'mobile', |
| 82 | 111 | title: '服务热线' |
| ... | ... | @@ -85,10 +114,16 @@ |
| 85 | 114 | title: '星级' |
| 86 | 115 | },{ |
| 87 | 116 | field: 'status', |
| 88 | - title: '状态' | |
| 89 | - },{ | |
| 90 | - field: 'ifdel', | |
| 91 | - title: '是否删除' | |
| 117 | + title: '状态', | |
| 118 | + formatter:function(value,row,index){ | |
| 119 | + switch (value) { | |
| 120 | + case 0: return "正式运行"; | |
| 121 | + case 1: return "试运行"; | |
| 122 | + case 2: return "停止运行"; | |
| 123 | + default: | |
| 124 | + break; | |
| 125 | + } | |
| 126 | + } | |
| 92 | 127 | },{ |
| 93 | 128 | field: 'address', |
| 94 | 129 | title: '地址' |