Browse Source

文件下载

yuanyiming 2 years ago
parent
commit
ec8b562e76

+ 2 - 1
src/components/tool/downloadFile.js

@@ -16,7 +16,8 @@ export default function downloadFile(url,fileName,changeState){
         document.body.appendChild(link);
         link.click();
         document.body.removeChild(link);
+        changeState(false);
     }
     x.send()
-    changeState(false);
+
 }

+ 7 - 2
src/views/activityManage/makerActvityDetails.vue

@@ -86,7 +86,7 @@
             </div>
             <div style="width: 85%" v-loading="downloadNow" element-loading-text="文件正在下载中">
               <div style="display: flex;width: 100%;flex-direction: column;" >
-                  <div class="download" v-for="item in tableData.reportFile">
+                  <div class="download" v-for="item in tableData.reportFile" :key="item.fid">
                       <span>{{ item.fileName }}</span>
                       <div class="downloadBtn">
                         <el-button type="primary" size="mini" @click="download(item)">下载文件</el-button>
@@ -341,7 +341,12 @@ export default {
   },
   methods:{
     download(item){
-      downloadFile(item['url'],item['fileName'],(_b)=>this.downloadNow = _b);
+      downloadFile(item['url'],item['fileName'],(_b)=>{
+        console.log(this.downloadNow)
+        this.downloadNow = _b
+        console.log(this.downloadNow)
+        console.log("=================================")
+      });
     },
     DelFileYes(){
       let newFile = this.tableData.reportFile.filter(item=>item.fid!=this.DelFileData.fid);

+ 19 - 4
src/views/projectManage/ProjectManagement3_1.vue

@@ -130,8 +130,18 @@
 
     <!-- 多行文本框区域开始 -->
       
+    <div class="tabTit">
+                 <div><p>活动介绍</p></div>
+            </div>
+              <el-input
+                type="textarea"
+                :rows="6"
+                resize="none"
+                placeholder="请输入内容"
+                v-model="selects.brief">
+              </el-input>
       <div class="tabTit">
-            <div><p>活动介绍</p></div>
+            <div><p>活动计划</p></div>
       </div>
       <div class="textArea">
         <vue-editor  :editorToolbar="customToolbar" v-model="textareaS[0]"></vue-editor>
@@ -239,7 +249,10 @@
             department:'',
             tel:'',
             beginDate:'',
-            studentNum:''
+            studentNum:'',
+            brief:'',
+            classid:"",
+
           },
 
           textareaS:[],
@@ -267,6 +280,8 @@
                   this.selects.fund=data.money;
                   this.selects.leader=data.pro_leader;
                   this.selects.tel=data.phone;
+                  this.selects.brief=data.brief
+                  this.selects.classid=data.classid
                   this.selects.beginDate=data.create_at;
                   this.selects.studentNum=data.students;
                   this.selects.department=data.classid;
@@ -337,14 +352,14 @@
                       uid:this.$store.state.userInfo.userid,
                       aid:this.$route.query["Id"],
                       tit:this.selects.projectName,
-                      con:this.selects.department,
+                      con:this.selects.brief,
                       leader:this.selects.leader,
                       mon:this.selects.fund,
                       stu:this.selects.studentNum,
                       teacher:JSON.stringify(this.tableData),
                       chap:JSON.stringify(this.textareaS),
                       pid:JSON.parse(localStorage.getItem('pid')),
-                      cid:'',
+                      cid:this.selects.classid,
                       ph:this.selects.tel,
                       beginTime:JSON.stringify(this.selects.beginDate)
                     }