ソースを参照

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

xujunjie 1 年間 前
コミット
e324592c2d

BIN
src/assets/TaskManage/viewOrder.png


BIN
src/assets/TaskManage/viewOrder@2x.png


+ 2 - 2
src/components/PageTitle/index.less

@@ -29,8 +29,8 @@
   display: inline-block;
   padding: 0.05rem;
   // width: 100%;
-  font-size: 0.32rem;
-  font-weight: 500;
+  font-size: 0.36rem;
+  font-weight: 600;
   color: #0139f1;
   line-height: 0.32rem;
 }

+ 2 - 0
src/components/TabsContent/index.less

@@ -25,6 +25,7 @@
   color: #3f3f40;
   font-size: 0.36rem;
   white-space: nowrap;
+  font-weight: 600;
 }
 .active {
   color: #1755ff;
@@ -37,6 +38,7 @@
   .tabsItem {
     font-size: 0.28rem;
     padding: 0 0.3rem;
+    font-weight: 600;
     &:last-child {
       padding-right: 0;
     }

+ 1 - 0
src/pages/Home/index.less

@@ -70,6 +70,7 @@
     color: #3b3b3b;
     line-height: 0.5rem;
     text-align: center;
+    letter-spacing: 0.04rem;
     font-family: PangMenZhengDao-3, PangMenZhengDao-3;
   }
 }

+ 29 - 22
src/pages/SmartReport/index.js

@@ -147,12 +147,7 @@ const SmartReport = () => {
   }, []);
 
   const initData = () => {
-    const legend = {
-      orient: 'vertical',
-      left: 'left',
-      top: 'center',
-    };
-    const eqOption = getPieOption(data.eqData, legend);
+    const eqOption = getPieOption(data.eqData, true);
     if (eqChartRef.current) eqChartRef.current.setOption(eqOption);
 
     const taskOption = getPieOption(data.taskData);
@@ -161,7 +156,7 @@ const SmartReport = () => {
     const workOption = getPieOption(data.workOrderData);
     if (workChartRef.current) workChartRef.current.setOption(workOption);
 
-    const workScoreOption = getPieOption(data.workScoreData, legend);
+    const workScoreOption = getPieOption(data.workScoreData, true);
     if (workScoreChartRef.current)
       workScoreChartRef.current.setOption(workScoreOption);
   };
@@ -386,7 +381,7 @@ const SmartReport = () => {
                 <div
                   ref={eqDomRef}
                   style={{
-                    height: '4rem',
+                    height: '6rem',
                     width: 'calc(100% - 1.2rem)',
                     margin: '0 0 0 0.8rem',
                   }}
@@ -413,7 +408,7 @@ const SmartReport = () => {
                 <div
                   ref={workScoreDomRef}
                   style={{
-                    height: '4rem',
+                    height: '6rem',
                     width: 'calc(100% - 1.2rem)',
                     margin: '0 0 0 0.8rem',
                   }}
@@ -467,7 +462,7 @@ const SmartReport = () => {
                   <div
                     ref={taskDomRef}
                     style={{
-                      height: '4rem',
+                      height: '6rem',
                       width: '100%',
                       marginTop: '0.2rem',
                     }}
@@ -478,7 +473,7 @@ const SmartReport = () => {
                   <div
                     ref={workDomRef}
                     style={{
-                      height: '4rem',
+                      height: '6rem',
                       width: '100%',
                       marginTop: '0.2rem',
                     }}
@@ -507,7 +502,7 @@ const SmartReport = () => {
   );
 };
 export default SmartReport;
-const getPieOption = (chartData, legend = {}) => {
+const getPieOption = (chartData, isLeft = false) => {
   const option = {
     color: [
       '#5470c6',
@@ -523,19 +518,31 @@ const getPieOption = (chartData, legend = {}) => {
     tooltip: {
       trigger: 'item',
     },
-    legend: {
-      orient: 'horizontal',
-      // left: 'left',
-      textStyle: {
-        color: '#000000',
-        fontSize: 18,
-      },
-      ...legend,
-    },
+    legend: isLeft
+      ? {
+          orient: 'vertical',
+          left: 'left',
+          top: 'center',
+          textStyle: {
+            color: '#000000',
+            fontSize: 12,
+          },
+        }
+      : {
+          orient: 'horizontal',
+          itemWidth: 10,
+          itemHeight: 8,
+          textStyle: {
+            color: '#000000',
+            fontSize: 10,
+          },
+        },
     series: [
       {
         type: 'pie',
-        radius: '60%',
+        top: isLeft ? 0 : '20%',
+        radius: isLeft ? '60%' : '40%',
+        label: isLeft ? {} : { fontSize: 10 },
         data: chartData,
         emphasis: {
           itemStyle: {

+ 3 - 1
src/pages/SmartReport/index.less

@@ -92,6 +92,7 @@
   background-image: -webkit-linear-gradient(#1755ff 0%, #ffffff 80%);
   box-shadow: 0.01rem 0.08rem 0.14rem 0rem rgba(0, 0, 0, 0.1);
   .main_in {
+    padding-top: 0.4rem;
     width: 100%;
     height: 100%;
     border-radius: 0.4rem 0.1rem 0.4rem 0.1rem;
@@ -188,7 +189,8 @@
     color: #3b3b3b;
   }
   .circleContent {
-    padding: 0.4rem 1rem;
+    padding: 0 1rem;
+    margin-bottom: 0.4rem;
     display: flex;
     justify-content: space-around;
   }

+ 82 - 63
src/pages/TaskManage/Detail/TaskList/TaskList.tsx

@@ -17,12 +17,11 @@ 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 } from '@ant-design/icons';
+import { CaretDownFilled } from '@ant-design/icons';
 import {
   Col,
   Collapse,
   CollapseProps,
-  Divider,
   Form,
   Input,
   List,
@@ -217,38 +216,39 @@ const TaskList: React.FC<IPropsType> = (props) => {
       {
         key: '1',
         label: (
-          <span style={{ color: '#5697e4' }}>关联工单({workOrder.length})</span>
+          <span style={{ color: '#ffffff', marginRight: '0.1rem' }}>
+            关联工单({workOrder.length})
+          </span>
         ),
         children: workOrder.map((order) => {
           return (
             <div key={order.Id} className={styles.workOrderCard}>
               <div className={styles.leftInfo}>
-                <Row style={{ marginBottom: '15px' }}>
-                  <Col className={styles.fontS24} span={12}>
+                <Row style={{ marginBottom: '0.15rem' }}>
+                  <Col className={styles.fontS32} span={12}>
                     工单类型:{order.RecordType?.label || '-'}
                   </Col>
-                  <Col className={styles.fontS24} span={12}>
+                  <Col className={styles.fontS32} span={12}>
                     时间:{order.CreateTime}
                   </Col>
                 </Row>
                 <Row>
-                  <Col className={styles.fontS24} span={12}>
+                  <Col className={styles.fontS32} span={12}>
                     工单状态:
                     <span style={{ color: '#5697e4' }}>
                       {order.Status?.label}
                     </span>
                   </Col>
-                  <Col className={styles.fontS24} span={12}>
+                  <Col className={styles.fontS32} span={12}>
                     工单负责人:{order.Responsible?.CName}
                   </Col>
                 </Row>
               </div>
-              <Divider type="vertical" style={{ height: '40px' }} />
+
               <div className={styles.rightButtonContainer}>
                 <div
                   className={styles.rightButton}
                   style={{
-                    color: '#5697e4',
                     marginBottom: `${
                       order.Status?.value === 0 ? '0.15rem' : '0'
                     }`,
@@ -266,7 +266,6 @@ const TaskList: React.FC<IPropsType> = (props) => {
                 {order.Status?.value === 0 && (
                   <div
                     className={styles.rightButton}
-                    style={{ color: '#5697e4' }}
                     onClick={() => {
                       withdrawOrder(order);
                     }}
@@ -283,59 +282,79 @@ const TaskList: React.FC<IPropsType> = (props) => {
 
     return (
       <List.Item style={{ borderBottom: '0' }}>
-        <div className={`${styles.cardContainer} card-box`}>
-          <Row justify="space-between" style={{ marginBottom: '20px' }}>
-            <Col className={styles.fontS24}>时间:{formatItem.CreateTime}</Col>
-            <Col className={styles.fontS24}>
-              任务类别:{formatItem.MandateClass?.label}
-            </Col>
-            <Col className={styles.fontS24}>
-              任务负责人:{formatItem.ResponsiblePeople?.CName || '-'}
-            </Col>
-          </Row>
-          <Row
-            justify="space-between"
+        <div className={`${styles.cardContainer} `}>
+          <span
             style={{
-              paddingBottom: '10px',
-              borderBottom: '1px solid #D5D5D5',
+              width: '0.2rem',
+              height: '2.05rem',
+              position: 'absolute',
+              background: 'rgba(23, 85, 255, 0.20)',
             }}
-          >
-            <Col className={styles.fontS24}>
-              任务状态:{formatItem.Status?.label || '-'}
-            </Col>
-            <Col>
-              <div
-                className={styles.fontS24}
-                style={{
-                  backgroundColor: '#f5a623',
-                  color: 'white',
-                  width: '150px',
-                  height: '50px',
-                  display: 'flex',
-                  justifyContent: 'center',
-                  alignItems: 'center',
-                }}
-                onClick={() => {
-                  goTaskDetail(item);
-                }}
-              >
-                任务详情
-              </div>
-            </Col>
-          </Row>
-          <Row>
-            <Collapse
-              className={styles.collapseLabel}
-              ghost
-              expandIcon={({ isActive }) => (
-                <DownOutlined
-                  style={{ color: '#5697e4' }}
-                  rotate={isActive ? 180 : 0}
-                />
-              )}
-              items={collapseData}
-            />
-          </Row>
+          />
+          <div className={styles.cardInfo}>
+            <Row
+              justify="start"
+              style={{
+                padding: '0.2rem 0.2rem 0 0.4rem',
+                maxHeight: '0.7rem',
+              }}
+            >
+              <Col span={12} className={styles.fontS32}>
+                时间: {formatItem.CreateTime}
+              </Col>
+              <Col className={styles.fontS32}>
+                任务类别: {formatItem.MandateClass?.label}
+              </Col>
+            </Row>
+            <Row
+              justify="start"
+              style={{
+                padding: '0.2rem 0.2rem 0 0.4rem',
+                maxHeight: '0.75rem',
+              }}
+            >
+              <Col span={12} className={styles.fontS32}>
+                任务负责人: {formatItem.ResponsiblePeople?.CName || '-'}
+              </Col>
+              <Col span={8} className={styles.fontS32}>
+                任务状态: {formatItem.Status?.label || '-'}
+              </Col>
+              <Col>
+                <div
+                  className={styles.fontS32}
+                  style={{
+                    backgroundColor: '#f5a623',
+                    color: 'white',
+                    width: '2rem',
+                    letterSpacing: '0.05rem',
+                    height: '0.55rem',
+                    display: 'flex',
+                    justifyContent: 'center',
+                    alignItems: 'center',
+                    borderRadius: '0.5rem',
+                  }}
+                  onClick={() => {
+                    goTaskDetail(item);
+                  }}
+                >
+                  任务详情
+                </div>
+              </Col>
+            </Row>
+            <Row>
+              <Collapse
+                className={styles.collapseLabel}
+                ghost
+                expandIcon={({ isActive }) => (
+                  <CaretDownFilled
+                    style={{ color: '#ffffff' }}
+                    rotate={isActive ? 180 : 0}
+                  />
+                )}
+                items={collapseData}
+              />
+            </Row>
+          </div>
         </div>
       </List.Item>
     );
@@ -349,7 +368,7 @@ const TaskList: React.FC<IPropsType> = (props) => {
       <TopFilter filters={topFiltersConfig} onChange={onTopFilterChange} />
 
       <ScrollLoading
-        height={180}
+        height={190}
         loading={loading || loadData}
         pagination={pagination}
         handleLoadData={(current: number) =>

+ 46 - 13
src/pages/TaskManage/Detail/TaskList/taskList.less

@@ -1,42 +1,64 @@
 .cardContainer {
-  width: 100%;
-  padding: 0.2rem 0.2rem 0.1rem 0.2rem;
-  margin-left: 0.05rem;
+  display: flex;
+  flex-grow: 1;
+  margin-left: 0.1rem;
+  margin-right: 0.2rem;
   background-color: white;
+  background: #ffffff;
+  box-shadow: 0rem 0rem 0.2rem 0 rgba(0, 0, 0, 0.15);
+
+  .cardInfo {
+    width: 100%;
+  }
 
   .collapseLabel {
     width: 100%;
     .ant-collapse-arrow {
-      font-size: 0.24rem;
+      font-size: 0.32rem;
     }
     :global {
       .ant-collapse-item {
         margin-bottom: 0;
       }
+
+      .ant-collapse-item:last-child > .ant-collapse-header {
+        border-radius: 0;
+      }
+
       .ant-collapse-header {
+        height: 0.5rem;
+        background: url('@/assets/TaskManage/viewOrder@2x.png') no-repeat center;
+        background-size: 25% 100%;
         justify-content: center;
         flex-direction: row-reverse;
         align-items: center;
         margin-top: 0.1rem;
+        border-bottom: 0.02rem solid #1755ff;
 
         .ant-collapse-header-text {
-          font-size: 0.24rem;
+          font-size: 0.32rem;
           flex: unset;
           margin-inline-end: unset;
         }
         .ant-collapse-arrow {
-          font-size: 0.24rem;
+          font-size: 0.32rem;
         }
       }
+      .ant-collapse-content-box {
+        padding: 0;
+      }
+
+      .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {
+        padding-block: 0;
+      }
     }
 
     .workOrderCard {
-      margin-bottom: 0.2rem;
-      padding: 0.2rem 0.1rem;
-      border-radius: 0.08rem;
-      background-color: #e5effa;
+      margin-bottom: 0.1rem;
+      padding: 0.2rem;
       display: flex;
       align-items: center;
+      background-color: rgba(23, 85, 255, 0.06);
 
       .leftInfo {
         width: 80%;
@@ -47,15 +69,22 @@
         display: flex;
         flex-direction: column;
         justify-content: space-between;
+        align-items: center;
       }
 
       .rightButton {
-        width: 100%;
-        color: #5697e4;
-        font-size: 0.24rem;
+        background-color: #fff;
+        border-radius: 0.5rem;
+        width: 1.5rem;
+        letter-spacing: 0.05rem;
+        color: rgba(23, 85, 255, 1);
+        font-size: 0.32rem;
         text-align: center;
       }
     }
+    .workOrderCard:last-child {
+      margin-bottom: 0;
+    }
   }
 }
 
@@ -116,6 +145,10 @@
   }
 }
 
+.fontS32 {
+  font-size: 0.32rem;
+}
+
 .fontS28 {
   font-size: 0.28rem;
 }

+ 58 - 37
src/pages/TaskManage/components/TopFilter.tsx

@@ -1,6 +1,7 @@
 import { ITopFilter } from '@/pages/TaskManage/Detail/TaskList/taskList.types';
-import { Col, Row, Select } from 'antd';
+import { Col, Divider, Row, Select } from 'antd';
 
+import { CaretDownFilled } from '@ant-design/icons';
 import { useState } from 'react';
 import '../index.less';
 
@@ -15,44 +16,64 @@ const TopFilter: React.FC<IProps> = ({ filters, onChange }) => {
   );
 
   return (
-    <Row justify="space-around" style={{ margin: '30px 0 20px' }}>
+    <Row
+      justify="space-around"
+      style={{
+        margin: '0.3rem 0 0.1rem 0',
+        borderBottom: '0.01rem solid #BCBABA',
+        padding: '0.1rem 0',
+      }}
+    >
       {filters.map((item, index) => {
         return (
-          <Col
-            key={item.key}
-            span={Math.floor(22 / filters.length)}
-            style={{ textAlign: 'center' }}
-          >
-            <Select
-              className="antdSelect"
-              size="large"
-              bordered={false}
-              placeholder={item.placeholder}
-              options={item.options}
-              popupMatchSelectWidth={250}
-              allowClear
-              onChange={(value) => {
-                const temp = filters.map((f, i) => {
-                  if (index === i) {
-                    return value !== undefined ? value : null;
-                  }
-                  return values[i] || null;
-                });
-                setValues(temp);
-                onChange(temp);
-              }}
-              onClear={() => {
-                const temp = filters.map((f, i) => {
-                  if (index === i) {
-                    return null;
-                  }
-                  return values[i];
-                });
-                setValues(temp);
-                onChange(temp);
-              }}
-            />
-          </Col>
+          <>
+            <Col
+              key={item.key}
+              span={Math.floor(22 / filters.length)}
+              style={{ textAlign: 'center' }}
+            >
+              <Select
+                className="antdSelect"
+                size="large"
+                bordered={false}
+                placeholder={item.placeholder}
+                options={item.options}
+                popupMatchSelectWidth={250}
+                allowClear
+                suffixIcon={<CaretDownFilled />}
+                onChange={(value) => {
+                  const temp = filters.map((f, i) => {
+                    if (index === i) {
+                      return value !== undefined ? value : null;
+                    }
+                    return values[i] || null;
+                  });
+                  setValues(temp);
+                  onChange(temp);
+                }}
+                onClear={() => {
+                  const temp = filters.map((f, i) => {
+                    if (index === i) {
+                      return null;
+                    }
+                    return values[i];
+                  });
+                  setValues(temp);
+                  onChange(temp);
+                }}
+              />
+            </Col>
+            {index !== filters.length - 1 && (
+              <Divider
+                type="vertical"
+                style={{
+                  width: '0.01rem',
+                  height: '0.4rem',
+                  background: '#BCBABA',
+                }}
+              />
+            )}
+          </>
         );
       })}
     </Row>

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

@@ -57,15 +57,20 @@
 .antdSelect .ant-select-selection-item,
 .antdSelect .ant-select-selection-placeholder,
 .ant-select-item-option-content {
-  font-size: 0.28rem;
+  font-size: 0.36rem;
   color: black;
   margin-right: 0.1rem;
 }
+
+.antdSelect .ant-select-selector {
+  margin-right: 0.3rem !important;
+}
+
 .ant-select-item-option {
   padding: 0.08rem !important;
 }
 .ant-select-arrow {
-  font-size: 0.24rem !important;
+  font-size: 0.36rem !important;
   color: black !important;
 }
 

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

@@ -8,9 +8,10 @@ import { List, Spin } from 'antd';
 import { BaseOptionType } from 'rc-select/es/Select';
 import { useEffect, useState } from 'react';
 import { useNavigate } from 'umi';
+import { IUserType } from './Detail/TaskList/taskList.types';
 import { MandateType, OrderType } from './constent';
 
-const TaskManage = (props) => {
+const TaskManage = (props: any) => {
   const { userList, dispatch } = props;
   const { projectID } = useParams();
   const project_id = Number(projectID === '' ? '0' : projectID);