Ver código fonte

Merge remote-tracking branch 'origin/dev' into dev

yangyuxuan 2 meses atrás
pai
commit
de256ceedc

+ 2 - 2
src/api/duty/eventing.ts

@@ -43,11 +43,11 @@ export function getEventDetail(params) {
 }
 
 // 编辑事件
-export function editEvent(params) {
+export function editEvent(data) {
   return request({
     url: '/api/event_management/event/edit',
     method: 'post',
-    params: params
+    data: data
   });
 }
 

+ 18 - 0
src/api/globalMap/layerAnalysis.ts

@@ -231,3 +231,21 @@ export const getCountPointInfoTypeErtongfulijigou = (data) => {
     data: data
   });
 };
+
+// 养老机构分类统计
+export const getCountPointInfoTypeYangLaoJiGou = (data) => {
+  return request({
+    url: '/api/gateway/v2/get_count_point_info_type_yanglaojigou',
+    method: 'post',
+    data: data
+  });
+};
+
+// 气象灾害防御重点单位分类统计
+export const getCountPointInfoTypeMdpUnits = (data) => {
+  return request({
+    url: '/api/gateway/v2/get_count_point_info_type_mdp_units',
+    method: 'post',
+    data: data
+  });
+};

+ 12 - 0
src/api/globalMap/spatialAnalysis.ts

@@ -454,3 +454,15 @@ export const getChildWelfareInstitutionsInfo = (id: string) => {
     }
   });
 };
+
+export const getElderlyCareInstitutionsInfo = (id: string) => {
+  return request({
+    url: '/api/gateway/v2/get_point_info_yanglaojigou',
+    method: 'post',
+    data: {
+      query: {
+        id: id
+      }
+    }
+  });
+};

+ 6 - 4
src/components/Map/data.ts

@@ -29,10 +29,10 @@ import {
   getVideoForestFire,
   getVideoDisasterPrevention,
   getVideoTraffic,
-  getVideoTraffic2,
   getPointInfoTransportationVideo,
   getVehicleInfo,
-  getChildWelfareInstitutionsInfo
+  getChildWelfareInstitutionsInfo,
+  getElderlyCareInstitutionsInfo
 } from '@/api/globalMap/spatialAnalysis';
 import { getRescueTeamsInfo } from '@/api/globalMap/rescueTeam';
 
@@ -74,7 +74,8 @@ export const methodList = {
   '41': getRescueTeamsInfo,
   '42': getPointInfoTransportationVideo,
   '43': getVehicleInfo,
-  '44': getChildWelfareInstitutionsInfo
+  '44': getChildWelfareInstitutionsInfo,
+  '45': getElderlyCareInstitutionsInfo
 };
 export const titleList = {
   '1': '专家信息',
@@ -115,5 +116,6 @@ export const titleList = {
   '41': '救援队伍',
   '42': '交通局视频',
   '43': '重点车辆',
-  '44': '儿童福利机构'
+  '44': '儿童福利机构',
+  '45': '养老机构'
 };

+ 2 - 0
src/types/components.d.ts

@@ -30,6 +30,8 @@ declare module 'vue' {
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
+    ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
     ElSlider: typeof import('element-plus/es')['ElSlider']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']

+ 12 - 20
src/views/emergencyCommandMap/LeftSection/index.vue

@@ -37,11 +37,13 @@
       </div>
     </div>
     <div class="event-card">
-      <div class="common-title gradient-text" style="display: flex; align-items: center">灾害信息<i class="icon-edit" /></div>
+      <div class="common-title gradient-text" style="display: flex; align-items: center">
+        灾害信息<i class="icon-edit" @click="showPositionMap = true" />
+      </div>
       <div class="card-content">
         <div class="event-box">
           <div class="event-item">
-            <div class="event-icon1"></div>
+            <div class="event-icon1" />
             <div class="text-box">
               <div class="text1">灾害事件</div>
               <div v-if="eventData.event_title" class="text2">{{ eventData.event_title }}</div>
@@ -109,21 +111,20 @@
       @update:event-title="updateEventTitle"
     />
     <Communication />
+    <PositionMap v-if="showPositionMap" v-model:visible="showPositionMap" :id="eventId" @confirm="fetchEventDetail" />
   </div>
 </template>
 <script lang="ts" setup name="LeftSection">
 import { getEventDetail, getWeather } from '@/api/duty/eventing';
 import VideoMonitor from '@/views/emergencyCommandMap/LeftSection/VideoMonitor.vue';
-import { ref, onMounted, onUnmounted, computed } from 'vue';
 import Communication from './Communication.vue';
 import CloseCommand from './CloseCommand.vue';
 import AssociatedEvent from './AssociatedEvent.vue';
+import PositionMap from '@/views/routineCommandMap/PositionMap.vue';
+
 const proxy = getCurrentInstance()?.proxy;
-const { mm_event_level } = toRefs<any>(
-  proxy?.useDict( 'mm_event_level')
-);
+const { mm_event_level } = toRefs<any>(proxy?.useDict('mm_event_level'));
 const route = useRoute();
-const router = useRouter();
 
 const eventId = ref('');
 
@@ -149,6 +150,7 @@ const eventData = ref({
   longitude: '',
   latitude: ''
 });
+let showPositionMap = ref(false);
 
 // 灾害信息卡片中的持续时间
 const duration = computed(() => {
@@ -227,15 +229,12 @@ function getWindDirection(angle) {
 
 const fetchEventDetail = () => {
   const id = eventId.value;
-  console.log('fetchEventDetail');
-  if (id && id !== eventData.value.event_id) {
+  if (id) {
     // 如果有 id,则正常获取事件详情
     getEventDetail({ event_id: id }).then((res) => {
       eventData.value = res.data;
-      console.log('Received del_flag:', eventData.value.del_flag);
       // 根据 del_flag 设置 flag
       closeCommandState.flag = eventData.value.del_flag === '0';
-      console.log('closeCommandState.flag:', closeCommandState.flag);
       // 初始化响应时间
       updateTime();
     });
@@ -278,7 +277,6 @@ const updateTime = () => {
 };
 // 更新事件标题
 const updateEventTitle = (eventTitle) => {
-  console.log('Update event title:', eventTitle);
   eventData.value.event_title = eventTitle;
   // 每次更新事件标题时,重新获取事件详情
   fetchEventDetail();
@@ -287,7 +285,7 @@ onMounted(() => {
   // 从 URL 参数中获取 event_id
   eventId.value = route.query.event_id as string;
   // 获取事件数据并检查 del_flag
-  fetchEventDetail(eventId.value);
+  fetchEventDetail();
   fetchWeatherData();
   intervalId = setInterval(updateTime, 1000);
 });
@@ -297,13 +295,6 @@ onUnmounted(() => {
     clearInterval(intervalId);
   }
 });
-// 监听事件标题的变化
-watchEffect(() => {
-  if (eventData.value.event_title) {
-    // 每次事件标题变化时,重新获取事件详情
-    fetchEventDetail();
-  }
-});
 
 // 发射自定义事件
 defineExpose({
@@ -408,6 +399,7 @@ defineExpose({
     animation-name: slideLeft;
     animation-duration: 1s;
     .icon-edit {
+      display: inline-block;
       width: 50px;
       height: 50px;
       background: url('@/assets/images/edit.png') no-repeat;

+ 5 - 1
src/views/globalMap/RightMenu/LayerAnalysis.vue

@@ -43,6 +43,8 @@ import {
   getCountPointInfo,
   getCountPointInfoAreaList,
   getCountPointInfoTypeErtongfulijigou,
+  getCountPointInfoTypeMdpUnits,
+  getCountPointInfoTypeYangLaoJiGou,
   getDroneType,
   getEmergencyDisasterInfoOfficerType,
   getEmergencyExpertType,
@@ -200,6 +202,7 @@ watch(
         '16': getRainPitsType,
         '17': getMidmapDzzhType,
         '18': getMiningOperationsType,
+        '20': getCountPointInfoTypeMdpUnits,
         '21': getBuildingProjectType,
         '22': getChemicalWarehouseType,
         '23': getMajorHazardSourceType,
@@ -209,7 +212,8 @@ watch(
         '27': getConstructionSitesType,
         '28': getEmergencyTransportResourcesType,
         '29': getEmergencyDisasterInfoOfficerType,
-        '44': getCountPointInfoTypeErtongfulijigou
+        '44': getCountPointInfoTypeErtongfulijigou,
+        '45': getCountPointInfoTypeYangLaoJiGou
       };
       let method = methodList[dataList.value[0].dataType];
       if (!method) return;

+ 27 - 0
src/views/globalMap/data/mapData.ts

@@ -4737,6 +4737,14 @@ export const pointDetailTemplate = {
     mine_contact_person: '矿山联系人',
     mine_contact_phone: '矿山联系电话'
   },
+  '20': {
+    unit_name: '单位名称',
+    type: '单位类型',
+    area: '所属区县',
+    location: '详细地址',
+    longitude: '经度',
+    latitude: '纬度'
+  },
   '21': {
     prjcode: '项目编号',
     prjname: '项目名称',
@@ -5003,5 +5011,24 @@ export const pointDetailTemplate = {
     jingdu: '经度',
     weidu: '纬度',
     jigoujianjie: '机构简介'
+  },
+  '45': {
+    jigoumincheng: '机构名称',
+    dizhi: '地址',
+    // dianweixinxi: '详细地址',
+    chenliriqi: '成立日期',
+    jiegoupingji: '机构评级',
+    chuangweishu: '床位数',
+    hulichuangweishu: '护理床位数',
+    huliyuanshu: '护理员数',
+    congyerenyuanshu: '从业人员数',
+    nianmolaorenshu: '年末老年人数',
+    quantuochuangweishu: '全托床位数',
+    rituochuangweishu: '日托床位数',
+    ruzhulv: '入住率',
+    shifoubeian: '是否备案',
+    jingdu: '经度',
+    weidu: '纬度',
+    jianjie: '简介'
   }
 };

+ 9 - 3
src/views/routineCommandMap/PositionMap.vue

@@ -103,14 +103,20 @@ import { showErrorMsg, showSuccessMsg } from '@/utils/notification';
 import { editEvent, getEventDetail } from '@/api/duty/eventing';
 
 const props = defineProps({
-  id: String,
+  id: {
+    type: String,
+    required: false
+  },
   visible: {
     type: Boolean,
     default: () => {
       return false;
     }
   },
-  flag: Boolean
+  flag: {
+    type: Boolean,
+    required: false
+  }
 });
 const proxy = getCurrentInstance()?.proxy;
 const { mm_event_level } = toRefs(proxy?.useDict('mm_event_level'));
@@ -385,7 +391,7 @@ function submit() {
       temp.response_level = form.value.response_level;
       editEvent(temp).then(() => {
         showSuccessMsg('修改成功');
-        emits('update:visible', true);
+        emits('update:visible', false);
         emits('confirm');
       });
     } else {