Procházet zdrojové kódy

fix: 仪表盘客户和单位的位置调换

outaozhen před 5 roky
rodič
revize
0e18e891c7

+ 3 - 3
src/pages/workbench/Dashboard/components/LeaderBoard.jsx

@@ -99,11 +99,11 @@ const LeaderBoard = ({ loading = false, dataList = [] }) => {
       title={
         <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>
-            <Option value="customerService">单位服务</Option>
+          <Select defaultValue="client" onChange={e => setActiveOp(e)}>
             <Option value="client">新增客户</Option>
             <Option value="clientService">客户服务</Option>
+            <Option value="customer">新增单位</Option>
+            <Option value="customerService">单位服务</Option>
             <Option value="business">新增商机</Option>
             <Option value="businessService">商机服务</Option>
             {/* <Option value="开票金额">开票金额</Option>

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

@@ -254,30 +254,27 @@ const Dashboard = () => {
               {state.loading ? (
                 <Skeleton active avatar />
               ) : (
-                <Row
-                  className="cursor-pointer"
-                  onClick={() => handleRatioCard(cardTypeMap.COMPANY)}>
+                <Row className="cursor-pointer" onClick={() => handleRatioCard(cardTypeMap.CLIENT)}>
                   <Col span={6}>
                     <div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
-                      <City size="26" fill="#fff" />
+                      <AddressBook size="26" fill="#fff" />
                     </div>
                   </Col>
                   <Col span={18} flex="wrap">
                     <div className="flex items-center justify-between ">
-                      <div className="text-2xl">{state.customerChainRatio.count}</div>
+                      <div className="text-2xl">{state.clientChainRatio.count}</div>
                       <span
                         className={[
                           'text-xl',
-                          state.customerChainRatio.percentage.startsWith('-')
+                          state.clientChainRatio.percentage.startsWith('-')
                             ? 'text-green-500'
                             : 'text-red-500'
                         ].join(' ')}>
-                        {state.customerChainRatio.percentage}
+                        {state.clientChainRatio.percentage}
                       </span>
                     </div>
-
                     <div className="flex justify-between items-center">
-                      <div>新增单位</div>
+                      <div>新增客户</div>
                       <span>
                         {cyclicalOp.find(item => item.value === state.params.cyclical)?.title}
                       </span>
@@ -292,27 +289,30 @@ const Dashboard = () => {
               {state.loading ? (
                 <Skeleton active avatar />
               ) : (
-                <Row className="cursor-pointer" onClick={() => handleRatioCard(cardTypeMap.CLIENT)}>
+                <Row
+                  className="cursor-pointer"
+                  onClick={() => handleRatioCard(cardTypeMap.COMPANY)}>
                   <Col span={6}>
                     <div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
-                      <AddressBook size="26" fill="#fff" />
+                      <City size="26" fill="#fff" />
                     </div>
                   </Col>
                   <Col span={18} flex="wrap">
                     <div className="flex items-center justify-between ">
-                      <div className="text-2xl">{state.clientChainRatio.count}</div>
+                      <div className="text-2xl">{state.customerChainRatio.count}</div>
                       <span
                         className={[
                           'text-xl',
-                          state.clientChainRatio.percentage.startsWith('-')
+                          state.customerChainRatio.percentage.startsWith('-')
                             ? 'text-green-500'
                             : 'text-red-500'
                         ].join(' ')}>
-                        {state.clientChainRatio.percentage}
+                        {state.customerChainRatio.percentage}
                       </span>
                     </div>
+
                     <div className="flex justify-between items-center">
-                      <div>新增客户</div>
+                      <div>新增单位</div>
                       <span>
                         {cyclicalOp.find(item => item.value === state.params.cyclical)?.title}
                       </span>
@@ -419,13 +419,13 @@ const Dashboard = () => {
               loading={state.loading}>
               <ul>
                 <li className="px-12px py-16px border-b-1">
-                  新增单位<b className="px-1">{state.aggregation.customerCount}</b>个,服务
-                  <b className="px-1">{state.aggregation.customerServiceCount}</b>条
-                </li>
-                <li className="px-12px py-16px border-b-1">
                   新增客户<b className="px-1">{state.aggregation.clientCount}</b>个,服务
                   <b className="px-1">{state.aggregation.clientServiceCount}</b> 条
                 </li>
+                <li className="px-12px py-16px border-b-1">
+                  新增单位<b className="px-1">{state.aggregation.customerCount}</b>个,服务
+                  <b className="px-1">{state.aggregation.customerServiceCount}</b>条
+                </li>
                 <li className="px-12px py-16px">
                   新增商机<b className="px-1">{state.aggregation.businessCount}</b>个,金额
                   <b className="px-1">{state.aggregation.businessSum}</b> 元,服务