Browse Source

后台管理修改

shilin 2 years ago
parent
commit
f7bc4996b7
23 changed files with 2880 additions and 30 deletions
  1. 1 1
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/SysCompanyController.java
  2. 224 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/SysRegionController.java
  3. 26 2
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/UserVueController.java
  4. 96 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/SysRegionMapper.java
  5. 19 1
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysCompany.java
  6. 200 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysRegion.java
  7. 632 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysRegionExample.java
  8. 9 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/TvueUser.java
  9. 192 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/SysRegionService.java
  10. 1 1
      web/monitor-web-sxjn/src/main/resources/mybatis-generator.xml
  11. 28 9
      web/monitor-web-sxjn/src/main/resources/mybatis/auto/SysCompanyMapper.xml
  12. 271 0
      web/monitor-web-sxjn/src/main/resources/mybatis/auto/SysRegionMapper.xml
  13. 15 5
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/add.html
  14. 13 5
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/edit.html
  15. 4 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/list.html
  16. 176 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/add.html
  17. 148 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/edit.html
  18. 314 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/list.html
  19. 192 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/tree.html
  20. 288 0
      web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/tree2.html
  21. 15 2
      web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/add.html
  22. 14 2
      web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/edit.html
  23. 2 2
      web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/list.html

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/SysCompanyController.java

@@ -153,7 +153,7 @@ public class SysCompanyController extends BaseController{
 		//获取父权限信息
 		SysCompany department = sysCompanyService.selectByPrimaryKey(mytsysPermission.getParentId());
 		if(department==null) {
-			department=new SysCompany("1", "0", "顶级菜单",  0, 1, 1);
+			department=new SysCompany("1", "0", "顶级菜单",  0, 1, 1,"");
 		}
         mmap.put("SysCompany", mytsysPermission);
         mmap.put("perSysCompany", department);

+ 224 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/SysRegionController.java

@@ -0,0 +1,224 @@
+package com.gyee.frame.controller.admin;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.SysRegion;
+import com.gyee.frame.model.custom.TableSplitResult;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.TitleVo;
+import com.gyee.frame.service.SysRegionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Api(value = "区域表")
+@Controller
+@RequestMapping("/SysRegionController")
+public class SysRegionController extends BaseController{
+	
+	private String prefix = "admin/sysRegion";
+	@Resource
+	private SysRegionService sysRegionService;
+	
+	/**
+	 * 分页跳转
+	 * @param model
+	 * @return
+	 * @author gyee
+	 * @Date 2020年4月18日 下午11:48:55
+	 */
+	@ApiOperation(value = "分页跳转", notes = "分页跳转")
+	@GetMapping("/view")
+	@RequiresPermissions("gen:sysRegion:view")
+    public String view(ModelMap model)
+    {	
+		String str="区域表";
+		setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
+        return prefix + "/list";
+    }
+	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param searchText
+	 * @return
+	 * @author gyee
+	 * @Date 2020年4月18日 下午11:48:34
+	 */
+	//@Log(title = "区域表集合查询", action = "111")
+	@ApiOperation(value = "分页查询", notes = "分页查询")
+	@PostMapping("/list")
+	@RequiresPermissions("gen:sysRegion:list")
+	@ResponseBody
+	public Object list(Tablepar tablepar,String searchText){
+		PageInfo<SysRegion> page=sysRegionService.list(tablepar,searchText) ; 
+		TableSplitResult<SysRegion> result=new TableSplitResult<SysRegion>(page.getPageNum(), page.getTotal(), page.getList()); 
+		return  result;
+	}
+	
+	@ApiOperation(value = "分页查询2", notes = "分页查询2")
+	@PostMapping("/list2")
+	@ResponseBody
+	public Object list2(Tablepar tablepar,String searchText){
+		List<SysRegion> page= sysRegionService.list2(searchText) ;
+		return  page;
+	}
+	
+	/**
+     * 新增
+     */
+	@ApiOperation(value = "新增跳转", notes = "新增跳转")
+    @GetMapping("/add")
+    public String add(ModelMap modelMap)
+    {
+        return prefix + "/add";
+    }
+	
+    /**
+     * 新增
+     * @param sysRegion
+     * @return
+     * @author gyee
+     * @Date 2020年4月18日 下午11:47:51
+     */
+	//@Log(title = "区域表新增", action = "111")
+    @ApiOperation(value = "新增", notes = "新增")
+	@PostMapping("/add")
+	@RequiresPermissions("gen:sysRegion:add")
+	@ResponseBody
+	public AjaxResult add(SysRegion sysRegion){
+		int b=sysRegionService.insertSelective(sysRegion);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 删除
+	 * @param ids
+	 * @return
+	 */
+	//@Log(title = "区域表删除", action = "111")
+	@ApiOperation(value = "删除", notes = "删除")
+	@PostMapping("/remove")
+	@RequiresPermissions("gen:sysRegion:remove")
+	@ResponseBody
+	public AjaxResult remove(String ids){
+		int b=sysRegionService.deleteByPrimaryKey(ids);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 检查区域
+	 * @return
+	 */
+	@ApiOperation(value = "检查Name唯一", notes = "检查Name唯一")
+	@PostMapping("/checkNameUnique")
+	@ResponseBody
+	public int checkNameUnique(SysRegion sysRegion){
+		int b=sysRegionService.checkNameUnique(sysRegion);
+		if(b>0){
+			return 1;
+		}else{
+			return 0;
+		}
+	}
+	
+	
+	/**
+	 * 修改跳转
+	 * @param id
+	 * @param mmap
+	 * @return
+	 */
+	@ApiOperation(value = "修改跳转", notes = "修改跳转")
+	@GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap)
+    {
+		//获取自己的权限信息
+		SysRegion mytsysPermission = sysRegionService.selectByPrimaryKey(id);
+		//获取父权限信息
+		SysRegion department = sysRegionService.selectByPrimaryKey(mytsysPermission.getParentId());
+		if(department==null) {
+			department=new SysRegion("1", "0", "顶级菜单",  0, 1, 1);
+		}
+        mmap.put("SysRegion", mytsysPermission);
+        mmap.put("perSysRegion", department);
+        return prefix + "/edit";
+    }
+	
+	/**
+     * 修改保存
+     */
+    //@Log(title = "区域表修改", action = "111")
+	@ApiOperation(value = "修改保存", notes = "修改保存")
+    @RequiresPermissions("gen:sysRegion:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysRegion record)
+    {
+        return toAjax(sysRegionService.updateByPrimaryKeySelective(record));
+    }
+
+    
+    /**
+   	 * 根据主键查询
+   	 * 
+   	 * @param id
+   	 * @return
+   	 */
+   	@PostMapping("/get/{id}")
+   	@ApiOperation(value = "根据id查询唯一", notes = "根据id查询唯一")
+   	public SysRegion edit(@PathVariable("id") String id) {
+   		return sysRegionService.selectByPrimaryKey(id);
+   	}
+    
+   	
+   	/**
+     * 跳转到菜单树页面
+     * @return
+     */
+   	@ApiOperation(value = "跳转到菜单树页面", notes = "跳转到菜单树页面")
+    @GetMapping("/tree")
+    public String Tree(){
+    	 return prefix + "/tree";
+    }
+
+
+    /**
+     * 跳转到菜单树页面
+     * @return
+     */
+    @ApiOperation(value = "跳转到菜单树页面", notes = "跳转到菜单树页面")
+    @GetMapping("/tree2")
+    public String Tree2(){
+        return prefix + "/tree2";
+    }
+    
+    /**
+     * 获取菜单树
+     * @param pid 父id【没用到】
+     * @return
+     */
+    @ApiOperation(value = "获取菜单树", notes = "获取菜单树")
+    @PostMapping("/tree/{pid}")
+    @ResponseBody
+    public AjaxResult Tree(@PathVariable("pid") String pid){
+    	return retobject(200, sysRegionService.getbooBootstrapTreePerm());
+    }
+
+	
+}

+ 26 - 2
web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/admin/UserVueController.java

@@ -4,11 +4,13 @@ import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.base.BaseController;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.log.Log;
+import com.gyee.frame.mapper.custom.TvueUserDao;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.SysDepartmentService;
 import com.gyee.frame.service.SysPositionService;
 import com.gyee.frame.service.SysWindpowerstationService;
+import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -42,6 +44,9 @@ public class UserVueController extends BaseController{
     //岗位
     @Resource
     private SysWindpowerstationService sysWindpowerstationService;
+
+    @Resource
+    private TvueUserDao tvueUserDao;
 	/**
 	 * 展示跳转页面
 	 * @param model
@@ -74,7 +79,26 @@ public class UserVueController extends BaseController{
 	@RequiresPermissions("system:uservue:list")
 	@ResponseBody
 	public Object list(Tablepar tablepar,String searchText){
-		PageInfo<TvueUser> page=vueUserService.list(tablepar,searchText) ; 
+		PageInfo<TvueUser> page=vueUserService.list(tablepar,searchText) ;
+
+		if(StringUtils.notEmp(page) && !page.getList().isEmpty())
+        {
+            List<TvueUser>  ls=page.getList();
+            for(TvueUser tu:ls)
+            {
+                List<SysWindpowerstation> myWpls= tvueUserDao.queryUserWp(tu.getId());
+                StringBuilder sb=new StringBuilder();
+                if(!myWpls.isEmpty())
+                {
+                    for(SysWindpowerstation wp:myWpls)
+                    {
+                        sb.append(wp.getName()).append(",");
+                    }
+                }
+                tu.setWpName(sb.substring(0,sb.length()-1));
+            }
+
+        }
 		TableSplitResult<TvueUser> result=new TableSplitResult<TvueUser>(page.getPageNum(), page.getTotal(), page.getList()); 
 		return  result;
 	}
@@ -90,7 +114,7 @@ public class UserVueController extends BaseController{
     public String add(ModelMap modelMap)
     {
     	//添加角色列表
-		List<TsysRole> tsysRoleList=sysRoleService.queryList();
+		List<TvueRole> tsysRoleList=vueRoleService.queryList();
 		//部门列表
 		List<SysDepartment> departments=departmentService.selectByExample(new SysDepartmentExample());
 		//岗位列表

+ 96 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/SysRegionMapper.java

@@ -0,0 +1,96 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.SysRegion;
+import com.gyee.frame.model.auto.SysRegionExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface SysRegionMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    long countByExample(SysRegionExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(SysRegionExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int insert(SysRegion record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int insertSelective(SysRegion record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    List<SysRegion> selectByExample(SysRegionExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    SysRegion selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") SysRegion record, @Param("example") SysRegionExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") SysRegion record, @Param("example") SysRegionExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(SysRegion record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(SysRegion record);
+}

+ 19 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysCompany.java

@@ -48,6 +48,8 @@ public class SysCompany implements Serializable {
      */
     private Integer orderNum;
     private Integer childCount;
+    private String reId;
+    private String regionName;
     /**
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table T_SYS_COMPANY
@@ -109,13 +111,29 @@ public class SysCompany implements Serializable {
         super();
     }
     public SysCompany(String id, String parentId, String companyName,
-                         Integer status, Integer orderNum, Integer childCount) {
+                         Integer status, Integer orderNum, Integer childCount, String reId) {
         this.id = id;
         this.parentId = parentId;
         this.companyName = companyName;
         this.status = status;
         this.orderNum = orderNum;
         this.childCount = childCount;
+        this.reId = reId;
+    }
+
+    public String getReId() {
+        return reId;
+    }
+
+    public void setReId(String reId) {
+        this.reId = reId;
+    }
+
+    public String getRegionName() {
+        return regionName;
+    }
 
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
     }
 }

+ 200 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysRegion.java

@@ -0,0 +1,200 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class SysRegion implements Serializable {
+
+    public SysRegion() {
+        super();
+    }
+    public SysRegion(String id, String parentId, String regionName,
+                      Integer status, Integer orderNum, Integer childCount) {
+        this.id = id;
+        this.parentId = parentId;
+        this.regionName = regionName;
+        this.status = status;
+        this.orderNum = orderNum;
+        this.childCount = childCount;
+
+    }
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_sys_region.id
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_sys_region.parent_id
+     *
+     * @mbg.generated
+     */
+    private String parentId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_sys_region.region_name
+     *
+     * @mbg.generated
+     */
+    private String regionName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_sys_region.status
+     *
+     * @mbg.generated
+     */
+    private Integer status;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_sys_region.order_num
+     *
+     * @mbg.generated
+     */
+    private Integer orderNum;
+    private Integer childCount;
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_sys_region.id
+     *
+     * @return the value of t_sys_region.id
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_sys_region.id
+     *
+     * @param id the value for t_sys_region.id
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_sys_region.parent_id
+     *
+     * @return the value of t_sys_region.parent_id
+     *
+     * @mbg.generated
+     */
+    public String getParentId() {
+        return parentId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_sys_region.parent_id
+     *
+     * @param parentId the value for t_sys_region.parent_id
+     *
+     * @mbg.generated
+     */
+    public void setParentId(String parentId) {
+        this.parentId = parentId == null ? null : parentId.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_sys_region.region_name
+     *
+     * @return the value of t_sys_region.region_name
+     *
+     * @mbg.generated
+     */
+    public String getRegionName() {
+        return regionName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_sys_region.region_name
+     *
+     * @param regionName the value for t_sys_region.region_name
+     *
+     * @mbg.generated
+     */
+    public void setRegionName(String regionName) {
+        this.regionName = regionName == null ? null : regionName.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_sys_region.status
+     *
+     * @return the value of t_sys_region.status
+     *
+     * @mbg.generated
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_sys_region.status
+     *
+     * @param status the value for t_sys_region.status
+     *
+     * @mbg.generated
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_sys_region.order_num
+     *
+     * @return the value of t_sys_region.order_num
+     *
+     * @mbg.generated
+     */
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_sys_region.order_num
+     *
+     * @param orderNum the value for t_sys_region.order_num
+     *
+     * @mbg.generated
+     */
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public Integer getChildCount() {
+        return childCount;
+    }
+
+    public void setChildCount(Integer childCount) {
+        this.childCount = childCount;
+    }
+}

+ 632 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/SysRegionExample.java

@@ -0,0 +1,632 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SysRegionExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public SysRegionExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdIsNull() {
+            addCriterion("parent_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdIsNotNull() {
+            addCriterion("parent_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdEqualTo(String value) {
+            addCriterion("parent_id =", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotEqualTo(String value) {
+            addCriterion("parent_id <>", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdGreaterThan(String value) {
+            addCriterion("parent_id >", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("parent_id >=", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLessThan(String value) {
+            addCriterion("parent_id <", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLessThanOrEqualTo(String value) {
+            addCriterion("parent_id <=", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdLike(String value) {
+            addCriterion("parent_id like", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotLike(String value) {
+            addCriterion("parent_id not like", value, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdIn(List<String> values) {
+            addCriterion("parent_id in", values, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotIn(List<String> values) {
+            addCriterion("parent_id not in", values, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdBetween(String value1, String value2) {
+            addCriterion("parent_id between", value1, value2, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andParentIdNotBetween(String value1, String value2) {
+            addCriterion("parent_id not between", value1, value2, "parentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameIsNull() {
+            addCriterion("region_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameIsNotNull() {
+            addCriterion("region_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameEqualTo(String value) {
+            addCriterion("region_name =", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameNotEqualTo(String value) {
+            addCriterion("region_name <>", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameGreaterThan(String value) {
+            addCriterion("region_name >", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameGreaterThanOrEqualTo(String value) {
+            addCriterion("region_name >=", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameLessThan(String value) {
+            addCriterion("region_name <", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameLessThanOrEqualTo(String value) {
+            addCriterion("region_name <=", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameLike(String value) {
+            addCriterion("region_name like", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameNotLike(String value) {
+            addCriterion("region_name not like", value, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameIn(List<String> values) {
+            addCriterion("region_name in", values, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameNotIn(List<String> values) {
+            addCriterion("region_name not in", values, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameBetween(String value1, String value2) {
+            addCriterion("region_name between", value1, value2, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNameNotBetween(String value1, String value2) {
+            addCriterion("region_name not between", value1, value2, "regionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumIsNull() {
+            addCriterion("order_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumIsNotNull() {
+            addCriterion("order_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumEqualTo(Integer value) {
+            addCriterion("order_num =", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotEqualTo(Integer value) {
+            addCriterion("order_num <>", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumGreaterThan(Integer value) {
+            addCriterion("order_num >", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("order_num >=", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumLessThan(Integer value) {
+            addCriterion("order_num <", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumLessThanOrEqualTo(Integer value) {
+            addCriterion("order_num <=", value, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumIn(List<Integer> values) {
+            addCriterion("order_num in", values, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotIn(List<Integer> values) {
+            addCriterion("order_num not in", values, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumBetween(Integer value1, Integer value2) {
+            addCriterion("order_num between", value1, value2, "orderNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOrderNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("order_num not between", value1, value2, "orderNum");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_sys_region
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_sys_region
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 9 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/TvueUser.java

@@ -66,6 +66,15 @@ public class TvueUser implements Serializable {
     private String comId;
     /**公司名称**/
     private String comName;
+    private String wpName;
+
+    public String getWpName() {
+        return wpName;
+    }
+
+    public void setWpName(String wpName) {
+        this.wpName = wpName;
+    }
 
     public String getComId() {
         return comId;

+ 192 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/SysRegionService.java

@@ -0,0 +1,192 @@
+package com.gyee.frame.service;
+
+import cn.hutool.core.util.StrUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.ConvertUtil;
+import com.gyee.frame.mapper.auto.SysRegionMapper;
+import com.gyee.frame.model.auto.SysRegion;
+import com.gyee.frame.model.auto.SysRegionExample;
+import com.gyee.frame.model.custom.BootstrapTree;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 部门表 SysRegionService
+ * 
+ * @Title: SysRegionService.java 
+ * @Package com.gyee.frame.service 
+ * @author fuce_自动生成
+ * @email 115889198@qq.com
+ * @date 2020-04-17 13:12:58  
+ **/
+@Service
+public class SysRegionService implements BaseService<SysRegion, SysRegionExample> {
+	@Resource
+	private SysRegionMapper sysRegionMapper;
+
+
+	public PageInfo<SysRegion> list(Tablepar tablepar, String name) {
+		SysRegionExample testExample = new SysRegionExample();
+		testExample.setOrderByClause("id ASC");
+		if (name != null && !"".equals(name)) {
+			testExample.createCriteria().andRegionNameEqualTo("%" + name + "%");
+		}
+		if (StrUtil.isNotEmpty(tablepar.getOrderByColumn())) {
+			testExample.setOrderByClause(
+					StringUtils.toUnderScoreCase(tablepar.getOrderByColumn()) + " " + tablepar.getIsAsc());
+		}
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+		List<SysRegion> list = sysRegionMapper.selectByExample(testExample);
+		PageInfo<SysRegion> pageInfo = new PageInfo<SysRegion>(list);
+		return pageInfo;
+	}
+
+	public List<SysRegion> list2(String searchText) {
+		SysRegionExample testExample = new SysRegionExample();
+		testExample.setOrderByClause("order_num   ASC,order_num  ASC");
+		if (searchText != null && !"".equals(searchText)) {
+			testExample.createCriteria().andRegionNameEqualTo("%" + searchText + "%");
+		}
+		List<SysRegion> list = sysRegionMapper.selectByExample(testExample);
+		return list;
+	}
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+
+        String[] integers = ConvertUtil.toStrArray(",", ids);
+		List<String> stringB = Arrays.asList(integers);
+		SysRegionExample example = new SysRegionExample();
+		example.createCriteria().andIdIn(stringB);
+		return sysRegionMapper.deleteByExample(example);
+
+	}
+
+	@Override
+	public SysRegion selectByPrimaryKey(String id) {
+
+
+		return sysRegionMapper.selectByPrimaryKey(id);
+
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(SysRegion record) {
+		return sysRegionMapper.updateByPrimaryKeySelective(record);
+	}
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(SysRegion record) {
+
+        record.setId(SnowflakeIdWorker.getUUID());
+
+		return sysRegionMapper.insertSelective(record);
+	}
+
+	@Override
+	public int updateByExampleSelective(SysRegion record, SysRegionExample example) {
+
+		return sysRegionMapper.updateByExampleSelective(record, example);
+	}
+
+	@Override
+	public int updateByExample(SysRegion record, SysRegionExample example) {
+
+		return sysRegionMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<SysRegion> selectByExample(SysRegionExample example) {
+
+		return sysRegionMapper.selectByExample(example);
+	}
+
+	@Override
+	public long countByExample(SysRegionExample example) {
+
+		return sysRegionMapper.countByExample(example);
+	}
+
+	@Override
+	public int deleteByExample(SysRegionExample example) {
+
+		return sysRegionMapper.deleteByExample(example);
+	}
+
+	/**
+	 * 检查name
+	 * 
+	 * @param sysRegion
+	 * @return
+	 */
+	public int checkNameUnique(SysRegion sysRegion) {
+		SysRegionExample example = new SysRegionExample();
+		example.createCriteria().andRegionNameEqualTo(sysRegion.getRegionName());
+		List<SysRegion> list = sysRegionMapper.selectByExample(example);
+		return list.size();
+	}
+	
+	
+	
+	/**
+	 * 获取树
+	 * @param menuList
+	 * @param parentId
+	 * @return
+	 */
+	private static List<BootstrapTree> getbooBootstrapTreePerm(List<SysRegion> menuList, String parentId){
+		List<BootstrapTree> treeList = new ArrayList<>();
+		List<BootstrapTree> childList = null;
+		for(SysRegion p : menuList) {
+			p.setParentId(p.getParentId()==null||p.getParentId().trim().equals("")? "0":p.getParentId());
+			if(p.getParentId().trim().equals(parentId)) {
+				if(p.getChildCount()!=null&&p.getChildCount()>0) {
+					childList = getbooBootstrapTreePerm(menuList, String.valueOf(p.getId()));
+				}
+				BootstrapTree bootstrapTree = new BootstrapTree(p.getRegionName(), "", "", String.valueOf(p.getId()), "",0,childList,p.getRegionName(),p.getStatus());
+				treeList.add(bootstrapTree);
+				childList = null;
+			}
+		}
+		return treeList.size() >0 ? treeList : null;
+	}
+	
+	/**
+	 * 获取转换成bootstarp的权限数据
+	 * @return
+	 */
+	public BootstrapTree getbooBootstrapTreePerm(){
+		List<BootstrapTree> treeList = new ArrayList<BootstrapTree>();
+		List<SysRegion> menuList =  getall();
+		treeList = getbooBootstrapTreePerm(menuList,"0");
+		if(treeList!=null&&treeList.size()==1) {
+			return treeList.get(0);
+		}
+		return new BootstrapTree("菜单", "fa fa-home", "", "0","###",0,treeList,"",0);
+	}
+	
+	
+	/**
+	 * 根据用户id获取用户角色如果用户为null 获取所有权限
+	 * @return
+	 */
+	public List<SysRegion> getall(){
+		SysRegionExample example = new SysRegionExample();
+		example.setOrderByClause("order_num asc");
+		return  sysRegionMapper.selectByExample(example);
+		
+	}
+	
+}

+ 1 - 1
web/monitor-web-sxjn/src/main/resources/mybatis-generator.xml

@@ -125,7 +125,7 @@
 <!--        <table tableName='StopAnalysismainVo' domainObjectName='StopAnalysismainVo'/>-->
 
 
-        <table tableName='t_vue_wp_user' domainObjectName='TvueWpUser'/>
+        <table tableName='t_sys_region' domainObjectName='SysRegion'/>
 
 
     </context>

+ 28 - 9
web/monitor-web-sxjn/src/main/resources/mybatis/auto/SysCompanyMapper.xml

@@ -8,6 +8,8 @@
         <result column="status" jdbcType="INTEGER" property="status" />
         <result column="order_num" jdbcType="INTEGER" property="orderNum" />
         <result column="childcount" jdbcType="INTEGER" property="childCount"/>
+        <result column="re_id" jdbcType="VARCHAR" property="reId" />
+        <result column="region_name" jdbcType="VARCHAR" property="regionName" />
     </resultMap>
     <sql id="Example_Where_Clause">
         <where>
@@ -72,8 +74,8 @@
        	  	      	parent_id,
        	  	      	company_name,
        	  	      	status,
-       	  	    	order_num,
-       	  	    	(select count(1) from t_sys_company where parent_id=a.id) childcount
+       	  	    	order_num,re_id,
+       	  	    	(select count(1) from t_sys_company a where parent_id=a.id) childcount
        	</sql>
     <select id="selectByExample" parameterType="com.gyee.frame.model.auto.SysCompanyExample" resultMap="BaseResultMap">
         select
@@ -81,7 +83,8 @@
             distinct
         </if>
         <include refid="Base_Column_List" />
-        from t_sys_company a
+        ,(select region_name from t_sys_region re where re.id=tsu.re_id) as region_name
+        from t_sys_company tsu
         <if test="_parameter != null">
             <include refid="Example_Where_Clause" />
         </if>
@@ -92,7 +95,8 @@
     <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List" />
-        from t_sys_company a
+        ,(select region_name from t_sys_region re where re.id=tsu.re_id) as region_name
+        from t_sys_company tsu
         where id = #{id,jdbcType=VARCHAR}
     </select>
 
@@ -113,14 +117,16 @@
        	  	       parent_id,
        	  	       company_name,
        	  	       status,
-       	  	       order_num
+       	  	       order_num,
+       	  	       re_id
        	    )
     values (
 	  	  	      	#{id,jdbcType=VARCHAR},
        	  	      	#{parentId,jdbcType=VARCHAR},
        	  	      	#{companyName,jdbcType=VARCHAR},
        	  	      	#{status,jdbcType=INTEGER},
-       	  	    	#{orderNum,jdbcType=INTEGER}
+       	  	    	#{orderNum,jdbcType=INTEGER},
+       	  	    	#{reId,jdbcType=VARCHAR}
        	    )
   </insert>
 
@@ -150,6 +156,9 @@
                 order_num,
             </if>
 
+            <if test="reId != null">
+                re_id,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -167,6 +176,9 @@
             <if test="orderNum != null">
                 #{orderNum,jdbcType=INTEGER},
             </if>
+            <if test="reId != null">
+                #{reId,jdbcType=VARCHAR},
+            </if>
         </trim>
     </insert>
 
@@ -195,7 +207,9 @@
             <if test="record.orderNum != null">
                 order_num = #{record.orderNum,jdbcType=INTEGER},
             </if>
-
+            <if test="record.reId != null">
+                re_id = #{record.reId,jdbcType=VARCHAR},
+            </if>
         </set>
         <if test="_parameter != null">
             <include refid="Update_By_Example_Where_Clause" />
@@ -210,7 +224,8 @@
         parent_id = #{record.parentId,jdbcType=VARCHAR},
         company_name = #{record.companyName,jdbcType=VARCHAR},
         status = #{record.status,jdbcType=INTEGER},
-        order_num = #{record.orderNum,jdbcType=INTEGER}
+        order_num = #{record.orderNum,jdbcType=INTEGER},
+        re_id = #{record.reId,jdbcType=VARCHAR}
         <if test="_parameter != null">
             <include refid="Update_By_Example_Where_Clause" />
         </if>
@@ -233,6 +248,9 @@
             <if test="orderNum != null">
                 order_num = #{orderNum,jdbcType=INTEGER},
             </if>
+            <if test="reId != null">
+                re_id = #{reId,jdbcType=VARCHAR},
+            </if>
         </set>
         where
         id = #{id,jdbcType=VARCHAR}
@@ -247,7 +265,8 @@
              	        	    	 			parent_id = #{parentId,jdbcType=VARCHAR},
 		     	        	    	 			company_name = #{companyName,jdbcType=VARCHAR},
 		     	        	    	 			status = #{status,jdbcType=INTEGER},
-		     	        	    	 			order_num = #{orderNum,jdbcType=INTEGER}
+		     	        	    	 			order_num = #{orderNum,jdbcType=INTEGER},
+		     	        	    	 			re_id = #{reId,jdbcType=VARCHAR}
 		     	        where 
             id = #{id,jdbcType=VARCHAR}
                                                                     

+ 271 - 0
web/monitor-web-sxjn/src/main/resources/mybatis/auto/SysRegionMapper.xml

@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.SysRegionMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.SysRegion">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="parent_id" jdbcType="VARCHAR" property="parentId" />
+    <result column="region_name" jdbcType="VARCHAR" property="regionName" />
+    <result column="status" jdbcType="NUMERIC" property="status" />
+    <result column="order_num" jdbcType="NUMERIC" property="orderNum" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, parent_id, region_name, status, order_num
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.SysRegionExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_sys_region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_sys_region
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from t_sys_region
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.SysRegionExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from t_sys_region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.SysRegion">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into t_sys_region (id, parent_id, region_name, 
+      status, order_num)
+    values (#{id,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, 
+      #{status,jdbcType=NUMERIC}, #{orderNum,jdbcType=NUMERIC})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.SysRegion">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into t_sys_region
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="parentId != null">
+        parent_id,
+      </if>
+      <if test="regionName != null">
+        region_name,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="orderNum != null">
+        order_num,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="parentId != null">
+        #{parentId,jdbcType=VARCHAR},
+      </if>
+      <if test="regionName != null">
+        #{regionName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=NUMERIC},
+      </if>
+      <if test="orderNum != null">
+        #{orderNum,jdbcType=NUMERIC},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.SysRegionExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from t_sys_region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update t_sys_region
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.parentId != null">
+        parent_id = #{record.parentId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.regionName != null">
+        region_name = #{record.regionName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=NUMERIC},
+      </if>
+      <if test="record.orderNum != null">
+        order_num = #{record.orderNum,jdbcType=NUMERIC},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update t_sys_region
+    set id = #{record.id,jdbcType=VARCHAR},
+      parent_id = #{record.parentId,jdbcType=VARCHAR},
+      region_name = #{record.regionName,jdbcType=VARCHAR},
+      status = #{record.status,jdbcType=NUMERIC},
+      order_num = #{record.orderNum,jdbcType=NUMERIC}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.SysRegion">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update t_sys_region
+    <set>
+      <if test="parentId != null">
+        parent_id = #{parentId,jdbcType=VARCHAR},
+      </if>
+      <if test="regionName != null">
+        region_name = #{regionName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=NUMERIC},
+      </if>
+      <if test="orderNum != null">
+        order_num = #{orderNum,jdbcType=NUMERIC},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.SysRegion">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update t_sys_region
+    set parent_id = #{parentId,jdbcType=VARCHAR},
+      region_name = #{regionName,jdbcType=VARCHAR},
+      status = #{status,jdbcType=NUMERIC},
+      order_num = #{orderNum,jdbcType=NUMERIC}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 15 - 5
web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/add.html

@@ -25,13 +25,20 @@
 				<div class="body-nest" id="element">
 					<div class="panel-body">
 						<form  class="form-horizontal m" id="form-add">
-						
+
+                                    <div class="form-group">
+                                        <label class="col-sm-3 control-label ">区域:</label>
+                                        <div class="col-sm-8">
+
+                                            <input class="form-control" type="hidden" id="parentIdre" name="reId"/>
+                                            <input class="form-control" readonly="true" type="text" id="parentnamere" onclick="selectRegionMenuTree()" />
+                                        </div>
+                                    </div>
+
 									<div class="form-group">
 										<label class="col-sm-3 control-label ">父级:</label>
 										<div class="col-sm-8">
-											<input class="form-control" type="hidden" id="parentId" name="parentId"/>
-                                            <input class="form-control" type="hidden" id="pidName" name="pidName"/>
-                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentIdcm"/>
+                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentId"/>
 											<input class="form-control" readonly="true" type="text" id="parentnamecm" onclick="selectMenuTree()" />
 										</div>
 									</div>
@@ -166,7 +173,10 @@ function selectMenuTree() {
 	$.modal.open("选择菜单", url, '380', '380');
 }
 
-
+function selectRegionMenuTree() {
+    var url =  rootPath+ "/SysRegionController/tree";
+    $.modal.open("选择菜单", url, '380', '380');
+}
 </script>
 
 

+ 13 - 5
web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/edit.html

@@ -28,13 +28,18 @@
 					<div class="panel-body">
 						<form  class="form-horizontal m" id="form-edit" th:object="${SysCompany}">
 							<input id="id" name="id" type="hidden" th:field="*{id}"/>
-						
+
+                                    <div class="form-group">
+                                        <label class="col-sm-3 control-label ">区域:</label>
+                                        <div class="col-sm-8">
+                                            <input class="form-control" type="hidden" id="parentIdre" name="reId" th:value="*{reId}"/>
+                                            <input class="form-control" readonly="true" type="text" th:value="${regionName}" id="parentnamere" onclick="selectRegionMenuTree()" />
+                                        </div>
+                                    </div>
 									<div class="form-group">
 										<label class="col-sm-3 control-label ">父级:</label>
 										<div class="col-sm-8">
-											<input class="form-control" type="hidden" id="parentId" name="parentId" th:value="*{parentId}"/>
-                                            <input class="form-control" type="hidden" id="pidName" name="pidName" th:value="${perSysCompany.companyName}"/>
-                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentIdcm" th:value="*{parentId}"/>
+                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentId" th:value="*{parentId}"/>
 											<input class="form-control" readonly="true" type="text" th:value="${perSysCompany.companyName}" id="parentnamecm" onclick="selectMenuTree()" />
 										</div>
 									</div>
@@ -123,7 +128,10 @@ function selectMenuTree() {
 	var url = rootPath + "/SysCompanyController/tree";
 	$.modal.open("选择菜单", url, '380', '380');
 }
-
+function selectRegionMenuTree() {
+    var url =  rootPath+ "/SysRegionController/tree";
+    $.modal.open("选择菜单", url, '380', '380');
+}
 function edit() {
 	var dataFormJson = $("#form-edit").serialize();
 	$.ajax({

+ 4 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysCompany/list.html

@@ -158,6 +158,10 @@ var treeTable = $('#demo').bootstrapTreeTable({
 		    visible: false, //隐藏
 		    title: '父id'
 		},
+        {
+            field: 'regionName',
+            title: '区域'
+        },
 		{
 		    field: 'companyName',
 		    title: '公司名称'

+ 176 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/add.html

@@ -0,0 +1,176 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" 
+      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="admin/common/html/tableHead :: head(~{::title},~{::link},~{::style})">
+
+<title th:text=${title}></title>
+<!-- 这儿引用单独的css link -->
+<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
+<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
+<!-- bootstrap-table表单样式 -->
+<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
+<!-- 用户界面自定义css -->
+<link th:href="@{/static/admin/user/css/user-add.css}" rel="stylesheet"/>
+<style type="text/css"></style>
+</head>
+
+<body>
+
+<div class="content-wrap">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="nest" id="elementClose">
+				<div class="">
+				</div>
+				<div class="body-nest" id="element">
+					<div class="panel-body">
+						<form  class="form-horizontal m" id="form-add">
+						
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">父级:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="hidden" id="parentId" name="parentId"/>
+                                            <input class="form-control" type="hidden" id="pidName" name="pidName"/>
+                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentIdre"/>
+											<input class="form-control" readonly="true" type="text" id="parentnamere" onclick="selectMenuTree()" />
+										</div>
+									</div>
+									
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">区域名称:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="text" id="regionName" name="regionName"/>
+										</div>
+									</div>
+
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">状态:</label>
+										<div class="col-sm-8">
+											<select class="form-control"  id="status" name="status">
+													<option value="1">开启</option>
+													<option value="0">关闭</option>
+											</select>
+										</div>
+									</div>
+									
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">排序:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="number" value="1" id="orderNum" name="orderNum"/>
+										</div>
+									</div>
+									
+			
+									<div class="form-group">
+										<div class="form-control-static col-sm-offset-9">
+											<button type="submit" class="btn btn-primary">提交</button>
+											<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+										</div>
+									</div>
+						 </form>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<!-- 通用js -->
+<div th:include="admin/common/html/js :: onload_js">
+   
+</div>
+<!-- bootstarp 表格 -->
+<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
+
+
+<!-- 弹窗 -->
+<script  th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
+<!-- 遮罩层 -->
+<script  th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
+<!-- jqueryForm序列化 -->
+<script  th:src="@{/static/js/jqueryFormSerializeJson.js}" type="text/javascript"></script>
+<script type="text/javascript">
+
+$(function(){
+	 $(".MyDate").datetimepicker({
+		 	format: "yyyy-mm-dd hh:00:00",
+	        startDate: new Date(),
+	        autoclose: true,
+	        todayBtn: true,
+	        language: 'zh-CN',
+	        initialDate:new Date(),
+	        minView: 1      
+	    });
+	
+})
+
+
+$("#form-add").validate({
+	rules:{
+		regionName:{
+			required:true,
+			minlength: 2,
+			maxlength: 20,
+			remote: {
+                url: rootPath + "/SysRegionController/checkNameUnique",
+                type: "post",
+                dataType: "json",
+                dataFilter: function(data, type) {
+                    if (data == "0")
+                    	return true;
+                    else 
+                    	return false;
+                }
+            }
+		}
+	},
+	messages: {
+        "regionName": {
+            remote: "已经存在"
+        }
+    },
+	submitHandler:function(form){
+		add();
+	}
+});
+
+/**
+ * 用户添加方法
+ */
+function add() {
+	var dataFormJson=$("#form-add").serialize();
+	$.ajax({
+		cache : true,
+		type : "POST",
+		url : rootPath + "/SysRegionController/add",
+		data : dataFormJson,
+		async : false,
+		error : function(request) {
+			$.modal.alertError("系统错误");
+		},
+		success : function(data) {
+			$.operate.saveSuccess(data);
+		}
+	});
+}
+
+
+/*菜单管理-修改-选择菜单树*/
+function selectMenuTree() {
+	var url =  rootPath+ "/SysRegionController/tree";
+	$.modal.open("选择菜单", url, '380', '380');
+}
+
+
+</script>
+
+
+</body>
+
+
+</html>

+ 148 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/edit.html

@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" 
+      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">
+
+<title th:text=${title}></title>
+<!-- 这儿引用单独的css link -->
+<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
+<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
+<!-- bootstrap-table表单样式 -->
+<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
+
+<!-- 用户界面自定义css -->
+<link th:href="@{/static/admin/user/css/user-add.css}" rel="stylesheet"/>
+<style type="text/css"></style>
+
+</head>
+
+<body>
+      	   	      	      	      	      	      	      	      	      
+<div class="content-wrap">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="nest" id="elementClose">
+				<div class="">
+				</div>
+				<div class="body-nest" id="element">
+					<div class="panel-body">
+						<form  class="form-horizontal m" id="form-edit" th:object="${SysRegion}">
+							<input id="id" name="id" type="hidden" th:field="*{id}"/>
+						
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">父级:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="hidden" id="parentId" name="parentId" th:value="*{parentId}"/>
+                                            <input class="form-control" type="hidden" id="pidName" name="pidName" th:value="${perSysRegion.regionName}"/>
+                                            <input class="form-control" type="hidden" id="parentIdcm" name="parentIdre" th:value="*{parentId}"/>
+											<input class="form-control" readonly="true" type="text" th:value="${perSysRegion.regionName}" id="parentnamere" onclick="selectMenuTree()" />
+										</div>
+									</div>
+
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">区域名称:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="text" id="regionName" name="regionName" th:value="*{regionName}"/>
+											
+										</div>
+									</div>
+
+
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">状态:</label>
+										<div class="col-sm-8">
+											<select class="form-control"  id="status" name="status" th:field="*{status}">
+													<option value="1">开启</option>
+													<option value="0">关闭</option>
+											</select>
+										</div>
+									</div>
+
+								
+									<div class="form-group">
+										<label class="col-sm-3 control-label ">排序:</label>
+										<div class="col-sm-8">
+											<input class="form-control" type="number" id="orderNum" name="orderNum" th:value="*{orderNum}"/>
+										</div>
+									</div>
+
+			
+									<div class="form-group">
+										<div class="form-control-static col-sm-offset-9">
+											<button type="submit" class="btn btn-primary">提交</button>
+											<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+										</div>
+									</div>
+						</form>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<!-- 通用js -->
+<div th:include="admin/common/html/js :: onload_js">
+   
+</div>
+<!-- bootstarp 表格 -->
+<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
+
+
+<!-- 弹窗 -->
+<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
+<!-- 遮罩层 -->
+<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
+<script type="text/javascript">
+$(function(){
+	 $(".MyDate").datetimepicker({
+		 	format: "yyyy-mm-dd hh:00:00",
+	        startDate: new Date(),
+	        autoclose: true,
+	        todayBtn: true,
+	        language: 'zh-CN',
+	        initialDate:new Date(),
+	        minView: 1      
+	    });
+	
+})
+
+
+$("#form-edit").validate({
+	submitHandler : function(form) {
+		edit();
+	}
+});
+
+/*菜单管理-修改-选择菜单树*/
+function selectMenuTree() {
+	var url = rootPath + "/SysRegionController/tree";
+	$.modal.open("选择菜单", url, '380', '380');
+}
+
+function edit() {
+	var dataFormJson = $("#form-edit").serialize();
+	$.ajax({
+		cache : true,
+		type : "POST",
+		url : rootPath + "/SysRegionController/edit",
+		data : dataFormJson,
+		async : false,
+		error : function(request) {
+			$.modal.alertError("系统错误");
+		},
+		success : function(data) {
+			$.operate.saveSuccess(data);
+		}
+	});
+}
+</script>
+
+</body>
+
+
+</html>

+ 314 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/list.html

@@ -0,0 +1,314 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" 
+      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="admin/common/html/head :: Head_Premiss(~{::title},~{::link},~{::style})">
+
+<title th:text=${title}></title>
+<!-- 这儿引用单独的css link -->
+<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
+<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
+
+<link rel="stylesheet" th:href="@{/static/js/bootstrap-treetable/bootstrap-treetable.min.css}">
+
+<style type="text/css">
+/**
+*这里写单独的css样式
+*/
+
+</style>
+
+</head>
+
+<body id="listbody">
+<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
+
+<!-- 右边内容 -->
+<div class="wrap-fluid">
+    <div class="container-fluid paper-wrap bevel tlbr">
+        <!-- 内容 -->
+        <!--标题 通用-->
+        <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
+        </div>
+        <!-- 结束标题 通用-->
+        <div class="content-wrap">
+            <!-- 结束内容 -->
+            <div class="row">
+                <div class="col-sm-12">
+                <!-- 搜索条件 -->
+                
+                	 <div class="nest" id="inlineClose">
+                            <div class="title-alt">
+                                <h6>搜索条件</h6>
+                                <div class="titleClose">
+                                    <a class="gone" href="#inlineClose">
+                                        <span class="entypo-cancel"></span>
+                                    </a>
+                                </div>
+                                <div class="titleToggle">
+                                    <a class="nav-toggle-alt" href="#search_div" >
+                                        <span class="entypo-down-open"></span>
+                                    </a>
+                                </div>
+                            </div>
+
+                            <div class="body-nest" id="search_div" style="display: none">
+                                <div class="form_left">
+                                    <form role="form" class="form-inline">
+                                        <div class="form-group">
+                                            <label for="exampleInputEmail2" class="sr-only">搜索名字</label>
+                                            <input type="text" name="searchText" placeholder="搜索名字"class="form-control">
+                                        </div>
+                                        <button onclick="$.table.search(this)" class="btn btn-success" type="button"><i class="fa fa-search"></i>&nbsp;搜索</button>
+                                    </form>
+                                </div>
+                            </div>
+                        </div>
+                	<!-- END搜索条件 -->
+                    <!-- 空白页开始-->
+                    <div class="nest" id="Blank_PageClose">
+                        <div class="title-alt">
+                            <h6>表单</h6>
+                            <div class="titleClose">
+                                <a class="gone" href="#Blank_PageClose">
+                                    <span class="entypo-cancel"></span>
+                                </a>
+                            </div>
+                            <div class="titleToggle">
+                                <a class="nav-toggle-alt" href="#Blank_Page_Content">
+                                    <span class="entypo-up-open"></span>
+                                </a>
+                            </div>
+                        </div>
+                        
+                        <div class="body-nest" id="Blank_Page_Content">
+                            <!-- 工具条 -->
+                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
+                            	<button onclick="add()" type="button" class="btn btn-primary">
+                                    <span class="entypo-plus-squared"></span>&nbsp;&nbsp;新增
+                                </button>
+                               <button onclick="batRemove()" type="button" class="btn btn-info">
+                                    <span class="entypo-trash"></span>&nbsp;&nbsp;删除
+                               </button>
+                               <button id="expandAllBtn"  type="button" class="btn btn-success">
+                                    <span class="entypo-shuffle"></span>&nbsp;&nbsp;展开/折叠
+                               </button>
+                               
+                           </div>
+                            <!-- 工具条 end-->
+                           <table id="demo" class="table-striped footable-res footable metro-blue" data-page-size="6">
+                                   
+                           </table>
+                        </div>
+                    </div>
+                </div>
+                <!-- 空白页结束 -->
+            </div>
+            <!-- 结束内容 -->
+        </div>
+    </div>
+</div>
+<!-- 结束右边内容 -->
+<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 END# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
+
+
+
+
+
+
+
+<!-- 右侧隐藏滑块内容 -->
+<div th:include="admin/common/html/rightHide :: rightHide">
+    
+</div>
+   <!-- END 右侧隐藏滑块内容-->
+
+<!-- 通用js -->
+<div th:include="admin/common/html/js :: onload_js_Premiss">
+   
+</div>
+<script th:src="@{/static/js/bootstrap-treetable/bootstrap-treetable.min.js}" type="text/javascript"></script>
+<script type="text/javascript">
+var dataUrl=window.rootPath+"/SysRegionController/list2";
+var removeUrl=window.rootPath+"/SysRegionController/remove";
+var createUrl=window.rootPath+"/SysRegionController/add";
+var updateUrl=window.rootPath+"/SysRegionController/edit/{id}";
+var exportUrl=window.rootPath+"/SysRegionController/export";
+
+
+var treeTable = $('#demo').bootstrapTreeTable({
+    toolbar: "#demo-toolbar",//顶部工具条
+    expandColumn : 3,// 在哪一列上面显示展开按钮
+    url: dataUrl,// 请求后台的URL(*)
+    type: 'post',
+    id : "id",
+    rootIdValue: '0',
+    parentId: 'parentId',
+    striped:true,
+    columns: [
+		{
+		    checkbox: true
+		},
+		{
+		    field: 'id',
+		    title: '序号',
+		    visible: true //隐藏
+		},
+		{
+		    field: 'parentId',
+		    visible: false, //隐藏
+		    title: '父id'
+		},
+		{
+		    field: 'regionName',
+		    title: '区域名称'
+		},
+		{
+		    field: 'status',
+		    title: '状态',
+		    formatter: function (value, row, index) {
+		        var actions = [];
+		        if(value==0){
+		        	 actions.push('<span class="label label-danger">关闭</span>');
+		        }else if(value==1){
+		        	 actions.push('<span class="label label-primary">开启</span>');
+		        }
+		      	return actions.join('');			    
+			}
+		},
+		{
+		    field: 'orderNum',
+		    title: '排序',
+		    sortable:true,//设置true为允许列可以排序
+			order: 'asc' //排序顺序
+		},
+		{
+		    title: '操作',
+		    formatter: function (value, row, index) {
+		        var id = row.id;
+		        var actions = [];
+		        if(row.id!=1){
+		        	actions.push('<a class="btn btn-success btn-xs"  href="#" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+			        actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+		        }
+		        return actions.join('');
+		    }
+		}
+    ],
+    onAll: function(data) {
+        console.log("onAll");
+        return false;
+    },
+    onLoadSuccess: function(data) {
+        console.log("onLoadSuccess");
+        return false;
+    },
+    onLoadError: function(status) {
+        console.log("onLoadError");
+        return false;
+    },
+    onClickCell: function(field, value, row, $element) {
+        console.log("onClickCell",row);
+        return false;
+    },
+    onDblClickCell: function(field, value, row, $element) {
+        console.log("onDblClickCell",row);
+        return false;
+    },
+    onClickRow: function(row, $element) {
+        console.log("onClickRow",row);
+        return false;
+    },
+    onDblClickRow: function(row, $element) {
+        console.log("onDblClickRow",row);
+        return false;
+    }
+   
+});
+$("#selectBtn").click(function(){
+    var selecteds = $('#demo').bootstrapTreeTable('getSelections');
+    $.each(selecteds,function(_i,_item){
+        console.log(_item);
+    });
+    alert("看console");
+})
+
+var _expandFlag_all = false;
+$("#expandAllBtn").click(function(){
+    if(_expandFlag_all){
+        $('#demo').bootstrapTreeTable('expandAll');
+    }else{
+        $('#demo').bootstrapTreeTable('collapseAll');
+    }
+    _expandFlag_all = _expandFlag_all?false:true;
+})
+var _showFlag = true;
+$("#showColumnBtn").click(function(){
+    if(_showFlag){
+        $('#demo').bootstrapTreeTable('hideColumn',"orderNum");
+    }else{
+        $('#demo').bootstrapTreeTable('showColumn',"orderNum");
+    }
+    _showFlag = _showFlag?false:true;
+})
+$("#destroyBtn").click(function(){
+    $('#demo').bootstrapTreeTable('destroy');
+})
+
+
+</script>
+<script type="text/javascript">
+
+function add(){
+	$.modal.open("添加区域", createUrl);
+}
+
+function batRemove(){
+	
+	var rows = $('#demo').bootstrapTreeTable('getSelections');
+    if (rows.length == 0) {
+        $.modal.alertWarning("请至少选择一条记录");
+        return
+    }
+    $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
+    	var rowid=[];
+    	for ( var i in rows) {
+    		rowid.push(rows[i].id);
+		}
+        var url = removeUrl;
+        var data = {
+            "ids": rowid.join()
+        };
+        $.operate.submit(url, "post", "json", data);
+    })
+}
+
+function edit(id){
+	 var url = updateUrl.replace("{id}", id);
+     $.modal.open("修改区域", url);
+}
+
+function remove(id){
+	
+	$.modal.confirm("确定删除该条区域信息吗?", function() {
+        var url = removeUrl.replace("{id}", id);
+        var data = {
+            "ids": id
+        };
+        $.operate.submit(url, "post", "json", data);
+    })
+}
+
+
+//重写刷新方法
+$.table.refresh=function() {
+	$('#demo').bootstrapTreeTable("refresh",{
+		url:dataUrl,
+		silent:true
+	});
+}
+</script>
+
+</body>
+
+
+</html>

+ 192 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/tree.html

@@ -0,0 +1,192 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" 
+      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">
+<title th:text=${title}></title>
+<!-- 这儿引用单独的css link -->
+<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
+<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
+<!-- treeview -->
+<link th:href="@{/static/admin/assets/js/bootstrap/bootstrap-treeview/css/bootstrap-treeview.css}" rel="stylesheet"/>
+
+<style type="text/css">
+.content-wrap {
+     padding: 0px;
+}
+body {
+	 color: #9ea7b3;
+    font-family: "Open Sans", Arial, sans-serif!important;
+    font-size: 13px!important;
+    line-height: 20px;
+    overflow-x: hidden!important;
+    min-height: 100%;
+    z-index: -2;
+    margin: 0px !important;
+    background: url() no-repeat top center fixed;
+    -moz-background-size: cover;
+    -webkit-background-size: cover;
+    -o-background-size: cover;
+    background-size: cover;
+}
+label.error {
+    position: absolute;
+    right: 18px;
+    top: 5px;
+    color: #ef392b;
+    font-size: 12px;
+}
+</style>
+
+</head>
+<body>
+
+<div id="fcapp" class="content-wrap">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="nest" id="elementClose">
+				<div class="">
+				</div>
+				<div class="body-nest" id="element">
+					<div class="panel-body">
+						<form  class="form-horizontal m" id="form-add">
+							<div class="form-group">
+								<div class="col-sm-8">
+									<div id="tree"></div> 
+								</div>
+							</div>
+							<div class="form-group">
+								<div class="form-control-static col-sm-offset-9">
+									<button type="submit" class="btn btn-primary">提交</button>
+									<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+								</div>
+							</div>
+						</form>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<!-- 通用js -->
+<div th:include="admin/common/html/js :: onload_js"></div>
+<!-- 弹窗 -->
+<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
+<!-- 遮罩层 -->
+<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
+<!--bootstarp threeView -->
+<script th:src="@{/static/admin/assets/js/bootstrap/bootstrap-treeview/js/bootstrap-treeview.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
+
+
+<script type="text/javascript">
+
+//添加方法
+function add() {
+	var dataFormJson=$("#form-add").serialize();
+	$.ajax({
+		cache : true,
+		type : "POST",
+		url : rootPath + "/SysRegionController/add",
+		data :dataFormJson,
+		async : false,
+		error : function(request) {
+			$.modal.alertError("系统错误");
+		},
+		success : function(data) {
+			$.operate.saveSuccess(data);
+		}
+	});
+}
+
+
+/***权限配置***/
+
+function getTree() {
+	var tree = [];
+	$.ajax({
+		url: rootPath + "/SysRegionController/tree/0",
+		type:"post",
+		async : false,
+		cache : true,
+		error : function(request) {
+			$.modal.alertError("系统错误");
+		},
+		success : function(data) {
+			if(!$.common.isEmpty(data)&&data.code==200){
+				tree.push(data.data);
+			}
+		}
+		
+		
+	})
+    return tree;
+}
+
+
+//赋值给父菜单
+function loadObj(data){
+	var treeId = data.id;
+	var treeName = data.text;
+	
+	if(treeId != "1") {
+		parent.$("#parentId").val(treeId);
+		parent.$("#pidName").val(treeName);
+        parent.$("#parentIdre").val(treeId);
+        parent.$("#parentnamere").val(treeName);
+		var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+		parent.layer.close(index);
+	}
+	else {
+		$.modal.alertError("主菜单不能选择");
+	}
+	
+	
+
+}
+
+
+
+$(function() {
+	
+	$('#tree').treeview({
+		levels : 3,////设置初始化展开几级菜单 默认为2
+		//showCheckbox : 1,//这里之所以写1,是因为我引得js源码里定义1为true  checkbox
+		//multiSelect : 1,//这里之所以写1,是因为我引得js源码里定义1为true  多选
+		data : getTree(),
+		color : "#000000",//设置字体加载颜色
+		backColor : "#FFFFFF",//设置背景颜色
+		selectedColor : "#428bca",//设置选中的字体颜色
+		 highlightSelected:true,     //是否选中高亮显示
+		 onhoverColor: "#FF00FF",    //鼠标滑过的颜色
+		 showBorder:true,//是否显示边框
+		onNodeSelected : function(event, data) {//选中节点
+			// 事件代码...
+			console.log(data.id);
+			loadObj(data);
+		},
+		onNodeChecked : function(event, node) { //选中节点 
+			
+		},
+		nodeSelected (event, node){
+		},
+		nodeChecked (event, node){//一个节点被checkedc
+		},
+		onNodeUnchecked : function(event, node) { //取消选中节点  
+		}
+
+	});
+
+})
+
+
+
+
+
+</script>
+
+
+</body>
+
+
+</html>

+ 288 - 0
web/monitor-web-sxjn/src/main/resources/templates/admin/sysRegion/tree2.html

@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org"
+      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">
+    <title th:text=${title}></title>
+    <!-- 这儿引用单独的css link -->
+    <!-- Ladda for Bootstrap 3按钮加载进度插件 -->
+    <link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
+    <!-- treeview -->
+    <link th:href="@{/static/admin/assets/js/bootstrap/bootstrap-treeview/css/bootstrap-treeview.css}" rel="stylesheet"/>
+
+    <style type="text/css">
+        .content-wrap {
+            padding: 0px;
+        }
+        body {
+            color: #9ea7b3;
+            font-family: "Open Sans", Arial, sans-serif!important;
+            font-size: 13px!important;
+            line-height: 20px;
+            overflow-x: hidden!important;
+            min-height: 100%;
+            z-index: -2;
+            margin: 0px !important;
+            background: url() no-repeat top center fixed;
+            -moz-background-size: cover;
+            -webkit-background-size: cover;
+            -o-background-size: cover;
+            background-size: cover;
+        }
+        label.error {
+            position: absolute;
+            right: 18px;
+            top: 5px;
+            color: #ef392b;
+            font-size: 12px;
+        }
+    </style>
+
+</head>
+<body>
+
+<div id="fcapp" class="content-wrap">
+    <div class="row">
+        <div class="col-sm-12">
+            <div class="nest" id="elementClose">
+                <div class="">
+                </div>
+                <div class="body-nest" id="element">
+                    <div class="panel-body">
+                        <form  class="form-horizontal m" id="form-add">
+                            <div class="form-group">
+                                <div class="col-sm-8">
+                                    <div id="tree"></div>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="form-control-static col-sm-offset-9">
+                                    <button type="button" class="btn btn-primary" onclick="$.modal.close()">提交</button>
+                                    <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- 通用js -->
+<div th:include="admin/common/html/js :: onload_js"></div>
+<!-- 弹窗 -->
+<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
+<!-- 遮罩层 -->
+<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
+<!--bootstarp threeView -->
+<script th:src="@{/static/admin/assets/js/bootstrap/bootstrap-treeview/js/bootstrap-treeview.js}" type="text/javascript"></script>
+<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
+
+
+<script type="text/javascript">
+
+    //添加方法
+    function add() {
+        var dataFormJson=$("#form-add").serialize();
+        $.ajax({
+            cache : true,
+            type : "POST",
+            url : rootPath + "/SysCompanyController/add",
+            data :dataFormJson,
+            async : false,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                $.operate.saveSuccess(data);
+            }
+        });
+    }
+
+
+    /***权限配置***/
+
+    function getTree() {
+        var tree = [];
+        $.ajax({
+            url: rootPath + "/SysCompanyController/tree/0",
+            type:"post",
+            async : false,
+            cache : true,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                if(!$.common.isEmpty(data)&&data.code==200){
+                    tree.push(data.data);
+                }
+            }
+
+
+        })
+        return tree;
+    }
+
+
+    //赋值给父菜单
+    // function loadObj(data){
+    // 	var treeId = data.id;
+    // 	var treeName = data.text;
+    //
+    // 	if(treeId != "1") {
+    // 		parent.$("#parentId").val(treeId);
+    // 		parent.$("#pidName").val(treeName);
+    //         parent.$("#parentIdcm").val(treeId);
+    //         parent.$("#parentnamecm").val(treeName);
+    // 		var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+    // 		parent.layer.close(index);
+    // 	}
+    // 	else {
+    // 		$.modal.alertError("主菜单不能选择");
+    // 	}
+    //
+    //
+    //
+    // }
+
+    var str1 =parent.$("#parentId").val();
+    var str2 =parent.$("#pidName").val();
+
+    $(function() {
+
+        $('#tree').treeview({
+            levels : 3,////设置初始化展开几级菜单 默认为2
+            showCheckbox : 1,//这里之所以写1,是因为我引得js源码里定义1为true  checkbox
+            multiSelect : 1,//这里之所以写1,是因为我引得js源码里定义1为true  多选
+            data : getTree(),
+            color : "#000000",//设置字体加载颜色
+            backColor : "#FFFFFF",//设置背景颜色
+            selectedColor : "#428bca",//设置选中的字体颜色
+            highlightSelected:true,     //是否选中高亮显示
+            onhoverColor: "#FF00FF",    //鼠标滑过的颜色
+            showBorder:true,//是否显示边框
+            onNodeChecked(event, node){
+
+                if(node.id != "1") {
+
+                    if (str1.length > 0) {
+
+                        str1 = str1 + node.id + ',';
+                        str2 = str2 + node.text + ',';
+
+                    } else {
+                        str1 = node.id + ',';
+                        str2 = node.text + ',';
+                    }
+                    parent.$("#parentId").val(str1);
+                    parent.$("#pidName").val(str2);
+
+                }else {
+                    $.modal.alertError("主菜单不能选择");
+                   }
+            },
+            onNodeUnchecked(event, node){
+
+                parent.$("#parentId").val(str1.replace(node.text + ",", ""));
+
+                parent.$("#pidName").val(str2.replace(node.text + ",", ""));
+            },
+
+            nodeSelected (event, node){
+
+
+            },
+            nodeChecked (event, node){//一个节点被checkedc
+            },
+            onNodeUnchecked : function(event, node) { //取消选中节点
+            }
+
+        });
+
+    })
+
+
+
+    var nodeCheckedSilent = false;
+    function nodeChecked (event, node){
+        if(nodeCheckedSilent){
+            return;
+        }
+        nodeCheckedSilent = true;
+        checkAllParent(node);
+        checkAllSon(node);
+        nodeCheckedSilent = false;
+
+
+    }
+
+    var nodeUncheckedSilent = false;
+    function nodeUnchecked  (event, node){
+        if(nodeUncheckedSilent)
+            return;
+        nodeUncheckedSilent = true;
+        uncheckAllParent(node);
+        uncheckAllSon(node);
+        parent.$("#parentId").val(str1.replace(node.text + ",", ""));
+
+        parent.$("#pidName").val(str2.replace(node.text + ",", ""));
+        nodeUncheckedSilent = false;
+    }
+
+    //选中全部父节点
+    function checkAllParent(node){
+        $('#searchTree').treeview('checkNode',node.nodeId,{silent:true});
+        var parentNode = $('#searchTree').treeview('getParent',node.nodeId);
+        if(!("nodeId" in parentNode)){
+            return;
+        }else{
+            checkAllParent(parentNode);
+        }
+    }
+    //取消全部父节点
+    function uncheckAllParent(node){
+        $('#searchTree').treeview('uncheckNode',node.nodeId,{silent:true});
+        var siblings = $('#searchTree').treeview('getSiblings', node.nodeId);
+        var parentNode = $('#searchTree').treeview('getParent',node.nodeId);
+        if(!("nodeId" in parentNode)) {
+            return;
+        }
+        var isAllUnchecked = true;  //是否全部没选中
+        for(var i in siblings){
+            if(siblings[i].state.checked){
+                isAllUnchecked=false;
+                break;
+            }
+        }
+        if(isAllUnchecked){
+            uncheckAllParent(parentNode);
+        }
+
+    }
+
+    //级联选中所有子节点
+    function checkAllSon(node){
+        $('#searchTree').treeview('checkNode',node.nodeId,{silent:true});
+        if(node.nodes!=null&&node.nodes.length>0){
+            for(var i in node.nodes){
+                checkAllSon(node.nodes[i]);
+            }
+        }
+    }
+    //级联取消所有子节点
+    function uncheckAllSon(node){
+        $('#searchTree').treeview('uncheckNode',node.nodeId,{silent:true});
+        if(node.nodes!=null&&node.nodes.length>0){
+            for(var i in node.nodes){
+                uncheckAllSon(node.nodes[i]);
+            }
+        }
+    }
+
+</script>
+
+
+</body>
+
+
+</html>

+ 15 - 2
web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/add.html

@@ -56,8 +56,10 @@
                                 <label class="col-sm-3 control-label ">场站设置:</label>
                                 <div class="col-sm-8">
 
-                                    <div class="">
-
+                                    <div >
+                                        <div  >
+                                            <input id="selAll" class="sqcheckbox"    type="checkbox" th:text="全选">
+                                        </div>
                                         <table border="0" th:with="colSize=${4}, rowSize=${wpls.size()/colSize}, rowSize=${(wpls.size()%colSize==0 ? rowSize : (rowSize+1))}">
                                             <!--遍历行数,rowIdx为行号,每一行是一个tr标签对 -->
                                             <tr th:if="${wpls.size() gt 0}" th:each="rowIdx:${#numbers.sequence(1, rowSize)}">
@@ -151,6 +153,17 @@ function selectCompanyMenuTree() {
     var url =  rootPath+ "/SysCompanyController/tree";
     $.modal.open("选择菜单", url, '380', '380');
 }
+
+// 全选按钮(获取全选按钮的checked值,将此值赋给下面所有CheckBox)
+$("#selAll").on("click", function(){
+    var che=$("#selAll").prop('checked');
+    if(che){
+        $("input[name='wpls']").prop('checked',true);
+    } else {
+        $("input[name='wpls']").prop('checked',false);
+    }
+})
+
 </script>
 
 </body>

+ 14 - 2
web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/edit.html

@@ -54,8 +54,10 @@
                                 <label class="col-sm-3 control-label ">场站设置:</label>
                                 <div class="col-sm-8">
 
-                                    <div class="">
-
+                                    <div >
+                                        <div  >
+                                            <input id="selAll" class="sqcheckbox"    type="checkbox" th:text="全选">
+                                        </div>
                                         <table border="0" th:with="colSize=${4}, rowSize=${wpls.size()/colSize}, rowSize=${(wpls.size()%colSize==0 ? rowSize : (rowSize+1))}">
                                             <!--遍历行数,rowIdx为行号,每一行是一个tr标签对 -->
                                             <tr th:if="${wpls.size() gt 0}" th:each="rowIdx:${#numbers.sequence(1, rowSize)}">
@@ -144,6 +146,16 @@ function selectCompanyMenuTree() {
     var url =  rootPath+ "/SysCompanyController/tree";
     $.modal.open("选择菜单", url, '380', '380');
 }
+
+// 全选按钮(获取全选按钮的checked值,将此值赋给下面所有CheckBox)
+$("#selAll").on("click", function(){
+    var che=$("#selAll").prop('checked');
+    if(che){
+        $("input[name='wpls']").prop('checked',true);
+    } else {
+        $("input[name='wpls']").prop('checked',false);
+    }
+})
 </script>
 
 </body>

+ 2 - 2
web/monitor-web-sxjn/src/main/resources/templates/admin/uservue/list.html

@@ -164,8 +164,8 @@ var exportUrl=window.rootPath+"/UserVueController/export";
 			    title: '账号'
 			},
            {
-               field: 'comName',
-               title: '公司名称'
+               field: 'wpName',
+               title: '场站名称'
            },
 			{
 			    field: 'depName',