feat: switch to building facility object
This commit is contained in:
1 parent
7845ae8eb0
commit
c65235f377
2 files changed
+12
-6
No files matched your search
+9
-3
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user