diff --git a/src/api/pvPage/pvApi.ts b/src/api/pvPage/pvApi.ts index 7a6ece1..fd17ec4 100644 --- a/src/api/pvPage/pvApi.ts +++ b/src/api/pvPage/pvApi.ts @@ -6,7 +6,7 @@ interface idInfo { // 发电量信息接口 export function curpower_api(data: idInfo) { return request({ - url: "/wwpm/biz/v1/device_all", + url: "/api/wwpm/biz/v1/photo_voltaic/capacity", method: "POST", data, }); diff --git a/src/views/pages/pvPage/index.vue b/src/views/pages/pvPage/index.vue index 29c4faa..4da010a 100644 --- a/src/views/pages/pvPage/index.vue +++ b/src/views/pages/pvPage/index.vue @@ -156,7 +156,6 @@ - @@ -217,19 +216,23 @@ import rateLine from "./rateLine.vue"; import timePvLine from "./timePvLine.vue"; import { useNow, useDateFormat } from "@vueuse/core"; import { id } from "element-plus/es/locale/index.mjs"; -import { getCurves } from "crypto"; +import { curpower_api } from "@/api/pvPage/pvApi"; onMounted(() => { - // 获取光伏实时发电量 - getCurves() + + + let Objinput={orgID: "8af8470a47aad8e20147aad92e400335"} //全部 获取光伏实时发电量 + getCurves(Objinput); //获取城南的接口{orgID} }); - - + // 获取光伏实时发电量 +const getCurves = (datares: any) => { + curpower_api(datares).then((res) => { + console.log("res", res); + }); +}; const HMS = useDateFormat(useNow(), "HH:mm:ss"); //当前时间 const YMD = useDateFormat(useNow(), "YYYY-MM-DD"); //当前日期 - - // 左侧------------------------------------------------ // 设备树标识