Explorar o código

Merge branch 'dev' of http://192.168.1.41:3000/outaozhen/cldV2react into dev

outaozhen %!s(int64=4) %!d(string=hai) anos
pai
achega
62a8dfefef

+ 3 - 2
src/components/RightContent/AvatarDropdown.tsx

@@ -9,6 +9,7 @@ import styles from './index.less'
 import { clearAuthCache, removeToken } from '@/utils/auth'
 import ws from '@/utils/ws'
 import { isDevMode } from '@/utils/env'
+import consts from '@/consts'
 
 export type GlobalHeaderRightProps = {
   menu?: boolean
@@ -52,8 +53,8 @@ const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
           onOk: () => {
             // 清除AuthCache
             removeToken()
-            loginOut()
             setInitialState({ ...initialState, currentUser: undefined, roles: [], permData: {} })
+            loginOut()
             return
           }
         })
@@ -101,7 +102,7 @@ const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
           className={styles.avatar}
           src={
             (isDevMode() ? 'http://cld2qa.com' : 'http://zhcld.com') +
-            (currentUser?.avatar ? currentUser.avatar : '/global/img/avtra_2.jpg')
+            (currentUser?.avatar ?? consts.DEFAULT_AVATAR)
           }
           alt="avatar"
         />

+ 15 - 15
src/pages/Workbench/Dashboard/index.jsx

@@ -391,7 +391,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                   key={item.id}
                   onClick={() => handleStaffClick(item.id)}>
                   <img
-                    className="w-full max-w-30px h-30px border rounded-30px"
+                    className="w-full max-w-8 h-8 border rounded-4xl"
                     src={
                       (isDevMode() ? 'http://cld2qa.com' : 'http://zhcld.com') +
                       (item?.avatar ?? consts.DEFAULT_AVATAR)
@@ -405,13 +405,13 @@ const Dashboard = ({ dispatch, departments = [] }) => {
         <div className="enter-y">
           <Row gutter={[8, 8]}>
             <Col xs={24} sm={24} md={24} lg={8} xl={8}>
-              <div className="p-4 bg-white border rounded-2px border-hex-f0f0f0 shadow-card">
+              <div className="p-4 bg-white border rounded-sm border-hex-f0f0f0 shadow-card">
                 {state.loading ? (
                   <Skeleton active avatar />
                 ) : (
                   <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">
+                      <div className="w-full max-w-12 h-12 rounded-1/2 bg-hex-0c7cd5 flex items-center justify-center">
                         <AddressBook size="26" fill="#fff" />
                       </div>
                     </Col>
@@ -419,12 +419,12 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                       <div className="flex items-center justify-between ">
                         <div className="text-2xl">{state.clientChainRatio.count}</div>
                         <span
-                          className={[
+                          className={classNames(
                             'text-xl',
                             state.clientChainRatio.percentage.startsWith('-')
                               ? 'text-green-500'
                               : 'text-red-500'
-                          ].join(' ')}>
+                          )}>
                           {state.clientChainRatio.percentage}
                         </span>
                       </div>
@@ -444,7 +444,7 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                 ) : (
                   <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">
+                      <div className="w-full max-w-12 h-12 rounded-1/2 bg-hex-0c7cd5 flex items-center justify-center">
                         <City size="26" fill="#fff" />
                       </div>
                     </Col>
@@ -452,12 +452,12 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                       <div className="flex items-center justify-between ">
                         <div className="text-2xl">{state.customerChainRatio.count}</div>
                         <span
-                          className={[
+                          className={classNames(
                             'text-xl',
                             state.customerChainRatio.percentage.startsWith('-')
                               ? 'text-green-500'
                               : 'text-red-500'
-                          ].join(' ')}>
+                          )}>
                           {state.customerChainRatio.percentage}
                         </span>
                       </div>
@@ -510,13 +510,13 @@ const Dashboard = ({ dispatch, departments = [] }) => {
             </div>
           </Col> */}
             <Col xs={24} sm={24} md={24} lg={8} xl={8}>
-              <div className="p-4 bg-white border rounded-2px border-hex-f0f0f0 shadow-card">
+              <div className="p-4 bg-white border rounded-sm border-hex-f0f0f0 shadow-card">
                 {state.loading ? (
                   <Skeleton active avatar />
                 ) : (
                   <Row onClick={() => handleRatioCard(cardTypeMap.SERVICE)} className="cursor-pointer">
                     <Col span={6}>
-                      <div className="w-full max-w-48px h-48px border rounded-48px bg-[#0c7cd5] flex items-center justify-center">
+                      <div className="w-full max-w-12 h-12 rounded-1/2 bg-hex-0c7cd5 flex items-center justify-center">
                         <Comment size="26" fill="#fff" />
                       </div>
                     </Col>
@@ -524,12 +524,12 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                       <div className="flex items-center justify-between ">
                         <div className="text-2xl">{state.serviceLogChainRatio.count}</div>
                         <span
-                          className={[
+                          className={classNames(
                             'text-xl',
                             state.serviceLogChainRatio.percentage.startsWith('-')
                               ? 'text-green-500'
                               : 'text-red-500'
-                          ].join(' ')}>
+                          )}>
                           {state.serviceLogChainRatio.percentage}
                         </span>
                       </div>
@@ -563,15 +563,15 @@ const Dashboard = ({ dispatch, departments = [] }) => {
                 bodyStyle={{ padding: state.loading ? '24px' : 0 }}
                 loading={state.loading}>
                 <ul>
-                  <li className="px-12px py-16px border-b-1">
+                  <li className="px-3 py-3 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">
+                  <li className="px-3 py-3 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">
+                  <li className="px-3 py-3">
                     新增商机<b className="px-1">{state.aggregation.businessCount}</b>个,金额
                     <b className="px-1">{state.aggregation.businessSum}</b> 元,服务
                     <b className="px-1">{state.aggregation.businessServiceCount}</b>