From 05d623d5b806f6650b9544dcbd4f322d677bf9a8 Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期二, 26 三月 2024 16:44:40 +0800
Subject: [PATCH] 完善直播模块2

---
 ruoyi-ui/src/views/bignote/familyeventInfo.vue |   57 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
index 0c0a81a..ee6f147 100644
--- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue
+++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -127,7 +127,7 @@
         multiple
         list-type="picture-card"
 			  		ref="upload1"
- 
+   :on-remove="handleRemoveFile"
         :http-request="requestUpload1"
 		       :file-list="fileListOther"
 		:on-change="handleChange1"
@@ -238,7 +238,7 @@
         people: undefined,
         address: undefined,
         remark: undefined,
-        url: undefined,
+        url: "",
       },
       dialogImageUrl: '',
       url1:undefined,
@@ -378,22 +378,37 @@
       for(let i = 0; i < this.fileListOther.length; i++)
       {
         if(this.fileListOther[i].url==file.url)
-		
+		{
+			if(this.fileListOther[i].res==false)
+				res = true
+			else
+			{
+				this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
+			}
           this.$delete(this.fileListOther,i);
-        let ul = this.fileList.map(function (elem){
-          return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-        }).join(",")
-        let uls = this.fileListOther.map(function (elem){
-          return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-        }).join(",")
-        this.formData.url = ul+","+uls;
-     
+    
+		}
       }
-	  updateFamilyevent(this.formData).then(response => {
-	    this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-	    // this.open = false;
 	  
-	  });
+	  let ul = ""
+	  this.fileList.map(function (elem){
+	  		if(elem.res==false)
+	  			ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+	  })
+	  let uls = ""
+	  this.fileListOther.map(function (elem){
+	    if(elem.res==false)
+	  			uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+	  })
+	  this.formData.url = ul+","+uls;
+	//  alert(this.formData.url)
+	  if(res==true){
+		  updateFamilyevent(this.formData).then(response => {
+			this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+			// this.open = false;
+		  
+		  });
+	  }
     },
     handleRemove(file) {	  
 			  //鍒ゆ柇鏄惁鏄箣鍓嶇殑鍥剧墖
@@ -426,7 +441,7 @@
 	  let uls = ""
 	  this.fileListOther.map(function (elem){
 	    if(elem.res==false)
-			elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+			uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
 	  })
 	  this.formData.url = ul+","+uls;
 	  if(res==true){
@@ -483,10 +498,12 @@
 	   this.fileList.push({name:file.name,url:file.url,res:true})
     },
 	//鑷畾涔変笂浼犳柟娉�
-	handleChange1(file, fileListOther) {
+	handleChange1(file, fileListOther1) {
 	       //瀹氫箟涓�涓叏灞�鏁扮粍uploadFileList鏉ュ仛瀛樺偍
 	
 	     // this.uploadFileList.push(file.raw);
+		 this.uploadFileList1.push(file.raw);
+		  this.fileListOther.push({name:file.name,url:file.url,res:true})
 	      console.log("=========5555=========")
 	      //console.log(file)
 	    //  console.log(this.uploadFileList)
@@ -496,8 +513,8 @@
 	//	var file = params.file;
 
 		var formData = new FormData();
-		this.$refs.upload1.submit();
-		
+		//this.$refs.upload1.submit();
+	//	alert(this.uploadFileList1.length)
 		// formData.append('uploadFile', file);
 		if(this.uploadFileList1.length==0){
 			  this.$modal.msgSuccess("鏂囨。涓婁紶鍒楄〃涓嶈兘涓虹┖锛�");
@@ -585,7 +602,7 @@
     requestUpload1(params)
     {
 	//	alert(123)
-    this.uploadFileList1.push(params.file);
+   // this.uploadFileList1.push(params.file);
   //  console.log("-----------")
 	//console.log(this.uploadFileList1)
     },

--
Gitblit v1.9.1