diff --git a/src/views/trials/trials-workbench/components/auditDocument/index.vue b/src/views/trials/trials-workbench/components/auditDocument/index.vue index bc7cca2d..e3266ca3 100644 --- a/src/views/trials/trials-workbench/components/auditDocument/index.vue +++ b/src/views/trials/trials-workbench/components/auditDocument/index.vue @@ -16,7 +16,8 @@ - + @@ -645,6 +646,7 @@ export default { let res = await deleteAuditDocument(data) if (res.IsSuccess) { this.checkList = [] + this.rowData = {} this.getList(this.rowData.Id) if (this.$refs.versionDetail) { // this.$refs.versionDetail.getHistoricalVersion() @@ -679,6 +681,7 @@ export default { // 新增列表数据 async uplaodFile(list) { if (!this.isManage) return false + console.log(list, 'list') let data = [] if (this.config.isVersion) { data.push({ @@ -692,6 +695,17 @@ export default { }) } else { data = this.formatData(list) + let ParentId = this.Id + if (this.rowData && this.rowData.Id) { + if (this.rowData.AuditDocumentTypeEnum) { + ParentId = this.rowData.ParentId + } else { + ParentId = this.rowData.Id + } + } + data.forEach(item => { + item.ParentId = ParentId + }) } try { let res = await addAuditDocument(JSON.stringify(data)) @@ -736,10 +750,11 @@ export default { } } } - obj = obj[str] + obj = obj[str] || strObj[str] strKey.push(str) }) + console.log(obj, 'obj') obj.children.push({ ParentId: null, Name: item.FileName, @@ -1059,6 +1074,10 @@ export default { }