浏览代码

任务登记点击事件

lizhouming 8 月之前
父节点
当前提交
01ee3e539e

+ 5 - 2
src/views/emergencyCommandMap/RightSection/RenWuDengJi.vue

@@ -58,9 +58,12 @@ const fetchUnits = async () => {
   }
 };
 
-// 关闭弹窗
+// 定义事件发射器
+const emit = defineEmits(['update:show']);
+
+// 对话框关闭时执行的操作
 const closeDialog = () => {
-  showRegisterDialog.value = false;
+  emit('update:show', false);
 };
 
 // 确认登记任务

+ 13 - 1
src/views/emergencyCommandMap/RightSection/index.vue

@@ -19,7 +19,7 @@
         </div>
         <div class="task-text gradient-text">粤政易群聊</div>
       </div>
-      <div class="task-item">
+      <div class="task-item" @click="openRenWuDengJi">
         <div class="icon">
           <div class="icon4"></div>
         </div>
@@ -38,6 +38,7 @@
   </div>
   <StartPlan v-if="startPlanState.show" v-model:show="startPlanState.show" :title="startPlanState.title" :event-id="startPlanState.eventId" />
   <SelectPlan v-model="selectPlanState.show" :title="selectPlanState.title" :temp-event-id="tempEventId" @update-plan="updatePlan" />
+  <RenWuDengJi v-if="renWuDengJiState.show" v-model:show="renWuDengJiState.show" />
 </template>
 
 <script lang="ts" setup>
@@ -48,9 +49,20 @@ import RightTop from '@/views/emergencyCommandMap/RightSection/RightTop.vue';
 import StartPlan from './StartPlan.vue';
 import SelectPlan from './SelectPlan.vue';
 import PublicOpinionSupervision from '@/views/emergencyCommandMap/RightSection/PublicOpinionSupervision.vue';
+import RenWuDengJi from '@/views/emergencyCommandMap/RightSection/RenWuDengJi.vue';
 
 let eventId = ref('');
 let tempEventId = ref<string | null>(null);
+
+// 创建任务登记弹窗的状态管理
+const renWuDengJiState = reactive({
+  show: false
+});
+// 打开任务登记弹窗
+const openRenWuDengJi = () => {
+  renWuDengJiState.show = true;
+  console.log('Showing RenWuDengJi modal');
+};
 // 启动预案弹窗
 const startPlanState = reactive({
   show: false,