From a60f4cf7167b9ec48d84f66a5e6d4e7b7344c90f Mon Sep 17 00:00:00 2001 From: luozhun <2025254074@qq.com> Date: Tue, 12 Nov 2024 09:49:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(superManagement):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BC=81=E4=BA=8B=E4=B8=9A=E5=8D=95=E4=BD=8D=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=82=B9=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 EnterprisesUnitController 中添加 mapPoint 接口,返回所有企事业单位信息 - 新增 dataOverview.vue 组件,实现地图展示功能 - 优化 unitManage 组件,增加对地图组件初始化状态的检查 --- .../controller/EnterprisesUnitController.java | 7 ++ .../src/views/data/dataOverview.vue | 80 ++++++++++++++++++- .../unitManage/police/unitManage/index.tsx | 2 +- 3 files changed, 86 insertions(+), 3 deletions(-) diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java index e2ac2a1..5bdf01e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.changhu.common.annotation.JsonBody; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; +import com.changhu.module.management.pojo.entity.EnterprisesUnit; import com.changhu.module.management.pojo.params.EnterprisesUnitSaveOrUpdateParams; import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; @@ -58,4 +59,10 @@ public class EnterprisesUnitController { return enterprisesUnitService.queryListByAdministrativeDivisionCodes(administrativeDivisionCodes); } + @Operation(summary = "企事业单位地图点位") + @GetMapping("/mapPoint") + public List mapPoint() { + return enterprisesUnitService.list(); + } + } diff --git a/superManagement/src/views/data/dataOverview.vue b/superManagement/src/views/data/dataOverview.vue index 2383d4d..155c6a1 100644 --- a/superManagement/src/views/data/dataOverview.vue +++ b/superManagement/src/views/data/dataOverview.vue @@ -1,13 +1,89 @@ diff --git a/superManagement/src/views/unitManage/police/unitManage/index.tsx b/superManagement/src/views/unitManage/police/unitManage/index.tsx index 5b2ed13..0ac9090 100644 --- a/superManagement/src/views/unitManage/police/unitManage/index.tsx +++ b/superManagement/src/views/unitManage/police/unitManage/index.tsx @@ -87,7 +87,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => { placeholder={'请输入详细地址'} autocomplete="off" onFocus={() => { - if (!_mapRef.value.mapInstance) { + if (!_mapRef.value?.mapInstance) { message.error('地图组件尚未初始化成功 请重新打开页面') return }