Parcourir la source

style(Detail): 调整时间轴位置,限制最大高度

ZhaoJun il y a 1 an
Parent
commit
76346e440b
2 fichiers modifiés avec 25 ajouts et 28 suppressions
  1. 10 17
      src/pages/Detail/FlowModal.js
  2. 15 11
      src/pages/Detail/Index.js

+ 10 - 17
src/pages/Detail/FlowModal.js

@@ -384,21 +384,8 @@ function FlowModal(props) {
   };
 
   const getDescription = node => {
-    // let str = `审批人:${node.AuditorUser?.CName || '-'}`;
-    // if (node.desc) {
-    //   return (
-    //     <div>
-    //       {str}
-    //       <div>
-    //         <Tooltip title={node.desc}>
-    //           <span style={{ color: '#1A73E8', textDecoration: 'undeline' }}>审批意见</span>
-    //         </Tooltip>
-    //       </div>
-    //     </div>
-    //   );
-    // }
-    console.log(node);
-    let str = (
+    let str = `审批人:${node.AuditorUser?.CName || '-'}`;
+    return (
       <div>
         审批人:{node.AuditorUser?.CName || '-'}
         <div>
@@ -408,7 +395,6 @@ function FlowModal(props) {
         </div>
       </div>
     );
-    return str;
   };
 
   const filterState = () => {
@@ -559,7 +545,14 @@ function FlowModal(props) {
               />
             </div>
             {/* <Spin spinning={loading.global}> */}
-            <div style={{ display: 'flex', justifyContent: 'space-around' }}>
+            <div
+              style={{
+                display: 'flex',
+                justifyContent: 'space-around',
+                maxHeight: '300px',
+                overflow: 'auto',
+              }}
+            >
               {stepsData.map((item, idx) => (
                 <div key={`${item.name}_${idx}`} style={{ marginTop: '20px', display: 'inline' }}>
                   <div style={{ marginBottom: '4px' }}>{item.name}</div>

+ 15 - 11
src/pages/Detail/Index.js

@@ -574,17 +574,6 @@ function Detail(props) {
         />
       </div>
       <div style={{ display: 'flex' }}>
-        <TimeNode
-          flow={flow}
-          flowDetail={flowDetail}
-          isAuditor={isAuditor}
-          version={version}
-          templateId={templateId}
-          projectId={projectId}
-          setAuditVisible={setAuditVisible}
-          stepDirection="vertical"
-          style={{ maxWidth: '20%', display: 'inline', marginRight: '20px' }}
-        ></TimeNode>
         <div
           className={styles.content}
           style={{
@@ -625,6 +614,21 @@ function Detail(props) {
             version={version}
           />
         </div>
+        <TimeNode
+          flow={flow}
+          flowDetail={flowDetail}
+          isAuditor={isAuditor}
+          version={version}
+          templateId={templateId}
+          projectId={projectId}
+          setAuditVisible={setAuditVisible}
+          stepDirection="vertical"
+          style={{
+            maxWidth: '20%',
+            display: 'inline',
+            marginLeft: '20px',
+          }}
+        ></TimeNode>
       </div>
 
       <CommentContent