|
|
@ -27,8 +27,8 @@ const Left = (props) => { |
|
|
|
const onChange = (e) => { |
|
|
|
const { value } = e.target; |
|
|
|
let keys = [] |
|
|
|
const newExpandedKeys = treeDataList.filter(e=> e.key.match(value)) |
|
|
|
newExpandedKeys.forEach(e=>{ |
|
|
|
const newExpandedKeys = treeDataList.filter(e => e.key.match(value)) |
|
|
|
newExpandedKeys.forEach(e => { |
|
|
|
keys.push(e.key) |
|
|
|
}) |
|
|
|
setExpandedKeys(keys); |
|
|
@ -66,12 +66,12 @@ const Left = (props) => { |
|
|
|
key: e.name, |
|
|
|
title: e.name, |
|
|
|
}) |
|
|
|
e.child.forEach(i=>{ |
|
|
|
e.child.forEach(i => { |
|
|
|
dataList.push({ |
|
|
|
key: i.name, |
|
|
|
title: i.name, |
|
|
|
}) |
|
|
|
i.child.forEach(s=>{ |
|
|
|
i.child.forEach(s => { |
|
|
|
dataList.push({ |
|
|
|
key: s.vehicleLicensePlateNumber, |
|
|
|
title: s.vehicleLicensePlateNumber, |
|
|
@ -103,18 +103,22 @@ const Left = (props) => { |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className='busList'> |
|
|
|
<Tree |
|
|
|
rootStyle={{ |
|
|
|
marginTop: '1%', |
|
|
|
background: 'none', |
|
|
|
borderColor: 'none', |
|
|
|
color: 'rgba(255, 255, 255, 1)' |
|
|
|
}} |
|
|
|
onExpand={onExpand} |
|
|
|
expandedKeys={expandedKeys} |
|
|
|
autoExpandParent={autoExpandParent} |
|
|
|
treeData={treeData} |
|
|
|
/> |
|
|
|
{ |
|
|
|
treeData.length > 0 ? |
|
|
|
<Tree |
|
|
|
rootStyle={{ |
|
|
|
marginTop: '1%', |
|
|
|
background: 'none', |
|
|
|
borderColor: 'none', |
|
|
|
color: 'rgba(255, 255, 255, 1)' |
|
|
|
}} |
|
|
|
onExpand={onExpand} |
|
|
|
expandedKeys={expandedKeys} |
|
|
|
autoExpandParent={autoExpandParent} |
|
|
|
treeData={treeData} |
|
|
|
/> : <div style={{width:'100%',color:'#fff',textAlign:'center',marginTop:'90%'}}>暂无数据</div> |
|
|
|
} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Module> |
|
|
|