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() },