|
@@ -9,15 +9,34 @@ const Dashboard = () => {
|
|
|
const { Option } = Select
|
|
const { Option } = Select
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
reminderData: [],
|
|
reminderData: [],
|
|
|
- leaderboard: []
|
|
|
|
|
|
|
+ leaderboard: [],
|
|
|
|
|
+ clientChainRatio: {},
|
|
|
|
|
+ customerChainRatio: {},
|
|
|
|
|
+ businessChainRatio: {},
|
|
|
|
|
+ serviceLogChainRatio: {}
|
|
|
})
|
|
})
|
|
|
const initData = async payload => {
|
|
const initData = async payload => {
|
|
|
const {
|
|
const {
|
|
|
code = -1,
|
|
code = -1,
|
|
|
- data: { reminderData = [], leaderboard = [] } = { reminderData: [], leaderboard: [] }
|
|
|
|
|
|
|
+ data: {
|
|
|
|
|
+ reminderData = [],
|
|
|
|
|
+ leaderboard = [],
|
|
|
|
|
+ clientChainRatio = {},
|
|
|
|
|
+ customerChainRatio = {},
|
|
|
|
|
+ businessChainRatio = {},
|
|
|
|
|
+ serviceLogChainRatio = {}
|
|
|
|
|
+ }
|
|
|
} = await queryDashboard(payload)
|
|
} = await queryDashboard(payload)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
- setState({ ...state, reminderData, leaderboard })
|
|
|
|
|
|
|
+ setState({
|
|
|
|
|
+ ...state,
|
|
|
|
|
+ reminderData,
|
|
|
|
|
+ leaderboard,
|
|
|
|
|
+ clientChainRatio,
|
|
|
|
|
+ customerChainRatio,
|
|
|
|
|
+ businessChainRatio,
|
|
|
|
|
+ serviceLogChainRatio
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -56,15 +75,15 @@ const Dashboard = () => {
|
|
|
const columnsCustomer = [
|
|
const columnsCustomer = [
|
|
|
{
|
|
{
|
|
|
title: '排名',
|
|
title: '排名',
|
|
|
- dataIndex: 'search'
|
|
|
|
|
|
|
+ dataIndex: 'rank'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '姓名',
|
|
title: '姓名',
|
|
|
- dataIndex: 'staff_name'
|
|
|
|
|
|
|
+ dataIndex: 'clientStaffName'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '新增客户数',
|
|
title: '新增客户数',
|
|
|
- dataIndex: 'count'
|
|
|
|
|
|
|
+ dataIndex: 'clientCount'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
const uvBillData = [
|
|
const uvBillData = [
|
|
@@ -184,13 +203,19 @@ const Dashboard = () => {
|
|
|
<Col className="gutter-row" span={6}>
|
|
<Col className="gutter-row" span={6}>
|
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col span={6}>a</Col>
|
|
|
|
|
|
|
+ <Col span={6}>
|
|
|
|
|
+ <div className="w-48px h-48px border rounded-48px bg-[#0c7cd5] relative">
|
|
|
|
|
+ <span className="absolute top-9px left-9px">
|
|
|
|
|
+ <iconpark-icon name="city" size="26" />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Col>
|
|
|
<Col span={9}>
|
|
<Col span={9}>
|
|
|
- <h3 className="text-2xl">23</h3>
|
|
|
|
|
|
|
+ <h3 className="text-2xl">{state.customerChainRatio.count}</h3>
|
|
|
<span>新增客户</span>
|
|
<span>新增客户</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={9} className="text-right">
|
|
<Col span={9} className="text-right">
|
|
|
- <h3 className="text-xl text-green-500">+10%</h3>
|
|
|
|
|
|
|
+ <h3 className="text-xl text-green-500">{state.customerChainRatio.percentage}</h3>
|
|
|
<span>较上月</span>
|
|
<span>较上月</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -199,13 +224,19 @@ const Dashboard = () => {
|
|
|
<Col className="gutter-row" span={6}>
|
|
<Col className="gutter-row" span={6}>
|
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col span={6}>a</Col>
|
|
|
|
|
|
|
+ <Col span={6}>
|
|
|
|
|
+ <div className="w-48px h-48px border rounded-48px bg-[#0c7cd5] relative">
|
|
|
|
|
+ <span className="absolute top-10px left-10px">
|
|
|
|
|
+ <iconpark-icon name="address-book" size="26" />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Col>
|
|
|
<Col span={9}>
|
|
<Col span={9}>
|
|
|
- <h3 className="text-2xl">10</h3>
|
|
|
|
|
|
|
+ <h3 className="text-2xl">{state.clientChainRatio.count}</h3>
|
|
|
<span>新增联系人</span>
|
|
<span>新增联系人</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={9} className="text-right">
|
|
<Col span={9} className="text-right">
|
|
|
- <h3 className="text-xl text-red-500">-8%</h3>
|
|
|
|
|
|
|
+ <h3 className="text-xl text-red-500">{state.clientChainRatio.percentage}</h3>
|
|
|
<span>较上月</span>
|
|
<span>较上月</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -214,13 +245,19 @@ const Dashboard = () => {
|
|
|
<Col className="gutter-row" span={6}>
|
|
<Col className="gutter-row" span={6}>
|
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col span={6}>a</Col>
|
|
|
|
|
|
|
+ <Col span={6}>
|
|
|
|
|
+ <div className="w-48px h-48px border rounded-48px bg-[#0c7cd5] relative">
|
|
|
|
|
+ <span className="absolute top-10px left-10px">
|
|
|
|
|
+ <iconpark-icon name="finance" size="26" />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Col>
|
|
|
<Col span={9}>
|
|
<Col span={9}>
|
|
|
- <h3 className="text-2xl">5</h3>
|
|
|
|
|
|
|
+ <h3 className="text-2xl">{state.businessChainRatio.count}</h3>
|
|
|
<span>新增商机</span>
|
|
<span>新增商机</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={9} className="text-right">
|
|
<Col span={9} className="text-right">
|
|
|
- <h3 className="text-xl text-green-500">+10%</h3>
|
|
|
|
|
|
|
+ <h3 className="text-xl text-green-500">{state.businessChainRatio.percentage}</h3>
|
|
|
<span>较上月</span>
|
|
<span>较上月</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -229,13 +266,21 @@ const Dashboard = () => {
|
|
|
<Col className="gutter-row" span={6}>
|
|
<Col className="gutter-row" span={6}>
|
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
<div className="p-4 bg-white border rounded-lg">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col span={6}>a</Col>
|
|
|
|
|
|
|
+ <Col span={6}>
|
|
|
|
|
+ <div className="w-48px h-48px border rounded-48px bg-[#0c7cd5] relative">
|
|
|
|
|
+ <span className="absolute top-10px left-10px">
|
|
|
|
|
+ <iconpark-icon name="comment" size="26" />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Col>
|
|
|
<Col span={9}>
|
|
<Col span={9}>
|
|
|
- <h3 className="text-2xl">32</h3>
|
|
|
|
|
|
|
+ <h3 className="text-2xl">{state.serviceLogChainRatio.count}</h3>
|
|
|
<span>服务记录</span>
|
|
<span>服务记录</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={9} className="text-right">
|
|
<Col span={9} className="text-right">
|
|
|
- <h3 className="text-xl text-green-500">+10%</h3>
|
|
|
|
|
|
|
+ <h3 className="text-xl text-green-500">
|
|
|
|
|
+ {state.serviceLogChainRatio.percentage}
|
|
|
|
|
+ </h3>
|
|
|
<span>较上月</span>
|
|
<span>较上月</span>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|