ruoyi-ui/src/views/bignote/index.vue | 补丁 | 查看 | 原始文档 | blame | 历史 | |
ruoyi-ui/src/views/collection/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ruoyi-ui/src/views/self/memoInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ruoyi-ui/src/views/self/show.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ruoyi-ui/src/views/travel/edit.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ruoyi-ui/src/views/bignote/index.vue
ruoyi-ui/src/views/collection/index.vue
@@ -828,6 +828,7 @@ this.$modal.msgSuccess("新增成功"); this.open = false; // 清空formDat对象的数据 this.newOption = ''; Object.keys(this.formDat).forEach(key => { this.formDat[key] = ''; }); @@ -842,6 +843,18 @@ }); } }); // 清空formDat对象的数据 Object.keys(this.formDat).forEach(key => { this.formDat[key] = ''; }); for(let i = 0; i <= this.fileList.length; i++) { this.handleRemove(this.fileList[0]); } for(let i = 0; i < this.fileListOther.length; i++){ this.handleRemoveFile(this.fileListOther[0]); } }, handleChange(file, fileList1) { //定义一个全局数组uploadFileList来做存储 ruoyi-ui/src/views/self/memoInfo.vue
@@ -120,12 +120,15 @@ action="" :file-list="fileListOther" class="upload-demo" ref="upload1" multiple list-type="picture-card" :on-preview="handleFileCardPreview" :on-remove="handleRemoveFile" :on-change="handleChange1" :http-request="requestUpload1" :show-file-list="true" :auto-upload="false" :disabled="!btn" :class="{ hide: !btn }" > @@ -175,6 +178,14 @@ </el-upload> <el-button style="margin-left: 10px" size="small" type="success" v-if="btn" @click="fileUpload" >上传到服务器</el-button> <h4 class="form-header"> </h4> <el-form-item size="large"> <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button> @@ -499,6 +510,35 @@ // console.log(this.uploadFileList) // this.fileList = fileList }, fileUpload(){ // var file = params.file; var formData = new FormData(); //this.$refs.upload1.submit(); // alert(this.uploadFileList1.length) // formData.append('uploadFile', file); if(this.uploadFileList1.length==0){ this.$modal.msgSuccess("文档上传列表不能为空!"); return} this.uploadFileList1.forEach((elem)=>{ formData.append("files", elem) }) console.log(this.uploadFileList1) let _this = this this.uploading = true; uploadPic(formData).then(response => { _this.uploadFileList1 = [] _this.formData.url = _this.formData.url+","+response.fileNames updateNote(_this.formData).then(response => { this.$modal.msgSuccess("文档上传成功"); // this.open = false; }); }) }, picUpload(){ var formData = new FormData(); if(this.uploadFileList.length==0){ ruoyi-ui/src/views/self/show.vue
@@ -336,24 +336,67 @@ @click="picUpload" >上传到服务器</el-button> <h4 class="form-header">其他附件 </h4> <el-upload action="" :file-list="fileListOther" class="upload-demo" multiple ref="upload1" :on-change="handleChange1" :auto-upload="false" list-type="picture-card" :on-remove="handleRemove" :http-request="requestUpload1m" :show-file-list="true" > <el-button type="primary">点击上传</el-button> <div v-if="uploading1" class="upload-status">正在上传...</div> <template #tip> <div class="el-upload__tip"> <i slot="default" class="el-icon-plus"></i> <div slot="file" slot-scope="{file}"> <!-- 添加video元素用于显示视频 --> <video v-if="file.url.includes('.mp4')" class="el-upload-list__item-thumbnail" :src="file.url" style="width: 147px; height: 147px" fit="cover" ></video> <img v-else class="el-upload-list__item-thumbnail" :src="file.url" alt="" style="width: 100%; height: 100%" fit="cover"></img> <span class="el-upload-list__item-actions"> <span class="el-upload-list__item-name">{{ file.name }}</span> <span class="el-upload-list__item-preview" @click="handleFileCardPreview(file)" > <i class="el-icon-zoom-in"></i> </span> <span class="el-upload-list__item-delete" @click="handleRemoveFile(file)" > <i class="el-icon-delete"></i> </span> </span> </div> </template> </el-upload> <el-button style="margin-left: 10px" size="small" type="success" @click="fileUpload" >上传到服务器</el-button> </el-form> <h4 class="form-header"> </h4> @@ -1193,6 +1236,32 @@ } }, fileUpload(){ // var file = params.file; var formData = new FormData(); this.$refs.upload1.submit(); // formData.append('uploadFile', file); if(this.uploadFileList1.length==0){ this.$modal.msgSuccess("文档上传列表不能为空!"); return } this.uploadFileList1.forEach((elem)=>{ formData.append("files", elem) }) let _this = this this.uploading = true; uploadPic(formData).then(response => { _this.uploadFileList1 = [] _this.formDat.url = _this.formDat.url+","+response.fileNames _this.$modal.msgSuccess("文件上传成功!"); }) }, picUpload() { var formData = new FormData(); ruoyi-ui/src/views/travel/edit.vue
@@ -37,6 +37,10 @@ <el-input v-model="formData.groupTotal" placeholder="请输入团费" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> <el-form-item label="感言" prop="spee"> <el-input v-model="formData.spee" placeholder="请输入感言" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> @@ -87,7 +91,7 @@ property: undefined, manner: undefined, groupTotal: undefined, spee: undefined }, dialogImageUrl: '', dialogVisible: false,