From c1cff08cdbcee3278c1ac8d8a3a067e3bf015202 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期三, 21 二月 2024 22:45:01 +0800 Subject: [PATCH] 提交新内容 --- ruoyi-ui/src/views/pet/petnote.vue | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/pet/petnote.vue b/ruoyi-ui/src/views/pet/petnote.vue index 97b5f88..d14094f 100644 --- a/ruoyi-ui/src/views/pet/petnote.vue +++ b/ruoyi-ui/src/views/pet/petnote.vue @@ -55,7 +55,7 @@ > <el-button size="mini" type="primary" plain - icon="el-icon-plus" >瀵煎叆</el-button> + icon="el-icon-top" >瀵煎叆</el-button> </el-upload> </el-col> @@ -251,7 +251,7 @@ name:'', disabled: false, loading: true, - formData:[], + formData:{}, // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -277,7 +277,10 @@ // 鏃ユ湡鑼冨洿 dateRange: [], // 鏁版嵁鑼冨洿閫夐」 - fot:[".jpg",".jif"], + // 鏁版嵁鑼冨洿閫夐」 + fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', + '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], + fileList:[ ], fileListOther:[ @@ -483,6 +486,7 @@ this.formDat.url = ul+","+uls this.$refs["elForm"].validate(valid => { if (valid) { + // alert(33) addPetnote(this.formDat).then(response => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; @@ -498,11 +502,12 @@ requestUpload(params) { var file = params.file; - var formData = new FormData(); - formData.append('uploadFile', file); + var formData1 = new FormData(); + formData1.append('uploadFile', file); let _this = this + // alert(123) - uploadPic(formData).then(response => { + uploadPic(formData1).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) if(_this.fot.includes(pth) === true) @@ -515,6 +520,22 @@ _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) } + 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 + console.log(_this.formData.url) + // alert(87) + const pid = _this.$route.params && _this.$route.params.id; + _this.formData.pid = pid + updatenotePet(_this.formData).then(response => { + this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛"); + // this.open = false; + + }); }) }, -- Gitblit v1.9.1