Bläddra i källkod

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

wujunjie 7 år sedan
förälder
incheckning
fb901f7bde
100 ändrade filer med 2608 tillägg och 238 borttagningar
  1. 3 3
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheAuthorization.java
  2. 2 0
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheCategory.java
  3. 3 3
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheKeyRule.java
  4. 3 3
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqChannel.java
  5. 3 3
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqPublisher.java
  6. 3 3
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqSubscriber.java
  7. 7 5
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheAuthorizationEndPoint.java
  8. 2 2
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheCategoryEndPoint.java
  9. 1 1
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheKeyRuleEndPoint.java
  10. 4 4
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheStatisticsEndPoint.java
  11. 14 2
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisIndexController.java
  12. 1 1
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqChannelEndPoint.java
  13. 1 1
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqPublisherEndPoint.java
  14. 32 19
      patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqSubscriberEndPoint.java
  15. 0 0
      patient-co-manage/redis-cache/src/main/resources/system.properties
  16. 1 0
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/head/page_foot.jsp
  17. 79 76
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/detailJs.jsp
  18. 1 1
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/list.jsp
  19. 107 102
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/listJs.jsp
  20. 6 4
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/category/listJs.jsp
  21. 12 2
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/keyRule/detail.jsp
  22. 12 1
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/keyRule/list.jsp
  23. 2 2
      patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/mq/channel/listJs.jsp
  24. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/bar.js
  25. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/chord.js
  26. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/eventRiver.js
  27. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/force.js
  28. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/funnel.js
  29. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/gauge.js
  30. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/heatmap.js
  31. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/k.js
  32. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/line.js
  33. 13 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/map.js
  34. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/pie.js
  35. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/radar.js
  36. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/scatter.js
  37. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/tree.js
  38. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/treemap.js
  39. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/venn.js
  40. 2 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/wordCloud.js
  41. 35 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/echarts-all.js
  42. 20 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/echarts.js
  43. 79 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/accMath.js
  44. 40 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/coordinates.js
  45. 162 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/date.js
  46. 624 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecAnimation.js
  47. 115 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecData.js
  48. 444 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecEffect.js
  49. 81 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecQuery.js
  50. 48 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/kwargs.js
  51. 9 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoCoord.js
  52. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/an_hui_geo.js
  53. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ao_men_geo.js
  54. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/bei_jing_geo.js
  55. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/china_geo.js
  56. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/chong_qing_geo.js
  57. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/fu_jian_geo.js
  58. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/gan_su_geo.js
  59. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/guang_dong_geo.js
  60. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/guang_xi_geo.js
  61. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/gui_zhou_geo.js
  62. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hai_nan_geo.js
  63. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/he_bei_geo.js
  64. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/he_nan_geo.js
  65. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hei_long_jiang_geo.js
  66. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hu_bei_geo.js
  67. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hu_nan_geo.js
  68. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ji_lin_geo.js
  69. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/jiang_su_geo.js
  70. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/jiang_xi_geo.js
  71. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/liao_ning_geo.js
  72. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/nei_meng_gu_geo.js
  73. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ning_xia_geo.js
  74. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/qing_hai_geo.js
  75. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_dong_geo.js
  76. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_xi_1_geo.js
  77. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_xi_2_geo.js
  78. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shang_hai_geo.js
  79. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/si_chuan_geo.js
  80. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/tai_wan_geo.js
  81. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/tian_jin_geo.js
  82. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/world_geo.js
  83. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xi_zang_geo.js
  84. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xiang_gang_geo.js
  85. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xin_jiang_geo.js
  86. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/yun_nan_geo.js
  87. 3 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/zhe_jiang_geo.js
  88. 408 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/params.js
  89. 96 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/encode.js
  90. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/an_hui_geo.json
  91. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/ao_men_geo.json
  92. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/bei_jing_geo.json
  93. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/china_city.json
  94. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/china_geo.json
  95. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/chong_qing_geo.json
  96. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/fu_jian_geo.json
  97. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/gan_su_geo.json
  98. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/guang_dong_geo.json
  99. 1 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/guang_xi_geo.json
  100. 0 0
      patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/gui_zhou_geo.json

+ 3 - 3
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheAuthorization.java

@ -14,7 +14,7 @@ import java.util.Date;
 */
public class MRedisCacheAuthorization implements Serializable{
    public Integer id; // 主键
    public Long id; // 主键
    private String categoryCode; // 缓存分类编码
    private String appId; // 应用ID
    private String authorizedCode; // 授权码
@ -31,11 +31,11 @@ public class MRedisCacheAuthorization implements Serializable{
        this.categoryCode = categoryCode;
    }
    public Integer getId() {
    public Long getId() {
        return id;
    }
    public void setId(Integer id) {
    public void setId(Long id) {
        this.id = id;
    }

+ 2 - 0
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheCategory.java

@ -23,6 +23,8 @@ public class MRedisCacheCategory implements Serializable{
    private Date modifyDate; // 修改时间
    private String modifier; // 修改者
    public Long getId() {
        return id;
    }

+ 3 - 3
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisCacheKeyRule.java

@ -14,7 +14,7 @@ import java.util.Date;
 */
public class MRedisCacheKeyRule implements Serializable{
    public Integer id; // 主键
    public Long id; // 主键
    private String name; // 规则名称
    private String code; // 规则编码
    private String categoryCode; // 缓存分类编码
@ -27,11 +27,11 @@ public class MRedisCacheKeyRule implements Serializable{
    private String modifier; // 修改者
    private String categoryName; // 缓存分类名称
    public Integer getId() {
    public Long getId() {
        return id;
    }
    public void setId(Integer id) {
    public void setId(Long id) {
        this.id = id;
    }

+ 3 - 3
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqChannel.java

@ -14,7 +14,7 @@ import java.util.Date;
 */
public class MRedisMqChannel implements Serializable{
    public Integer id; // 主键
    public Long id; // 主键
    public String channel; // 消息队列编码
    public String channelName; // 消息队列名称
    public String messageTemplate; // 消息模版
@ -28,11 +28,11 @@ public class MRedisMqChannel implements Serializable{
    public String subscriberNum; // 订阅者数
    public String publisherNum; // 发布者数
    public Integer getId() {
    public Long getId() {
        return id;
    }
    public void setId(Integer id) {
    public void setId(Long id) {
        this.id = id;
    }

+ 3 - 3
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqPublisher.java

@ -14,7 +14,7 @@ import java.util.Date;
 */
public class MRedisMqPublisher implements Serializable {
    public Integer id; // 主键
    public Long id; // 主键
    public String appId; // 应用ID
    public String authorizedCode; // 授权码
    public String channel; // 消息队列编码
@ -31,11 +31,11 @@ public class MRedisMqPublisher implements Serializable {
        this.channel = channel;
    }
    public Integer getId() {
    public Long getId() {
        return id;
    }
    public void setId(Integer id) {
    public void setId(Long id) {
        this.id = id;
    }

+ 3 - 3
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/common/vo/MRedisMqSubscriber.java

@ -14,7 +14,7 @@ import java.util.Date;
 */
public class MRedisMqSubscriber implements Serializable {
    public Integer id; // 主键
    public Long id; // 主键
    public String appId; // 应用ID
    public String subscribedUrl; // 订阅者服务地址
    public String channel; // 消息队列编码
@ -31,11 +31,11 @@ public class MRedisMqSubscriber implements Serializable {
        this.channel = channel;
    }
    public Integer getId() {
    public Long getId() {
        return id;
    }
    public void setId(Integer id) {
    public void setId(Long id) {
        this.id = id;
    }

+ 7 - 5
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheAuthorizationEndPoint.java

@ -5,7 +5,6 @@ import com.yihu.wlyy.common.constants.ApiVersion;
import com.yihu.wlyy.common.constants.ServiceApi;
import com.yihu.wlyy.common.controller.EnvelopRestEndPoint;
import com.yihu.wlyy.common.vo.MRedisCacheAuthorization;
import com.yihu.wlyy.common.vo.MRedisCacheCategory;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.redis.RedisCacheAuthorization;
import com.yihu.wlyy.service.redis.cache.RedisCacheAuthorizationService;
@ -17,7 +16,10 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.Date;
@ -39,13 +41,13 @@ public class RedisCacheAuthorizationEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("根据ID获取缓存授权")
    @RequestMapping(value = ServiceApi.Redis.CacheAuthorization.GetById, method = RequestMethod.GET)
    public String getById(Model model, Long id) {
    public String getById(Model model, Long id,String categoryCode) {
        try {
            if(id!=null){
                MRedisCacheAuthorization mRedisCacheAuthorization = convertToModel(redisCacheAuthorizationService.getById(id), MRedisCacheAuthorization.class);
                model.addAttribute("detailModel", toJson(mRedisCacheAuthorization));
            }else {
                Object detailModel = new MRedisCacheCategory();
                Object detailModel = new MRedisCacheAuthorization(categoryCode);
                model.addAttribute("detailModel", toJson(detailModel));
            }
        } catch (Exception e) {
@ -142,7 +144,7 @@ public class RedisCacheAuthorizationEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("删除缓存授权")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.CacheAuthorization.Delete, method = RequestMethod.DELETE)
    @RequestMapping(value = ServiceApi.Redis.CacheAuthorization.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "缓存授权ID", required = true)
            @RequestParam(value = "id") Long id) {

+ 2 - 2
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheCategoryEndPoint.java

@ -164,10 +164,10 @@ public class RedisCacheCategoryEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("删除缓存分类")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.CacheCategory.Delete, method = RequestMethod.DELETE)
    @RequestMapping(value = ServiceApi.Redis.CacheCategory.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "缓存分类ID", required = true)
            @RequestParam(value = "id") Integer id) {
            @RequestParam(value = "id") Long id) {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);
        try {

+ 1 - 1
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheKeyRuleEndPoint.java

@ -129,7 +129,7 @@ public class RedisCacheKeyRuleEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("删除缓存Key规则")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.CacheKeyRule.Delete, method = RequestMethod.DELETE)
    @RequestMapping(value = ServiceApi.Redis.CacheKeyRule.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "缓存Key规则ID", required = true)
            @RequestParam(value = "id") Integer id) {

+ 4 - 4
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisCacheStatisticsEndPoint.java

@ -16,9 +16,9 @@ import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
@ -32,7 +32,7 @@ import java.util.Map;
 * @author 张进军
 * @date 2017/11/30 17:07
 */
@Controller
@RestController
@RequestMapping(value = ApiVersion.Version1_0)
@Api(description = "缓存统计接口", tags = {"缓存服务管理--缓存统计接口"})
public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
@ -45,7 +45,7 @@ public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
    private RedisTemplate<String, Object> redisTemplate;
    @ApiOperation("统计缓存分类的缓存数量")
    @RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryKeys, method = RequestMethod.GET)
    @RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryKeys, method = RequestMethod.POST)
    public Envelop getCategoryKeys() {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);
@ -73,7 +73,7 @@ public class RedisCacheStatisticsEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("统计缓存分类的缓存内存比率(近似值,比实际略小)")
    @RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryMemory, method = RequestMethod.GET)
    @RequestMapping(value = ServiceApi.Redis.CacheStatistics.GetCategoryMemory, method = RequestMethod.POST)
    public Envelop getCategoryMemory() {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);

+ 14 - 2
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisIndexController.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.controller.redis;
import com.yihu.wlyy.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -17,6 +18,16 @@ public class RedisIndexController extends BaseController {
        return "redis/mq/channel/list";
    }
    @RequestMapping(value = "pub", method = RequestMethod.GET)
    public String pub(){
        return "redis/mq/publisher/list";
    }
    @RequestMapping(value = "sub", method = RequestMethod.GET)
    public String sub(){
        return "redis/mq/sublisher/list";
    }
    @RequestMapping(value = "cacheCategory", method = RequestMethod.GET)
    public String cacheCategory(){
        return "redis/cache/category/list";
@ -28,8 +39,9 @@ public class RedisIndexController extends BaseController {
    }
    @RequestMapping(value = "authorization/index", method = RequestMethod.GET)
    public String authorization_index(){
        return "redis/cache/keyRule/list";
    public String authorization_index(Model model,String categoryCode){
        model.addAttribute("categoryCode", categoryCode);
        return "/redis/cache/authorization/list";
    }
}

+ 1 - 1
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqChannelEndPoint.java

@ -161,7 +161,7 @@ public class RedisMqChannelEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("删除消息队列")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqChannel.Delete, method = RequestMethod.DELETE)
    @RequestMapping(value = ServiceApi.Redis.MqChannel.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "消息队列ID", required = true)
            @RequestParam(value = "id") Long id) {

+ 1 - 1
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqPublisherEndPoint.java

@ -135,7 +135,7 @@ public class RedisMqPublisherEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("删除消息发布者")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqPublisher.Delete, method = RequestMethod.DELETE)
    @RequestMapping(value = ServiceApi.Redis.MqPublisher.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "消息发布者ID", required = true)
            @RequestParam(value = "id") Integer id) {

+ 32 - 19
patient-co-manage/redis-cache/src/main/java/com/yihu/wlyy/controller/redis/RedisMqSubscriberEndPoint.java

@ -4,7 +4,9 @@ package com.yihu.wlyy.controller.redis;
import com.yihu.wlyy.common.constants.ApiVersion;
import com.yihu.wlyy.common.constants.ServiceApi;
import com.yihu.wlyy.common.controller.EnvelopRestEndPoint;
import com.yihu.wlyy.common.vo.MRedisCacheCategory;
import com.yihu.wlyy.common.vo.MRedisMqSubscriber;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.redis.RedisMqSubscriber;
import com.yihu.wlyy.service.redis.pubsub.RedisMqChannelService;
import com.yihu.wlyy.service.redis.pubsub.RedisMqSubscriberService;
@ -19,6 +21,7 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -41,22 +44,23 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    @ApiOperation("根据ID获取消息订阅者")
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.GetById, method = RequestMethod.GET)
    public Envelop getById(Model model, Long id) {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);
    public String getById(Model model, Long id) {
        try {
            MRedisMqSubscriber mRedisMqSubscriber = convertToModel(redisMqSubscriberService.getById(id), MRedisMqSubscriber.class);
            envelop.setObj(mRedisMqSubscriber);
            envelop.setSuccessFlg(true);
            envelop.setErrorMsg("成功获取消息订阅者。");
            if(id!=null){
                MRedisMqSubscriber mRedisMqSubscriber = convertToModel(redisMqSubscriberService.getById(id), MRedisMqSubscriber.class);
                model.addAttribute("detailModel", toJson(mRedisMqSubscriber));
            }else {
                Object detailModel = new MRedisCacheCategory();
                model.addAttribute("detailModel", toJson(detailModel));
            }
        } catch (Exception e) {
            e.printStackTrace();
            envelop.setErrorMsg("获取消息订阅者发生异常:" + e.getMessage());
        }
        return envelop;
        return "/redis/mq/subscriber/detail";
    }
    @ApiOperation(value = "根据条件获取消息订阅者")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Search, method = RequestMethod.GET)
    public Envelop search(
            @ApiParam(name = "fields", value = "返回的字段,为空则返回全部字段")
@ -86,14 +90,18 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("新增消息订阅者")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Save, method = RequestMethod.POST)
    public Envelop add(
            @ApiParam(value = "消息订阅者JSON", required = true)
            @RequestBody String entityJson) {
    public Envelop add(String data) {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);
        try {
            RedisMqSubscriber newEntity = objectMapper.readValue(entityJson, RedisMqSubscriber.class);
            RedisMqSubscriber newEntity = objectMapper.readValue(data, RedisMqSubscriber.class);
            User currentUser = (User) request.getSession().getAttribute("current_user");
            newEntity.setCreator(currentUser.getCode());
            newEntity.setCreateDate(new Date());
            newEntity.setModifyDate(new Date());
            newEntity.setModifier(currentUser.getCode());
            newEntity = redisMqSubscriberService.save(newEntity);
            MRedisMqSubscriber mRedisMqSubscriber = convertToModel(newEntity, MRedisMqSubscriber.class);
@ -108,14 +116,16 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("更新消息订阅者")
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Save, method = RequestMethod.PUT)
    public Envelop update(
            @ApiParam(value = "消息订阅者JSON", required = true)
            @RequestBody String entityJson) {
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Update, method = RequestMethod.POST)
    public Envelop update(String data) {
        Envelop envelop = new Envelop();
        envelop.setSuccessFlg(false);
        try {
            RedisMqSubscriber updateEntity = objectMapper.readValue(entityJson, RedisMqSubscriber.class);
            RedisMqSubscriber updateEntity = objectMapper.readValue(data, RedisMqSubscriber.class);
            User currentUser = (User) request.getSession().getAttribute("current_user");
            updateEntity.setModifyDate(new Date());
            updateEntity.setModifier(currentUser.getCode());
            updateEntity = redisMqSubscriberService.save(updateEntity);
            MRedisMqSubscriber mRedisMqSubscriber = convertToModel(updateEntity, MRedisMqSubscriber.class);
@ -130,7 +140,8 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("删除消息订阅者")
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Delete, method = RequestMethod.DELETE)
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.Delete, method = RequestMethod.POST)
    public Envelop delete(
            @ApiParam(name = "id", value = "消息订阅者ID", required = true)
            @RequestParam(value = "id") Integer id) {
@ -149,6 +160,7 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("验证指定消息队列中订阅者应用ID是否唯一")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.IsUniqueAppId, method = RequestMethod.GET)
    public Envelop isUniqueAppId(
            @ApiParam(name = "id", value = "消息订阅者ID", required = true)
@ -173,6 +185,7 @@ public class RedisMqSubscriberEndPoint extends EnvelopRestEndPoint {
    }
    @ApiOperation("验证指定消息队列中订阅者服务地址是否唯一")
    @ResponseBody
    @RequestMapping(value = ServiceApi.Redis.MqSubscriber.IsUniqueSubscribedUrl, method = RequestMethod.GET)
    public Envelop isUniqueSubscribedUrl(
            @ApiParam(name = "id", value = "消息订阅者ID", required = true)

+ 0 - 0
patient-co-manage/redis-cache/src/main/resources/system.properties


+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/head/page_foot.jsp

@ -78,6 +78,7 @@
<script src="${ctx}/static/js/until/global.js"></script>
<script src='${ctx}/static/jquery/jquery-ui.js' type='text/javascript'></script>
<script src="${ctx}/static/develop/lib/plugin/echarts/2.2.7/js/echarts-all.js"></script>
<script>
    (function ($, win) {

+ 79 - 76
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/detailJs.jsp

@ -2,94 +2,97 @@
<script>
    var detailModel = ${detailModel};
    var dataModel = $.DataModel.init();
    var validator;
    var $form = $("#redisCacheAuthorizationForm");
(function ($, win) {
    $(function () {
        init();
    });
    function init() {
        validator = customFormValidator();
        initForm();
        bindEvents();
    }
        var detailModel = ${detailModel};
        var dataModel = $.DataModel.init();
        var validator;
        var $form = $("#redisCacheAuthorizationForm");
    function initForm() {
        $('#categoryCode').ligerTextBox({width: 240, disabled: true, readonly: true});
        var appIdTb = $('#appId').ligerTextBox({width: 240});
        $('#authorizedCode').ligerTextBox({width: 240, disabled: true, readonly: true});
        $('#remark').ligerTextBox({width: 240, height: 150});
        $(function () {
            init();
        });
        if(detailModel.id) {
            appIdTb.setDisabled(true);
            appIdTb.setReadonly(true);
        function init() {
            validator = customFormValidator();
            initForm();
            bindEvents();
        }
        $form.attrScan();
        $form.Fields.fillValues(detailModel);
    }
    function bindEvents() {
        // 保存
        $('#btnSave').click(function () {
            if (!validator.validate()) { return; }
        function initForm() {
            $('#categoryCode').ligerTextBox({width: 240, disabled: true, readonly: true});
            var appIdTb = $('#appId').ligerTextBox({width: 240});
            $('#authorizedCode').ligerTextBox({width: 240, disabled: true, readonly: true});
            $('#remark').ligerTextBox({width: 240, height: 150});
            var loading = $.ligerDialog.waitting("正在保存数据...");
            var uri = "save";
            if(detailModel.id!=null&&detailModel.id!=-1){
                uri = "update"
            if(detailModel.id) {
                appIdTb.setDisabled(true);
                appIdTb.setReadonly(true);
            }
            dataModel.fetchRemote("${contextRoot}/redis/cache/authorization/"+uri, {
                type: 'post',
                data: {data: JSON.stringify($form.Fields.getValues())},
                success: function (data) {
                    if (data.successFlg) {
                        if (detailModel.id) {
                            parent.closeDetailDialog('新增成功');
            $form.attrScan();
            $form.Fields.fillValues(detailModel);
        }
        function bindEvents() {
            // 保存
            $('#btnSave').click(function () {
                if (!validator.validate()) { return; }
                var loading = $.ligerDialog.waitting("正在保存数据...");
                var uri = "save";
                if(detailModel.id!=null&&detailModel.id!=-1){
                    uri = "update"
                }
                dataModel.fetchRemote("${contextRoot}/redis/cache/authorization/"+uri, {
                    type: 'post',
                    data: {data: JSON.stringify($form.Fields.getValues())},
                    success: function (data) {
                        if (data.successFlg) {
                            if (detailModel.id) {
                                parent.closeDetailDialog('新增成功');
                            } else {
                                parent.closeDetailDialog('修改成功');
                            }
//                            parent.reloadMasterGrid();
                        } else {
                            parent.closeDetailDialog('修改成功');
                            $.Notice.error(data.errorMsg);
                        }
                        parent.reloadMasterGrid();
                    } else {
                        $.Notice.error(data.errorMsg);
                    },
                    error: function () {
                        $.Notice.error('保存发生异常');
                    },
                    complete: function () {
                        loading.close();
                    }
                },
                error: function () {
                    $.Notice.error('保存发生异常');
                },
                complete: function () {
                    loading.close();
                }
                });
            });
        });
        // 关闭
        $('#btnClose').click(function () {
            parent.closeDetailDialog();
        })
    }
            // 关闭
            $('#btnClose').click(function () {
                parent.closeDetailDialog();
            })
        }
    // 表单验证对象
    function customFormValidator() {
        return new $.jValidation.Validation($form, {
            immediate: true,
            onElementValidateForAjax: function (el) {
                var id = detailModel.id || -1; // 新增时传-1。
                var elId = $(el).attr("id");
                switch(elId) {
                    case 'appId':
                        var appId = $("#appId").val();
                        if(!$.Util.isStrEquals(appId, detailModel.appId)) {
                            var ulr = "${contextRoot}/redis/cache/authorization/isUniqueAppId";
                            return $.Util.validateByAjax(ulr, {id: id, categoryCode: categoryCode, appId: appId});
                        }
                        break;
        // 表单验证对象
        function customFormValidator() {
            return new $.jValidation.Validation($form, {
                immediate: true,
                onElementValidateForAjax: function (el) {
                    var id = detailModel.id || -1; // 新增时传-1。
                    var elId = $(el).attr("id");
                    switch(elId) {
                        case 'appId':
                            var appId = $("#appId").val();
                            if(!$.Util.isStrEquals(appId, detailModel.appId)) {
                                var ulr = "${contextRoot}/redis/cache/authorization/isUniqueAppId";
                                return $.Util.validateByAjax(ulr, {id: id, categoryCode: detailModel.categoryCode, appId: appId});
                            }
                            break;
                    }
                }
            }
        });
    }
            });
        }
    });
})(jQuery, window)
</script>

+ 1 - 1
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/list.jsp

@ -12,7 +12,7 @@
<div class="m-form-inline">
    <div id="conditionArea" class="f-mb10 f-mr10" align="right">
        <div class="body-head f-h30" align="left">
            <a id="btn_back" class="f-fwb">返回上一层 </a>
            <a id="btn_back" class="f-fwb" j>返回上一层 </a>
            <span class="f-ml20">缓存分类编码:${categoryCode}</span>
        </div>
    </div>

+ 107 - 102
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/authorization/listJs.jsp

@ -3,121 +3,126 @@
<script>
    var dataModel = $.DataModel.init();
    var categoryCode = '${categoryCode}';
    var detailDialog = null;
    var grid = null;
(function ($, win) {
    $(function () {
        init();
    });
    function init() {
        initWidget();
        bindEvents();
    }
        var dataModel = $.DataModel.init();
        var categoryCode = '${categoryCode}';
        var detailDialog = null;
        var grid = null;
    function initWidget() {
        $('#searchContent').ligerTextBox({
            width: 200, isSearch: true, search: function () {
                reloadGrid();
            }
        $(function () {
            init();
        });
        grid = $("#grid").ligerGrid($.LigerGridEx.config({
            url: '${contextRoot}/redis/cache/authorization/search',
            urlParms: { categoryCode: categoryCode },
            method:'GET',
            columns: [
                {display: 'ID', name: 'id', hide: true},
                {display: '应用ID', name: 'appId', width: '10%', isAllowHide: false, align: 'left'},
                {display: '授权码', name: 'authorizedCode', width: '25%', isAllowHide: false, align: 'left'},
                {display: '修改时间', name: 'modifyDate', width: '15%', isAllowHide: false, align: 'left'},
                {display: '备注', name: 'remark', width: '25%', isAllowHide: false, align: 'left'},
                {display: '操作', name: 'operator', minWidth: 120, align: 'center',
                    render: function (row) {
                        var html = '';
                        html += '<sec:authorize url="/redis/cache/authorization/detail"><a class="grid_edit f-ml10" title="编辑" href="javascript:void(0)" onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}','{2}'])", "redis:cache:authorization:detail", row.id, 'modify') + '"></a></sec:authorize>';
                        html += '<sec:authorize url="/redis/cache/authorization/delete"><a class="grid_delete" title="删除" href="javascript:void(0)"  onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}'])", "redis:cache:authorization:delete", row.id) + '"></a></sec:authorize>';
                        return html;
                    }
                }
            ],
            allowHideColumn: false,
            usePager: true
        }));
        grid.collapseAll();
        grid.adjustToWidth();
    }
        function init() {
            initWidget();
            bindEvents();
        }
    function bindEvents() {
        // 新增/修改
        $.subscribe('redis:cache:authorization:detail', function (event, id, mode) {
            var title = '新增缓存授权';
            if (mode == 'modify') {
                title = '修改缓存授权';
            }
            detailDialog = $.ligerDialog.open({
                height: 450,
                width: 480,
                title: title,
                url: '${contextRoot}/redis/cache/authorization/detail',
                urlParms: {
                    id: id,
                    categoryCode: categoryCode
        function initWidget() {
            $('#searchContent').ligerTextBox({
                width: 200, isSearch: true, search: function () {
                    reloadGrid();
                }
            });
        });
        // 删除
        $.subscribe('redis:cache:authorization:delete', function (event, id) {
            $.Notice.confirm('删除后,该应用ID不能调用缓存服务接口,来设置所属分类下Key规则的缓存数据,确认要删除吗?', function (r) {
                if (r) {
                    var loading = $.ligerDialog.waitting("正在删除数据...");
                    dataModel.updateRemote('${contextRoot}/redis/cache/authorization/delete', {
                        data: {id: parseInt(id)},
                        success: function (data) {
                            if (data.successFlg) {
                                $.Notice.success('删除成功!');
                                reloadGrid();
                            } else {
                                $.Notice.error(data.errorMsg);
                            }
                        },
                        error: function () {
                            $.Notice.error('删除发生异常');
                        },
                        complete: function () {
                            loading.close();
            grid = $("#grid").ligerGrid($.LigerGridEx.config({
                url: '${contextRoot}/redis/cache/authorization/search',
                urlParms: { categoryCode: categoryCode },
                method:'GET',
                columns: [
                    {display: 'ID', name: 'id', hide: true},
                    {display: '应用ID', name: 'appId', width: '10%', isAllowHide: false, align: 'left'},
                    {display: '授权码', name: 'authorizedCode', width: '25%', isAllowHide: false, align: 'left'},
                    {display: '修改时间', name: 'modifyDate', width: '15%', isAllowHide: false, align: 'left'},
                    {display: '备注', name: 'remark', width: '25%', isAllowHide: false, align: 'left'},
                    {display: '操作', name: 'operator', minWidth: 120, align: 'center',
                        render: function (row) {
                            var html = '';
                            html += '<sec:authorize url="/redis/cache/authorization/detail"><a class="grid_edit f-ml10" title="编辑" href="javascript:void(0)" onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}','{2}'])", "redis:cache:authorization:detail", row.id, 'modify') + '"></a></sec:authorize>';
                            html += '<sec:authorize url="/redis/cache/authorization/delete"><a class="grid_delete" title="删除" href="javascript:void(0)"  onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}'])", "redis:cache:authorization:delete", row.id) + '"></a></sec:authorize>';
                            return html;
                        }
                    });
                    }
                ],
                allowHideColumn: false,
                usePager: true
            }));
            grid.collapseAll();
            grid.adjustToWidth();
        }
        function bindEvents() {
            // 新增/修改
            $.subscribe('redis:cache:authorization:detail', function (event, id, mode) {
                var title = '新增缓存授权';
                if (mode == 'modify') {
                    title = '修改缓存授权';
                }
            })
        });
                detailDialog = $.ligerDialog.open({
                    height: 450,
                    width: 480,
                    title: title,
                    url: '${contextRoot}/redis/cache/authorization/detail',
                    urlParms: {
                        id: id,
                        categoryCode: categoryCode
                    }
                });
            });
        // 返回上一页
        $('#btn_back').click(function(){
            $('#contentPage').empty();
            $('#contentPage').load('${contextRoot}/redis/cache/category/index');
        });
            // 删除
            $.subscribe('redis:cache:authorization:delete', function (event, id) {
                $.Notice.confirm('删除后,该应用ID不能调用缓存服务接口,来设置所属分类下Key规则的缓存数据,确认要删除吗?', function (r) {
                    if (r) {
                        var loading = $.ligerDialog.waitting("正在删除数据...");
                        dataModel.updateRemote('${contextRoot}/redis/cache/authorization/delete', {
                            data: {id: parseInt(id)},
                            success: function (data) {
                                if (data.successFlg) {
                                    $.Notice.success('删除成功!');
                                    reloadGrid();
                                } else {
                                    $.Notice.error(data.errorMsg);
                                }
                            },
                            error: function () {
                                $.Notice.error('删除发生异常');
                            },
                            complete: function () {
                                loading.close();
                            }
                        });
                    }
                })
            });
    }
            // 返回上一页
            $('#btn_back').click(function(){
                var url = '${contextRoot}/admin/redis/cacheCategory';
                window.location.href = url;
//                $('#contentPage').empty();
//                $('#contentPage').load(url,{});
            });
    function reloadGrid() {
        var params = {
            searchContent: $('#searchContent').val(),
            categoryCode: categoryCode
        };
        $.Util.reloadGrid.call(grid, '${contextRoot}/redis/cache/authorization/search', params);
    }
        }
    /*-- 与明细 Dialog 页面间回调的函数 --*/
    window.reloadMasterGrid = function() {
        reloadGrid();
    };
    window.closeDetailDialog = function (type, msg) {
        detailDialog.close();
        msg && $.Notice.success(msg);
    };
        function reloadGrid() {
            var params = {
                searchContent: $('#searchContent').val(),
                categoryCode: categoryCode
            };
            $.Util.reloadGrid.call(grid, '${contextRoot}/redis/cache/authorization/search', params);
        }
        /*-- 与明细 Dialog 页面间回调的函数 --*/
        window.reloadMasterGrid = function() {
        };
        window.closeDetailDialog = function (type, msg) {
            detailDialog.close();
            reloadGrid();
            msg && $.Notice.success(msg);
        };
    });
})(jQuery, window)
</script>

+ 6 - 4
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/category/listJs.jsp

@ -34,7 +34,9 @@
                    {display: '操作', name: 'operator', width: '15%', minWidth: 120, align: 'center',
                        render: function (row) {
                            var html = '';
                            html += '<sec:authorize url="/redis/cache/category/authorizationList"><a class="label_a f-ml10" title="应用授权" href="javascript:void(0)" onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}'])", "redis:cache:category:authorizationList", row.code) + '">应用授权</a></sec:authorize>';
                            <sec:authorize url="/redis/cache/category/authorizationList">
                            html += '<a class="label_a f-ml10" title="应用授权" href="${contextRoot}/admin/redis/authorization/index?categoryCode='+row.code+'" >应用授权</a>';
                            </sec:authorize>
                            html += '<sec:authorize url="/redis/cache/category/detail"><a class="grid_edit f-ml10" title="编辑" href="javascript:void(0)" onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}','{2}'])", "redis:cache:category:detail", row.id, 'modify') + '"></a></sec:authorize>';
                            html += '<sec:authorize url="/redis/cache/category/delete"><a class="grid_delete" title="删除" href="javascript:void(0)"  onclick="javascript:' + $.Util.format("$.publish('{0}',['{1}'])", "redis:cache:category:delete", row.id) + '"></a></sec:authorize>';
                            return html;
@ -52,7 +54,7 @@
        function bindEvents() {
            // 应用授权
            $.subscribe('redis:cache:category:authorizationList', function (event, categoryCode) {
                var url = '${contextRoot}/redis/cache/authorization/index?';
                var url = '${contextRoot}/admin/redis/authorization/index?';
                $("#contentPage").empty();
                $("#contentPage").load(url,{categoryCode: categoryCode});
            });
@ -109,10 +111,10 @@
        }
        /*-- 与明细 Dialog 页面间回调的函数 --*/
        win.reloadMasterGrid = function() {
        window.reloadMasterGrid = function() {
            reloadGrid();
        };
        win.closeDetailDialog = function (type, msg) {
        window.closeDetailDialog = function (type, msg) {
            detailDialog.close();
            msg && $.Notice.success(msg);
        };

+ 12 - 2
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/keyRule/detail.jsp

@ -1,5 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../../../head/page_head.jsp" %>
    <%@ include file="detailCss.jsp" %>
    <title>用户管理</title>
</head>
<body>
<div id="redisCacheKeyRuleForm" class="m-form-inline f-mt20" data-role-form>
    <input type="hidden" id="id" data-attr-scan="id">
@ -49,4 +56,7 @@
        </div>
    </div>
</div>
</body>
<%@ include file="../../../head/page_foot.jsp" %>
<%@ include file="detailJs.jsp" %>
</html>

+ 12 - 1
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/cache/keyRule/list.jsp

@ -1,6 +1,13 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../../../head/page_head.jsp" %>
    <%@ include file="listCss.jsp" %>
    <title>用户管理</title>
</head>
<body>
<div>
    <div id="categoryMemoryRate" style="width: 600px;height: 300px; display: inline-block;"></div>
@ -33,3 +40,7 @@
    <div id="grid"></div>
</div>
</body>
<%@ include file="../../../head/page_foot.jsp" %>
<%@ include file="listJs.jsp" %>
</html>

+ 2 - 2
patient-co-manage/redis-cache/src/main/webapp/WEB-INF/views/redis/mq/channel/listJs.jsp

@ -56,14 +56,14 @@
    function bindEvents() {
        // 发布者
        $.subscribe('redis:mq:channel:publisherList', function (event, channel) {
            var url = '${contextRoot}/redis/mq/publisher/index?';
            var url = '${contextRoot}/admin/redis/publisher/index?';
            $("#contentPage").empty();
            $("#contentPage").load(url,{channel: channel});
        });
        // 订阅者
        $.subscribe('redis:mq:channel:subscriberList', function (event, channel) {
            var url = '${contextRoot}/redis/mq/subscriber/index?';
            var url = '${contextRoot}/admin/redis/subscriber/index?';
            $("#contentPage").empty();
            $("#contentPage").load(url,{channel: channel});
        });

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/bar.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/chord.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/eventRiver.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/force.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/funnel.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/gauge.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/heatmap.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/k.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/line.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 13 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/map.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/pie.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/radar.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/scatter.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/tree.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/treemap.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/venn.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/chart/wordCloud.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 35 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/echarts-all.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 20 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/echarts.js


+ 79 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/accMath.js

@ -0,0 +1,79 @@
/**
 * 高精度数学运算
 */
define(function() {
    // 除法函数,用来得到精确的除法结果 
    // 说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。 
    // 调用:accDiv(arg1,arg2) 
    // 返回值:arg1除以arg2的精确结果
    function accDiv(arg1,arg2){
        var s1 = arg1.toString();
        var s2 = arg2.toString(); 
        var m = 0;
        try {
            m = s2.split('.')[1].length;
        }
        catch(e) {}
        try {
            m -= s1.split('.')[1].length;
        }
        catch(e) {}
        
        return (s1.replace('.', '') - 0) / (s2.replace('.', '') - 0) * Math.pow(10, m);
    }
    // 乘法函数,用来得到精确的乘法结果
    // 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。 
    // 调用:accMul(arg1,arg2) 
    // 返回值:arg1乘以arg2的精确结果
    function accMul(arg1, arg2) {
        var s1 = arg1.toString();
        var s2 = arg2.toString();
        var m = 0;
        try {
            m += s1.split('.')[1].length;
        }
        catch(e) {}
        try {
            m += s2.split('.')[1].length;
        }
        catch(e) {}
        
        return (s1.replace('.', '') - 0) * (s2.replace('.', '') - 0) / Math.pow(10, m);
    }
    // 加法函数,用来得到精确的加法结果 
    // 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。 
    // 调用:accAdd(arg1,arg2) 
    // 返回值:arg1加上arg2的精确结果 
    function accAdd(arg1, arg2) {
        var r1 = 0;
        var r2 = 0;
        try {
            r1 = arg1.toString().split('.')[1].length;
        }
        catch(e) {}
        try {
            r2 = arg2.toString().split('.')[1].length;
        }
        catch(e) {}
        
        var m = Math.pow(10, Math.max(r1, r2));
        return (Math.round(arg1 * m) + Math.round(arg2 * m)) / m; 
    }
    //减法函数,用来得到精确的减法结果 
    //说明:javascript的减法结果会有误差,在两个浮点数减法的时候会比较明显。这个函数返回较为精确的减法结果。 
    //调用:accSub(arg1,arg2) 
    //返回值:arg1减法arg2的精确结果 
    function accSub(arg1,arg2) {
        return accAdd(arg1, -arg2);
    }
    return {
        accDiv : accDiv,
        accMul : accMul,
        accAdd : accAdd,
        accSub : accSub
    };
});

+ 40 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/coordinates.js

@ -0,0 +1,40 @@
/**
 * echarts坐标处理方法
 *
 * @author Neil (杨骥, 511415343@qq.com)
 */
define(
    function (require) {
        var zrMath = require('zrender/tool/math');
        /**
         * 极坐标转直角坐标
         *
         * @param {number} 半径
         * @param {number} 角度
         *
         * @return {Array.<number>} 直角坐标[x,y]
         */
        function polar2cartesian(r, theta) {
            return [r * zrMath.sin(theta), r*zrMath.cos(theta)];
        }
        /**
         * 直角坐标转极坐标
         *
         * @param {number} 横坐标
         * @param {number} 纵坐标
         *
         * @return {Array.<number>} 极坐标[r,theta]
         */
        function cartesian2polar(x, y) {
            return [Math.sqrt(x * x + y * y), Math.atan(y / x)];
        }
        return {
            polar2cartesian : polar2cartesian,
            cartesian2polar : cartesian2polar
        };
    }
);

+ 162 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/date.js

@ -0,0 +1,162 @@
/**
 * echarts日期运算格式化相关
 *
 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
 *
 */
define(function() {
    var _timeGap = [
        {formatter: 'hh : mm : ss', value: 1000},               // 1s
        {formatter: 'hh : mm : ss', value: 1000 * 5},           // 5s
        {formatter: 'hh : mm : ss', value: 1000 * 10},          // 10s
        {formatter: 'hh : mm : ss', value: 1000 * 15},          // 15s
        {formatter: 'hh : mm : ss', value: 1000 * 30},          // 30s
        {formatter: 'hh : mm\nMM - dd', value: 60000},          // 1m
        {formatter: 'hh : mm\nMM - dd', value: 60000 * 5},      // 5m
        {formatter: 'hh : mm\nMM - dd', value: 60000 * 10},     // 10m
        {formatter: 'hh : mm\nMM - dd', value: 60000 * 15},     // 15m
        {formatter: 'hh : mm\nMM - dd', value: 60000 * 30},     // 30m
        {formatter: 'hh : mm\nMM - dd', value: 3600000},        // 1h
        {formatter: 'hh : mm\nMM - dd', value: 3600000 * 2},    // 2h
        {formatter: 'hh : mm\nMM - dd', value: 3600000 * 6},    // 6h
        {formatter: 'hh : mm\nMM - dd', value: 3600000 * 12},   // 12h
        {formatter: 'MM - dd\nyyyy', value: 3600000 * 24},      // 1d
        {formatter: 'week', value: 3600000 * 24 * 7},           // 7d
        {formatter: 'month', value: 3600000 * 24 * 31},         // 1M
        {formatter: 'quarter', value: 3600000 * 24 * 380 / 4},  // 3M
        {formatter: 'half-year', value: 3600000 * 24 * 380 / 2},// 6M
        {formatter: 'year', value: 3600000 * 24 * 380}          // 1Y
    ];
    
    /**
     * 获取最佳formatter
     * @params {number} min 最小值
     * @params {number} max 最大值
     * @params {=number} splitNumber 分隔段数
     */
    function getAutoFormatter(min, max, splitNumber) {
        splitNumber = splitNumber > 1 ? splitNumber : 2;
        // 最优解
        var curValue;
        var totalGap;
        // 目标
        var formatter;
        var gapValue;
        for (var i = 0, l = _timeGap.length; i < l; i++) {
            curValue = _timeGap[i].value;
            totalGap = Math.ceil(max / curValue) * curValue 
                       - Math.floor(min / curValue) * curValue;
            if (Math.round(totalGap / curValue) <= splitNumber * 1.2) {
                formatter =  _timeGap[i].formatter;
                gapValue = _timeGap[i].value;
                // console.log(formatter, gapValue,i);
                break;
            }
        }
        
        if (formatter == null) {
            formatter = 'year';
            curValue = 3600000 * 24 * 367;
            totalGap = Math.ceil(max / curValue) * curValue 
                       - Math.floor(min / curValue) * curValue;
            gapValue = Math.round(totalGap / (splitNumber - 1) / curValue) * curValue;
        }
        
        return {
            formatter: formatter,
            gapValue: gapValue
        };
    }
    
    /**
     * 一位数字补0 
     */
    function s2d (v) {
        return v < 10 ? ('0' + v) : v;
    }
    
    /**
     * 百分比计算
     */
    function format(formatter, value) {
        if (formatter == 'week' 
            || formatter == 'month' 
            || formatter == 'quarter' 
            || formatter == 'half-year'
            || formatter == 'year'
        ) {
            formatter = 'MM - dd\nyyyy';
        }
            
        var date = getNewDate(value);
        var y = date.getFullYear();
        var M = date.getMonth() + 1;
        var d = date.getDate();
        var h = date.getHours();
        var m = date.getMinutes();
        var s = date.getSeconds();
        
        formatter = formatter.replace('MM', s2d(M));
        formatter = formatter.toLowerCase();
        formatter = formatter.replace('yyyy', y);
        formatter = formatter.replace('yy', y % 100);
        formatter = formatter.replace('dd', s2d(d));
        formatter = formatter.replace('d', d);
        formatter = formatter.replace('hh', s2d(h));
        formatter = formatter.replace('h', h);
        formatter = formatter.replace('mm', s2d(m));
        formatter = formatter.replace('m', m);
        formatter = formatter.replace('ss', s2d(s));
        formatter = formatter.replace('s', s);
        return formatter;
    }
    
    function nextMonday(value) {
        value = getNewDate(value);
        value.setDate(value.getDate() + 8 - value.getDay());
        return value;
    }
    
    function nextNthPerNmonth(value, nth, nmon) {
        value = getNewDate(value);
        value.setMonth(Math.ceil((value.getMonth() + 1) / nmon) * nmon);
        value.setDate(nth);
        return value;
    }
    
    function nextNthOnMonth(value, nth) {
        return nextNthPerNmonth(value, nth, 1);
    }
    
    function nextNthOnQuarterYear(value, nth) {
        return nextNthPerNmonth(value, nth, 3);
    }
    
    function nextNthOnHalfYear(value, nth) {
        return nextNthPerNmonth(value, nth, 6);
    }
    
    function nextNthOnYear(value, nth) {
        return nextNthPerNmonth(value, nth, 12);
    }
    
    function getNewDate(value) {
        return value instanceof Date
               ? value
               : new Date(typeof value == 'string' ? value.replace(/-/g, '/') : value);
    }
    
    return {
        getAutoFormatter: getAutoFormatter,
        getNewDate: getNewDate,
        format: format,
        nextMonday: nextMonday,
        nextNthPerNmonth: nextNthPerNmonth,
        nextNthOnMonth: nextNthOnMonth,
        nextNthOnQuarterYear: nextNthOnQuarterYear,
        nextNthOnHalfYear: nextNthOnHalfYear,
        nextNthOnYear : nextNthOnYear
    };
});

+ 624 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecAnimation.js

@ -0,0 +1,624 @@
/**
 * echarts图表动画基类
 *
 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
 *
 */
define(function (require) {
    var zrUtil = require('zrender/tool/util');
    var curveTool = require('zrender/tool/curve');
    
    /**
     * 折线型动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function pointList(zr, oldShape, newShape, duration, easing) {
        var newPointList = newShape.style.pointList;
        var newPointListLen = newPointList.length;
        var oldPointList;
        if (!oldShape) {        // add
            oldPointList = [];
            if (newShape._orient != 'vertical') {
                var y = newPointList[0][1];
                for (var i = 0; i < newPointListLen; i++) {
                    oldPointList[i] = [newPointList[i][0], y];
                }
            }
            else {
                var x = newPointList[0][0];
                for (var i = 0; i < newPointListLen; i++) {
                    oldPointList[i] = [x, newPointList[i][1]];
                }
            }
            if (newShape.type == 'half-smooth-polygon') {
                oldPointList[newPointListLen - 1] = zrUtil.clone(newPointList[newPointListLen - 1]);
                oldPointList[newPointListLen - 2] = zrUtil.clone(newPointList[newPointListLen - 2]);
            }
            oldShape = {style : {pointList : oldPointList}};
        }
        
        oldPointList = oldShape.style.pointList;
        var oldPointListLen = oldPointList.length;
        if (oldPointListLen == newPointListLen) {
            newShape.style.pointList = oldPointList;
        }
        else if (oldPointListLen < newPointListLen) {
            // 原来短,新的长,补全
            newShape.style.pointList = oldPointList.concat(newPointList.slice(oldPointListLen));
        }
        else {
            // 原来长,新的短,截断
            newShape.style.pointList = oldPointList.slice(0, newPointListLen);
        }
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                { pointList: newPointList }
            )
            .during(function () {
                // Updating bezier points
                if (newShape.updateControlPoints) {
                    newShape.updateControlPoints(newShape.style);
                }
            })
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * 复制样式
     * 
     * @inner
     * @param {Object} target 目标对象
     * @param {Object} source 源对象
     * @param {...string} props 复制的属性列表
     */
    function cloneStyle(target, source) {
        var len = arguments.length;
        for (var i = 2; i < len; i++) {
            var prop = arguments[i];
            target.style[prop] = source.style[prop];
        }
    }
    /**
     * 方型动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function rectangle(zr, oldShape, newShape, duration, easing) {
        var newShapeStyle = newShape.style;
        if (!oldShape) {        // add
            oldShape = {
                position : newShape.position,
                style : {
                    x : newShapeStyle.x,
                    y : newShape._orient == 'vertical'
                        ? newShapeStyle.y + newShapeStyle.height
                        : newShapeStyle.y,
                    width: newShape._orient == 'vertical' 
                           ? newShapeStyle.width : 0,
                    height: newShape._orient != 'vertical' 
                           ? newShapeStyle.height : 0
                }
            };
        }
        
        var newX = newShapeStyle.x;
        var newY = newShapeStyle.y;
        var newWidth = newShapeStyle.width;
        var newHeight = newShapeStyle.height;
        var newPosition = [newShape.position[0], newShape.position[1]];
        cloneStyle(
            newShape, oldShape,
            'x', 'y', 'width', 'height'
        );
        newShape.position = oldShape.position;
        zr.addShape(newShape);
        if (newPosition[0] != oldShape.position[0] || newPosition[1] != oldShape.position[1]) {
            zr.animate(newShape.id, '')
                .when(
                    duration,
                    {
                        position: newPosition
                    }
                )
                .start(easing);
        }
        
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    x: newX,
                    y: newY,
                    width: newWidth,
                    height: newHeight
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * 蜡烛动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function candle(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {        // add
            var y = newShape.style.y;
            oldShape = {style : {y : [y[0], y[0], y[0], y[0]]}};
        }
        
        var newY = newShape.style.y;
        newShape.style.y = oldShape.style.y;
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                { y: newY }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    /**
     * 环型动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function ring(zr, oldShape, newShape, duration, easing) {
        var x = newShape.style.x;
        var y = newShape.style.y;
        var r0 = newShape.style.r0;
        var r = newShape.style.r;
        
        newShape.__animating = true;
        if (newShape._animationAdd != 'r') {
            newShape.style.r0 = 0;
            newShape.style.r = 0;
            newShape.rotation = [Math.PI*2, x, y];
            
            zr.addShape(newShape);
            zr.animate(newShape.id, 'style')
                .when(
                    duration,
                    {
                        r0 : r0,
                        r : r
                    }
                )
                .done(function() {
                    newShape.__animating = false;
                })
                .start(easing);
            zr.animate(newShape.id, '')
                .when(
                    duration,
                    { rotation : [0, x, y] }
                )
                .start(easing);
        }
        else {
            newShape.style.r0 = newShape.style.r;
            
            zr.addShape(newShape);
            zr.animate(newShape.id, 'style')
                .when(
                    duration,
                    {
                        r0 : r0
                    }
                )
                .done(function() {
                    newShape.__animating = false;
                })
                .start(easing);
        }
    }
    
    /**
     * 扇形动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function sector(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {        // add
            if (newShape._animationAdd != 'r') {
                oldShape = {
                    style : {
                        startAngle : newShape.style.startAngle,
                        endAngle : newShape.style.startAngle
                    }
                };
            }
            else {
                oldShape = {style : {r0 : newShape.style.r}};
            }
        }
        
        var startAngle = newShape.style.startAngle;
        var endAngle = newShape.style.endAngle;
        
        cloneStyle(
            newShape, oldShape,
            'startAngle', 'endAngle'
        );
        
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    startAngle : startAngle,
                    endAngle : endAngle
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * 文本动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function text(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {        // add
            oldShape = {
                style : {
                    x : newShape.style.textAlign == 'left' 
                        ? newShape.style.x + 100
                        : newShape.style.x - 100,
                    y : newShape.style.y
                }
            };
        }
        
        var x = newShape.style.x;
        var y = newShape.style.y;
        
        cloneStyle(
            newShape, oldShape,
            'x', 'y'
        );
        
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    x : x,
                    y : y
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * 多边形动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function polygon(zr, oldShape, newShape, duration, easing) {
        var rect = require('zrender/shape/Polygon').prototype.getRect(newShape.style);
        var x = rect.x + rect.width / 2;
        var y = rect.y + rect.height / 2;
        
        newShape.scale = [0.1, 0.1, x, y];
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, '')
            .when(
                duration,
                {
                    scale : [1, 1, x, y]
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * 和弦动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function ribbon(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {        // add
            oldShape = {
                style : {
                    source0 : 0,
                    source1 : newShape.style.source1 > 0 ? 360 : -360,
                    target0 : 0,
                    target1 : newShape.style.target1 > 0 ? 360 : -360
                }
            };
        }
        
        var source0 = newShape.style.source0;
        var source1 = newShape.style.source1;
        var target0 = newShape.style.target0;
        var target1 = newShape.style.target1;
        
        if (oldShape.style) {
            cloneStyle(
                newShape, oldShape,
                'source0', 'source1', 'target0', 'target1'
            );
        }
        
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    source0 : source0,
                    source1 : source1,
                    target0 : target0,
                    target1 : target1
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * gaugePointer动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function gaugePointer(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {        // add
            oldShape = {
                style : {
                    angle : newShape.style.startAngle
                }
            };
        }
        
        var angle = newShape.style.angle;
        newShape.style.angle = oldShape.style.angle;
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    angle : angle
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * icon动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function icon(zr, oldShape, newShape, duration, easing, delay) {
        // 避免markPoint特效取值在动画帧上
        newShape.style._x = newShape.style.x;
        newShape.style._y = newShape.style.y;
        newShape.style._width = newShape.style.width;
        newShape.style._height = newShape.style.height;
        if (!oldShape) {    // add
            var x = newShape._x || 0;
            var y = newShape._y || 0;
            newShape.scale = [0.01, 0.01, x, y];
            zr.addShape(newShape);
            newShape.__animating = true;
            zr.animate(newShape.id, '')
                .delay(delay)
                .when(
                    duration,
                    {scale : [1, 1, x, y]}
                )
                .done(function() {
                    newShape.__animating = false;
                })
                .start(easing || 'QuinticOut');
        }
        else {              // mod
            rectangle(zr, oldShape, newShape, duration, easing);
        }
    }
    
    /**
     * line动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function line(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {
            oldShape = {
                style : {
                    xStart : newShape.style.xStart,
                    yStart : newShape.style.yStart,
                    xEnd : newShape.style.xStart,
                    yEnd : newShape.style.yStart
                }
            };
        }
        
        var xStart = newShape.style.xStart;
        var xEnd = newShape.style.xEnd;
        var yStart = newShape.style.yStart;
        var yEnd = newShape.style.yEnd;
        cloneStyle(
            newShape, oldShape,
            'xStart', 'xEnd', 'yStart', 'yEnd'
        );
        zr.addShape(newShape);
        newShape.__animating = true;
        zr.animate(newShape.id, 'style')
            .when(
                duration,
                {
                    xStart: xStart,
                    xEnd: xEnd,
                    yStart: yStart,
                    yEnd: yEnd
                }
            )
            .done(function() {
                newShape.__animating = false;
            })
            .start(easing);
    }
    
    /**
     * markline动画
     * 
     * @param {ZRender} zr
     * @param {shape} oldShape
     * @param {shape} newShape
     * @param {number} duration
     * @param {tring} easing
     */
    function markline(zr, oldShape, newShape, duration, easing) {
        easing = easing || 'QuinticOut';
        newShape.__animating = true;
        zr.addShape(newShape);
        var newShapeStyle = newShape.style;
        var animationDone = function () {
            newShape.__animating = false;
        };
        var x0 = newShapeStyle.xStart;
        var y0 = newShapeStyle.yStart;
        var x2 = newShapeStyle.xEnd;
        var y2 = newShapeStyle.yEnd;
        if (newShapeStyle.curveness > 0) {
            newShape.updatePoints(newShapeStyle);
            var obj = { p: 0 };
            var x1 = newShapeStyle.cpX1;
            var y1 = newShapeStyle.cpY1;
            var newXArr = [];
            var newYArr = [];
            var subdivide = curveTool.quadraticSubdivide;
            zr.animation.animate(obj)
                .when(duration, { p: 1 })
                .during(function () {
                    // Calculate subdivided curve
                    subdivide(x0, x1, x2, obj.p, newXArr);
                    subdivide(y0, y1, y2, obj.p, newYArr);
                    newShapeStyle.cpX1 = newXArr[1];
                    newShapeStyle.cpY1 = newYArr[1];
                    newShapeStyle.xEnd = newXArr[2];
                    newShapeStyle.yEnd = newYArr[2];
                    zr.modShape(newShape);
                })
                .done(animationDone)
                .start(easing);
        }
        else {
            zr.animate(newShape.id, 'style')
                .when(0, {
                    xEnd: x0,
                    yEnd: y0
                })
                .when(duration, {
                    xEnd: x2,
                    yEnd: y2
                })
                .done(animationDone)
                .start(easing);
        }
    }
    return {
        pointList : pointList,
        rectangle : rectangle,
        candle : candle,
        ring : ring,
        sector : sector,
        text : text,
        polygon : polygon,
        ribbon : ribbon,
        gaugePointer : gaugePointer,
        icon : icon,
        line : line,
        markline : markline
    };
});

+ 115 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecData.js

@ -0,0 +1,115 @@
/**
 * echarts通用私有数据服务
 *
 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
 *
 */
define(function() {
    /**
     * 打包私有数据
     *
     * @param {shape} shape 修改目标
     * @param {Object} series
     * @param {number} seriesIndex
     * @param {number | Object} data
     * @param {number} dataIndex
     * @param {*=} special
     * @param {*=} special2
     */
    function pack(
        shape, series, seriesIndex, data, dataIndex, name, special, special2
    ) {
        var value;
        if (typeof data != 'undefined') {
            value = data.value == null
                ? data
                : data.value;
        }
        shape._echartsData = {
            '_series' : series,
            '_seriesIndex' : seriesIndex,
            '_data' : data,
            '_dataIndex' : dataIndex,
            '_name' : name,
            '_value' : value,
            '_special' : special,
            '_special2' : special2
        };
        return shape._echartsData;
    }
    /**
     * 从私有数据中获取特定项
     * @param {shape} shape
     * @param {string} key
     */
    function get(shape, key) {
        var data = shape._echartsData;
        if (!key) {
            return data;
        }
        switch (key) {
            case 'series' :
            case 'seriesIndex' :
            case 'data' :
            case 'dataIndex' :
            case 'name' :
            case 'value' :
            case 'special' :
            case 'special2' :
                return data && data['_' + key];
        }
        return null;
    }
    /**
     * 修改私有数据中获取特定项
     * @param {shape} shape
     * @param {string} key
     * @param {*} value
     */
    function set(shape, key, value) {
        shape._echartsData = shape._echartsData || {};
        switch (key) {
            case 'series' :             // 当前系列值
            case 'seriesIndex' :        // 系列数组位置索引
            case 'data' :               // 当前数据值
            case 'dataIndex' :          // 数据数组位置索引
            case 'name' :
            case 'value' :
            case 'special' :
            case 'special2' :
                shape._echartsData['_' + key] = value;
                break;
        }
    }
    
    /**
     * 私有数据克隆,把source拷贝到target上
     * @param {shape} source 源
     * @param {shape} target 目标
     */
    function clone(source, target) {
        target._echartsData =  {
            '_series' : source._echartsData._series,
            '_seriesIndex' : source._echartsData._seriesIndex,
            '_data' : source._echartsData._data,
            '_dataIndex' : source._echartsData._dataIndex,
            '_name' : source._echartsData._name,
            '_value' : source._echartsData._value,
            '_special' : source._echartsData._special,
            '_special2' : source._echartsData._special2
        };
    }
    return {
        pack : pack,
        set : set,
        get : get,
        clone : clone
    };
});

+ 444 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecEffect.js

@ -0,0 +1,444 @@
/**
 * echarts图表特效基类
 *
 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
 *
 */
define(function (require) {
    var ecData = require('../util/ecData');
    
    var CircleShape = require('zrender/shape/Circle');
    var ImageShape = require('zrender/shape/Image');
    var curveTool = require('zrender/tool/curve');
    var IconShape = require('../util/shape/Icon');
    var SymbolShape = require('../util/shape/Symbol');
    var ShapeBundle = require('zrender/shape/ShapeBundle');
    var Polyline = require('zrender/shape/Polyline');
    var vec2 = require('zrender/tool/vector');
    var canvasSupported = require('zrender/tool/env').canvasSupported;
    
    function point(zr, effectList, shape, zlevel) {
        var effect = shape.effect;
        var color = effect.color || shape.style.strokeColor || shape.style.color;
        var shadowColor = effect.shadowColor || color;
        var size = effect.scaleSize;
        var distance = effect.bounceDistance;
        var shadowBlur = typeof effect.shadowBlur != 'undefined'
                         ? effect.shadowBlur : size;
        var effectShape;
        if (shape.type !== 'image') {
            effectShape = new IconShape({
                zlevel : zlevel,
                style : {
                    brushType : 'stroke',
                    iconType : shape.style.iconType != 'droplet'
                               ? shape.style.iconType
                               : 'circle',
                    x : shadowBlur + 1, // 线宽
                    y : shadowBlur + 1,
                    n : shape.style.n,
                    width : shape.style._width * size,
                    height : shape.style._height * size,
                    lineWidth : 1,
                    strokeColor : color,
                    shadowColor : shadowColor,
                    shadowBlur : shadowBlur
                },
                draggable : false,
                hoverable : false
            });
            if (shape.style.iconType == 'pin') {
                effectShape.style.y += effectShape.style.height / 2 * 1.5;
            }
            if (canvasSupported) {  // 提高性能,换成image
                effectShape.style.image = zr.shapeToImage(
                    effectShape, 
                    effectShape.style.width + shadowBlur * 2 + 2, 
                    effectShape.style.height + shadowBlur * 2 + 2
                ).style.image;
                
                effectShape = new ImageShape({
                    zlevel : effectShape.zlevel,
                    style : effectShape.style,
                    draggable : false,
                    hoverable : false
                });
            }
        }
        else {
            effectShape = new ImageShape({
                zlevel : zlevel,
                style : shape.style,
                draggable : false,
                hoverable : false
            });
        }
        
        ecData.clone(shape, effectShape);
        
        // 改变坐标,不能移到前面
        effectShape.position = shape.position;
        effectList.push(effectShape);
        zr.addShape(effectShape);
        
        var devicePixelRatio = shape.type !== 'image' ? (window.devicePixelRatio || 1) : 1;
        var offset = (effectShape.style.width / devicePixelRatio - shape.style._width) / 2;
        effectShape.style.x = shape.style._x - offset;
        effectShape.style.y = shape.style._y - offset;
        if (shape.style.iconType == 'pin') {
            effectShape.style.y -= shape.style.height / 2 * 1.5;
        }
        var duration = (effect.period + Math.random() * 10) * 100;
        
        zr.modShape(
            shape.id, 
            { invisible : true}
        );
        
        var centerX = effectShape.style.x + (effectShape.style.width) / 2 / devicePixelRatio;
        var centerY = effectShape.style.y + (effectShape.style.height) / 2 / devicePixelRatio;
        if (effect.type === 'scale') {
            // 放大效果
            zr.modShape(
                effectShape.id, 
                {
                    scale : [0.1, 0.1, centerX, centerY]
                }
            );
            
            zr.animate(effectShape.id, '', effect.loop)
                .when(
                    duration,
                    {
                        scale : [1, 1, centerX, centerY]
                    }
                )
                .done(function() {
                    shape.effect.show = false;
                    zr.delShape(effectShape.id);
                })
                .start();
        }
        else {
            zr.animate(effectShape.id, 'style', effect.loop)
                .when(
                    duration,
                    {
                        y : effectShape.style.y - distance
                    }
                )
                .when(
                    duration * 2,
                    {
                        y : effectShape.style.y
                    }
                )
                .done(function() {
                    shape.effect.show = false;
                    zr.delShape(effectShape.id);
                })
                .start();
        }
        
    }
    
    function largePoint(zr, effectList, shape, zlevel) {
        var effect = shape.effect;
        var color = effect.color || shape.style.strokeColor || shape.style.color;
        var size = effect.scaleSize;
        var shadowColor = effect.shadowColor || color;
        var shadowBlur = typeof effect.shadowBlur != 'undefined'
                         ? effect.shadowBlur : (size * 2);
        var devicePixelRatio = window.devicePixelRatio || 1;
        var effectShape = new SymbolShape({
            zlevel : zlevel,
            position : shape.position,
            scale : shape.scale,
            style : {
                pointList : shape.style.pointList,
                iconType : shape.style.iconType,
                color : color,
                strokeColor : color,
                shadowColor : shadowColor,
                shadowBlur : shadowBlur * devicePixelRatio,
                random : true,
                brushType: 'fill',
                lineWidth:1,
                size : shape.style.size
            },
            draggable : false,
            hoverable : false
        });
        
        effectList.push(effectShape);
        zr.addShape(effectShape);
        zr.modShape(
            shape.id, 
            { invisible : true}
        );
        
        var duration = Math.round(effect.period * 100);
        var clip1 = {};
        var clip2 = {};
        for (var i = 0; i < 20; i++) {
            effectShape.style['randomMap' + i] = 0;
            clip1 = {};
            clip1['randomMap' + i] = 100;
            clip2 = {};
            clip2['randomMap' + i] = 0;
            effectShape.style['randomMap' + i] = Math.random() * 100;
            zr.animate(effectShape.id, 'style', true)
                .when(duration, clip1)
                .when(duration * 2, clip2)
                .when(duration * 3, clip1)
                .when(duration * 4, clip1)
                .delay(Math.random() * duration * i)
                //.delay(duration / 15 * (15 - i + 1))
                .start();
            
        }
    }
    
    function line(zr, effectList, shape, zlevel, isLarge) {
        var effect = shape.effect;
        var shapeStyle = shape.style;
        var color = effect.color || shapeStyle.strokeColor || shapeStyle.color;
        var shadowColor = effect.shadowColor || shapeStyle.strokeColor || color;
        var size = shapeStyle.lineWidth * effect.scaleSize;
        var shadowBlur = typeof effect.shadowBlur != 'undefined'
                         ? effect.shadowBlur : size;
        var effectShape = new CircleShape({
            zlevel : zlevel,
            style : {
                x : shadowBlur,
                y : shadowBlur,
                r : size,
                color : color,
                shadowColor : shadowColor,
                shadowBlur : shadowBlur
            },
            hoverable : false
        });
        var offset = 0;
        if (canvasSupported && ! isLarge) {  // 提高性能,换成image
            var zlevel = effectShape.zlevel;
            effectShape = zr.shapeToImage(
                effectShape,
                (size + shadowBlur) * 2,
                (size + shadowBlur) * 2
            );
            effectShape.zlevel = zlevel;
            effectShape.hoverable = false;
            offset = shadowBlur;
        }
        if (! isLarge) {
            ecData.clone(shape, effectShape);
            // 改变坐标, 不能移到前面
            effectShape.position = shape.position;
            effectList.push(effectShape);
            zr.addShape(effectShape);
        }
        var effectDone = function () {
            if (! isLarge) {
                shape.effect.show = false;
                zr.delShape(effectShape.id);   
            }
            effectShape.effectAnimator = null;
        };
        if (shape instanceof Polyline) {
            var distanceList = [0];
            var totalDist = 0;
            var pointList = shapeStyle.pointList;
            var controlPointList = shapeStyle.controlPointList;
            for (var i = 1; i < pointList.length; i++) {
                if (controlPointList) {
                    var cp1 = controlPointList[(i - 1) * 2];
                    var cp2 = controlPointList[(i - 1) * 2 + 1];
                    totalDist += vec2.dist(pointList[i - 1], cp1)
                         + vec2.dist(cp1, cp2)
                         + vec2.dist(cp2, pointList[i]);
                }
                else {
                    totalDist += vec2.dist(pointList[i - 1], pointList[i]);
                }
                distanceList.push(totalDist);
            }
            var obj = { p: 0 };
            var animator = zr.animation.animate(obj, { loop: effect.loop });
            for (var i = 0; i < distanceList.length; i++) {
                animator.when(distanceList[i] * effect.period, { p: i });
            }
            animator.during(function () {
                var i = Math.floor(obj.p);
                var x, y;
                if (i == pointList.length - 1) {
                    x = pointList[i][0];
                    y = pointList[i][1];
                }
                else {
                    var t = obj.p - i;
                    var p0 = pointList[i];
                    var p1 = pointList[i + 1];
                    if (controlPointList) {
                        var cp1 = controlPointList[i * 2];
                        var cp2 = controlPointList[i * 2 + 1];
                        x = curveTool.cubicAt(
                            p0[0], cp1[0], cp2[0], p1[0], t
                        );
                        y = curveTool.cubicAt(
                            p0[1], cp1[1], cp2[1], p1[1], t
                        );
                    }
                    else {
                        x = (p1[0] - p0[0]) * t + p0[0];
                        y = (p1[1] - p0[1]) * t + p0[1];   
                    }
                }
                effectShape.style.x = x;
                effectShape.style.y = y;
                if (! isLarge) {
                    zr.modShape(effectShape);
                }
            })
            .done(effectDone)
            .start();
            animator.duration = totalDist * effect.period;
            effectShape.effectAnimator = animator;
        }
        else {
            var x0 = shapeStyle.xStart - offset;
            var y0 = shapeStyle.yStart - offset;
            var x2 = shapeStyle.xEnd - offset;
            var y2 = shapeStyle.yEnd - offset;
            effectShape.style.x = x0;
            effectShape.style.y = y0;
            var distance = (x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0);
            var duration = Math.round(Math.sqrt(Math.round(
                distance * effect.period * effect.period
            )));
            if (shape.style.curveness > 0) {
                var x1 = shapeStyle.cpX1 - offset;
                var y1 = shapeStyle.cpY1 - offset;
                effectShape.effectAnimator = zr.animation.animate(effectShape, { loop: effect.loop })
                    .when(duration, { p: 1 })
                    .during(function (target, t) {
                        effectShape.style.x = curveTool.quadraticAt(
                            x0, x1, x2, t
                        );
                        effectShape.style.y = curveTool.quadraticAt(
                            y0, y1, y2, t
                        );
                        if (! isLarge) {
                            zr.modShape(effectShape);
                        }
                    })
                    .done(effectDone)
                    .start();
            }
            else {
                // 不用 zr.animate,因为在用 ShapeBundle 的时候单个 effectShape 不会
                // 被加到 zrender 中
                effectShape.effectAnimator = zr.animation.animate(effectShape.style, { loop: effect.loop })
                    .when(duration, {
                        x: x2,
                        y: y2
                    })
                    .during(function () {
                        if (! isLarge) {
                            zr.modShape(effectShape);
                        }
                    })
                    .done(effectDone)
                    .start();
            }
            effectShape.effectAnimator.duration = duration;
        }
        return effectShape;
    }
    function largeLine(zr, effectList, shape, zlevel) {
        var effectShape = new ShapeBundle({
            style: {
                shapeList: []
            },
            zlevel: zlevel,
            hoverable: false
        });
        var shapeList = shape.style.shapeList;
        var effect = shape.effect;
        effectShape.position = shape.position;
        var maxDuration = 0;
        var subEffectAnimators = [];
        for (var i = 0; i < shapeList.length; i++) {
            shapeList[i].effect = effect;
            var subEffectShape = line(zr, null, shapeList[i], zlevel, true);
            var subEffectAnimator = subEffectShape.effectAnimator;
            effectShape.style.shapeList.push(subEffectShape);
            if (subEffectAnimator.duration > maxDuration) {
                maxDuration = subEffectAnimator.duration;
            }
            if (i === 0) {
                effectShape.style.color = subEffectShape.style.color;
                effectShape.style.shadowBlur = subEffectShape.style.shadowBlur;
                effectShape.style.shadowColor = subEffectShape.style.shadowColor;
            }
            subEffectAnimators.push(subEffectAnimator);
        }
        effectList.push(effectShape);
        zr.addShape(effectShape);
        var clearAllAnimators = function () {
            for (var i = 0; i < subEffectAnimators.length; i++) {
                subEffectAnimators[i].stop();
            }
        };
        if (maxDuration) {
            effectShape.__dummy = 0;
            // Proxy animator
            var animator = zr.animate(effectShape.id, '', effect.loop)
                .when(maxDuration, {
                    __dummy: 1
                })
                .during(function () {
                    zr.modShape(effectShape);
                })
                .done(function () {
                    shape.effect.show = false;
                    zr.delShape(effectShape.id);
                })
                .start();
            var oldStop = animator.stop;
            animator.stop = function () {
                clearAllAnimators();
                oldStop.call(this);
            };
        }
    }
    return {
        point : point,
        largePoint : largePoint,
        line : line,
        largeLine: largeLine
    };
});

+ 81 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/ecQuery.js

@ -0,0 +1,81 @@
/**
 * echarts层级查找方法
 *
 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
 *
 */
define(function(require) {
    var zrUtil = require('zrender/tool/util');
    
    /**
     * 获取嵌套选项的基础方法
     * 返回optionTarget中位于optionLocation上的值,如果没有定义,则返回undefined
     */
    function query(optionTarget, optionLocation) {
        if (typeof optionTarget == 'undefined') {
            return;
        }
        if (!optionLocation) {
            return optionTarget;
        }
        optionLocation = optionLocation.split('.');
        var length = optionLocation.length;
        var curIdx = 0;
        while (curIdx < length) {
            optionTarget = optionTarget[optionLocation[curIdx]];
            if (typeof optionTarget == 'undefined') {
                return;
            }
            curIdx++;
        }
        return optionTarget;
    }
        
    /**
     * 获取多级控制嵌套属性的基础方法
     * 返回ctrList中优先级最高(最靠前)的非undefined属性,ctrList中均无定义则返回undefined
     */
    function deepQuery(ctrList, optionLocation) {
        var finalOption;
        for (var i = 0, l = ctrList.length; i < l; i++) {
            finalOption = query(ctrList[i], optionLocation);
            if (typeof finalOption != 'undefined') {
                return finalOption;
            }
        }
    }
    
    /**
     * 获取多级控制嵌套属性的基础方法
     * 根据ctrList中优先级合并产出目标属性
     */
    function deepMerge(ctrList, optionLocation) {
        var finalOption;
        var len = ctrList.length;
        while (len--) {
            var tempOption = query(ctrList[len], optionLocation);
            if (typeof tempOption != 'undefined') {
                if (typeof finalOption == 'undefined') {
                    finalOption = zrUtil.clone(tempOption);
                }
                else {
                    zrUtil.merge(
                        finalOption, tempOption, true
                    );
                }
            }
        }
        
        return finalOption;
    }
    
    return {
        query : query,
        deepQuery : deepQuery,
        deepMerge : deepMerge
    };
});

+ 48 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/kwargs.js

@ -0,0 +1,48 @@
define(function (){
    function kwargs(func, defaults) {
        /*jshint maxlen : 200*/
        var removeComments = new RegExp('(\\/\\*[\\w\\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\\'][^\\n\\r]*$)|(<![\\-\\-\\s\\w\\>\\/]*>)', 'gim');
        var removeWhitespc = new RegExp('\\s+', 'gim');
        var matchSignature = new RegExp('function.*?\\((.*?)\\)', 'i');
        // get the argument names from function source
        var names = func.toString()
                        .replace(removeComments, '')
                        .replace(removeWhitespc, '')
                        .match(matchSignature)[1]
                        .split(',');
        // Check the existance of default, if not create an object
        if(defaults !== Object(defaults)){
            defaults = {};
        }
        return function () {
            var args = Array.prototype.slice.call(arguments);
            var kwargs = args[args.length - 1];
            // Check the existance of the kwargs
            if (kwargs && kwargs.constructor === Object) {
                args.pop();
            }
            else{
                kwargs = {};
            }
            // Fill the arguments and apply them
            for (var i = 0; i < names.length; i++) {
                var name = names[i];
                if (name in kwargs) {
                    args[i] = kwargs[name];
                }
                else if(name in defaults && args[i] == null){
                    args[i] = defaults[name];
                }
            }
            return func.apply(this, args);
        };
    }
    // As function prototype
    // Function.prototype.kwargs = kwargs;
    return kwargs;
});

+ 9 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoCoord.js

@ -0,0 +1,9 @@
/**
 * 经纬度坐标,优先于自定计算
 */
define(function() {
    return {
        'Russia': [ 100, 60 ],
        'United States of America': [ -99, 38 ]
    };
});

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/an_hui_geo.js


+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ao_men_geo.js

@ -0,0 +1,3 @@
define(function() {
    return {"type":"FeatureCollection","features":[{"type":"Feature","id":"8200","properties":{"name":"澳门","cp":[113.5715,22.1583],"childNum":1},"geometry":{"type":"Polygon","coordinates":["@@HQFMDIDGBI@E@EEKEGCEIGGEKEMGSEU@CBEDAJAP@F@LBT@JCHMPOdADCFADAB@LFLDFFP@DAB@@AF@D@B@@FBD@FADHBBHAD@FAJ@JEDCJI`gFIJW"],"encodeOffsets":[[116325,22699]]}}],"UTF8Encoding":true};
});

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/bei_jing_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/china_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/chong_qing_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/fu_jian_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/gan_su_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/guang_dong_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/guang_xi_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/gui_zhou_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hai_nan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/he_bei_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/he_nan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hei_long_jiang_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hu_bei_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/hu_nan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ji_lin_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/jiang_su_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/jiang_xi_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/liao_ning_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/nei_meng_gu_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/ning_xia_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/qing_hai_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_dong_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_xi_1_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shan_xi_2_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/shang_hai_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/si_chuan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/tai_wan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/tian_jin_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/world_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xi_zang_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xiang_gang_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/xin_jiang_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/yun_nan_geo.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/geoJson/zhe_jiang_geo.js


+ 408 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/params.js

@ -0,0 +1,408 @@
/**
 * 地图参数
 * key为地图类型: {
 *     getGeoJson: 地图数据加载
 * } 
 */
define(function (require) {
    function decode(json) {
        if (!json.UTF8Encoding) {
            return json;
        }
        var features = json.features;
        for (var f = 0; f < features.length; f++) {
            var feature = features[f];
            var coordinates = feature.geometry.coordinates;
            var encodeOffsets = feature.geometry.encodeOffsets;
            for (var c = 0; c < coordinates.length; c++) {
                var coordinate = coordinates[c];
                
                if (feature.geometry.type === 'Polygon') {
                    coordinates[c] = decodePolygon(
                        coordinate,
                        encodeOffsets[c]
                    );
                } else if (feature.geometry.type === 'MultiPolygon') {
                    for (var c2 = 0; c2 < coordinate.length; c2++) {
                        var polygon = coordinate[c2];
                        coordinate[c2] = decodePolygon(
                            polygon,
                            encodeOffsets[c][c2]
                        );
                    }
                }
            }
        }
        // Has been decoded
        json.UTF8Encoding = false;
        return json;
    }
    function decodePolygon(coordinate, encodeOffsets) {
        var result = [];
        var prevX = encodeOffsets[0];
        var prevY = encodeOffsets[1];
        for (var i = 0; i < coordinate.length; i+=2) {
            var x = coordinate.charCodeAt(i) - 64;
            var y = coordinate.charCodeAt(i+1) - 64;
            // ZigZag decoding
            x = (x >> 1) ^ (-(x & 1));
            y = (y >> 1) ^ (-(y & 1));
            // Delta deocding
            x += prevX;
            y += prevY;
            prevX = x;
            prevY = y;
            // Dequantize
            result.push([x / 1024, y / 1024]);
        }
        return result;
    }
    var mapParams = {
        'none': {
            getGeoJson: function(callback) {
                callback({
                    type: 'FeatureCollection',
                    features: [{
                        type: 'Feature',
                        geometry: {
                            coordinates: [],
                            encodeOffsets: [],
                            type: 'Polygon'
                        },
                        properties: {
                            
                        }
                    }]
                });
            }
        },
        'world': {
            getGeoJson: function (callback) { 
                require(['./geoJson/world_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        'china': {
            getGeoJson: function (callback) { 
                require(['./geoJson/china_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '南海诸岛': {
            textCoord: [126, 25],
            getPath: function (leftTop, scale) {
                // scale.x: width  = 10.51 : 64
                var pList = [
                    [
                        [0,3.5],[7,11.2],[15,11.9],[30,7],[42,0.7],[52,0.7],
                        [56,7.7],[59,0.7],[64,0.7],[64,0],[5,0],[0,3.5]
                    ],
                    [
                        [13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]
                    ],
                    [
                        [12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]
                    ],
                    [
                        [16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]
                    ],
                    [
                        [6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]
                    ],
                    [
                        [23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]
                    ],
                    [
                        [37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]
                    ],
                    [
                        [48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]
                    ],
                    [
                        [51,35],[51,28.7],[53,28.7],[53,35],[51,35]
                    ],
                    [
                        [52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]
                    ],
                    [
                        [58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]
                    ],
                    [
                        [0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],
                        [1,92.4],[1,3.5],[0,3.5]
                    ]
                ];
                var str = '';
                var left = leftTop[0];
                var top = leftTop[1];
                for (var i = 0, l = pList.length; i < l; i++) {
                    str += 'M ' 
                           + ((pList[i][0][0] * scale+ left).toFixed(2) - 0) 
                           + ' ' 
                           + ((pList[i][0][1] * scale + top).toFixed(2) - 0) 
                           + ' ';
                    for (var j = 1, k = pList[i].length; j < k; j++) {
                        str += 'L ' 
                              + ((pList[i][j][0] * scale + left).toFixed(2) - 0)
                              + ' ' 
                              + ((pList[i][j][1] * scale + top).toFixed(2) - 0)
                              + ' ';
                    }
                }
                return str + ' Z';
            }
        },
        '新疆': {
            getGeoJson: function (callback) { 
                require(['./geoJson/xin_jiang_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '西藏': {
            getGeoJson: function (callback) { 
                require(['./geoJson/xi_zang_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '内蒙古': {
            getGeoJson: function (callback) { 
                require(['./geoJson/nei_meng_gu_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '青海': {
            getGeoJson: function (callback) { 
                require(['./geoJson/qing_hai_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '四川': {
            getGeoJson: function (callback) { 
                require(['./geoJson/si_chuan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '黑龙江': {
            getGeoJson: function (callback) { 
                require(['./geoJson/hei_long_jiang_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '甘肃': {
            getGeoJson: function (callback) { 
                require(['./geoJson/gan_su_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '云南': {
            getGeoJson: function (callback) { 
                require(['./geoJson/yun_nan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '广西': {
            getGeoJson: function (callback) { 
                require(['./geoJson/guang_xi_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '湖南': {
            getGeoJson: function (callback) { 
                require(['./geoJson/hu_nan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '陕西': {
            getGeoJson: function (callback) { 
                require(['./geoJson/shan_xi_1_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '广东': {
            getGeoJson: function (callback) { 
                require(['./geoJson/guang_dong_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '吉林': {
            getGeoJson: function (callback) { 
                require(['./geoJson/ji_lin_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '河北': {
            getGeoJson: function (callback) { 
                require(['./geoJson/he_bei_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '湖北': {
            getGeoJson: function (callback) { 
                require(['./geoJson/hu_bei_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '贵州': {
            getGeoJson: function (callback) { 
                require(['./geoJson/gui_zhou_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '山东': {
            getGeoJson: function (callback) { 
                require(['./geoJson/shan_dong_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '江西': {
            getGeoJson: function (callback) { 
                require(['./geoJson/jiang_xi_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '河南': {
            getGeoJson: function (callback) { 
                require(['./geoJson/he_nan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '辽宁': {
            getGeoJson: function (callback) { 
                require(['./geoJson/liao_ning_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '山西': {
            getGeoJson: function (callback) { 
                require(['./geoJson/shan_xi_2_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '安徽': {
            getGeoJson: function (callback) { 
                require(['./geoJson/an_hui_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '福建': {
            getGeoJson: function (callback) { 
                require(['./geoJson/fu_jian_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '浙江': {
            getGeoJson: function (callback) { 
                require(['./geoJson/zhe_jiang_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '江苏': {
            getGeoJson: function (callback) { 
                require(['./geoJson/jiang_su_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '重庆': {
            getGeoJson: function (callback) { 
                require(['./geoJson/chong_qing_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '宁夏': {
            getGeoJson: function (callback) { 
                require(['./geoJson/ning_xia_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '海南': {
            getGeoJson: function (callback) { 
                require(['./geoJson/hai_nan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '台湾': {
            getGeoJson: function (callback) { 
                require(['./geoJson/tai_wan_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '北京': {
            getGeoJson: function (callback) { 
                require(['./geoJson/bei_jing_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '天津': {
            getGeoJson: function (callback) { 
                require(['./geoJson/tian_jin_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '上海': {
            getGeoJson: function (callback) { 
                require(['./geoJson/shang_hai_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '香港': {
            getGeoJson: function (callback) { 
                require(['./geoJson/xiang_gang_geo'], function (md){
                    callback(decode(md));
                });
            }
        },
        '澳门': {
            getGeoJson: function (callback) { 
                require(['./geoJson/ao_men_geo'], function (md){
                    callback(decode(md));
                });
            }
        }
    };
    
    return {
        decode: decode,
        params: mapParams
    };
});

+ 96 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/encode.js

@ -0,0 +1,96 @@
//docs.google.com/presentation/d/1XgKaFEgPIzF2psVgY62-KnylV81gsjCWu999h4QtaOE/
var fs = require('fs');
var glob = require('glob');
glob('geoJson/*.json', {}, function (err, files) {
    files.forEach(function (file) {
        var output = '../' + file.replace('.json', '.js');
        var rawStr = fs.readFileSync(file, 'utf8');
        var json = JSON.parse(rawStr);
        console.log(output);
        // Meta tag
        json.UTF8Encoding = true;
        var features = json.features;
        if (!features) {
            return;
        }
        features.forEach(function (feature){
            var encodeOffsets = feature.geometry.encodeOffsets = [];
            var coordinates = feature.geometry.coordinates;
            if (feature.geometry.type === 'Polygon') {
                coordinates.forEach(function (coordinate, idx){
                    coordinates[idx] = encodePolygon(
                        coordinate, encodeOffsets[idx] = []
                    );
                });
            } else if(feature.geometry.type === 'MultiPolygon') {
                coordinates.forEach(function (polygon, idx1){
                    encodeOffsets[idx1] = [];
                    polygon.forEach(function (coordinate, idx2) {
                        coordinates[idx1][idx2] = encodePolygon(
                            coordinate, encodeOffsets[idx1][idx2] = []
                        );
                    });
                });
            }
        });
        fs.writeFileSync(
            output, addAMDWrapper(JSON.stringify(json)), 'utf8'
        );
    });
});
function encodePolygon(coordinate, encodeOffsets) {
    var result = '';
    var prevX = quantize(coordinate[0][0]);
    var prevY = quantize(coordinate[0][1]);
    // Store the origin offset
    encodeOffsets[0] = prevX;
    encodeOffsets[1] = prevY;
    for (var i = 0; i < coordinate.length; i++) {
        var point = coordinate[i];
        result+=encode(point[0], prevX);
        result+=encode(point[1], prevY);
        prevX = quantize(point[0]);
        prevY = quantize(point[1]);
    }
    return result;
}
function addAMDWrapper(jsonStr) {
    return ['define(function() {',
                '    return ' + jsonStr + ';',
            '});'].join('\n');
}
function encode(val, prev){
    // Quantization
    val = quantize(val);
    // var tmp = val;
    // Delta
    val = val - prev;
    if (((val << 1) ^ (val >> 15)) + 64 === 8232) { 
        //WTF, 8232 will get syntax error in js code
        val--;
    }
    // ZigZag
    val = (val << 1) ^ (val >> 15);
    // add offset and get unicode
    return String.fromCharCode(val+64);
    // var tmp = {'tmp' : str};
    // try{
    //     eval("(" + JSON.stringify(tmp) + ")");
    // }catch(e) {
    //     console.log(val + 64);
    // }
}
function quantize(val) {
    return Math.ceil(val * 1024);
}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/an_hui_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/ao_men_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/bei_jing_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/china_city.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/china_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/chong_qing_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/fu_jian_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/gan_su_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/guang_dong_geo.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/guang_xi_geo.json


+ 0 - 0
patient-co-manage/redis-cache/src/main/webapp/static/develop/lib/plugin/echarts/2.2.7/js/util/mapData/rawData/geoJson/gui_zhou_geo.json


Vissa filer visades inte eftersom för många filer har ändrats