fix: 제어관리 저장 및 실행 문제 수정
- frontend: screen.ts에 saveScreenLayout 함수 추가 (ScreenDesigner_new.tsx가 호출하던 누락된 함수) - frontend: ScreenDesigner_new.tsx 저장 시 디버깅 로그 추가 - backend: screenManagementService.ts에 dataflowConfig 저장 확인 로그 추가 문제 원인: - ScreenDesigner_new.tsx가 호출하던 screenApi.saveScreenLayout 함수가 정의되지 않음 - 이로 인해 레이아웃 저장이 실패했을 가능성 해결: - saveScreenLayout 함수를 추가하여 정상적인 레이아웃 저장 가능 - 디버깅 로그를 통해 실제로 selectedDiagramId가 저장되는지 확인 가능
This commit is contained in:
parent
9a674b6686
commit
e42675616b
|
|
@ -1278,6 +1278,11 @@ export class ScreenManagementService {
|
|||
},
|
||||
};
|
||||
|
||||
// 🔍 디버깅: webTypeConfig.dataflowConfig 확인
|
||||
if ((component as any).webTypeConfig?.dataflowConfig) {
|
||||
console.log(`🔍 컴포넌트 ${component.id}의 dataflowConfig:`, JSON.stringify((component as any).webTypeConfig.dataflowConfig, null, 2));
|
||||
}
|
||||
|
||||
await query(
|
||||
`INSERT INTO screen_layouts (
|
||||
screen_id, component_type, component_id, parent_id,
|
||||
|
|
|
|||
|
|
@ -263,6 +263,18 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
|
|||
|
||||
try {
|
||||
setIsSaving(true);
|
||||
|
||||
// 🔍 디버깅: 저장할 레이아웃 데이터 확인
|
||||
console.log("🔍 레이아웃 저장 요청:", {
|
||||
screenId: selectedScreen.screenId,
|
||||
componentsCount: layout.components.length,
|
||||
components: layout.components.map(c => ({
|
||||
id: c.id,
|
||||
type: c.type,
|
||||
webTypeConfig: (c as any).webTypeConfig,
|
||||
})),
|
||||
});
|
||||
|
||||
const response = await screenApi.saveScreenLayout(selectedScreen.screenId, layout);
|
||||
if (response.success) {
|
||||
toast.success("화면이 저장되었습니다.");
|
||||
|
|
|
|||
|
|
@ -151,6 +151,12 @@ export const screenApi = {
|
|||
await apiClient.post(`/screen-management/screens/${screenId}/layout`, layoutData);
|
||||
},
|
||||
|
||||
// 화면 레이아웃 저장 (ScreenDesigner_new.tsx용)
|
||||
saveScreenLayout: async (screenId: number, layoutData: LayoutData): Promise<ApiResponse<void>> => {
|
||||
const response = await apiClient.post(`/screen-management/screens/${screenId}/layout`, layoutData);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// 화면 레이아웃 조회
|
||||
getLayout: async (screenId: number): Promise<LayoutData> => {
|
||||
const response = await apiClient.get(`/screen-management/screens/${screenId}/layout`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue