master
parent
be606ff614
commit
1ef3d9a4e1
|
@ -123,7 +123,7 @@
|
|||
<rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
:keysv="key2"
|
||||
v-if="rateDate_cur"
|
||||
v-if="rateDate_curFlag"
|
||||
></rateLine>
|
||||
</div>
|
||||
<div class="infotitle_box">
|
||||
|
@ -462,7 +462,7 @@ interface RateDateInfo {
|
|||
let key2 = ref<number>(2);
|
||||
let rateDate_cur = reactive<RateDateInfo[]>([]); //当前的负载率
|
||||
let rateDate_will = reactive<RateDateInfo[]>([]); //预测负载率
|
||||
|
||||
let rateDate_curFlag=ref(false)
|
||||
const getRateDate = (treeAreaId: string) => {
|
||||
// 定时15分钟获取接口数据
|
||||
// console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
|
||||
|
@ -476,6 +476,7 @@ const getRateDate = (treeAreaId: string) => {
|
|||
|
||||
if (res.data.result.length>0) {
|
||||
rateDate_cur = res?.data.result;
|
||||
rateDate_curFlag.value=true
|
||||
// console.log(res, "res");
|
||||
} else {
|
||||
// ElMessage({
|
||||
|
@ -484,6 +485,7 @@ const getRateDate = (treeAreaId: string) => {
|
|||
// type: "success",
|
||||
// plain: true,
|
||||
// });
|
||||
// alert(1)
|
||||
console.log('暂无数据负载率');
|
||||
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
{{ item.bname }}
|
||||
</div>
|
||||
</div> -->
|
||||
<rateLine></rateLine>
|
||||
<rateLine :pvArr="pvArr" v-if="pvArrFlag"></rateLine>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -268,6 +268,8 @@ const getpv = () => {
|
|||
pvApi({ mrid: '03DKX-24289' }).then(res => {
|
||||
console.log(res, 'respv')
|
||||
pvArr = res.data
|
||||
console.log(pvArr, 'pvArr');
|
||||
|
||||
if (pvArr.length > 0) {
|
||||
pvArrFlag.value = true
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ import {
|
|||
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||
import "echarts/lib/component/dataZoom";
|
||||
onMounted(() => {
|
||||
drawOneLine();
|
||||
drawOneLine(props.pvArr);
|
||||
});
|
||||
// const props = defineProps<{
|
||||
// cur_pvArr: any;
|
||||
// }>();
|
||||
const props = defineProps<{
|
||||
pvArr: any;
|
||||
}>();
|
||||
|
||||
// 获取echart挂载的DOM节点
|
||||
const ThreeLine: any = ref();
|
||||
|
@ -26,7 +26,7 @@ const ThreeLine: any = ref();
|
|||
// 获取当前组件实例
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
const drawOneLine = () => {
|
||||
const drawOneLine = (arr:any) => {
|
||||
let myChart = proxy.$echarts.init(ThreeLine.value);
|
||||
|
||||
myChart.clear();
|
||||
|
@ -100,8 +100,8 @@ const drawOneLine = () => {
|
|||
// 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: (arr.map((rtime) => rtime?.timeStamp.slice(-8))),
|
||||
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
data: (arr.map((rtime) => rtime?.timeStamp.slice(-5))),
|
||||
|
||||
|
||||
// data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
||||
|
@ -157,9 +157,9 @@ const drawOneLine = () => {
|
|||
]),
|
||||
},
|
||||
},
|
||||
data: [20, 42, 41, 24, 40, 30, 10],
|
||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||
// data: arr.map((pvdata) => pvdata.p),
|
||||
|
||||
data: arr.map((rload) => rload.p),
|
||||
},
|
||||
// {
|
||||
// name: "短期预测功率",
|
||||
|
|
Loading…
Reference in New Issue