diff --git a/tenant-platform/src/api/update.ts b/tenant-platform/src/api/update.ts index 362018f..10f470f 100644 --- a/tenant-platform/src/api/update.ts +++ b/tenant-platform/src/api/update.ts @@ -236,6 +236,10 @@ export const updateAdminApi = { return updateClient.post(`/api/v1/updates/app/${id}/unpublish`, { reason }) }, + patchChangeLog(id: string, changeLog: string) { + return updateClient.patch<{ data: AppVersion }>(`/api/v1/updates/app/${id}/changelog`, { changeLog }) + }, + grayAppVersion(id: string, body: { enabled: boolean grayMode: GrayMode diff --git a/tenant-platform/src/views/update/VersionManagementView.vue b/tenant-platform/src/views/update/VersionManagementView.vue index 22136ba..dcd2e0a 100644 --- a/tenant-platform/src/views/update/VersionManagementView.vue +++ b/tenant-platform/src/views/update/VersionManagementView.vue @@ -106,7 +106,16 @@ - + + + @@ -670,6 +679,22 @@ + + + + + + ('IMMEDIATE') const publishScheduleAt = ref('') const updatingPublishSchedule = ref(false) +const showChangelogEdit = ref(false) +const changelogEditId = ref('') +const changelogEditValue = ref('') +const savingChangelog = ref(false) + +function openChangelogEdit(row: AppVersion) { + changelogEditId.value = row.id + changelogEditValue.value = row.changeLog ?? '' + showChangelogEdit.value = true +} + +async function submitChangelogEdit() { + savingChangelog.value = true + try { + await updateAdminApi.patchChangeLog(changelogEditId.value, changelogEditValue.value) + ElMessage.success('更新说明已保存') + showChangelogEdit.value = false + await loadAppVersions() + await loadOperationLogs() + } catch { + ElMessage.error('保存失败') + } finally { + savingChangelog.value = false + } +} + async function handleCancelReview(storeType?: string) { if (!storeReviewDetailVersion.value) return const stores = storeType