From c5d278105d12ae422ea65605aca405acee4cd890 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 22 Jul 2022 16:21:08 +0800 Subject: [PATCH] 111 --- .../modules/communityService/policy/addPolicy.vue | 12 ++++++++++++ .../communityService/policy/personListItem.vue | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index 0e6e0f6c..4d6f5f55 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -127,6 +127,7 @@ accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3" :on-success="handleFileSuccess" :on-remove="handleFileRemove" + :on-preview="handleFileDownload" :limit="3" :before-upload="beforeUpload" :file-list="fileList"> @@ -594,7 +595,18 @@ export default { this.$emit('handleClose') }, + //下载 + handleFileDownload (file) { + var a = document.createElement('a'); + var event = new MouseEvent('click'); + a.download = file.name; + console.log(a) + a.href = file.url; + a.dispatchEvent(event); + + + }, resetData () { this.ruleList = [] diff --git a/src/views/modules/communityService/policy/personListItem.vue b/src/views/modules/communityService/policy/personListItem.vue index d40cc82a..cdd5786f 100644 --- a/src/views/modules/communityService/policy/personListItem.vue +++ b/src/views/modules/communityService/policy/personListItem.vue @@ -454,7 +454,7 @@ export default { } this.pageNo = 1 - // this.loadTable() + this.loadTable() },