|
@@ -91,6 +91,9 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
setState({ ...state, staffList: list })
|
|
setState({ ...state, staffList: list })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ const queryStaffClick = id => {
|
|
|
|
|
+ setState({ ...state, params: { ...state.params, dataPermission: 'custom', staffIds: [id] } })
|
|
|
|
|
+ }
|
|
|
const initData = async payload => {
|
|
const initData = async payload => {
|
|
|
if (timer.current) clearTimeout(timer.current)
|
|
if (timer.current) clearTimeout(timer.current)
|
|
|
setState({ ...state, disabled: true })
|
|
setState({ ...state, disabled: true })
|
|
@@ -170,8 +173,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, '7day')}
|
|
onClick={() => handleReminderList(record.type, '7day')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -182,8 +184,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, '15day')}
|
|
onClick={() => handleReminderList(record.type, '15day')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -194,8 +195,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, '30day')}
|
|
onClick={() => handleReminderList(record.type, '30day')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -206,8 +206,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, '3month')}
|
|
onClick={() => handleReminderList(record.type, '3month')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -218,8 +217,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, '6month')}
|
|
onClick={() => handleReminderList(record.type, '6month')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -230,8 +228,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, 'reminder')}
|
|
onClick={() => handleReminderList(record.type, 'reminder')}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -314,7 +311,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
</span>
|
|
</span>
|
|
|
) : null}
|
|
) : null}
|
|
|
{state.staffList.map(item => (
|
|
{state.staffList.map(item => (
|
|
|
- <div className="ml-4" key={item.id}>
|
|
|
|
|
|
|
+ <div className="ml-4" key={item.id} onClick={queryStaffClick}>
|
|
|
<div className="relative w-30px h-30px rounded-1/2">
|
|
<div className="relative w-30px h-30px rounded-1/2">
|
|
|
<img
|
|
<img
|
|
|
src={
|
|
src={
|
|
@@ -349,8 +346,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
state.clientChainRatio.percentage.startsWith('-')
|
|
state.clientChainRatio.percentage.startsWith('-')
|
|
|
? 'text-green-500'
|
|
? 'text-green-500'
|
|
|
: 'text-red-500'
|
|
: 'text-red-500'
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.clientChainRatio.percentage}
|
|
{state.clientChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -372,8 +368,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
) : (
|
|
) : (
|
|
|
<Row
|
|
<Row
|
|
|
className="cursor-pointer"
|
|
className="cursor-pointer"
|
|
|
- onClick={() => handleRatioCard(cardTypeMap.COMPANY)}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ onClick={() => handleRatioCard(cardTypeMap.COMPANY)}>
|
|
|
<Col span={6}>
|
|
<Col span={6}>
|
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
|
<City size="26" fill="#fff" />
|
|
<City size="26" fill="#fff" />
|
|
@@ -388,8 +383,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
state.customerChainRatio.percentage.startsWith('-')
|
|
state.customerChainRatio.percentage.startsWith('-')
|
|
|
? 'text-green-500'
|
|
? 'text-green-500'
|
|
|
: 'text-red-500'
|
|
: 'text-red-500'
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.customerChainRatio.percentage}
|
|
{state.customerChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -412,8 +406,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
) : (
|
|
) : (
|
|
|
<Row
|
|
<Row
|
|
|
className="cursor-pointer"
|
|
className="cursor-pointer"
|
|
|
- onClick={() => handleRatioCard(cardTypeMap.BUSINESS)}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ onClick={() => handleRatioCard(cardTypeMap.BUSINESS)}>
|
|
|
<Col span={6}>
|
|
<Col span={6}>
|
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
|
<Finance size="26" fill="#fff" />
|
|
<Finance size="26" fill="#fff" />
|
|
@@ -428,8 +421,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
state.businessChainRatio.percentage.startsWith('-')
|
|
state.businessChainRatio.percentage.startsWith('-')
|
|
|
? 'text-green-500'
|
|
? 'text-green-500'
|
|
|
: 'text-red-500'
|
|
: 'text-red-500'
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.businessChainRatio.percentage}
|
|
{state.businessChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -452,8 +444,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
) : (
|
|
) : (
|
|
|
<Row
|
|
<Row
|
|
|
onClick={() => handleRatioCard(cardTypeMap.SERVICE)}
|
|
onClick={() => handleRatioCard(cardTypeMap.SERVICE)}
|
|
|
- className="cursor-pointer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="cursor-pointer">
|
|
|
<Col span={6}>
|
|
<Col span={6}>
|
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
<div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
|
|
|
<Comment size="26" fill="#fff" />
|
|
<Comment size="26" fill="#fff" />
|
|
@@ -468,8 +459,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
state.serviceLogChainRatio.percentage.startsWith('-')
|
|
state.serviceLogChainRatio.percentage.startsWith('-')
|
|
|
? 'text-green-500'
|
|
? 'text-green-500'
|
|
|
: 'text-red-500'
|
|
: 'text-red-500'
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.serviceLogChainRatio.percentage}
|
|
{state.serviceLogChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -503,8 +493,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
title="数据汇总"
|
|
title="数据汇总"
|
|
|
className="shadow-card"
|
|
className="shadow-card"
|
|
|
bodyStyle={{ padding: state.loading ? '24px' : 0 }}
|
|
bodyStyle={{ padding: state.loading ? '24px' : 0 }}
|
|
|
- loading={state.loading}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ loading={state.loading}>
|
|
|
<ul>
|
|
<ul>
|
|
|
<li className="px-12px py-16px border-b-1">
|
|
<li className="px-12px py-16px border-b-1">
|
|
|
新增客户<b className="px-1">{state.aggregation.clientCount}</b>个,服务
|
|
新增客户<b className="px-1">{state.aggregation.clientCount}</b>个,服务
|