natasha 2 년 전
부모
커밋
6d84c636bc
2개의 변경된 파일32개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/styles/index.scss
  2. 30 1
      src/views/organize_manage/BatchImport.vue

+ 2 - 2
src/styles/index.scss

@@ -518,9 +518,9 @@ div:focus {
 }
 }
 
 
 .color-red {
 .color-red {
-    color: #FF2F2F;
+    color: #FF2F2F !important;
 }
 }
 
 
 .color-green {
 .color-green {
-    color: #3FC47C;
+    color: #3FC47C !important;
 }
 }

+ 30 - 1
src/views/organize_manage/BatchImport.vue

@@ -58,10 +58,21 @@
                 </div>
                 </div>
             </template>
             </template>
         </template>
         </template>
+        <template v-else>
+            <div class="log-box" v-if="resultData">
+                <p>上传文件 {{fileList[0].name}}</p>
+                <p>用时 00:02:32</p>
+                <p>成功上传 <span class="color-green">{{resultData.success_count}}</span> 条记录,失败 <span class="color-red">{{resultData.cur_count}}</span> 条</p>
+                <div class="border"></div>
+                <p :class="[item.is_success==='true'?'color-green':'color-red']" v-for="(item,index) in execute_log_list" :key="index">
+                    {{item.row_count + ' '+ item.error_info}}
+                </p>
+            </div>
+        </template>
     </div>
     </div>
     <div class="batch-box-bottom">
     <div class="batch-box-bottom">
         <template v-if="tabsIndex===0">
         <template v-if="tabsIndex===0">
-            <a class="downLoad">下载模板</a>
+            <a class="downLoad" target="_blank" :href="resultData.execute_report_file_url">下载模板</a>
             <div class="btn-box">
             <div class="btn-box">
                 <el-button @click="closeDialog" size="small">取消</el-button>
                 <el-button @click="closeDialog" size="small">取消</el-button>
                 <el-button type="primary" :key="3" :disabled="!uploadFlag&&!file_id||(resultData&&resultData.is_finish==='true')" v-if="!uploading&&!isStop&&(resultData&&resultData.is_finish==='true'||!resultData)" @click="handleUpload" v-loading="loading"><svg-icon icon-class="upload"></svg-icon>开始上传</el-button>
                 <el-button type="primary" :key="3" :disabled="!uploadFlag&&!file_id||(resultData&&resultData.is_finish==='true')" v-if="!uploading&&!isStop&&(resultData&&resultData.is_finish==='true'||!resultData)" @click="handleUpload" v-loading="loading"><svg-icon icon-class="upload"></svg-icon>开始上传</el-button>
@@ -103,6 +114,7 @@ export default {
       loading: false,
       loading: false,
       timer: null,
       timer: null,
       resultData: null, // 上传结果数据
       resultData: null, // 上传结果数据
+      execute_log_list: [], // 日志列表
     };
     };
   },
   },
   watch: {},
   watch: {},
@@ -271,6 +283,7 @@ export default {
         .then((res) => {
         .then((res) => {
             if(res.status===1){
             if(res.status===1){
                 this.resultData = res
                 this.resultData = res
+                this.execute_log_list = JSON.parse(JSON.stringify(this.resultData.execute_log_list)).reverse()
             }
             }
         })
         })
         .catch(() => {
         .catch(() => {
@@ -449,6 +462,22 @@ export default {
             font-weight: 600;
             font-weight: 600;
         }
         }
     }
     }
+    .log-box{
+        background: #F5F5F5;
+        padding: 8px 16px;
+        min-height: 233px;
+        p{
+            font-size: 14px;
+            font-weight: 400;
+            line-height: 22px;
+            margin: 0;
+            color: #000;
+        }
+        .border{
+            border-bottom: 1px dashed #000;
+            margin: 16px 0;
+        }
+    }
 }
 }
 </style>
 </style>
 <style lang="scss">
 <style lang="scss">