故障树样式更新

This commit is contained in:
zhangjunwen 2024-04-18 19:16:42 +08:00
parent 7ed4513eef
commit 4a51a510c5
4 changed files with 34 additions and 15 deletions

View File

@ -97,7 +97,7 @@ public class IPCFaultTreeTask{
}
}
// System.err.println(treeNode);
insertNode(treeNode.getChild().get(0), 1L);
insertNode(treeNode.getChild().get(0), 3L);
//5. 释放资源
wb.close();
}
@ -110,7 +110,7 @@ public class IPCFaultTreeTask{
ipcFaultTreeConfig.setNodeName(node.getName());
ipcFaultTreeConfig.setParentId(parentId);
List<IpcEquipInfo> equipInfos = ipcEquipInfoService.selectIpcEquipInfoList(null);
ipcFaultTreeConfig.setEquipId(equipInfos.stream().filter(data -> data.getEquipNum().equals("KKZGG-T-001")).collect(Collectors.toList()).get(0).getId());
ipcFaultTreeConfig.setEquipId(equipInfos.stream().filter(data -> data.getEquipNum().equals("KKZGG-B-001")).collect(Collectors.toList()).get(0).getId());
ipcFaultTreeConfig.setNodeDefaultColor("green");
ipcFaultTreeConfig.setNodeAlarmColor("red");
ipcFaultTreeConfig.setStatus("0");

View File

@ -323,11 +323,11 @@ export default {
width: 0;
height: 20px;
}
.vertical .org-chart-node-label {
.org-chart-node-label {
position: relative;
display: inline-block;
}
.vertical .org-chart-node-label .org-chart-node-label-inner {
.org-chart-node-label .org-chart-node-label-inner {
// box-shadow: 0 1px 10px rgba(31, 35, 41, 0.08);
display: inline-block;
padding: 10px;

View File

@ -15,7 +15,10 @@
'only-both-tree-node': node.level === 1 && tree.store.onlyBothTree,
}"
>
<transition :duration="animateDuration" :name="animateName">
<transition
:duration="animateDuration"
:name="animateName"
>
<div
class="org-chart-node-left-children"
:style="{
@ -56,7 +59,10 @@
@click="handleBtnClick('left')"
>
<template v-if="showNodeNum">
<span v-if="!node.leftExpanded" class="org-chart-node-btn-text">
<span
v-if="!node.leftExpanded"
class="org-chart-node-btn-text"
>
{{
node.level === 1 && leftChildNodes.length > 0
? leftChildNodes.length
@ -64,7 +70,10 @@
}}
</span>
</template>
<node-btn-content v-else :node="node">
<node-btn-content
v-else
:node="node"
>
<slot> </slot>
</node-btn-content>
</div>
@ -74,13 +83,15 @@
:class="computeLabelClass"
:style="computeLabelStyle"
>
<span class="label-innner" :style="computeInnerStyle">
<span
class="label-innner"
:style="computeInnerStyle"
>
<node-content :node="node">
<slot>
{{ node.label }}
</slot>
</node-content></span
>
</node-content></span>
</div>
<div
v-if="showNodeBtn && !isLeftChildNode"
@ -89,18 +100,27 @@
@click="handleBtnClick('right')"
>
<template v-if="showNodeNum">
<span v-if="!node.expanded" class="org-chart-node-btn-text">
<span
v-if="!node.expanded"
class="org-chart-node-btn-text"
>
{{ node.childNodes.length }}
</span>
</template>
<node-btn-content v-else :node="node">
<node-btn-content
v-else
:node="node"
>
<slot>
<!-- <div class="org-chart-node-btn-text">10</div> -->
</slot>
</node-btn-content>
</div>
</div>
<transition :duration="animateDuration" :name="animateName">
<transition
:duration="animateDuration"
:name="animateName"
>
<div
class="org-chart-node-children"
:style="{
@ -279,7 +299,7 @@ export default {
},
//
computeLabelStyle() {
console.log("this.node", this.node);
// console.log("this.node", this.node);
let { labelWidth = "auto", labelHeight = "auto" } = this;
if (typeof labelWidth === "number") {
labelWidth = `${labelWidth}px`;

View File

@ -77,7 +77,6 @@ export default {
this.expKeys.push(nodes[0].children[0].nodeId);
this.updateParentStatusBasedOnLogic(nodes);
this.treeData = nodes[0].children;
const datalist = response.data;
this.loading = false;
});
},