fix: 修改目标分组名称后自动同步更新本地绑定表中的名称缓存,并为前端更新分组 URL 中的 groupId 进行 Url 编码
This commit is contained in:
@@ -338,7 +338,7 @@ export const websitesApi = {
|
||||
test: (id: number) => api.post<{ success: boolean; message: string; detail?: string }>(`/api/websites/${id}/test`),
|
||||
groups: (id: number) => api.get<WebsiteGroup[]>(`/api/websites/${id}/groups`),
|
||||
createGroup: (id: number, data: { name: string; description?: string | null }) => api.post<any>(`/api/websites/${id}/groups`, data),
|
||||
updateGroup: (id: number, groupId: string, data: { name: string; description?: string | null }) => api.put<any>(`/api/websites/${id}/groups/${groupId}`, data),
|
||||
updateGroup: (id: number, groupId: string, data: { name: string; description?: string | null }) => api.put<any>(`/api/websites/${id}/groups/${encodeURIComponent(groupId)}`, data),
|
||||
importGroupsFromUpstream: (id: number, upstreamId: number, data: { group_ids: string[]; name_prefix: string }) =>
|
||||
api.post<{ success: boolean; message: string; items: ImportGroupItem[] }>(`/api/websites/${id}/groups/import-from-upstream/${upstreamId}`, data),
|
||||
syncImportedUpstreamKeys: (id: number, data: { upstream_id: number }) =>
|
||||
|
||||
@@ -1339,7 +1339,7 @@ async function saveWebsiteGroup() {
|
||||
ElMessage.success('新增成功')
|
||||
}
|
||||
groupFormVisible.value = false
|
||||
await loadWebsiteGroups()
|
||||
await Promise.all([loadWebsiteGroups(), loadBindings()])
|
||||
} catch (e: any) {
|
||||
ElMessage.error(e.response?.data?.detail || e.message || '保存失败')
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user