xujunjie 1 år sedan
förälder
incheckning
e33614022e

+ 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}

+ 18 - 9
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,21 +14,25 @@
   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;
   // width: 100%;
-  font-size: 0.36rem;
+  font-size: 0.32rem;
   font-weight: 500;
   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;

+ 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;