|
|
@ -69,7 +69,7 @@ export default {
|
|
|
|
const { index } = params;
|
|
|
|
const { index } = params;
|
|
|
|
const item = this.files[index];
|
|
|
|
const item = this.files[index];
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
fileDownload(item.attachId).then((res) => {
|
|
|
|
fileDownload(item.id).then((res) => {
|
|
|
|
const suffix = item.attachFileUrl.substring(item.attachFileUrl.lastIndexOf(".")).toLowerCase();
|
|
|
|
const suffix = item.attachFileUrl.substring(item.attachFileUrl.lastIndexOf(".")).toLowerCase();
|
|
|
|
downloadFile(res, item.oldName + suffix);
|
|
|
|
downloadFile(res, item.oldName + suffix);
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
@ -124,10 +124,10 @@ export default {
|
|
|
|
const { index } = params;
|
|
|
|
const { index } = params;
|
|
|
|
const item = this.files[index];
|
|
|
|
const item = this.files[index];
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
deleteFile(item.attachId).then(res => {
|
|
|
|
deleteFile(item.id).then(res => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
const newList = this.files.filter(val => {
|
|
|
|
const newList = this.files.filter(val => {
|
|
|
|
return item.attachId !== val.attachId;
|
|
|
|
return item.id !== val.id;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.$emit('change', newList);
|
|
|
|
this.$emit('change', newList);
|
|
|
|
if (this.initialIndex > 0) {
|
|
|
|
if (this.initialIndex > 0) {
|
|
|
|