diff --git a/src/main/java/com/cm/systemcity/controller/apis/grid/GridController.java b/src/main/java/com/cm/systemcity/controller/apis/grid/GridController.java index 9ddb117..e5070e0 100644 --- a/src/main/java/com/cm/systemcity/controller/apis/grid/GridController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/grid/GridController.java @@ -37,6 +37,18 @@ public class GridController extends AbstractController { @Qualifier("cityGridService") private IGridService gridService; + /** + * 复制一个网格 + * @return + * @throws Exception + */ + @PutMapping("update-copy-grid/{gridId}") + public SuccessResult updateCopyGrid(@PathVariable("gridId") String gridId, + @RequestBody Map params) throws Exception { + gridService.updateCopyGrid(gridId, params); + return new SuccessResult(); + } + @ApiOperation(value = "新增网格", notes = "新增网格接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") diff --git a/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java b/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java index cbd9e7f..c91b5d8 100755 --- a/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java @@ -209,6 +209,14 @@ public class ReportCaseController extends AbstractController { return reportCaseDTO; } + @GetMapping("getreportcasefordel/{reportCaseId}") + public ReportCaseDTO getReportCaseForDel(@PathVariable("reportCaseId") String reportCaseId) throws SearchException { + Map params = getParams(); + params.put("reportCaseId", reportCaseId); + ReportCaseDTO reportCaseDTO = reportCaseService.getReportCaseForDel(params); + return reportCaseDTO; + } + @ApiOperation(value = "分页上报案件列表", notes = "分页上报案件列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"), diff --git a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java index 310b053..44db0e5 100644 --- a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java +++ b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java @@ -5,6 +5,7 @@ import com.cm.common.component.SecurityComponent; import com.cm.common.constants.ISystemConstant; import com.cm.common.exception.ParamsException; import com.cm.common.exception.SearchException; +import com.cm.common.plugin.oauth.service.user.IUserService; import com.cm.common.pojo.ListPage; import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.ErrorResult; @@ -26,6 +27,7 @@ import com.cm.systemcity.service.bindingdepartment.IBindingDepartmentService; import com.cm.systemcity.service.community.ICommunityService; import com.cm.systemcity.service.communityboss.ICommunityBossService; import com.cm.systemcity.service.dict.IDictService; +import com.cm.systemcity.service.grid.IGridService; import com.cm.systemcity.service.readstate.IReadStateService; import com.cm.systemcity.service.reportcase.IReportCaseService; import com.cm.systemcity.service.userlocation.IUserLocationService; @@ -73,6 +75,71 @@ public class DataReleaseController extends AbstractController { private ICommunityBossService communityBossService; @Autowired private IBindingDepartmentService bindingDepartmentService; + @Autowired + private IGridService gridService; + + /** + * 大数据网格详情页接口 + */ + @GetMapping("get-big-data-grid-detail") + public Map listBigDataGridDetail(){ + Map query = requestParams(); + Map res = new HashMap<>(8); + if(query.get("gridId") == null || "".equals(query.get("gridId").toString())){ + return res; + } + String gridId = query.get("gridId").toString(); + // 查询网格信息 + com.cm.systemcity.pojo.dtos.grid.GridDTO gridDTO = gridService.get(gridId); + res.put("gridInfo", gridDTO); + // 查询网格内所有网格员或专管员 + List> gridUserList = dataReleaseDao.listUserByGridId(gridId); + for(Map item : gridUserList){ + // 判断用户是否为专管员 + String userId = item.get("userId").toString(); + Map roleObj = dataReleaseDao.getUserRoleForCheckNPerson(userId); + item.put("deptOrCommunity", ""); + item.put("reportCaseNum", "0"); + item.put("handleCaseNum", "0"); + if(roleObj != null){ + // 专管员 + List> usersDept = dataReleaseDao.listDepartmentByUserId(userId); + String deptNames = ""; + for(Map deptItem : usersDept){ + if("".equals(deptNames)){ + deptNames += deptItem.get("departmentName").toString(); + } else{ + deptNames += "," + deptItem.get("departmentName").toString(); + } + } + item.put("deptOrCommunity", deptNames); + // 查询案件信息 + item.put("reportCaseNum", "-"); + List> handleCaseNum = dataReleaseDao.listHandleCaseByUserId(userId); + item.put("handleCaseNum", handleCaseNum.size()); + } else { + // 网格员 + query.put("communityBossUserId", userId); + CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(query); + query.put("communityId", communityBoss.getCommunityId()); + CommunityDTO community = communityService.getCommunity(query); + String deptOrCommunity = ""; + deptOrCommunity += communityBoss.getAreaName(); + if(community != null){ + deptOrCommunity += "/" + community.getCommunityName(); + } + item.put("deptOrCommunity", deptOrCommunity); + // 查询案件信息 + query.put("creator", userId); + List> listReport = dataReleaseDao.listReportCase(query); + item.put("reportCaseNum", listReport.size()); + List> handleCaseNum = dataReleaseDao.listHandleCaseByUserId(userId); + item.put("handleCaseNum", handleCaseNum.size()); + } + } + res.put("gridUser", gridUserList == null ? new ArrayList<>(0) : gridUserList); + return res; + } /** * 大数据二级页面-地图大网格 diff --git a/src/main/java/com/cm/systemcity/controller/route/grid/GridRouteController.java b/src/main/java/com/cm/systemcity/controller/route/grid/GridRouteController.java index b215efb..5fd6bd4 100644 --- a/src/main/java/com/cm/systemcity/controller/route/grid/GridRouteController.java +++ b/src/main/java/com/cm/systemcity/controller/route/grid/GridRouteController.java @@ -24,6 +24,12 @@ public class GridRouteController { @Autowired private IConfigService configService; + @GetMapping("copy-grid") + public ModelAndView copyGrid() { + ModelAndView mv = new ModelAndView("grid/grid/default/copy-grid"); + return mv; + } + @GetMapping("save") public ModelAndView save() { ModelAndView mv = new ModelAndView("grid/grid/default/save"); diff --git a/src/main/java/com/cm/systemcity/dao/datarelease/IDataReleaseDao.java b/src/main/java/com/cm/systemcity/dao/datarelease/IDataReleaseDao.java index c779a95..4088402 100644 --- a/src/main/java/com/cm/systemcity/dao/datarelease/IDataReleaseDao.java +++ b/src/main/java/com/cm/systemcity/dao/datarelease/IDataReleaseDao.java @@ -90,4 +90,14 @@ public interface IDataReleaseDao { Integer countOfBasePopulation(Map query); Map getDataArea(Map query); + + Map getGridById(Map query); + + List> listUserByGridId(String gridId); + + Map getUserRoleForCheckNPerson(String userId); + + List> listDepartmentByUserId(String userId); + + List> listHandleCaseByUserId(String userId); } diff --git a/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java b/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java index 7ef65fc..1e47ee0 100755 --- a/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java +++ b/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java @@ -374,4 +374,6 @@ public interface IReportCaseDao { List listReportByCaseTypes(Map params); List listPageReportDelete(Map params); + + ReportCaseDTO getReportCaseForDel(Map params); } diff --git a/src/main/java/com/cm/systemcity/pojo/dtos/EasyUITreeDTO.java b/src/main/java/com/cm/systemcity/pojo/dtos/EasyUITreeDTO.java index 55019ec..92534bf 100644 --- a/src/main/java/com/cm/systemcity/pojo/dtos/EasyUITreeDTO.java +++ b/src/main/java/com/cm/systemcity/pojo/dtos/EasyUITreeDTO.java @@ -26,6 +26,7 @@ public class EasyUITreeDTO implements Serializable { private String areaId; private String communityId; private List children; + private String nodeTag; public EasyUITreeDTO() { } diff --git a/src/main/java/com/cm/systemcity/service/areapoints/impl/AreaPointsServiceImpl.java b/src/main/java/com/cm/systemcity/service/areapoints/impl/AreaPointsServiceImpl.java index f2ed86d..17ee7a4 100755 --- a/src/main/java/com/cm/systemcity/service/areapoints/impl/AreaPointsServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/areapoints/impl/AreaPointsServiceImpl.java @@ -123,17 +123,20 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint @Override public List listAreaTree(Map params) throws SearchException, AccessTokenException { + mongoTemplate.remove(new Query(), "INDEX_PANEL_GRID_TREE"); List easyUITreeDTOs = mongoTemplate.find(new Query(), EasyUITreeDTO.class, "INDEX_PANEL_GRID_TREE"); if (easyUITreeDTOs.isEmpty()) { easyUITreeDTOs = new ArrayList<>(); // 设置顶级标题 EasyUITreeDTO areaEasyUITreeDTO = createAreaTreeDTO("areaTop", "所有网格", "icon-area"); + areaEasyUITreeDTO.setNodeTag("top"); // 设置街道 areaEasyUITreeDTO.setChildren(setArea()); easyUITreeDTOs.add(areaEasyUITreeDTO); // 设置专管单位 EasyUITreeDTO nPeopleEasyUITreeDTO = createAreaTreeDTO("deptTop", "专管单位", "icon-person-type"); + nPeopleEasyUITreeDTO.setNodeTag("top"); List departmentSortDTOs = bindingDepartmentService.listDepartmentForMainPanel(getHashMap(4)); nPeopleEasyUITreeDTO.setChildren(nPeopleToTreeDTO(departmentSortDTOs)); easyUITreeDTOs.add(nPeopleEasyUITreeDTO); @@ -160,6 +163,7 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint dto.setAreaId(item.getDictId()); //dto.setChildren(setGridUser(item.getDictId(), "")); dto.setChildren(setCommunity(item.getDictId())); + dto.setNodeTag("street"); resList.add(dto); } return resList; @@ -179,6 +183,7 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint dto.setAreaId(areaId); dto.setCommunityId(item.getCommunityId()); dto.setChildren(setGridUser(areaId, item.getCommunityId())); + dto.setNodeTag("community"); resList.add(dto); } return resList; @@ -197,6 +202,7 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint dto.setIconCls("icon-person"); dto.setAreaId(areaId); dto.setChildren(new ArrayList<>()); + dto.setNodeTag("user"); resList.add(dto); } return resList; @@ -213,6 +219,7 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint departmentSortDTOs.forEach(departmentSortDTO -> { EasyUITreeDTO easyUITreeDTO = new EasyUITreeDTO("dept_" + departmentSortDTO.getDepartmentId(), departmentSortDTO.getDepartmentName(), null, "icon-person-type"); easyUITreeDTO.setChildren(setNPerson(departmentSortDTO.getDepartmentId())); + easyUITreeDTO.setNodeTag("dept"); resList.add(easyUITreeDTO); }); return resList; @@ -231,6 +238,7 @@ public class AreaPointsServiceImpl extends AbstractService implements IAreaPoint dto.setAreaId(""); dto.setDepartmentId(departmentId); dto.setChildren(new ArrayList<>()); + dto.setNodeTag("user"); resList.add(dto); } return resList; diff --git a/src/main/java/com/cm/systemcity/service/grid/IGridService.java b/src/main/java/com/cm/systemcity/service/grid/IGridService.java index 602f69c..2de1988 100644 --- a/src/main/java/com/cm/systemcity/service/grid/IGridService.java +++ b/src/main/java/com/cm/systemcity/service/grid/IGridService.java @@ -312,4 +312,6 @@ public interface IGridService { * @return */ SuccessResultList> listPageNotMine(String token, ListPage page); + + void updateCopyGrid(String gridId, Map params); } diff --git a/src/main/java/com/cm/systemcity/service/grid/impl/GridServiceImpl.java b/src/main/java/com/cm/systemcity/service/grid/impl/GridServiceImpl.java index 0873089..e736d0c 100644 --- a/src/main/java/com/cm/systemcity/service/grid/impl/GridServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/grid/impl/GridServiceImpl.java @@ -11,6 +11,8 @@ import com.cm.common.utils.WStringUtil; import com.cm.common.utils.point.Point; import com.cm.common.utils.point.PointUtil; import com.cm.systemcity.dao.grid.IGridDao; +import com.cm.systemcity.pojo.dtos.community.CommunityDTO; +import com.cm.systemcity.pojo.dtos.dict.DictDTO; import com.cm.systemcity.pojo.dtos.grid.GridDTO; import com.cm.systemcity.pojo.dtos.grid.GridPointDTO; import com.cm.systemcity.pojo.dtos.grid.GridRelationDTO; @@ -18,6 +20,8 @@ import com.cm.systemcity.pojo.pos.grid.GridPO; import com.cm.systemcity.pojo.vos.grid.GridPointVO; import com.cm.systemcity.pojo.vos.grid.GridVO; import com.cm.systemcity.service.BaseService; +import com.cm.systemcity.service.community.ICommunityService; +import com.cm.systemcity.service.dict.IDictService; import com.cm.systemcity.service.grid.IGridPointService; import com.cm.systemcity.service.grid.IGridRelationService; import com.cm.systemcity.service.grid.IGridService; @@ -51,6 +55,45 @@ public class GridServiceImpl extends BaseService implements IGridService { private IGridRelationService gridRelationService; @Autowired private IGridPointService gridPointService; + @Autowired + private ICommunityService communityService; + + @Override + public void updateCopyGrid(String gridId, Map params) { + Map copyMap = new HashMap<>(8); + copyMap.put("gridId", UUIDUtil.getUUID()); + copyMap.put("gridName", params.get("gridName") == null ? "" : params.get("gridName").toString()); + copyMap.put("gridSummary", params.get("gridSummary") == null ? "" : params.get("gridSummary").toString()); + copyMap.put("gridGroupId", params.get("gridGroupId") == null ? "" : params.get("gridGroupId").toString()); + copyMap.put("gridDuty", params.get("gridDuty") == null ? "" : params.get("gridDuty").toString()); + String areaCode = params.get("areaCode") == null ? "" : params.get("areaCode").toString(); + String area1 = params.get("area1") == null ? "" : params.get("area1").toString(); + String gridCode = getSaveGridCode(areaCode + area1); + copyMap.put("gridCode", gridCode); + List list = gridPointService.list(gridId); + List pointList = new ArrayList<>(0); + for(GridPointDTO item : list){ + GridPointVO temp = new GridPointVO(); + temp.setGridId(item.getGridId()); + temp.setLat(item.getLat()); + temp.setLng(item.getLng()); + pointList.add(temp); + } + copyMap.put("gridSquare", getSquare(pointList)); + copyMap.put("areaCode", areaCode + area1); + Map query = new HashMap<>(4); + query.put("communityId",area1); + CommunityDTO community = communityService.getCommunity(query); + copyMap.put("areaName", community.getAreaName() + "/" + community.getCommunityName()); + // 查询被复制的网格 + query.put("gridId", gridId); + GridDTO gridDTO = gridDao.get(query); + copyMap.put("fillColor",gridDTO.getFillColor()); + setSaveInfo(copyMap); + gridDao.save(copyMap); + // 保存网格点 + gridPointService.save(copyMap.get("gridId").toString(), pointList); + } @Override public void save(GridVO gridVO) throws Exception { diff --git a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java index e296697..e0ff926 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java @@ -454,4 +454,6 @@ public interface IReportCaseService { * @param query */ void updateBackDeleteCase(Map query); + + ReportCaseDTO getReportCaseForDel(Map params); } diff --git a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java index 5be0c5b..0ac51f9 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java @@ -253,6 +253,11 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer return reportCaseDao.getReportCase(params); } + @Override + public ReportCaseDTO getReportCaseForDel(Map params) { + return reportCaseDao.getReportCaseForDel(params); + } + @Override public ReportCaseDTO getReportCase(String token, Map params) throws SearchException { ReportCaseDTO dto = reportCaseDao.getReportCase(params); @@ -710,6 +715,9 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer return new SuccessResult(); } if(0 == handleStatus){ + // 2022年10月25日 案件如果不处理需要管理员确认后才可退回 修改原来直接退回的逻辑 + + Map query = new HashMap<>(8); query.put("caseId", params.get("caseId").toString()); query.put("reportCaseId", params.get("caseId").toString()); diff --git a/src/main/java/com/cm/systemcity/service/userpoints/impl/UserPointsServiceImpl.java b/src/main/java/com/cm/systemcity/service/userpoints/impl/UserPointsServiceImpl.java index ae59397..ac44f6c 100755 --- a/src/main/java/com/cm/systemcity/service/userpoints/impl/UserPointsServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/userpoints/impl/UserPointsServiceImpl.java @@ -18,6 +18,7 @@ import com.cm.plugin.map.pojo.dto.GridDTO; import com.cm.plugin.map.pojo.dto.GridPointDTO; import com.cm.plugin.map.pojo.vo.GridVO; import com.cm.plugin.map.service.IGridService; +import com.cm.systemcity.dao.datarelease.IDataReleaseDao; import com.cm.systemcity.dao.reportcase.IReportCaseDao; import com.cm.systemcity.dao.userpoints.IUserPointsDao; import com.cm.systemcity.enums.MongoCollections; @@ -69,7 +70,7 @@ public class UserPointsServiceImpl extends AbstractService implements IUserPoint @Autowired private IUserService userService; @Autowired - private IDictService dictService; + private IDataReleaseDao dataReleaseDao; @Autowired private IGridService gridService; @Autowired diff --git a/src/main/resources/mybatis/mapper/bindingdepartment/bindingdepartment-mapper.xml b/src/main/resources/mybatis/mapper/bindingdepartment/bindingdepartment-mapper.xml index 4ae18fa..506bd4a 100644 --- a/src/main/resources/mybatis/mapper/bindingdepartment/bindingdepartment-mapper.xml +++ b/src/main/resources/mybatis/mapper/bindingdepartment/bindingdepartment-mapper.xml @@ -196,6 +196,9 @@ AND t1.user_username NOT LIKE 'WX%' + AND t1.user_username NOT LIKE 'admin%' + AND t1.user_username NOT LIKE 'test%' + AND t1.user_username NOT LIKE '测试%' AND diff --git a/src/main/resources/mybatis/mapper/datarelease/datarelease-mapper.xml b/src/main/resources/mybatis/mapper/datarelease/datarelease-mapper.xml index 11408f9..9b1b6ec 100644 --- a/src/main/resources/mybatis/mapper/datarelease/datarelease-mapper.xml +++ b/src/main/resources/mybatis/mapper/datarelease/datarelease-mapper.xml @@ -2,6 +2,50 @@ + + + + + + + + @@ -159,6 +203,9 @@ AND gmt_modified #{modifiedEnd} + + AND creator = #{userId} + ORDER BY gmt_create DESC diff --git a/src/main/resources/mybatis/mapper/grid/grid-mapper.xml b/src/main/resources/mybatis/mapper/grid/grid-mapper.xml index f01530f..2818cb4 100644 --- a/src/main/resources/mybatis/mapper/grid/grid-mapper.xml +++ b/src/main/resources/mybatis/mapper/grid/grid-mapper.xml @@ -245,6 +245,7 @@ LEFT(t1.gmt_modified, 19) gmt_modified FROM map_grid t1 + LEFT JOIN map_grid_relation t2 ON t1.grid_id = t2.grid_id WHERE t1.is_delete = 0 @@ -253,6 +254,9 @@ OR t1.grid_summary LIKE CONCAT('%', #{keywords}, '%') + + AND FIND_IN_SET(#{userSearchSelect}, t2.relation_id) + AND t1.grid_id IN @@ -294,6 +298,7 @@ relation_id = #{excludeRelationId} ) + GROUP BY t1.grid_id diff --git a/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml b/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml index a016cb0..6100eec 100755 --- a/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml +++ b/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml @@ -418,6 +418,16 @@ + + INSERT INTO city_report_case_accept( diff --git a/src/main/resources/static/route/bigdata/grid-card-detail.html b/src/main/resources/static/route/bigdata/grid-card-detail.html new file mode 100644 index 0000000..1649efe --- /dev/null +++ b/src/main/resources/static/route/bigdata/grid-card-detail.html @@ -0,0 +1,115 @@ + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + +
姓名 [登录账号]所属部门或社区上报案件处理案件
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/reportcase/list_delete.html b/src/main/resources/static/route/reportcase/list_delete.html index f7983aa..a69e52c 100644 --- a/src/main/resources/static/route/reportcase/list_delete.html +++ b/src/main/resources/static/route/reportcase/list_delete.html @@ -374,6 +374,20 @@ } }); } + if(obj.event === 'caseFlowEvent'){ + layer.open({ + type: 2, + title: '案件流程', + closeBtn: 1, + area: ['50%', '60%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/reportcase/list_case_log.html?reportCaseId={id}', + [obj.data.reportCaseId]), + end: function() { + } + }); + } if(obj.event === 'reportBack'){ top.dialog.confirm('确定恢复案件吗?', function(index) { top.dialog.close(index); diff --git a/src/main/resources/static/route/reportcase/show.html b/src/main/resources/static/route/reportcase/show.html index 6553b5c..c53bc7a 100755 --- a/src/main/resources/static/route/reportcase/show.html +++ b/src/main/resources/static/route/reportcase/show.html @@ -201,7 +201,7 @@ function initData(){ var loadLayerIndex; - top.restAjax.get(top.restAjax.path('api/reportcase/getreportcase/{reportCaseId}', [reportCaseId]), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('api/reportcase/getreportcasefordel/{reportCaseId}', [reportCaseId]), {}, null, function(code, data) { var dataFormData = {}; for(var i in data) { dataFormData[i] = data[i]; diff --git a/src/main/resources/static/route/userlocation/map_summary.html b/src/main/resources/static/route/userlocation/map_summary.html index 3cddf6f..3ee4799 100644 --- a/src/main/resources/static/route/userlocation/map_summary.html +++ b/src/main/resources/static/route/userlocation/map_summary.html @@ -112,6 +112,7 @@ + + + + +
+
+ +
+ +
+
+
+
+
+ +
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/grid/grid/default/list.html b/src/main/resources/templates/grid/grid/default/list.html index c278bcc..aab9cd8 100644 --- a/src/main/resources/templates/grid/grid/default/list.html +++ b/src/main/resources/templates/grid/grid/default/list.html @@ -23,20 +23,30 @@
- +
- 地区 -
+ 地区: +
-
+
+
+ +
+ @@ -72,18 +85,39 @@ base: 'assets/layuiadmin/' }).extend({ index: 'lib/index' - }).use(['index', 'table', 'laydate', 'common', 'dialog'], function() { + }).use(['index', 'table', 'laydate', 'common', 'dialog', 'laytpl', 'form'], function() { var $ = layui.$; var $win = $(window); var table = layui.table; var admin = layui.admin; var laydate = layui.laydate; var common = layui.common; + var laytpl = layui.laytpl; + var form = layui.form; var resizeTimeout = null; var tableUrl = 'api/grid/listpage'; var layuiSelect = new LayuiSelect(layui); var selectedAreaArray = []; + function init(){ + initUserSearchSelect(); + } + init(); + + // 初始化 按user下拉框 + function initUserSearchSelect() { + top.restAjax.get(top.restAjax.path('api/bindingdepartment/list-all-sys-user', []), { + }, null, function(code, data) { + console.log(data); + laytpl(document.getElementById("userSearchSelectTemplate").innerHTML).render(data, function(html) { + document.getElementById("userSearchSelectBox").innerHTML = html; + }); + form.render('select'); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + } + // 初始化表格 function initTable() { table.render({ @@ -103,7 +137,7 @@ [ {type:'checkbox', fixed: 'left'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field: 'gridName', width: 120, title: '网格名称', align:'center', + {field: 'gridName', width: 160, title: '网格名称', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -112,7 +146,7 @@ return rowData; } }, - {field: 'gridDuty', width: 120, title: '职责', align:'center', + {field: 'areaName', width: 220, title: '地区名称', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -130,7 +164,7 @@ return rowData; } }, - {field: 'areaName', width: 180, title: '地区名称', align:'center', + {field: 'gridDuty', width: 120, title: '职责', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -186,7 +220,8 @@ keywords: $('#keywords').val(), startTime: $('#startTime').val(), endTime: $('#endTime').val(), - areaCodeLike: $('#areaCode').val() + areaCodeLike: $('#areaCode').val(), + userSearchSelect : $('#userSearchSelect').val() }, page: { curr: currentPage @@ -354,6 +389,25 @@ } }); } + } else if(layEvent === 'copyEvent') { + if(checkDatas.length === 0) { + top.dialog.msg(top.dataMessage.table.selectEdit); + } else if(checkDatas.length > 1) { + top.dialog.msg(top.dataMessage.table.selectOneEdit); + } else { + layer.open({ + type: 2, + title: '复制网格', + closeBtn: 1, + area: ['80%', '80%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/grid/copy-grid?gridId={gridId}', [checkDatas[0].gridId]), + end: function () { + reloadTable(); + } + }); + } } else if(layEvent === 'removeEvent') { if(checkDatas.length === 0) { top.dialog.msg(top.dataMessage.table.selectDelete);