outaozhen 5 yıl önce
ebeveyn
işleme
d8fdeceece

+ 4 - 3
src/pages/workbench/Dashboard/components/ReminderList/index.jsx

@@ -10,7 +10,7 @@ import styles from './index.less'
 
 
 const ReminderList = props => {
 const ReminderList = props => {
   const dispatch = useDispatch()
   const dispatch = useDispatch()
-  const { visible, dataId = '' } = props
+  const { visible, dataId = '', dataType, reminderCyclical } = props
   const [state, setState] = useState({
   const [state, setState] = useState({
     loading: false,
     loading: false,
     client: []
     client: []
@@ -25,8 +25,9 @@ const ReminderList = props => {
       setState({ ...state, client, loading: false })
       setState({ ...state, client, loading: false })
     }
     }
   }
   }
+  console.log(state.client)
   useEffect(() => {
   useEffect(() => {
-    visible && initData(dataId)
+    visible && initData(dataId, dataType, reminderCyclical)
   }, [visible])
   }, [visible])
 
 
   const closeModal = () => {
   const closeModal = () => {
@@ -83,7 +84,7 @@ const ReminderList = props => {
         <ProTable
         <ProTable
           rowKey={record => record.rank}
           rowKey={record => record.rank}
           columns={columns}
           columns={columns}
-          // dataSource={}
+          dataSource={state.client}
           search={false}
           search={false}
           toolBarRender={false}
           toolBarRender={false}
           pagination={false}
           pagination={false}

+ 61 - 6
src/pages/workbench/Dashboard/index.jsx

@@ -10,6 +10,19 @@ import ReminderList from './components/ReminderList'
 
 
 const Dashboard = () => {
 const Dashboard = () => {
   const { Option } = Select
   const { Option } = Select
+  const dataTypeNum = {
+    0: '联系人',
+    1: '客户',
+    2: '商机'
+  }
+  const reminderDayNum = {
+    3: '7day',
+    4: '15day',
+    5: '30day',
+    6: '3month',
+    7: '6month',
+    8: 'reminder'
+  }
   const [state, setState] = useState({
   const [state, setState] = useState({
     visible: false,
     visible: false,
     reminderData: [],
     reminderData: [],
@@ -27,7 +40,14 @@ const Dashboard = () => {
   const handleReminderList = id => {
   const handleReminderList = id => {
     setModalProps({
     setModalProps({
       width: '90vw',
       width: '90vw',
-      modalRender: node => <ReminderList dataId={id} node={node} />,
+      modalRender: node => (
+        <ReminderList
+          dataId={id}
+          node={node}
+          dataType={dataTypeNum[dataTypeNum]}
+          reminderCyclical={reminderDayNum[reminderDayNum]}
+        />
+      ),
       onCancel: () => toggleModal()
       onCancel: () => toggleModal()
     })
     })
     toggleModal()
     toggleModal()
@@ -84,23 +104,58 @@ const Dashboard = () => {
     },
     },
     {
     {
       title: '15天',
       title: '15天',
-      dataIndex: 'day15'
+      dataIndex: 'day15',
+      render: (name, record) => (
+        <span
+          onClick={() => handleReminderList(record.day15)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {name}
+        </span>
+      )
     },
     },
     {
     {
       title: '30天',
       title: '30天',
-      dataIndex: 'day15'
+      dataIndex: 'day15',
+      render: (name, record) => (
+        <span
+          onClick={() => handleReminderList(record.day15)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {name}
+        </span>
+      )
     },
     },
     {
     {
       title: '3个月',
       title: '3个月',
-      dataIndex: 'month3'
+      dataIndex: 'month3',
+      render: (name, record) => (
+        <span
+          onClick={() => handleReminderList(record.day15)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {name}
+        </span>
+      )
     },
     },
     {
     {
       title: '6个月',
       title: '6个月',
-      dataIndex: 'month6'
+      dataIndex: 'month6',
+      render: (name, record) => (
+        <span
+          onClick={() => handleReminderList(record.day15)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {name}
+        </span>
+      )
     },
     },
     {
     {
       title: '提醒逾期',
       title: '提醒逾期',
-      dataIndex: 'remind'
+      dataIndex: 'remind',
+      render: (name, record) => (
+        <span
+          onClick={() => handleReminderList(record.day15)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {name}
+        </span>
+      )
     }
     }
   ]
   ]
   const columnsCustomer = [
   const columnsCustomer = [