Ver Fonte

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

Renxy há 1 ano atrás
pai
commit
7a8e45bb56

+ 5 - 4
src/models/eqSelfInspection.js

@@ -144,7 +144,7 @@ export default {
           if (patrolRelation) {
             let FaultAnalysis = [];
             patrolRelation?.data?.list?.map((item) => {
-              var reason = analysisDict?.find(
+              var reason = analysisDict?.data.find(
                 (reason) => reason.id == item.Reason,
               );
               if (reason) {
@@ -154,7 +154,7 @@ export default {
               if (FixPlanArr.length > 0) {
                 var FixPlan = [];
                 FixPlanArr.map((fixItem) => {
-                  var fixPlan = analysisDict?.find(
+                  var fixPlan = analysisDict?.data.find(
                     (reason) => reason.id == fixItem,
                   );
                   if (fixPlan) FixPlan.push(fixPlan);
@@ -203,8 +203,9 @@ export default {
 
         data.patrolStatus = data?.extendWarningData?.length > 0 ? 1 : 0;
         data.faultAnalysisStatus = data?.FaultAnalysis?.length > 0 ? 1 : 0;
-        data.secureStatus =
-          data?.dumuList?.length > 0 || data?.sensorWaringNum > 0 ? 1 : 0;
+        // data.secureStatus =
+        //   data?.dumuList?.length > 0 || data?.sensorWaringNum > 0 ? 1 : 0;
+        data.secureStatus = data?.dumuList?.length > 0 ? 1 : 0;
         let secureChild = [];
         let dumuStatus = 0;
         if (data?.dumuList?.length > 0) {

+ 2 - 2
src/pages/Controller/components/AirConditioner.js

@@ -1,8 +1,8 @@
 import { queryIotList } from '@/services/controller';
+import { UnityAction } from '@/utils/utils';
 import { useParams, useRequest } from '@umijs/max';
 import { Spin } from 'antd';
 import styles from '../index.less';
-import { UnityAction } from '@/utils/utils';
 
 const Work = (props) => {
   const { projectId } = useParams();
@@ -10,7 +10,7 @@ const Work = (props) => {
   const { data, loading } = useRequest(queryIotList, {
     defaultParams: [projectId],
     onSuccess(res) {
-      UnityAction.sendMsg('ACData', res.list);
+      UnityAction.sendMsg('ACData', JSON.stringify(res.list));
     },
   });
 

+ 2 - 2
src/pages/Controller/components/Light.js

@@ -1,8 +1,8 @@
 import { queryLightList } from '@/services/controller';
+import { UnityAction } from '@/utils/utils';
 import { useParams, useRequest } from '@umijs/max';
 import { Spin } from 'antd';
 import styles from '../index.less';
-import { UnityAction } from '@/utils/utils';
 
 const Work = (props) => {
   const { projectId } = useParams();
@@ -10,7 +10,7 @@ const Work = (props) => {
   const { data, loading } = useRequest(queryLightList, {
     defaultParams: [projectId],
     onSuccess(res) {
-      UnityAction.sendMsg('lightData', res.list);
+      UnityAction.sendMsg('lightData', JSON.stringify(res.list));
     },
   });
 

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

@@ -109,7 +109,7 @@
       border-radius: 8px;
       box-shadow: 0px 0px 8px 2px rgba(191, 191, 191, 0.2);
       border: 1px solid #eee;
-      background: rgba(255, 255, 255);
+      background: rgb(255, 255, 255);
     }
     .ant-collapse
       > .ant-collapse-item

+ 8 - 6
src/pages/EqSelfInspection/List/index.js

@@ -3,7 +3,7 @@ import PageTitle from '@/components/PageTitle';
 import { GetTokenFromUrl, UnityAction } from '@/utils/utils';
 import { connect, history, useParams } from '@umijs/max';
 import dayjs from 'dayjs';
-import { Fragment, useEffect } from 'react';
+import { useEffect } from 'react';
 import styles from './index.less';
 
 function List(props) {
@@ -24,8 +24,10 @@ function List(props) {
     let params = {};
     params.projectId = projectId;
     params.auto = 1;
-    params.startDate = dayjs().subtract(1).format('YYYY-MM-DD');
-    params.endDate = dayjs().format('YYYY-MM-DD');
+    params.startDate = dayjs()
+      .subtract(10, 'day')
+      .format('YYYY-MM-DD 00:00:00');
+    params.endDate = dayjs().format('YYYY-MM-DD 23:59:59');
     params.pageSize = 100;
     params.currentPage = 1;
     dispatch({
@@ -51,12 +53,12 @@ function List(props) {
               <div className={styles.time}>
                 <i></i>自检时间:{dayjs(item.CreatedTime).format('MM-DD HH:mm')}
               </div>
-              {/* <div className={styles.desc}>
+              <div className={styles.desc}>
                 <i></i>
                 发现异常
-                <span className={styles.number}>4</span>
+                <span className={styles.number}>{item.Status}</span>
                 <span>项</span>
-              </div> */}
+              </div>
             </div>
             <div className={styles.btn}></div>
           </div>

+ 1 - 1
src/pages/EqSelfInspection/List/index.less

@@ -13,7 +13,7 @@
   .status {
     width: 134px;
     height: 134px;
-    font-size: 36px;
+    font-size: 32px;
     font-weight: 400;
     color: #000000;
     text-align: center;

+ 5 - 1
src/pages/EqSelfInspection/components/Detail.js

@@ -116,7 +116,7 @@ function Detail(props) {
           </Col>
         </Row>
         <Row>
-          <Col span={8} className={styles.cardText}>
+          <Col span={16} className={styles.cardText}>
             自检路线:{data?.RouteInfo?.Name}
           </Col>
           <Col span={8} className={styles.cardText}>
@@ -367,6 +367,7 @@ export function DeviceTable(props) {
         locale={{
           emptyText: <Empty />,
         }}
+        pagination={false}
       />
       <ThresholdModal
         open={visible}
@@ -433,6 +434,7 @@ function AalysisTable(props) {
         locale={{
           emptyText: <Empty />,
         }}
+        pagination={false}
       />
     </div>
   );
@@ -682,6 +684,7 @@ export function WarningTable(props) {
         locale={{
           emptyText: <Empty />,
         }}
+        pagination={false}
       />
       <ThresholdModal
         open={visible}
@@ -824,6 +827,7 @@ function ReportDumCom(props) {
         locale={{
           emptyText: <Empty />,
         }}
+        pagination={false}
       />
     </div>
   );

+ 3 - 3
src/pages/EqSelfInspection/index.less

@@ -77,7 +77,7 @@
   }
 }
 .item {
-  height: 108px;
+  height: 80px;
   display: flex;
   align-items: center;
   position: relative;
@@ -108,7 +108,7 @@
 }
 .warningItem {
   // border-bottom: 2px solid #555;
-  height: 90px;
+  height: 80px;
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -141,7 +141,7 @@
   border: 1px;
   border-radius: 12px;
   margin-bottom: 20px;
-  margin-top: 30px;
+  margin-top: 20px;
   padding: 0 10px;
 }
 .itemMain2 {

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

@@ -2,7 +2,8 @@
   background-size: 100% 100%;
   border-radius: 14px;
   padding: 14px 20px;
-  margin: 10px 0;
+  // margin: 10px 0;
+  margin-top: 10px;
   box-shadow: 0px 0px 8px 2px rgba(191, 191, 191, 0.2);
   h3 {
     margin-bottom: 30px;
@@ -76,6 +77,7 @@
     font-weight: 400;
     color: #4a4a4a;
     line-height: 40px;
+    margin-bottom: 0;
   }
 }
 .circleText {

+ 1 - 1
src/pages/Smart/OptimizationTasks.less

@@ -55,7 +55,7 @@
   box-shadow: 2px 0 8px 0 rgba(0, 0, 0, 0.3);
   border: 1px solid #eee;
   position: relative;
-  background: rgba(255, 255, 255, 0.6);
+  background: rgb(255, 255, 255);
 }
 .bottom {
   border-top: 1px solid #c0c0c0;

+ 4 - 1
src/pages/Smart/components/SimulateDetail.js

@@ -234,7 +234,7 @@ const ChartContent = (props) => {
         </div>
       </div>
       <Spin spinning={loading}>
-        <div ref={domRef} style={{ height: '30vh' }} />
+        <div ref={domRef} style={{ height: '35vh' }} />
       </Spin>
       <Optimization data={data?.list?.[0]} />
       <MembraneModal
@@ -546,8 +546,10 @@ function getOption(data = [], active) {
         // color: '#fff',
         fontSize: 24,
       },
+      type: 'scroll'
     },
     grid: {
+      top: 80,
       left: '3%',
       right: '4%',
       bottom: '3%',
@@ -573,6 +575,7 @@ function getOption(data = [], active) {
       axisLabel: {
         fontSize: 24,
       },
+      splitNumber: 5,
     },
     series,
   };

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

@@ -38,7 +38,7 @@
   padding: 16px;
   border: 1px solid #eee;
   margin: 10px 0;
-  background: rgba(255, 255, 255, 0.6);
+  background: rgb(255, 255, 255);
 
   h3 {
     font-size: 28px;

+ 42 - 11
src/pages/TaskManage/Detail/TaskOrder/TaskOrder.tsx

@@ -27,6 +27,12 @@ interface IOrderInfo {
   Reason: string;
   Repairman: string | IUserType;
   OrderStatus: string | DefaultOptionType;
+  Lubrication?: number;
+  Fasten?: number;
+  RustRemoval?: number;
+  AntiCorrosive?: number;
+  Clean?: number;
+  Check?: number;
 }
 
 const TaskOrder: React.FC<IPropsType> = (props) => {
@@ -50,6 +56,12 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
         PlanTime: temp.PlanTime,
         RepairTime: '-',
         Reason: temp.Note,
+        Lubrication: temp.Lubrication,
+        Fasten: temp.Fasten,
+        RustRemoval: temp.RustRemoval,
+        AntiCorrosive: temp.Anticorrosive,
+        Clean: temp.Clean,
+        Check: temp.Check,
         Repairman:
           userList.find((item) => item.ID === temp.MaintenancePerson) || '-',
         OrderStatus:
@@ -173,17 +185,36 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
             </Row>
           </div>
         </div>
-        {/*<div>*/}
-        {/*  <SubTitle title="维修内容" />*/}
-        {/*  <div style={{ padding: '15px' }}>*/}
-        {/*    <Row className={styles.rowMargin}>*/}
-        {/*      <Col className={styles.fontS24}>是否润滑加油:否</Col>*/}
-        {/*    </Row>*/}
-        {/*    <Row>*/}
-        {/*      <Col className={styles.fontS24} >是否清洁:否</Col>*/}
-        {/*    </Row>*/}
-        {/*  </div>*/}
-        {/*</div>*/}
+        {order_type === 3 && (
+          <div>
+            <SubTitle title="维修内容" />
+            <div style={{ padding: '15px' }}>
+              <Row className={styles.rowMargin} justify={"space-between"}>
+                <Col className={styles.fontS24}>
+                  是否润滑/加油:{orderInfo?.Lubrication === 1 ? '是' : '否'}
+                </Col>
+                <Col className={styles.fontS24}>
+                  是否拆检:{orderInfo?.Check === 1 ? '是' : '否'}
+                </Col>
+                <Col className={styles.fontS24}>
+                  是否清洁:{orderInfo?.Clean === 1 ? '是' : '否'}
+                </Col>
+              </Row>
+              <Row>
+                <Col className={styles.fontS24}>
+                  是否紧固:{orderInfo?.Fasten === 1 ? '是' : '否'}
+                </Col>
+                <Col className={styles.fontS24}>
+                  是否除锈:{orderInfo?.AntiCorrosive === 1 ? '是' : '否'}
+                </Col>
+                <Col className={styles.fontS24}>
+                  是否防腐:{orderInfo?.RustRemoval === 1 ? '是' : '否'}
+                </Col>
+              </Row>
+            </div>
+          </div>
+        )}
+
         {/*<div>*/}
         {/*  <SubTitle title="工单流程" />*/}
         {/*  <div style={{ padding: '15px' }}>*/}

+ 1 - 1
src/pages/TaskManage/components/TopFilter.tsx

@@ -12,7 +12,7 @@ const TopFilter: React.FC<IProps> = ({ filters, onChange }) => {
   const [values, setValues] = useState<any[]>([]);
 
   return (
-    <Row justify="space-around">
+    <Row justify="space-around" style={{marginTop:'30px'}}>
       {filters.map((item, index) => {
         return (
           <Col

+ 9 - 2
src/pages/TaskManage/index.less

@@ -15,7 +15,8 @@
 
       .countNumber {
         color: #f5a623;
-        font-size: 28px;
+        font-size: 32px;
+        font-weight: 500;
         margin-bottom: 6px;
       }
     }
@@ -26,7 +27,9 @@
 .antdSelect .ant-select-selection-placeholder,
 .ant-select-item-option-content
 {
-  font-size: 20px;
+  font-size: 28px;
+  width: 10rem;
+  text-align: center;
 }
 
 .antdSelect .ant-select-selection-placeholder{
@@ -49,6 +52,10 @@
   font-size: 24px;
 }
 
+.fontS22{
+  font-size: 22px;
+}
+
 .fontS20{
   font-size: 20px;
 }

+ 1 - 1
src/pages/TaskManage/index.tsx

@@ -52,7 +52,7 @@ const TaskManage: React.FC<IPropTypes> = (props) => {
         <List.Item.Meta title={<span className={styles.fontS28}>{item.label}</span>} />
         <div className={styles.itemCount}>
           <div className={styles.countNumber}>{mandateCount[index]}</div>
-          <div className={styles.fontS20}>任务数量</div>
+          <div className={styles.fontS22}>任务数量</div>
         </div>
         <RightOutlined />
       </List.Item>