From 116f7bdb280d418c89c24be6566d81dc755ba9d9 Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期五, 20 六月 2025 11:36:16 +0800 Subject: [PATCH] 修改这该si的中科软后端接口的参数 --- src/api/hpApi.js | 28 +++++++++++++++++++++------- src/views/Home.vue | 5 ++--- src/views/left/KGSimOption/RealTimeSimulation.vue | 6 +++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/api/hpApi.js b/src/api/hpApi.js index f5715b7..a525bda 100644 --- a/src/api/hpApi.js +++ b/src/api/hpApi.js @@ -133,20 +133,34 @@ export async function getDeviceInfo(data, townCode) { const response = await axios.post("/hp/deviceInfo/getData", { filterObject: { - "dictDeviceType": data, - "townCode": townCode, - "year": 2025 - + "dictCommunicationType": data, + "townCodeList": [townCode], + "year": 2025, // 鎵�灞為」鐩� - // "belongObjList": [ - // "1797461961110261762" - // ], + "belongObjList": [ + "1797461961110261762" + ], }, "pageSize": 10000 }); return response.data; } +// 鏌ヨ瀛欒儭娌熺洃娴嬭澶� +export async function getDeviceInfoSHG(data) { + const response = await axios.post("/hp/deviceInfo/getData", { + filterObject: { + "dictCommunicationType": data, + "townCodeList": ["110116110000"], + "year": 2025, + }, + "pageSize": 10000 + + }); + return response.data; +} + + // 鍒嗛〉鏌ヨ琛屾斂鍖哄垝鐩戞祴璁惧淇℃伅 export async function getDeviceInfoByPage(data, pageNum) { const response = await axios.post("/hp/deviceInfo/getData", { diff --git a/src/views/Home.vue b/src/views/Home.vue index e02a52e..0c1b6e9 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -60,7 +60,7 @@ import { showDeviceDetail } from "@/store"; import { setupTokenRefresh, getDangerPoint } from "@/api/hpApi.js"; import { convertToWKT } from "@/utils/wktUtils"; -import { getDeviceInfo, getSafePoint } from "@/api/hpApi"; +import { getDeviceInfoSHG, getSafePoint } from "@/api/hpApi"; const route = useRoute(); const simStore = useSimStore(); @@ -100,7 +100,6 @@ // 璁$畻灞炴�� const showDetail = computed(() => showDeviceDetail.value); - onMounted(async () => { setupTokenRefresh(); // 鑾峰彇瀹忓浘token // getSimData(); //娴嬭瘯tr鍚庣 @@ -109,7 +108,7 @@ simStore.DangerPoint = res.data.pageData; }); - getDeviceInfo(null, "110116110000").then((res) => { + getDeviceInfoSHG(null).then((res) => { simStore.devices = res.data.pageData; }); try { diff --git a/src/views/left/KGSimOption/RealTimeSimulation.vue b/src/views/left/KGSimOption/RealTimeSimulation.vue index 782b60f..3ca2832 100644 --- a/src/views/left/KGSimOption/RealTimeSimulation.vue +++ b/src/views/left/KGSimOption/RealTimeSimulation.vue @@ -78,7 +78,7 @@ import { initeWaterPrimitiveView } from "@/utils/water"; import { SimAPIStore } from "@/store/simAPI"; import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎 -import { getDeviceInfo, getYLJData } from "@/api/hpApi"; +import { getDeviceInfoSHG, getYLJData } from "@/api/hpApi"; // 鑾峰彇 Store 瀹炰緥 const simStore = SimAPIStore(); @@ -116,8 +116,8 @@ // 鑾峰彇鎵�鏈夐洦閲忚鏁版嵁锛堟潵鑷帴鍙o級 const getRainListAll = () => { // 闆ㄩ噺璁$被鍨媔d - const ids = "1437295810"; - getDeviceInfo(ids, "110116110000").then((res) => { + const ids = "1917487171642212354"; + getDeviceInfoSHG(ids).then((res) => { rainListNoFilter.value = res.data.pageData; // 鏍规嵁褰撳墠閫夋嫨鐨勫尯鍩熻嚜鍔ㄨ繃婊� updateShgListByArea(); -- Gitblit v1.9.3