From 7867f246af6145037446cd46a54778e4fd6afffc Mon Sep 17 00:00:00 2001 From: Hermes CI Fix Date: Mon, 13 Jul 2026 09:52:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20api/index.ts=E8=A1=A5templateApi?= =?UTF-8?q?=E5=AF=BC=E5=87=BA(KPIList.bak=E4=BE=9D=E8=B5=96)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 77fb892a..09699ba6 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -52,6 +52,15 @@ export const dashboardApi = { predict: (params?: any) => api.get('/dashboard/predict', { params }), } +export const templateApi = { + list: (params?: any) => api.get('/templates', { params }), + get: (id: number) => api.get(`/templates/${id}`), + instantiate: (id: number, data: any) => api.post(`/templates/${id}/instantiate`, data), + create: (data: any) => api.post('/templates', data), + update: (id: number, data: any) => api.put(`/templates/${id}`, data), + delete: (id: number) => api.delete(`/templates/${id}`), +} + export const dataApi = { importExcel: (file: File) => { const form = new FormData()