feat: switch to building facility object

This commit is contained in:
wintsa 2026-05-11 10:30:14 +08:00
parent 7845ae8eb0
commit c65235f377
2 changed files with 12 additions and 6 deletions

View File

@ -1,10 +1,10 @@
# 组团趋势图
# 建筑设施对象趋势图
这是一个基于 `React + AG Charts`组团趋势图页面,用来查看不同分类维度下的年度统计趋势,并通过右侧筛选条件联动图表结果。
这是一个基于 `React + AG Charts`建筑设施对象趋势图页面,用来查看不同分类维度下的年度统计趋势,并通过右侧筛选条件联动图表结果。
## 功能
- 左侧展示组团趋势图,支持最低值、最高值、平均值、中位数和数据量切换
- 左侧展示建筑设施对象趋势图,支持最低值、最高值、平均值、中位数和数据量切换
- 右侧展示分类树,支持按 `自然地理区位 / 设施类别 / 建设阶段 / 规划形式` 选择节点
- 筛选条件支持 `省市区`,后端会根据 `uf_xzqy` 展开到区级 `id` 后再过滤
- 支持搜索筛选树节点,支持多条件叠加

View File

@ -18,6 +18,12 @@ ModuleRegistry.registerModules([AnnotationsModule, ContextMenuModule, ZoomModule
const API_BASE_URL = 'https://nest.zwgczx.com/api/v1';
// const API_BASE_URL = 'http://127.0.0.1:9089/api/v1';
const API_ROUTES = {
filterTree: '/zw/getBuildingFacilityObjectFilterTree',
filterTreeSearch: '/zw/getBuildingFacilityObjectFilterTreeSearch',
statsBatch: '/zw/getBuildingFacilityObjectStatsBatch',
} as const;
const statisticOptions = [
{ key: 'minValue', label: '最低值', shortLabel: '低' },
{ key: 'maxValue', label: '最高值', shortLabel: '高' },
@ -729,7 +735,7 @@ function App() {
};
const fetchRegionFilterTree = async (signal?: AbortSignal) => {
const response = await fetch(`${API_BASE_URL}/zw/getBuildingFunctionCostFilterTree?${buildQuery({ key: 'region' })}`, {
const response = await fetch(`${API_BASE_URL}${API_ROUTES.filterTree}?${buildQuery({ key: 'region' })}`, {
signal,
headers: {
'X-Requested-With': 'XMLHttpRequest',
@ -744,7 +750,7 @@ function App() {
};
const fetchBackendFilterTreeSearch = async (filterKey: FilterKey, keyword: string, signal?: AbortSignal) => {
const response = await fetch(`${API_BASE_URL}/zw/getBuildingFunctionCostFilterTreeSearch?${buildQuery({
const response = await fetch(`${API_BASE_URL}${API_ROUTES.filterTreeSearch}?${buildQuery({
key: filterKey,
keyword,
nodePrefix: isContentFilterKey(filterKey) ? getTreeNodePrefix(filterTreeByKey[filterKey]) : '',
@ -1127,7 +1133,7 @@ function App() {
return;
}
const response = await fetch(`${API_BASE_URL}/zw/getBuildingFunctionCostStatsBatch`, {
const response = await fetch(`${API_BASE_URL}${API_ROUTES.statsBatch}`, {
method: 'POST',
signal: controller.signal,
headers: {