xuzhancheng 4 дней назад
Родитель
Сommit
9faad1a33e

+ 16 - 8
yudao-ui-admin-vue3/src/views/pressure2/boilerchecker/components/StatusOperationPanel.vue

@@ -883,7 +883,7 @@ import RectificationUpload from '@/views/pressure2/components/RectificationUploa
 import { computed, nextTick, reactive, ref, watch } from 'vue'
 import { useRouter, useRoute } from 'vue-router'
 import { InfoFilled, View, Back, Right, WarningFilled, VideoPlay } from '@element-plus/icons-vue'
-import { dayjs, ElMessage, ElMessageBox, FormInstance, FormRules } from 'element-plus'
+import {dayjs, ElLoading, ElMessage, ElMessageBox, FormInstance, FormRules} from 'element-plus'
 const CustomDialog = defineAsyncComponent(() => import('@/components/CustomDialog/index.vue'))
 import VuePdfEmbed from 'vue-pdf-embed'
 import { getReportAllowedApplyModify, getReportCheckPdf } from '@/api/laboratory/functional/report'
@@ -1866,14 +1866,22 @@ const handleSubmitAudit = async () => {
       cancelButtonText: '取消',
       type: 'warning'
     }).then(async () => {
-      const submitResult = await BoilerTaskOrderApi.submitReportAudit({
-        id: templateParams.value?.id,
-        approveId
+      const loadingInstance = ElLoading.service({
+        fullscreen: true,
+        text: '正在提交审核...'
       })
-      if (submitResult) {
-        ElMessage.success('提交审核成功!')
-        selectNextItem([props.selectedItem])
-        emit('template-confirm')
+      try {
+        const submitResult = await BoilerTaskOrderApi.submitReportAudit({
+          id: templateParams.value?.id,
+          approveId
+        })
+        if (submitResult) {
+          ElMessage.success('提交审核成功!')
+          selectNextItem([props.selectedItem])
+          emit('template-confirm')
+        }
+      } finally {
+        loadingInstance.close()
       }
     }).catch(() => {
       console.log('用户取消提交审核')

+ 16 - 8
yudao-ui-admin-vue3/src/views/pressure2/pipechecker/components/StatusOperationPanel.vue

@@ -886,7 +886,7 @@ import RectificationUpload from '@/views/pressure2/components/RectificationUploa
 import {computed, defineAsyncComponent, nextTick, reactive, ref, watch} from 'vue'
 import {useRoute} from 'vue-router'
 import { InfoFilled, View, Back, Right, WarningFilled, VideoPlay } from '@element-plus/icons-vue'
-import {dayjs, ElMessage, ElMessageBox, FormInstance, FormRules} from 'element-plus'
+import {dayjs, ElLoading, ElMessage, ElMessageBox, FormInstance, FormRules} from 'element-plus'
 import * as UserApi from '@/api/system/user'
 import {
   PressureCheckerMyTaskStatus,
@@ -1836,14 +1836,22 @@ const handleSubmitAudit = async () => {
       cancelButtonText: '取消',
       type: 'warning'
     }).then(async () => {
-      const submitResult = await PipeTaskOrderApi.submitReportAudit({
-        id: templateParams.value?.id,
-        approveId
+      const loadingInstance = ElLoading.service({
+        fullscreen: true,
+        text: '正在提交审核...'
       })
-      if (submitResult) {
-        ElMessage.success('提交审核成功!')
-        selectNextItem([props.selectedItem])
-        emit('template-confirm')
+      try {
+        const submitResult = await PipeTaskOrderApi.submitReportAudit({
+          id: templateParams.value?.id,
+          approveId
+        })
+        if (submitResult) {
+          ElMessage.success('提交审核成功!')
+          selectNextItem([props.selectedItem])
+          emit('template-confirm')
+        }
+      } finally {
+        loadingInstance.close()
       }
     }).catch(() => {
       console.log('用户取消提交审核')