guonan
2025-06-20 116f7bdb280d418c89c24be6566d81dc755ba9d9
修改这该si的中科软后端接口的参数
已修改3个文件
39 ■■■■■ 文件已修改
src/api/hpApi.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/KGSimOption/RealTimeSimulation.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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", {
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 {
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 @@
// 获取所有雨量计数据(来自接口)
const getRainListAll = () => {
  // 雨量计类型id
  const ids = "1437295810";
  getDeviceInfo(ids, "110116110000").then((res) => {
  const ids = "1917487171642212354";
  getDeviceInfoSHG(ids).then((res) => {
    rainListNoFilter.value = res.data.pageData;
    // 根据当前选择的区域自动过滤
    updateShgListByArea();