Sfoglia il codice sorgente

feat: 服务提醒弹窗相关

outaozhen 5 anni fa
parent
commit
a5ed71a2d9

+ 57 - 0
src/pages/workbench/Dashboard/components/ReminderList/index.jsx

@@ -0,0 +1,57 @@
+import React from 'react'
+import ProTable from '@ant-design/pro-table'
+
+const ReminderList = () => {
+  const columns = [
+    {
+      title: '客户名称',
+      dataIndex: 'staffName'
+    },
+    {
+      title: '地区',
+      dataIndex: 'districtName'
+    },
+    {
+      title: '电话',
+      dataIndex: 'phone'
+    },
+    {
+      title: '手机',
+      dataIndex: 'telephone'
+    },
+    {
+      title: '重要联系人',
+      dataIndex: 'companyName'
+    },
+    {
+      title: '联系人',
+      dataIndex: 'clientName'
+    },
+    {
+      title: '上一次服务',
+      dataIndex: 'createTime'
+    },
+    {
+      title: '服务内容',
+      dataIndex: 'mark'
+    },
+    {
+      title: '服务提醒',
+      dataIndex: 'serviceTime'
+    }
+  ]
+  return (
+    <div>
+      <ProTable
+        rowKey={record => record.rank}
+        columns={columns}
+        // dataSource={}
+        search={false}
+        toolBarRender={false}
+        pagination={false}
+      />
+    </div>
+  )
+}
+
+export default ReminderList

+ 87 - 79
src/pages/workbench/Dashboard/index.jsx

@@ -15,7 +15,9 @@ const Dashboard = () => {
     customerChainRatio: {},
     businessChainRatio: {},
     serviceLogChainRatio: {},
-    aggregation: {}
+    aggregation: {},
+    char: [],
+    thread: []
   })
   const initData = async payload => {
     const {
@@ -27,7 +29,9 @@ const Dashboard = () => {
         customerChainRatio = {},
         businessChainRatio = {},
         serviceLogChainRatio = {},
-        aggregation = {}
+        aggregation = {},
+        char = [],
+        thread = []
       }
     } = await queryDashboard(payload)
     if (code === consts.RET_CODE.SUCCESS) {
@@ -39,7 +43,9 @@ const Dashboard = () => {
         customerChainRatio,
         businessChainRatio,
         serviceLogChainRatio,
-        aggregation
+        aggregation,
+        char,
+        thread
       })
     }
   }
@@ -91,82 +97,84 @@ const Dashboard = () => {
       dataIndex: 'clientCount'
     }
   ]
-  const uvBillData = [
-    {
-      time: '验证阶段',
-      value: 350,
-      type: '上个月'
-    },
-    {
-      time: '开发阶段',
-      value: 900,
-      type: '上个月'
-    },
-    {
-      time: '提案阶段',
-      value: 300,
-      type: '上个月'
-    },
-    {
-      time: '赢单',
-      value: 450,
-      type: '上个月'
-    },
-    {
-      time: '输单',
-      value: 470,
-      type: '上个月'
-    },
-    {
-      time: '验证阶段',
-      value: 220,
-      type: '本月'
-    },
-    {
-      time: '开发阶段',
-      value: 300,
-      type: '本月'
-    },
-    {
-      time: '提案阶段',
-      value: 250,
-      type: '本月'
-    },
-    {
-      time: '赢单',
-      value: 220,
-      type: '本月'
-    },
-    {
-      time: '输单',
-      value: 362,
-      type: '本月'
-    }
-  ]
-  const transformData = [
-    {
-      time: '验证阶段',
-      增幅: 800
-    },
-    {
-      time: '开发阶段',
-      增幅: 600
-    },
-    {
-      time: '提案阶段',
-      增幅: 400
-    },
-    {
-      time: '赢单',
-      增幅: 380
-    },
-    {
-      time: '输单',
-      增幅: 220
-    }
-  ]
+  const charData = state.char
+  const threadData = state.thread
+  // const uvBillData = [
+  //   {
+  //     time: '验证阶段',
+  //     value: 350,
+  //     type: '上个月'
+  //   },
+  //   {
+  //     time: '开发阶段',
+  //     value: 900,
+  //     type: '上个月'
+  //   },
+  //   {
+  //     time: '提案阶段',
+  //     value: 300,
+  //     type: '上个月'
+  //   },
+  //   {
+  //     time: '赢单',
+  //     value: 450,
+  //     type: '上个月'
+  //   },
+  //   {
+  //     time: '输单',
+  //     value: 470,
+  //     type: '上个月'
+  //   },
+  //   {
+  //     time: '验证阶段',
+  //     value: 220,
+  //     type: '本月'
+  //   },
+  //   {
+  //     time: '开发阶段',
+  //     value: 300,
+  //     type: '本月'
+  //   },
+  //   {
+  //     time: '提案阶段',
+  //     value: 250,
+  //     type: '本月'
+  //   },
+  //   {
+  //     time: '赢单',
+  //     value: 220,
+  //     type: '本月'
+  //   },
+  //   {
+  //     time: '输单',
+  //     value: 362,
+  //     type: '本月'
+  //   }
+  // ]
+  // const transformData = [
+  //   {
+  //     time: '验证阶段',
+  //     增幅: 800
+  //   },
+  //   {
+  //     time: '开发阶段',
+  //     增幅: 600
+  //   },
+  //   {
+  //     time: '提案阶段',
+  //     增幅: 400
+  //   },
+  //   {
+  //     time: '赢单',
+  //     增幅: 380
+  //   },
+  //   {
+  //     time: '输单',
+  //     增幅: 220
+  //   }
+  // ]
   const config = {
-    data: [uvBillData, transformData],
+    data: [charData, threadData],
     height: 230,
     xField: 'time',
     yField: ['value', '增幅'],
@@ -189,7 +197,7 @@ const Dashboard = () => {
       <div>
         <ProTable
           bordered
-          rowKey={record => record.day7 + Date.now()}
+          rowKey={record => record.day15 + Date.now()}
           columns={columns}
           dataSource={state.reminderData}
           search={false}