故障树样式更新
This commit is contained in:
parent
7ed4513eef
commit
4a51a510c5
@ -97,7 +97,7 @@ public class IPCFaultTreeTask{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// System.err.println(treeNode);
|
// System.err.println(treeNode);
|
||||||
insertNode(treeNode.getChild().get(0), 1L);
|
insertNode(treeNode.getChild().get(0), 3L);
|
||||||
//5. 释放资源
|
//5. 释放资源
|
||||||
wb.close();
|
wb.close();
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ public class IPCFaultTreeTask{
|
|||||||
ipcFaultTreeConfig.setNodeName(node.getName());
|
ipcFaultTreeConfig.setNodeName(node.getName());
|
||||||
ipcFaultTreeConfig.setParentId(parentId);
|
ipcFaultTreeConfig.setParentId(parentId);
|
||||||
List<IpcEquipInfo> equipInfos = ipcEquipInfoService.selectIpcEquipInfoList(null);
|
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.setNodeDefaultColor("green");
|
||||||
ipcFaultTreeConfig.setNodeAlarmColor("red");
|
ipcFaultTreeConfig.setNodeAlarmColor("red");
|
||||||
ipcFaultTreeConfig.setStatus("0");
|
ipcFaultTreeConfig.setStatus("0");
|
||||||
|
@ -323,11 +323,11 @@ export default {
|
|||||||
width: 0;
|
width: 0;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
.vertical .org-chart-node-label {
|
.org-chart-node-label {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
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);
|
// box-shadow: 0 1px 10px rgba(31, 35, 41, 0.08);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -15,7 +15,10 @@
|
|||||||
'only-both-tree-node': node.level === 1 && tree.store.onlyBothTree,
|
'only-both-tree-node': node.level === 1 && tree.store.onlyBothTree,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<transition :duration="animateDuration" :name="animateName">
|
<transition
|
||||||
|
:duration="animateDuration"
|
||||||
|
:name="animateName"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="org-chart-node-left-children"
|
class="org-chart-node-left-children"
|
||||||
:style="{
|
:style="{
|
||||||
@ -56,7 +59,10 @@
|
|||||||
@click="handleBtnClick('left')"
|
@click="handleBtnClick('left')"
|
||||||
>
|
>
|
||||||
<template v-if="showNodeNum">
|
<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
|
node.level === 1 && leftChildNodes.length > 0
|
||||||
? leftChildNodes.length
|
? leftChildNodes.length
|
||||||
@ -64,7 +70,10 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<node-btn-content v-else :node="node">
|
<node-btn-content
|
||||||
|
v-else
|
||||||
|
:node="node"
|
||||||
|
>
|
||||||
<slot> </slot>
|
<slot> </slot>
|
||||||
</node-btn-content>
|
</node-btn-content>
|
||||||
</div>
|
</div>
|
||||||
@ -74,13 +83,15 @@
|
|||||||
:class="computeLabelClass"
|
:class="computeLabelClass"
|
||||||
:style="computeLabelStyle"
|
:style="computeLabelStyle"
|
||||||
>
|
>
|
||||||
<span class="label-innner" :style="computeInnerStyle">
|
<span
|
||||||
|
class="label-innner"
|
||||||
|
:style="computeInnerStyle"
|
||||||
|
>
|
||||||
<node-content :node="node">
|
<node-content :node="node">
|
||||||
<slot>
|
<slot>
|
||||||
{{ node.label }}
|
{{ node.label }}
|
||||||
</slot>
|
</slot>
|
||||||
</node-content></span
|
</node-content></span>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="showNodeBtn && !isLeftChildNode"
|
v-if="showNodeBtn && !isLeftChildNode"
|
||||||
@ -89,18 +100,27 @@
|
|||||||
@click="handleBtnClick('right')"
|
@click="handleBtnClick('right')"
|
||||||
>
|
>
|
||||||
<template v-if="showNodeNum">
|
<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 }}
|
{{ node.childNodes.length }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<node-btn-content v-else :node="node">
|
<node-btn-content
|
||||||
|
v-else
|
||||||
|
:node="node"
|
||||||
|
>
|
||||||
<slot>
|
<slot>
|
||||||
<!-- <div class="org-chart-node-btn-text">10</div> -->
|
<!-- <div class="org-chart-node-btn-text">10</div> -->
|
||||||
</slot>
|
</slot>
|
||||||
</node-btn-content>
|
</node-btn-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition :duration="animateDuration" :name="animateName">
|
<transition
|
||||||
|
:duration="animateDuration"
|
||||||
|
:name="animateName"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="org-chart-node-children"
|
class="org-chart-node-children"
|
||||||
:style="{
|
:style="{
|
||||||
@ -279,7 +299,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 节点的宽度
|
// 节点的宽度
|
||||||
computeLabelStyle() {
|
computeLabelStyle() {
|
||||||
console.log("this.node", this.node);
|
// console.log("this.node", this.node);
|
||||||
let { labelWidth = "auto", labelHeight = "auto" } = this;
|
let { labelWidth = "auto", labelHeight = "auto" } = this;
|
||||||
if (typeof labelWidth === "number") {
|
if (typeof labelWidth === "number") {
|
||||||
labelWidth = `${labelWidth}px`;
|
labelWidth = `${labelWidth}px`;
|
||||||
|
@ -77,7 +77,6 @@ export default {
|
|||||||
this.expKeys.push(nodes[0].children[0].nodeId);
|
this.expKeys.push(nodes[0].children[0].nodeId);
|
||||||
this.updateParentStatusBasedOnLogic(nodes);
|
this.updateParentStatusBasedOnLogic(nodes);
|
||||||
this.treeData = nodes[0].children;
|
this.treeData = nodes[0].children;
|
||||||
const datalist = response.data;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user