master
parent
05d3aea630
commit
c5cf44a650
|
@ -175,13 +175,16 @@ const emits = defineEmits(["update-node-key"]); ////接收父组件的事件,
|
|||
|
||||
// 点击树节点
|
||||
// 处理选中target数据,最终得到由高层到底层的数组
|
||||
const handleTargetInfo = (data: TreeData, e: any) => {
|
||||
const handleTargetInfo = (data: TreeData, node: any) => {
|
||||
// targetInfo.resultArr = [];
|
||||
// handleTarget(e);
|
||||
// 利用设备中的信息调用接口
|
||||
// ---------
|
||||
//点中第4层 为台区时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格
|
||||
// emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表
|
||||
if (node.level === 5) {
|
||||
//点中第5层 为单个光伏时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格
|
||||
emits("update-node-key", node); //获取id,用于二级接口服务返回接口给可调资源列表
|
||||
}
|
||||
|
||||
// ---------
|
||||
};
|
||||
const handleTarget = (node: any) => {
|
||||
|
|
|
@ -238,12 +238,14 @@ const handleTargetInfo = (data: TreeData, node: any) => {
|
|||
|
||||
console.log("点击的节点",node);
|
||||
|
||||
if (node.level === 4) {
|
||||
if (node.level === 4||node.level===3) {
|
||||
console.log(node.level,'0000',node.key);
|
||||
|
||||
console.log("zheshishaya");
|
||||
//点中第4层 为台区时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格
|
||||
emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表
|
||||
// emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表
|
||||
emits("update-node-key", node); //获取id,用于二级接口服务返回接口给可调资源列表
|
||||
|
||||
}
|
||||
};
|
||||
const handleTarget = (node: any) => {
|
||||
|
|
|
@ -67,6 +67,98 @@
|
|||
/>能量调节
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="capAjust_box content_bg" v-if="allFlag">
|
||||
<div class="infotitle"><span>可调资源</span></div>
|
||||
<div class="info1">
|
||||
<div class="source_type">
|
||||
<div class="box source_active" v-for="item in sourceLArr">
|
||||
<div :class="item.img"></div>
|
||||
<div class="number_box" @click="handelSource(item.type)">
|
||||
<span>{{ item.number }}个</span>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="capAjust_box content_bg" v-else>
|
||||
<div class="infotitle"><span>可调资源</span></div>
|
||||
<div class="info1">
|
||||
<div class="source_type">
|
||||
<div class="box source_active" v-for="item in sourceLArr">
|
||||
<div :class="item.img"></div>
|
||||
<div class="number_box" @click="handelSource(item.type)">
|
||||
<span>{{ item.number }}个</span>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="source_list">
|
||||
<div class="table_box">
|
||||
<el-table
|
||||
:data="tablepvData"
|
||||
style="width: 100%; height: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="可调资源" align="center">
|
||||
<template #default="scope">
|
||||
<span style="margin-left: 10px">{{
|
||||
scope.row.name
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="infotitle"><span>当前负载率</span></div>
|
||||
<div class="info2">
|
||||
<rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
:keysv="keyechart"
|
||||
v-if="rateDate_curFlag"
|
||||
></rateLine>
|
||||
</div>
|
||||
<div class="infotitle_box">
|
||||
<div class="infotitle_short">
|
||||
<div class="bg"></div>
|
||||
|
||||
<span>负载率预测</span>
|
||||
<div class="btns">
|
||||
<div class="btnbg fs35" @click="handleClickPC">策略配置</div>
|
||||
<div
|
||||
v-if="!send_Status"
|
||||
:class="[btn_sendFlag ? '' : 'send_drp', `btnbg fs35 `]"
|
||||
@click="haneleprogress"
|
||||
>
|
||||
下发指令
|
||||
</div>
|
||||
<div class="send_box" v-else>
|
||||
发送中
|
||||
<div class="loading-dots">
|
||||
<span>.</span>
|
||||
<span>.</span>
|
||||
<span>.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info3">
|
||||
<rateLine_will
|
||||
:rateDate="rateDate_will"
|
||||
:keysv="keyechart"
|
||||
></rateLine_will>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="capAjust_box content_bg" >
|
||||
<div class="infotitle"><span>可调资源</span></div>
|
||||
<div class="info1">
|
||||
|
@ -122,9 +214,16 @@
|
|||
<div class="info2">
|
||||
<rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
:keysv="key2"
|
||||
:keysv="keyechart"
|
||||
v-if="rateDate_curFlag"
|
||||
|
||||
></rateLine>
|
||||
<!-- <rateLine
|
||||
:rateDate="rateDate_cur"
|
||||
|
||||
v-if="keyechart"
|
||||
|
||||
></rateLine> -->
|
||||
</div>
|
||||
<div class="infotitle_box">
|
||||
<div class="infotitle_short">
|
||||
|
@ -166,10 +265,11 @@
|
|||
<div class="info3">
|
||||
<rateLine_will
|
||||
:rateDate="rateDate_will"
|
||||
:keysv="key2"
|
||||
:keysv="keyechart"
|
||||
></rateLine_will>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -379,6 +479,7 @@ import Ajust_strategy from "@/assets/json/Ajust_strategy.json";
|
|||
import { sourcInfoApi } from "@/api/ajust/ajust.ts";
|
||||
import { getSourceMapRange } from "typescript";
|
||||
import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs";
|
||||
|
||||
// onMounted(async () => {
|
||||
// getRateDate(); //获取负载率
|
||||
|
||||
|
@ -392,32 +493,53 @@ onMounted(() => {
|
|||
// console.log(result, "负载率");
|
||||
getAllSourceAjust(); //可调资源
|
||||
});
|
||||
// 统计获取可调资源信息
|
||||
let allFlag = ref(true); //全部接口才触发
|
||||
// 统计获取可调资源信息 参数只有orgID
|
||||
const getAllSourceAjust = () => {
|
||||
let datainput = {
|
||||
orgID: "8af8470a47aad8e20147aad92e400335", //默认城南地区得可调资源
|
||||
};
|
||||
|
||||
sourcInfoApi(datainput).then((res) => {
|
||||
// console.log(res, "可调资源");
|
||||
|
||||
handelSourceTable(res.data);
|
||||
// tablepvData.value=res?.data
|
||||
});
|
||||
};
|
||||
// 获取线路的可调资源 参数是orgID 和mrid
|
||||
const getAllSourceAjust_Line = (mrid: string) => {
|
||||
let datainput = {
|
||||
orgID: "8af8470a47aad8e20147aad92e400335", //线路的可调资源
|
||||
mrid: mrid,
|
||||
};
|
||||
|
||||
sourcInfoApi(datainput).then((res) => {
|
||||
handelSourceTable(res.data);
|
||||
// tablepvData.value=res?.data
|
||||
});
|
||||
};
|
||||
|
||||
let treeAreaId = ref(""); //点击设备树二级服务获取的台区id去获取台区负载率
|
||||
// 设备树传来的设备树节点id treeKey是id
|
||||
const getTreeKey = (treeKey: any) => {
|
||||
getTreeSourceList(treeKey); //可调资源 先从设备树获取到id 再调用二级服务去获取可调资源列表
|
||||
treeAreaId = treeKey; //台区的id
|
||||
// 设备树传来的设备树节点id treeNode是节点数据
|
||||
const getTreeKey = (treeNode: any) => {
|
||||
allFlag.value = false;
|
||||
if (treeNode.level === 3) {
|
||||
console.log(treeNode.level, "3");
|
||||
getAllSourceAjust_Line(treeNode.key);
|
||||
getRateDate(treeNode.key); //获取负载率 点击设备树二级服务获取的台区id去获取台区负载率
|
||||
} else {
|
||||
console.log(treeNode.level, "4"); //台区
|
||||
getTreeSourceList(treeNode.key); //可调资源 先从设备树获取到id 再调用二级服务去获取可调资源列表
|
||||
// treeAreaId = treeNode.key; //台区的id
|
||||
getRateDate(treeNode.key); //获取负载率 点击设备树二级服务获取的台区id去获取台区负载率
|
||||
}
|
||||
// console.log(treeAreaId,'treeAreaId----------------------');
|
||||
getRateDate(treeKey); //获取负载率 点击设备树二级服务获取的台区id去获取台区负载率
|
||||
};
|
||||
|
||||
// 可调资源数量以及是否可调 功能---
|
||||
let pht = ref(0); //光伏
|
||||
let cdz = ref(0); //充电桩
|
||||
let batteryUnit = ref(0); //储能
|
||||
|
||||
// 再次调用二级服务 去获取资源信息
|
||||
const getTreeSourceList = async (id: string) => {
|
||||
// 调用接口
|
||||
|
@ -437,7 +559,6 @@ const getTreeSourceList = async (id: string) => {
|
|||
};
|
||||
// 处理可调资源数量 功能---
|
||||
const handelSourceTable = (sourceAjustObj: any) => {
|
||||
|
||||
sourceLArr.forEach((item) => {
|
||||
// 将返回数据的length赋值给数组对象
|
||||
item.number = sourceAjustObj[item.type]?.length || 0;
|
||||
|
@ -463,7 +584,6 @@ let sourceLArr = reactive([
|
|||
]);
|
||||
|
||||
const handelSource = (type: string) => {
|
||||
|
||||
// 根据type类型获取表格数据
|
||||
tablepvData.value = [];
|
||||
for (let i in sourceAjustObj[type]) {
|
||||
|
@ -477,11 +597,14 @@ interface RateDateInfo {
|
|||
measValue?: string;
|
||||
dateTime?: string;
|
||||
}
|
||||
let key2 = ref<number>(2);
|
||||
let keyechart = 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==========");
|
||||
|
||||
|
@ -494,6 +617,7 @@ const getRateDate = (treeAreaId: string) => {
|
|||
|
||||
if (res.data.result.length > 0) {
|
||||
rateDate_cur = res?.data.result;
|
||||
keyechart.value++;
|
||||
rateDate_curFlag.value = true;
|
||||
// console.log(res, "res");
|
||||
} else {
|
||||
|
@ -1521,6 +1645,7 @@ const styleVar = computed(() => {
|
|||
font-size: changeHeight(32);
|
||||
}
|
||||
}
|
||||
|
||||
.source_list {
|
||||
height: changeHeight(421);
|
||||
// border: 1px solid red;
|
||||
|
|
|
@ -393,36 +393,14 @@
|
|||
alt=""
|
||||
/>
|
||||
<div class="photovoltaic">
|
||||
<div class="rowbox">
|
||||
<div class="photovoltaic_key1">
|
||||
<img
|
||||
src="@/assets/images/mainPage/icon1_lefti.png"
|
||||
alt=""
|
||||
/>
|
||||
<div class="r"><span>35kV</span></div>
|
||||
|
||||
<img
|
||||
src="@/assets/images/mainPage/icon1_righti.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="photovoltaic_value1">
|
||||
<div class="kw">
|
||||
{{ Number(networkFeer35RatedS).toFixed(2) }}
|
||||
<span>km</span>
|
||||
</div>
|
||||
<div class="hu">
|
||||
{{ networkFeer35Count }} <span>条</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowbox">
|
||||
<div class="photovoltaic_key1">
|
||||
<img
|
||||
src="@/assets/images/mainPage/icon1_lefti.png"
|
||||
alt=""
|
||||
/>
|
||||
<div class="r"><span>10kV</span>及以下</div>
|
||||
<div class="r"><span>10kV</span></div>
|
||||
<img
|
||||
src="@/assets/images/mainPage/icon1_righti.png"
|
||||
alt=""
|
||||
|
@ -444,7 +422,7 @@
|
|||
src="@/assets/images/mainPage/icon1_lefti.png"
|
||||
alt=""
|
||||
/>
|
||||
<div class="r"><span>380V</span>及以下</div>
|
||||
<div class="r"><span>380V</span></div>
|
||||
<img
|
||||
src="@/assets/images/mainPage/icon1_righti.png"
|
||||
alt=""
|
||||
|
|
Loading…
Reference in New Issue