2239205b by renchao@pashanhoo.com

1

1 parent 32f61336
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-04 16:07:37 4 * @LastEditTime: 2023-07-28 14:20:07
5 --> 5 -->
6 <template> 6 <template>
7 <div class="rlPopup"> 7 <div class="rlPopup">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
77 scale: 1, 77 scale: 1,
78 degree: 0 78 degree: 0
79 }, 79 },
80 maxLength: 0, 80 maxFileLength: 0,
81 // 缩略图 81 // 缩略图
82 thumbnailImages: [], 82 thumbnailImages: [],
83 showViewer: false, 83 showViewer: false,
...@@ -252,17 +252,16 @@ ...@@ -252,17 +252,16 @@
252 * @param {*} files 252 * @param {*} files
253 * @author: renchao 253 * @author: renchao
254 */ 254 */
255 async handleChange (file, files) { 255 async handleChange (file, fileList) {
256 // 清空 fileList 数组 256 let length = fileList.length;
257 debugger 257 this.maxFileLength = Math.max(length, this.maxFileLength)
258 let length = files.length;
259 this.maxLength = Math.max(length, this.maxLength)
260 this.$refs.upload.clearFiles();
261 setTimeout(() => { 258 setTimeout(() => {
262 if (length !== this.maxLength) return
263 var formData = new FormData(); 259 var formData = new FormData();
264 files.forEach(file => { 260 if (this.maxFileLength !== length) {
265 formData.append('file', file.raw) 261 return
262 }
263 fileList.forEach(item => {
264 formData.append('file', item.raw)
266 }) 265 })
267 formData.append("bsmSj", this.previewImg.bsmSj); 266 formData.append("bsmSj", this.previewImg.bsmSj);
268 formData.append("bsmSlsq", this.previewImg.bsmSlsq); 267 formData.append("bsmSlsq", this.previewImg.bsmSlsq);
......