“yu” 2024-07-15 21:22:06 +08:00
parent 05d3aea630
commit c5cf44a650
4 changed files with 152 additions and 44 deletions

View File

@ -175,13 +175,16 @@ const emits = defineEmits(["update-node-key"]); ////接收父组件的事件,
// //
// target // target
const handleTargetInfo = (data: TreeData, e: any) => { const handleTargetInfo = (data: TreeData, node: any) => {
// targetInfo.resultArr = []; // targetInfo.resultArr = [];
// handleTarget(e); // handleTarget(e);
// //
// --------- // ---------
//4 id if (node.level === 5) {
// emits("update-node-key", node.key); //id, //5 id
emits("update-node-key", node); //id,
}
// --------- // ---------
}; };
const handleTarget = (node: any) => { const handleTarget = (node: any) => {

View File

@ -238,12 +238,14 @@ const handleTargetInfo = (data: TreeData, node: any) => {
console.log("点击的节点",node); console.log("点击的节点",node);
if (node.level === 4) { if (node.level === 4||node.level===3) {
console.log(node.level,'0000',node.key); console.log(node.level,'0000',node.key);
console.log("zheshishaya"); console.log("zheshishaya");
//4 id //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) => { const handleTarget = (node: any) => {

View File

@ -67,7 +67,99 @@
/> />
</div> </div>
</div> </div>
<div class="capAjust_box content_bg"> <!-- <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="infotitle"><span>可调资源</span></div>
<div class="info1"> <div class="info1">
<div class="source_type"> <div class="source_type">
@ -122,9 +214,16 @@
<div class="info2"> <div class="info2">
<rateLine <rateLine
:rateDate="rateDate_cur" :rateDate="rateDate_cur"
:keysv="key2" :keysv="keyechart"
v-if="rateDate_curFlag" v-if="rateDate_curFlag"
></rateLine> ></rateLine>
<!-- <rateLine
:rateDate="rateDate_cur"
v-if="keyechart"
></rateLine> -->
</div> </div>
<div class="infotitle_box"> <div class="infotitle_box">
<div class="infotitle_short"> <div class="infotitle_short">
@ -166,10 +265,11 @@
<div class="info3"> <div class="info3">
<rateLine_will <rateLine_will
:rateDate="rateDate_will" :rateDate="rateDate_will"
:keysv="key2" :keysv="keyechart"
></rateLine_will> ></rateLine_will>
</div> </div>
</div> </div>
</div> </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 { sourcInfoApi } from "@/api/ajust/ajust.ts";
import { getSourceMapRange } from "typescript"; import { getSourceMapRange } from "typescript";
import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs"; import { ITEM_RENDER_EVT } from "element-plus/es/components/virtual-list/src/defaults.mjs";
// onMounted(async () => { // onMounted(async () => {
// getRateDate(); // // getRateDate(); //
@ -392,32 +493,53 @@ onMounted(() => {
// console.log(result, ""); // console.log(result, "");
getAllSourceAjust(); // getAllSourceAjust(); //
}); });
// let allFlag = ref(true); //
// orgID
const getAllSourceAjust = () => { const getAllSourceAjust = () => {
let datainput = { let datainput = {
orgID: "8af8470a47aad8e20147aad92e400335", // orgID: "8af8470a47aad8e20147aad92e400335", //
}; };
sourcInfoApi(datainput).then((res) => { sourcInfoApi(datainput).then((res) => {
// console.log(res, "");
handelSourceTable(res.data); handelSourceTable(res.data);
// tablepvData.value=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 let treeAreaId = ref(""); //id
// id treeKeyid // id treeNode
const getTreeKey = (treeKey: any) => { const getTreeKey = (treeNode: any) => {
getTreeSourceList(treeKey); // id allFlag.value = false;
treeAreaId = treeKey; //id 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----------------------'); // console.log(treeAreaId,'treeAreaId----------------------');
getRateDate(treeKey); // id
}; };
// --- // ---
let pht = ref(0); // let pht = ref(0); //
let cdz = ref(0); // let cdz = ref(0); //
let batteryUnit = ref(0); // let batteryUnit = ref(0); //
// //
const getTreeSourceList = async (id: string) => { const getTreeSourceList = async (id: string) => {
// //
@ -437,7 +559,6 @@ const getTreeSourceList = async (id: string) => {
}; };
// --- // ---
const handelSourceTable = (sourceAjustObj: any) => { const handelSourceTable = (sourceAjustObj: any) => {
sourceLArr.forEach((item) => { sourceLArr.forEach((item) => {
// length // length
item.number = sourceAjustObj[item.type]?.length || 0; item.number = sourceAjustObj[item.type]?.length || 0;
@ -463,7 +584,6 @@ let sourceLArr = reactive([
]); ]);
const handelSource = (type: string) => { const handelSource = (type: string) => {
// type // type
tablepvData.value = []; tablepvData.value = [];
for (let i in sourceAjustObj[type]) { for (let i in sourceAjustObj[type]) {
@ -477,11 +597,14 @@ interface RateDateInfo {
measValue?: string; measValue?: string;
dateTime?: string; dateTime?: string;
} }
let key2 = ref<number>(2); let keyechart = ref<number>(2);
let rateDate_cur = reactive<RateDateInfo[]>([]); // let rateDate_cur = reactive<RateDateInfo[]>([]); //
let rateDate_will = reactive<RateDateInfo[]>([]); // let rateDate_will = reactive<RateDateInfo[]>([]); //
let rateDate_curFlag = ref(false); let rateDate_curFlag = ref(false);
const getRateDate = (treeAreaId: string) => { const getRateDate = (treeAreaId: string) => {
// 15 // 15
// console.log(treeAreaId, treeAreaId.value,"treeAreaId=========="); // console.log(treeAreaId, treeAreaId.value,"treeAreaId==========");
@ -494,6 +617,7 @@ const getRateDate = (treeAreaId: string) => {
if (res.data.result.length > 0) { if (res.data.result.length > 0) {
rateDate_cur = res?.data.result; rateDate_cur = res?.data.result;
keyechart.value++;
rateDate_curFlag.value = true; rateDate_curFlag.value = true;
// console.log(res, "res"); // console.log(res, "res");
} else { } else {
@ -1521,6 +1645,7 @@ const styleVar = computed(() => {
font-size: changeHeight(32); font-size: changeHeight(32);
} }
} }
.source_list { .source_list {
height: changeHeight(421); height: changeHeight(421);
// border: 1px solid red; // border: 1px solid red;

View File

@ -393,36 +393,14 @@
alt="" alt=""
/> />
<div class="photovoltaic"> <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="rowbox">
<div class="photovoltaic_key1"> <div class="photovoltaic_key1">
<img <img
src="@/assets/images/mainPage/icon1_lefti.png" src="@/assets/images/mainPage/icon1_lefti.png"
alt="" alt=""
/> />
<div class="r"><span>10kV</span>及以下</div> <div class="r"><span>10kV</span></div>
<img <img
src="@/assets/images/mainPage/icon1_righti.png" src="@/assets/images/mainPage/icon1_righti.png"
alt="" alt=""
@ -444,7 +422,7 @@
src="@/assets/images/mainPage/icon1_lefti.png" src="@/assets/images/mainPage/icon1_lefti.png"
alt="" alt=""
/> />
<div class="r"><span>380V</span>及以下</div> <div class="r"><span>380V</span></div>
<img <img
src="@/assets/images/mainPage/icon1_righti.png" src="@/assets/images/mainPage/icon1_righti.png"
alt="" alt=""