yangyuxuan 4 meses atrás
pai
commit
95049e962f
1 arquivos alterados com 5 adições e 10 exclusões
  1. 5 10
      src/views/inspectionWork/patrolTask.vue

+ 5 - 10
src/views/inspectionWork/patrolTask.vue

@@ -251,18 +251,13 @@ const handleSelectionChange = (selection) => {
   single.value = selection.length != 1;
   multiple.value = !selection.length;
 };
-const handleWork = async (row) => {
-  const confirmed = await ElMessageBox.confirm('确定要完结任务吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  });
-  if (confirmed) {
-    await updatetask({ id: row.id, task_status: '3' }).then(() => {
+const handleWork = (row) => {
+  proxy?.$modal.confirm('确定要完结任务吗?').then(() => {
+    updatetask({ id: row.id, task_status: '3' }).then(() => {
       proxy.$modal.msgSuccess('任务已完结');
+      fetchWorkrData();
     })
-    fetchWorkrData();
-  };
+  })
 };
 onMounted(() => {
   fetchWorkrData();