lanjianrong 4 years ago
parent
commit
267a48f5cf
1 changed files with 19 additions and 29 deletions
  1. 19 29
      src/pages/Workbench/Dashboard/index.jsx

+ 19 - 29
src/pages/Workbench/Dashboard/index.jsx

@@ -331,37 +331,27 @@ const Dashboard = ({ dispatch, departments = [] }) => {
             />
             />
           </span>
           </span>
         ) : null}
         ) : null}
-        <div>
+        <div className="flex items-center flex-row ml-2">
           {['all', 'department'].includes(state.params.dataPermission) &&
           {['all', 'department'].includes(state.params.dataPermission) &&
             state.staffList.map(item => (
             state.staffList.map(item => (
-              <div className="inline-block" key={item.id} onClick={() => handleStaffClick(item.id)}>
-                {state.selectId === item.id ? (
-                  <div className={['relative', 'cursor-pointer', styles.imgBg].join(' ')}>
-                    <img
-                      className="w-full max-w-30px h-30px border rounded-30px"
-                      src={
-                        (isDevMode() ? 'http://cld2qa.com' : 'http://zhcld.com') +
-                        (item?.avatar ? item.avatar : '/global/img/avtra_2.jpg')
-                      }
-                    />
-                    <span className={['absolute', styles.avtraName].join(' ')}>
-                      <span className={styles.bb}>{item.username}</span>
-                    </span>
-                  </div>
-                ) : (
-                  <div className={['relative', 'cursor-pointer', styles.paddingBg].join(' ')}>
-                    <img
-                      className="w-full max-w-30px h-30px border rounded-30px"
-                      src={
-                        (isDevMode() ? 'http://cld2qa.com' : 'http://zhcld.com') +
-                        (item?.avatar ? item.avatar : '/global/img/avtra_2.jpg')
-                      }
-                    />
-                    <span className={styles.avtraName}>
-                      <span className={styles.bb}>{item.username}</span>
-                    </span>
-                  </div>
-                )}
+              <div key={item.id} onClick={() => handleStaffClick(item.id)}>
+                <div
+                  className={[
+                    'relative',
+                    'cursor-pointer',
+                    state.selectId === item.id ? styles.imgBg : styles.paddingBg
+                  ].join(' ')}>
+                  <img
+                    className="w-full max-w-30px h-30px border rounded-30px"
+                    src={
+                      (isDevMode() ? 'http://cld2qa.com' : 'http://zhcld.com') +
+                      (item?.avatar ? item.avatar : '/global/img/avtra_2.jpg')
+                    }
+                  />
+                  <span className={['absolute', styles.avtraName].join(' ')}>
+                    <span className={styles.bb}>{item.username}</span>
+                  </span>
+                </div>
               </div>
               </div>
             ))}
             ))}
         </div>
         </div>