浏览代码

样式改动

xujunjie 1 年之前
父节点
当前提交
54dc752512

+ 10 - 7
src/components/ManagementPage/index.less

@@ -1,16 +1,19 @@
 .icon {
 .icon {
   float: left;
   float: left;
-  width: 0.07rem;
-  height: 0.32rem;
-  margin: 0.04rem 0;
+  width: 0.1rem;
+  height: 0.1rem;
+  // margin: 0.04rem 0;
+  margin-top: 0.1rem;
   background-color: #366cda;
   background-color: #366cda;
 }
 }
+
 .title {
 .title {
   padding-left: 0.12rem;
   padding-left: 0.12rem;
-  font-size: 0.3rem;
-  font-weight: 400;
-  color: #4a4a4a;
-  line-height: 0.4rem;
+  line-height: 1;
+
+  font-size: 0.28rem;
+  font-family: Source Han Sans, Source Han Sans;
+  color: #615d5d;
 }
 }
 .right {
 .right {
   color: #366cda;
   color: #366cda;

+ 2 - 1
src/components/TabsContent/index.less

@@ -32,7 +32,8 @@
 
 
 .small {
 .small {
   height: inherit;
   height: inherit;
-  padding: 0.2rem 0;
+  width: 100%;
+  border-bottom: none;
   .tabsItem {
   .tabsItem {
     font-size: 0.28rem;
     font-size: 0.28rem;
     padding: 0 0.3rem;
     padding: 0 0.3rem;

+ 22 - 17
src/global.less

@@ -145,7 +145,7 @@ input[type='reset'] {
 .card-box {
 .card-box {
   border-radius: 0.4rem 0 0.4rem 0;
   border-radius: 0.4rem 0 0.4rem 0;
   background: #ffffff;
   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 {
 .value-number {
   font-size: 0.8rem;
   font-size: 0.8rem;
@@ -167,7 +167,7 @@ input[type='reset'] {
 .content-title {
 .content-title {
   padding-left: 0.05rem;
   padding-left: 0.05rem;
   padding-right: 0.05rem;
   padding-right: 0.05rem;
-  height: calc(100vh - 1.1rem);
+  height: calc(100vh - 1.15rem);
   overflow-x: hidden;
   overflow-x: hidden;
   overflow-y: auto;
   overflow-y: auto;
 }
 }
@@ -247,9 +247,8 @@ input[type='reset'] {
   padding-top: 0;
   padding-top: 0;
   padding-bottom: 0;
   padding-bottom: 0;
 }
 }
-.ant-table {
-  background-color: white !important;
-}
+
+.ant-table,
 .ant-table-cell,
 .ant-table-cell,
 .ant-table-placeholder {
 .ant-table-placeholder {
   background: transparent !important;
   background: transparent !important;
@@ -267,21 +266,27 @@ input[type='reset'] {
   display: none;
   display: none;
 }
 }
 .ant-table-thead {
 .ant-table-thead {
-  background: #cbe0f6;
+  background: rgba(23, 85, 255, 0.5);
 }
 }
-.ant-table-thead > tr > th,
-.ant-table-tbody > tr > td {
-  border-radius: 0 !important;
-  padding: 0.16rem 0.18rem !important;
-  font-size: 0.24rem !important;
-  color: #4a4a4a !important;
-  line-height: 0.32rem !important;
-  font-weight: normal !important;
+.ant-table-wrapper .ant-table-thead > tr > th,
+.ant-table-wrapper .ant-table-tbody > tr > td {
+  border-radius: 0;
+  padding: 0.12rem 0.18rem;
+  font-size: 0.28rem;
+  color: #fff;
+  line-height: 1;
+  font-weight: normal;
   vertical-align: middle;
   vertical-align: middle;
-  border: none !important;
+  border: 0 none !important;
+  border-radius: 0 !important;
 }
 }
-.ant-table-tbody > tr:nth-child(even) {
-  background: rgba(145, 192, 238, 0.16);
+
+// .ant-table-tbody > tr:nth-child(even) {
+//   background: rgba(145, 192, 238, 0.16);
+// }
+
+.ant-table-cell::before {
+  display: none;
 }
 }
 
 
 .ant-picker {
 .ant-picker {

+ 28 - 22
src/pages/EqSelfInspection/components/Detail.js

@@ -33,18 +33,7 @@ function Detail(props) {
       window.HightlightEquipment(data);
       window.HightlightEquipment(data);
     }
     }
   };
   };
-  const getTextColor = (status) => {
-    switch (status) {
-      case '警告':
-        return '#FFE26D';
-      case '异常':
-        return '#FE5850';
-      case '正常':
-        return '#12CEB3';
-      default:
-        return '#12CEB3';
-    }
-  };
+
   const { run: detailRun } = useRequest(getDumuDetail, {
   const { run: detailRun } = useRequest(getDumuDetail, {
     manual: true,
     manual: true,
     fetchKey: (id) => id,
     fetchKey: (id) => id,
@@ -60,6 +49,26 @@ function Detail(props) {
     var resultArr = [];
     var resultArr = [];
     var tempResult = data?.PatrolResult;
     var tempResult = data?.PatrolResult;
     var tempArr = tempResult?.split(';');
     var tempArr = tempResult?.split(';');
+    const getTextColor = (status) => {
+      switch (status) {
+        case '警告':
+          return {
+            color: '#FFE26D',
+            className: styles.warn,
+          };
+        case '异常':
+          return {
+            color: '#FE5850',
+            className: styles.error,
+          };
+
+        default:
+          return {
+            color: '#12CEB3',
+            className: '',
+          };
+      }
+    };
     if (tempArr?.length > 0) {
     if (tempArr?.length > 0) {
       tempArr?.forEach((item, index) => {
       tempArr?.forEach((item, index) => {
         var tempItem = item;
         var tempItem = item;
@@ -74,9 +83,9 @@ function Detail(props) {
             value = data?.secureStatus === 0 ? '正常' : '异常';
             value = data?.secureStatus === 0 ? '正常' : '异常';
           }
           }
           resultArr.push({
           resultArr.push({
+            ...getTextColor(value),
             label,
             label,
             value,
             value,
-            color: getTextColor(value),
           });
           });
         }
         }
       });
       });
@@ -103,11 +112,6 @@ function Detail(props) {
   return (
   return (
     <Spin spinning={loading} wrapperClassName="card-box">
     <Spin spinning={loading} wrapperClassName="card-box">
       <div className={styles.card}>
       <div className={styles.card}>
-        {data.Status == 0 ? (
-          <div className={`${styles.orderIcon}`}>正常</div>
-        ) : (
-          <div className={`${styles.orderIcon} ${styles.error}`}>异常</div>
-        )}
         <Row>
         <Row>
           <Col span={24} className={styles.cardText}>
           <Col span={24} className={styles.cardText}>
             自检时间:{data?.CreatedTime}
             自检时间:{data?.CreatedTime}
@@ -125,10 +129,12 @@ function Detail(props) {
           {result?.map((item) => {
           {result?.map((item) => {
             return (
             return (
               <Col span={8} className={styles.cardText}>
               <Col span={8} className={styles.cardText}>
-                {item?.label}:
-                <span style={{ color: item.color, fontWeight: 'bold' }}>
-                  {item?.value}
-                </span>
+                <div className={styles.statusBox}>
+                  <div className={`${styles.orderIcon} ${item.className}`}>
+                    {item.value}
+                  </div>
+                  {item?.label}
+                </div>
               </Col>
               </Col>
             );
             );
           })}
           })}

+ 39 - 29
src/pages/EqSelfInspection/components/PatrolReportDetail.less

@@ -54,25 +54,51 @@
   align-items: center;
   align-items: center;
 }
 }
 .card {
 .card {
-  background: #eff5fc;
-  padding: 0.1rem 0.2rem;
+  background: #fff;
+  // padding: 0.1rem 0.2rem;
+  padding-top: 0.28rem;
+  padding-bottom: 0.4rem;
+  padding-left: 0.6rem;
   position: relative;
   position: relative;
   overflow: hidden;
   overflow: hidden;
+  border-bottom: 2px solid #4577ff;
+  .cardText {
+    font-size: 0.32rem;
+    font-family: Source Han Sans, Source Han Sans;
+    color: #615d5d;
+    line-height: 1;
+  }
   .orderIcon {
   .orderIcon {
-    background: #4a90e2;
-    width: 3rem;
-    position: absolute;
-    top: 0.4rem;
-    right: -0.92rem;
-    text-align: center;
-    font-size: 0.24rem;
-    transform: rotate(45deg);
-    padding: 0.1rem 0;
-    color: #fff;
+    width: 0.92rem;
+    height: 0.92rem;
+    border-radius: 50%;
+    margin-right: 0.16rem;
+    color: #12ceb3;
+    border: 0.06rem solid #12ceb3;
+    font-size: 0.32rem;
+    font-family: Source Han Sans, Source Han Sans;
+    display: flex;
+    align-items: center;
+    justify-content: center;
     &.error {
     &.error {
-      background: #fe5850;
+      color: #fe5850;
+      border-color: #fe5850;
+    }
+    &.warn {
+      color: #ffe26d;
+      border-color: #ffe26d;
     }
     }
   }
   }
+  .statusBox {
+    display: flex;
+    align-items: center;
+
+    font-size: 0.32rem;
+    font-family: Source Han Sans, Source Han Sans;
+    font-weight: 400;
+    color: #9b9797;
+    line-height: 1;
+  }
 }
 }
 .cardText {
 .cardText {
   padding: 0.2rem;
   padding: 0.2rem;
@@ -101,20 +127,4 @@
   position: relative;
   position: relative;
 }
 }
 :global {
 :global {
-  .ant-table,
-  .ant-table-cell,
-  .ant-table-placeholder {
-    background: transparent !important;
-  }
-  .ant-table-cell::before {
-    display: none;
-  }
-  .ant-table-thead {
-    background: #cbe0f6;
-  }
-  .ant-table-thead > tr > th,
-  .ant-table-tbody > tr > td {
-    padding: 0.16rem 0.12rem !important;
-    font-size: 0.24rem;
-  }
 }
 }

+ 2 - 0
src/pages/EqSelfInspection/index.less

@@ -149,6 +149,8 @@
   margin-bottom: 0.2rem;
   margin-bottom: 0.2rem;
   margin-top: 0.2rem;
   margin-top: 0.2rem;
   padding: 0 0.1rem;
   padding: 0 0.1rem;
+  border-radius: 20px 0 20px 0;
+  box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
 }
 }
 .itemMain2 {
 .itemMain2 {
   .itemMain;
   .itemMain;