From 86e76b965eca189b0d000cbadce383f5d4ecadba Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期一, 25 三月 2024 23:54:21 +0800 Subject: [PATCH] 修改了bug --- ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue | 14 +++++++++++++- ruoyi-ui/src/views/pet/index.vue | 29 ++++++++++++++++++++++------- ruoyi-ui/src/views/pet/noteInfo.vue | 10 +++++----- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/pet/index.vue b/ruoyi-ui/src/views/pet/index.vue index 862bf55..547de62 100644 --- a/ruoyi-ui/src/views/pet/index.vue +++ b/ruoyi-ui/src/views/pet/index.vue @@ -322,6 +322,10 @@ </el-dialog> + <el-dialog :visible.sync="dialogVisible"> + <img w-full :src="dialogImageUrl" style="width: 100%; height: 100%" alt="Preview Image" /> + </el-dialog> + </div> </template> @@ -363,13 +367,16 @@ menuNodeAll: false, deptExpand: true, deptNodeAll: false, + + dialogImageUrl: '', + dialogVisible: false, // 鏃ユ湡鑼冨洿 dateRange: [], // 鏁版嵁鑼冨洿閫夐」 // 鏁版嵁鑼冨洿閫夐」 fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], - + fileList1:[ ], fileList2:[ ], fileListOther:[ ], @@ -713,16 +720,24 @@ addPet(this.formDat).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; + // 娓呯┖formDat瀵硅薄鐨勬暟鎹� + Object.keys(this.formDat).forEach(key => { + this.formDat[key] = ''; + }); + for(let i = 0; i <= this.fileList1.length; i++) + { + this.handleRemove(this.fileList1[0]); + } + for(let i = 0; i < this.fileListOther.length; i++){ + this.handleRemoveFile(this.fileListOther[0]); + } + // this.handleRemove(this.fileList[0]); + // this.handleRemoveFile(this.fileListOther[0]); this.getList(); }); } }); - // 娓呯┖formDat瀵硅薄鐨勬暟鎹� - Object.keys(this.formDat).forEach(key => { - this.formDat[key] = ''; - }); - this.handleRemove(this.fileList[0]); - this.handleRemoveFile(this.fileListOther[0]); + }, requestUpload(params) { diff --git a/ruoyi-ui/src/views/pet/noteInfo.vue b/ruoyi-ui/src/views/pet/noteInfo.vue index 832b643..36114ef 100644 --- a/ruoyi-ui/src/views/pet/noteInfo.vue +++ b/ruoyi-ui/src/views/pet/noteInfo.vue @@ -272,7 +272,7 @@ 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) @@ -291,7 +291,7 @@ _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 @@ -341,7 +341,7 @@ 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'); + let myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); @@ -507,11 +507,11 @@ let _this = this this.uploading = true; - alert(234) + // alert(234) uploadPic(formData).then(response => { _this.uploadFileList1 = [] _this.formData.url = _this.formData.url+","+response.fileNames - alert(2346) + // alert(2346) updatenotePet(_this.formData).then(response => { this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛"); // this.open = false; diff --git a/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue b/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue index b15a352..e5315f9 100644 --- a/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue +++ b/ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue @@ -649,6 +649,11 @@ console.log(this.uploadFileList1) let _this = this + if(this.formData.status=='鏄�') + this.formData.status = 1 + else + this.formData.status = 0 + this.uploading = true; uploadPic(formData).then(response => { _this.uploadFileList1 = [] @@ -656,9 +661,14 @@ updateSelfEconomy(_this.formData).then(response => { this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛"); // this.open = false; + if(this.formData.status=='鏄�') + this.formData.status = 1 + else + this.formData.status = 0 + }); }) - + this.uploading = false; }, picUpload() { @@ -711,12 +721,14 @@ else _this.formData.status = '鍚�' }); + // } // else{ // _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) // } }); + this.uploading = false; }, requestUpload(params) { -- Gitblit v1.9.1