|
@@ -45,7 +45,7 @@
|
|
|
<div class="warning-alarm yes-events" v-show="activeBaseTab === '预警分布'">
|
|
<div class="warning-alarm yes-events" v-show="activeBaseTab === '预警分布'">
|
|
|
<alarm-list></alarm-list>
|
|
<alarm-list></alarm-list>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="time-wrap yes-events">
|
|
|
|
|
|
|
+ <div v-show="activeBaseTab !== '农服管理'" class="time-wrap yes-events">
|
|
|
<time-line></time-line>
|
|
<time-line></time-line>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -769,17 +769,15 @@ const getNodeLevelInfo = (id) => {
|
|
|
if (root.id === id) {
|
|
if (root.id === id) {
|
|
|
return { level: 1, secondId: null };
|
|
return { level: 1, secondId: null };
|
|
|
}
|
|
}
|
|
|
- if (root.children) {
|
|
|
|
|
- for (const second of root.children) {
|
|
|
|
|
- if (second.id === id) {
|
|
|
|
|
- return { level: 2, secondId: second.id };
|
|
|
|
|
- }
|
|
|
|
|
- if (second.children) {
|
|
|
|
|
- for (const third of second.children) {
|
|
|
|
|
- if (third.id === id) {
|
|
|
|
|
- return { level: 3, secondId: second.id };
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const rootChildren = root.items || root.children || [];
|
|
|
|
|
+ for (const second of rootChildren) {
|
|
|
|
|
+ if (second.id === id) {
|
|
|
|
|
+ return { level: 2, secondId: second.id };
|
|
|
|
|
+ }
|
|
|
|
|
+ const secondChildren = second.items || second.children || [];
|
|
|
|
|
+ for (const third of secondChildren) {
|
|
|
|
|
+ if (third.id === id) {
|
|
|
|
|
+ return { level: 3, secondId: second.id };
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -811,14 +809,15 @@ const getTreeChecks = async (nodeData, data) => {
|
|
|
|
|
|
|
|
const roots = treeActionData.value || [];
|
|
const roots = treeActionData.value || [];
|
|
|
roots.forEach((root) => {
|
|
roots.forEach((root) => {
|
|
|
- (root.children || []).forEach((second) => {
|
|
|
|
|
|
|
+ const rootChildren = root.items || root.children || [];
|
|
|
|
|
+ rootChildren.forEach((second) => {
|
|
|
if (second.id !== currentSecondId) {
|
|
if (second.id !== currentSecondId) {
|
|
|
// 取消其它二级及其所有子级勾选
|
|
// 取消其它二级及其所有子级勾选
|
|
|
tree.setChecked(second.id, false, true);
|
|
tree.setChecked(second.id, false, true);
|
|
|
- } else {
|
|
|
|
|
- // 保持当前二级选中,子级按用户选择
|
|
|
|
|
- tree.setChecked(second.id, true, false);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ // 对于当前二级节点,不手动设置其选中状态
|
|
|
|
|
+ // 让 Element Plus 根据子节点的选中状态自动计算半选中状态
|
|
|
|
|
+ // 这样当部分三级节点被选中时,二级节点会自动显示半选中状态
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|