diff --git a/frontend/src/api/modules/case-management/featureCase.ts b/frontend/src/api/modules/case-management/featureCase.ts index 804ed94bd0..0c2d876973 100644 --- a/frontend/src/api/modules/case-management/featureCase.ts +++ b/frontend/src/api/modules/case-management/featureCase.ts @@ -239,7 +239,6 @@ export function getThirdDemandList(data: TableQueryParams) { // 上传文件并关联用例 export function uploadOrAssociationFile(data: Record) { - debugger; return MSR.uploadFile({ url: UploadOrAssociationFileUrl }, { request: data.request, fileList: data.file }); } // 转存文件 diff --git a/frontend/src/components/pure/ms-table/useTable.ts b/frontend/src/components/pure/ms-table/useTable.ts index e1297b7e0f..3bc2cd51cb 100644 --- a/frontend/src/components/pure/ms-table/useTable.ts +++ b/frontend/src/components/pure/ms-table/useTable.ts @@ -320,6 +320,17 @@ export default function useTableProps( // } } }; + const collectIds = (data, rowKey: string, selectedKeys: Set) => { + data.forEach((item: any) => { + if (item[rowKey] && !selectedKeys.has(item[rowKey])) { + selectedKeys.add(item[rowKey]); + } + if (item.children) { + collectIds(item.children, rowKey, selectedKeys); + } + }); + return selectedKeys; + }; // 获取表格请求参数 const getTableQueryParams = () => { @@ -398,12 +409,7 @@ export default function useTableProps( resetSelector(); } else { resetSelector(false); - data.forEach((item: Record) => { - if (item[rowKey] && !selectedKeys.has(item[rowKey])) { - selectedKeys.add(item[rowKey]); - } - }); - propsRes.value.selectedKeys = selectedKeys; + propsRes.value.selectedKeys = collectIds(data, rowKey, selectedKeys); } }, diff --git a/frontend/src/models/caseManagement/featureCase.ts b/frontend/src/models/caseManagement/featureCase.ts index fccaa548db..51f528a606 100644 --- a/frontend/src/models/caseManagement/featureCase.ts +++ b/frontend/src/models/caseManagement/featureCase.ts @@ -242,6 +242,7 @@ export interface DemandItem { createUser: string; updateUser: string; children: DemandItem[]; // 平台下对应的需求 + [key: string]: any; } // 平台需求列表 diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue index 4387069cd7..6c7e1c3944 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabComment/tabCommentIndex.vue @@ -103,7 +103,6 @@ // 添加或者更新评论 async function handleUpdateOrAdd(item: CommentParams, cb: (result: boolean) => void) { - debugger; try { if (item.id) { await updateCommentList(item); diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/associatedDemandTable.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/associatedDemandTable.vue index cf21c7bd93..5220e4c352 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/associatedDemandTable.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/associatedDemandTable.vue @@ -7,7 +7,7 @@ >