Explorar o código

文件共享中心汇总报表按钮加载状态修改-提交

lxh hai 1 día
pai
achega
8b6177f2a5
Modificáronse 1 ficheiros con 22 adicións e 6 borrados
  1. 22 6
      src/views/vent/performance/fileDetail/index.vue

+ 22 - 6
src/views/vent/performance/fileDetail/index.vue

@@ -68,7 +68,9 @@
             :disabled="activeKey != '1'">查询</a-button>
           <!-- <a-button type="primary" style="float: right" @click="reportSum"
             v-if="sysOrgCode == 'sdmtjtgsd'">汇总报表</a-button> -->
-          <a-button type="primary" style="float: right" :loading="reportSumLoading" @click="reportSum">汇总报表</a-button>
+          <span class="report-sum-btn-wrap" @click="reportSum">
+            <a-button type="primary" :loading="reportSumLoading">汇总报表</a-button>
+          </span>
           <a-button type="primary" style="float: right; margin-right: 20px" @click="openModal(true)">文件上传</a-button>
         </div>
         <div class="list">
@@ -375,6 +377,14 @@ async function pollMonthlySummaryJob(jobId: string) {
 
 //汇总报表
 async function reportSum() {
+  // 轮询进行中再次点击:仅重新打开弹窗,不新建任务
+  if (reportSumLoading.value) {
+    if (currentJobId.value) {
+      visiblehHz.value = true;
+    }
+    return;
+  }
+
   if (!reportMonth.value) {
     createMessage.warning('请选择报表月份');
     return;
@@ -421,13 +431,9 @@ async function reportSum() {
   }
 }
 
-//关闭汇总弹窗
+//关闭汇总弹窗(轮询中仅关闭弹窗,不中断轮询与按钮加载)
 function handleCancelHz() {
-  clearReportTimer();
-  stopReportSumLoading();
-  resetReportHzState();
   visiblehHz.value = false;
-  alive.value = new Date().getTime();
 }
 //上传文件
 let openModal = (val) => {
@@ -710,6 +716,16 @@ onUnmounted(() => {
         height: 34px;
         line-height: 34px;
         margin-bottom: 15px;
+
+        .report-sum-btn-wrap {
+          float: right;
+          display: inline-block;
+          cursor: pointer;
+
+          .zxm-btn {
+            pointer-events: none;
+          }
+        }
       }
     }