From e6db32e2d5ccf1aa018f138f088795036c879de3 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期六, 23 三月 2024 23:14:29 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-ui/src/views/pet/petnote.vue                 |    1 
 ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue |   20 ++++++++-
 ruoyi-ui/src/views/bignote/index.vue               |    1 
 ruoyi-ui/src/views/pet/noteInfo.vue                |   59 ++++++++++++++++++++---------
 4 files changed, 59 insertions(+), 22 deletions(-)

diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue
index fd35c32..c8ef1fd 100644
--- a/ruoyi-ui/src/views/bignote/index.vue
+++ b/ruoyi-ui/src/views/bignote/index.vue
@@ -767,6 +767,7 @@
 	    uploadPic(formData).then(response => {
 		//	alert("dds")
 	      _this.formDat.url = _this.formDat.url+","+response.fileNames
+		  	//  alert(_this.formDat.url)
 		  _this.uploadFileList = []
 		  _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛");
 
diff --git a/ruoyi-ui/src/views/pet/noteInfo.vue b/ruoyi-ui/src/views/pet/noteInfo.vue
index 9c7ef03..832b643 100644
--- a/ruoyi-ui/src/views/pet/noteInfo.vue
+++ b/ruoyi-ui/src/views/pet/noteInfo.vue
@@ -270,21 +270,32 @@
         this.formData = response.data;
         let paths = response.data.url.split(",");
         for(let i = 0; i < paths.length; i++)
-        {
-          if(paths[i]!="") {
-
-            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
-
-            if (_this.fot.includes(pth) === true)
-              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            else {
-              // alert(paths[i])
-              let nms = paths[i].split("\/")
-              let nm = nms[nms.length - 1]
-              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
-            }
-          }
-        }
+    {
+      if(paths[i]!="") {
+    
+        let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
+    //	alert(pth)
+        if (_this.fot.includes(pth) === true)
+    	{
+    		if(paths[i][0]=="/")
+          _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
+    	  else
+    	     _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
+    	  }
+        else {
+          // alert(paths[i])
+    	 // alert()
+          let nms = paths[i].split("\/")
+          let nm = nms[nms.length - 1]
+    	  if(paths[i][0]=="/")
+          _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
+    		else
+    		_this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
+    		
+    	}
+      }
+    //  _this.fileList1 = _this.fileList
+    }
         this.loading = false;
       });
 
@@ -322,10 +333,18 @@
       this.$refs['elForm'].resetFields()
     },
     handleFileCardPreview(file){
-      this.dialogFileUrl = file.url;
-      const Base64 = require('js-base64').Base64
-      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
-      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
+
+	      this.dialogFileUrl = file.url;
+	  if(this.dialogFileUrl.includes("47.93.189.255")==true)
+	    this.dialogFileUrl = this.dialogFileUrl.replace("47.93.189.255","www.bendudu.com")
+	  //alert(this.dialogFileUrl)
+	  const Base64 = require('js-base64').Base64
+
+	  this.desurl = process.env.VUE_APP_BASE_OTHER_API+"preview/"+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
+	  let myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');      
+
+
+
     },
     handlePreview(file)
     {
@@ -488,9 +507,11 @@
    		let _this = this
 
    		this.uploading = true;
+		alert(234)
    		uploadPic(formData).then(response => {
    		_this.uploadFileList1 = []
    		  _this.formData.url = _this.formData.url+","+response.fileNames
+		  alert(2346)
    		    updatenotePet(_this.formData).then(response => {
    		      this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛");
    		      // this.open = false;
diff --git a/ruoyi-ui/src/views/pet/petnote.vue b/ruoyi-ui/src/views/pet/petnote.vue
index f2c326b..869e9de 100644
--- a/ruoyi-ui/src/views/pet/petnote.vue
+++ b/ruoyi-ui/src/views/pet/petnote.vue
@@ -606,6 +606,7 @@
     	    uploadPic(formData).then(response => {
     		//	alert("dds")
     	      _this.formDat.url = _this.formDat.url+","+response.fileNames
+			  alert(_this.formDat.url)
     		  _this.uploadFileList = []
     		  _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛");
     
diff --git a/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue b/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue
index 31ce44e..b15a352 100644
--- a/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue
+++ b/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue
@@ -445,7 +445,7 @@
 		// else
 		// this.formData.status = 0
 
-		alert(this.formData.status)
+	///	alert(this.formData.status)
         if (valid) {
           if (this.formData.id != undefined) {
             updateSelfEconomy(this.formData).then(response => {
@@ -518,6 +518,10 @@
         this.formData.url = ul+","+uls;
       //  alert(this.formData.url)
         if(res==true){
+			if(this.formData.status=='鏄�')
+						  		this.formData.status = 1
+						  		else
+						  		this.formData.status = 0
       	  updateSelfEconomy(this.formData).then(response => {
       		this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       		// this.open = false;
@@ -560,6 +564,10 @@
         })
         this.formData.url = ul+","+uls;
         if(res==true){
+			if(this.formData.status=='鏄�')
+						  		this.formData.status = 1
+						  		else
+						  		this.formData.status = 0
       	  updateSelfEconomy(this.formData).then(response => {
       		this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       	  });
@@ -668,7 +676,10 @@
  		})
  		let _this = this
 
-
+	  if(this.formData.status=='鏄�')
+			  		this.formData.status = 1
+			  		else
+			  		this.formData.status = 0
          uploadPic(formData).then(response => {
  			// console.log(response.originalFilenames)
  			// console.log(response.urls)
@@ -695,7 +706,10 @@
            updateSelfEconomy(_this.formData).then(response => {
              _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛");
              // this.open = false;
-
+	  if(_this.formData.status==1)
+			  		_this.formData.status = '鏄�'
+			  		else
+			  		_this.formData.status = '鍚�'
            });
          // }
          // else{

--
Gitblit v1.9.1