Browse Source

修复confirm不弹出的问题

lighter 1 month ago
parent
commit
9d03ad21ec
1 changed files with 8 additions and 16 deletions
  1. 8 16
      src/views/surgical-management/SurgeryArrangement.vue

+ 8 - 16
src/views/surgical-management/SurgeryArrangement.vue

@@ -730,6 +730,7 @@ import {ElMessage, ElMessageBox} from "element-plus";
 import Search from "@/components/search/Index.vue";
 import router from "@/router";
 import {getLodop, initLodop} from "@/utils/c-lodop";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 const currentPage = ref(1);
 const pageSize = ref(30);
@@ -860,26 +861,17 @@ const changeSurgeryStatus = (row, status) => {
 const changeArrangementExecuted = row => {
   currentRow.value = row;
   const targetVal = row.arrangementExecuted === 0 ? 1 : 0;
-  updateArrangement(row.recordId, "arrangement_executed", targetVal).then(
-    () => {
+  updateArrangement(row.recordId, "arrangement_executed", targetVal)
+      .then(() => {
       currentRow.value.arrangementExecuted = targetVal;
       if (targetVal === 1) {
-        cyMessageBox
-          .confirm({
-            title: "提示",
-            message: "是否向手术医生发送通知?",
+        ElMessageBox.confirm("是否向手术医生发送通知?",'提示', {
             type: "warning",
-          })
-          .then(() => {
-            notifyDoctor(row).then(res2 => {
-              ElMessage({
-                message: res2,
-                type: "success",
-                duration: 2000,
-                showClose: true,
-              });
-            });
+        }).then(() => {
+          notifyDoctor(row).then(res2 => {
+            xcMessage.success(res2)
           });
+        });
       }
     }
   );