Prechádzať zdrojové kódy

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

ZhaoJun 1 rok pred
rodič
commit
cf5bdf8bd1

+ 1 - 0
src/global.less

@@ -148,6 +148,7 @@ input[type='reset'] {
   box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
 }
 .value-number {
+  margin-bottom: 0.2rem;
   font-size: 0.8rem;
   font-family: PangMenZhengDao-3, PangMenZhengDao-3;
   font-weight: 400;

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

@@ -29,14 +29,14 @@
 }
 .itemLong {
   padding: 0.6rem 0.4rem 0.6rem 1rem;
-  font-size: 0.32rem;
+  font-size: 0.34rem;
   margin-top: 0.28rem;
   display: flex;
   align-items: center;
   justify-content: space-between;
   font-family: Source Han Sans, Source Han Sans;
   color: #615d5d;
-  line-height: 32px;
+  line-height: 34rem;
   letter-spacing: 0.04rem;
   box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
   .arr {

+ 6 - 5
src/pages/DeviceManager/index.less

@@ -46,8 +46,13 @@
     top: 0.2rem;
     cursor: pointer;
     background: url('@/assets/iconFundFilled.png') no-repeat;
+    background-size: 100% 100%;
   }
 }
+.itemContent {
+  padding: 0.24rem;
+  margin-bottom: 0.2rem;
+}
 
 .lineContent {
   display: flex;
@@ -80,6 +85,7 @@
     .active {
       color: #4a90e2;
       background-image: url('@/assets/deviceManager/deviceBtn2.png');
+      background-size: 100% 100%;
     }
   }
   .itemText {
@@ -108,10 +114,6 @@
     }
     .ant-collapse-item {
       margin-bottom: 0.16rem;
-      // border-radius: 0.08rem;
-      // box-shadow: 0rem 0rem 0.08rem 0.02rem rgba(191, 191, 191, 0.2);
-      // border: 0.01rem solid #eee;
-      // background: rgb(255, 255, 255);
       border-radius: 0.4rem 0 0.4rem 0 !important;
       background: #ffffff;
       box-shadow: 0.01rem 0.06rem 0.1rem 0rem rgba(0, 0, 0, 0.1);
@@ -134,5 +136,4 @@
 
 .main {
   padding: 0.2rem;
-  margin-top: 0.4rem;
 }

+ 9 - 7
src/pages/DeviceManager/storage.js

@@ -125,13 +125,15 @@ const StorageOverview = () => {
     <PageContent closeable={false}>
       <PageTitle children="备品统计" returnable />
       <div className="content-title">
-        <div className={`card-box${styles.main}`}>
+        <div className={styles.main}>
           <Spin spinning={loading}>
-            <ModuleTitle title="物料种类库存占比" />
-            <div style={{ height: '3.3rem' }}>
-              {data?.pieData && <PieChartModule data={data.pieData} />}
+            <div className={`card-box ${styles.itemContent}`}>
+              <ModuleTitle title="物料种类库存占比" />
+              <div style={{ height: '3.3rem' }}>
+                {data?.pieData && <PieChartModule data={data.pieData} />}
+              </div>
             </div>
-            <div className={styles.thereItem}>
+            <div className={`card-box ${styles.itemContent}`}>
               <ModuleTitle title="物料库存排名前十统计" />
               <ul
                 style={{
@@ -175,13 +177,13 @@ const StorageOverview = () => {
                 )}
               </ul>
             </div>
-            <div className={styles.thereItem}>
+            <div className={`card-box ${styles.itemContent}`}>
               <ModuleTitle title="物料报废统计" />
               <div style={{ height: '4.4rem' }}>
                 {data?.radarData && <RadarChartModule {...data.radarData} />}
               </div>
             </div>
-            <div className={styles.twoItem}>
+            <div className={`card-box ${styles.itemContent}`}>
               <ModuleTitle title="出入库统计" />
               <div style={{ height: '4rem' }}>
                 {data?.barData && <BarChartModule {...data.barData} />}

+ 42 - 42
src/pages/EqSelfInspection/components/Detail.js

@@ -141,7 +141,7 @@ function Detail(props) {
         </Row>
       </div>
       <div>
-        <ModuleTitle title="设备自检" />
+        <ModuleTitle title="设备自检报告" />
         {/* 设备自检报告 */}
         <ReportCom
           sendMessageToUnity={sendMessageToUnity}
@@ -151,7 +151,7 @@ function Detail(props) {
           key="extend"
           type={'extend'}
           userList={userList}
-          title={'设备自检报告'}
+          title={'设备自检'}
         ></ReportCom>
 
         {/* 液位异常 */}
@@ -311,7 +311,6 @@ export function DeviceTable(props) {
     },
     {
       title: '巡检项',
-      width: '20%',
       dataIndex: 'TemplateItem.Name',
     },
     // {
@@ -321,7 +320,6 @@ export function DeviceTable(props) {
     // },
     {
       title: '设定值范围',
-      width: '30%',
       render: (record) => (
         <ThresholdDetail
           current={record.Value || 0}
@@ -333,6 +331,7 @@ export function DeviceTable(props) {
     {
       title: '状态',
       dataIndex: 'Status',
+      width: '1.25rem',
       render: (Status) => {
         switch (Status) {
           case -1:
@@ -387,23 +386,23 @@ export function DeviceTable(props) {
     }
   };
 
-  useEffect(() => {
-    console.log('温控', items);
-    if (isSensor)
-      UnityAction.sendMsg('PowerEnvironsFromWeb', JSON.stringify(items));
-  }, [items]);
-
-  if (!isSensor) {
-    columns.push({
-      title: '操作',
-      render: (record) =>
-        record.Status == 1 && (
-          <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
-            异常处理
-          </a>
-        ),
-    });
-  }
+  // useEffect(() => {
+  //   console.log('温控', items);
+  //   if (isSensor)
+  //     UnityAction.sendMsg('PowerEnvironsFromWeb', JSON.stringify(items));
+  // }, [items]);
+
+  // if (!isSensor) {
+  //   columns.push({
+  //     title: '操作',
+  //     render: (record) =>
+  //       record.Status == 1 && (
+  //         <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
+  //           异常处理
+  //         </a>
+  //       ),
+  //   });
+  // }
 
   return (
     <div>
@@ -648,6 +647,7 @@ export function WarningTable(props) {
     {
       title: '状态',
       dataIndex: 'Status',
+      width: '1.25rem',
       render: (Status) => {
         switch (Status) {
           case -1:
@@ -702,22 +702,22 @@ export function WarningTable(props) {
     }
   };
 
-  if (!isSensor) {
-    columns.push({
-      title: '操作',
-      render: (record) =>
-        record.Status == 1 && (
-          <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
-            异常处理
-          </a>
-        ),
-    });
-  }
-
-  useEffect(() => {
-    if (isSensor)
-      UnityAction.sendMsg('PowerEnvironsFromWeb', JSON.stringify(items));
-  }, [items]);
+  // if (!isSensor) {
+  //   columns.push({
+  //     title: '操作',
+  //     render: (record) =>
+  //       record.Status == 1 && (
+  //         <a style={{ color: '#FE5850' }} onClick={() => onClickError(record)}>
+  //           异常处理
+  //         </a>
+  //       ),
+  //   });
+  // }
+
+  // useEffect(() => {
+  //   if (isSensor)
+  //     UnityAction.sendMsg('PowerEnvironsFromWeb', JSON.stringify(items));
+  // }, [items]);
 
   return (
     <div>
@@ -828,12 +828,10 @@ export function LiquidTable(props) {
     },
     {
       title: '液位数',
-      width: '20%',
       dataIndex: 'origin_value',
     },
     {
       title: '差值',
-      width: '16%',
       dataIndex: 'value',
     },
     {
@@ -852,6 +850,7 @@ export function LiquidTable(props) {
     {
       title: '状态',
       dataIndex: 'status',
+      width: '1.25rem',
       render: (status) => {
         switch (status) {
           case -1:
@@ -971,11 +970,12 @@ function DosingFlowTable(props) {
   const columns = [
     {
       title: '设备名称',
-      width: '1.5rem',
+      width: '20%',
       dataIndex: 'device_name',
     },
     {
       title: '类型',
+      width: '1rem',
       key: 'template_item_name',
       dataIndex: 'template_item_name',
     },
@@ -1289,7 +1289,7 @@ function PressureGaugeTable(props) {
   const columns = [
     {
       title: '设备名称',
-      width: '15%',
+      width: '20%',
       dataIndex: 'item_alias',
     },
     {
@@ -1439,7 +1439,7 @@ function WaterQualityTable(props) {
   const columns = [
     {
       title: '设备名称',
-      width: '15%',
+      width: '20%',
       dataIndex: 'item_alias',
     },
     {

+ 7 - 3
src/pages/SmartOps/components/VideoAnalysis.js

@@ -456,9 +456,13 @@ function AllContent({ videoData = {}, selectedName, setSelectedName }) {
   return (
     <div
       className={styles.page}
-      style={{ height: 'calc(100vh - 6.3rem)', overflow: 'auto' }}
+      style={{
+        height: 'calc(100vh - 6.3rem)',
+        overflow: 'auto',
+        // backgroundColor: '#FFFFFF',
+      }}
     >
-      <div className={`card-box ${styles.box}`}>
+      <div className={styles.box}>
         <ModuleTitle title="环境检测" />
         <Table
           dataSource={environment_list}
@@ -484,7 +488,7 @@ function AllContent({ videoData = {}, selectedName, setSelectedName }) {
           scroll={{ y: 400 }}
         />
       </div> */}
-      <div className={`card-box ${styles.box}`}>
+      <div className={styles.box}>
         <ModuleTitle title="视频识别" />
         <Table
           dataSource={dumu_list}

+ 8 - 8
src/pages/SmartOps/components/VideoAnalysis.less

@@ -1,4 +1,5 @@
 .box {
+  margin-bottom: 0.2rem;
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
@@ -7,7 +8,7 @@
     margin-bottom: 0.15rem;
     display: flex;
     align-items: flex-start;
-    font-size: 0.22rem;
+    font-size: 0.24rem;
     line-height: 0.28rem;
     color: #454444;
     .label {
@@ -60,10 +61,6 @@
   .textNormal {
     color: #4a90e2;
   }
-  .box {
-    padding: 0.16rem;
-    margin-bottom: 0.2rem;
-  }
 
   :global {
     .ant-collapse .ant-collapse-content {
@@ -81,17 +78,18 @@
       margin-bottom: 0.15rem;
       &.ant-collapse-item-active > .ant-collapse-header {
         border-bottom: 0.01rem solid #7a9dcd;
+        border-radius: 0;
       }
       > .ant-collapse-header {
         background: none;
         color: rgb(91, 88, 88) 373;
         height: 0.62rem;
-        font-size: 0.22rem;
+        font-size: 0.24rem;
         padding: 0;
         align-items: center;
         border-bottom: 0.01rem solid transparent;
         .ant-collapse-arrow {
-          font-size: 0.22rem;
+          font-size: 0.24rem;
           right: 0;
         }
         .ant-collapse-extra {
@@ -104,8 +102,10 @@
       // margin-bottom: 0;
     }
     .ant-collapse-content {
-      padding: 0.15rem 0;
       border-top: none;
     }
+    .ant-collapse .ant-collapse-content > .ant-collapse-content-box {
+      padding: 0;
+    }
   }
 }

+ 4 - 0
src/pages/SmartOps/index.less

@@ -231,5 +231,9 @@ body .formDropDown :global {
     .ant-table-tbody > tr:nth-child(even) {
       background: inherit;
     }
+    .ant-table-wrapper .ant-table-thead > tr > th,
+    .ant-table-wrapper .ant-table-tbody > tr > td {
+      font-size: 0.24rem;
+    }
   }
 }