htc 1 day ago
parent
commit
fcefa501e1
1 changed files with 10 additions and 5 deletions
  1. 10 5
      src/components/reportPdf/index.vue

+ 10 - 5
src/components/reportPdf/index.vue

@@ -18,7 +18,7 @@
                 <img src="@/assets/images/agent/report.gif">
                 <p>{{ reportData.enterpriseName }} - {{ reportData.teamName }}</p>
                 <p>pdf正在生成中,预计需要时间<span>3-5分钟</span></p>
-                <p>生成成功后可点击'导出报告'查看pdf详情~</p>
+                <p>生成后可点击对应报告操作中的<span>导出报告</span>进行查看</p>
                 <div class="zt_btn" @click.stop="closeReportAlert">我知道了</div>
             </div>
         </div>
@@ -55,24 +55,28 @@
     const reportName = ref(props.reportName);
     const reportShow = ref(false);
     const isCreateReport = ref(false);
+    const isAlert = ref(false);
     const emit = defineEmits(['cancel','refreshReportList']);
     import { updateReportPdfUrl } from '@/api/agent/index.js';
 
     const cancel = () => {
         if(isCreateReport.value){
+            isAlert.value = true;
             _this.$alert('PDF报告正在生成中,取消操作将会停止生成,是否取消?', '温馨提示', {
-                confirmButtonText: '确定'
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                showCancelButton: true,
                 }
             ).then(res=>{
                 emit('cancel');
-            }).catch((err)=>{
-                
-            });
+                proxy.$message.error('报告生成已取消!');
+            }).catch(()=>{});
         }else emit('cancel');
     }
 
     const exportToPDF = async () => {
         try {
+            isAlert.value = false;
             isCreateReport.value = true;
             props.show = false;
             reportShow.value = true;
@@ -93,6 +97,7 @@
                 })
             }
         } catch (error) {
+            if(!isAlert.value) proxy.$message.error('报告生成失败!请稍后再试!');
             props.show = false;
             reportShow.value = false;
         }