| | |
| | | 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 getDeviceNWJ(data, townCode) { |
| | | const response = await axios.post("/hp/deviceInfo/getData", { |
| | | filterObject: { |
| | | "dictDeviceTypeList": [data], |
| | | "townCodeList": [townCode], |
| | | "year": 2025, |
| | | }, |
| | | "pageSize": 10000 |
| | | }); |
| | | return response.data; |
| | | } |
| | | |
| | | // 查询孙胡沟监测设备,dictCommunicationType为查询孙胡沟的雨量计 |
| | | 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", { |
| | | filterObject: { |
| | | "divisionDistrict": data, |
| | | "divisionDistrictList": [data], |
| | | // 所属项目 |
| | | // 如果不加这个,则返回的全是强震仪(1933099069385355265) |
| | | "belongObjList": [ |
| | |
| | | return response.data; |
| | | } |
| | | |
| | | // 查询孙胡沟避险场所 |
| | | export async function getSafePoint() { |
| | | // 查询北京市避险场所 |
| | | export async function getSafePoint(data) { |
| | | const response = await axios.get("/hp/safeHavenLocation/getDataSelect", { |
| | | params: { |
| | | divisionId: "110116110218" |
| | | divisionId: data |
| | | } |
| | | }); |
| | | return response.data; |
| | | } |
| | | // 110116110218 |
| | | |
| | | |
| | | |
| | | // 查询北京市 |
| | | export async function getAllCode() { |
| | | const response = await axios.get("/hp/district/getAll"); |
| | | return response.data; |
| | | } |
| | | |
| | | // 获取天气预报 |
| | | export async function getWeather() { |
| | | // 获取当前时间戳 |
| | | const currentTimestamp = Date.now(); |
| | | |
| | | // 创建Date对象 |
| | | const currentDate = new Date(currentTimestamp); |
| | | |
| | | // 格式化为年-月-日(YYYY-MM-DD) |
| | | const year = currentDate.getFullYear(); |
| | | const month = String(currentDate.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要+1 |
| | | const day = String(currentDate.getDate()).padStart(2, '0'); |
| | | const formattedDate = `${year}-${month}-${day}`; |
| | | |
| | | const response = await axios.get("/hp/weatherForecast/getSevenDaysWeather", { |
| | | params: { |
| | | inputDate: formattedDate |
| | | } |
| | | }); |
| | | return response.data; |
| | | } |
| | | |
| | | // 监测设备中关联的隐患点的具体信息 |
| | | export async function hdByDevice(data) { |
| | | const response = await axios.get("/hp/sinoDzHiddenDangerPoint/getDetail", { |
| | | params: { |
| | | unifiedCode: data |
| | | } |
| | | }); |
| | | return response.data; |