lanjianrong 5 years ago
parent
commit
8e1c124dca

+ 22 - 11
src/pages/workbench/Dashboard/components/LeaderBoard.jsx

@@ -21,41 +21,49 @@ const LeaderBoard = ({ dataList = [] }) => {
         title: '排名',
         dataIndex: 'rank',
         valueType: 'indexBorder',
+        align: 'center',
         width: '30%'
       },
       {
         title: '姓名',
         dataIndex: `${activeOp}Name`,
+        align: 'center',
         width: '40%'
       },
       {
         title: '新增客户数',
         dataIndex: 'customer',
+        align: 'center',
         width: '30%'
       },
       {
         title: '客户服务',
         dataIndex: 'customerService',
+        align: 'center',
         width: '30%'
       },
       {
         title: '新增联系人',
         dataIndex: 'client',
+        align: 'center',
         width: '30%'
       },
       {
         title: '联系人服务',
         dataIndex: 'clientService',
+        align: 'center',
         width: '30%'
       },
       {
         title: '新增商机',
         dataIndex: 'business',
+        align: 'center',
         width: '30%'
       },
       {
         title: '商机服务',
         dataIndex: 'businessService',
+        align: 'center',
         width: '30%'
       }
     ]
@@ -79,7 +87,7 @@ const LeaderBoard = ({ dataList = [] }) => {
 
   return (
     <>
-      <div className="flex items-center justify-between">
+      <div className="px-4 pt-2 pb-0 flex items-center justify-between">
         <span>排行榜</span>
         <Select defaultValue="customer" onChange={e => setActiveOp(e)}>
           <Option value="customer">新增服务</Option>
@@ -92,16 +100,19 @@ const LeaderBoard = ({ dataList = [] }) => {
           <Option value="回款金额">回款金额</Option> */}
         </Select>
       </div>
-      <div className="text-center">{opMap[activeOp]}排行榜</div>
-      <ProTable
-        rowKey={record => record.rank}
-        columns={columns}
-        dataSource={dataList}
-        search={false}
-        size="small"
-        toolBarRender={false}
-        pagination={false}
-      />
+      <div className="text-center border border-x-0 mt-2 p-2">{opMap[activeOp]}排行榜</div>
+      <div className="">
+        <ProTable
+          border={true}
+          rowKey={record => record.rank}
+          columns={columns}
+          dataSource={dataList}
+          search={false}
+          size="small"
+          toolBarRender={false}
+          pagination={false}
+        />
+      </div>
     </>
   )
 }

+ 1 - 1
src/pages/workbench/Dashboard/index.jsx

@@ -386,7 +386,7 @@ const Dashboard = () => {
       <div className="mt-4">
         <Row gutter={16}>
           <Col className="gutter-row" span={12}>
-            <div className="p-4 pt-2 bg-white border rounded-lg shadow-card">
+            <div className="bg-white border rounded-lg shadow-card">
               <LeaderBoard dataList={state.leaderboard} />
             </div>
           </Col>