From 39c0ad120acd120b62cb69dc92b6fe63e8edf902 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 17 四月 2024 16:01:28 +0800
Subject: [PATCH] 修改了备忘录图片

---
 ruoyi-ui/src/views/note/memo.vue |   44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/ruoyi-ui/src/views/note/memo.vue b/ruoyi-ui/src/views/note/memo.vue
index bae35f5..34299c6 100644
--- a/ruoyi-ui/src/views/note/memo.vue
+++ b/ruoyi-ui/src/views/note/memo.vue
@@ -323,7 +323,10 @@
     	this.uploadFileList.forEach((elem)=>{
     		formData.append("files", elem)
     	})
-
+    const cid = this.$route.params && this.$route.params.id;
+      const fid =2007;
+      this.formDat.fid = 2007;
+      this.formDat.cid = parseInt(cid) ;
     	let _this = this
 
         uploadPic(formData).then(response => {
@@ -331,7 +334,12 @@
           _this.formDat.url = _this.formDat.url+","+response.fileNames
       alert(_this.formDat.url)
     	  _this.uploadFileList = []
+        console.log(_this.formDat)
+        updateNote(_this.formDat).then(response => {
+          alert(984)
     	  _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛");
+
+        })
 
       });
             console.log(this.formDat,'formDatformDatformDatformDat')
@@ -413,8 +421,40 @@
       this.formDat.id = row.id;
       this.formDat.happenTime = row.happenTime;
       this.formDat.content = row.content;
+      this.formDat.url = row.url
       this.open = true;
-      console.log(this.formDat)
+      //console.log(this.formDat)
+      let paths = this.formDat.url.split(",");
+      //      alert( this.formDat.url)
+      let _this = this
+      _this.fileList = []
+      _this.fileListOther = []
+      for(let i = 0; i < paths.length; 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})
+
+        	}
+          }
+      }
       },
 
     // 鍙栨秷鎸夐挳

--
Gitblit v1.9.1