|
@@ -4,6 +4,7 @@ import { Row, Col, Divider, Select } from 'antd'
|
|
|
import { AddressBook, City, Finance, Comment } from '@icon-park/react'
|
|
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 { useModal } from '@/components/Modal'
|
|
|
import { queryDashboard } from '@/services/dashboard'
|
|
import { queryDashboard } from '@/services/dashboard'
|
|
|
import ReminderList from './components/ReminderList'
|
|
import ReminderList from './components/ReminderList'
|
|
|
|
|
|
|
@@ -21,23 +22,15 @@ const Dashboard = () => {
|
|
|
char: [],
|
|
char: [],
|
|
|
thread: []
|
|
thread: []
|
|
|
})
|
|
})
|
|
|
- const [reminderList, setReminderList] = useState({
|
|
|
|
|
- type: '',
|
|
|
|
|
- visible: false,
|
|
|
|
|
- loading: false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const { toggleModal, setReminderList } = useModal()
|
|
|
// 展示服务弹窗详情
|
|
// 展示服务弹窗详情
|
|
|
- const showModal = id => {
|
|
|
|
|
|
|
+ const handleReminderList = id => {
|
|
|
setReminderList({
|
|
setReminderList({
|
|
|
- children: (
|
|
|
|
|
- <ReminderList
|
|
|
|
|
- dataId={id}
|
|
|
|
|
- loading={reminderList.loading}
|
|
|
|
|
- visible={reminderList.visible}
|
|
|
|
|
- onCancel={() => setReminderList({ ...reminderList, visible: false })}
|
|
|
|
|
- />
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ width: '60vw',
|
|
|
|
|
+ modalRender: node => <ReminderList dataId={id} node={node} />,
|
|
|
|
|
+ onCancel: () => toggleModal()
|
|
|
})
|
|
})
|
|
|
|
|
+ toggleModal()
|
|
|
}
|
|
}
|
|
|
const initData = async payload => {
|
|
const initData = async payload => {
|
|
|
const {
|
|
const {
|
|
@@ -83,7 +76,7 @@ const Dashboard = () => {
|
|
|
render: (name, record) => (
|
|
render: (name, record) => (
|
|
|
// console.log(record)
|
|
// console.log(record)
|
|
|
<span
|
|
<span
|
|
|
- onClick={() => showModal(record.day7)}
|
|
|
|
|
|
|
+ onClick={() => handleReminderList(record.day7)}
|
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{name}
|
|
{name}
|
|
|
</span>
|
|
</span>
|