Browse Source

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

Hwf 6 months ago
parent
commit
a02cf045b1

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

@@ -11,7 +11,7 @@
             </el-col>
             <el-col :span="24">
               <el-form-item label="任务类型:">
-                <div class="display-field">{{ newTask.task_type }}</div>
+                <div class="display-field">{{ get_task_type_text(newTask.task_type) }}</div>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -102,6 +102,18 @@ const emit = defineEmits(['update:modelValue', 'update-success']);
 const newTask = reactive({ ...props.task });
 const units = ref(['待处理', '已完成']);
 
+const opt_task_type = [
+  { text: "全部", value: "" },
+  { text: "事件处置", value: "0" },
+  { text: "防范措施", value: "1" },
+  { text: "险情处理", value: "2" },
+  { text: "督办任务", value: "3" }
+];
+
+const get_task_type_text = (val) => {
+  return opt_task_type.find(item => item.value == val).text
+}
+
 const visible = computed({
   get: () => props.modelValue,
   set: (val) => {

+ 10 - 1
src/views/emergencyCommandMap/RightSection/RightTop.vue

@@ -48,7 +48,7 @@
 </template>
 
 <script lang="ts" setup>
-import { onMounted, ref, reactive } from 'vue';
+import { ref, reactive } from 'vue';
 import { taskList } from '@/api/duty/eventing';
 import RenWuGenZong from '@/views/emergencyCommandMap/RightSection/RenWuGenZong.vue'; // 确保 eventing.ts 的路径正确
 
@@ -106,8 +106,17 @@ const updateTaskList = (tasks) => {
     content: task.yzy_content,
     receiver: task.nick_name // 假设所有的任务都有接收者
   }));
+  nextFetchData();
 };
 
+const nextFetchData = ()=> {
+  setTimeout(()=>{
+    if(notifications.value.length === 0) {
+      fetchData();
+    }
+  }, 1500)
+}
+
 watch(
   () => props.eventId,
   () => {