Преглед изворни кода

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

xujunjie пре 1 година
родитељ
комит
3842bc79c4

+ 19 - 8
src/components/ManagementPage/chartModal.js

@@ -1,8 +1,7 @@
 //图表弹窗
-import React, { useState } from 'react';
-import { Button, DatePicker, Modal, Form, Row, Col } from 'antd';
-import dayjs from 'dayjs';
 import ChartModule from '@/components/ManagementPage/chartModule';
+import { Button, Col, DatePicker, Form, Modal, Row } from 'antd';
+import dayjs from 'dayjs';
 const FormItem = Form.Item;
 function chartModal(props) {
   const {
@@ -18,7 +17,7 @@ function chartModal(props) {
     onCancel,
     sTimeInitialValue,
     eTimeInitialValue,
-    type = true //true 显示 false 隐藏时间查询
+    type = true, //true 显示 false 隐藏时间查询
   } = props;
   const handleSearch = () => {
     form.validateFields((err, fieldsValue) => {
@@ -39,7 +38,7 @@ function chartModal(props) {
       title={title}
       width="90%"
     >
-      {type &&
+      {type && (
         <Form
           layout="inline"
           // labelAlign="left"
@@ -51,14 +50,26 @@ function chartModal(props) {
               <FormItem label="开始时间">
                 {form.getFieldDecorator('start_date', {
                   initialValue: sTimeInitialValue || dayjs().subtract(1, 'M'),
-                })(<DatePicker allowClear={false} placeholder="选择开始日期" />)}
+                })(
+                  <DatePicker
+                    inputReadOnly
+                    allowClear={false}
+                    placeholder="选择开始日期"
+                  />,
+                )}
               </FormItem>
             </Col>
             <Col span={10}>
               <FormItem label="结束时间">
                 {form.getFieldDecorator('end_date', {
                   initialValue: eTimeInitialValue || dayjs(),
-                })(<DatePicker allowClear={false} placeholder="选择结束日期" />)}
+                })(
+                  <DatePicker
+                    inputReadOnly
+                    allowClear={false}
+                    placeholder="选择结束日期"
+                  />,
+                )}
               </FormItem>
             </Col>
             <Col span={2}>
@@ -73,7 +84,7 @@ function chartModal(props) {
             </Col>
           </Row>
         </Form>
-      }
+      )}
       <div style={{ height: 400, marginTop: 20 }}>
         <ChartModule
           yName={yName}

+ 2 - 0
src/components/ManagementPage/searchModule.js

@@ -70,6 +70,7 @@ function SearchModule(props) {
           initialValue={defaultValue[0]}
         >
           <DatePicker
+            inputReadOnly
             allowClear={false}
             placeholder="选择开始日期"
             className={styles.datePicker}
@@ -81,6 +82,7 @@ function SearchModule(props) {
           initialValue={defaultValue[1]}
         >
           <DatePicker
+            inputReadOnly
             allowClear={false}
             placeholder="选择结束日期"
             className={styles.datePicker}

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

@@ -529,7 +529,7 @@ function ErrorHandleModal(props) {
               name="PlanTime"
               rules={[{ required: true, message: '请选择计划完成日期' }]}
             >
-              <DatePicker />
+              <DatePicker inputReadOnly />
             </Form.Item>
           </>
         )}
@@ -993,7 +993,7 @@ function ReportDumCom(props) {
           }}
           backdrop="rgba(255,255,255,0.5)"
           style={{ height: '90px' }}
-          src={item.url}
+          src={item.path}
         />
       ),
     },

+ 1 - 0
src/pages/SmartOps/HistoryRecord.js

@@ -180,6 +180,7 @@ const HistoryRecord = (props) => {
       <div className={styles.searchContent}>
         日期:
         <RangePicker
+          inputReadOnly
           className={styles.timePicker}
           onChange={(value) => handleParamsChange('date', value)}
         />

+ 1 - 0
src/pages/SmartOps/OperationRecord.js

@@ -200,6 +200,7 @@ const OperationRecord = (props) => {
           </Button> */}
         日期:
         <RangePicker
+          inputReadOnly
           className={[styles.timePicker, styles.marginRight].join(' ')}
           onChange={(value) => handleParamsChange('date', value)}
         />

+ 3 - 2
src/pages/SmartOps/WorkAnalysisDetail.js

@@ -268,7 +268,7 @@ const ListContent = (props) => {
 
   const selectedItem = (e) => {
     setSelected(e);
-    setCurrent(current => [...current, `${active}&&${e}`]);
+    setCurrent((current) => [...current, `${active}&&${e}`]);
   };
 
   //通知unity切换tab发送tab数据
@@ -431,6 +431,7 @@ const ChartContent = (props) => {
     <div className={styles.chartBox}>
       <Form layout="inline" className={styles.form}>
         <RangePicker
+          inputReadOnly
           style={{ width: 250 }}
           allowClear={false}
           defaultValue={time}
@@ -469,7 +470,7 @@ const ChartContent = (props) => {
         <div
           style={{
             fontSize: 22,
-            color: '#fff',
+            color: '#000',
             textIndent: 30,
             padding: '10px 0',
             flexShrink: 1,

+ 2 - 8
src/pages/TaskManage/Popup/WorkOrderModal.js

@@ -4,7 +4,6 @@ import {
   getReagentOrderDetail,
   getRepairRecordList,
   getWorkOrderFlow,
-  queryReagentDetail,
 } from '@/services/TaskManage';
 import { CloseOutlined } from '@ant-design/icons';
 import { connect, useLocation, useParams, useRequest } from '@umijs/max';
@@ -29,6 +28,7 @@ const WorkOrderModal = (props) => {
   const mandate_class = Number(queryParams.get('mandate_class'));
 
   const [orderInfo, setOrderInfo] = useState({});
+  const [additionalInfo, setAdditionalInfo] = useState({});
   const [stepInfo, setStepInfo] = useState([]);
 
   const { run: getCraftDetail } = useRequest(getCraftRecordList, {
@@ -171,13 +171,7 @@ const WorkOrderModal = (props) => {
           OrderStatus.find((status) => status.value === result.status) || '-',
       };
       setOrderInfo(temp);
-      queryReagentDetail({ id: temp.id })
-        .then((res) => {
-          if (res) {
-            setAdditionalInfo(res);
-          }
-        })
-        .catch((err) => console.log(err));
+      setAdditionalInfo(temp);
     },
   });
 

+ 5 - 1
src/pages/TaskManage/components/MandateDetail.js

@@ -594,7 +594,11 @@ const DispatchTaskModal = (props) => {
           name="plan_end_time"
           rules={[{ required: true, message: '请选择完成时间' }]}
         >
-          <DatePicker style={{ width: '100%' }} placeholder="请选择完成时间" />
+          <DatePicker
+            inputReadOnly
+            style={{ width: '100%' }}
+            placeholder="请选择完成时间"
+          />
         </Form.Item>
       </Form>
     </Modal>

+ 28 - 1
src/pages/TaskManage/components/MandateDetail.less

@@ -62,24 +62,48 @@
 
 .taskCheckBox {
   padding: 10px;
+  :global {
+    .ant-checkbox-wrapper {
+      width: 100%;
+      margin-top: 5px;
+      margin-bottom: 5px;
+      border-bottom: 1px dashed gray;
+    }
+  }
 }
 
 .taskCheckItem {
   font-size: 28px;
   padding: 10px;
+  min-width: 80px;
+  display: flex;
+  align-items: center;
 }
 
 .handleModal {
   :global {
+    .ant-modal-close {
+      width: 36px;
+      height: 36px;
+    }
+    .ant-modal-close-x {
+      font-size: 36px;
+      line-height: 36px;
+    }
     .ant-modal-title {
       font-size: 28px;
     }
+    .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
+      height: 60px;
+      padding-top: 15px;
+    }
     .ant-form-item .ant-form-item-label > label {
       font-size: 28px;
+      height: 60px;
     }
     .ant-input {
       font-size: 28px;
-      height: 40px;
+      height: 60px;
     }
     .ant-btn {
       font-size: 28px;
@@ -96,6 +120,9 @@
         width: 9px;
       }
     }
+    .ant-picker {
+      height: 60px;
+    }
   }
 }