Browse Source

no message

libushang 2 days ago
parent
commit
91d8fcc344
1 changed files with 6 additions and 9 deletions
  1. 6 9
      src/views/emergencyCommandMap/RightSection/LeaderInstruction.vue

+ 6 - 9
src/views/emergencyCommandMap/RightSection/LeaderInstruction.vue

@@ -30,14 +30,6 @@ const props = defineProps({
   }
 });
 const emits = defineEmits(['update:modelValue', 'close', 'confirm']);
-// watch(
-//   () => props.task_id,
-//   (new_task_id) => {
-//     form.value.task_id = new_task_id;
-//     console.log('new_task_id', new_task_id);
-//   },
-//   { immediate: true }
-// );
 
 const formRef = ref();
 
@@ -59,11 +51,16 @@ const handleClose = () => {
   emits('update:modelValue', false);
 };
 
+onMounted(()=>{
+  form.value.leader_name = '';
+  form.value.leader_unit = '';
+  form.value.content = '';
+});
 //
 const handleSubmit = () => {
   formRef.value?.validate((valid) => {
     if (valid) {
-      console.log(form.value);
+      form.value.task_id = props.task_id;
       addLeaderInstruction(form.value).then((response)=>{
         if (response.code === 200) {
           showSuccessMsg('批示成功');