Browse Source

活动查看详细上传文件进度条

Q-ABAB 2 years ago
parent
commit
b7f9b2cb9b
1 changed files with 10 additions and 5 deletions
  1. 10 5
      src/views/activityManage/makerActvityDetails.vue

+ 10 - 5
src/views/activityManage/makerActvityDetails.vue

@@ -93,16 +93,13 @@
                         <el-button type="primary" @click="checkDelFile(item.url)" size="mini">删除文件</el-button>
                       </div>
                   </div>
-                  <!-- <div  class="download" v-if="tableData.reportFile!=''&&tableData.reportFile!=null">{{ tableData.reportFile!=''&&tableData.reportFile!=null?JSON.parse(tableData.reportFile).fileName:'' }}</div> -->
+                  <el-progress style="margin-top:20px" v-show="progress.show" :percentage="progress.value" :format="ProgressFormat"></el-progress>
                   <div class="addMoneyBtn">
                       <div class="jia">+</div>添加
                       <div id="upFile">
-                        <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept"> </beUpload>
+                        <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept" :progress="progress"> </beUpload>
                       </div>
                   </div>
-                  <!-- <div class="DelFile" v-if="tableData.reportFile!=''&&tableData.reportFile!=null">
-                    <el-button type="danger" @click="DelFileDialog = true">删除文件</el-button>
-                  </div> -->
               </div>
             </div>
             <!-- 活动完结报告结束 -->
@@ -356,7 +353,12 @@ export default {
         takeCharge:''
       },
       isAddTeacher:true,
+      progress:{
+        value:0,
+        show:false
       }
+      }
+      
   },
   methods:{
     download(item){
@@ -624,6 +626,9 @@ export default {
           console.log(err)
         })
       }
+    },
+    ProgressFormat(value){
+      return value ==100?this.progress.show = false :`${value}%`
     }
   },
   mounted(){