From eea9a81e8fc865da8de24cbb579eec45324776b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=99=93=E5=9D=A4?= Date: Mon, 14 Oct 2019 15:49:18 +0800 Subject: [PATCH] =?UTF-8?q?delete-=E5=8F=97=E7=9B=8A=E4=BA=BA=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/AttachmentManagement.vue | 79 +++++++++++--------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/views/ebiz/sale/AttachmentManagement.vue b/src/views/ebiz/sale/AttachmentManagement.vue index e9c610476..3dd0fed10 100644 --- a/src/views/ebiz/sale/AttachmentManagement.vue +++ b/src/views/ebiz/sale/AttachmentManagement.vue @@ -492,45 +492,52 @@ export default { methods: { // 删除图片前 beforeDelete(file, detail) { + console.log(this.fileListtypebeneficiary) + console.log(file) + let that = this Dialog.confirm({ title: '提示', message: '您确定要删除吗' + }).then(() => { + if (detail.name == 'fileListIdFront') { + this.fileListIdFront = [] + } else if (detail.name == 'fileListIdBack') { + this.fileListIdBack = [] + } else if (detail.name == 'fileLIstImg') { + this.fileLIstImg = [] + } else if (detail.name == 'fileListBank') { + this.fileListBank = [] + } else if (detail.name == 'fileListBankBack') { + this.fileListBankBack = [] + } else if (detail.name == 'fileListIdFrontInsured') { + this.fileListIdFrontInsured = [] + } else if (detail.name == 'fileListIdBackInsured') { + this.fileListIdBackInsured = [] + } else if (detail.name == 'fileListBankInsured') { + this.fileListBankInsured = [] + } else if (detail.name == 'fileLIstImgInsured') { + this.fileLIstImgInsured = [] + } else if (detail.name == 'fileListOtherOne') { + this.fileListOtherOne = [] + } else if (detail.name == 'fileListOtherTwo') { + this.fileListOtherTwo = [] + } else if (detail.name == 'fileListOtherThree') { + this.fileListOtherThree = [] + } else if (detail.name == 'saleInsuredInfoOther') { + this.saleInsuredInfoOther = [] + } else if (detail.name == 'saleInsuredPersonInfoOther') { + this.saleInsuredPersonInfoOther = [] + } else if (detail.name == 'fileListtypebeneficiary') { + that.fileListtypebeneficiary.map((item, index, array) => { + if (item.content == file.content) { + array.splice(index, 1) + } else { + return + } + }) + } + this.deleteImg(file) }) - .then(() => { - if (detail.name == 'fileListIdFront') { - this.fileListIdFront = [] - } else if (detail.name == 'fileListIdBack') { - this.fileListIdBack = [] - } else if (detail.name == 'fileLIstImg') { - this.fileLIstImg = [] - } else if (detail.name == 'fileListBank') { - this.fileListBank = [] - } else if (detail.name == 'fileListBankBack') { - this.fileListBankBack = [] - } else if (detail.name == 'fileListIdFrontInsured') { - this.fileListIdFrontInsured = [] - } else if (detail.name == 'fileListIdBackInsured') { - this.fileListIdBackInsured = [] - } else if (detail.name == 'fileListBankInsured') { - this.fileListBankInsured = [] - } else if (detail.name == 'fileLIstImgInsured') { - this.fileLIstImgInsured = [] - } else if (detail.name == 'fileListOtherOne') { - this.fileListOtherOne = [] - } else if (detail.name == 'fileListOtherTwo') { - this.fileListOtherTwo = [] - } else if (detail.name == 'fileListOtherThree') { - this.fileListOtherThree = [] - } else if (detail.name == 'saleInsuredInfoOther') { - this.saleInsuredInfoOther = [] - } else if (detail.name == 'saleInsuredPersonInfoOther') { - this.saleInsuredPersonInfoOther = [] - } - this.deleteImg(file) - }) - .catch(() => { - // on cancel - }) }, test(type, id) { let that = this @@ -837,7 +844,7 @@ export default { subBusinessNo: '', fileName: that.imgName } - that.list.push(obj) + that.list.push(obj) } // }) } else {