Tony Kang 1 year ago
parent
commit
f97478d2f6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/controller/report_archive_controller.js

+ 5 - 0
app/controller/report_archive_controller.js

@@ -488,6 +488,11 @@ module.exports = app => {
                                     if (item.items[subIdx].uuid === orgUuidName) {
                                         if (item.items[subIdx].childUuids && item.items[subIdx].childUuids.length > 0) {
                                             // 如果有子分页,也得删除!
+                                            for (const childUuid of item.items[subIdx].childUuids) {
+                                                let childUuidName = childUuid;
+                                                if (!childUuid.includes('.PDF')) childUuidName = childUuidName + '.PDF';
+                                                await ctx.app.signPdfOss.delete(`archive/${childUuidName}`);
+                                            }
                                         }
                                         item.items.splice(subIdx, 1);
                                         break;