| | |
| | | }, |
| | | //文件上传 |
| | | handleUploadError() {}, |
| | | /** 2026-11-23:按文件名从列表中精确删除一项,避免用预览列表(blob)整表覆盖附件字段 */ |
| | | spliceByName(list, name) { |
| | | if (!list || !name) { |
| | | return; |
| | | } |
| | | const idx = list.findIndex(item => item && item.name === name); |
| | | if (idx > -1) { |
| | | list.splice(idx, 1); |
| | | } |
| | | }, |
| | | remove(file, fileList) { |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | this.annexfilesList = this.fileListto; |
| | | this.spliceByName(this.fileListto, file && file.name); |
| | | this.spliceByName(this.annexfilesList, file && file.name); |
| | | }, |
| | | // 上传成功 |
| | | uploadSccess(response, file, fileList) { |