|
@@ -170,12 +170,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
type: 'staff/fetchDepartments'
|
|
type: 'staff/fetchDepartments'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- }, [
|
|
|
|
|
- state.params.businessGroupId,
|
|
|
|
|
- state.params.dataPermission,
|
|
|
|
|
- state.params.cyclical,
|
|
|
|
|
- state.params.staffIds
|
|
|
|
|
- ])
|
|
|
|
|
|
|
+ }, [state.params.businessGroupId, state.params.dataPermission, state.params.cyclical, state.params.staffIds])
|
|
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
@@ -188,8 +183,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-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -200,8 +194,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-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -212,8 +205,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-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -224,20 +216,18 @@ 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-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '6个月',
|
|
|
|
|
- dataIndex: 'month6',
|
|
|
|
|
|
|
+ title: '9个月',
|
|
|
|
|
+ dataIndex: 'month9',
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
<span
|
|
<span
|
|
|
- onClick={() => handleReminderList(record.type, '6month')}
|
|
|
|
|
- className="text-primary cursor-pointer hover:text-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ onClick={() => handleReminderList(record.type, '9month')}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -250,8 +240,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (_, record) => (
|
|
render: (_, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, 'expiry')}
|
|
onClick={() => handleReminderList(record.type, 'expiry')}
|
|
|
- className="text-primary cursor-pointer hover:text-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{record.remind.expiry}
|
|
{record.remind.expiry}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -262,9 +251,8 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
render: (_, record) => (
|
|
render: (_, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => handleReminderList(record.type, 'unexpired')}
|
|
onClick={() => handleReminderList(record.type, 'unexpired')}
|
|
|
- className="text-primary cursor-pointer hover:text-hex-967bbd"
|
|
|
|
|
- >
|
|
|
|
|
- {record.remind.expiry}
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
|
|
+ {record.remind.unexpired}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
@@ -409,8 +397,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
'relative',
|
|
'relative',
|
|
|
'cursor-pointer',
|
|
'cursor-pointer',
|
|
|
state.selectId === item.id ? styles.imgBg : styles.paddingBg
|
|
state.selectId === item.id ? styles.imgBg : styles.paddingBg
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ].join(' ')}>
|
|
|
<img
|
|
<img
|
|
|
className="w-full max-w-30px h-30px border rounded-30px"
|
|
className="w-full max-w-30px h-30px border rounded-30px"
|
|
|
src={
|
|
src={
|
|
@@ -445,19 +432,14 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
<span
|
|
<span
|
|
|
className={[
|
|
className={[
|
|
|
'text-xl',
|
|
'text-xl',
|
|
|
- state.clientChainRatio.percentage.startsWith('-')
|
|
|
|
|
- ? 'text-green-500'
|
|
|
|
|
- : 'text-red-500'
|
|
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ state.clientChainRatio.percentage.startsWith('-') ? 'text-green-500' : 'text-red-500'
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.clientChainRatio.percentage}
|
|
{state.clientChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="flex justify-between items-center">
|
|
<div className="flex justify-between items-center">
|
|
|
<div>新增客户</div>
|
|
<div>新增客户</div>
|
|
|
- <span>
|
|
|
|
|
- {cyclicalOp.find(item => item.value === state.params.cyclical)?.title}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span>{cyclicalOp.find(item => item.value === state.params.cyclical)?.title}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -469,10 +451,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
{state.loading ? (
|
|
{state.loading ? (
|
|
|
<Skeleton active avatar />
|
|
<Skeleton active avatar />
|
|
|
) : (
|
|
) : (
|
|
|
- <Row
|
|
|
|
|
- className="cursor-pointer"
|
|
|
|
|
- onClick={() => handleRatioCard(cardTypeMap.COMPANY)}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Row className="cursor-pointer" 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" />
|
|
@@ -484,20 +463,15 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
<span
|
|
<span
|
|
|
className={[
|
|
className={[
|
|
|
'text-xl',
|
|
'text-xl',
|
|
|
- state.customerChainRatio.percentage.startsWith('-')
|
|
|
|
|
- ? 'text-green-500'
|
|
|
|
|
- : 'text-red-500'
|
|
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ state.customerChainRatio.percentage.startsWith('-') ? 'text-green-500' : 'text-red-500'
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.customerChainRatio.percentage}
|
|
{state.customerChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="flex justify-between items-center">
|
|
<div className="flex justify-between items-center">
|
|
|
<div>新增单位</div>
|
|
<div>新增单位</div>
|
|
|
- <span>
|
|
|
|
|
- {cyclicalOp.find(item => item.value === state.params.cyclical)?.title}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span>{cyclicalOp.find(item => item.value === state.params.cyclical)?.title}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -547,10 +521,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
{state.loading ? (
|
|
{state.loading ? (
|
|
|
<Skeleton active avatar />
|
|
<Skeleton active avatar />
|
|
|
) : (
|
|
) : (
|
|
|
- <Row
|
|
|
|
|
- onClick={() => handleRatioCard(cardTypeMap.SERVICE)}
|
|
|
|
|
- className="cursor-pointer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Row onClick={() => handleRatioCard(cardTypeMap.SERVICE)} 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" />
|
|
@@ -562,20 +533,15 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
<span
|
|
<span
|
|
|
className={[
|
|
className={[
|
|
|
'text-xl',
|
|
'text-xl',
|
|
|
- state.serviceLogChainRatio.percentage.startsWith('-')
|
|
|
|
|
- ? 'text-green-500'
|
|
|
|
|
- : 'text-red-500'
|
|
|
|
|
- ].join(' ')}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ state.serviceLogChainRatio.percentage.startsWith('-') ? 'text-green-500' : 'text-red-500'
|
|
|
|
|
+ ].join(' ')}>
|
|
|
{state.serviceLogChainRatio.percentage}
|
|
{state.serviceLogChainRatio.percentage}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className="flex justify-between items-center">
|
|
<div className="flex justify-between items-center">
|
|
|
<div>服务记录</div>
|
|
<div>服务记录</div>
|
|
|
- <span>
|
|
|
|
|
- {cyclicalOp.find(item => item.value === state.params.cyclical)?.title}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span>{cyclicalOp.find(item => item.value === state.params.cyclical)?.title}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -600,8 +566,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>个,服务
|
|
@@ -628,10 +593,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
|
|
|
<LeaderBoard dataList={state.leaderboard} loading={state.loading} />
|
|
<LeaderBoard dataList={state.leaderboard} loading={state.loading} />
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col xs={24} sm={24} md={24} lg={12} xl={12}>
|
|
<Col xs={24} sm={24} md={24} lg={12} xl={12}>
|
|
|
- <SoftLeaderboard
|
|
|
|
|
- productLeaderBoard={state.productLeaderBoard}
|
|
|
|
|
- loading={state.loading}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <SoftLeaderboard productLeaderBoard={state.productLeaderBoard} loading={state.loading} />
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
|
</div>
|
|
</div>
|