修改了从养护站页面跳转过去是 筛选逻辑
This commit is contained in:
parent
4001c4942f
commit
8488a2c547
@ -456,8 +456,8 @@ export default () => {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
const visibleNodes = getFilteredVisibleNodes()
|
||||
if (visibleNodes.length === 2) {
|
||||
handleAutoClickNode(visibleNodes[1])
|
||||
if (visibleNodes.length === 3) {
|
||||
handleAutoClickNode(visibleNodes[0])
|
||||
}
|
||||
}, 100) // 增加 100ms 延迟确保过滤完成
|
||||
})
|
||||
|
||||
@ -162,6 +162,7 @@ const handleNodeClick = (data, node) => {
|
||||
console.log('你点击的是全部')
|
||||
yhzid.value = ''; // 重置养护站id
|
||||
qxmc.value = ''; // 重置区县名称
|
||||
yhzData.value = null; // 重置养护站信息
|
||||
return;
|
||||
};
|
||||
// if (data.type === 'area' && node.expanded === false) {
|
||||
@ -174,12 +175,18 @@ const handleNodeClick = (data, node) => {
|
||||
console.log('你点击的是区县', data.rawName)
|
||||
yhzid.value = ''; // 重置养护站id
|
||||
qxmc.value = data.rawName; // 保存区县名称
|
||||
yhzData.value = null; // 重置养护站信息
|
||||
return;
|
||||
}
|
||||
if (data.type === 'site') {
|
||||
console.log('你点击的是站点', data.name)
|
||||
yhzid.value = data.id; // 保存养护站id
|
||||
qxmc.value = ''; // 重置区县名称
|
||||
yhzData.value = {
|
||||
jd: data.jd,
|
||||
wd: data.wd,
|
||||
rawName: data.rawName,
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
@ -448,8 +455,8 @@ export default () => {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
const visibleNodes = getFilteredVisibleNodes()
|
||||
if (visibleNodes.length === 2) {
|
||||
handleAutoClickNode(visibleNodes[1])
|
||||
if (visibleNodes.length === 3) {
|
||||
handleAutoClickNode(visibleNodes[0])
|
||||
}
|
||||
}, 100) // 增加 100ms 延迟确保过滤完成
|
||||
})
|
||||
|
||||
@ -403,8 +403,8 @@ export default () => {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
const visibleNodes = getFilteredVisibleNodes()
|
||||
if (visibleNodes.length === 2) {
|
||||
handleAutoClickNode(visibleNodes[1])
|
||||
if (visibleNodes.length === 3) {
|
||||
handleAutoClickNode(visibleNodes[0])
|
||||
}
|
||||
}, 100) // 增加 100ms 延迟确保过滤完成
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user