Explorar o código

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/gt_client_pad into develop

ZhaoJun hai 1 ano
pai
achega
2427a7b8ce

+ 2 - 2
src/components/PageContent/index.js

@@ -28,14 +28,14 @@ export default (props) => {
           <LeftOutlined
             onClick={handleReturn}
             className={styles.return}
-            style={{ top: tabs ? 42.5 : '' }}
+            style={{ top: tabs ? '0.4rem' : '' }}
           />
         )}
         {closeable && (
           <CloseCircleFilled
             onClick={handleClose}
             className={styles.close}
-            style={{ top: tabs ? 42.5 : '' }}
+            style={{ top: tabs ? '0.4rem' : '' }}
           />
         )}
 

+ 7 - 5
src/components/PageTitle/index.js

@@ -13,12 +13,16 @@ export default (props) => {
     }
   };
 
+  const isSubPage = returnable || onReturn;
+
   return (
     <div
-      className={`${styles.titleBox} ${tabs ? styles.tabs : ''}`}
+      className={`${styles.titleBox} ${tabs ? styles.tabs : ''} ${
+        isSubPage ? styles.subPage : ''
+      }`}
       onClick={handleOnClick}
     >
-      {returnable || onReturn ? (
+      {isSubPage && (
         <CaretLeftFilled
           style={{
             fontSize: '0.3rem',
@@ -27,13 +31,11 @@ export default (props) => {
             color: '#0139F1',
           }}
         />
-      ) : (
-        <span className={styles.titleBar} />
       )}
 
       {children && (
         <span
-          className={styles.title}
+          className={`${styles.title}`}
           style={returnable ? { cursor: 'pointer' } : null}
         >
           {children}

+ 17 - 8
src/components/PageTitle/index.less

@@ -1,6 +1,11 @@
 .titleBox {
   display: flex;
   align-items: center;
+  padding-bottom: 0.2rem;
+  border-bottom: 1px solid rgba(188, 186, 186, 1);
+}
+.subPage {
+  border-bottom: 0 none;
 }
 .titleBar {
   width: 0.07rem;
@@ -9,6 +14,17 @@
   float: left;
   margin-right: 0.1rem;
 }
+.subPage {
+  .title {
+    background: linear-gradient(
+      to bottom,
+      transparent 0%,
+      transparent 60%,
+      #ffe500 61%,
+      #ffe500 100%
+    );
+  }
+}
 .title {
   display: inline-block;
   padding: 0.05rem;
@@ -16,14 +32,7 @@
   font-size: 0.36rem;
   font-weight: 600;
   color: #0139f1;
-  line-height: 0.36rem;
-  background: linear-gradient(
-    to bottom,
-    transparent 0%,
-    transparent 60%,
-    #ffe500 61%,
-    #ffe500 100%
-  );
+  line-height: 0.32rem;
 }
 .tabs {
   position: absolute;

+ 1 - 1
src/global.less

@@ -145,7 +145,7 @@ input[type='reset'] {
 .card-box {
   border-radius: 0.4rem 0 0.4rem 0;
   background: #ffffff;
-  // box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
+  box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
 }
 .value-number {
   font-size: 0.8rem;

+ 1 - 1
src/pages/DeviceManager/index.js

@@ -120,7 +120,7 @@ const Device = ({ projectId }) => {
     {
       title: '保养人',
       dataIndex: 'Operators',
-      width: 300,
+      // width: 300,
       render: (text) => {
         let arr = [];
         if (text && text.length > 0) {

+ 5 - 2
src/pages/Home/index.js

@@ -261,9 +261,12 @@ const Scada = () => {
       title="工艺监控"
       onClick={() => UnityAction.sendMsg('menuItem', '工艺监控')}
     >
-      <div className={styles.scada}>
+      <div
+        className={styles.scada}
+        style={{ width: '5.7rem', height: '2.8rem' }}
+      >
         {data?.map((url) => (
-          <iframe style={{ width: '570px', height: '264px' }} src={url} />
+          <iframe style={{ width: '5.7rem', height: '2.8rem' }} src={url} />
         ))}
         <div className={styles.mask}></div>
       </div>

+ 6 - 6
src/pages/Smart/ConditionDetection.js

@@ -153,13 +153,13 @@ const ChartContent = ({ projectId }) => {
       tooltip: {
         trigger: 'axis',
         textStyle: {
-          fontSize: 24,
+          fontSize: 8,
         },
       },
       legend: {
         textStyle: {
           // color: '#fff',
-          fontSize: 18,
+          fontSize: 8,
         },
       },
       grid: {
@@ -173,10 +173,10 @@ const ChartContent = ({ projectId }) => {
         boundaryGap: false,
         data: data[0].list?.map((item) => item.name.split(' ')[1]),
         nameTextStyle: {
-          fontSize: 24,
+          fontSize: 8,
         },
         axisLabel: {
-          fontSize: 24,
+          fontSize: 8,
         },
       },
       yAxis: {
@@ -184,10 +184,10 @@ const ChartContent = ({ projectId }) => {
         boundaryGap: true,
         splitNumber: 5,
         nameTextStyle: {
-          fontSize: 24,
+          fontSize: 8,
         },
         axisLabel: {
-          fontSize: 24,
+          fontSize: 8,
         },
       },
       series: data.map((item) => ({

+ 0 - 1
src/pages/Smart/ConditionDetection.less

@@ -23,7 +23,6 @@
     margin: 0rem;
     margin-bottom: 0.1rem;
     padding: 0;
-    padding-left: 0.3rem;
     li {
       margin-bottom: 0.14rem;
       font-size: 0.23rem;

+ 1 - 1
src/pages/Smart/components/CircleScore.less

@@ -7,7 +7,7 @@
   width: 1.94rem;
   height: 1.94rem;
   .circle {
-    mask: radial-gradient(transparent, transparent 0.78rem, #000 0.78rem);
+    mask: radial-gradient(transparent, transparent 0.76rem, #000 0.78rem);
   }
 }
 

+ 3 - 5
src/pages/Smart/index.js

@@ -24,7 +24,7 @@ const Work = (props) => {
       <div className={styles.score}>
         <CircleScore big>
           {data?.score}
-          <div style={{ fontSize: 24 }}>{data?.grade}</div>
+          <div style={{ fontSize: '0.24rem' }}>{data?.grade}</div>
         </CircleScore>
         <div className={styles.scoreRight}>
           <h3>当前运行{data?.grade},可继续优化</h3>
@@ -33,7 +33,7 @@ const Work = (props) => {
           </div>
           {data?.score && (
             <Button
-              style={{ marginRight: 20 }}
+              style={{ marginRight: '0.2rem' }}
               className={styles.btn}
               type="primary"
               onClick={() =>
@@ -57,7 +57,7 @@ const Work = (props) => {
           </Button>
         </div>
       </div>
-      <Row gutter={40}>
+      <Row gutter={10}>
         <Col span={12}>
           <div className={styles.card}>
             <h3>进水数据</h3>
@@ -136,8 +136,6 @@ const Work = (props) => {
             </ul>
           </div>
         </Col>
-      </Row>
-      <Row gutter={16}>
         <Col span={12}>
           <div className={styles.card2} style={{ marginBottom: 0 }}>
             <h3>能耗数据</h3>

+ 2 - 2
src/pages/Smart/index.less

@@ -26,7 +26,6 @@
   }
   .btn {
     height: 0.66rem;
-    width: 1.34rem;
     font-size: 0.22rem;
   }
 }
@@ -34,10 +33,11 @@
 .card {
   border-radius: 0.08rem;
   box-shadow: 0rem 0rem 0.08rem 0.02rem rgba(191, 191, 191, 0.2);
-  padding: 0.24rem 0.2rem;
+  padding: 0.3rem ;
   border: 0.01rem solid #eee;
   background: rgb(255, 255, 255);
   margin-bottom: 0.4rem;
+  border-radius: 0.4rem 0 0.4rem 0;
 
   h3 {
     font-size: 0.3rem;

+ 12 - 8
src/pages/SmartReport/index.js

@@ -381,7 +381,7 @@ const SmartReport = () => {
                 <div
                   ref={eqDomRef}
                   style={{
-                    height: '8rem',
+                    height: '6rem',
                     width: 'calc(100% - 1.2rem)',
                     margin: '0 0 0 0.8rem',
                   }}
@@ -408,7 +408,7 @@ const SmartReport = () => {
                 <div
                   ref={workScoreDomRef}
                   style={{
-                    height: '8rem',
+                    height: '6rem',
                     width: 'calc(100% - 1.2rem)',
                     margin: '0 0 0 0.8rem',
                   }}
@@ -462,7 +462,7 @@ const SmartReport = () => {
                   <div
                     ref={taskDomRef}
                     style={{
-                      height: '4rem',
+                      height: '6rem',
                       width: '100%',
                       marginTop: '0.2rem',
                     }}
@@ -473,7 +473,7 @@ const SmartReport = () => {
                   <div
                     ref={workDomRef}
                     style={{
-                      height: '4rem',
+                      height: '6rem',
                       width: '100%',
                       marginTop: '0.2rem',
                     }}
@@ -523,22 +523,26 @@ const getPieOption = (chartData, isLeft = false) => {
           orient: 'vertical',
           left: 'left',
           top: 'center',
+          textStyle: {
+            color: '#000000',
+            fontSize: 12,
+          },
         }
       : {
           orient: 'horizontal',
-          // left: 'left',
           itemWidth: 10,
           itemHeight: 8,
           textStyle: {
             color: '#000000',
-            fontSize: 12,
+            fontSize: 10,
           },
         },
     series: [
       {
         type: 'pie',
-        top: isLeft ? 0 : '10%',
-        radius: isLeft ? '60%' : '50%',
+        top: isLeft ? 0 : '20%',
+        radius: isLeft ? '60%' : '40%',
+        label: isLeft ? {} : { fontSize: 10 },
         data: chartData,
         emphasis: {
           itemStyle: {

+ 3 - 1
src/pages/SmartReport/index.less

@@ -92,6 +92,7 @@
   background-image: -webkit-linear-gradient(#1755ff 0%, #ffffff 80%);
   box-shadow: 0.01rem 0.08rem 0.14rem 0rem rgba(0, 0, 0, 0.1);
   .main_in {
+    padding-top: 0.4rem;
     width: 100%;
     height: 100%;
     border-radius: 0.4rem 0.1rem 0.4rem 0.1rem;
@@ -188,7 +189,8 @@
     color: #3b3b3b;
   }
   .circleContent {
-    padding: 0.4rem 1rem;
+    padding: 0 1rem;
+    margin-bottom: 0.4rem;
     display: flex;
     justify-content: space-around;
   }