wuyi 1 rok pred
rodič
commit
767c0cc546
2 zmenil súbory, kde vykonal 9 pridanie a 2 odobranie
  1. 1 1
      src/views/PhoneListView.vue
  2. 8 1
      src/views/TaskView.vue

+ 1 - 1
src/views/PhoneListView.vue

@@ -135,7 +135,7 @@ function importList() {
     input.onchange = async () => {
         const loading = ElLoading.service({
             lock: true,
-            text: '导入中',
+            text: '导入中...',
             background: 'rgba(0, 0, 0, 0.7)'
         })
         const file = input.files[0]

+ 8 - 1
src/views/TaskView.vue

@@ -260,7 +260,7 @@ import { Plus, Refresh, Trash } from '@vicons/tabler'
 import EditDialog from '@/components/EditDialog.vue'
 import { setupEditDialog } from '@/utils/editDialog'
 import { http } from '@/plugins/http'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
 import { storeToRefs } from 'pinia'
 import { useUserStore } from '@/stores/user'
 import ExpandItem from '@/components/ExpandItem.vue'
@@ -433,6 +433,11 @@ async function pause(row) {
 }
 
 async function receipt(row) {
+    const loading = ElLoading.service({
+        lock: true,
+        text: '正在生成回执...',
+        background: 'rgba(0, 0, 0, 0.7)'
+    })
     const successNum = await http.get(`/task/num/${row.id}`)
     try {
         const response = await http.post(`/task/item/${row.id}/receipt`)
@@ -444,7 +449,9 @@ async function receipt(row) {
         link.download = `${row.name}_发送成功${successNum}_回执.xlsx`
         link.click()
         window.URL.revokeObjectURL(blobUrl)
+        loading.close()
     } catch (error) {
+        loading.close()
         console.error('Error receipt:', error)
         ElMessage.error('获取回执错误,请稍后再试.')
     }