zhangyihao пре 1 година
родитељ
комит
6369543bbd

+ 6 - 6
src/components/Map/company-map.vue

@@ -289,12 +289,12 @@ function submit() {
   });
 }
 // 获取event_id
-updateEventLocation().then((res) => {
-  form.event_id = res.data.event_id;
-  form.address = res.data.address;
-  form.latitude = res.data.latitude;
-  form.longitude = res.data.longitude;
-});
+// updateEventLocation().then((res) => {
+//   form.event_id = res.data.event_id;
+//   form.address = res.data.address;
+//   form.latitude = res.data.latitude;
+//   form.longitude = res.data.longitude;
+// });
 </script>
 
 <style lang="scss" scoped>

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

@@ -99,7 +99,6 @@ declare module 'vue' {
     UserSelect: typeof import('./../components/UserSelect/index.vue')['default']
     VideoContainer: typeof import('./../components/HKVideo/video-container.vue')['default']
     YMap: typeof import('./../components/Map/YMap.vue')['default']
-    YMapold: typeof import('./../components/Map/YMapold.vue')['default']
     YztMap: typeof import('./../components/Map/YztMap/index.vue')['default']
   }
   export interface ComponentCustomProperties {

+ 28 - 10
src/views/routineCommandMap/EventManage.vue

@@ -186,7 +186,15 @@ const data = reactive({
 });
 
 const { queryParams, form } = toRefs(data);
-
+// 监听 modelValue 的变化
+/*watch(
+  () => props.modelValue,
+  (newVal) => {
+    if (newVal) {
+      getList();
+    }
+  }
+);*/
 const getList = () => {
   loading.value = true;
   getEvent(queryParams.value)
@@ -292,21 +300,31 @@ const handleClose = (row) => {
 const handleCloseEventDialog = (b) => {
   console.log('handleCloseEventDialog', b);
 };
-
-onMounted(() => {
-  getList();
-});
-
-interface Props {
+/*interface Props {
   modelValue: boolean;
   title?: string;
   height?: string;
-}
-const props = withDefaults(defineProps<Props>(), {
+}*/
+/*const props = withDefaults(defineProps<Props>(), {
   modelValue: false
-});
+});*/
+const props = defineProps<{
+  modelValue?: boolean;
+  title?: string;
+  height?: string;
+}>();
 const emit = defineEmits(['update:modelValue']);
 
+// 将props转换
+const { modelValue } = toRefs(props);
+
+// 监听props的modelValue变化
+watch(modelValue,(newValue) => {
+  if (newValue) {
+    getList();
+  }
+});
+
 // 关闭弹窗
 const closeDialog = () => {
   emit('update:modelValue', false);

+ 0 - 1
src/views/routineCommandMap/LeftSection.vue

@@ -71,7 +71,6 @@
   <Dialog v-model="inspectionNewsState.showListDialog" title="巡查消息列表" width="70%"></Dialog>
   <!--事件接报弹窗-->
   <EventManage v-model="eventManageState.showListDialog" title="事件管理列表" width="70%"></EventManage>
-  <eventDetails v-model="eventDetailsState.show" :title="eventDetailsState.title" :event-id="eventId" @update:model-value="eventList"></eventDetails>
 </template>
 
 <script lang="ts" setup>

+ 1 - 1
src/views/routineCommandMap/MiddleSection.vue

@@ -4,7 +4,7 @@
       <el-button type="primary" @click="handleQuery1" :disabled="true">备战防御</el-button>
       <el-button type="primary" @click="handleQuery2">指挥调度</el-button>
     </div>
-    <company-map v-model:visible="mapDialogVisible" @change="handleMapChange" />
+<!--    <company-map v-model:visible="mapDialogVisible" @change="handleMapChange" />-->
     <GlobalMap is-component width="3894" height="2140" />
   </div>
 </template>

+ 2 - 2
src/views/routineCommandMap/eventing/eventDetails.vue

@@ -292,8 +292,8 @@ const fetchEventDetail = () => {
 
 onMounted(() => {
   // eventId.value = route.query.event_id as string;
-  fetchEventDetail();
-  getEventDetail(props.eventId);
+  // fetchEventDetail();
+  // getEventDetail(props.eventId);
   // });
 });
 // 监听 modelValue 的变化