master
parent
19cbcd4765
commit
b5720888d1
|
@ -17,7 +17,16 @@
|
|||
lazy
|
||||
:load="loadNode"
|
||||
@node-click="handleTargetInfo"
|
||||
:expand-on-click-node="false"
|
||||
></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>
|
||||
|
@ -108,15 +117,13 @@ const loadNode = async (node: any, resolve: any) => {
|
|||
}).then((res) => {
|
||||
resolve(res.data); //默认加载第1层
|
||||
});
|
||||
|
||||
} else if (node.level > 0 && node.level < 4) {
|
||||
//默认展开的层级,需要默认几层就判断一下.
|
||||
resolve(node.data.children);
|
||||
} else if (node.level === 4) {
|
||||
console.log(node, node.level, "4------");
|
||||
// 利用设备中的信息调用接口
|
||||
// ---------
|
||||
|
||||
// ---------
|
||||
|
||||
//懒加载
|
||||
let res = await treeSecond({
|
||||
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||
|
@ -156,7 +163,6 @@ const loadNode = async (node: any, resolve: any) => {
|
|||
resolve(datanames);
|
||||
} else {
|
||||
resolve([{ name: "暂无数据", leaf: true }]);
|
||||
console.log(res); //需要将上一级的加号去掉
|
||||
}
|
||||
} else if (node.level === 5) {
|
||||
console.log(node.parent, node.level);
|
||||
|
@ -229,7 +235,7 @@ const emits = defineEmits(["update-node-key"]); ////接收父组件的事件,
|
|||
const handleTargetInfo = (data: TreeData, node: any) => {
|
||||
// targetInfo.resultArr = [];
|
||||
|
||||
console.log("zheshishaya111",node.level,data);
|
||||
console.log("点击的节点",node);
|
||||
|
||||
if (node.level === 4) {
|
||||
console.log(node.level,'0000',node.key);
|
||||
|
|
|
@ -399,8 +399,9 @@ const getAllSourceAjust = () => {
|
|||
};
|
||||
|
||||
sourcInfoApi(datainput).then((res) => {
|
||||
console.log(res, "可调资源");
|
||||
sourceAjustObj = res.data;
|
||||
// console.log(res, "可调资源");
|
||||
|
||||
handelSourceTable(res.data);
|
||||
// tablepvData.value=res?.data
|
||||
});
|
||||
};
|
||||
|
@ -436,6 +437,7 @@ const getTreeSourceList = async (id: string) => {
|
|||
};
|
||||
// 处理可调资源数量 功能---
|
||||
const handelSourceTable = (sourceAjustObj: any) => {
|
||||
|
||||
sourceLArr.forEach((item) => {
|
||||
// 将返回数据的length赋值给数组对象
|
||||
item.number = sourceAjustObj[item.type]?.length || 0;
|
||||
|
@ -461,6 +463,7 @@ let sourceLArr = reactive([
|
|||
]);
|
||||
|
||||
const handelSource = (type: string) => {
|
||||
|
||||
// 根据type类型获取表格数据
|
||||
tablepvData.value = [];
|
||||
for (let i in sourceAjustObj[type]) {
|
||||
|
@ -1432,6 +1435,7 @@ const styleVar = computed(() => {
|
|||
/* 矩形 */
|
||||
}
|
||||
.box {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
|
|
|
@ -393,7 +393,7 @@
|
|||
</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="tip">
|
||||
<img src="@/assets/images/mainPage/icon_alert_pv.png" alt="" />
|
||||
|
@ -408,14 +408,15 @@
|
|||
<div class="gaobottom">
|
||||
|
||||
<div class="gao">
|
||||
[编号:48776100381]台区55608(10kV 556线路)于2024-07-11 13:43:19发生反向重过载异常,负载率-32%。
|
||||
[编号:48776100419]台区55608(10kV 556线路)于2024-07-12 14:36:54发生功率倒送,反向负载率1.52%。
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 通知消息 -->
|
||||
<!-- <div class="content_center_alert" v-if="true">
|
||||
<div class="run_detail" v-if="true">
|
||||
|
|
Loading…
Reference in New Issue