Browse Source

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

xujunjie 1 year ago
parent
commit
1b65ab1ff6

BIN
src/assets/message/check.png


BIN
src/assets/message/work.png


+ 6 - 4
src/components/TabsContent/index.less

@@ -1,18 +1,20 @@
 .tabsTitle {
   display: flex;
   align-items: center;
-  height: 24px;
+  height: 116px;
   margin-bottom: 10px;
   :nth-child(1) {
-    border-right: 1px solid black;
+    border-right: 1px solid #979797;
   }
   :last-child {
     border-right: none;
   }
 }
 .tabsItem {
-  padding: 0 20px;
+  padding: 0 40px;
+  color: #4a4a4a;
+  font-size: 36px;
 }
 .active {
-  color: #5093e3;
+  color: #4a90e2;
 }

+ 9 - 4
src/pages/MessageCenter/index.js

@@ -7,7 +7,8 @@ import { Button } from 'antd';
 import dayjs from 'dayjs';
 import { useState } from 'react';
 import styles from './index.less';
-const icon = require('@/assets/air-conditioner.png');
+const icon1 = require('@/assets/message/work.png');
+const icon2 = require('@/assets/message/check.png');
 
 const MessageCenter = () => {
   const { projectId } = useParams();
@@ -37,16 +38,20 @@ const MessageCenter = () => {
       : '';
     return (
       <div className={`card-box ${styles.itemContent}`}>
-        <img style={{ width: '30px', height: '30px' }} src={icon} />
+        <img className={styles.img} src={tab == '1' ? icon1 : icon2} />
         <div>
-          <div style={{ marginBottom: '30px' }}>{item.MsgBady}</div>
+          <div className={styles.text}>{item.MsgBady}</div>
           <div>{time}</div>
         </div>
         <div className={styles.right}>
           <div
             className={item?.ReadStatus ? styles.redPoint : styles.nonePoint}
           />
-          <Button type="primary" onClick={handlerSeeClick}>
+          <Button
+            className={styles.btn}
+            type="primary"
+            onClick={handlerSeeClick}
+          >
             查看
           </Button>
         </div>

+ 29 - 6
src/pages/MessageCenter/index.less

@@ -1,5 +1,5 @@
 .itemContent {
-  padding: 10px;
+  padding: 38px 40px 26px;
   display: flex;
   justify-content: space-between;
   .right {
@@ -9,20 +9,43 @@
     align-items: end;
     .redPoint {
       background-color: red;
-      width: 10px;
-      height: 10px;
-      border-radius: 5px;
+      width: 18px;
+      height: 18px;
+      border-radius: 9px;
     }
     .nonePoint {
       width: 10px;
       height: 10px;
     }
   }
+  .img {
+    width: 42px;
+    height: 44px;
+  }
+  .text {
+    font-size: 38px;
+    color: #000000;
+    line-height: 54px;
+    margin-bottom: 28px;
+  }
+  .time {
+    font-size: 30px;
+    color: #4a4a4a;
+    line-height: 40px;
+  }
+  .btn {
+    width: 140px;
+    height: 60px;
+    font-size: 30px;
+    color: #ffffff;
+    line-height: 40px;
+  }
 }
 .allRead {
   position: absolute;
-  top: 20px;
+  top: 68px;
   line-height: 24px;
-  right: 60px;
+  right: 104px;
+  font-size: 32px;
   cursor: pointer;
 }

+ 121 - 111
src/pages/SafetyManagement/index.js

@@ -1,27 +1,68 @@
 import PageContent from '@/components/PageContent';
 import TabsContent from '@/components/TabsContent';
-import { queryGateList, queryGateOverView } from '@/services/safety';
+import {
+  queryGateList,
+  queryGateOverView,
+  queryMonitorList,
+  queryMonitorOnlineCount,
+} from '@/services/safety';
+import { UnityAction } from '@/utils/utils';
 import { useNavigate, useParams, useRequest } from '@umijs/max';
 import { Button, Space } from 'antd';
+import { useEffect, useState } from 'react';
 import styles from './index.less';
-const img = require('@/assets/deviceManager/device01.png');
+const img = require('@/assets/air-conditioner.png');
 const chartIcon = require('@/assets/deviceManager/chartIcon.png');
 const DeviceManager = () => {
   const { projectId } = useParams();
+  const [tab, setTab] = useState('1');
 
-  const { data, run, loading } = useRequest(() =>
-    queryGateList({ project_id: projectId }),
+  //门禁接口
+  const { data, run, loading } = useRequest(
+    () => queryGateList({ project_id: projectId }),
+    {
+      manual: true,
+    },
   );
-  const { data: dataOver, loading: loadingOver } = useRequest(() =>
-    queryGateOverView({ project_id: projectId }),
-  );
-  console.log(dataOver);
+  const {
+    data: dataOver,
+    run: runOver,
+    loading: loadingOver,
+  } = useRequest(() => queryGateOverView({ project_id: projectId }), {
+    manual: true,
+  });
+
+  //视频接口
+  const {
+    data: dataVList,
+    run: runVideo,
+    loading: loadingVList,
+  } = useRequest(() => queryMonitorList(projectId));
+  const {
+    data: dataVOnline,
+    run: runVOnLine,
+    loading: loadingVOnline,
+  } = useRequest(() => queryMonitorOnlineCount(projectId));
+
+  useEffect(() => {
+    if (data?.list && tab == '2')
+      UnityAction.sendMsg('doorData', JSON.stringify(data?.list));
+    if (dataVList?.list && tab == '1')
+      UnityAction.sendMsg('camData', JSON.stringify(dataVList?.list));
+  }, [data, dataVList]);
 
   const handleTabChange = (tab) => {
-    tab == '1' ? '' : run();
+    setTab(tab);
+    if (tab == '1') {
+      runVideo();
+      runVOnLine();
+    } else {
+      run();
+      runOver();
+    }
   };
   return (
-    <PageContent style={{ backgroundColor: 'gray' }}>
+    <PageContent>
       <TabsContent
         defaultActiveKey="1"
         onChange={handleTabChange}
@@ -29,7 +70,14 @@ const DeviceManager = () => {
           {
             label: `视频监控`,
             key: '1',
-            children: <Video projectId={projectId} />,
+            children: (
+              <Video
+                data={dataVList?.list}
+                dataOnline={dataVOnline}
+                loading={loadingVList}
+                projectId={projectId}
+              />
+            ),
           },
           {
             label: `门禁`,
@@ -48,33 +96,46 @@ const DeviceManager = () => {
     </PageContent>
   );
 };
-const Video = ({ projectId }) => {
-  const renderRed = () => {
+const Video = ({ projectId, data, dataOnline, loading }) => {
+  const renderRed = (item) => {
     return (
-      <div style={{ display: 'flex', alignItems: 'center' }}>
+      <div className={styles.cardItem}>
         <div
-          style={{
-            backgroundColor: 'red',
-            width: '10px',
-            height: '10px',
-            borderRadius: '5px',
-            marginRight: '10px',
-          }}
+          className={item.Online ? styles.onlinePoint : styles.outlinePoint}
         />
-        <span>哈哈哈</span>
+        <span className={styles.name}>{item.Name}</span>
       </div>
     );
   };
   return (
-    <Space direction="vertical" className={styles.sparePart}>
+    <Space direction="vertical" size={16} className={styles.sparePart}>
       <div className={`card-box ${styles.titleContent}`}>
-        <img className={styles.img} src={img} />
+        <div className={styles.titleLeft}>
+          <img className={styles.img} src={img} />
+          <div className={styles.textCon}>
+            <div className={styles.num}>{dataOnline?.total || 0}</div>
+            <div className={styles.text}>在库数量(个)</div>
+          </div>
+        </div>
         <div>
-          <div className={styles.num}>{0}</div>
-          <div>在库数量(个)</div>
+          <div className={styles.lTextCon1}>
+            <div className={styles.onlinePoint} />
+            <span className={styles.text}>在线:{dataOnline?.online || 0}</span>
+          </div>
+          <div className={styles.lTextCon2}>
+            <div className={styles.outlinePoint} />
+            <span className={styles.text}>
+              离线:{dataOnline?.offline || 0}
+            </span>
+          </div>
         </div>
-        <div>{[1, 2, 3].map((item) => renderRed())}</div>
       </div>
+
+      {data?.map((item, idx) => (
+        <div key={`video_${idx}`} className="card-box">
+          {renderRed(item)}
+        </div>
+      ))}
     </Space>
   );
 };
@@ -87,107 +148,56 @@ const Door = ({ data, dataOver, loading, projectId }) => {
 
   const renderRed = (item) => {
     return (
-      <div style={{ display: 'flex', alignItems: 'center' }}>
+      <div className={styles.cardItem}>
         <div
-          style={{
-            backgroundColor: item?.status ? '12ceb3' : 'red',
-            width: '10px',
-            height: '10px',
-            borderRadius: '5px',
-            marginRight: '10px',
-          }}
+          className={item?.status ? styles.onlinePoint : styles.outlinePoint}
         />
-        <span>{item?.name}</span>
+        <span className={styles.name}>{item?.name}</span>
       </div>
     );
   };
   return (
-    <div>
-      <div
-        style={{
-          display: 'flex',
-          justifyContent: 'space-between',
-          marginBottom: '10px',
-        }}
-      >
-        <div className="card-box" style={{ width: '49%' }}>
-          <div
-            className={styles.titleTwoContent}
-            style={{ width: '100%', marginBottom: '10px' }}
-          >
+    <Space direction="vertical" size={16} className={styles.doorPart}>
+      <div className={styles.titleContent}>
+        <div className={`card-box ${styles.cardLeft}`}>
+          <div className={styles.up}>
             <img className={styles.img} src={img} />
-            <div>
+            <div className={styles.textCon}>
               <div className={styles.num}>{dataOver?.total}</div>
-              <div>在库数量(个)</div>
+              <div className={styles.text}>门禁数量(个)</div>
             </div>
           </div>
-          <div style={{ display: 'flex', justifyContent: 'space-around' }}>
-            <div style={{ display: 'flex', alignItems: 'center' }}>
-              <div
-                style={{
-                  backgroundColor: '#12ceb3',
-                  width: '10px',
-                  height: '10px',
-                  borderRadius: '5px',
-                  marginRight: '10px',
-                }}
-              />
-              <span>在线:{dataOver.online}</span>
+          <div className={styles.bottom}>
+            <div className={styles.lTextCon2}>
+              <div className={styles.onlinePoint} />
+              <span className={styles.text}>在线:{dataOver?.online}</span>
             </div>
-            <div style={{ display: 'flex', alignItems: 'center' }}>
-              <div
-                style={{
-                  backgroundColor: 'gray',
-                  width: '10px',
-                  height: '10px',
-                  borderRadius: '5px',
-                  marginRight: '10px',
-                }}
-              />
-              <span>离线:{dataOver.offline}</span>
+            <div className={styles.lTextCon2}>
+              <div className={styles.outlinePoint} />
+              <span className={styles.text}>离线:{dataOver?.offline}</span>
             </div>
           </div>
         </div>
-        <div className={`card-box ${styles.titleTwoContent}`}>
-          <div
-            style={{ display: 'flex', flexDirection: 'column', height: '80%' }}
-          >
-            <div style={{ display: 'flex', alignItems: 'center' }}>
-              <div
-                style={{
-                  backgroundColor: '#4a90e2',
-                  width: '10px',
-                  height: '10px',
-                  borderRadius: '5px',
-                  marginRight: '10px',
-                }}
-              />
-              <span>今日进厂人数:{dataOver.online}</span>
-            </div>
-            <div style={{ display: 'flex', alignItems: 'center' }}>
-              <div
-                style={{
-                  backgroundColor: '#f5a623',
-                  width: '10px',
-                  height: '10px',
-                  borderRadius: '5px',
-                  marginRight: '10px',
-                }}
-              />
-              <span>今日出厂人数:{dataOver.online}</span>
-            </div>
-            <Button onClick={handleClick}>门禁日志</Button>
+        <div className={`card-box ${styles.cardRight}`}>
+          <div className={styles.textContent}>
+            <div className={styles.in} />
+            <span className={styles.text}>今日进厂人数:{2}</span>
+          </div>
+          <div className={styles.textContent}>
+            <div className={styles.out} />
+            <span className={styles.text}>今日出厂人数:{2}</span>
           </div>
+          <Button className={styles.btn} onClick={handleClick}>
+            门禁日志
+          </Button>
         </div>
       </div>
-      <Space direction="vertical" className={styles.sparePart}>
-        {data?.map((item) => (
-          <div className="card-box" style={{ padding: '10px' }}>
-            {renderRed(item)}
-          </div>
-        ))}
-      </Space>
-    </div>
+      {data?.map((item, idx) => (
+        <div key={`door_${idx}`} className="card-box">
+          {renderRed(item)}
+        </div>
+      ))}
+    </Space>
   );
 };
 

+ 112 - 19
src/pages/SafetyManagement/index.less

@@ -2,38 +2,131 @@
   position: absolute;
   right: 0;
 }
-.titleContent {
-  position: relative;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-}
-.titleTwoContent {
-  position: relative;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  width: 49%;
-}
+
 .img {
-  width: 30%;
+  width: 154px;
+  margin-right: 20px;
 }
 .num {
-  color: #ffc400;
-  font-size: 36px;
-  margin-bottom: 20px;
+  font-size: 80px;
+  font-weight: bold;
+  line-height: 94px;
+  margin-bottom: 16px;
+  color: #4a90e2;
+}
+.point {
+  width: 20px;
+  height: 20px;
+  border-radius: 10px;
+  margin-right: 12px;
+}
+.onlinePoint {
+  .point;
+  background-color: #12ceb3;
+}
+.outlinePoint {
+  .point;
+  background-color: #9b9b9b;
 }
 .rightIcon {
   position: absolute;
   right: 20px;
   top: 20px;
 }
+.cardItem {
+  display: flex;
+  padding: 40px 44px 32px;
+  align-items: center;
+  .name {
+    font-size: 36px;
+    color: #000000;
+  }
+}
+.lTextCon2 {
+  display: flex;
+  align-items: center;
+}
+.text {
+  font-size: 28px;
+  color: #4a4a4a;
+  line-height: 38px;
+}
 .sparePart {
   width: 100%;
-  .cardItem {
+  .titleContent {
+    position: relative;
     display: flex;
-    padding: 10px;
     justify-content: space-between;
     align-items: center;
+    padding: 48px 212px 28px 104px;
+    .titleLeft {
+      display: flex;
+      .textCon {
+        text-align: center;
+        margin: auto;
+      }
+    }
+    .lTextCon1 {
+      .lTextCon2;
+      margin-bottom: 32px;
+    }
+  }
+}
+.doorPart {
+  width: 100%;
+  .titleContent {
+    display: flex;
+    justify-content: space-between;
+    .cardLeft {
+      width: 49%;
+      .up {
+        display: flex;
+        align-items: center;
+        margin-top: 32px;
+        margin-left: 48px;
+        .img {
+          width: 154px;
+          // height: 130px;
+          margin-right: 40px;
+        }
+        .textCon {
+          text-align: center;
+        }
+      }
+      .bottom {
+        display: flex;
+        margin: 28px 0 6px;
+        justify-content: space-around;
+      }
+    }
+    .cardRight {
+      width: 49%;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      padding: 28px 114px 32px 112px;
+      .btn {
+        width: 157px;
+        height: 55px;
+        background: rgba(222, 237, 255, 0.91);
+        border-radius: 6px;
+        padding: 8px 26px;
+        font-size: 28px;
+        color: #329bfe;
+        line-height: 38px;
+      }
+      .in {
+        .point;
+        background-color: #4a90e2;
+      }
+      .out {
+        .point;
+        background-color: #f5a623;
+      }
+      .textContent {
+        display: flex;
+        align-items: center;
+      }
+    }
   }
 }

+ 8 - 2
src/pages/TaskManage/Detail/TaskDetail/TaskDetail.tsx

@@ -15,7 +15,7 @@ import {
 import { getMandateDetail } from '@/services/TaskManage';
 import { useLocation } from '@@/exports';
 import { connect, useRequest } from '@umijs/max';
-import { Button, Col, Divider, Row, Table } from 'antd';
+import { Button, Col, Divider, Row } from 'antd';
 import { useEffect, useState } from 'react';
 import { useNavigate } from 'umi';
 import styles from './taskDetail.less';
@@ -86,7 +86,7 @@ function TaskDetail(props: IPropsType) {
     }
   }, []);
 
-  const goTaskOrder = (orderID: number, orderType:number) => {
+  const goTaskOrder = (orderID: number, orderType: number) => {
     navigate(
       `/task-manage/list/order-detail?project_id=${project_id}&order_id=${orderID}&order_type=${orderType}`,
     );
@@ -99,11 +99,14 @@ function TaskDetail(props: IPropsType) {
         <div className={styles.normalInfo}>
           <Row className={styles.infoRow}>
             <Col span={16}>时间:{mandateDetail?.CreateTime}</Col>
+            {/*// @ts-ignore*/}
             <Col span={8}>任务类别:{mandateDetail?.MandateClass?.label}</Col>
           </Row>
           <Row>
+            {/*// @ts-ignore*/}
             <Col span={16}>任务状态:{mandateDetail?.Status?.label}</Col>
             <Col span={8}>
+              {/*// @ts-ignore*/}
               任务负责人:{mandateDetail?.ResponsiblePeople?.CName}
             </Col>
           </Row>
@@ -135,9 +138,11 @@ function TaskDetail(props: IPropsType) {
                     <Col span={12}>
                       工单状态:
                       <span style={{ color: '#5697e4' }}>
+                        {/*// @ts-ignore*/}
                         {order.Status?.label}
                       </span>
                     </Col>
+                    {/*// @ts-ignore*/}
                     <Col span={12}>工单负责人:{order.Responsible?.CName}</Col>
                   </Row>
                 </div>
@@ -148,6 +153,7 @@ function TaskDetail(props: IPropsType) {
                     type="text"
                     ghost
                     onClick={() => {
+                      // @ts-ignore
                       goTaskOrder(order.Id, order.RecordType?.value);
                     }}
                   >

+ 2 - 6
src/pages/TaskManage/Detail/TaskList/TaskList.tsx

@@ -50,8 +50,6 @@ const TaskList: React.FC<IPropsType> = (props) => {
   /**
    * 处理选择器变化
    * @param value 选择的值,当清空时等于null
-   * @param item
-   * @param index
    */
   const onTopFilterChange = (value: any) => {
     if (topFilters.length === 0) {
@@ -122,7 +120,6 @@ const TaskList: React.FC<IPropsType> = (props) => {
       options: MandateStatus.map((item) => {
         return {
           ...item,
-          key: item.value + '任务状态',
         };
       }),
     });
@@ -163,6 +160,7 @@ const TaskList: React.FC<IPropsType> = (props) => {
     const workOrder = item.Records.map((record) => {
       return {
         ...record,
+        key: record.Id,
         Status: OrderStatus.find((status) => status.value === record.Status),
         RecordType: OrderType.find((type) => type.value === record.RecordType),
         Responsible: userList.find((user) => user.ID === record.Responsible),
@@ -197,8 +195,7 @@ const TaskList: React.FC<IPropsType> = (props) => {
               <div className={styles.rightButton}>
                 <Button
                   style={{ color: '#5697e4' }}
-                  type="text"
-                  ghost
+                  type='text'
                   onClick={() => {
                     goTaskOrder(order.Id, order.RecordType?.value);
                   }}
@@ -234,7 +231,6 @@ const TaskList: React.FC<IPropsType> = (props) => {
                 <Button
                   style={{ color: 'white' }}
                   type="text"
-                  ghost
                   onClick={() => {
                     goTaskDetail(item);
                   }}

+ 6 - 6
src/pages/TaskManage/Detail/TaskList/taskList.types.ts

@@ -1,5 +1,5 @@
 import { IMandateType } from '@/pages/TaskManage/index.types';
-import { BaseOptionType } from 'rc-select/es/Select';
+import { DefaultOptionType } from 'rc-select/es/Select';
 
 export interface IPropsType {
   userList: IUserType[];
@@ -27,23 +27,23 @@ export interface IWorkOrderType {
   Id: number;
   Note: string;
   PlanDoneTime: string;
-  RecordType: number | BaseOptionType;
+  RecordType: number | DefaultOptionType;
   Responsible: number | IUserType;
-  Status: number | BaseOptionType;
+  Status: number | DefaultOptionType;
 }
 
 export interface IMandateDetailType {
   Id: number;
   ProjectId: number;
-  MandateType: number | BaseOptionType;
-  MandateClass: number | BaseOptionType;
+  MandateType: number | DefaultOptionType;
+  MandateClass: number | DefaultOptionType;
   ResponsiblePeople: number | IUserType;
   Detail: string;
   MandateChild: IMandateChildType[];
   Records: IWorkOrderType[];
   Summary: string;
   CreateTime: string;
-  Status: number | BaseOptionType;
+  Status: number | DefaultOptionType;
   Note: string;
   OperationLog: string;
   OperationPeople: number;

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

@@ -11,7 +11,7 @@ import {
 import { useLocation } from '@@/exports';
 import { connect, useRequest } from '@umijs/max';
 import { Col, Row } from 'antd';
-import { BaseOptionType } from 'rc-select/es/Select';
+import { DefaultOptionType } from "rc-select/es/Select";
 import React, { useEffect, useState } from 'react';
 import styles from './taskOrder.less';
 
@@ -26,7 +26,7 @@ interface IOrderInfo {
   RepairTime: string;
   Reason: string;
   Repairman: string | IUserType;
-  OrderStatus: string | BaseOptionType;
+  OrderStatus: string | DefaultOptionType;
 }
 
 const TaskOrder: React.FC<IPropsType> = (props) => {
@@ -81,7 +81,6 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
   const { run: getCraftDetail } = useRequest(getCraftRecordList, {
     manual: true,
     formatResult: (result) => {
-      console.log(result.data.list[0]);
       const temp = result.data.list[0];
       const tempDetail = {
         CreateTime: temp.start_time,
@@ -119,6 +118,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
     }
   }, []);
 
+
   return (
     <PageContent>
       <PageTitle returnable>工单详情</PageTitle>
@@ -129,10 +129,12 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
             <Row className={styles.rowMargin}>
               <Col span={16}>时间:{'-'}</Col>
               <Col span={8}>
+                {/*// @ts-ignore*/}
                 工单负责人:{orderInfo?.Repairman?.CName || '-'}
               </Col>
             </Row>
             <Row className={styles.rowMargin}>
+              {/*// @ts-ignore*/}
               <Col span={16}>工单状态:{orderInfo?.OrderStatus?.label}</Col>
               <Col span={8}>派单人员:{'-'}</Col>
             </Row>

+ 2 - 4
src/pages/TaskManage/components/TopFilter.tsx

@@ -9,14 +9,12 @@ interface IProps {
 
 const TopFilter: React.FC<IProps> = ({ filters, onChange }) => {
   const [values, setValues] = useState<any[]>([]);
-
   return (
     <div style={{ display: 'flex', justifyContent: 'center' }}>
       {filters.map((item, index) => {
         return (
-          <>
+          <div key={item.key}>
             <Select
-              key={`${index}${item.placeholder}`}
               style={{ width: 120 }}
               size="large"
               bordered={false}
@@ -37,7 +35,7 @@ const TopFilter: React.FC<IProps> = ({ filters, onChange }) => {
             {filters.length > 1 && index !== filters.length - 1 && (
               <Divider type="vertical" style={{ margin: '0 30px' }} />
             )}
-          </>
+          </div>
         );
       })}
     </div>

+ 12 - 0
src/pages/TaskManage/constent.ts

@@ -83,6 +83,18 @@ export const MandateClass = [
     MandateType: 3,
     OrderType: 2,
   },
+  {
+    value: 14,
+    label: '数据超限',
+    MandateType: 3,
+    OrderType: 2,
+  },
+  {
+    value: 15,
+    label: '备品预警',
+    MandateType: 3,
+    OrderType: 2,
+  },
 ];
 
 export const MandateType = [

+ 4 - 4
src/pages/TaskManage/index.types.ts

@@ -1,5 +1,5 @@
 import { IWorkOrderType } from '@/pages/TaskManage/Detail/TaskList/taskList.types';
-import { BaseOptionType } from 'rc-select/es/Select';
+import { DefaultOptionType } from 'rc-select/es/Select';
 
 export interface IPropTypes {
   mandateList: IMandateType[];
@@ -10,13 +10,13 @@ export interface IPropTypes {
 export interface IMandateType {
   Id: number;
   ProjectId: number;
-  MandateType: number | BaseOptionType;
-  MandateClass: number | BaseOptionType;
+  MandateType: number | DefaultOptionType;
+  MandateClass: number | DefaultOptionType;
   ResponsiblePeople: number;
   Detail: string;
   Summary: string;
   CreateTime: string;
-  Status: number | BaseOptionType;
+  Status: number | DefaultOptionType;
   Note: string;
   OperationLog: string;
   OperationPeople: number;

+ 8 - 0
src/services/safety.js

@@ -9,3 +9,11 @@ export async function queryGateOpList(params = {}) {
 export async function queryGateOverView(params = {}) {
   return request(`/api/iot/v1/gate/overview?${stringify(params)}`);
 }
+//视频列表
+export async function queryMonitorList(projectId) {
+  return request(`/api/v1/monitor/list/${projectId}`);
+}
+//视频状态
+export async function queryMonitorOnlineCount(projectId) {
+  return request(`/api/v1/monitor/online_count/${projectId}`);
+}