From fd31e65979a1d3fa910d494dd83ce5c81cb820a8 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 19 Sep 2022 11:50:14 +0800 Subject: [PATCH] =?UTF-8?q?app=E4=B8=8A=E4=BC=A0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/customform.js | 4 ++-- .../LearunApp-2.2.0/common/mixins.js | 8 ++++++++ .../LearunApp-2.2.0/components/learun-app/upload-file.vue | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 9952a5154..85892fae6 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -314,8 +314,8 @@ export default { var uploadUid = ''; for (const item of val) { - if (item.uid) { - uploadUid = item.uid + if (item.folderId) { + uploadUid = item.folderId continue } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index a1edafd79..00875baae 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -229,6 +229,14 @@ export default { return await this.HTTP_GET('learun/adms/annexes/wxfileinfo', fileId) }, + //删除指定id的文件信息 + async DELETE_FILE(fileId) { + if (!fileId) { + return null + } + + return await this.HTTP_POST('learun/adms/annexes/wxdelete', fileId); + }, //获取文件夹下文件列表 async FETCH_FILEList(folderId) { if (!folderId) { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue index 9d1a0b39d..bdeb390ce 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue @@ -23,7 +23,7 @@ - + @@ -66,7 +66,7 @@ export default { return ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(typeString) }, - async delFile(index) { + async delFile(index,fileId) { if (!(await this.CONFIRM('删除文件', '确定要删除该文件吗?', true))) { return } @@ -75,6 +75,8 @@ export default { this.$emit('input', newList) this.$emit('change') this.$emit('del') + //物理删除 + this.DELETE_FILE(fileId); }, chooseFile() {