فهرست منبع

style: 调整任务页面样式

ZhaoJun 1 سال پیش
والد
کامیت
c3271f3b3d

+ 19 - 17
src/pages/TaskManage/Detail/TaskList/TaskList.tsx

@@ -17,7 +17,7 @@ import { connect, useLocation, useRequest } from '@umijs/max';
 import TopFilter from '@/pages/TaskManage/components/TopFilter';
 import { IMandateType } from '@/pages/TaskManage/index.types';
 import { useNavigate } from '@@/exports';
-import { DownOutlined, UpOutlined } from "@ant-design/icons";
+import { DownOutlined } from '@ant-design/icons';
 import {
   Button,
   Col,
@@ -156,24 +156,26 @@ const TaskList: React.FC<IPropsType> = (props) => {
     setCurrentParams(params);
   };
 
-  const loadMoreMandate = !loadData ? (
-    <div
-      style={{
-        textAlign: 'center',
-        marginTop: 12,
-        height: 32,
-        lineHeight: '32px',
-      }}
-    >
-      <Button
-        onClick={() => {
-          getList(currentParams);
+  const loadMoreMandate =
+    !loadData && mandateListShow.length > mandatePage.total ? (
+      <div
+        style={{
+          textAlign: 'center',
+          marginTop: 12,
+          height: 32,
+          lineHeight: '32px',
+          fontSize: '28px',
         }}
       >
-        加载更多
-      </Button>
-    </div>
-  ) : null;
+        <Button
+          type="text"
+          size="large"
+          style={{ fontSize: '28px', height: '56px', width: '160px' }}
+        >
+          加载更多
+        </Button>
+      </div>
+    ) : null;
 
   const goTaskDetail = (mandate: IMandateType) => {
     navigate(

+ 3 - 4
src/pages/TaskManage/Detail/TaskOrder/TaskOrder.tsx

@@ -52,7 +52,6 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
   const { run: getMaintainDetail } = useRequest(getMaintainRecordList, {
     manual: true,
     formatResult: (result) => {
-      console.log(moment('2022-12-12 00:00:00').format('YYYY-MM-DD HH:mm'));
       const temp = result.data.list[0];
       const tempDetail = {
         CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
@@ -68,7 +67,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
         Repairman:
           userList.find((item) => item.ID === temp.MaintenancePerson) || '-',
         DispatchMan:
-          userList.find((item) => (item.ID = temp.Operators[0].Operator.ID)) ||
+          userList.find((item) => (item.ID = temp.Operators[0]?.Operator?.ID)) ||
           '-',
         OrderStatus:
           OrderStatus.find((item) => item.value === temp.Status) || '-',
@@ -85,7 +84,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
       const tempDetail: IOrderInfo = {
         CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
         PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
-        RepairTime: moment(temp.RepairTime).format('YYYY-MM-DD HH:mm'),
+        RepairTime: temp.RepairTime && moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
         Reason: temp.Reason,
         Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
         DispatchMan:
@@ -130,7 +129,6 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
         payload: { project_id },
       });
     }
-    console.log(order_type);
     switch (order_type) {
       // 工艺
       case 1:
@@ -179,6 +177,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
                 {order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
               </Col>
               <Col className={styles.fontS26} span={8}>
+                {/*// @ts-ignore*/}
                 派单人员:{orderInfo?.DispatchMan?.CName}
               </Col>
             </Row>

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

@@ -26,7 +26,7 @@
 
 .ant-select-clear {
   opacity: 1 !important;
-  margin-top: -10px!important;
+  margin-top: -12px!important;
   width: 24px!important;
   height: 24px!important;
   font-size: 24px!important;
@@ -40,7 +40,9 @@
   color: black;
   margin-right: 10px;
 }
-
+.ant-select-item-option{
+  padding: 8px!important;
+}
 .ant-select-arrow {
   font-size: 24px!important;
   color: black!important;