diff --git a/frontend/src/components/business/ms-detail-drawer/index.vue b/frontend/src/components/business/ms-detail-drawer/index.vue index df41f5e6ea..62f3da004c 100644 --- a/frontend/src/components/business/ms-detail-drawer/index.vue +++ b/frontend/src/components/business/ms-detail-drawer/index.vue @@ -129,11 +129,11 @@ // 当前查看的是否是总数据的第一条数据,用当前查看数据的下标是否等于0,且当前页码是否等于1 const activeDetailIsFirst = computed(() => activeDetailIndex.value === 0 && props.pagination?.current === 1); const activeDetailIsLast = computed( - // 当前查看的是否是总数据的最后一条数据,用当前页码*每页条数+当前查看的条数下标,是否等于总条数 + // 当前查看的是否是总数据的最后一条数据,用(当前页码-1)*每页条数+当前查看的条数下标,是否等于总条数 () => activeDetailIndex.value === props.tableData.length - 1 && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - props.pagination!.current * props.pagination!.pageSize + activeDetailIndex.value >= + (props.pagination!.current - 1) * props.pagination!.pageSize + (activeDetailIndex.value + 1) >= // eslint-disable-next-line @typescript-eslint/no-non-null-assertion props.pagination!.total ); @@ -158,6 +158,7 @@ activeDetailId.value = props.tableData[activeDetailIndex.value - 1].id; activeDetailIndex.value -= 1; } + initDetail(); } } @@ -181,13 +182,16 @@ activeDetailId.value = props.tableData[activeDetailIndex.value + 1].id; activeDetailIndex.value += 1; } + initDetail(); } } watch( - () => activeDetailId.value, - () => { - initDetail(); + () => innerVisible.value, + (val) => { + if (val) { + initDetail(); + } } ); diff --git a/frontend/src/components/pure/ms-button/index.vue b/frontend/src/components/pure/ms-button/index.vue index 5b078fa297..0a13eafbf0 100644 --- a/frontend/src/components/pure/ms-button/index.vue +++ b/frontend/src/components/pure/ms-button/index.vue @@ -1,11 +1,12 @@ @@ -15,6 +16,7 @@ type?: 'text' | 'icon' | 'button'; status?: 'primary' | 'danger' | 'secondary'; disabled?: boolean; + loading?: boolean; }>(), { type: 'text', diff --git a/frontend/src/components/pure/ms-description/index.vue b/frontend/src/components/pure/ms-description/index.vue index dbdf9720a0..3090ef0d03 100644 --- a/frontend/src/components/pure/ms-description/index.vue +++ b/frontend/src/components/pure/ms-description/index.vue @@ -22,11 +22,13 @@ diff --git a/frontend/src/models/projectManagement/file.ts b/frontend/src/models/projectManagement/file.ts index 18e89bfb62..fd5e6ea787 100644 --- a/frontend/src/models/projectManagement/file.ts +++ b/frontend/src/models/projectManagement/file.ts @@ -28,6 +28,7 @@ export interface FileDetail extends FileItem { projectId: string; moduleName: string; // 所属模块名 moduleId: string; + storage?: string; // 存储方式 createUser: string; createTime: number; } @@ -43,7 +44,7 @@ export interface UploadFileParams { export interface UpdateFileParams { id: string; name?: string; - tags?: string[]; + tags?: (string | number)[]; description?: string; moduleId?: string; } diff --git a/frontend/src/router/guard/index.ts b/frontend/src/router/guard/index.ts index ca76b5dbde..7f8613d3f9 100644 --- a/frontend/src/router/guard/index.ts +++ b/frontend/src/router/guard/index.ts @@ -28,7 +28,7 @@ function setupPageGuard(router: Router) { } switch (getRouteLevelByKey(to.name as PathMapRoute)) { case MENU_LEVEL[1]: // 组织级别的页面,需要给页面携带上组织 ID - if (!urlOrgId) { + if (urlOrgId === undefined) { to.query = { ...to.query, organizationId: appStore.currentOrgId, @@ -38,7 +38,7 @@ function setupPageGuard(router: Router) { } break; case MENU_LEVEL[2]: // 项目级别的页面,需要给页面携带上组织 ID和项目 ID - if (!urlOrgId && !urlProjectId) { + if (urlOrgId === undefined && urlProjectId === undefined) { to.query = { ...to.query, organizationId: appStore.currentOrgId, diff --git a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue index a69b5052f7..cd628145a4 100644 --- a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue +++ b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue @@ -16,7 +16,7 @@