xujunjie 1 năm trước cách đây
mục cha
commit
987b8916ef

+ 1 - 0
src/models/eqSelfInspection.js

@@ -169,6 +169,7 @@ export default {
                 console.log(FixPlan);
               }
               FaultAnalysis.push({
+                ...item,
                 device_name: item.DeviceName,
                 device_code: item.DeviceCode,
                 reason: item.Reason,

+ 76 - 75
src/pages/EqSelfInspection/components/Detail.js

@@ -1,7 +1,7 @@
 import ModuleTitle from '@/components/ManagementPage/moduleTitle';
 import { getDumuDetail } from '@/services/eqSelfInspection';
 import { connect, useModel, useParams, useRequest } from '@umijs/max';
-import { Checkbox, Col, Row, Spin, Table } from 'antd';
+import { Affix, Checkbox, Col, Row, Spin, Table } from 'antd';
 import { useEffect, useMemo, useState } from 'react';
 import styles from './PatrolReportDetail.less';
 import DosingFlowCom from './Table/DosingFlowCom';
@@ -97,80 +97,81 @@ function Detail(props) {
 
   return (
     <Spin spinning={loading}>
-      <div className={styles.card}>
-        <Row>
-          <Col span={24} className={styles.cardText}>
-            自检时间:{data?.CreatedTime}
-          </Col>
-        </Row>
-        <Row>
-          <Col span={10} className={styles.cardText}>
-            自检路线:{data?.RouteInfo?.Name}
-          </Col>
-          <Col span={8} className={styles.cardText}>
-            工艺段:{data?.RouteInfo?.GroupID}
-          </Col>
-        </Row>
-        <Row>
-          {result.map((item, index) => (
-            <Col span={index == 0 ? 10 : 7} className={styles.cardText}>
-              {index == 0 && '自检结果:'}
-              {item.label}-
-              <span style={{ color: item.color }}>{item.value}</span>
+      <Affix>
+        <div className={styles.card}>
+          <Row>
+            <Col span={24} className={styles.cardText}>
+              自检时间:{data?.CreatedTime}
             </Col>
-          ))}
-        </Row>
-      </div>
-      <div>
-        <Checkbox.Group
-          onChange={(check) => {
-            // 未勾选则认为全部显示
-            if (check.length == 0) {
-              setStatusCheck([1, 2, 3]);
-            } else {
-              setStatusCheck(check);
-            }
-          }}
-          style={{
-            width: '70%',
-            margin: '0 auto',
-            display: 'flex',
-            justifyContent: 'center',
-            marginBottom: '0.3rem',
-          }}
-        >
-          <Checkbox value={1}>异常数据</Checkbox>
-          <Checkbox value={2} style={{ margin: '0 0.5rem' }}>
-            警告数据
-          </Checkbox>
-          <Checkbox value={0}>正常数据</Checkbox>
-        </Checkbox.Group>
-        {/* 设备自检报告 */}
-        <DeviceReport
-          sendMessageToUnity={sendMessageToUnity}
-          select={select}
-          data={data}
-          userList={userList}
-          statusCheck={statusCheck}
-        />
-
-        {/* 工艺自检报告 */}
-
-        <AalysisTable
-          onClickItem={sendMessageToUnity}
-          select={select}
-          data={data}
-          statusCheck={statusCheck}
-        />
-        {/* 安全自检报告 */}
-        <SecureReport
-          sendMessageToUnity={sendMessageToUnity}
-          select={select}
-          data={data}
-          userList={userList}
-          statusCheck={statusCheck}
-        />
-      </div>
+          </Row>
+          <Row>
+            <Col span={10} className={styles.cardText}>
+              自检路线:{data?.RouteInfo?.Name}
+            </Col>
+            <Col span={8} className={styles.cardText}>
+              工艺段:{data?.RouteInfo?.GroupID}
+            </Col>
+          </Row>
+          <Row>
+            {result.map((item, index) => (
+              <Col span={index == 0 ? 10 : 7} className={styles.cardText}>
+                {index == 0 && '自检结果:'}
+                {item.label}-
+                <span style={{ color: item.color }}>{item.value}</span>
+              </Col>
+            ))}
+          </Row>
+        </div>
+      </Affix>
+
+      <Checkbox.Group
+        onChange={(check) => {
+          // 未勾选则认为全部显示
+          if (check.length == 0) {
+            setStatusCheck([1, 2, 3]);
+          } else {
+            setStatusCheck(check);
+          }
+        }}
+        style={{
+          width: '70%',
+          margin: '0 auto',
+          display: 'flex',
+          justifyContent: 'center',
+          marginBottom: '0.3rem',
+        }}
+      >
+        <Checkbox value={1}>异常数据</Checkbox>
+        <Checkbox value={2} style={{ margin: '0 0.5rem' }}>
+          警告数据
+        </Checkbox>
+        <Checkbox value={0}>正常数据</Checkbox>
+      </Checkbox.Group>
+      {/* 设备自检报告 */}
+      <DeviceReport
+        sendMessageToUnity={sendMessageToUnity}
+        select={select}
+        data={data}
+        userList={userList}
+        statusCheck={statusCheck}
+      />
+
+      {/* 工艺自检报告 */}
+
+      <AalysisTable
+        onClickItem={sendMessageToUnity}
+        select={select}
+        data={data}
+        statusCheck={statusCheck}
+      />
+      {/* 安全自检报告 */}
+      <SecureReport
+        sendMessageToUnity={sendMessageToUnity}
+        select={select}
+        data={data}
+        userList={userList}
+        statusCheck={statusCheck}
+      />
     </Spin>
   );
 }
@@ -353,7 +354,7 @@ function AalysisTable(props) {
           return (
             <div>
               {record.fix_plan.map((item) => (
-                <div style={{lineHeight: 1.8}}>
+                <div style={{ lineHeight: 1.8 }}>
                   {item.content}
                   <MandateBtn relationId={record.id} />
                 </div>

+ 2 - 2
src/pages/EqSelfInspection/components/PatrolReportDetail.less

@@ -81,11 +81,11 @@
 .card {
   background: #fff;
   // padding: 0.1rem 0.2rem;
-  padding: 0.28rem 0 0.4rem;
+  padding: 0.28rem 0 0.2rem;
   position: relative;
   overflow: hidden;
   border-bottom: 2px solid #4577ff;
-  margin-bottom: 0.4rem;
+  margin-bottom: 0.2rem;
   .cardText {
     font-size: 0.3rem;
     font-family: Source Han Sans, Source Han Sans;

+ 2 - 2
src/pages/EqSelfInspection/components/Table/MandateBtn.js

@@ -10,13 +10,13 @@ export default function ({ relationId }) {
   if (!mandateId) return null;
   return (
     <a
-      style={{ marginLeft: 20 }}
+      style={{ marginLeft: 10 }}
       onClick={() =>
         // task
         UnityAction.sendMsg('OpenTaskModal', `mandate_id=${mandateId}`)
       }
     >
-      查看
+      查看任务
     </a>
   );
 }

+ 3 - 0
src/pages/SafetyManagement/Command/index.js

@@ -41,7 +41,10 @@ const CommandModal = () => {
         okText="确定"
         width={640}
         open={true}
+        mask={false}
         footer={null}
+        centered={true}
+        wrapClassName={styles.modal}
         // closable={false}
         onCancel={handleClose}
       >

+ 18 - 0
src/pages/SafetyManagement/Command/index.less

@@ -3,6 +3,7 @@
   margin-left: 4px;
   margin-bottom: 20px;
   width: 100%;
+  margin-top: 40px;
   .upItem {
     text-align: center;
     line-height: 54px;
@@ -14,6 +15,23 @@
     box-shadow: 0px 0px 8px 3px rgba(204, 204, 204, 0.5);
   }
 }
+.modal {
+  :global {
+    .ant-modal {
+      transform: scale(1.3);
+    }
+    .ant-modal-title {
+      font-size: 26px;
+    }
+    .ant-modal-close {
+      top: 24px;
+      inset-inline-end: 24px;
+    }
+    .ant-modal-close-x {
+      font-size: 30px;
+    }
+  }
+}
 .numContent {
   display: flex;
   flex-wrap: wrap;