natasha 2 лет назад
Родитель
Сommit
47c9689fd0
1 измененных файлов с 12 добавлено и 5 удалено
  1. 12 5
      src/views/organize_manage/BatchImport.vue

+ 12 - 5
src/views/organize_manage/BatchImport.vue

@@ -71,7 +71,7 @@
         </template>
         <template v-else>
             <div class="btn-box" style="flex:1">
-                <el-button :key="1" type="primary" :disabled="!(resultData&&resultData.is_finish==='true')"><svg-icon icon-class="upload"></svg-icon>导出日志</el-button>
+                <el-button :key="1" type="primary" :disabled="!(resultData&&resultData.is_finish==='true')" @click="handleExportLog"><svg-icon icon-class="upload"></svg-icon>导出日志</el-button>
             </div>
         </template>
     </div>
@@ -224,7 +224,7 @@ export default {
         let data = {
             file_id: this.file_id,
             is_cover_while_exit_same_user: this.sameUser,
-            is_update_password_while_cover_user: this.coverUser.indexOf('1')?'true':'false'
+            is_update_password_while_cover_user: this.coverUser.indexOf('1')>-1?'true':'false'
         }
         getLogin(MethodName, data)
         .then((res) => {
@@ -237,7 +237,9 @@ export default {
                         clearInterval(this.timer);
                         this.timer = null;
                         this.uploading = false
-                        this.$forceUpdate()
+                        if(this.coverUser.indexOf('2')>-1){
+                            window.open(this.resultData.archive_file_url, "_blank");
+                        }
                     }else{
                         this.handleTaskStatus()
                     }
@@ -262,13 +264,13 @@ export default {
     handleTaskStatus(){
         let MethodName = "/OrgServer/Manager/DataImport/GetSysUserImportTaskExecuteStatus";
         let data = {
-            is_query_execute_log: 'true'
+            is_query_execute_log: 'true',
+            execute_log_query_top_n: 9999999
         }
         getLogin(MethodName, data)
         .then((res) => {
             if(res.status===1){
                 this.resultData = res
-                this.$forceUpdate()
             }
         })
         .catch(() => {
@@ -290,6 +292,11 @@ export default {
         .catch(() => {
             this.loading = false
         });    
+    },
+    // 导出日志
+    handleExportLog(){
+        let href = this.resultData.execute_report_file_url
+        window.open(href, "_blank");
     }
   },
   created() {