|
|
|
|
17
|
const [visible, setVisible] = useState(false);
|
17
|
const [visible, setVisible] = useState(false);
|
18
|
const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择' })
|
18
|
const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择' })
|
19
|
const getGroupTitle = val => {
|
19
|
const getGroupTitle = val => {
|
20
|
- console.log(val, (list.filter(x => x.drainageId == val)[0] || {}).name, '========')
|
|
|
21
|
return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
|
20
|
return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
|
22
|
}
|
21
|
}
|
23
|
const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
|
22
|
const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
|
|
|
|
|
35
|
},
|
34
|
},
|
36
|
}).then(data => {
|
35
|
}).then(data => {
|
37
|
const getGroupTitle = val => {
|
36
|
const getGroupTitle = val => {
|
38
|
- console.log(val, (data.records.filter(x => x.drainageId == val)[0] || {}).name, '========')
|
|
|
39
|
return (data.records.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
|
37
|
return (data.records.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
|
40
|
}
|
38
|
}
|
41
|
const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
|
39
|
const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
|