|
@@ -5,10 +5,12 @@ import { AddressBook, City, Finance, Comment } from '@icon-park/react'
|
|
|
import { DualAxes } from '@ant-design/charts'
|
|
import { DualAxes } from '@ant-design/charts'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import { queryDashboard } from '@/services/dashboard'
|
|
import { queryDashboard } from '@/services/dashboard'
|
|
|
|
|
+import ReminderList from './components/ReminderList'
|
|
|
|
|
|
|
|
const Dashboard = () => {
|
|
const Dashboard = () => {
|
|
|
const { Option } = Select
|
|
const { Option } = Select
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
|
|
+ visible: false,
|
|
|
reminderData: [],
|
|
reminderData: [],
|
|
|
leaderboard: [],
|
|
leaderboard: [],
|
|
|
clientChainRatio: {},
|
|
clientChainRatio: {},
|
|
@@ -19,6 +21,24 @@ const Dashboard = () => {
|
|
|
char: [],
|
|
char: [],
|
|
|
thread: []
|
|
thread: []
|
|
|
})
|
|
})
|
|
|
|
|
+ const [reminderList, setReminderList] = useState({
|
|
|
|
|
+ type: '',
|
|
|
|
|
+ visible: false,
|
|
|
|
|
+ loading: false
|
|
|
|
|
+ })
|
|
|
|
|
+ // 展示服务弹窗详情
|
|
|
|
|
+ const showModal = id => {
|
|
|
|
|
+ setReminderList({
|
|
|
|
|
+ children: (
|
|
|
|
|
+ <ReminderList
|
|
|
|
|
+ dataId={id}
|
|
|
|
|
+ loading={reminderList.loading}
|
|
|
|
|
+ visible={reminderList.visible}
|
|
|
|
|
+ onCancel={() => setReminderList({ ...reminderList, visible: false })}
|
|
|
|
|
+ />
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
const initData = async payload => {
|
|
const initData = async payload => {
|
|
|
const {
|
|
const {
|
|
|
code = -1,
|
|
code = -1,
|
|
@@ -59,7 +79,15 @@ const Dashboard = () => {
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '7天',
|
|
title: '7天',
|
|
|
- dataIndex: 'day7'
|
|
|
|
|
|
|
+ dataIndex: 'day7',
|
|
|
|
|
+ render: (name, record) => (
|
|
|
|
|
+ // console.log(record)
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showModal(record.day7)}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
|
|
+ {name}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '15天',
|
|
title: '15天',
|