ezhizao_zx 4 maanden geleden
bovenliggende
commit
2e82b715dd
2 gewijzigde bestanden met toevoegingen van 36 en 13 verwijderingen
  1. 6 1
      .env.development
  2. 30 12
      src/views/business/outsourceInspectionVerify/index.vue

+ 6 - 1
.env.development

@@ -28,4 +28,9 @@ VITE_HOST_OUTNET = 'http://localhost:81'
 #站内信地址
 VITE_WS_API = 'ws://localhost:8080/ws/'
 #导出地址
-VITE_WS_EXPORT_API = 'ws://localhost:8081/wsExport/'
+#站内信地址
+VITE_WS_INNET_API = 'ws://localhost:8080/ws/'
+VITE_WS_OUTNET_API = 'ws://localhost:8080/ws/'
+#导出地址
+VITE_WS_INNET_EXPORT_API = 'ws://localhost:8081/wsExport/'
+VITE_WS_OUTNET_EXPORT_API = 'ws://localhost:8081/wsExport/'

+ 30 - 12
src/views/business/outsourceInspectionVerify/index.vue

@@ -117,13 +117,23 @@
     <!-- 分页 -->
     <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
       v-model:limit="queryParams.pageSize" @pagination="getList" />
-    <el-dialog v-model="doingExport" title="导出审核列表" width="300px" height="400px" @close="close" append-to-body draggable
-      :close-on-click-modal="false">
-      <div style="color: red;font-weight: 600;">导出中请勿关闭</div>
-      <div class="form-btns-container" style="display: inline-block; line-height: 36px;">
-        <el-button v-if="exportSuccess" type="warning" icon="Download" @click="downloadExcel">下载导出excel</el-button>
-        <el-progress v-if="doingExport" class="export-progress" :percentage="exportProgress" />
-        <el-button v-if="doingExport && !exportSuccess" type="danger" @click="close">停止导出</el-button>
+    <el-dialog v-model="doingExport" title="导出审核列表" width="500px" height="400px" @close="close" append-to-body draggable
+      :close-on-click-modal="false" :show-close="!doingExport || exportSuccess">
+      <div v-if="doingExport && !exportSuccess"
+        style="color: red;font-weight: 600;width:100%; text-align:center;height:40px;display: inline-block;line-height: 40px;">
+        导出中请勿关闭</div>
+      <div v-else
+        style="color: red;font-weight: 600;width:100%; text-align:center;height:40px;display: inline-block;line-height: 40px;">
+        导出完成</div>
+      <div class="form-btns-container" style="width: 100%;">
+        <el-progress v-if="doingExport" class="export-progress" :percentage="exportProgress" style="width: 100%;"
+          :text-inside="true" />
+        <div style="width: 100%; align-items: center; align-content: center;height: 60px;position: relative;">
+          <el-button v-if="exportSuccess" type="warning" icon="Download" @click="downloadExcel"
+            style="position: absolute; top: 0px; left: 50%; transform: translateX(-50%);">下载导出excel</el-button>
+          <el-button v-if="doingExport && !exportSuccess" type="danger" @click="close"
+            style="position: absolute; top: 0px; left: 50%; transform: translateX(-50%);">停止导出</el-button>
+        </div>
       </div>
     </el-dialog>
   </div>
@@ -439,13 +449,14 @@ function initWebsocket() {
     heartCheck()
   }
   ws.onmessage = (message) => {
-    console.log(message)
+    // console.log(message)
     const data = JSON.parse(message.data)
     exportProgress.value = data.progress
     if (data.url != null) {
       exportSuccess.value = true
       exportUrl.value = data.url
       closeWs()
+      downloadExcel()
     }
     heartCheck()
   }
@@ -507,13 +518,20 @@ onUnmounted(() => {
 getList();
 </script>
 <style>
-.export-progress .el-progress-bar {
-  /* margin-bottom: 15px; */
+/* .export-progress .el-progress-bar {
+  margin-bottom: 15px;
   width: 100px;
+} */
+
+.export-progress .el-progress-bar__outer {
+  height: 20px !important;
 }
 
 .export-progress {
-  margin-left: 6px;
-  margin-right: 6px;
+  /* margin-left: 6px;
+  margin-right: 6px; */
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-bottom: 40px;
 }
 </style>