diff --git a/src/views/pages/CapacityAdjustmentPage/index.vue b/src/views/pages/CapacityAdjustmentPage/index.vue index e46418f..2ba5a48 100644 --- a/src/views/pages/CapacityAdjustmentPage/index.vue +++ b/src/views/pages/CapacityAdjustmentPage/index.vue @@ -123,7 +123,7 @@
@@ -474,15 +474,18 @@ const getRateDate = (treeAreaId: string) => { }).then((res) => { console.log(res, "res"); - if (res?.data.result.length) { + if (res.data.result.length>0) { rateDate_cur = res?.data.result; // console.log(res, "res"); } else { - ElMessage({ - message: "Congrats, this is a success message.", - type: "success", - plain: true, - }); + // ElMessage({ + + // message: "", + // type: "success", + // plain: true, + // }); + console.log('暂无数据负载率'); + } }); // let rateDate = rateJSONData as any; diff --git a/src/views/pages/OpticalStoragePage/cdzLine.vue b/src/views/pages/OpticalStoragePage/cdzLine.vue index 55575ca..52b25de 100644 --- a/src/views/pages/OpticalStoragePage/cdzLine.vue +++ b/src/views/pages/OpticalStoragePage/cdzLine.vue @@ -1,176 +1,174 @@ - - - - - \ No newline at end of file + myChart.setOption(option); + + // 根据页面大小自动响应图表大小 + window.addEventListener("resize", function () { + myChart.resize(); + }); +}; + + + diff --git a/src/views/pages/pvPage/index.vue b/src/views/pages/pvPage/index.vue index 4da010a..75ce116 100644 --- a/src/views/pages/pvPage/index.vue +++ b/src/views/pages/pvPage/index.vue @@ -81,7 +81,7 @@ />
-
9999
+
{{ total_cur }}
kWh
@@ -98,7 +98,7 @@ />
-
9999
+
{{ power35kv }}
kWh
@@ -115,7 +115,7 @@ />
-
9999
+
{{ power10kv }}
kWh
@@ -132,7 +132,7 @@ />
-
9999
+
{{ power380V }}
kWh
@@ -140,7 +140,7 @@
实时发电量曲线
- +
实时功率曲线
@@ -217,18 +217,62 @@ import timePvLine from "./timePvLine.vue"; import { useNow, useDateFormat } from "@vueuse/core"; import { id } from "element-plus/es/locale/index.mjs"; import { curpower_api } from "@/api/pvPage/pvApi"; +import { pvApi } from '@/api/Osp/svgApi' + onMounted(() => { - - - let Objinput={orgID: "8af8470a47aad8e20147aad92e400335"} //全部 获取光伏实时发电量 + let Objinput = { orgID: "8af8470a47aad8e20147aad92e400335" }; //全部 获取光伏实时发电量 getCurves(Objinput); //获取城南的接口{orgID} + getpv() //光伏功率曲线 }); - // 获取光伏实时发电量 +// 当日累计发电量 +let total_cur = ref("0"); +let power35kv = ref("0"); +let power10kv = ref("0"); +let power380V = ref("0"); +let cur_pvArrFlag=ref(false) +let cur_pvArr=reactive([]); +// 获取光伏实时发电量 const getCurves = (datares: any) => { - curpower_api(datares).then((res) => { - console.log("res", res); - }); + curpower_api(datares) + .then((res) => { + console.log("res", res); + //实时量测信息 + if (res.data) { + if (res.data.total) { + total_cur.value = res.data.total; + } + if (res.data["380V"]) { + power380V.value = res.data["380V"]; + } + if (res.data["35kV"]) { + power35kv.value = res.data["35kV"]; + } + if (res.data["10kV"]) { + power10kv.value = res.data["10kV"]; + } + } + // 发电量曲线 + if(res.data.data){ + cur_pvArrFlag.value=true + cur_pvArr=res.data.data; + } + }) + .catch((error) => { + console.log(error); + }); }; +let pvArr = reactive([]) //光伏 +let pvArrFlag = ref(false) +// 获取光伏功率曲线 +const getpv = () => { + pvApi({ mrid: '03DKX-24289' }).then(res => { + console.log(res, 'respv') + pvArr = res.data + if (pvArr.length > 0) { + pvArrFlag.value = true + } + }) +} const HMS = useDateFormat(useNow(), "HH:mm:ss"); //当前时间 const YMD = useDateFormat(useNow(), "YYYY-MM-DD"); //当前日期 diff --git a/src/views/pages/pvPage/powerLine.vue b/src/views/pages/pvPage/powerLine.vue index 291f2e6..c0d76d7 100644 --- a/src/views/pages/pvPage/powerLine.vue +++ b/src/views/pages/pvPage/powerLine.vue @@ -1,229 +1,232 @@ - - - - - \ No newline at end of file + myChart.setOption(option); + + // 根据页面大小自动响应图表大小 + window.addEventListener("resize", function () { + myChart.resize(); + }); +}; + + + diff --git a/src/views/pages/pvPage/rateLine.vue b/src/views/pages/pvPage/rateLine.vue index ac8c1a0..0682bc5 100644 --- a/src/views/pages/pvPage/rateLine.vue +++ b/src/views/pages/pvPage/rateLine.vue @@ -1,229 +1,236 @@ - - - - - \ No newline at end of file + myChart.setOption(option); + + // 根据页面大小自动响应图表大小 + window.addEventListener("resize", function () { + myChart.resize(); + }); +}; + + +