feat: initialize TJWater WebGIS frontend
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { setupWorker } from "msw/browser";
|
||||
|
||||
import { handlers } from "./handlers";
|
||||
|
||||
export const worker = setupWorker(...handlers);
|
||||
@@ -0,0 +1,10 @@
|
||||
export const agentViewFixture = {
|
||||
type: "metric_cards",
|
||||
title: "管网巡检摘要",
|
||||
items: [
|
||||
{ label: "高风险点位", value: 12, tone: "danger" },
|
||||
{ label: "待核查工单", value: 5, tone: "warning" },
|
||||
{ label: "影响管线", value: "3.2km", tone: "info" },
|
||||
{ label: "已完成步骤", value: "4/5", tone: "success" }
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import { http, HttpResponse } from "msw";
|
||||
|
||||
import { agentViewFixture } from "./fixtures/agent-view";
|
||||
|
||||
export const handlers = [
|
||||
http.get("/api/mock/agent-view", () => {
|
||||
return HttpResponse.json({ view: agentViewFixture });
|
||||
})
|
||||
];
|
||||
Reference in New Issue
Block a user