Compare commits
2 Commits
d6fa074348
...
2b3dfc5034
Author | SHA1 | Date |
---|---|---|
“yu” | 2b3dfc5034 | |
“yu” | 25500ee8f5 |
|
@ -14,6 +14,7 @@ export function svgdApi(data: any) {
|
|||
data,
|
||||
});
|
||||
}
|
||||
// osp页面 储能曲线
|
||||
export function buttyApi(data: any) {
|
||||
return request({
|
||||
// url: "http://10.120.75.248:19081/algoService/feederPowerFlowResult",
|
||||
|
@ -23,5 +24,25 @@ export function buttyApi(data: any) {
|
|||
data,
|
||||
});
|
||||
}
|
||||
// osp页面 光伏曲线
|
||||
export function pvApi(data: any) {
|
||||
return request({
|
||||
// url: "http://10.120.75.248:19081/algoService/feederPowerFlowResult",
|
||||
// url: "http://127.0.0.1:19081/algoService/feederPowerFlowResult",
|
||||
url: "/api/wwpm/biz/v1/photo_voltaic/power_curve",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// osp页面 用户侧充电桩曲线
|
||||
export function usrzApi(data: any) {
|
||||
return request({
|
||||
// url: "http://10.120.75.248:19081/algoService/feederPowerFlowResult",
|
||||
// url: "http://127.0.0.1:19081/algoService/feederPowerFlowResult",
|
||||
url: "/api/wwpm/biz/v1/deweller_pipe/power_curve",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,16 +14,18 @@
|
|||
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||
import "echarts/lib/component/dataZoom";
|
||||
onMounted(() => {
|
||||
drawOneLine();
|
||||
drawOneLine(props.echartArr);
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
echartArr: any[];
|
||||
}>();
|
||||
// 获取echart挂载的DOM节点
|
||||
const OneLine: any = ref();
|
||||
|
||||
// 获取当前组件实例
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
const drawOneLine = () => {
|
||||
const drawOneLine = (arr: any) => {
|
||||
let myChart = proxy.$echarts.init(OneLine.value);
|
||||
|
||||
myChart.clear();
|
||||
|
@ -95,7 +97,8 @@
|
|||
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
|
||||
// },
|
||||
},
|
||||
data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
data: arr.map((rtime) => rtime?.timeStamp.slice(-5)),
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
|
@ -149,7 +152,9 @@
|
|||
]),
|
||||
},
|
||||
},
|
||||
data: [20, 42, 41, 24, 40, 30, 10],
|
||||
data: arr.map((yitem) => yitem.p),
|
||||
|
||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,29 +1,32 @@
|
|||
<template>
|
||||
<div class="OneLine" ref="OneLine"></div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
inject,
|
||||
onBeforeUnmount,
|
||||
getCurrentInstance,
|
||||
onMounted,
|
||||
watchEffect,
|
||||
} from "vue";
|
||||
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||
import "echarts/lib/component/dataZoom";
|
||||
onMounted(() => {
|
||||
drawOneLine();
|
||||
});
|
||||
} from "vue";
|
||||
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||
import "echarts/lib/component/dataZoom";
|
||||
onMounted(() => {
|
||||
drawOneLine(props.echartArr);
|
||||
});
|
||||
const props = defineProps<{
|
||||
echartArr: any[];
|
||||
}>();
|
||||
|
||||
// 获取echart挂载的DOM节点
|
||||
const OneLine: any = ref();
|
||||
// 获取echart挂载的DOM节点
|
||||
const OneLine: any = ref();
|
||||
|
||||
// 获取当前组件实例
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
// 获取当前组件实例
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
const drawOneLine = () => {
|
||||
const drawOneLine = (arr: any) => {
|
||||
let myChart = proxy.$echarts.init(OneLine.value);
|
||||
|
||||
myChart.clear();
|
||||
|
@ -65,10 +68,10 @@
|
|||
top: "0%",
|
||||
right: "5%",
|
||||
orient: "vertical",
|
||||
data: ["总功率",],
|
||||
data: ["总功率"],
|
||||
itemWidth: transformFontSize(40),
|
||||
itemHeight: transformFontSize(18),
|
||||
itemGap:transformFontSize(8),
|
||||
itemGap: transformFontSize(8),
|
||||
textStyle: {
|
||||
fontSize: transformFontSize(35),
|
||||
color: "#FFFFFF",
|
||||
|
@ -95,8 +98,8 @@
|
|||
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
|
||||
// },
|
||||
},
|
||||
data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
|
||||
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
data: arr.map((rtime) => rtime?.timeStamp.slice(-5)),
|
||||
},
|
||||
yAxis: {
|
||||
splitLine: {
|
||||
|
@ -149,7 +152,8 @@
|
|||
]),
|
||||
},
|
||||
},
|
||||
data: [20, 42, 41, 24, 40, 30, 10],
|
||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||
data: arr.map((yitem) => yitem.p),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -159,13 +163,12 @@
|
|||
window.addEventListener("resize", function () {
|
||||
myChart.resize();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.OneLine {
|
||||
<style scoped>
|
||||
.OneLine {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue