master
parent
8c5366c9c8
commit
be606ff614
|
@ -123,7 +123,7 @@
|
|||
<rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
:keysv="key2"
|
||||
v-if="treeAreaId"
|
||||
v-if="rateDate_cur"
|
||||
></rateLine>
|
||||
</div>
|
||||
<div class="infotitle_box">
|
||||
|
@ -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;
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
top: "0%",
|
||||
right: "5%",
|
||||
orient: "vertical",
|
||||
data: ["总功率",],
|
||||
data: ["总功率"],
|
||||
itemWidth: transformFontSize(40),
|
||||
itemHeight: transformFontSize(18),
|
||||
itemGap: transformFontSize(8),
|
||||
|
@ -99,7 +99,6 @@
|
|||
},
|
||||
// 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: {
|
||||
|
@ -173,4 +172,3 @@
|
|||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="val">9999</div>
|
||||
<div class="val">{{ total_cur }}</div>
|
||||
<span>kWh</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -98,7 +98,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="val">9999</div>
|
||||
<div class="val">{{ power35kv }}</div>
|
||||
<span>kWh</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,7 +115,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="val">9999</div>
|
||||
<div class="val">{{ power10kv }}</div>
|
||||
<span>kWh</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -132,7 +132,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="val">9999</div>
|
||||
<div class="val">{{ power380V }}</div>
|
||||
<span>kWh</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,7 +140,7 @@
|
|||
</div>
|
||||
<div class="infotitle"><span>实时发电量曲线</span></div>
|
||||
<div class="info2">
|
||||
<powerLine></powerLine>
|
||||
<powerLine :cur_pvArr="cur_pvArr" v-if="cur_pvArrFlag"></powerLine>
|
||||
</div>
|
||||
<div class="infotitle"><span>实时功率曲线</span></div>
|
||||
<div class="info3">
|
||||
|
@ -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) => {
|
||||
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<boolean>(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"); //当前日期
|
||||
|
|
|
@ -14,8 +14,11 @@
|
|||
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||
import "echarts/lib/component/dataZoom";
|
||||
onMounted(() => {
|
||||
drawOneLine();
|
||||
drawOneLine(props.cur_pvArr);
|
||||
});
|
||||
const props = defineProps<{
|
||||
cur_pvArr: any;
|
||||
}>();
|
||||
|
||||
// 获取echart挂载的DOM节点
|
||||
const ThreeLine: any = ref();
|
||||
|
@ -23,7 +26,7 @@
|
|||
// 获取当前组件实例
|
||||
const { proxy }: any = getCurrentInstance();
|
||||
|
||||
const drawOneLine = () => {
|
||||
const drawOneLine = (arr: any) => {
|
||||
let myChart = proxy.$echarts.init(ThreeLine.value);
|
||||
|
||||
myChart.clear();
|
||||
|
@ -97,8 +100,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: {
|
||||
|
@ -151,7 +154,8 @@
|
|||
]),
|
||||
},
|
||||
},
|
||||
data: [20, 42, 41, 24, 40, 30, 10],
|
||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||
data: arr.map((pvdata) => pvdata.p),
|
||||
},
|
||||
// {
|
||||
// name: "短期预测发电量",
|
||||
|
@ -226,4 +230,3 @@
|
|||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -16,6 +16,9 @@
|
|||
onMounted(() => {
|
||||
drawOneLine();
|
||||
});
|
||||
// const props = defineProps<{
|
||||
// cur_pvArr: any;
|
||||
// }>();
|
||||
|
||||
// 获取echart挂载的DOM节点
|
||||
const ThreeLine: any = ref();
|
||||
|
@ -98,7 +101,10 @@
|
|||
// },
|
||||
},
|
||||
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"],
|
||||
},
|
||||
yAxis: {
|
||||
splitLine: {
|
||||
|
@ -152,6 +158,8 @@
|
|||
},
|
||||
},
|
||||
data: [20, 42, 41, 24, 40, 30, 10],
|
||||
// data: arr.map((pvdata) => pvdata.p),
|
||||
|
||||
},
|
||||
// {
|
||||
// name: "短期预测功率",
|
||||
|
@ -226,4 +234,3 @@
|
|||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue