dingxin 6 years ago
parent
commit
d3dc746c9d
61 changed files with 1118 additions and 412 deletions
  1. 11
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKConstant.java
  2. 69
    25
      CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKOpenApi.java
  3. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AssembleController.java
  4. 7
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BannerController.java
  5. 9
    9
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FaceController.java
  6. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VistorController.java
  7. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  8. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/ToBannerMapper.java
  9. 8
    8
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaVisitor.java
  10. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BannerServiceI.java
  11. 5
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/FaceServiceI.java
  12. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BannerServiceImpl.java
  13. 20
    20
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java
  14. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVistorServiceImpl.java
  15. 3
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  16. 15
    15
      CODE/smart-community/app-api/src/main/resources/mapper/TaVisitorMapper.xml
  17. 5
    2
      CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml
  18. 1
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  19. 0
    74
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/PhoneCodeImpl.java
  20. 1
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/runner/MqRunner.java
  21. 16
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/OperateApplication.java
  22. 2
    6
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/config/HttpSessionConfig.java
  23. 20
    0
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/AppUserController.java
  24. 2
    2
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  25. 7
    4
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ToBanner.java
  26. 50
    6
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ToBannerServiceImpl.java
  27. 3
    3
      CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml
  28. 1
    1
      VUECODE/smart-operate-manage/config/dev.env.js
  29. 1
    2
      VUECODE/smart-operate-manage/config/index.js
  30. 17
    0
      VUECODE/smart-operate-manage/src/api/index.js
  31. BIN
      VUECODE/smart-operate-manage/src/assets/light1.png
  32. BIN
      VUECODE/smart-operate-manage/src/assets/light2.png
  33. BIN
      VUECODE/smart-operate-manage/src/assets/light3.png
  34. BIN
      VUECODE/smart-operate-manage/src/assets/light4.png
  35. 2
    2
      VUECODE/smart-operate-manage/src/components/chart/chart1.vue
  36. 12
    9
      VUECODE/smart-operate-manage/src/components/chart/chart2.vue
  37. 24
    5
      VUECODE/smart-operate-manage/src/components/chart/chart3.vue
  38. 82
    113
      VUECODE/smart-operate-manage/src/components/chart/chart4.vue
  39. 62
    16
      VUECODE/smart-operate-manage/src/components/chart/chart5.vue
  40. 34
    2
      VUECODE/smart-operate-manage/src/components/chart/chart6.vue
  41. 32
    0
      VUECODE/smart-operate-manage/src/components/chart/chart7.vue
  42. 1
    0
      VUECODE/smart-operate-manage/src/icons/svg/banner.svg
  43. 1
    0
      VUECODE/smart-operate-manage/src/icons/svg/community.svg
  44. 1
    0
      VUECODE/smart-operate-manage/src/icons/svg/communitydata.svg
  45. 1
    0
      VUECODE/smart-operate-manage/src/icons/svg/index.svg
  46. 1
    0
      VUECODE/smart-operate-manage/src/icons/svg/operate.svg
  47. 1
    1
      VUECODE/smart-operate-manage/src/permission.js
  48. 10
    3
      VUECODE/smart-operate-manage/src/router/index.js
  49. 2
    1
      VUECODE/smart-operate-manage/src/store/getters.js
  50. 3
    1
      VUECODE/smart-operate-manage/src/store/index.js
  51. 9
    4
      VUECODE/smart-operate-manage/src/store/modules/community.js
  52. 48
    0
      VUECODE/smart-operate-manage/src/store/modules/trunkIndex.js
  53. 1
    1
      VUECODE/smart-operate-manage/src/utils/auth.js
  54. 40
    7
      VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue
  55. 45
    11
      VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue
  56. 11
    11
      VUECODE/smart-operate-manage/src/views/banner/index.vue
  57. 292
    0
      VUECODE/smart-operate-manage/src/views/banner/infoBanner/index.vue
  58. 69
    10
      VUECODE/smart-operate-manage/src/views/community/communityTable.vue
  59. 1
    0
      VUECODE/smart-operate-manage/src/views/index/index.vue
  60. 16
    8
      VUECODE/smart-operate-manage/src/views/layout/components/Navbar.vue
  61. 35
    8
      VUECODE/smart-operate-manage/src/views/login/index.vue

+ 11
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKConstant.java View File

77
      * 根据设备UUID集异动下载门禁权限
77
      * 根据设备UUID集异动下载门禁权限
78
      */
78
      */
79
     public static final String DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS = "/openapi/service/acs/auth/downloadAuthorityByDeviceUuids";
79
     public static final String DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS = "/openapi/service/acs/auth/downloadAuthorityByDeviceUuids";
80
-    
80
+
81
+    /**
82
+     * 指定人员的门禁权限下载
83
+     */
84
+    public static final String DOWNLOAD_AUTHORITY_BY_PERSONIDS = "/openapi/service/acs/auth/downloadAuthorityByPersonIds";
85
+
86
+    /**
87
+     * 分页获取计划模板
88
+     */
89
+    public static final String GETPLANS = "/openapi/service/acs/plan/getPlans";
90
+
81
     /**
91
     /**
82
      * 指定人员人脸/指纹权限下载
92
      * 指定人员人脸/指纹权限下载
83
      */
93
      */

+ 69
- 25
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKOpenApi.java View File

346
         //设置时间参数
346
         //设置时间参数
347
         parMap.put("time", System.currentTimeMillis());
347
         parMap.put("time", System.currentTimeMillis());
348
         parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
348
         parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
349
-        parMap.put("deviceUuids","57231a05fd3b45f7a2570a28a85821c4,efcb9a3fe4e64e2f9c0f546c54465524,9da7c0073138453fa7782b629743cff7,85c22fde220d4b35ac13f805f05fd04c");
349
+        parMap.put("deviceUuids","83dfab0eef52411d991d6e621296b60a,dfd80b22f00545b8b36fa981019df83c,8bb843f484544998a01f73c545b8e07b,8bb843f484544998a01f73c545b8e07b");
350
         String params =  JSON.toJSONString(parMap);
350
         String params =  JSON.toJSONString(parMap);
351
         log.info("根据设备UUID集异动下载门禁权限请求参数:{}", params);
351
         log.info("根据设备UUID集异动下载门禁权限请求参数:{}", params);
352
         String data = null;
352
         String data = null;
362
         return data;
362
         return data;
363
     }
363
     }
364
 
364
 
365
+    /**
366
+     * 指定人员的门禁权限下载
367
+     *
368
+     * @param personIds 人员ID, 多个用 "," 隔开
369
+     * @return
370
+     */
371
+    public static String downloadAuthorityByPersonIds(String personIds){
372
+        Map<String,Object> parMap = Maps.newHashMap();
373
+        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOAD_AUTHORITY_BY_PERSONIDS;
374
+        //设置APPKEY
375
+        parMap.put("appkey", HKConstant.APPKEY);
376
+        //设置时间参数
377
+        parMap.put("time", System.currentTimeMillis());
378
+        parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
379
+        parMap.put("personIds",personIds);
380
+        parMap.put("doorUuids","57231a05fd3b45f7a2570a28a85821c4,efcb9a3fe4e64e2f9c0f546c54465524,9da7c0073138453fa7782b629743cff7,85c22fde220d4b35ac13f805f05fd04c");
381
+        parMap.put("planUuid","plan0000000000000000000000000001");
382
+        parMap.put("operateType",1);
383
+        parMap.put("includeFinger",1);
384
+        String params =  JSON.toJSONString(parMap);
385
+        log.info("指定人员的门禁权限下载请求参数:{}", params);
386
+        String data = null;
387
+        try {
388
+            data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, params, HKConstant.SECRET), params);
389
+            log.info("获取 指定人员的门禁权限下载 请求返回结果:{}",data);
390
+        } catch (Exception e) {
391
+            e.printStackTrace();
392
+            log.error("指定人员的门禁权限下载获取失败!",e);
393
+            throw new RuntimeException("指定人员的门禁权限下载获取失败!");
394
+        }
395
+
396
+        return data;
397
+    }
398
+
399
+    /**
400
+     * 分页获取计划模板
401
+     *
402
+     * @param pageNo 第几页
403
+     * @param pageSize 一页多少行
404
+     * @return
405
+     */
406
+    public static String getPlans(Integer pageNo, Integer pageSize) {
407
+
408
+        Map<String,Object> parMap = Maps.newHashMap();
409
+        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GETPLANS;
410
+        //设置APPKEY
411
+        parMap.put("appkey", HKConstant.APPKEY);
412
+        //设置时间参数
413
+        parMap.put("time", System.currentTimeMillis());
414
+        parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
415
+        parMap.put("pageNo",pageNo);
416
+        parMap.put("pageSize",pageSize);
417
+        String params =  JSON.toJSONString(parMap);
418
+        log.info("分页获取计划模板请求参数:{}", params);
419
+        String data = null;
420
+        try {
421
+            data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, params, HKConstant.SECRET), params);
422
+            log.info("获取 分页获取计划模板 请求返回结果:{}",data);
423
+        } catch (Exception e) {
424
+            e.printStackTrace();
425
+            log.error("分页获取计划模板获取失败!",e);
426
+            throw new RuntimeException("分页获取计划模板获取失败!");
427
+        }
428
+
429
+        return data;
430
+    }
431
+
365
     /**
432
     /**
366
      * 指定人员人脸/指纹权限下载
433
      * 指定人员人脸/指纹权限下载
367
      * @return
434
      * @return
374
         //设置时间参数
441
         //设置时间参数
375
         parMap.put("time", System.currentTimeMillis());
442
         parMap.put("time", System.currentTimeMillis());
376
         parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
443
         parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
377
-        parMap.put("deviceUuids","83dfab0eef52411d991d6e621296b60a,dfd80b22f00545b8b36fa981019df83c");
444
+        parMap.put("deviceUuids","83dfab0eef52411d991d6e621296b60a,dfd80b22f00545b8b36fa981019df83c,6d4b9c4ad10b47bdbdccd8710c4d1d71,765532274ae84f9bb495d801444a7f1e");
378
         parMap.put("personIds",personIds);
445
         parMap.put("personIds",personIds);
379
         parMap.put("type",1);
446
         parMap.put("type",1);
380
         String params =  JSON.toJSONString(parMap);
447
         String params =  JSON.toJSONString(parMap);
543
     }
610
     }
544
     
611
     
545
     public static void main(String[] args) {
612
     public static void main(String[] args) {
546
-        Map<String,Object> parMap = Maps.newHashMap();
547
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + "/openapi/service/eps/subscribeEventsFromMQEx";
548
-        //设置APPKEY
549
-        parMap.put("appkey", HKConstant.APPKEY);
550
-        //设置时间参数
551
-        parMap.put("time", System.currentTimeMillis());
552
-        parMap.put("opUserUuid",HKConstant.OP_USER_UUID);
553
-        parMap.put("eventTypes","198914,199941");
554
-        //parMap.put("subSystemUuid","3145728");
555
-        String params =  JSON.toJSONString(parMap);
556
-        log.info("分页获取门禁点信息请求参数:{}", params);
557
-        String data = null;
558
-        try {
559
-            data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, params, HKConstant.SECRET), params);
560
-            log.info(" 请求返回结果:{}",data);
561
-        } catch (Exception e) {
562
-            e.printStackTrace();
563
-            log.error("获取失败!",e);
564
-            throw new RuntimeException("获取失败!");
565
-        }
566
-
567
-        System.out.println(data);
568
-
569
     }
613
     }
570
 
614
 
571
 }
615
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AssembleController.java View File

61
 		//获取菜单数据
61
 		//获取菜单数据
62
 		List<TaSysMenu> menuList = menuService.getMenuList(communityId);
62
 		List<TaSysMenu> menuList = menuService.getMenuList(communityId);
63
 		//获取首页banner数据
63
 		//获取首页banner数据
64
-		List<ToBanner> toBannerList = bannerService.viewAllBannerImg();
64
+		List<ToBanner> toBannerList = bannerService.viewAllBannerImg(1);
65
 		//获取消息总数接口
65
 		//获取消息总数接口
66
 		Map<String,Object> totalMap = messageService.getMessageTotal(communityId, userId);
66
 		Map<String,Object> totalMap = messageService.getMessageTotal(communityId, userId);
67
 		
67
 		

+ 7
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BannerController.java View File

33
     @Autowired
33
     @Autowired
34
     private BannerServiceI bannerService;
34
     private BannerServiceI bannerService;
35
 
35
 
36
-    @ApiOperation(value = "首页运营banner接口", notes = "获取首页运营banner")
36
+    @ApiOperation(value = "获取首页运营banner接口详情", notes = "获取首页运营banner详情")
37
     @RequestMapping(value = "/banner/{bannerId}", method = RequestMethod.GET)
37
     @RequestMapping(value = "/banner/{bannerId}", method = RequestMethod.GET)
38
     @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "bannerId", value = "运营banner图Id") })
38
     @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "bannerId", value = "运营banner图Id") })
39
     public ResponseBean selectToBannerImg(@PathVariable("bannerId")Integer bannerId){
39
     public ResponseBean selectToBannerImg(@PathVariable("bannerId")Integer bannerId){
43
         return responseBean;
43
         return responseBean;
44
     }
44
     }
45
 
45
 
46
-    @ApiOperation(value = "首页运营所有banner接口", notes = "获取首页所有运营banner")
46
+    @ApiOperation(value = "获取首页运营所有banner接口", notes = "获取首页所有运营banner")
47
+    @ApiImplicitParams({
48
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "bannerPosition", value = "banner位: 1首页banner 2服务端banner")
49
+    })
47
     @RequestMapping(value = "/banners", method = RequestMethod.GET)
50
     @RequestMapping(value = "/banners", method = RequestMethod.GET)
48
-    public ResponseBean selectAllToBannerImg(){
51
+    public ResponseBean selectAllToBannerImg(@RequestParam Integer bannerPosition){
49
         ResponseBean responseBean = new ResponseBean();
52
         ResponseBean responseBean = new ResponseBean();
50
-        List<ToBanner> toBannerList = bannerService.viewAllBannerImg();
53
+        List<ToBanner> toBannerList = bannerService.viewAllBannerImg(bannerPosition);
51
         responseBean.addSuccess(toBannerList);
54
         responseBean.addSuccess(toBannerList);
52
         return responseBean;
55
         return responseBean;
53
     }
56
     }

+ 9
- 9
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FaceController.java View File

26
     @ApiOperation(value = "添加人脸图片", notes = "添加人脸图片")
26
     @ApiOperation(value = "添加人脸图片", notes = "添加人脸图片")
27
     @ApiImplicitParams({
27
     @ApiImplicitParams({
28
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
28
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
29
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserID",value = "家属或租户ID,不填为本人")
29
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserId",value = "家属或租户ID,不填为本人")
30
     })
30
     })
31
     
31
     
32
     @RequestMapping(value = "/addFace",method = RequestMethod.POST)
32
     @RequestMapping(value = "/addFace",method = RequestMethod.POST)
33
     public Object getTaFace(HttpSession session,
33
     public Object getTaFace(HttpSession session,
34
                             @ApiParam(value = "file" ,required = true) MultipartFile uploadFile,
34
                             @ApiParam(value = "file" ,required = true) MultipartFile uploadFile,
35
-                            @RequestParam(required = false) Integer otherUserID){
35
+                            @RequestParam(required = false) Integer otherUserId){
36
         ResponseBean responseBean = new ResponseBean();
36
         ResponseBean responseBean = new ResponseBean();
37
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
37
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
38
         Integer userId = userElement.getId();
38
         Integer userId = userElement.getId();
39
-        responseBean = faceServicel.addFace(userId ,uploadFile,otherUserID);
39
+        responseBean = faceServicel.addFace(userId ,uploadFile,otherUserId);
40
         return responseBean;
40
         return responseBean;
41
     }
41
     }
42
 
42
 
43
     @ApiOperation(value = "修改人脸图片", notes = "修改人脸图片")
43
     @ApiOperation(value = "修改人脸图片", notes = "修改人脸图片")
44
     @ApiImplicitParams({
44
     @ApiImplicitParams({
45
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
45
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
46
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserID",value = "家属或租户ID,不填为本人")
46
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserId",value = "家属或租户ID,不填为本人")
47
     })
47
     })
48
     @RequestMapping(value = "/upDateFace",method = RequestMethod.POST)
48
     @RequestMapping(value = "/upDateFace",method = RequestMethod.POST)
49
     public Object upDateTaFace(HttpSession session,
49
     public Object upDateTaFace(HttpSession session,
50
                                @ApiParam(value = "file" ,required = true) MultipartFile uploadFile,
50
                                @ApiParam(value = "file" ,required = true) MultipartFile uploadFile,
51
-                               @RequestParam(required = false) Integer otherUserID
51
+                               @RequestParam(required = false) Integer otherUserId
52
                                ){
52
                                ){
53
         ResponseBean responseBean = new ResponseBean();
53
         ResponseBean responseBean = new ResponseBean();
54
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
54
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
55
         Integer userId = userElement.getId();
55
         Integer userId = userElement.getId();
56
-         responseBean = faceServicel.upDateFace(userId,uploadFile,otherUserID);
56
+         responseBean = faceServicel.upDateFace(userId,uploadFile,otherUserId);
57
         return responseBean;
57
         return responseBean;
58
     }
58
     }
59
 
59
 
60
     @ApiOperation(value = "获取当前已录入人脸信息", notes = "获取当前已录入人脸信息")
60
     @ApiOperation(value = "获取当前已录入人脸信息", notes = "获取当前已录入人脸信息")
61
     @ApiImplicitParams({
61
     @ApiImplicitParams({
62
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
62
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
63
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserID",value = "家属或租户ID,不填为本人")
63
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "otherUserId",value = "家属或租户ID,不填为本人")
64
     })
64
     })
65
     @RequestMapping(value = "/getUserIdFace",method = RequestMethod.GET)
65
     @RequestMapping(value = "/getUserIdFace",method = RequestMethod.GET)
66
-    public Object getTaFaceByUserId(HttpSession session, @RequestParam(required = false) Integer otherUserID){
66
+    public Object getTaFaceByUserId(HttpSession session, @RequestParam(required = false) Integer otherUserId){
67
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
67
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
68
         Integer userId = userElement.getId();
68
         Integer userId = userElement.getId();
69
-        ResponseBean responseBean = faceServicel.getTaFaceByUserId(userId,otherUserID);
69
+        ResponseBean responseBean = faceServicel.getTaFaceByUserId(userId,otherUserId);
70
         return responseBean;
70
         return responseBean;
71
     }
71
     }
72
 
72
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VistorController.java View File

38
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
38
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
39
             @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
39
             @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
40
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "parameter", value = "carLicense:车牌(数组),drivingStatus:0 是不开车 1是开车," +
40
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "parameter", value = "carLicense:车牌(数组),drivingStatus:0 是不开车 1是开车," +
41
-                    "visitorName:访问人姓名,visitorNum:访问人数,visitorTel:访问人电话,visitorStatrtTime:访问人电话,visitorEndTime:访问人结束时间")})
41
+                    "visitorName:访问人姓名,visitorNum:访问人数,visitorTel:访问人电话,visitorStartTime:访问人电话,visitorEndTime:访问人结束时间")})
42
     public ResponseBean findVistorDetail(@PathVariable("communityId")Integer communityId, @RequestBody String parameter, HttpSession session) {
42
     public ResponseBean findVistorDetail(@PathVariable("communityId")Integer communityId, @RequestBody String parameter, HttpSession session) {
43
         ResponseBean responseBean = new ResponseBean();
43
         ResponseBean responseBean = new ResponseBean();
44
 
44
 

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java View File

52
     /**
52
     /**
53
      * 判断当前用户的关联关系
53
      * 判断当前用户的关联关系
54
      * @param userId
54
      * @param userId
55
-     * @param otherUserID
55
+     * @param otherUserId
56
      * @return
56
      * @return
57
      */
57
      */
58
-    TaUser selectTaFaceParentId(@Param("id") Integer userId, @Param("otherUserID")Integer otherUserID);
58
+    TaUser selectTaFaceParentId(@Param("id") Integer userId, @Param("otherUserId")Integer otherUserId);
59
 
59
 
60
     /**
60
     /**
61
      * 查询此电话在小区是否存在
61
      * 查询此电话在小区是否存在

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/ToBannerMapper.java View File

11
 
11
 
12
     ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId, @Param("nowTime") String nowTime);
12
     ToBanner selectByCommunityId(@Param("bannerId") Integer bannerId, @Param("nowTime") String nowTime);
13
 
13
 
14
-    List<ToBanner> selectAllByNum(@Param("nowTime") String nowTime, @Param("num")Integer num);
14
+    List<ToBanner> selectAllByNum(@Param("nowTime") String nowTime, @Param("num")Integer num, @Param("bannerPosition") Integer bannerPosition);
15
 }
15
 }

+ 8
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaVisitor.java View File

14
 
14
 
15
     private String visitorNum;
15
     private String visitorNum;
16
 
16
 
17
-    private Date visitorStatrtTime;
17
+    private Date visitorStartTime;
18
 
18
 
19
     private Date visitorEndTime;
19
     private Date visitorEndTime;
20
 
20
 
75
     public void setVisitorNum(String visitorNum) {
75
     public void setVisitorNum(String visitorNum) {
76
         this.visitorNum = visitorNum == null ? null : visitorNum.trim();
76
         this.visitorNum = visitorNum == null ? null : visitorNum.trim();
77
     }
77
     }
78
-
79
-    public Date getVisitorStatrtTime() {
80
-        return visitorStatrtTime;
78
+    
79
+    public Date getVisitorStartTime() {
80
+        return visitorStartTime;
81
     }
81
     }
82
-
83
-    public void setVisitorStatrtTime(Date visitorStatrtTime) {
84
-        this.visitorStatrtTime = visitorStatrtTime;
82
+    
83
+    public void setVisitorStartTime(Date visitorStartTime) {
84
+        this.visitorStartTime = visitorStartTime;
85
     }
85
     }
86
-
86
+    
87
     public Date getVisitorEndTime() {
87
     public Date getVisitorEndTime() {
88
         return visitorEndTime;
88
         return visitorEndTime;
89
     }
89
     }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BannerServiceI.java View File

12
 public interface BannerServiceI {
12
 public interface BannerServiceI {
13
 
13
 
14
     ToBanner viewBannerImg(Integer bannerId);
14
     ToBanner viewBannerImg(Integer bannerId);
15
-    List<ToBanner> viewAllBannerImg();
15
+    List<ToBanner> viewAllBannerImg(Integer bannerPosition);
16
 }
16
 }

+ 5
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/FaceServiceI.java View File

9
      * 添加人脸
9
      * 添加人脸
10
      * @param userId 登入人ID
10
      * @param userId 登入人ID
11
      *  @param  uploadFile
11
      *  @param  uploadFile
12
-     *  @param otherUserID 关联家属或者租客ID
12
+     *  @param otherUserId 关联家属或者租客ID
13
      * @return
13
      * @return
14
      */
14
      */
15
-    ResponseBean addFace(Integer userId ,MultipartFile uploadFile,Integer otherUserID);
15
+    ResponseBean addFace(Integer userId ,MultipartFile uploadFile,Integer otherUserId);
16
 
16
 
17
     /**
17
     /**
18
      * 更新当前人脸
18
      * 更新当前人脸
19
      * @param userId 登入人ID
19
      * @param userId 登入人ID
20
      *  @param  uploadFile
20
      *  @param  uploadFile
21
-     *  @param otherUserID 关联家属或者租客ID
21
+     *  @param otherUserId 关联家属或者租客ID
22
      * @return
22
      * @return
23
      */
23
      */
24
-    ResponseBean upDateFace(Integer userId ,MultipartFile uploadFile,Integer otherUserID);
24
+    ResponseBean upDateFace(Integer userId ,MultipartFile uploadFile,Integer otherUserId);
25
 
25
 
26
     /**
26
     /**
27
      * 当前登入人是否有人脸信息
27
      * 当前登入人是否有人脸信息
28
      * @param userId
28
      * @param userId
29
      * @return
29
      * @return
30
      */
30
      */
31
-    ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserID);
31
+    ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId);
32
 }
32
 }

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BannerServiceImpl.java View File

32
     }
32
     }
33
 
33
 
34
     @Override
34
     @Override
35
-    public List<ToBanner> viewAllBannerImg() {
35
+    public List<ToBanner> viewAllBannerImg(Integer bannerPosition) {
36
         //查询轮播图数量
36
         //查询轮播图数量
37
         Integer bannerNum = tpCarouselSettingMapper.selectCarouselNum(Constant.BANNER);
37
         Integer bannerNum = tpCarouselSettingMapper.selectCarouselNum(Constant.BANNER);
38
 
38
 
39
         String nowTime = DateUtils.getDate("yyyy-MM-dd");
39
         String nowTime = DateUtils.getDate("yyyy-MM-dd");
40
-        return toBannerMapper.selectAllByNum(nowTime, bannerNum);
40
+        return toBannerMapper.selectAllByNum(nowTime, bannerNum, bannerPosition);
41
     }
41
     }
42
 }
42
 }

+ 20
- 20
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java View File

40
 
40
 
41
     @Override
41
     @Override
42
     @Transactional(rollbackFor = Exception.class)
42
     @Transactional(rollbackFor = Exception.class)
43
-    public ResponseBean addFace(Integer userid, MultipartFile uploadFile,Integer otherUserID) {
43
+    public ResponseBean addFace(Integer userid, MultipartFile uploadFile,Integer otherUserId) {
44
         ResponseBean responseBean= new ResponseBean();
44
         ResponseBean responseBean= new ResponseBean();
45
          String faceImg =img(uploadFile);
45
          String faceImg =img(uploadFile);
46
-        /**当otherUserID不为空时判断它是否是业主下的租客或者家属*/
47
-        if (null!= otherUserID && !userid.equals(otherUserID)) {
48
-                 responseBean = getTaFaceParentId(userid, otherUserID);
46
+        /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
47
+        if (null!= otherUserId && !userid.equals(otherUserId)) {
48
+                 responseBean = getTaFaceParentId(userid, otherUserId);
49
             if ("1".equals(responseBean.getCode())){
49
             if ("1".equals(responseBean.getCode())){
50
                 responseBean.getMessage();
50
                 responseBean.getMessage();
51
                 return responseBean;
51
                 return responseBean;
52
             }
52
             }
53
         }
53
         }
54
-            Integer activeUser = otherUserID == null?userid:otherUserID;
54
+            Integer activeUser = otherUserId == null?userid:otherUserId;
55
             TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
55
             TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
56
             TaFace taFace = new TaFace();
56
             TaFace taFace = new TaFace();
57
             taFace.setFaceImg(faceImg);
57
             taFace.setFaceImg(faceImg);
63
             taFace.setUpdateDate(new Date());
63
             taFace.setUpdateDate(new Date());
64
 
64
 
65
         /*验证身份*/
65
         /*验证身份*/
66
-        responseBean=addVerify( activeUser,  uploadFile, otherUserID, faceImg, taFace) ;
66
+        responseBean=addVerify( activeUser,  uploadFile, otherUserId, faceImg, taFace) ;
67
         return responseBean;
67
         return responseBean;
68
     }
68
     }
69
 
69
 
71
      * 修改人脸信息
71
      * 修改人脸信息
72
       * @param userId 登入人ID
72
       * @param userId 登入人ID
73
      * @param  uploadFile
73
      * @param  uploadFile
74
-     * @param otherUserID 关联家属或者租客ID
74
+     * @param otherUserId 关联家属或者租客ID
75
      * @return
75
      * @return
76
      */
76
      */
77
     @Override
77
     @Override
78
     @Transactional(rollbackFor = Exception.class)
78
     @Transactional(rollbackFor = Exception.class)
79
-    public ResponseBean upDateFace(Integer userId, MultipartFile uploadFile,Integer otherUserID) {
79
+    public ResponseBean upDateFace(Integer userId, MultipartFile uploadFile,Integer otherUserId) {
80
         boolean isA = false;
80
         boolean isA = false;
81
       ResponseBean responseBean= new ResponseBean();
81
       ResponseBean responseBean= new ResponseBean();
82
         String faceImg =img(uploadFile);
82
         String faceImg =img(uploadFile);
83
-        if (null!= otherUserID && !userId.equals(otherUserID)) {
84
-                 responseBean = getTaFaceParentId(userId, otherUserID);
83
+        if (null!= otherUserId && !userId.equals(otherUserId)) {
84
+                 responseBean = getTaFaceParentId(userId, otherUserId);
85
             if ("1".equals(responseBean.getCode())) {
85
             if ("1".equals(responseBean.getCode())) {
86
                 responseBean.getMessage();
86
                 responseBean.getMessage();
87
                 return responseBean;
87
                 return responseBean;
88
                }}
88
                }}
89
-            Integer activeUser = otherUserID == null?userId:otherUserID;
89
+            Integer activeUser = otherUserId == null?userId:otherUserId;
90
             //当前修改的id否存在
90
             //当前修改的id否存在
91
              TaFace face = taFaceMapper.getByUserId(activeUser);
91
              TaFace face = taFaceMapper.getByUserId(activeUser);
92
              if (null == face){
92
              if (null == face){
157
      *获得用户,租客,家属,其中一种身份的信息
157
      *获得用户,租客,家属,其中一种身份的信息
158
      */
158
      */
159
     @Override
159
     @Override
160
-    public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserID) {
160
+    public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId) {
161
         ResponseBean responseBean= new ResponseBean();
161
         ResponseBean responseBean= new ResponseBean();
162
-        /**当otherUserID不为空时判断它是否是业主下的租客或者家属*/
163
-        if (null!= otherUserID && !userId.equals(otherUserID)) {
164
-            responseBean = getTaFaceParentId(userId, otherUserID);
162
+        /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
163
+        if (null!= otherUserId && !userId.equals(otherUserId)) {
164
+            responseBean = getTaFaceParentId(userId, otherUserId);
165
             if ("1".equals(responseBean.getCode())) {
165
             if ("1".equals(responseBean.getCode())) {
166
                 responseBean.getMessage();
166
                 responseBean.getMessage();
167
                 return responseBean;
167
                 return responseBean;
168
             }
168
             }
169
         }
169
         }
170
-        Integer id = otherUserID == null?userId:otherUserID;
170
+        Integer id = otherUserId == null?userId:otherUserId;
171
         TaFace face = taFaceMapper.getByUserId(id);
171
         TaFace face = taFaceMapper.getByUserId(id);
172
          if (null!= face){
172
          if (null!= face){
173
             responseBean.addSuccess(face);
173
             responseBean.addSuccess(face);
181
     /**
181
     /**
182
      *判断当前用户下的人员关系(家属,租客)
182
      *判断当前用户下的人员关系(家属,租客)
183
      */
183
      */
184
-    public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserID){
184
+    public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserId){
185
        ResponseBean  responseBean= new ResponseBean();
185
        ResponseBean  responseBean= new ResponseBean();
186
-/*         TaUser user = taUserMapper.selectTaFaceParentId(userId,otherUserID);*/
187
-        TaUser  users= taUserMapper.selectByPrimaryKey(otherUserID);
186
+/*         TaUser user = taUserMapper.selectTaFaceParentId(userId,otherUserId);*/
187
+        TaUser  users= taUserMapper.selectByPrimaryKey(otherUserId);
188
         if (null!= users && !users.getParentId().equals(userId)){
188
         if (null!= users && !users.getParentId().equals(userId)){
189
             responseBean.addError("您输入的家属或租户ID有误");
189
             responseBean.addError("您输入的家属或租户ID有误");
190
             return responseBean;
190
             return responseBean;
208
     /**
208
     /**
209
      *各种身份校验
209
      *各种身份校验
210
      */
210
      */
211
-    public ResponseBean addVerify(Integer userid, MultipartFile uploadFile,Integer otherUserID,String faceImg,TaFace taFace) {
211
+    public ResponseBean addVerify(Integer userid, MultipartFile uploadFile,Integer otherUserId,String faceImg,TaFace taFace) {
212
         ResponseBean response = new ResponseBean();
212
         ResponseBean response = new ResponseBean();
213
         TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userid);
213
         TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userid);
214
         TaUser taUser = taUserMapper.selectByPrimaryKey(userid);
214
         TaUser taUser = taUserMapper.selectByPrimaryKey(userid);

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVistorServiceImpl.java View File

101
     private void temporaryRegister(Integer userId,TaVisitor visitor,ResponseBean response){
101
     private void temporaryRegister(Integer userId,TaVisitor visitor,ResponseBean response){
102
         TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
102
         TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
103
         String result = HKOpenApi.temporaryRegister(visitor.getVisitorName(),visitor.getVisitorTel(),
103
         String result = HKOpenApi.temporaryRegister(visitor.getVisitorName(),visitor.getVisitorTel(),
104
-                Integer.valueOf(visitor.getVisitorNum()),visitor.getVisitorStatrtTime().getTime(),
104
+                Integer.valueOf(visitor.getVisitorNum()),visitor.getVisitorStartTime().getTime(),
105
                 visitor.getVisitorEndTime().getTime(),taUser.getHkUserId());
105
                 visitor.getVisitorEndTime().getTime(),taUser.getHkUserId());
106
 
106
 
107
         JSONObject resultJSON = JSONObject.parseObject(result);
107
         JSONObject resultJSON = JSONObject.parseObject(result);

+ 3
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml View File

314
       <include refid="Base_Column_List" />
314
       <include refid="Base_Column_List" />
315
     from ta_user
315
     from ta_user
316
     where 1=1
316
     where 1=1
317
-    <if test="otherUserID != null" >
318
-     and id = #{otherUserID,jdbcType=INTEGER}
317
+    <if test="otherUserId != null" >
318
+     and id = #{otherUserId,jdbcType=INTEGER}
319
     </if>
319
     </if>
320
     <if test="id != null" >
320
     <if test="id != null" >
321
      and parent_id = #{id}
321
      and parent_id = #{id}
328
     <include refid="Base_Column_List" />
328
     <include refid="Base_Column_List" />
329
     from ta_user
329
     from ta_user
330
     where community_id = #{communityId,jdbcType=INTEGER}
330
     where community_id = #{communityId,jdbcType=INTEGER}
331
-    <if test="otherUserID != null" >
331
+    <if test="otherUserId != null" >
332
       and login_name = #{phone}
332
       and login_name = #{phone}
333
     </if>
333
     </if>
334
 
334
 

+ 15
- 15
CODE/smart-community/app-api/src/main/resources/mapper/TaVisitorMapper.xml View File

7
     <result column="visitor_name" property="visitorName" jdbcType="VARCHAR" />
7
     <result column="visitor_name" property="visitorName" jdbcType="VARCHAR" />
8
     <result column="visitor_tel" property="visitorTel" jdbcType="VARCHAR" />
8
     <result column="visitor_tel" property="visitorTel" jdbcType="VARCHAR" />
9
     <result column="visitor_num" property="visitorNum" jdbcType="VARCHAR" />
9
     <result column="visitor_num" property="visitorNum" jdbcType="VARCHAR" />
10
-    <result column="visitor_statrt_time" property="visitorStatrtTime" jdbcType="TIMESTAMP" />
10
+    <result column="visitor_start_time" property="visitorStartTime" jdbcType="TIMESTAMP" />
11
     <result column="visitor_end_time" property="visitorEndTime" jdbcType="TIMESTAMP" />
11
     <result column="visitor_end_time" property="visitorEndTime" jdbcType="TIMESTAMP" />
12
     <result column="driving_status" property="drivingStatus" jdbcType="CHAR" />
12
     <result column="driving_status" property="drivingStatus" jdbcType="CHAR" />
13
     <result column="pay_entity" property="payEntity" jdbcType="VARCHAR" />
13
     <result column="pay_entity" property="payEntity" jdbcType="VARCHAR" />
19
     <result column="update_darte" property="updateDate" jdbcType="TIMESTAMP" />
19
     <result column="update_darte" property="updateDate" jdbcType="TIMESTAMP" />
20
   </resultMap>
20
   </resultMap>
21
   <sql id="Base_Column_List" >
21
   <sql id="Base_Column_List" >
22
-    id, community_id, visitor_name, visitor_tel, visitor_num, visitor_statrt_time, visitor_end_time, 
22
+    id, community_id, visitor_name, visitor_tel, visitor_num, visitor_start_time, visitor_end_time,
23
     driving_status, pay_entity, visitor_code, ta_user_id, create_user, create_date, update_user, 
23
     driving_status, pay_entity, visitor_code, ta_user_id, create_user, create_date, update_user, 
24
     update_darte
24
     update_darte
25
   </sql>
25
   </sql>
35
   </delete>
35
   </delete>
36
   <insert id="insert" parameterType="com.community.huiju.model.TaVisitor" >
36
   <insert id="insert" parameterType="com.community.huiju.model.TaVisitor" >
37
     insert into ta_visitor (id, community_id, visitor_name, 
37
     insert into ta_visitor (id, community_id, visitor_name, 
38
-      visitor_tel, visitor_num, visitor_statrt_time, 
38
+      visitor_tel, visitor_num, visitor_start_time,
39
       visitor_end_time, driving_status, pay_entity, 
39
       visitor_end_time, driving_status, pay_entity, 
40
       visitor_code, ta_user_id, create_user, 
40
       visitor_code, ta_user_id, create_user, 
41
       create_date, update_user, update_darte
41
       create_date, update_user, update_darte
42
       )
42
       )
43
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{visitorName,jdbcType=VARCHAR}, 
43
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{visitorName,jdbcType=VARCHAR}, 
44
-      #{visitorTel,jdbcType=VARCHAR}, #{visitorNum,jdbcType=VARCHAR}, #{visitorStatrtTime,jdbcType=TIMESTAMP}, 
44
+      #{visitorTel,jdbcType=VARCHAR}, #{visitorNum,jdbcType=VARCHAR}, #{visitorStartTime,jdbcType=TIMESTAMP},
45
       #{visitorEndTime,jdbcType=TIMESTAMP}, #{drivingStatus,jdbcType=CHAR}, #{payEntity,jdbcType=VARCHAR},
45
       #{visitorEndTime,jdbcType=TIMESTAMP}, #{drivingStatus,jdbcType=CHAR}, #{payEntity,jdbcType=VARCHAR},
46
       #{visitorCode,jdbcType=VARCHAR}, #{taUserId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, 
46
       #{visitorCode,jdbcType=VARCHAR}, #{taUserId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, 
47
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
47
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
65
       <if test="visitorNum != null" >
65
       <if test="visitorNum != null" >
66
         visitor_num,
66
         visitor_num,
67
       </if>
67
       </if>
68
-      <if test="visitorStatrtTime != null" >
69
-        visitor_statrt_time,
68
+      <if test="visitorStartTime != null" >
69
+        visitor_start_time,
70
       </if>
70
       </if>
71
       <if test="visitorEndTime != null" >
71
       <if test="visitorEndTime != null" >
72
         visitor_end_time,
72
         visitor_end_time,
112
       <if test="visitorNum != null" >
112
       <if test="visitorNum != null" >
113
         #{visitorNum,jdbcType=VARCHAR},
113
         #{visitorNum,jdbcType=VARCHAR},
114
       </if>
114
       </if>
115
-      <if test="visitorStatrtTime != null" >
116
-        #{visitorStatrtTime,jdbcType=TIMESTAMP},
115
+      <if test="visitorStartTime != null" >
116
+        #{visitorStartTime,jdbcType=TIMESTAMP},
117
       </if>
117
       </if>
118
       <if test="visitorEndTime != null" >
118
       <if test="visitorEndTime != null" >
119
         #{visitorEndTime,jdbcType=TIMESTAMP},
119
         #{visitorEndTime,jdbcType=TIMESTAMP},
159
       <if test="visitorNum != null" >
159
       <if test="visitorNum != null" >
160
         visitor_num = #{visitorNum,jdbcType=VARCHAR},
160
         visitor_num = #{visitorNum,jdbcType=VARCHAR},
161
       </if>
161
       </if>
162
-      <if test="visitorStatrtTime != null" >
163
-        visitor_statrt_time = #{visitorStatrtTime,jdbcType=TIMESTAMP},
162
+      <if test="visitorStartTime != null" >
163
+        visitor_start_time = #{visitorStartTime,jdbcType=TIMESTAMP},
164
       </if>
164
       </if>
165
       <if test="visitorEndTime != null" >
165
       <if test="visitorEndTime != null" >
166
         visitor_end_time = #{visitorEndTime,jdbcType=TIMESTAMP},
166
         visitor_end_time = #{visitorEndTime,jdbcType=TIMESTAMP},
198
       visitor_name = #{visitorName,jdbcType=VARCHAR},
198
       visitor_name = #{visitorName,jdbcType=VARCHAR},
199
       visitor_tel = #{visitorTel,jdbcType=VARCHAR},
199
       visitor_tel = #{visitorTel,jdbcType=VARCHAR},
200
       visitor_num = #{visitorNum,jdbcType=VARCHAR},
200
       visitor_num = #{visitorNum,jdbcType=VARCHAR},
201
-      visitor_statrt_time = #{visitorStatrtTime,jdbcType=TIMESTAMP},
201
+      visitor_start_time = #{visitorStartTime,jdbcType=TIMESTAMP},
202
       visitor_end_time = #{visitorEndTime,jdbcType=TIMESTAMP},
202
       visitor_end_time = #{visitorEndTime,jdbcType=TIMESTAMP},
203
       driving_status = #{drivingStatus,jdbcType=CHAR},
203
       driving_status = #{drivingStatus,jdbcType=CHAR},
204
       pay_entity = #{payEntity,jdbcType=VARCHAR},
204
       pay_entity = #{payEntity,jdbcType=VARCHAR},
229
       <if test="visitorNum != null" >
229
       <if test="visitorNum != null" >
230
         visitor_num,
230
         visitor_num,
231
       </if>
231
       </if>
232
-      <if test="visitorStatrtTime != null" >
233
-        visitor_statrt_time,
232
+      <if test="visitorStartTime != null" >
233
+        visitor_start_time,
234
       </if>
234
       </if>
235
       <if test="visitorEndTime != null" >
235
       <if test="visitorEndTime != null" >
236
         visitor_end_time,
236
         visitor_end_time,
276
       <if test="visitorNum != null" >
276
       <if test="visitorNum != null" >
277
         #{visitorNum,jdbcType=VARCHAR},
277
         #{visitorNum,jdbcType=VARCHAR},
278
       </if>
278
       </if>
279
-      <if test="visitorStatrtTime != null" >
280
-        #{visitorStatrtTime,jdbcType=TIMESTAMP},
279
+      <if test="visitorStartTime != null" >
280
+        #{visitorStartTime,jdbcType=TIMESTAMP},
281
       </if>
281
       </if>
282
       <if test="visitorEndTime != null" >
282
       <if test="visitorEndTime != null" >
283
         #{visitorEndTime,jdbcType=TIMESTAMP},
283
         #{visitorEndTime,jdbcType=TIMESTAMP},

+ 5
- 2
CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml View File

35
     id, community_id, banner_description, sort, banner_cover, banner_position, eff_time,
35
     id, community_id, banner_description, sort, banner_cover, banner_position, eff_time,
36
     exp_time, banner_type, external_link, banner_title, create_user, create_date
36
     exp_time, banner_type, external_link, banner_title, create_user, create_date
37
     <![CDATA[
37
     <![CDATA[
38
-    from to_banner t where date_format(t.eff_time,'%Y-%m-%d') <= date_format('2018-11-23','%Y-%m-%d')
39
-    and date_format(t.exp_time,'%Y-%m-%d') >= date_format('2018-11-23','%Y-%m-%d')
38
+    from to_banner t where date_format(t.eff_time,'%Y-%m-%d') <= date_format(NOW(),'%Y-%m-%d')
39
+    and date_format(t.exp_time,'%Y-%m-%d') >= date_format(NOW(),'%Y-%m-%d')
40
     ]]>
40
     ]]>
41
+    <if test="bannerPosition != null">
42
+      and banner_position = #{bannerPosition,jdbcType=INTEGER}
43
+    </if>
41
     order by t.sort, t.eff_time
44
     order by t.sort, t.eff_time
42
     <if test="num != null">
45
     <if test="num != null">
43
       limit #{num}
46
       limit #{num}

+ 1
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml View File

224
           and type = #{type,jdbcType=CHAR}
224
           and type = #{type,jdbcType=CHAR}
225
         </if>
225
         </if>
226
       </trim>
226
       </trim>
227
+    order by create_date DESC
227
   </select>
228
   </select>
228
 
229
 
229
   <select id="selectByTicketId" resultMap="BaseResultMap" >
230
   <select id="selectByTicketId" resultMap="BaseResultMap" >

+ 0
- 74
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/PhoneCodeImpl.java View File

1
-package com.community.huiju.common.code.impl;
2
-
3
-import com.community.commom.constant.Constant;
4
-import com.community.commom.utils.AccountValidatorUtil;
5
-import com.community.huiju.common.code.ICode;
6
-import com.community.huiju.common.code.cache.AppkeyCache;
7
-import lombok.extern.slf4j.Slf4j;
8
-import okhttp3.*;
9
-import org.springframework.beans.factory.annotation.Autowired;
10
-import org.springframework.stereotype.Service;
11
-import org.springframework.web.client.RestTemplate;
12
-
13
-import java.io.IOException;
14
-import java.util.concurrent.TimeUnit;
15
-
16
-/**
17
- * 手机验证码
18
- * @author weiximei
19
- */
20
-@Service("phoneCodeImpl")
21
-@Slf4j
22
-public class PhoneCodeImpl implements ICode {
23
-
24
-    public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
25
-
26
-    @Autowired
27
-    private RestTemplate restTemplate;
28
-
29
-    public OkHttpClient getClient() {
30
-        OkHttpClient client  = new OkHttpClient.Builder()
31
-                .connectTimeout(10, TimeUnit.SECONDS)
32
-                .writeTimeout(10,TimeUnit.SECONDS)
33
-                .readTimeout(20, TimeUnit.SECONDS)
34
-                .build();
35
-        return client;
36
-    }
37
-
38
-    @Override
39
-    public boolean sendCode(String phone, String code) {
40
-        boolean bool = false;
41
-
42
-        try {
43
-            String result = null;
44
-            OkHttpClient client = getClient();
45
-            RequestBody body = RequestBody.create(JSON, "{\"code\":\""+Constant.CODE+"\"," + "\"tel\":\""+phone+"\"," + "\"params\":[\""+code+"\"]}");
46
-            Request request = new Request.Builder()
47
-                    .url(Constant.REQUEST_URL)
48
-                    .post(body)
49
-                    .build();
50
-            Response response = client.newCall(request).execute();
51
-            if (response.isSuccessful()) {
52
-                result = response.body().string();
53
-            } else {
54
-                throw new IOException("Unexpected code " + response);
55
-            }
56
-
57
-
58
-
59
-            if ("发送成功".equals(result)) {
60
-                bool = true;
61
-                log.info("手机号 {} 验证码 {} 发送成功!",phone,code);
62
-            }else {
63
-                bool = false;
64
-                log.error("短信发送验证码失败!{}", result);
65
-            }
66
-        } catch (Exception e){
67
-            e.printStackTrace();
68
-            log.error("短信发送错误!",e);
69
-            bool = false;
70
-        }
71
-
72
-        return bool;
73
-    }
74
-}

+ 1
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/runner/MqRunner.java View File

24
 public class MqRunner implements ApplicationRunner {
24
 public class MqRunner implements ApplicationRunner {
25
 	
25
 	
26
 	public static final String BROKER_URL = "failover:(tcp://192.168.0.122:61618)?timeout=2000";
26
 	public static final String BROKER_URL = "failover:(tcp://192.168.0.122:61618)?timeout=2000";
27
+	//public static final String BROKER_URL = "failover:(tcp://localhost:8087)?timeout=2000";
27
 	
28
 	
28
 	public static final String TARGET = "openapi.acs.topic";
29
 	public static final String TARGET = "openapi.acs.topic";
29
 	
30
 	

+ 16
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/OperateApplication.java View File

1
 package com.community.huiju;
1
 package com.community.huiju;
2
 
2
 
3
+import com.alibaba.fastjson.serializer.SerializerFeature;
4
+import com.alibaba.fastjson.support.config.FastJsonConfig;
5
+import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
3
 import org.springframework.boot.SpringApplication;
6
 import org.springframework.boot.SpringApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
7
 import org.springframework.boot.autoconfigure.SpringBootApplication;
8
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
5
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
9
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6
 import org.springframework.cloud.openfeign.EnableFeignClients;
10
 import org.springframework.cloud.openfeign.EnableFeignClients;
11
+import org.springframework.context.annotation.Bean;
7
 import org.springframework.transaction.annotation.EnableTransactionManagement;
12
 import org.springframework.transaction.annotation.EnableTransactionManagement;
8
 
13
 
9
 @SpringBootApplication
14
 @SpringBootApplication
15
 	public static void main(String[] args) {
20
 	public static void main(String[] args) {
16
 		SpringApplication.run(OperateApplication.class, args);
21
 		SpringApplication.run(OperateApplication.class, args);
17
 	}
22
 	}
23
+
24
+	@Bean
25
+	public HttpMessageConverters fastJsonConfigure(){
26
+		FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
27
+		FastJsonConfig fastJsonConfig = new FastJsonConfig();
28
+		fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat);
29
+		//日期格式化
30
+		//fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
31
+		converter.setFastJsonConfig(fastJsonConfig);
32
+		return new HttpMessageConverters(converter);
33
+	}
18
 }
34
 }

+ 2
- 6
CODE/smart-community/operate-api/src/main/java/com/community/huiju/config/HttpSessionConfig.java View File

2
 
2
 
3
 import org.springframework.context.annotation.Bean;
3
 import org.springframework.context.annotation.Bean;
4
 import org.springframework.context.annotation.Configuration;
4
 import org.springframework.context.annotation.Configuration;
5
+import org.springframework.session.MapSession;
5
 import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
6
 import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
6
 import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
7
 import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
7
 
8
 
9
 
10
 
10
 
11
 
11
 @Configuration
12
 @Configuration
12
-@EnableJdbcHttpSession
13
+@EnableJdbcHttpSession(maxInactiveIntervalInSeconds = MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS*48*7)
13
 public class HttpSessionConfig {
14
 public class HttpSessionConfig {
14
 
15
 
15
     @Bean
16
     @Bean
17
         return HeaderHttpSessionIdResolver.xAuthToken();
18
         return HeaderHttpSessionIdResolver.xAuthToken();
18
     }
19
     }
19
 
20
 
20
-//    @Bean
21
-//    public HttpSessionStrategy httpSessionStrategy() {
22
-//        return new HeaderHttpSessionStrategy();
23
-//    }
24
-
25
 }
21
 }

+ 20
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/AppUserController.java View File

1
 package com.community.huiju.controller;
1
 package com.community.huiju.controller;
2
 
2
 
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.service.ITaUserService;
3
 import io.swagger.annotations.Api;
5
 import io.swagger.annotations.Api;
6
+import io.swagger.annotations.ApiImplicitParam;
7
+import io.swagger.annotations.ApiImplicitParams;
8
+import io.swagger.annotations.ApiOperation;
9
+import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.cloud.context.config.annotation.RefreshScope;
10
 import org.springframework.cloud.context.config.annotation.RefreshScope;
5
 import org.springframework.web.bind.annotation.RequestMapping;
11
 import org.springframework.web.bind.annotation.RequestMapping;
12
+import org.springframework.web.bind.annotation.RequestMethod;
6
 import org.springframework.web.bind.annotation.RestController;
13
 import org.springframework.web.bind.annotation.RestController;
7
 
14
 
8
 @RestController
15
 @RestController
11
 @Api(value = " App 用户 控制器")
18
 @Api(value = " App 用户 控制器")
12
 public class AppUserController {
19
 public class AppUserController {
13
 
20
 
21
+    @Autowired
22
+    private ITaUserService iTaUserService;
23
+
24
+    @ApiOperation(value = "获取用户人数", notes = "获取用户人数")
25
+    @ApiImplicitParams({
26
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
27
+    })
28
+    @RequestMapping(value = "/user/count",method = RequestMethod.GET)
29
+    public ResponseBean getUserCount() {
30
+        ResponseBean response = new ResponseBean();
31
+        response = iTaUserService.getByUserTypeCount();
32
+        return response;
33
+    }
14
 
34
 
15
 
35
 
16
 }
36
 }

+ 2
- 2
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/TaUserMapper.java View File

52
     /**
52
     /**
53
      * 判断当前用户的关联关系
53
      * 判断当前用户的关联关系
54
      * @param userId
54
      * @param userId
55
-     * @param otherUserID
55
+     * @param otherUserId
56
      * @return
56
      * @return
57
      */
57
      */
58
-    TaUser selectTaFaceParentId(@Param("id") Integer userId, @Param("otherUserID") Integer otherUserID);
58
+    TaUser selectTaFaceParentId(@Param("id") Integer userId, @Param("otherUserId") Integer otherUserId);
59
 
59
 
60
     /**
60
     /**
61
      * 查询此电话在小区是否存在
61
      * 查询此电话在小区是否存在

+ 7
- 4
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ToBanner.java View File

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
-import javax.validation.constraints.Future;
4
-import javax.validation.constraints.Min;
5
-import javax.validation.constraints.NotBlank;
3
+import javax.validation.constraints.*;
6
 import java.util.Date;
4
 import java.util.Date;
7
 
5
 
8
 public class ToBanner {
6
 public class ToBanner {
11
     @NotBlank(message = "标题不能为空!")
9
     @NotBlank(message = "标题不能为空!")
12
     private String title;
10
     private String title;
13
 
11
 
14
-    @Min(value = 0,message = "小区不能为空!")
12
+    @Min(value = 0,message = "请选择有效的小区!")
13
+    @NotNull(message = "小区不能空!")
15
     private Integer communityId;
14
     private Integer communityId;
16
 
15
 
17
     // @NotBlank(message = "跳转描述不能为空!")
16
     // @NotBlank(message = "跳转描述不能为空!")
18
     private String bannerDescription;
17
     private String bannerDescription;
19
 
18
 
19
+    @NotNull(message = "权重不能空!")
20
     private Integer sort;
20
     private Integer sort;
21
 
21
 
22
     @NotBlank(message = "banner图片不能为空!")
22
     @NotBlank(message = "banner图片不能为空!")
23
     private String bannerCover;
23
     private String bannerCover;
24
 
24
 
25
     @Min(value = 0,message = "请选择有效的banner位!")
25
     @Min(value = 0,message = "请选择有效的banner位!")
26
+    @NotNull(message = "banner位不能空!")
26
     private Integer bannerPosition;
27
     private Integer bannerPosition;
27
 
28
 
29
+    @NotNull(message = "生效时间不能为空!")
28
     private Date effTime;
30
     private Date effTime;
29
 
31
 
32
+    @NotNull(message = "失效时间不能为空!")
30
     private Date expTime;
33
     private Date expTime;
31
 
34
 
32
     @NotBlank(message = "banner类型不能为空!")
35
     @NotBlank(message = "banner类型不能为空!")

+ 50
- 6
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ToBannerServiceImpl.java View File

21
 import org.springframework.stereotype.Service;
21
 import org.springframework.stereotype.Service;
22
 import org.springframework.transaction.annotation.Transactional;
22
 import org.springframework.transaction.annotation.Transactional;
23
 
23
 
24
+import java.text.ParseException;
25
+import java.text.SimpleDateFormat;
24
 import java.util.Date;
26
 import java.util.Date;
25
 import java.util.List;
27
 import java.util.List;
26
 import java.util.Map;
28
 import java.util.Map;
29
+import java.util.regex.Pattern;
27
 import java.util.stream.Collectors;
30
 import java.util.stream.Collectors;
28
 
31
 
29
 /**
32
 /**
45
     @Autowired
48
     @Autowired
46
     private SysDictionaryMapper sysDictionaryMapper;
49
     private SysDictionaryMapper sysDictionaryMapper;
47
 
50
 
51
+    /**
52
+     * 校验 url 合法性
53
+     */
54
+    private Pattern patternUrl = Pattern.compile("^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\/])+$");
55
+
48
     @Override
56
     @Override
49
     @Transactional(rollbackFor = Exception.class)
57
     @Transactional(rollbackFor = Exception.class)
50
     public ResponseBean addBanner(ToBanner banner,Integer currentUserId) {
58
     public ResponseBean addBanner(ToBanner banner,Integer currentUserId) {
51
 
59
 
52
         ResponseBean response = new ResponseBean();
60
         ResponseBean response = new ResponseBean();
53
         if (Constant.BANNER_TYPE_ARTICLE.equals(banner.getBannerType())) {
61
         if (Constant.BANNER_TYPE_ARTICLE.equals(banner.getBannerType())) {
62
+            if (StringUtils.isBlank(banner.getBannerTitle())) {
63
+                response.addError("Banner内容标题不能为空");
64
+                return response;
65
+            }
54
             if (StringUtils.isBlank(banner.getBannerContent())) {
66
             if (StringUtils.isBlank(banner.getBannerContent())) {
55
                 response.addError("Banner内容不能为空");
67
                 response.addError("Banner内容不能为空");
56
                 return response;
68
                 return response;
57
             }
69
             }
58
         }else {
70
         }else {
59
             if (StringUtils.isBlank(banner.getExternalLink())) {
71
             if (StringUtils.isBlank(banner.getExternalLink())) {
60
-                response.addError("跳转URL不能为空");
72
+                response.addError("跳转链接不能为空");
73
+                return response;
74
+            }
75
+            if (!patternUrl.matcher(banner.getExternalLink()).matches()) {
76
+                response.addError("请输入合法的跳转链接!");
61
                 return response;
77
                 return response;
62
             }
78
             }
63
         }
79
         }
64
 
80
 
65
         Date effTime = banner.getEffTime();
81
         Date effTime = banner.getEffTime();
66
         Date currentDate = new Date();
82
         Date currentDate = new Date();
83
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
84
+        String formatCurrentDate = simpleDateFormat.format(currentDate);
85
+        try {
86
+            currentDate = simpleDateFormat.parse(formatCurrentDate);
87
+        } catch (ParseException e) {
88
+            e.printStackTrace();
89
+        }
67
         if (effTime.getTime() < currentDate.getTime()) {
90
         if (effTime.getTime() < currentDate.getTime()) {
68
             response.addError("生效时间不能小于当前时间!");
91
             response.addError("生效时间不能小于当前时间!");
69
             return response;
92
             return response;
71
 
94
 
72
         Date expTime = banner.getExpTime();
95
         Date expTime = banner.getExpTime();
73
         if (expTime.getTime() <= effTime.getTime()) {
96
         if (expTime.getTime() <= effTime.getTime()) {
74
-            response.addError("失效时间不能小于生效时间!");
97
+            response.addError("失效时间不能小于或等于生效时间!");
75
             return response;
98
             return response;
76
         }
99
         }
77
 
100
 
106
     @Transactional(rollbackFor = Exception.class)
129
     @Transactional(rollbackFor = Exception.class)
107
     public ResponseBean modifyBanner(ToBanner banner,Integer currentUserId) {
130
     public ResponseBean modifyBanner(ToBanner banner,Integer currentUserId) {
108
         ResponseBean response = new ResponseBean();
131
         ResponseBean response = new ResponseBean();
132
+
133
+        ToBanner selectBanner = toBannerMapper.selectByPrimaryKey(banner.getId());
134
+
109
         if (Constant.BANNER_TYPE_ARTICLE.equals(banner.getBannerType())) {
135
         if (Constant.BANNER_TYPE_ARTICLE.equals(banner.getBannerType())) {
110
             if (StringUtils.isBlank(banner.getBannerTitle())) {
136
             if (StringUtils.isBlank(banner.getBannerTitle())) {
111
-                response.addError("Banner标题不能为空");
137
+                response.addError("Banner内容标题不能为空");
112
                 return response;
138
                 return response;
113
             }
139
             }
114
             if (StringUtils.isBlank(banner.getBannerContent())) {
140
             if (StringUtils.isBlank(banner.getBannerContent())) {
115
                 response.addError("Banner内容不能为空");
141
                 response.addError("Banner内容不能为空");
116
                 return response;
142
                 return response;
117
             }
143
             }
144
+        }else {
145
+            if (StringUtils.isBlank(banner.getExternalLink())) {
146
+                response.addError("跳转URL不能为空");
147
+                return response;
148
+            }
149
+            if (!patternUrl.matcher(banner.getExternalLink()).matches()) {
150
+                response.addError("请输入合法的跳转链接!");
151
+                return response;
152
+            }
118
         }
153
         }
119
 
154
 
120
         Date effTime = banner.getEffTime();
155
         Date effTime = banner.getEffTime();
121
         Date currentDate = new Date();
156
         Date currentDate = new Date();
157
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
158
+        String formatCurrentDate = simpleDateFormat.format(currentDate);
159
+        try {
160
+            currentDate = simpleDateFormat.parse(formatCurrentDate);
161
+        } catch (ParseException e) {
162
+            e.printStackTrace();
163
+        }
122
         if (effTime.getTime() < currentDate.getTime()) {
164
         if (effTime.getTime() < currentDate.getTime()) {
123
             response.addError("生效时间不能小于当前时间!");
165
             response.addError("生效时间不能小于当前时间!");
124
             return response;
166
             return response;
126
 
168
 
127
         Date expTime = banner.getExpTime();
169
         Date expTime = banner.getExpTime();
128
         if (expTime.getTime() <= effTime.getTime()) {
170
         if (expTime.getTime() <= effTime.getTime()) {
129
-            response.addError("失效时间不能小于生效时间!");
171
+            response.addError("失效时间不能小于或等于生效时间!");
130
             return response;
172
             return response;
131
         }
173
         }
132
 
174
 
133
         ToUser toUser = toUserMapper.selectByPrimaryKey(currentUserId);
175
         ToUser toUser = toUserMapper.selectByPrimaryKey(currentUserId);
134
 
176
 
135
-        banner.setUpdateDate(new Date());
136
-        banner.setUpdateUser(toUser.getId());
177
+        BeanUtils.copyProperties(banner,selectBanner);
178
+
179
+        selectBanner.setUpdateDate(new Date());
180
+        selectBanner.setUpdateUser(toUser.getId());
137
 
181
 
138
         int result = toBannerMapper.updateByPrimaryKeySelective(banner);
182
         int result = toBannerMapper.updateByPrimaryKeySelective(banner);
139
         if (result > 0) {
183
         if (result > 0) {

+ 3
- 3
CODE/smart-community/operate-api/src/main/resources/mapper/TaUserMapper.xml View File

314
       <include refid="Base_Column_List" />
314
       <include refid="Base_Column_List" />
315
     from ta_user
315
     from ta_user
316
     where 1=1
316
     where 1=1
317
-    <if test="otherUserID != null" >
318
-     and id = #{otherUserID,jdbcType=INTEGER}
317
+    <if test="otherUserId != null" >
318
+     and id = #{otherUserId,jdbcType=INTEGER}
319
     </if>
319
     </if>
320
     <if test="id != null" >
320
     <if test="id != null" >
321
      and parent_id = #{id}
321
      and parent_id = #{id}
328
     <include refid="Base_Column_List" />
328
     <include refid="Base_Column_List" />
329
     from ta_user
329
     from ta_user
330
     where community_id = #{communityId,jdbcType=INTEGER}
330
     where community_id = #{communityId,jdbcType=INTEGER}
331
-    <if test="otherUserID != null" >
331
+    <if test="otherUserId != null" >
332
       and login_name = #{phone}
332
       and login_name = #{phone}
333
     </if>
333
     </if>
334
 
334
 

+ 1
- 1
VUECODE/smart-operate-manage/config/dev.env.js View File

4
 
4
 
5
 module.exports = merge(prodEnv, {
5
 module.exports = merge(prodEnv, {
6
   NODE_ENV: '"development"',
6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://localhost:8085/operate-api"',
7
+  BASE_API: '"http://192.168.0.164:8085/operate-api"',
8
 })
8
 })

+ 1
- 2
VUECODE/smart-operate-manage/config/index.js View File

9
     // Paths
9
     // Paths
10
     assetsSubDirectory: 'static',
10
     assetsSubDirectory: 'static',
11
     assetsPublicPath: '/',
11
     assetsPublicPath: '/',
12
-    proxyTable: {
13
-    },
12
+    proxyTable: {},
14
 
13
 
15
     // Various Dev Server settings
14
     // Various Dev Server settings
16
     host: 'localhost', // can be overwritten by process.env.HOST
15
     host: 'localhost', // can be overwritten by process.env.HOST

+ 17
- 0
VUECODE/smart-operate-manage/src/api/index.js View File

1
+import request from '@/utils/request'
2
+
3
+// 硬件数据统计
4
+export function getHardData () {
5
+  return request({
6
+    url: '/mq/open',
7
+    method: 'get'
8
+  })
9
+}
10
+
11
+// 注册用户统计
12
+export function getSignUser () {
13
+  return request({
14
+    url: '/user/count',
15
+    method: 'get'
16
+  })
17
+}

BIN
VUECODE/smart-operate-manage/src/assets/light1.png View File


BIN
VUECODE/smart-operate-manage/src/assets/light2.png View File


BIN
VUECODE/smart-operate-manage/src/assets/light3.png View File


BIN
VUECODE/smart-operate-manage/src/assets/light4.png View File


+ 2
- 2
VUECODE/smart-operate-manage/src/components/chart/chart1.vue View File

64
       })
64
       })
65
       chart.guide().html({
65
       chart.guide().html({
66
         position: ['50%', '50%'],
66
         position: ['50%', '50%'],
67
-        html: '<div class="g2-guide-html"><p class="title">总计</p><p class="value">500</p></div>'
67
+        html: '<div class="g2-guide-html"><p class="title">总计</p><p class="value">200</p></div>'
68
       })
68
       })
69
       chart.guide().html({
69
       chart.guide().html({
70
         position: ['50%', '-10%'],
70
         position: ['50%', '-10%'],
79
 
79
 
80
       chart.on('interval:mouseleave', function () {
80
       chart.on('interval:mouseleave', function () {
81
         $(".g2-guide-html .title").text('总计')
81
         $(".g2-guide-html .title").text('总计')
82
-        $(".g2-guide-html .value").text(500)
82
+        $(".g2-guide-html .value").text(200)
83
       })
83
       })
84
       chart.render()
84
       chart.render()
85
     }
85
     }

+ 12
- 9
VUECODE/smart-operate-manage/src/components/chart/chart2.vue View File

13
   methods: {
13
   methods: {
14
     rander () {
14
     rander () {
15
       var data = [{
15
       var data = [{
16
-        item: '单一',
16
+        item: '报修单一',
17
         count: 40,
17
         count: 40,
18
         percent: 0.4
18
         percent: 0.4
19
       }, {
19
       }, {
20
-        item: '单二',
20
+        item: '报修单二',
21
         count: 21,
21
         count: 21,
22
         percent: 0.21
22
         percent: 0.21
23
       }, {
23
       }, {
24
-        item: '单三',
24
+        item: '报修单三',
25
         count: 17,
25
         count: 17,
26
         percent: 0.17
26
         percent: 0.17
27
       }, {
27
       }, {
28
-        item: '单四',
28
+        item: '报修单四',
29
         count: 13,
29
         count: 13,
30
         percent: 0.13
30
         percent: 0.13
31
       }]
31
       }]
33
         container: 'node2',
33
         container: 'node2',
34
         forceFit: true,
34
         forceFit: true,
35
         height: 282,
35
         height: 282,
36
-        // height: window.innerHeight / 3 - 50,
37
         padding: [40, 'auto', 'auto', 'auto']
36
         padding: [40, 'auto', 'auto', 'auto']
38
       })
37
       })
39
       chart.source(data, {
38
       chart.source(data, {
56
         itemTpl: '<li><span style="background-color:{color}" class="g2-tooltip-marker"></span>{name}: {value}</li>'
55
         itemTpl: '<li><span style="background-color:{color}" class="g2-tooltip-marker"></span>{name}: {value}</li>'
57
       })
56
       })
58
       chart.intervalStack().position('percent').color('item', function (val) {
57
       chart.intervalStack().position('percent').color('item', function (val) {
59
-        if (val === '单一') {
58
+        if (val === '报修单一') {
60
           return '#53F9FF'
59
           return '#53F9FF'
61
-        } else if (val === '单二') {
60
+        } else if (val === '报修单二') {
62
           return '#83BB41'
61
           return '#83BB41'
63
-        } else if (val === '单三') {
62
+        } else if (val === '报修单三') {
64
           return '#FFC400'
63
           return '#FFC400'
65
-        } else if (val === '单四') {
64
+        } else if (val === '报修单四') {
66
           return '#454D54'
65
           return '#454D54'
67
         }
66
         }
68
       }).label('percent', {
67
       }).label('percent', {
69
         formatter: function formatter (val, item) {
68
         formatter: function formatter (val, item) {
70
           return item._origin.item + ': ' + val
69
           return item._origin.item + ': ' + val
70
+        },
71
+        textStyle: {
72
+          fill: '#a4b6c5', // 文本的颜色
73
+          fontSize: '12', // 文本大小
71
         }
74
         }
72
       }).tooltip('item*percent', function (item, percent) {
75
       }).tooltip('item*percent', function (item, percent) {
73
         percent = percent * 100 + '%'
76
         percent = percent * 100 + '%'

+ 24
- 5
VUECODE/smart-operate-manage/src/components/chart/chart3.vue View File

1
 <template>
1
 <template>
2
   <div id="node3">
2
   <div id="node3">
3
-    <div class="title">日所有小区智能硬件数据统计</div>
3
+    <div class="title">日所有小区智能硬件数据统计</div>
4
     <div class="table">
4
     <div class="table">
5
-      <div v-for="(item,index) in arr" :key="index" @mouseover='item.active = true' @mouseout="item.active=false" :class="{active:item.active}">
5
+      <div
6
+        v-for="(item,index) in arr"
7
+        :key="index"
8
+        @mouseover="item.active = true"
9
+        @mouseout="item.active=false"
10
+        :class="{active:item.active}"
11
+      >
6
         <div>{{item.text}}</div>
12
         <div>{{item.text}}</div>
7
         <div>{{item.num}}</div>
13
         <div>{{item.num}}</div>
8
       </div>
14
       </div>
11
 </template>
17
 </template>
12
 
18
 
13
 <script>
19
 <script>
20
+import { mapState, mapActions } from 'vuex'
14
 
21
 
15
 export default {
22
 export default {
23
+  computed: {
24
+    ...mapState('trunkIndex', {
25
+      hardData: item => item.trunkIndex.hardData
26
+    })
27
+  },
16
   data () {
28
   data () {
17
     return {
29
     return {
18
       arr: [
30
       arr: [
25
       ]
37
       ]
26
     }
38
     }
27
   },
39
   },
28
-  mounted () {
29
-
40
+  created () {
41
+    this.GetHardData().then(() => {
42
+      console.log(this.hardData)
43
+      this.arr[0].num = this.hardData.count + '次'
44
+      // this.arr[0].text = this.hardData.message
45
+      this.arr = JSON.parse(JSON.stringify(this.arr))
46
+    })
30
   },
47
   },
31
   methods: {
48
   methods: {
32
-
49
+    ...mapActions('trunkIndex', [
50
+      'GetHardData'
51
+    ]),
33
   }
52
   }
34
 }
53
 }
35
 </script>
54
 </script>

+ 82
- 113
VUECODE/smart-operate-manage/src/components/chart/chart4.vue View File

1
 <template>
1
 <template>
2
   <div id="node4">
2
   <div id="node4">
3
-    <el-amap ref="map" vid="amapDemo" :center="mapCenter" :zoom="8" class="amap-demo"  :mapStyle='setMapStyle'>
4
-      <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item.position" :icon='item.icon' :title="item.title"></el-amap-marker>
3
+    <div class="top-title">已合作社区分布图</div>
4
+    <el-amap
5
+      ref="map"
6
+      vid="amapDemo"
7
+      :center="mapCenter"
8
+      :zoom="7"
9
+      class="amap-demo"
10
+      :mapStyle="setMapStyle"
11
+    >
12
+      <el-amap-marker
13
+        v-for="(item,index) in markers"
14
+        :key="index"
15
+        :position="item.position"
16
+        :icon="item.icon"
17
+        :title="item.title"
18
+        :offset="item.offset"
19
+        :content="item.content"
20
+      ></el-amap-marker>
5
     </el-amap>
21
     </el-amap>
6
   </div>
22
   </div>
7
 </template>
23
 </template>
9
 <script>
25
 <script>
10
 // import G2 from '@antv/g2'
26
 // import G2 from '@antv/g2'
11
 // import DataSet from '@antv/data-set'
27
 // import DataSet from '@antv/data-set'
12
-// import $ from 'jquery'
28
+import $ from 'jquery'
13
 // import AMapUI from 'AMapUI'
29
 // import AMapUI from 'AMapUI'
14
 import light1 from '@/assets/light1.png'
30
 import light1 from '@/assets/light1.png'
15
 import light2 from '@/assets/light2.png'
31
 import light2 from '@/assets/light2.png'
23
       light3,
39
       light3,
24
       light4,
40
       light4,
25
       markers: [{
41
       markers: [{
26
-        position: [119.63803900, 32.58482400],
27
-        icon: light1, // 添加 Icon 图标 URL
28
-        title: '悦见山'
42
+        position: [118.633516, 32.069878],
43
+        title: '悦见山',
44
+        offset: [-60, -60],
45
+        content: `<div class='point'>
46
+        <img src='${light1}'>
47
+        <span>悦见山</span>
48
+        </div>`
29
       }, {
49
       }, {
30
-        position: [118.29096500, 33.92855800],
31
-        icon: light2, // 添加 Icon 图标 URL
32
-        title: '银山'
50
+        position: [117.161777, 34.154014],
51
+        title: '致享城',
52
+        offset: [-60, -60],
53
+        content: `<div class='point'>
54
+        <img src='${light2}'>
55
+        <span>致享城</span>
56
+        </div>`
33
       }, {
57
       }, {
34
-        position: [120.07075000, 32.43910000],
35
-        icon: light3, // 添加 Icon 图标 URL
36
-        title: '智慧社区'
58
+        position: [118.753086, 31.972501],
59
+        title: '智慧社区',
60
+        offset: [-60, -60],
61
+        content: `<div class='point'>
62
+        <img src='${light3}'>
63
+        <span>智慧社区</span>
64
+        </div>`
37
       }, {
65
       }, {
38
-        position: [118.79317400, 32.07443900],
39
-        icon: light4, // 添加 Icon 图标 URL
40
-        title: '帝景天誉'
66
+        position: [120.064082, 30.343891],
67
+        title: '云谷天境',
68
+        offset: [-60, -60],
69
+        content: `<div class='point'>
70
+        <img src='${light4}'>
71
+        <span>云谷天境</span>
72
+        </div>`
41
       }],
73
       }],
42
-      mapCenter: [119.63803900, 32.58482400],
74
+      mapCenter: [118.753086, 31.972501],
43
       setMapStyle: 'amap://styles/blue'
75
       setMapStyle: 'amap://styles/blue'
44
     }
76
     }
45
   },
77
   },
46
   mounted () {
78
   mounted () {
47
-    this.rander()
79
+    setInterval(() => {
80
+      this.rander()
81
+    }, 1600)
48
   },
82
   },
49
   methods: {
83
   methods: {
50
     rander () {
84
     rander () {
51
-      // AMap.plugin('AMap.DistrictLayer', function () {//异步加载插件
52
-      //   var DistrictLayer = new AMap.DistrictLayer();
53
-      //   map.addControl(DistrictLayer);
54
-      // });
55
-      // var adCode = 320000;
56
-      // var depth = 2;
57
-      // var map = new AMap.Map("node4", {
58
-      //   zoom: 8,
59
-      //   center: [119.63803900, 32.58482400],
60
-      //   pitch: 0,
61
-      //   viewMode: '3D',
62
-      // });
63
-
64
-      // // 创建省份图层
65
-      // var disProvince;
66
-      // function initPro (code, dep) {
67
-      //   dep = typeof dep == 'undefined' ? 2 : dep;
68
-      //   adCode = code;
69
-      //   depth = dep;
70
-
71
-      //   disProvince && disProvince.setMap(null);
72
-
73
-      //   disProvince = new AMap.DistrictLayer.Province({
74
-      //     zIndex: 12,
75
-      //     adcode: [code],
76
-      //     depth: dep,
77
-      //     styles: {
78
-      //       'fill': function (properties) {
79
-      //         // properties为可用于做样式映射的字段,包含
80
-      //         // NAME_CHN:中文名称
81
-      //         // adcode_pro
82
-      //         // adcode_cit
83
-      //         // adcode
84
-      //         var adcode = properties.adcode;
85
-      //         return getColorByAdcode(adcode);
86
-      //       },
87
-      //       'province-stroke': 'cornflowerblue',
88
-      //       'city-stroke': 'white', // 中国地级市边界
89
-      //       'county-stroke': 'rgba(255,255,255,0.5)' // 中国区县边界
90
-      //     }
91
-      //   });
92
-
93
-      //   disProvince.setMap(map);
94
-      // }
95
-
96
-      // // 颜色辅助方法
97
-      // var colors = {};
98
-      // var getColorByAdcode = function (adcode) {
99
-      //   if (!colors[adcode]) {
100
-      //     var gb = Math.random() * 155 + 50;
101
-      //     colors[adcode] = 'rgb(' + gb + ',' + gb + ',255)';
102
-      //   }
103
-      //   return colors[adcode];
104
-      // }
105
-      // initPro(adCode, depth);
106
-      // map.setMapStyle('amap://styles/blue')
107
-      // var marker1 = new AMap.Marker({
108
-      //   position: new AMap.LngLat(119.63803900, 32.58482400),
109
-      //   offset: new AMap.Pixel(-10, -10),
110
-      //   icon: this.light1, // 添加 Icon 图标 URL
111
-      //   title: '悦见山'
112
-      // });
113
-      // var marker2 = new AMap.Marker({
114
-      //   position: new AMap.LngLat(118.29096500, 33.92855800),
115
-      //   offset: new AMap.Pixel(-10, -10),
116
-      //   icon: this.light2, // 添加 Icon 图标 URL
117
-      //   title: '银山'
118
-      // });
119
-      // var marker3 = new AMap.Marker({
120
-      //   position: new AMap.LngLat(120.07075000, 32.43910000),
121
-      //   offset: new AMap.Pixel(-10, -10),
122
-      //   icon: this.light3, // 添加 Icon 图标 URL
123
-      //   title: '智慧社区'
124
-      // });
125
-      // var marker4 = new AMap.Marker({
126
-      //   position: new AMap.LngLat(119.63803900, 32.58482400),
127
-      //   offset: new AMap.Pixel(-10, -10),
128
-      //   icon: this.light4, // 添加 Icon 图标 URL
129
-      //   title: '帝景天誉'
130
-      // });
131
-      // var markerList = [marker1, marker2, marker3, marker4];
132
-      // map.add(markerList);
85
+      $('.point img').animate({ opacity: 0 }, 800).animate({ opacity: 1 }, 800)
133
     }
86
     }
134
   }
87
   }
135
 }
88
 }
136
 </script>
89
 </script>
137
 
90
 
138
 <style lang="scss">
91
 <style lang="scss">
139
-#node4 {
140
-  .g2-guide-html {
141
-    color: #a4b6c5;
142
-    .title {
143
-      text-align: "ceter";
144
-    }
145
-    .value {
146
-      text-align: center;
147
-    }
92
+#node4{
93
+  border-radius: 5px;
94
+}
95
+.top-title{
96
+  width: 100%;
97
+  position: absolute;
98
+  top: 0;
99
+  left: 0;
100
+  text-align: center;
101
+  margin-top: 30px;
102
+  z-index: 20;
103
+  color: #A6B9C8;
104
+  font-size: 18px;
105
+}
106
+.point{
107
+  position: relative;
108
+  width: 120px;
109
+  height: 120px;
110
+  img{
111
+    position: absolute;
112
+    top: 50%;
113
+    left: 50%;
114
+    transform: translate(-50%,-50%);
148
   }
115
   }
149
-  .g2-guide-title {
150
-    color: #a4b6c5;
151
-    .title {
152
-      font-size: 16px;
153
-    }
116
+  span{
117
+    position: absolute;
118
+    top: 80%;
119
+    left: 50%;
120
+    transform: translate(-50%,-50%);
121
+    font-size: 12px;
122
+    color: white;
154
   }
123
   }
155
 }
124
 }
156
 </style>
125
 </style>

+ 62
- 16
VUECODE/smart-operate-manage/src/components/chart/chart5.vue View File

5
 <script>
5
 <script>
6
 import G2 from '@antv/g2'
6
 import G2 from '@antv/g2'
7
 import DataSet from '@antv/data-set'
7
 import DataSet from '@antv/data-set'
8
+import { mapState, mapActions } from 'vuex'
8
 
9
 
9
 export default {
10
 export default {
11
+  computed: {
12
+    ...mapState('trunkIndex', {
13
+      signUser: item => item.trunkIndex.signUser
14
+    })
15
+  },
10
   mounted () {
16
   mounted () {
11
-    this.rander()
17
+    this.GetSignUser().then(() => {
18
+      this.rander()
19
+    })
12
   },
20
   },
13
   methods: {
21
   methods: {
22
+    ...mapActions('trunkIndex', [
23
+      'GetSignUser'
24
+    ]),
14
     rander () {
25
     rander () {
15
-      var data = [{
16
-        type: '总户数',
17
-        sales: 500
18
-      }, {
19
-        type: '业主',
20
-        sales: 400
21
-      }, {
22
-        type: '家属',
23
-        sales: 1000
24
-      }, {
25
-        type: '租客',
26
-        sales: 200
27
-      }];
26
+      console.log(this.signUser)
27
+      var data = this.signUser
28
       var chart = new G2.Chart({
28
       var chart = new G2.Chart({
29
         container: 'node5',
29
         container: 'node5',
30
         forceFit: true,
30
         forceFit: true,
32
         padding: [80, 20, 30, 40]
32
         padding: [80, 20, 30, 40]
33
       });
33
       });
34
       chart.source(data);
34
       chart.source(data);
35
+      console.log(chart)
36
+      chart.axis('count', {
37
+        line: {
38
+          lineWidth: 1, // 设置线的宽度
39
+          stroke: '#a4b6c5', // 设置线的颜色
40
+        },
41
+        grid: null,
42
+        label: {
43
+          textStyle: {
44
+            textAlign: 'end', // 文本对齐方向,可取值为: start middle end
45
+            fill: '#a4b6c5', // 文本的颜色
46
+            fontSize: '12', // 文本大小
47
+            textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
48
+          }
49
+        }
50
+      });
51
+      chart.axis('message', {
52
+        line: {
53
+          lineWidth: 1, // 设置线的宽度
54
+          stroke: '#a4b6c5', // 设置线的颜色
55
+        },
56
+        grid: null,
57
+        label: {
58
+          textStyle: {
59
+            fill: '#a4b6c5', // 文本的颜色
60
+            fontSize: '12', // 文本大小
61
+          }
62
+        }
63
+      });
35
       chart.scale('', {
64
       chart.scale('', {
36
         tickInterval: 200
65
         tickInterval: 200
37
       });
66
       });
39
         position: ['5%', '-25%'],
68
         position: ['5%', '-25%'],
40
         html: '<div class="chart5-title"><p class="title">注册用户统计</p></div>'
69
         html: '<div class="chart5-title"><p class="title">注册用户统计</p></div>'
41
       })
70
       })
42
-      chart.interval().position('type*sales').color('type', function (val) {
43
-        if (val === '总户数' || val === '家属') {
71
+      chart.guide().html({
72
+        position: ['90%', '-15%'],
73
+        html: `<div class="chart-right-btn"><span>18/11/27</span>&nbsp;<i class='el-icon-date'></i></div>`
74
+      })
75
+
76
+      chart.interval().position('message*count').color('message', function (val) {
77
+        if (val === '业主总数' || val === '家属总数') {
44
           return '#53F9FF';
78
           return '#53F9FF';
45
         }
79
         }
46
         return '#FF5367';
80
         return '#FF5367';
58
     color: #a4b6c5;
92
     color: #a4b6c5;
59
   }
93
   }
60
 }
94
 }
95
+.chart-right-btn{
96
+  padding: 0px 8px;
97
+  display: flex;
98
+  border: 1px solid #a4b6c5;
99
+  border-radius: 9px;
100
+  justify-content: center;
101
+  align-items: center;
102
+  span,i{
103
+    font-size: 10px;
104
+    color: #a4b6c5;
105
+  }
106
+}
61
 </style>
107
 </style>

+ 34
- 2
VUECODE/smart-operate-manage/src/components/chart/chart6.vue View File

1
 <template>
1
 <template>
2
-  <div id="node6"></div>  
2
+  <div id="node6"></div>
3
 </template>
3
 </template>
4
 
4
 
5
 <script>
5
 <script>
50
         value: {
50
         value: {
51
           alias: 'The Share Price in Dollars',
51
           alias: 'The Share Price in Dollars',
52
           formatter: function formatter (val) {
52
           formatter: function formatter (val) {
53
-            return '$' + val;
53
+            return val;
54
           }
54
           }
55
         },
55
         },
56
         year: {
56
         year: {
57
           range: [0, 1]
57
           range: [0, 1]
58
         }
58
         }
59
       });
59
       });
60
+      chart.axis('value', {
61
+        line: {
62
+          lineWidth: 1, // 设置线的宽度
63
+          stroke: '#a4b6c5', // 设置线的颜色
64
+        },
65
+        grid: null,
66
+        label: {
67
+          textStyle: {
68
+            textAlign: 'end', // 文本对齐方向,可取值为: start middle end
69
+            fill: '#a4b6c5', // 文本的颜色
70
+            fontSize: '12', // 文本大小
71
+            textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
72
+          }
73
+        }
74
+      });
75
+      chart.axis('year', {
76
+        line: {
77
+          lineWidth: 1, // 设置线的宽度
78
+          stroke: '#a4b6c5', // 设置线的颜色
79
+        },
80
+        grid: null,
81
+        label: {
82
+          textStyle: {
83
+            fill: '#a4b6c5', // 文本的颜色
84
+            fontSize: '12', // 文本大小
85
+          }
86
+        }
87
+      });
60
       chart.tooltip({
88
       chart.tooltip({
61
         crosshairs: true
89
         crosshairs: true
62
       });
90
       });
91
+      chart.guide().html({
92
+        position: ['90%', '-15%'],
93
+        html: `<div class="chart-right-btn"><span>日活跃量</span>&nbsp;<i class='el-icon-arrow-down'></i></div>`
94
+      })
63
       chart.area().position('year*value').color('type', function (val) { return '#53F9FF' }).shape('smooth');
95
       chart.area().position('year*value').color('type', function (val) { return '#53F9FF' }).shape('smooth');
64
       chart.line().position('year*value').color('type', function (val) { return '#53F9FF' }).size(2).shape('smooth');
96
       chart.line().position('year*value').color('type', function (val) { return '#53F9FF' }).size(2).shape('smooth');
65
       chart.guide().html({
97
       chart.guide().html({

+ 32
- 0
VUECODE/smart-operate-manage/src/components/chart/chart7.vue View File

36
         position: ['5%', '-25%'],
36
         position: ['5%', '-25%'],
37
         html: '<div class="chart7-title"><p class="title">内容运营统计</p></div>'
37
         html: '<div class="chart7-title"><p class="title">内容运营统计</p></div>'
38
       })
38
       })
39
+      chart.guide().html({
40
+        position: ['90%', '-15%'],
41
+        html: `<div class="chart-right-btn"><span>发布数量</span>&nbsp;<i class='el-icon-arrow-down'></i></div>`
42
+      })
43
+      chart.axis('sales', {
44
+        line: {
45
+          lineWidth: 1, // 设置线的宽度
46
+          stroke: '#a4b6c5', // 设置线的颜色
47
+        },
48
+        grid: null,
49
+        label: {
50
+          textStyle: {
51
+            textAlign: 'end', // 文本对齐方向,可取值为: start middle end
52
+            fill: '#a4b6c5', // 文本的颜色
53
+            fontSize: '12', // 文本大小
54
+            textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
55
+          }
56
+        }
57
+      });
58
+      chart.axis('type', {
59
+        line: {
60
+          lineWidth: 1, // 设置线的宽度
61
+          stroke: '#a4b6c5', // 设置线的颜色
62
+        },
63
+        grid: null,
64
+        label: {
65
+          textStyle: {
66
+            fill: '#a4b6c5', // 文本的颜色
67
+            fontSize: '12', // 文本大小
68
+          }
69
+        }
70
+      });
39
       chart.interval().position('type*sales').color('type', function (val) {
71
       chart.interval().position('type*sales').color('type', function (val) {
40
         if (val === '公告') {
72
         if (val === '公告') {
41
           return '#53F9FF';
73
           return '#53F9FF';

+ 1
- 0
VUECODE/smart-operate-manage/src/icons/svg/banner.svg View File

1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543202545074" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4972" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M895.461997 64.288189 128.54005 64.288189c-35.296901 0-63.908542 28.612665-63.908542 63.908542l0 638.941134c0 35.294854 28.611641 63.910589 63.908542 63.910589l766.91683 0c35.293831 0 63.910589-28.615735 63.910589-63.910589L959.367469 128.197754C959.367469 92.900853 930.750711 64.288189 895.461997 64.288189L895.461997 64.288189zM895.461997 767.137865l-248.417813-262.040065L524.378423 611.632161 340.300988 441.194374 156.237879 611.632161l-27.697829 31.635511 0-515.070942 766.91683 0L895.461997 767.137865 895.461997 767.137865 895.461997 767.137865zM732.900597 388.742768c54.035684 0 97.879238-43.922349 97.879238-98.031711 0-54.151317-43.844577-98.048083-97.879238-98.048083-54.05922 0-97.883331 43.896766-97.883331 98.048083C635.017266 344.825536 678.841378 388.742768 732.900597 388.742768L732.900597 388.742768zM732.900597 388.742768" p-id="4973"></path><path d="M927.628604 959.710788 96.36935 959.710788c-17.454534 0-31.737842-14.280238-31.737842-31.739888l0 0c0-17.455557 14.283308-31.732725 31.737842-31.732725l831.259254 0c17.454534 0 31.738865 14.277168 31.738865 31.732725l0 0C959.367469 945.43055 945.083138 959.710788 927.628604 959.710788L927.628604 959.710788zM927.628604 959.710788" p-id="4974"></path></svg>

+ 1
- 0
VUECODE/smart-operate-manage/src/icons/svg/community.svg View File

1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543202441123" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3897" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M874.7 382.5H805L525.8 103.2c-7.6-7.6-19.9-7.6-27.5 0L219 382.5h-69.7c-28.6 0-51.8 23.2-51.8 51.8v440.4c0 28.6 23.2 51.8 51.8 51.8h725.4c28.6 0 51.8-23.2 51.8-51.8V434.3c0-28.6-23.2-51.8-51.8-51.8zM512 144.4l238.1 238.1H274l238-238.1zM260 822.9c-21.5 0-38.9-17.4-38.9-38.9s17.4-38.9 38.9-38.9 38.9 17.4 38.9 38.9-17.4 38.9-38.9 38.9z m0-129.6c-21.5 0-38.9-17.4-38.9-38.9s17.4-38.9 38.9-38.9 38.9 17.4 38.9 38.9-17.4 38.9-38.9 38.9z m0-129.5c-21.5 0-38.9-17.4-38.9-38.9S238.5 486 260 486s38.9 17.4 38.9 38.9-17.4 38.9-38.9 38.9z m542.9 239.6H388.4c-10.7 0-19.4-8.7-19.4-19.4s8.7-19.4 19.4-19.4h414.5c10.7 0 19.4 8.7 19.4 19.4s-8.7 19.4-19.4 19.4z m0-129.5H388.4c-10.7 0-19.4-8.7-19.4-19.4s8.7-19.4 19.4-19.4h414.5c10.7 0 19.4 8.7 19.4 19.4s-8.7 19.4-19.4 19.4z m0-129.5H388.4c-10.7 0-19.4-8.7-19.4-19.4s8.7-19.4 19.4-19.4h414.5c10.7 0 19.4 8.7 19.4 19.4s-8.7 19.4-19.4 19.4z" p-id="3898"></path></svg>

+ 1
- 0
VUECODE/smart-operate-manage/src/icons/svg/communitydata.svg View File

1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543202407856" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3299" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M791.5 831H249l0.1-358.3H92.8L518.4 96.6l413.4 376.1H791.4l0.1 358.3zM299 781h442.4l-0.1-358.3h61.1l-284.6-259-293 259H299V781z" fill="#000000" p-id="3300"></path><path d="M519.3 726.9c-4.4 0-8.9-1.2-12.8-3.6-1.6-0.9-38.9-23.4-76.7-56-54.4-46.8-82-90.5-82-129.9 0-64.1 52.1-116.2 116.2-116.2 19.6 0 38.5 4.8 55.4 14 16.9-9.2 35.7-14 55.4-14 64.1 0 116.2 52.1 116.2 116.2 0 39.9-27.6 83.8-82 130.4-37.9 32.4-75.3 54.6-76.8 55.6-4.1 2.3-8.5 3.5-12.9 3.5z m-55.4-255.6c-36.5 0-66.2 29.7-66.2 66.2 0 23.4 22.8 55.9 64.1 91.6 21.9 18.9 44.1 34.4 57.6 43.3 13.4-8.8 35.6-24.1 57.5-42.9 41.3-35.5 64-68.1 64-92 0-36.5-29.7-66.2-66.2-66.2-14.7 0-28.6 4.7-40.2 13.6-9 6.9-21.4 6.9-30.4 0-11.6-8.9-25.5-13.6-40.2-13.6z" fill="#000000" p-id="3301"></path></svg>

+ 1
- 0
VUECODE/smart-operate-manage/src/icons/svg/index.svg View File

1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543202883234" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10581" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M816.4 545.1l0 337.4c0 28.7-23.2 51.9-51.9 51.9L609.2 934.4 609.2 673.9c0-14.3-11.6-25.9-25.9-25.9L427.6 648c-14.3 0-25.9 11.6-25.9 25.9l0 260.4L246.3 934.3c-28.7 0-51.9-23.2-51.9-51.9L194.4 545.1 142 545.1l0 389.1c0 28.7 16.7 51.9 45.4 51.9l221.1 0 0-0.8 45.1 0L453.6 686.9l103 0 0.8 298.3 45.1 0 0 0.8 221.1 0c28.7 0 45.4-23.2 45.4-51.9L869 545.1 816.4 545.1zM505.4 63.8c-6.9 0-13.8 2.5-18.6 7.6L41.7 531.7c-10 10.3-9.7 26.7 0.6 36.7 5 4.9 11.5 7.3 18 7.3 6.8 0 13.6-2.6 18.7-7.9l426.4-441.1 426.4 441.1c5.1 5.3 11.9 7.9 18.6 7.9 6.5 0 13-2.4 18-7.3 10.3-10 10.6-26.4 0.6-36.7L524.1 71.3C519.2 66.3 512.3 63.8 505.4 63.8L505.4 63.8z" p-id="10582"></path></svg>

+ 1
- 0
VUECODE/smart-operate-manage/src/icons/svg/operate.svg View File

1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543202499761" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4706" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M362.8 197.04a318.72 318.72 0 0 1 345.52 30.64 96 96 0 1 0 38.4-51.68 384 384 0 0 0-419.92-32.64l1.36 1.2a157.52 157.52 0 0 1 34.64 52.48zM192 480a317.52 317.52 0 0 1 26.96-128h6.08A96 96 0 1 0 160 326.48a384 384 0 0 0 200.88 506.64 160.64 160.64 0 0 1 14.48-64A320 320 0 0 1 192 480z m631.2-74.4a320 320 0 0 1-224.88 382.48 96 96 0 1 0 8.56 64 384 384 0 0 0 276.64-469.44 158.96 158.96 0 0 1-60.32 22.96z" p-id="4707"></path></svg>

+ 1
- 1
VUECODE/smart-operate-manage/src/permission.js View File

5
 import { Message } from 'element-ui'
5
 import { Message } from 'element-ui'
6
 import { getToken } from '@/utils/auth' // 验权
6
 import { getToken } from '@/utils/auth' // 验权
7
 
7
 
8
-const whiteList = ['/login','/index'] // 不重定向白名单
8
+const whiteList = ['/login'] // 不重定向白名单
9
 router.beforeEach((to, from, next) => {
9
 router.beforeEach((to, from, next) => {
10
   NProgress.start()
10
   NProgress.start()
11
   if (getToken()) {
11
   if (getToken()) {

+ 10
- 3
VUECODE/smart-operate-manage/src/router/index.js View File

48
         path: '',
48
         path: '',
49
         component: () => import('@/views/index/index'),
49
         component: () => import('@/views/index/index'),
50
         name: 'index',
50
         name: 'index',
51
-        meta: { title: '首页', icon: 'table' }
51
+        meta: { title: '首页', icon: 'index' }
52
       }
52
       }
53
     ]
53
     ]
54
   },
54
   },
64
         path: 'community',
64
         path: 'community',
65
         component: () => import('@/views/community/communityTable'),
65
         component: () => import('@/views/community/communityTable'),
66
         name: 'community',
66
         name: 'community',
67
-        meta: { title: '社区列表', icon: 'table' }
67
+        meta: { title: '社区列表', icon: 'community' }
68
       }
68
       }
69
     ]
69
     ]
70
   },
70
   },
80
         path: 'index',
80
         path: 'index',
81
         component: () => import('@/views/banner/index'),
81
         component: () => import('@/views/banner/index'),
82
         name: 'banner-index',
82
         name: 'banner-index',
83
-        meta: { title: 'banner运营', icon: 'table' }
83
+        meta: { title: 'banner运营', icon: 'banner' }
84
       },
84
       },
85
       {
85
       {
86
         path: '/banner/addBanner',
86
         path: '/banner/addBanner',
95
         name: 'banner-edi',
95
         name: 'banner-edi',
96
         hidden: true,
96
         hidden: true,
97
         meta: { title: '修改banner', icon: 'table' }
97
         meta: { title: '修改banner', icon: 'table' }
98
+      },
99
+      {
100
+        path: '/banner/infoBanner',
101
+        component: () => import('@/views/banner/infoBanner/index'),
102
+        name: 'banner-info',
103
+        hidden: true,
104
+        meta: { title: '查看banner', icon: 'table' }
98
       }
105
       }
99
     ]
106
     ]
100
   },
107
   },

+ 2
- 1
VUECODE/smart-operate-manage/src/store/getters.js View File

5
   avatar: state => state.user.avatar,
5
   avatar: state => state.user.avatar,
6
   name: state => state.user.name,
6
   name: state => state.user.name,
7
   roles: state => state.user.roles,
7
   roles: state => state.user.roles,
8
-  userData: state => state.user.userData
8
+  userData: state => state.user.userData,
9
+  trunkIndex: state => state.trunkIndex.trunkIndex,
9
 }
10
 }
10
 export default getters
11
 export default getters

+ 3
- 1
VUECODE/smart-operate-manage/src/store/index.js View File

4
 import user from './modules/user'
4
 import user from './modules/user'
5
 import banner from './modules/banner'
5
 import banner from './modules/banner'
6
 import community from './modules/community'
6
 import community from './modules/community'
7
+import trunkIndex from './modules/trunkIndex'
7
 import getters from './getters'
8
 import getters from './getters'
8
 
9
 
9
 Vue.use(Vuex)
10
 Vue.use(Vuex)
13
     app,
14
     app,
14
     user,
15
     user,
15
     community,
16
     community,
16
-    banner
17
+    banner,
18
+    trunkIndex
17
   },
19
   },
18
   getters
20
   getters
19
 })
21
 })

+ 9
- 4
VUECODE/smart-operate-manage/src/store/modules/community.js View File

5
   state: {
5
   state: {
6
     total: '',
6
     total: '',
7
     list: [],
7
     list: [],
8
-    detail: {},
8
+    detail: {
9
+      longitude: '',
10
+      latitude: ''
11
+    },
9
     provinceList: [],
12
     provinceList: [],
10
     cityList: [],
13
     cityList: [],
11
     districtList: [],
14
     districtList: [],
58
           timestamp: new Date(),
61
           timestamp: new Date(),
59
           title: '',
62
           title: '',
60
           status: 'published',
63
           status: 'published',
61
-          type: ''
64
+          type: '',
65
+          longitude: '',
66
+          latitude: ''
62
         }
67
         }
63
       }
68
       }
64
     }
69
     }
116
         fetchCityList(provinceId).then(response => {
121
         fetchCityList(provinceId).then(response => {
117
           const data = response.data
122
           const data = response.data
118
           commit('SET_CITY_LIST', data)
123
           commit('SET_CITY_LIST', data)
119
-          resolve()
124
+          resolve(response)
120
         }).catch(error => {
125
         }).catch(error => {
121
           reject(error)
126
           reject(error)
122
         })
127
         })
128
         fetchDistrictList(cityId).then(response => {
133
         fetchDistrictList(cityId).then(response => {
129
           const data = response.data
134
           const data = response.data
130
           commit('SET_DISTRICT_LIST', data)
135
           commit('SET_DISTRICT_LIST', data)
131
-          resolve()
136
+          resolve(response)
132
         }).catch(error => {
137
         }).catch(error => {
133
           reject(error)
138
           reject(error)
134
         })
139
         })

+ 48
- 0
VUECODE/smart-operate-manage/src/store/modules/trunkIndex.js View File

1
+import { getHardData, getSignUser } from '@/api/index'
2
+
3
+const trunkIndex = {
4
+  namespaced: true,
5
+  state: {
6
+    trunkIndex: {
7
+      hardData: null,
8
+      signUser: null
9
+    }
10
+  },
11
+  mutations: {
12
+    upDateHardData: (state, data) => {
13
+      state.trunkIndex.hardData = data
14
+    },
15
+    upDateSignUser: (state, data) => {
16
+      state.trunkIndex.signUser = data
17
+    }
18
+  },
19
+  actions: {
20
+    // 硬件数据统计
21
+    GetHardData ({ commit }) {
22
+      return new Promise((resolve, reject) => {
23
+        getHardData().then(response => {
24
+          const data = response.data
25
+          commit('upDateHardData', data)
26
+          resolve()
27
+        }).catch(error => {
28
+          reject(error)
29
+        })
30
+      })
31
+    },
32
+
33
+    // 注册用户统计
34
+    GetSignUser ({ commit }) {
35
+      return new Promise((resolve, reject) => {
36
+        getSignUser().then(response => {
37
+          const data = response.data
38
+          commit('upDateSignUser', data)
39
+          resolve(data)
40
+        }).catch(error => {
41
+          reject(error)
42
+        })
43
+      })
44
+    }
45
+  }
46
+}
47
+
48
+export default trunkIndex

+ 1
- 1
VUECODE/smart-operate-manage/src/utils/auth.js View File

7
 }
7
 }
8
 
8
 
9
 export function setToken(token) {
9
 export function setToken(token) {
10
-  return Cookies.set(TokenKey, token)
10
+  return Cookies.set(TokenKey, token, { expires: 7 })
11
 }
11
 }
12
 
12
 
13
 export function removeToken() {
13
 export function removeToken() {

+ 40
- 7
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue View File

10
        <el-form-item :label-width="formLabelWidth" label="生效时间">
10
        <el-form-item :label-width="formLabelWidth" label="生效时间">
11
         <el-date-picker
11
         <el-date-picker
12
           v-model="addForm.effTime"
12
           v-model="addForm.effTime"
13
-          type="datetime"
13
+          type="date"
14
           placeholder="选择日期时间"/>
14
           placeholder="选择日期时间"/>
15
       </el-form-item>
15
       </el-form-item>
16
       <el-form-item :label-width="formLabelWidth" label="失效时间">
16
       <el-form-item :label-width="formLabelWidth" label="失效时间">
17
         <el-date-picker
17
         <el-date-picker
18
           v-model="addForm.expTime"
18
           v-model="addForm.expTime"
19
-          type="datetime"
19
+          type="date"
20
           placeholder="选择日期时间"/>
20
           placeholder="选择日期时间"/>
21
       </el-form-item>
21
       </el-form-item>
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
23
-        <el-input v-model="addForm.bannerCover"/>
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          action="http://localhost:8085/operate-api/uploadimage"
26
+          name="uploadFiles"
27
+          :show-file-list="false"
28
+          :on-success="handleAvatarSuccess">
29
+          <img v-if="imageUrl" :src="imageUrl" class="avatar">
30
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
31
+        </el-upload>
24
       </el-form-item>
32
       </el-form-item>
25
       <el-form-item :label-width="formLabelWidth" label="banner位">
33
       <el-form-item :label-width="formLabelWidth" label="banner位">
26
         <el-select v-model="addForm.bannerPosition" placeholder="请选择位置">
34
         <el-select v-model="addForm.bannerPosition" placeholder="请选择位置">
116
       listLoading: true,
124
       listLoading: true,
117
       importanceOptions: [1, 2, 3],
125
       importanceOptions: [1, 2, 3],
118
       calendarTypeOptions,
126
       calendarTypeOptions,
127
+      imageUrl: '', // 图片预览
119
       listQuery: [], // 接收查询参数,在返回给首页
128
       listQuery: [], // 接收查询参数,在返回给首页
120
       addForm: {
129
       addForm: {
121
         title: '',
130
         title: '',
140
         { id: 1, value: '首页banner' },
149
         { id: 1, value: '首页banner' },
141
         { id: 2, value: '服务banner' }
150
         { id: 2, value: '服务banner' }
142
       ],
151
       ],
143
-      communityArr: [
144
-        { id: 3, value: '智慧社区' },
145
-        { id: 2, value: '测试社区' }
146
-      ]
147
     }
152
     }
148
   },
153
   },
149
   computed: {
154
   computed: {
153
   },
158
   },
154
   created() {
159
   created() {
155
     this.listQuery = this.$route.params.listQuery
160
     this.listQuery = this.$route.params.listQuery
161
+    this.getCommuniryList()
156
   },
162
   },
157
   methods: {
163
   methods: {
158
     ...mapActions('community', [
164
     ...mapActions('community', [
160
       'CreateCommunity',
166
       'CreateCommunity',
161
       'UpdateCommunity'
167
       'UpdateCommunity'
162
     ]),
168
     ]),
169
+    handleAvatarSuccess(res, file) { // 上传成功回调
170
+      this.imageUrl = URL.createObjectURL(file.raw)
171
+      this.addForm.bannerCover = res.data[0]
172
+    },
163
     dialogAddForm() {
173
     dialogAddForm() {
164
       this.dialogFormVisible = true
174
       this.dialogFormVisible = true
165
       this.addForm.title = ''
175
       this.addForm.title = ''
237
 .dialog-footer {
247
 .dialog-footer {
238
   text-align: center;
248
   text-align: center;
239
 }
249
 }
250
+.avatar-uploader .el-upload {
251
+  border: 1px dashed #d9d9d9;
252
+  border-radius: 6px;
253
+  cursor: pointer;
254
+  position: relative;
255
+  overflow: hidden;
256
+}
257
+.avatar-uploader .el-upload:hover {
258
+  border-color: #409EFF;
259
+}
260
+.avatar-uploader-icon {
261
+  font-size: 28px;
262
+  color: #8c939d;
263
+  width: 178px;
264
+  height: 178px;
265
+  line-height: 178px;
266
+  text-align: center;
267
+}
268
+.avatar {
269
+  width: 178px;
270
+  height: 178px;
271
+  display: block;
272
+}
240
 </style>
273
 </style>
241
 
274
 

+ 45
- 11
VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue View File

10
       <el-form-item :label-width="formLabelWidth" label="生效时间">
10
       <el-form-item :label-width="formLabelWidth" label="生效时间">
11
         <el-date-picker
11
         <el-date-picker
12
           v-model="form.effTime"
12
           v-model="form.effTime"
13
-          type="datetime"
13
+          type="date"
14
           placeholder="选择日期时间"/>
14
           placeholder="选择日期时间"/>
15
       </el-form-item>
15
       </el-form-item>
16
       <el-form-item :label-width="formLabelWidth" label="失效时间">
16
       <el-form-item :label-width="formLabelWidth" label="失效时间">
17
         <el-date-picker
17
         <el-date-picker
18
           v-model="form.expTime"
18
           v-model="form.expTime"
19
-          type="datetime"
19
+          type="date"
20
           placeholder="选择日期时间"/>
20
           placeholder="选择日期时间"/>
21
       </el-form-item>
21
       </el-form-item>
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
23
-        <el-input v-model="form.bannerCover"/>
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          action="http://localhost:8085/operate-api/uploadimage"
26
+          name="uploadFiles"
27
+          :show-file-list="false"
28
+          :on-success="handleAvatarSuccess">
29
+          <img v-if="imageUrl" :src="imageUrl" class="avatar">
30
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
31
+        </el-upload>
24
       </el-form-item>
32
       </el-form-item>
25
       <el-form-item :label-width="formLabelWidth" label="banner位">
33
       <el-form-item :label-width="formLabelWidth" label="banner位">
26
         <el-select v-model="form.bannerPosition" placeholder="请选择位置">
34
         <el-select v-model="form.bannerPosition" placeholder="请选择位置">
41
           <!-- <el-option label="区域一" value="shanghai"/> -->
49
           <!-- <el-option label="区域一" value="shanghai"/> -->
42
         </el-select>
50
         </el-select>
43
       </el-form-item>
51
       </el-form-item>
44
-      <el-form-item :label-width="formLabelWidth" label="跳转描述">
52
+      <!-- <el-form-item :label-width="formLabelWidth" label="跳转描述">
45
         <el-input
53
         <el-input
46
           v-model="form.bannerDescription"
54
           v-model="form.bannerDescription"
47
           :autosize="{ minRows: 2, maxRows: 4}"
55
           :autosize="{ minRows: 2, maxRows: 4}"
48
           type="textarea"
56
           type="textarea"
49
           placeholder="请输入跳转描述"/>
57
           placeholder="请输入跳转描述"/>
50
-      </el-form-item>
58
+      </el-form-item> -->
51
       <el-form-item :label-width="formLabelWidth" label="banner跳转">
59
       <el-form-item :label-width="formLabelWidth" label="banner跳转">
52
         <el-radio v-model="form.bannerType" label="1" @change="showContent">外部超链接</el-radio>
60
         <el-radio v-model="form.bannerType" label="1" @change="showContent">外部超链接</el-radio>
53
         <el-radio v-model="form.bannerType" label="2" @change="showContent">自写文章</el-radio>
61
         <el-radio v-model="form.bannerType" label="2" @change="showContent">自写文章</el-radio>
54
       </el-form-item>
62
       </el-form-item>
55
-      <el-form-item v-if="showURLVisible" :label-width="formLabelWidth" label="URL">
56
-        <el-input v-model="form.externalLink" placeholder="URL"/>
63
+      <el-form-item v-if="showURLVisible" :label-width="formLabelWidth" label="跳转链接">
64
+        <el-input v-model="form.externalLink" placeholder="跳转链接"/>
57
       </el-form-item>
65
       </el-form-item>
58
       <div v-if="showContentVisible">
66
       <div v-if="showContentVisible">
59
         <el-form-item :label-width="formLabelWidth" label="内容标题">
67
         <el-form-item :label-width="formLabelWidth" label="内容标题">
116
       list: null,
124
       list: null,
117
       total: 0,
125
       total: 0,
118
       listLoading: true,
126
       listLoading: true,
127
+      imageUrl: '', // 图片预览
119
       importanceOptions: [1, 2, 3],
128
       importanceOptions: [1, 2, 3],
120
       calendarTypeOptions,
129
       calendarTypeOptions,
121
       listQuery: [],
130
       listQuery: [],
141
       bannerPositionArr: [
150
       bannerPositionArr: [
142
         { id: 1, value: '首页banner' },
151
         { id: 1, value: '首页banner' },
143
         { id: 2, value: '服务banner' }
152
         { id: 2, value: '服务banner' }
144
-      ],
145
-      communityArr: [
146
-        { id: 3, value: '智慧社区' },
147
-        { id: 2, value: '测试社区' }
148
       ]
153
       ]
149
     }
154
     }
150
   },
155
   },
154
     })
159
     })
155
   },
160
   },
156
   created() {
161
   created() {
162
+    this.getCommuniryList()
157
     this.getByBannerId(this.$route.params.id)
163
     this.getByBannerId(this.$route.params.id)
158
     this.listQuery = this.$route.params.listQuery
164
     this.listQuery = this.$route.params.listQuery
159
   },
165
   },
166
       'CreateCommunity',
172
       'CreateCommunity',
167
       'UpdateCommunity'
173
       'UpdateCommunity'
168
     ]),
174
     ]),
175
+    handleAvatarSuccess(res, file) { // 上传成功回调
176
+      this.imageUrl = URL.createObjectURL(file.raw)
177
+      this.addForm.bannerCover = res.data[0]
178
+    },
169
     dialogAddForm() {
179
     dialogAddForm() {
170
       this.dialogFormVisible = true
180
       this.dialogFormVisible = true
171
       this.form.title = ''
181
       this.form.title = ''
224
     getByBannerId(bannerId) {
234
     getByBannerId(bannerId) {
225
       this.$store.dispatch('GetByBannerId', bannerId).then(res => {
235
       this.$store.dispatch('GetByBannerId', bannerId).then(res => {
226
         this.form = res
236
         this.form = res
237
+        this.imageUrl = this.form.bannerCover
227
         // this.catchData(this.form.bannerContent)
238
         // this.catchData(this.form.bannerContent)
228
         this.showContent()
239
         this.showContent()
229
       })
240
       })
249
 .dialog-footer {
260
 .dialog-footer {
250
   text-align: center;
261
   text-align: center;
251
 }
262
 }
263
+.avatar-uploader .el-upload {
264
+  border: 1px dashed #d9d9d9;
265
+  border-radius: 6px;
266
+  cursor: pointer;
267
+  position: relative;
268
+  overflow: hidden;
269
+}
270
+.avatar-uploader .el-upload:hover {
271
+  border-color: #409EFF;
272
+}
273
+.avatar-uploader-icon {
274
+  font-size: 28px;
275
+  color: #8c939d;
276
+  width: 178px;
277
+  height: 178px;
278
+  line-height: 178px;
279
+  text-align: center;
280
+}
281
+.avatar {
282
+  width: 178px;
283
+  height: 178px;
284
+  display: block;
285
+}
252
 </style>
286
 </style>
253
 
287
 

+ 11
- 11
VUECODE/smart-operate-manage/src/views/banner/index.vue View File

42
       <el-table-column label="标题" align="center" min-width="250px">
42
       <el-table-column label="标题" align="center" min-width="250px">
43
         <template slot-scope="scope">
43
         <template slot-scope="scope">
44
           <!-- <span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.title }}</span> -->
44
           <!-- <span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.title }}</span> -->
45
-          <el-tag>{{ scope.row.title }}</el-tag>
45
+          <span class="link-type" @click="infoBanner(scope.row.id)">{{ scope.row.title }}</span>
46
         </template>
46
         </template>
47
       </el-table-column>
47
       </el-table-column>
48
       <el-table-column label="适用社区" align="center">
48
       <el-table-column label="适用社区" align="center">
230
     updateBanner(bannerId) {
230
     updateBanner(bannerId) {
231
       this.$router.push({ name: 'banner-edi', params: { id: bannerId, listQuery: this.listQuery }})
231
       this.$router.push({ name: 'banner-edi', params: { id: bannerId, listQuery: this.listQuery }})
232
     },
232
     },
233
+    infoBanner(bannerId) {
234
+      this.$router.push({ name: 'banner-info', params: { id: bannerId, listQuery: this.listQuery }})
235
+    },
233
     handleSizeChange(val) {
236
     handleSizeChange(val) {
234
       // console.log(`每页 ${val} 条`);
237
       // console.log(`每页 ${val} 条`);
235
       this.listQuery.pageSize = val
238
       this.listQuery.pageSize = val
240
       this.listQuery.pageNum = val
243
       this.listQuery.pageNum = val
241
       this.getList()
244
       this.getList()
242
     },
245
     },
243
-    padDate(value) {
244
-      value = value < 10 ? '0' + value : value
245
-      return value
246
-    },
247
     formatDate(val) {
246
     formatDate(val) {
248
       var value = new Date(val)
247
       var value = new Date(val)
249
       var year = value.getFullYear()
248
       var year = value.getFullYear()
250
-      var month = this.padDate(value.getMonth() + 1)
251
-      var day = this.padDate(value.getDate())
252
-      var hour = this.padDate(value.getHours())
253
-      var minutes = this.padDate(value.getMinutes())
254
-      var seconds = this.padDate(value.getSeconds())
255
-      return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
249
+      var month = value.getMonth() + 1
250
+      var day = value.getDate()
251
+      var hour = value.getHours()
252
+      var minutes = value.getMinutes()
253
+      var seconds = value.getSeconds()
254
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
255
+      return year + '-' + month + '-' + day
256
     },
256
     },
257
     getList() {
257
     getList() {
258
       this.listLoading = true
258
       this.listLoading = true

+ 292
- 0
VUECODE/smart-operate-manage/src/views/banner/infoBanner/index.vue View File

1
+<template>
2
+  <div id="app" class="app-container">
3
+    <el-form ref="form" :model="form">
4
+      <el-form-item :label-width="formLabelWidth" label="标题">
5
+        <span>{{ form.title }}</span>
6
+      </el-form-item>
7
+      <el-form-item :label-width="formLabelWidth" label="权重">
8
+        <span>{{ form.sort }}</span>
9
+      </el-form-item>
10
+      <el-form-item :label-width="formLabelWidth" label="生效时间">
11
+        <span>{{ formatDate(form.effTime) }}</span>
12
+      </el-form-item>
13
+      <el-form-item :label-width="formLabelWidth" label="失效时间">
14
+        <span>{{ formatDate(form.expTime) }}</span>
15
+      </el-form-item>
16
+      <el-form-item :label-width="formLabelWidth" label="banner图">
17
+          <img v-if="imageUrl" :src="imageUrl" class="avatar">
18
+          <span v-else >无Banner图</span>
19
+      </el-form-item>
20
+      <el-form-item :label-width="formLabelWidth" label="banner位">
21
+          <span>{{ getBanner(form.bannerPosition) }}</span>
22
+      </el-form-item>
23
+      <el-form-item :label-width="formLabelWidth" label="投放社区">
24
+        <span>{{ getCommunity(form.communityId) }}</span>
25
+      </el-form-item>
26
+      <!-- <el-form-item :label-width="formLabelWidth" label="跳转描述">
27
+        <el-input
28
+          v-model="form.bannerDescription"
29
+          :autosize="{ minRows: 2, maxRows: 4}"
30
+          type="textarea"
31
+          placeholder="请输入跳转描述"/>
32
+      </el-form-item> -->
33
+      <el-form-item :label-width="formLabelWidth" label="banner跳转">
34
+        <span v-show="showURLVisible" label="1" @change="showContent">外部超链接</span>
35
+        <span v-show="showContentVisible" label="2" @change="showContent">自写文章</span>
36
+      </el-form-item>
37
+      <el-form-item v-if="showURLVisible" :label-width="formLabelWidth" label="跳转链接">
38
+        <span><a :href="form.externalLink" target="_blank">{{ form.externalLink }}</a></span>
39
+      </el-form-item>
40
+      <div v-if="showContentVisible">
41
+        <el-form-item :label-width="formLabelWidth" label="内容标题">
42
+          <span>{{ form.bannerTitle }}</span>
43
+        </el-form-item>
44
+        <!-- <el-form-item :label-width="formLabelWidth" label="内容详情">
45
+          <el-input v-model="form.bannerContent" placeholder="内容详情"/>
46
+        </el-form-item> -->
47
+        <el-form-item :label-width="formLabelWidth" label="内容详情">
48
+          <div id="father" v-html="this.form.bannerContent"></div>
49
+        </el-form-item>
50
+      </div>
51
+    </el-form>
52
+    <div slot="footer" class="dialog-footer">
53
+      <el-button @click="dialogForm('0')">返 回</el-button>
54
+    </div>
55
+  </div>
56
+</template>
57
+
58
+<script>
59
+// import { updateArticle, createBanner } from '@/api/banner' // Banner
60
+import { mapState, mapActions } from 'vuex'
61
+import waves from '@/directive/waves' // Waves directive
62
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
63
+import Wangeditor from '@/components/Wangeditor'
64
+const calendarTypeOptions = [
65
+  { key: 'CN', display_name: 'China' },
66
+  { key: 'US', display_name: 'USA' },
67
+  { key: 'JP', display_name: 'Japan' },
68
+  { key: 'EU', display_name: 'Eurozone' }
69
+]
70
+// arr to obj ,such as { CN : "China", US : "USA" }
71
+const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
72
+  acc[cur.key] = cur.display_name
73
+  return acc
74
+}, {})
75
+export default {
76
+  name: 'UpdateBanner',
77
+  components: { Pagination, Wangeditor },
78
+  directives: { waves },
79
+  filters: {
80
+    statusFilter(status) {
81
+      const statusMap = {
82
+        published: 'success',
83
+        draft: 'info',
84
+        deleted: 'danger'
85
+      }
86
+      return statusMap[status]
87
+    },
88
+    typeFilter(type) {
89
+      return calendarTypeKeyValue[type]
90
+    }
91
+  },
92
+  data() {
93
+    return {
94
+      tableKey: 0,
95
+      list: null,
96
+      total: 0,
97
+      listLoading: true,
98
+      imageUrl: '', // 图片预览
99
+      importanceOptions: [1, 2, 3],
100
+      calendarTypeOptions,
101
+      listQuery: [],
102
+      form: {
103
+        title: '',
104
+        sort: '1',
105
+        bannerCover: '',
106
+        bannerPosition: '',
107
+        communityId: '',
108
+        effTime: '',
109
+        expTime: '',
110
+        bannerType: '1',
111
+        externalLink: '',
112
+        bannerTitle: '',
113
+        bannerContent: '',
114
+        bannerDescription: ''
115
+      },
116
+      dialogStatus: '',
117
+      downloadLoading: false,
118
+      formLabelWidth: '120px',
119
+      showContentVisible: false,
120
+      showURLVisible: true,
121
+      bannerPositionArr: [
122
+        { id: 1, value: '首页banner' },
123
+        { id: 2, value: '服务banner' }
124
+      ]
125
+    }
126
+  },
127
+  computed: {
128
+    ...mapState('community', {
129
+      communityList: s => s.list
130
+    })
131
+  },
132
+  created() {
133
+    this.getCommuniryList()
134
+    this.getByBannerId(this.$route.params.id)
135
+    this.listQuery = this.$route.params.listQuery
136
+  },
137
+  mounted() {
138
+    window.addEventListener('beforeunload', e => {
139
+      this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
140
+    })
141
+  },
142
+  methods: {
143
+    ...mapActions('community', [
144
+      'FetchCommunityList',
145
+      'CreateCommunity',
146
+      'UpdateCommunity'
147
+    ]),
148
+    handleAvatarSuccess(res, file) { // 上传成功回调
149
+      this.imageUrl = URL.createObjectURL(file.raw)
150
+      this.addForm.bannerCover = res.data[0]
151
+    },
152
+    dialogAddForm() {
153
+      this.dialogFormVisible = true
154
+      this.form.title = ''
155
+      this.form.sort = '1'
156
+      this.form.bannerCover = ''
157
+      this.form.bannerPosition = '-1'
158
+      this.form.communityId = '-1'
159
+      this.form.effTime = ''
160
+      this.form.expTime = ''
161
+      this.form.bannerType = '1'
162
+      this.form.externalLink = ''
163
+      this.form.bannerTitle = ''
164
+      this.form.bannerContent = ''
165
+      this.form.bannerDescription = ''
166
+    },
167
+    wangeditorValue(value){
168
+      console.log("富文本内容:" + value)
169
+      this.form.bannerContent = value      //在这里接受子组件传过来的参数,赋值给data里的参数
170
+    },
171
+    dialogForm(isVaule) {
172
+      if (isVaule === '0') {
173
+        this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
174
+      } else {
175
+        this.updateData()
176
+      }
177
+    },
178
+    showContent() {
179
+      if (this.form.bannerType === '1') {
180
+        this.showContentVisible = false
181
+        this.showURLVisible = true
182
+      } else {
183
+        this.showContentVisible = true
184
+        this.showURLVisible = false
185
+      }
186
+    },
187
+    updateData() {
188
+      this.$refs['form'].validate((valid) => {
189
+        if (valid) {
190
+          this.$store.dispatch('UpdateBanner', this.form).then((res) => {
191
+            if (res.code === '0') {
192
+              this.$message({
193
+                message: res.message,
194
+                type: 'success'
195
+              })
196
+              this.$router.push({ name: 'banner-index', params: { listQuery: this.listQuery }})
197
+            } else {
198
+              this.$message({
199
+                message: res.message,
200
+                type: 'warning'
201
+              })
202
+            }
203
+          })
204
+        }
205
+      })
206
+    },
207
+    padDate(value) {
208
+      value = value < 10 ? '0' + value : value
209
+      return value
210
+    },
211
+    formatDate(val) {
212
+      var value = new Date(val)
213
+      var year = value.getFullYear()
214
+      var month = this.padDate(value.getMonth() + 1)
215
+      var day = this.padDate(value.getDate())
216
+      var hour = this.padDate(value.getHours())
217
+      var minutes = this.padDate(value.getMinutes())
218
+      var seconds = this.padDate(value.getSeconds())
219
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
220
+      return year + '-' + month + '-' + day
221
+    },
222
+    getByBannerId(bannerId) {
223
+      this.$store.dispatch('GetByBannerId', bannerId).then(res => {
224
+        this.form = res
225
+        this.imageUrl = this.form.bannerCover
226
+        // this.catchData(this.form.bannerContent)
227
+        this.showContent()
228
+      })
229
+    },
230
+    getCommuniryList() {
231
+      this.listLoading = true
232
+      this.FetchCommunityList().then(() => {
233
+        this.listLoading = false
234
+      }).catch(() => {
235
+        this.loading = false
236
+        console.log('get list error')
237
+      })
238
+    },
239
+    getBanner(bannerId) {
240
+      const bannerPosition = this.bannerPositionArr
241
+      for (const i in bannerPosition) {
242
+        if (bannerPosition[i].id === bannerId) {
243
+          return bannerPosition[i].value
244
+        }
245
+      }
246
+    },
247
+    getCommunity(communityId) {
248
+      const community = this.communityList
249
+      for (const i in community) {
250
+        if (community[i].id === communityId) {
251
+          return community[i].communityName
252
+        }
253
+      }
254
+    }
255
+  }
256
+}
257
+</script>
258
+
259
+<style scoped>
260
+.app-container {
261
+  width: 50%;
262
+  margin: auto;
263
+}
264
+.dialog-footer {
265
+  text-align: center;
266
+}
267
+.avatar-uploader .el-upload {
268
+  border: 1px dashed #d9d9d9;
269
+  border-radius: 6px;
270
+  cursor: pointer;
271
+  position: relative;
272
+  overflow: hidden;
273
+}
274
+.avatar-uploader .el-upload:hover {
275
+  border-color: #409EFF;
276
+}
277
+.avatar-uploader-icon {
278
+  font-size: 28px;
279
+  color: #8c939d;
280
+  width: 178px;
281
+  height: 178px;
282
+  line-height: 178px;
283
+  text-align: center;
284
+}
285
+.avatar {
286
+  width: 178px;
287
+  height: 178px;
288
+  display: block;
289
+}
290
+</style>
291
+
292
+

+ 69
- 10
VUECODE/smart-operate-manage/src/views/community/communityTable.vue View File

38
       </el-table-column>
38
       </el-table-column>
39
       <el-table-column label="社区名称" align="center">
39
       <el-table-column label="社区名称" align="center">
40
         <template slot-scope="scope">
40
         <template slot-scope="scope">
41
-          <span>{{ scope.row.communityName }}</span>
41
+          <span @click="handleLook(scope.row)" style="color: #409EFF;cursor: pointer">{{ scope.row.communityName }}</span>
42
         </template>
42
         </template>
43
       </el-table-column>
43
       </el-table-column>
44
       <el-table-column label="社区别名" align="center">
44
       <el-table-column label="社区别名" align="center">
153
       </div>
153
       </div>
154
     </el-dialog>
154
     </el-dialog>
155
 
155
 
156
+    <el-dialog :title="查看" :visible.sync="dialogLookFormVisible">
157
+      <el-form ref="dataForm" :rules="rules" :model="detail" label-position="left" label-width="100px" style="margin-left:50px;">
158
+        <el-form-item label="社区名称">
159
+          <el-input v-model="detail.communityName"/>
160
+        </el-form-item>
161
+        <el-form-item label="社区别名">
162
+          <el-input v-model="detail.communityAlias"/>
163
+        </el-form-item>
164
+        <el-form-item label="所在区县">
165
+          <el-select v-model="detail.provinceId" placeholder="省" clearable style="width: 90px" class="filter-item" @change="getEditCityList">
166
+            <el-option v-for="item in provinceList" :key="item.id" :label="item.province" :value="item.id"/>
167
+          </el-select>
168
+          <el-select v-model="detail.cityId" placeholder="市" clearable class="filter-item" style="width: 130px" @change="getEditDistrictList">
169
+            <el-option v-for="item in editCityList" :key="item.id" :label="item.city" :value="item.id"/>
170
+          </el-select>
171
+          <el-select v-model="detail.districtId" placeholder="区县乡" clearable class="filter-item" style="width: 130px">
172
+            <el-option v-for="item in editDistrictList" :key="item.id" :label="item.district" :value="item.id"/>
173
+          </el-select>
174
+        </el-form-item>
175
+        <el-form-item label="高德坐标">
176
+          <el-input
177
+            v-model="detail.longitude"
178
+            placeholder="经度"/>
179
+          <el-input
180
+            v-model="detail.latitude"
181
+            placeholder="纬度"/>
182
+        </el-form-item>
183
+        <!-- <el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box> -->
184
+        <div style="width:100%;height:200px;">
185
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo" >
186
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
187
+          </el-amap>
188
+        </div>
189
+        <el-form-item label="管理员姓名">
190
+          <el-input
191
+            v-model="detail.userName"
192
+            placeholder="建议先填写运营人员姓名"/>
193
+        </el-form-item>
194
+        <el-form-item label="管理员账号">
195
+          <el-input
196
+            v-model="detail.loginName"
197
+            placeholder="建议先填写运营人员手机号"/>
198
+        </el-form-item>
199
+      </el-form>
200
+      <div slot="footer" class="dialog-footer">
201
+        <el-button @click="dialogLookFormVisible = false">取 消</el-button>
202
+        <el-button type="primary" @click="dialogLookFormVisible = false,handleUpdate(detail)">修 改</el-button>
203
+      </div>
204
+    </el-dialog>
205
+
156
     <el-dialog :visible.sync="dialogPvVisible" title="Reading statistics">
206
     <el-dialog :visible.sync="dialogPvVisible" title="Reading statistics">
157
       <el-table :data="pvData" border fit highlight-current-row style="width: 100%">
207
       <el-table :data="pvData" border fit highlight-current-row style="width: 100%">
158
         <el-table-column prop="key" label="Channel"/>
208
         <el-table-column prop="key" label="Channel"/>
247
       statusOptions: ['published', 'draft', 'deleted'],
297
       statusOptions: ['published', 'draft', 'deleted'],
248
       showReviewer: false,
298
       showReviewer: false,
249
       dialogFormVisible: false,
299
       dialogFormVisible: false,
300
+      dialogLookFormVisible: false,
250
       dialogStatus: '',
301
       dialogStatus: '',
251
       textMap: {
302
       textMap: {
252
         update: '编辑',
303
         update: '编辑',
331
       })
382
       })
332
     },
383
     },
333
     getEditCityList() {
384
     getEditCityList() {
334
-      console.log(this.detail.provinceId)
335
       this.FetchEditCityList(this.detail.provinceId).then(() => {
385
       this.FetchEditCityList(this.detail.provinceId).then(() => {
336
       }).catch(() => {
386
       }).catch(() => {
337
         console.log('get list error')
387
         console.log('get list error')
388
       }
438
       }
389
       this.handleFilter()
439
       this.handleFilter()
390
     },
440
     },
391
-    handleCreate() {
392
-      this.resetDetail()
393
-      this.dialogStatus = 'create'
394
-      this.dialogFormVisible = true
395
-      this.$nextTick(() => {
396
-        this.$refs['dataForm'].clearValidate()
397
-      })
398
-    },
399
     createData() {
441
     createData() {
400
       this.$refs['dataForm'].validate((valid) => {
442
       this.$refs['dataForm'].validate((valid) => {
401
         if (valid) {
443
         if (valid) {
427
       this.getEditCityList()
469
       this.getEditCityList()
428
       this.getEditDistrictList()
470
       this.getEditDistrictList()
429
     },
471
     },
472
+    handleLook(row) {
473
+      this.setCurrent(row)
474
+      this.dialogLookFormVisible = true
475
+      this.$nextTick(() => {
476
+        this.$refs['dataForm'].clearValidate()
477
+      })
478
+      this.getEditCityList()
479
+      this.getEditDistrictList()
480
+    },
481
+    handleCreate() {
482
+      this.resetDetail()
483
+      this.dialogStatus = 'create'
484
+      this.dialogFormVisible = true
485
+      this.$nextTick(() => {
486
+        this.$refs['dataForm'].clearValidate()
487
+      })
488
+    },
430
     updateData() {
489
     updateData() {
431
       this.$refs['dataForm'].validate((valid) => {
490
       this.$refs['dataForm'].validate((valid) => {
432
         if (valid) {
491
         if (valid) {

+ 1
- 0
VUECODE/smart-operate-manage/src/views/index/index.vue View File

57
       margin: 8px;
57
       margin: 8px;
58
       background: #2c343a;
58
       background: #2c343a;
59
       border-radius: 5px;
59
       border-radius: 5px;
60
+      overflow: hidden;
60
     }
61
     }
61
   }
62
   }
62
   .middle {
63
   .middle {

+ 16
- 8
VUECODE/smart-operate-manage/src/views/layout/components/Navbar.vue View File

1
 <template>
1
 <template>
2
   <el-menu class="navbar" mode="horizontal">
2
   <el-menu class="navbar" mode="horizontal">
3
-    <hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/>
4
-    <breadcrumb />
3
+    <hamburger
4
+      :toggle-click="toggleSideBar"
5
+      :is-active="sidebar.opened"
6
+      class="hamburger-container"
7
+    />
8
+    <breadcrumb/>
5
     <el-dropdown class="avatar-container" trigger="click">
9
     <el-dropdown class="avatar-container" trigger="click">
6
       <div class="avatar-wrapper">
10
       <div class="avatar-wrapper">
7
-        <span>{{ userData.userName }}</span>
11
+        <span style="position: relative;top: -15px;right:5px">{{ userData.userName }}</span>
8
         <img :src="userData.headPortrait" class="user-avatar" v-if="userData.headPortrait != ''">
12
         <img :src="userData.headPortrait" class="user-avatar" v-if="userData.headPortrait != ''">
9
         <i class="el-icon-caret-bottom"/>
13
         <i class="el-icon-caret-bottom"/>
10
       </div>
14
       </div>
11
       <el-dropdown-menu slot="dropdown" class="user-dropdown">
15
       <el-dropdown-menu slot="dropdown" class="user-dropdown">
12
         <router-link class="inlineBlock" to="/">
16
         <router-link class="inlineBlock" to="/">
13
-          <el-dropdown-item>
14
-            首页
15
-          </el-dropdown-item>
17
+          <el-dropdown-item>首页</el-dropdown-item>
16
         </router-link>
18
         </router-link>
17
         <el-dropdown-item divided>
19
         <el-dropdown-item divided>
18
           <span style="display:block;" @click="logout">注销</span>
20
           <span style="display:block;" @click="logout">注销</span>
40
     ])
42
     ])
41
   },
43
   },
42
   methods: {
44
   methods: {
43
-    toggleSideBar() {
45
+    toggleSideBar () {
44
       this.$store.dispatch('ToggleSideBar')
46
       this.$store.dispatch('ToggleSideBar')
45
     },
47
     },
46
-    logout() {
48
+    logout () {
47
       this.$store.dispatch('LogOut').then(() => {
49
       this.$store.dispatch('LogOut').then(() => {
48
         location.reload() // 为了重新实例化vue-router对象 避免bug
50
         location.reload() // 为了重新实例化vue-router对象 避免bug
49
       })
51
       })
57
   height: 50px;
59
   height: 50px;
58
   line-height: 50px;
60
   line-height: 50px;
59
   border-radius: 0px !important;
61
   border-radius: 0px !important;
62
+  background-color:#1f2d3d;
63
+  border: 0px;
60
   .hamburger-container {
64
   .hamburger-container {
61
     line-height: 58px;
65
     line-height: 58px;
62
     height: 50px;
66
     height: 50px;
63
     float: left;
67
     float: left;
64
     padding: 0 10px;
68
     padding: 0 10px;
69
+    color: #fff;
65
   }
70
   }
66
   .screenfull {
71
   .screenfull {
67
     position: absolute;
72
     position: absolute;
90
         font-size: 12px;
95
         font-size: 12px;
91
       }
96
       }
92
     }
97
     }
98
+    span{
99
+      color: #fff;
100
+    }
93
   }
101
   }
94
 }
102
 }
95
 </style>
103
 </style>

+ 35
- 8
VUECODE/smart-operate-manage/src/views/login/index.vue View File

1
 <template>
1
 <template>
2
   <div class="login-container">
2
   <div class="login-container">
3
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
4
-      <img src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543283673332.png?Expires=1545111060&OSSAccessKeyId=LTAIkc75dpkJw8Lb&Signature=HqQy2E2tWJ4Vbc8HClE3jqPTx0s%3D">
3
+    <el-form
4
+      ref="loginForm"
5
+      :model="loginForm"
6
+      :rules="loginRules"
7
+      class="login-form"
8
+      auto-complete="on"
9
+      label-position="left"
10
+    >
11
+      <div class="logo">
12
+        <img
13
+          src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543283673332.png?Expires=1545111060&OSSAccessKeyId=LTAIkc75dpkJw8Lb&Signature=HqQy2E2tWJ4Vbc8HClE3jqPTx0s%3D"
14
+        >
15
+      </div>
5
       <h3 class="title">智慧社区运营系统</h3>
16
       <h3 class="title">智慧社区运营系统</h3>
6
       <el-form-item prop="username">
17
       <el-form-item prop="username">
7
         <span class="svg-container">
18
         <span class="svg-container">
8
-          <svg-icon icon-class="user" />
19
+          <svg-icon icon-class="user"/>
9
         </span>
20
         </span>
10
-        <el-input v-model="loginForm.username" name="username" type="text" auto-complete="on" placeholder="请输入手机号" />
21
+        <el-input
22
+          v-model="loginForm.username"
23
+          name="username"
24
+          type="text"
25
+          auto-complete="on"
26
+          placeholder="请输入手机号"
27
+        />
11
       </el-form-item>
28
       </el-form-item>
12
       <div class="pwdSend">
29
       <div class="pwdSend">
13
         <el-form-item prop="password">
30
         <el-form-item prop="password">
17
             type="text"
34
             type="text"
18
             auto-complete="on"
35
             auto-complete="on"
19
             placeholder="请输入验证码"
36
             placeholder="请输入验证码"
20
-            @keyup.enter.native="handleLogin" />
37
+            @keyup.enter.native="handleLogin"
38
+          />
21
         </el-form-item>
39
         </el-form-item>
22
         <el-button type="primary" @click="sendCode();">发送验证码</el-button>
40
         <el-button type="primary" @click="sendCode();">发送验证码</el-button>
23
       </div>
41
       </div>
24
-      <el-button :loading="loading" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
25
-        登录
26
-      </el-button>
42
+      <el-button
43
+        :loading="loading"
44
+        type="primary"
45
+        style="width:100%;"
46
+        @click.native.prevent="handleLogin"
47
+      >登录</el-button>
27
     </el-form>
48
     </el-form>
28
   </div>
49
   </div>
29
 </template>
50
 </template>
135
 </style>
156
 </style>
136
 
157
 
137
 <style rel="stylesheet/scss" lang="scss" scoped>
158
 <style rel="stylesheet/scss" lang="scss" scoped>
159
+.logo{
160
+  text-align:center;
161
+  img{
162
+    margin-bottom:10px;
163
+  }
164
+}
138
 $bg: #2d3a4b;
165
 $bg: #2d3a4b;
139
 $dark_gray: #889aa4;
166
 $dark_gray: #889aa4;
140
 $light_gray: #eee;
167
 $light_gray: #eee;