Browse Source

fix: 时间段保存bug

zhangjie 1 year ago
parent
commit
414620c769
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/views/order/task-manage/timeForm.vue

+ 8 - 1
src/views/order/task-manage/timeForm.vue

@@ -54,7 +54,7 @@
 </template>
 
 <script setup lang="ts">
-  import { onMounted, reactive, ref } from 'vue';
+  import { onMounted, reactive, ref, watch } from 'vue';
   import { Message } from '@arco-design/web-vue';
   import { updateTaskTime, deleteTaskTime } from '@/api/order';
   import useLoading from '@/hooks/loading';
@@ -166,6 +166,13 @@
     });
     formData.id = props.rowData.id;
   }
+
+  watch(
+    () => props.rowData.timeList,
+    () => {
+      initData();
+    }
+  );
   onMounted(() => {
     initData();
   });