|
@@ -20,19 +20,12 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
funnelData: []
|
|
funnelData: []
|
|
|
})
|
|
})
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- if (!groupList.length) {
|
|
|
|
|
|
|
+ if (!groupList) {
|
|
|
dispatch({
|
|
dispatch({
|
|
|
type: 'business/fetchGroup'
|
|
type: 'business/fetchGroup'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- if (shouldUpdate) {
|
|
|
|
|
- tRef.current.reload()
|
|
|
|
|
- dispatch({
|
|
|
|
|
- type: 'refresh/commitAction',
|
|
|
|
|
- payload: 'business '
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- if (groupList.length) {
|
|
|
|
|
|
|
+ if (groupList) {
|
|
|
const group = groupList[0]
|
|
const group = groupList[0]
|
|
|
setState({
|
|
setState({
|
|
|
...state,
|
|
...state,
|
|
@@ -42,6 +35,11 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
?.map(item => ({ ...item, percentage: parseInt(item.percentage, 10) }))
|
|
?.map(item => ({ ...item, percentage: parseInt(item.percentage, 10) }))
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+ }, [groupList])
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ if (shouldUpdate) {
|
|
|
|
|
+ tRef.current.reload()
|
|
|
|
|
+ }
|
|
|
}, [loading, shouldUpdate])
|
|
}, [loading, shouldUpdate])
|
|
|
|
|
|
|
|
// 展示drawer
|
|
// 展示drawer
|
|
@@ -125,7 +123,8 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
xField: 'name',
|
|
xField: 'name',
|
|
|
yField: 'count',
|
|
yField: 'count',
|
|
|
legend: false,
|
|
legend: false,
|
|
|
- shape: 'pyramid'
|
|
|
|
|
|
|
+ shape: 'pyramid',
|
|
|
|
|
+ conversionTag: false
|
|
|
}
|
|
}
|
|
|
const { getScrollRef, redoHeight } = useTableScroll(columns)
|
|
const { getScrollRef, redoHeight } = useTableScroll(columns)
|
|
|
return (
|
|
return (
|
|
@@ -134,7 +133,7 @@ const Business = ({ dispatch, groupList, shouldUpdate, loading }) => {
|
|
|
<div className="p-4 border-b-1 border-solid border-black border-opacity-10 bg-[#f7f9fa] flex justify-around items-center">
|
|
<div className="p-4 border-b-1 border-solid border-black border-opacity-10 bg-[#f7f9fa] flex justify-around items-center">
|
|
|
<div className="w-1/2 text-md">商机漏斗</div>
|
|
<div className="w-1/2 text-md">商机漏斗</div>
|
|
|
<div className="w-1/2">
|
|
<div className="w-1/2">
|
|
|
- {groupList[0]?.value && (
|
|
|
|
|
|
|
+ {groupList && (
|
|
|
<Select
|
|
<Select
|
|
|
size="small"
|
|
size="small"
|
|
|
className="w-full"
|
|
className="w-full"
|