From 54e6d09525713d1f9cbc6092b4c3333997cae8f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cyu=E2=80=9D?= <“winebunny@163.com”>
Date: Mon, 15 Jul 2024 11:42:35 +0800
Subject: [PATCH 1/2] u
---
src/api/ajust/tree.ts | 10 +-
src/views/pages/OpticalStoragePage/index.vue | 2 +-
src/views/pages/homePage/SourceoneLine.vue | 196 +++++++++++++++++++
src/views/pages/homePage/index.vue | 4 +-
src/views/pages/homePage/oneLine.vue | 10 +-
src/views/pages/homePage/oneLine_load.vue | 22 ++-
src/views/pages/homePage/runListenPage.vue | 50 +++--
7 files changed, 269 insertions(+), 25 deletions(-)
create mode 100644 src/views/pages/homePage/SourceoneLine.vue
diff --git a/src/api/ajust/tree.ts b/src/api/ajust/tree.ts
index 3259fb1..e6c8a39 100644
--- a/src/api/ajust/tree.ts
+++ b/src/api/ajust/tree.ts
@@ -50,7 +50,15 @@ export function strategyApi(data: any) {
}
-// 全部的能量调节页面的接口
+// 全部的能量调节页面的接口-统计可调资源
+export function sourcIngoApi(data: any) {
+ return request({
+ url: '/wwpm/biz/v1/device_all',
+ method: 'POST',
+ data
+ })
+}
+
diff --git a/src/views/pages/OpticalStoragePage/index.vue b/src/views/pages/OpticalStoragePage/index.vue
index 6282bb2..bbb8f72 100644
--- a/src/views/pages/OpticalStoragePage/index.vue
+++ b/src/views/pages/OpticalStoragePage/index.vue
@@ -328,7 +328,7 @@ import 'echarts/lib/component/dataZoom'
import loadingPage from '@/views/commonPage/loading.vue'
import { buttyApi, svgdApi, pvApi, usrzApi } from '@/api/Osp/svgApi'
import { SVG, extend as SVGextend, Element as SVGElement, Box, Matrix } from '@svgdotjs/svg.js'
-import { log } from 'console'
+
onMounted(() => {
getbatrry() //储能功率曲线
diff --git a/src/views/pages/homePage/SourceoneLine.vue b/src/views/pages/homePage/SourceoneLine.vue
new file mode 100644
index 0000000..56bb942
--- /dev/null
+++ b/src/views/pages/homePage/SourceoneLine.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/homePage/index.vue b/src/views/pages/homePage/index.vue
index 35a0db1..a274462 100644
--- a/src/views/pages/homePage/index.vue
+++ b/src/views/pages/homePage/index.vue
@@ -194,7 +194,7 @@
负荷户数比例
-
+
@@ -770,6 +770,7 @@ import {
getCurrentInstance,
inject,
} from "vue";
+
import { ArrowDown } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
import { getColorFun } from "@/hooks/getColorFun/index";
@@ -783,6 +784,7 @@ import load_echart from "./oneLine.vue";
import storage_echart from "./oneLine.vue";
import threeEchart from "./3Dechart.vue";
import runListenPage from "./runListenPage.vue";
+
import { statInfo_api } from "@/api/homePage/SoureceApi.ts";
import { count } from "console";
onMounted(() => {
diff --git a/src/views/pages/homePage/oneLine.vue b/src/views/pages/homePage/oneLine.vue
index dbf6ab6..8271704 100644
--- a/src/views/pages/homePage/oneLine.vue
+++ b/src/views/pages/homePage/oneLine.vue
@@ -111,6 +111,8 @@ const drawOneLine = () => {
// inverse:true,
// data:props.data.map((item)=>item.time)
data: ["02:00", "04:00", "06:00", "08:00", "10:00", "12:00", "14:00","16:00", "18:00", "20:00", "22:00", "24:00"],
+
+ // data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
},
// y轴的展示数据
yAxis: {
@@ -122,8 +124,8 @@ const drawOneLine = () => {
},
type: "value",
name: "kW",
- min: -30,
- max: 40,
+ // min: -50,
+ // max: 50,
nameTextStyle: {
//y轴name的颜色
color: "#fff",
@@ -167,8 +169,8 @@ const drawOneLine = () => {
},
},
// data:props.data.map((item)=>{name:item.name,value:item.value})
- // data: [0, 42, 41, 24, -30, 33, 0],
- data: [0, 0,0,0,0, 40, 40,0,0,-30,-30,-30],
+ // data: [20, 42, 41, 24, 40, 30, 10],
+ data: [0, 0,0,0,0, 40, 40,0,0,-30,-30,-30],
},
],
};
diff --git a/src/views/pages/homePage/oneLine_load.vue b/src/views/pages/homePage/oneLine_load.vue
index 251bf8c..fec4df3 100644
--- a/src/views/pages/homePage/oneLine_load.vue
+++ b/src/views/pages/homePage/oneLine_load.vue
@@ -16,16 +16,19 @@ import transformFontSize from "@/hooks/transFormSize.ts";
import "echarts/lib/component/dataZoom";
import { dateEquals, progressProps } from "element-plus";
onMounted(() => {
- drawOneLine();
+ drawOneLine(props.echartArr);
+
});
// 获取echart挂载的DOM节点
const OneLine: any = ref(null);
-
+const props=defineProps<{
+ echartArr: any;
+}>();
// 获取当前组件实例
const { proxy }: any = getCurrentInstance();
-const drawOneLine = () => {
+const drawOneLine = (arr:any) => {
let myChart = null;
myChart = proxy.$echarts.init(OneLine.value);
@@ -109,8 +112,10 @@ const drawOneLine = () => {
offset:transformFontSize(15),
// 数据
// inverse:true,
+ data: arr.map((rtime) => rtime?.timeStamp.slice(-5)),
+
// data:props.data.map((item)=>item.time)
- data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
+ // data: ["02:00", "04:00", "06:00", "08:00", "10:00", "12:00", "14:00","16:00", "18:00", "20:00", "22:00", "24:00"],
},
// y轴的展示数据
yAxis: {
@@ -122,8 +127,8 @@ const drawOneLine = () => {
},
type: "value",
name: "kW",
- // min: -50,
- // max: 50,
+ // min: -30,
+ // max: 40,
nameTextStyle: {
//y轴name的颜色
color: "#fff",
@@ -166,8 +171,11 @@ const drawOneLine = () => {
]),
},
},
+ data: arr.map((pvdata) => pvdata.p*1.8),
+
// data:props.data.map((item)=>{name:item.name,value:item.value})
- data: [20, 42, 41, 24, 40, 30, 10],
+ // data: [0, 42, 41, 24, -30, 33, 0],
+ // data: [0, 0,0,0,0, 40, 40,0,0,-30,-30,-30],
},
],
};
diff --git a/src/views/pages/homePage/runListenPage.vue b/src/views/pages/homePage/runListenPage.vue
index 662e3cc..41fe00b 100644
--- a/src/views/pages/homePage/runListenPage.vue
+++ b/src/views/pages/homePage/runListenPage.vue
@@ -25,7 +25,7 @@
功率曲线
-
+ > -->
-
+ > -->
+
-
-
-
+
+
+
+