“yu” 2024-07-15 17:06:22 +08:00
parent 19cbcd4765
commit b5720888d1
3 changed files with 22 additions and 11 deletions

View File

@ -17,7 +17,16 @@
lazy lazy
:load="loadNode" :load="loadNode"
@node-click="handleTargetInfo" @node-click="handleTargetInfo"
:expand-on-click-node="false"
></el-tree> ></el-tree>
<!-- <el-tree ref="targetTreeRef" :data="treeData" :highlight-keywords="keyword" :props="props" :load="loadNode" lazy
node-key="ID" @node-click="handleNodeClick" :expand-on-click-node="false" empty-text="数据读取中..." v-else>
<template v-slot:default="{ node }">
<div :class="`${renderContentColor(node)} cusIcon`"></div>
<div style=" text-overflow: ellipsis;text-align: left; white-space: nowrap;width: 82%; overflow: hidden;"
:title="node.label">{{ node.label }}</div>
</template>
</el-tree> -->
</div> </div>
</div> </div>
</div> </div>
@ -108,15 +117,13 @@ const loadNode = async (node: any, resolve: any) => {
}).then((res) => { }).then((res) => {
resolve(res.data); //1 resolve(res.data); //1
}); });
} else if (node.level > 0 && node.level < 4) { } else if (node.level > 0 && node.level < 4) {
//,. //,.
resolve(node.data.children); resolve(node.data.children);
} else if (node.level === 4) { } else if (node.level === 4) {
console.log(node, node.level, "4------");
//
// ---------
// ---------
// //
let res = await treeSecond({ let res = await treeSecond({
orgID: "8af8470a47aad8e20147aad92e400335", orgID: "8af8470a47aad8e20147aad92e400335",
@ -156,7 +163,6 @@ const loadNode = async (node: any, resolve: any) => {
resolve(datanames); resolve(datanames);
} else { } else {
resolve([{ name: "暂无数据", leaf: true }]); resolve([{ name: "暂无数据", leaf: true }]);
console.log(res); //
} }
} else if (node.level === 5) { } else if (node.level === 5) {
console.log(node.parent, node.level); console.log(node.parent, node.level);
@ -229,7 +235,7 @@ const emits = defineEmits(["update-node-key"]); ////接收父组件的事件,
const handleTargetInfo = (data: TreeData, node: any) => { const handleTargetInfo = (data: TreeData, node: any) => {
// targetInfo.resultArr = []; // targetInfo.resultArr = [];
console.log("zheshishaya111",node.level,data); console.log("点击的节点",node);
if (node.level === 4) { if (node.level === 4) {
console.log(node.level,'0000',node.key); console.log(node.level,'0000',node.key);

View File

@ -399,8 +399,9 @@ const getAllSourceAjust = () => {
}; };
sourcInfoApi(datainput).then((res) => { sourcInfoApi(datainput).then((res) => {
console.log(res, "可调资源"); // console.log(res, "");
sourceAjustObj = res.data;
handelSourceTable(res.data);
// tablepvData.value=res?.data // tablepvData.value=res?.data
}); });
}; };
@ -436,6 +437,7 @@ 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;
@ -461,6 +463,7 @@ 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]) {
@ -1432,6 +1435,7 @@ const styleVar = computed(() => {
/* 矩形 */ /* 矩形 */
} }
.box { .box {
cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: space-evenly;

View File

@ -393,7 +393,7 @@
</div> </div>
<!-- 告警消息 --> <!-- 告警消息 -->
<!-- <div class="content_center_alert1" v-if="true"> <div class="content_center_alert1" v-if="true">
<div class="run_detail" v-if="true"> <div class="run_detail" v-if="true">
<div class="tip"> <div class="tip">
<img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" /> <img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" />
@ -408,14 +408,15 @@
<div class="gaobottom"> <div class="gaobottom">
<div class="gao"> <div class="gao">
[编号48776100381]台区5560810kV 556线路于2024-07-11 13:43:19发生反向重过载异常负载率-32% [编号48776100419]台区5560810kV 556线路于2024-07-12 14:36:54发生功率倒送反向负载率1.52%
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> --> </div>
<!-- 通知消息 --> <!-- 通知消息 -->
<!-- <div class="content_center_alert" v-if="true"> <!-- <div class="content_center_alert" v-if="true">
<div class="run_detail" v-if="true"> <div class="run_detail" v-if="true">