|
|
@@ -40,11 +40,6 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
if (groupList) {
|
|
|
const group = groupList[0]
|
|
|
if (group) {
|
|
|
- console.log(
|
|
|
- group.items
|
|
|
- ?.filter(item => !item.endProcess)
|
|
|
- ?.map(item => ({ ...item, percentage: parseInt(item.percentage, 10) }))
|
|
|
- )
|
|
|
setState({
|
|
|
...state,
|
|
|
params: { ...state.params, businessGroupId: group.value },
|
|
|
@@ -142,10 +137,14 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
xField: 'name',
|
|
|
yField: 'count',
|
|
|
shape: 'pyramid',
|
|
|
- conversionTag: false
|
|
|
+ conversionTag: false,
|
|
|
+ dynamicHeight: true
|
|
|
}
|
|
|
- const handleOnPermChange = ({ staffIds, dataPermission }) =>
|
|
|
+ const handleOnPermChange = ({ staffIds, dataPermission }) => {
|
|
|
setState({ ...state, groupParams: { ...state.groupParams, staffIds, dataPermission } })
|
|
|
+ initGroupList({ staffIds, dataPermission })
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<div className="h-full w-full flex flex-row justify-between">
|
|
|
<div className="h-full w-3/20 rounded-4px shadow-card">
|
|
|
@@ -159,7 +158,7 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
bordered={false}
|
|
|
options={groupList}
|
|
|
defaultValue={groupList[0]?.value}
|
|
|
- onChange={(id, option) => {
|
|
|
+ onChange={async (id, option) => {
|
|
|
setState({
|
|
|
...state,
|
|
|
params: { ...state.params, businessGroupId: id },
|
|
|
@@ -174,7 +173,7 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
</div>
|
|
|
<div className="p-4 bg-white " style={{ height: 'calc(100% - 1rem*2 - 20px)' }}>
|
|
|
<div className="max-h-1/3">
|
|
|
- <Funnel data={state.funnelData} {...conifg} />
|
|
|
+ {state.funnelData?.length && <Funnel data={state.funnelData} {...conifg} />}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|