From 6403286fa4a4905e008ac9effecd5fd367d2da85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Tue, 23 Aug 2022 09:01:29 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E7=9B=91=E7=9D=A3=E5=92=8C=E4=BA=8B=E5=90=8E=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router_transfer.ts | 15 ++ .../Online/components/OnlineSupervision.tsx | 205 ++++++++++++++++++ .../Online/components/ReservedItems.tsx | 184 ++++++++++++++++ src/pages/VideoMonitor/Online/index.tsx | 34 +++ src/pages/VideoMonitor/Online/service.ts | 11 + src/pages/VideoMonitor/Post/index.tsx | 205 ++++++++++++++++++ src/pages/VideoMonitor/Post/service.ts | 11 + src/pages/VideoMonitor/ViewModal.tsx | 39 ++++ 8 files changed, 704 insertions(+) create mode 100644 src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx create mode 100644 src/pages/VideoMonitor/Online/components/ReservedItems.tsx create mode 100644 src/pages/VideoMonitor/Online/index.tsx create mode 100644 src/pages/VideoMonitor/Online/service.ts create mode 100644 src/pages/VideoMonitor/Post/index.tsx create mode 100644 src/pages/VideoMonitor/Post/service.ts create mode 100644 src/pages/VideoMonitor/ViewModal.tsx diff --git a/config/router_transfer.ts b/config/router_transfer.ts index 0a255ad..712d68e 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -102,5 +102,20 @@ export default [ }, ], }, + { + path: '/VideoMonitor', + routes: [ + { + name: 'Online', + path: '/VideoMonitor/Online', + component: './VideoMonitor/Online', + }, + { + name: 'Post', + path: '/VideoMonitor/Post', + component: './VideoMonitor/Post', + }, + ], + }, ] diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx new file mode 100644 index 0000000..7ca20fa --- /dev/null +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -0,0 +1,205 @@ +import { isNotEmpty } from '@/utils/CommonUtils'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { Button, Spin } from 'antd'; +import React, { useRef, useState } from 'react'; +import { useHistory } from 'umi'; +import ViewModal from '../../ViewModal'; +import { getPage } from '../service'; + +interface ViewDetailsProps { + entity?: { + projectName?:string|null, + projectNumber?:string|null, + } | null, + visibleDefault?:boolean| false, +} +/** + * 在线监督列表 + * @returns + */ +const OnlineSupervision: React.FC<{}> = () => { + + const [spin, spinSet] = useState(false); + const [visible, setVisible] = useState(false); + const [record, setRecord] = useState([]); + //查询分页数据 + const [pageData, pageDataSet] = useState({ + pageNo: 1, + pageSize: 10 + }); + const history = useHistory(); + const ref = useRef(); + + //查看详情 + const viewDetails = (record: any) => { + setVisible(true); + setRecord(record); + } + + //关闭 + const closeViewDetails = () => { + setVisible(false); + } + + //在线监督 + function supervision(record: any): void { + throw new Error('Function not implemented.'); + } + + const columns: ProColumns[] = [ + + { + valueType: 'index', + align: 'center', + hideInSearch: true, + }, + { + title: '项目名称', + align: 'center', + dataIndex: 'projectName', + width: '20%', + hideInSearch: false, + }, + { + title: '项目编号', + align: 'center', + dataIndex: 'projectNumber', + hideInSearch: true, + }, + { + title: '标段', + align: 'center', + dataIndex: 'sectionName', + hideInSearch: true, + }, + { + title: '评审室名称', + align: 'center', + dataIndex: 'reviewRoomName', + hideInSearch: false, + width: '10%', + }, + { + title: '预计评标开始时间', + align: 'center', + dataIndex: 'startTime', + hideInSearch: true, + width: '15%', + }, + { + title: '预计评标结束时间', + align: 'center', + dataIndex: 'endTime', + hideInSearch: true, + width: '9.5%', + }, + { + title: '状态', + align: 'center', + dataIndex: 'state', + hideInSearch: true, + width: '4.5%', + valueEnum: { + 0: { + text: '未开始' + }, + 1: { + text: '评标中' + }, + 2: { + text: '已结束' + }, + } + }, + { + title: '操作', + align: 'center', + valueType: 'option', + width: '9%', + render: (_: any, record: any) => + ( + <> + + + + ) + }, + ] + + return ( + +
+ { + // spinSet(true); + // return await getPage({ + // ...params, + // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + // }).then((res) => { + // const result = { + // data: res.data.records, + // total: res.data.total, + // success: res.success, + // pageSize: res.data.size, + // current: res.data.current + // } + // return result; + // }).finally(() => { + // isNotEmpty(window.location.search) && history.push(window.location.pathname); + // spinSet(false); + // }) + return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', + projectNumber: 'SS25102022000211', + sectionName: '标段一', + reviewRoomName: '集团第一评审室', + state : 1, + startTime : '2022-07-13 12:30', + endTime : '2022-07-13 12:30'}], + total:1, + pageSize:10, + current:1} + + } + } + pagination={{ + defaultPageSize: 10, + pageSizeOptions: [10, 20, 30, 50], + defaultCurrent: 1, + size: "small", + showSizeChanger: true, + onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }), + onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }), + }} + onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} + rowKey={"id"} + /> +
+ closeViewDetails()} data = {record}/> +
+ ) +} +export default OnlineSupervision; + diff --git a/src/pages/VideoMonitor/Online/components/ReservedItems.tsx b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx new file mode 100644 index 0000000..80a6f2f --- /dev/null +++ b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx @@ -0,0 +1,184 @@ +import { isNotEmpty } from '@/utils/CommonUtils'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { Button, Spin, Modal } from 'antd'; +import React, { useRef, useState } from 'react'; +import { useHistory } from 'umi'; +import ViewModal from '../../ViewModal'; +import { getPage } from '../service'; + +/** + * 预约项目列表 + * @returns + */ +const ReservedItems: React.FC<{}> = () => { + + const [spin, spinSet] = useState(false); + const [visible, setVisible] = useState(false); + const [record, setRecord] = useState([]); + //查询分页数据 + const [pageData, pageDataSet] = useState({ + pageNo: 1, + pageSize: 10 + }); + const history = useHistory(); + const ref = useRef(); + + //查看详情 + const viewDetails = (record: any) => { + setVisible(true); + setRecord(record); + } + + //关闭 + const closeViewDetails = () => { + setVisible(false); + } + + const columns: ProColumns[] = [ + + { + valueType: 'index', + align: 'center', + hideInSearch: true, + }, + { + title: '项目名称', + align: 'center', + dataIndex: 'projectName', + width: '20%', + hideInSearch: false, + }, + { + title: '项目编号', + align: 'center', + dataIndex: 'projectNumber', + hideInSearch: true, + }, + { + title: '标段', + align: 'center', + dataIndex: 'sectionName', + hideInSearch: true, + }, + { + title: '评审室名称', + align: 'center', + dataIndex: 'reviewRoomName', + hideInSearch: false, + width: '10%', + }, + { + title: '预计评标开始时间', + align: 'center', + dataIndex: 'startTime', + hideInSearch: true, + width: '15%', + }, + { + title: '预计评标结束时间', + align: 'center', + dataIndex: 'endTime', + hideInSearch: true, + width: '9.5%', + }, + { + title: '状态', + align: 'center', + dataIndex: 'state', + hideInSearch: true, + width: '4.5%', + valueEnum: { + 0: { + text: '未开始' + }, + 1: { + text: '评标中' + }, + 2: { + text: '已结束' + }, + } + }, + { + title: '操作', + align: 'center', + valueType: 'option', + width: '4.5%', + render: (_: any, record: any) => + ( + <> + + + ) + }, + ] + + return ( + +
+ { + // spinSet(true); + // return await getPage({ + // ...params, + // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + // }).then((res) => { + // const result = { + // data: res.data.records, + // total: res.data.total, + // success: res.success, + // pageSize: res.data.size, + // current: res.data.current + // } + // return result; + // }).finally(() => { + // isNotEmpty(window.location.search) && history.push(window.location.pathname); + // spinSet(false); + // }) + return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', + projectNumber: 'SS25102022000211', + sectionName: '标段一', + reviewRoomName: '集团第一评审室', + state : 0, + startTime : '2022-07-13 12:30', + endTime : '2022-07-13 12:30'}], + total:1, + pageSize:10, + current:1} + + } + } + pagination={{ + defaultPageSize: 10, + pageSizeOptions: [10, 20, 30, 50], + defaultCurrent: 1, + size: "small", + showSizeChanger: true, + onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }), + onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }), + }} + onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} + rowKey={"id"} + /> +
+ closeViewDetails()} data = {record}/> +
+ ) +} +export default ReservedItems; + diff --git a/src/pages/VideoMonitor/Online/index.tsx b/src/pages/VideoMonitor/Online/index.tsx new file mode 100644 index 0000000..2e27f91 --- /dev/null +++ b/src/pages/VideoMonitor/Online/index.tsx @@ -0,0 +1,34 @@ +import { Card, Radio } from 'antd'; +import React, { useState } from 'react'; +import OnlineSupervision from './components/OnlineSupervision'; +import ReservedItems from './components/ReservedItems'; +/** + * 在线监督 + * @returns + */ +const OnlineIndex: React.FC<{}> = () => { + //radio value + const [mode, setMode] = useState('OnlineSupervision'); + + const handleModeChange = (e: any) => { + const mode = e.target.value; + setMode(mode); + }; + + return ( + + + 在线监督 + 预约项目 + + { + mode === 'OnlineSupervision' ? ( + + ) : ( + + ) + } + + ) +} +export default OnlineIndex; \ No newline at end of file diff --git a/src/pages/VideoMonitor/Online/service.ts b/src/pages/VideoMonitor/Online/service.ts new file mode 100644 index 0000000..415ab84 --- /dev/null +++ b/src/pages/VideoMonitor/Online/service.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request'; +/** + * 查询数据并分页 + * @param params + */ +export async function getPage(params?: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/supervisor/getPage', { + method: 'POST', + data: params, + }); +} \ No newline at end of file diff --git a/src/pages/VideoMonitor/Post/index.tsx b/src/pages/VideoMonitor/Post/index.tsx new file mode 100644 index 0000000..527b87a --- /dev/null +++ b/src/pages/VideoMonitor/Post/index.tsx @@ -0,0 +1,205 @@ +import { isNotEmpty } from '@/utils/CommonUtils'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import { Button, Spin } from 'antd'; +import React, { useRef, useState } from 'react'; +import { useHistory } from 'umi'; +import ViewModal from '../ViewModal'; +import { getPage } from '../service'; + +interface ViewDetailsProps { + entity?: { + projectName?:string|null, + projectNumber?:string|null, + } | null, + visibleDefault?:boolean| false, +} +/** + * 事后监督列表 + * @returns + */ +const PostSupervision: React.FC<{}> = () => { + + const [spin, spinSet] = useState(false); + const [visible, setVisible] = useState(false); + const [record, setRecord] = useState([]); + //查询分页数据 + const [pageData, pageDataSet] = useState({ + pageNo: 1, + pageSize: 10 + }); + const history = useHistory(); + const ref = useRef(); + + //查看详情 + const viewDetails = (record: any) => { + setVisible(true); + setRecord(record); + } + + //关闭 + const closeViewDetails = () => { + setVisible(false); + } + + //评标监控回看 + function reviewMonitor(record: any): void { + throw new Error('Function not implemented.'); + } + + const columns: ProColumns[] = [ + + { + valueType: 'index', + align: 'center', + hideInSearch: true, + }, + { + title: '项目名称', + align: 'center', + dataIndex: 'projectName', + width: '20%', + hideInSearch: false, + }, + { + title: '项目编号', + align: 'center', + dataIndex: 'projectNumber', + hideInSearch: true, + }, + { + title: '标段', + align: 'center', + dataIndex: 'sectionName', + hideInSearch: true, + }, + { + title: '评审室名称', + align: 'center', + dataIndex: 'reviewRoomName', + hideInSearch: false, + width: '10%', + }, + { + title: '预计评标开始时间', + align: 'center', + dataIndex: 'startTime', + hideInSearch: true, + width: '15%', + }, + { + title: '预计评标结束时间', + align: 'center', + dataIndex: 'endTime', + hideInSearch: true, + width: '9.5%', + }, + { + title: '状态', + align: 'center', + dataIndex: 'state', + hideInSearch: true, + width: '4.5%', + valueEnum: { + 0: { + text: '未开始' + }, + 1: { + text: '评标中' + }, + 2: { + text: '已结束' + }, + } + }, + { + title: '操作', + align: 'center', + valueType: 'option', + width: '10%', + render: (_: any, record: any) => + ( + <> + + + + ) + }, + ] + + return ( + +
+ { + // spinSet(true); + // return await getPage({ + // ...params, + // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + // }).then((res) => { + // const result = { + // data: res.data.records, + // total: res.data.total, + // success: res.success, + // pageSize: res.data.size, + // current: res.data.current + // } + // return result; + // }).finally(() => { + // isNotEmpty(window.location.search) && history.push(window.location.pathname); + // spinSet(false); + // }) + return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', + projectNumber: 'SS25102022000211', + sectionName: '标段一', + reviewRoomName: '集团第一评审室', + state : 2, + startTime : '2022-07-13 12:30', + endTime : '2022-07-13 12:30'}], + total:1, + pageSize:10, + current:1} + + } + } + pagination={{ + defaultPageSize: 10, + pageSizeOptions: [10, 20, 30, 50], + defaultCurrent: 1, + size: "small", + showSizeChanger: true, + onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }), + onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }), + }} + onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }} + rowKey={"id"} + /> +
+ closeViewDetails()} data = {record}/> +
+ ) +} +export default PostSupervision; + diff --git a/src/pages/VideoMonitor/Post/service.ts b/src/pages/VideoMonitor/Post/service.ts new file mode 100644 index 0000000..415ab84 --- /dev/null +++ b/src/pages/VideoMonitor/Post/service.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request'; +/** + * 查询数据并分页 + * @param params + */ +export async function getPage(params?: any) { + return request('/api/biz-service-ebtp-project/v1/projectRecord/supervisor/getPage', { + method: 'POST', + data: params, + }); +} \ No newline at end of file diff --git a/src/pages/VideoMonitor/ViewModal.tsx b/src/pages/VideoMonitor/ViewModal.tsx new file mode 100644 index 0000000..a1d9ca8 --- /dev/null +++ b/src/pages/VideoMonitor/ViewModal.tsx @@ -0,0 +1,39 @@ +import { Spin, Modal } from 'antd'; +import React, { useState } from 'react'; +import JgtzsModal from '../ZYuShen/Calibration/ProjectManager/ResultNotice/components/JgtzsModal'; + +interface ViewDetailsProps { + modalVisible: boolean; //开启关闭控制 + onCancel: () => void; //关闭方法传入 + data: any //数据传入 + } + +/** + * 详情弹出层 + * @returns + */ + const ViewDetails: React.FC = (props) => { + const {modalVisible, onCancel, data} = props; + const [spin, spinSet] = useState(false); + return ( {onCancel()}} + title={
+ 详情 + {data?.projectName} +
} + footer={null} + width={1000} + > + + +

Some contents...

+

Some contents...

+

Some contents...

+

Some contents...

+

Some contents...

+
) +} +export default ViewDetails; + From 5d4af6b17e2a3e5362e4b1cd4e2436360610c14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Tue, 23 Aug 2022 09:55:49 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E3=80=81=E4=BA=8B=E5=90=8E=E7=9B=91=E7=9D=A3=E9=9D=99=E6=80=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VideoMonitor/Online/components/OnlineSupervision.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx index 7ca20fa..2588f8e 100644 --- a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -1,6 +1,6 @@ import { isNotEmpty } from '@/utils/CommonUtils'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { Button, Spin } from 'antd'; +import { Button, Spin, message } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../../ViewModal'; @@ -43,7 +43,7 @@ const OnlineSupervision: React.FC<{}> = () => { //在线监督 function supervision(record: any): void { - throw new Error('Function not implemented.'); + message. } const columns: ProColumns[] = [ From 2af1052516d22afa6f044445a3972e4ce745b4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Tue, 23 Aug 2022 09:57:46 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E3=80=81=E4=BA=8B=E5=90=8E=E7=9B=91=E7=9D=A3=E9=9D=99=E6=80=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Online/components/OnlineSupervision.tsx | 2 +- src/pages/VideoMonitor/Post/index.tsx | 4 +- src/pages/VideoMonitor/ViewModal.tsx | 106 ++++++++++++++++-- 3 files changed, 100 insertions(+), 12 deletions(-) diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx index 2588f8e..1cd872c 100644 --- a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -43,7 +43,7 @@ const OnlineSupervision: React.FC<{}> = () => { //在线监督 function supervision(record: any): void { - message. + message.warn('功能开发中....'); } const columns: ProColumns[] = [ diff --git a/src/pages/VideoMonitor/Post/index.tsx b/src/pages/VideoMonitor/Post/index.tsx index 527b87a..25d7c33 100644 --- a/src/pages/VideoMonitor/Post/index.tsx +++ b/src/pages/VideoMonitor/Post/index.tsx @@ -1,6 +1,6 @@ import { isNotEmpty } from '@/utils/CommonUtils'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { Button, Spin } from 'antd'; +import { Button, Spin, message } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../ViewModal'; @@ -43,7 +43,7 @@ const PostSupervision: React.FC<{}> = () => { //评标监控回看 function reviewMonitor(record: any): void { - throw new Error('Function not implemented.'); + message.warn('功能开发中....'); } const columns: ProColumns[] = [ diff --git a/src/pages/VideoMonitor/ViewModal.tsx b/src/pages/VideoMonitor/ViewModal.tsx index a1d9ca8..5ac7e3b 100644 --- a/src/pages/VideoMonitor/ViewModal.tsx +++ b/src/pages/VideoMonitor/ViewModal.tsx @@ -1,12 +1,42 @@ -import { Spin, Modal } from 'antd'; +import { Spin, Modal, Descriptions, Table } from 'antd'; +import type { ColumnsType } from 'antd/es/table'; import React, { useState } from 'react'; -import JgtzsModal from '../ZYuShen/Calibration/ProjectManager/ResultNotice/components/JgtzsModal'; interface ViewDetailsProps { modalVisible: boolean; //开启关闭控制 onCancel: () => void; //关闭方法传入 data: any //数据传入 - } +} + +interface DataType { + key: string; + userName: string; + reportStatus: string; + reportTime: string; +} + +const columns: ColumnsType = [ + { + title: '序号', + dataIndex: 'key', + key: 'key', + }, + { + title: '人员', + dataIndex: 'userName', + key: 'userName', + }, + { + title: '报到状态', + dataIndex: 'reportStatus', + key: 'reportStatus', + }, + { + title: '报到时间', + dataIndex: 'reportTime', + key: 'reportTime', + }, + ]; /** * 详情弹出层 @@ -15,6 +45,53 @@ interface ViewDetailsProps { const ViewDetails: React.FC = (props) => { const {modalVisible, onCancel, data} = props; const [spin, spinSet] = useState(false); + const repostData :DataType[] = [ + { + key: '1', + userName: '1(0001)', + reportStatus: '已报道', + reportTime: '2022-07-02 15:22', + }, + { + key: '2', + userName: '2(0002)', + reportStatus: '已报道', + reportTime: '2022-07-02 15:22', + }, + { + key: '3', + userName: '3(0003)', + reportStatus: '已报道', + reportTime: '2022-07-02 15:22', + }, + { + key: '4', + userName: '4(0004)', + reportStatus: '未报道', + reportTime: '2022-07-02 15:22', + }, + { + key: '5', + userName: '5(0005)', + reportStatus: '已报道', + reportTime: '2022-07-02 15:22', + }, + ]; + const getStateName = (state:any) => { + let result = null; + switch(state){ + case 0: + result = '未开始'; + break; + case 1: + result = '评标中'; + break; + case 2: + result = '已结束'; + break; + } + return result; + } return ( - -

Some contents...

-

Some contents...

-

Some contents...

-

Some contents...

-

Some contents...

+ + + {data?.projectNumber} + {data?.sectionName} + {data?.reviewRoomName} + {getStateName(data?.state)} + {data?.startTime} + {data?.endTime} + 2022-07-13 12:30 + 2022-07-15 15:00 + 5人 + 2人 + 1人 + +

报道信息

+ + ) } export default ViewDetails; From 8c7c3ea7d62bd67aeb7cc645034ea296a485291b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Tue, 23 Aug 2022 11:27:07 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Online/components/OnlineSupervision.tsx | 82 +++++---- .../Online/components/ReservedItems.tsx | 161 +++++++++--------- src/pages/VideoMonitor/Post/index.tsx | 87 +++++----- src/pages/VideoMonitor/Post/service.ts | 11 -- src/pages/VideoMonitor/ViewModal.tsx | 2 +- .../VideoMonitor/{Online => }/service.ts | 2 +- 6 files changed, 161 insertions(+), 184 deletions(-) delete mode 100644 src/pages/VideoMonitor/Post/service.ts rename src/pages/VideoMonitor/{Online => }/service.ts (66%) diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx index 1cd872c..c10aea3 100644 --- a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -4,7 +4,7 @@ import { Button, Spin, message } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../../ViewModal'; -import { getPage } from '../service'; +import { getPage } from '../../service'; interface ViewDetailsProps { entity?: { @@ -18,7 +18,6 @@ interface ViewDetailsProps { * @returns */ const OnlineSupervision: React.FC<{}> = () => { - const [spin, spinSet] = useState(false); const [visible, setVisible] = useState(false); const [record, setRecord] = useState([]); @@ -47,7 +46,6 @@ const OnlineSupervision: React.FC<{}> = () => { } const columns: ProColumns[] = [ - { valueType: 'index', align: 'center', @@ -63,52 +61,61 @@ const OnlineSupervision: React.FC<{}> = () => { { title: '项目编号', align: 'center', - dataIndex: 'projectNumber', + dataIndex: 'projectNum', hideInSearch: true, }, { title: '标段', align: 'center', - dataIndex: 'sectionName', + dataIndex: 'packageNames', hideInSearch: true, }, { title: '评审室名称', align: 'center', - dataIndex: 'reviewRoomName', + dataIndex: 'areaName', hideInSearch: false, width: '10%', }, { title: '预计评标开始时间', align: 'center', - dataIndex: 'startTime', + dataIndex: 'reserveStartDate', hideInSearch: true, width: '15%', }, { title: '预计评标结束时间', align: 'center', - dataIndex: 'endTime', + dataIndex: 'reserveEndDate', hideInSearch: true, width: '9.5%', }, { title: '状态', align: 'center', - dataIndex: 'state', + dataIndex: 'status', hideInSearch: true, width: '4.5%', valueEnum: { - 0: { - text: '未开始' + '-1': { + text: '待确认' }, - 1: { - text: '评标中' + '0': { + text: '未开启' }, - 2: { + '1': { + text: '进行中' + }, + '2': { text: '已结束' }, + '3': { + text: '已取消' + }, + '4': { + text: '结束未使用' + }, } }, { @@ -154,34 +161,25 @@ const OnlineSupervision: React.FC<{}> = () => { search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { - // spinSet(true); - // return await getPage({ - // ...params, - // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, - // }).then((res) => { - // const result = { - // data: res.data.records, - // total: res.data.total, - // success: res.success, - // pageSize: res.data.size, - // current: res.data.current - // } - // return result; - // }).finally(() => { - // isNotEmpty(window.location.search) && history.push(window.location.pathname); - // spinSet(false); - // }) - return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', - projectNumber: 'SS25102022000211', - sectionName: '标段一', - reviewRoomName: '集团第一评审室', - state : 1, - startTime : '2022-07-13 12:30', - endTime : '2022-07-13 12:30'}], - total:1, - pageSize:10, - current:1} - + spinSet(true); + return await getPage({ + ...params, + basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + queryType: 1, + areaRoomName: params.areaName + }).then((res) => { + const result = { + data: res.data.records, + total: res.data.total, + success: res.success, + pageSize: res.data.size, + current: res.data.current + } + return result; + }).finally(() => { + isNotEmpty(window.location.search) && history.push(window.location.pathname); + spinSet(false); + }) } } pagination={{ diff --git a/src/pages/VideoMonitor/Online/components/ReservedItems.tsx b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx index 80a6f2f..4a40b4e 100644 --- a/src/pages/VideoMonitor/Online/components/ReservedItems.tsx +++ b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx @@ -4,7 +4,7 @@ import { Button, Spin, Modal } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../../ViewModal'; -import { getPage } from '../service'; +import { getPage } from '../../service'; /** * 预约项目列表 @@ -35,68 +35,76 @@ const ReservedItems: React.FC<{}> = () => { } const columns: ProColumns[] = [ - - { - valueType: 'index', - align: 'center', - hideInSearch: true, - }, - { - title: '项目名称', - align: 'center', - dataIndex: 'projectName', - width: '20%', - hideInSearch: false, - }, - { - title: '项目编号', - align: 'center', - dataIndex: 'projectNumber', - hideInSearch: true, - }, - { - title: '标段', - align: 'center', - dataIndex: 'sectionName', - hideInSearch: true, - }, - { - title: '评审室名称', - align: 'center', - dataIndex: 'reviewRoomName', - hideInSearch: false, - width: '10%', - }, - { - title: '预计评标开始时间', - align: 'center', - dataIndex: 'startTime', - hideInSearch: true, - width: '15%', - }, - { - title: '预计评标结束时间', - align: 'center', - dataIndex: 'endTime', - hideInSearch: true, - width: '9.5%', - }, + { + valueType: 'index', + align: 'center', + hideInSearch: true, + }, + { + title: '项目名称', + align: 'center', + dataIndex: 'projectName', + width: '20%', + hideInSearch: false, + }, + { + title: '项目编号', + align: 'center', + dataIndex: 'projectNum', + hideInSearch: true, + }, + { + title: '标段', + align: 'center', + dataIndex: 'packageNames', + hideInSearch: true, + }, + { + title: '评审室名称', + align: 'center', + dataIndex: 'areaName', + hideInSearch: false, + width: '10%', + }, + { + title: '预计评标开始时间', + align: 'center', + dataIndex: 'reserveStartDate', + hideInSearch: true, + width: '15%', + }, + { + title: '预计评标结束时间', + align: 'center', + dataIndex: 'reserveEndDate', + hideInSearch: true, + width: '9.5%', + }, { title: '状态', align: 'center', - dataIndex: 'state', + dataIndex: 'status', hideInSearch: true, width: '4.5%', valueEnum: { - 0: { - text: '未开始' + '-1': { + text: '待确认' }, - 1: { - text: '评标中' + '0': { + text: '未开启' }, - 2: { + '1': { + text: '进行中' + }, + '2': { text: '已结束' }, + '3': { + text: '已取消' + }, + '4': { + text: '结束未使用' + }, } }, { @@ -133,34 +141,25 @@ const ReservedItems: React.FC<{}> = () => { search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { - // spinSet(true); - // return await getPage({ - // ...params, - // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, - // }).then((res) => { - // const result = { - // data: res.data.records, - // total: res.data.total, - // success: res.success, - // pageSize: res.data.size, - // current: res.data.current - // } - // return result; - // }).finally(() => { - // isNotEmpty(window.location.search) && history.push(window.location.pathname); - // spinSet(false); - // }) - return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', - projectNumber: 'SS25102022000211', - sectionName: '标段一', - reviewRoomName: '集团第一评审室', - state : 0, - startTime : '2022-07-13 12:30', - endTime : '2022-07-13 12:30'}], - total:1, - pageSize:10, - current:1} - + spinSet(true); + return await getPage({ + ...params, + basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + queryType: 0, + areaRoomName: params.areaName + }).then((res) => { + const result = { + data: res.data.records, + total: res.data.total, + success: res.success, + pageSize: res.data.size, + current: res.data.current + } + return result; + }).finally(() => { + isNotEmpty(window.location.search) && history.push(window.location.pathname); + spinSet(false); + }) } } pagination={{ diff --git a/src/pages/VideoMonitor/Post/index.tsx b/src/pages/VideoMonitor/Post/index.tsx index 25d7c33..cf854b9 100644 --- a/src/pages/VideoMonitor/Post/index.tsx +++ b/src/pages/VideoMonitor/Post/index.tsx @@ -6,19 +6,11 @@ import { useHistory } from 'umi'; import ViewModal from '../ViewModal'; import { getPage } from '../service'; -interface ViewDetailsProps { - entity?: { - projectName?:string|null, - projectNumber?:string|null, - } | null, - visibleDefault?:boolean| false, -} /** * 事后监督列表 * @returns */ const PostSupervision: React.FC<{}> = () => { - const [spin, spinSet] = useState(false); const [visible, setVisible] = useState(false); const [record, setRecord] = useState([]); @@ -47,7 +39,6 @@ const PostSupervision: React.FC<{}> = () => { } const columns: ProColumns[] = [ - { valueType: 'index', align: 'center', @@ -63,52 +54,61 @@ const PostSupervision: React.FC<{}> = () => { { title: '项目编号', align: 'center', - dataIndex: 'projectNumber', + dataIndex: 'projectNum', hideInSearch: true, }, { title: '标段', align: 'center', - dataIndex: 'sectionName', + dataIndex: 'packageNames', hideInSearch: true, }, { title: '评审室名称', align: 'center', - dataIndex: 'reviewRoomName', + dataIndex: 'areaName', hideInSearch: false, width: '10%', }, { title: '预计评标开始时间', align: 'center', - dataIndex: 'startTime', + dataIndex: 'reserveStartDate', hideInSearch: true, width: '15%', }, { title: '预计评标结束时间', align: 'center', - dataIndex: 'endTime', + dataIndex: 'reserveEndDate', hideInSearch: true, width: '9.5%', }, { title: '状态', align: 'center', - dataIndex: 'state', + dataIndex: 'status', hideInSearch: true, width: '4.5%', valueEnum: { - 0: { - text: '未开始' + '-1': { + text: '待确认' }, - 1: { - text: '评标中' + '0': { + text: '未开启' }, - 2: { + '1': { + text: '进行中' + }, + '2': { text: '已结束' }, + '3': { + text: '已取消' + }, + '4': { + text: '结束未使用' + }, } }, { @@ -154,34 +154,25 @@ const PostSupervision: React.FC<{}> = () => { search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { - // spinSet(true); - // return await getPage({ - // ...params, - // basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, - // }).then((res) => { - // const result = { - // data: res.data.records, - // total: res.data.total, - // success: res.success, - // pageSize: res.data.size, - // current: res.data.current - // } - // return result; - // }).finally(() => { - // isNotEmpty(window.location.search) && history.push(window.location.pathname); - // spinSet(false); - // }) - return {data:[{projectName: '2022年中国联通集团大厦A1913会议室智能化改造项目', - projectNumber: 'SS25102022000211', - sectionName: '标段一', - reviewRoomName: '集团第一评审室', - state : 2, - startTime : '2022-07-13 12:30', - endTime : '2022-07-13 12:30'}], - total:1, - pageSize:10, - current:1} - + spinSet(true); + return await getPage({ + ...params, + basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize }, + queryType: 2, + areaRoomName: params.areaName + }).then((res) => { + const result = { + data: res.data.records, + total: res.data.total, + success: res.success, + pageSize: res.data.size, + current: res.data.current + } + return result; + }).finally(() => { + isNotEmpty(window.location.search) && history.push(window.location.pathname); + spinSet(false); + }) } } pagination={{ diff --git a/src/pages/VideoMonitor/Post/service.ts b/src/pages/VideoMonitor/Post/service.ts deleted file mode 100644 index 415ab84..0000000 --- a/src/pages/VideoMonitor/Post/service.ts +++ /dev/null @@ -1,11 +0,0 @@ -import request from '@/utils/request'; -/** - * 查询数据并分页 - * @param params - */ -export async function getPage(params?: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/supervisor/getPage', { - method: 'POST', - data: params, - }); -} \ No newline at end of file diff --git a/src/pages/VideoMonitor/ViewModal.tsx b/src/pages/VideoMonitor/ViewModal.tsx index 5ac7e3b..cc7da17 100644 --- a/src/pages/VideoMonitor/ViewModal.tsx +++ b/src/pages/VideoMonitor/ViewModal.tsx @@ -108,7 +108,7 @@ const columns: ColumnsType = [ {data?.projectNumber} {data?.sectionName} - {data?.reviewRoomName} + {data?.areaRoomName} {getStateName(data?.state)} {data?.startTime} {data?.endTime} diff --git a/src/pages/VideoMonitor/Online/service.ts b/src/pages/VideoMonitor/service.ts similarity index 66% rename from src/pages/VideoMonitor/Online/service.ts rename to src/pages/VideoMonitor/service.ts index 415ab84..1777360 100644 --- a/src/pages/VideoMonitor/Online/service.ts +++ b/src/pages/VideoMonitor/service.ts @@ -4,7 +4,7 @@ import request from '@/utils/request'; * @param params */ export async function getPage(params?: any) { - return request('/api/biz-service-ebtp-project/v1/projectRecord/supervisor/getPage', { + return request('/api/biz-service-ebtp-evaluation//v1/eval/room/reserve/supervise/list', { method: 'POST', data: params, }); From 2f5b0a3bb4f1f9b08a9295cd583eeeff5403932a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Tue, 23 Aug 2022 17:32:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E3=80=81=E4=BA=8B=E5=90=8E=E7=9B=91=E7=9D=A3=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Online/components/OnlineSupervision.tsx | 19 +- .../Online/components/ReservedItems.tsx | 12 +- src/pages/VideoMonitor/Online/service.ts | 11 ++ src/pages/VideoMonitor/Post/index.tsx | 10 +- src/pages/VideoMonitor/ViewModal.tsx | 186 +++++++++++------- src/pages/VideoMonitor/service.ts | 22 ++- 6 files changed, 165 insertions(+), 95 deletions(-) create mode 100644 src/pages/VideoMonitor/Online/service.ts diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx index c10aea3..c922bcf 100644 --- a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -1,18 +1,11 @@ import { isNotEmpty } from '@/utils/CommonUtils'; -import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import ProTable, { ProColumns } from '@ant-design/pro-table'; import { Button, Spin, message } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../../ViewModal'; import { getPage } from '../../service'; -interface ViewDetailsProps { - entity?: { - projectName?:string|null, - projectNumber?:string|null, - } | null, - visibleDefault?:boolean| false, -} /** * 在线监督列表 * @returns @@ -20,21 +13,18 @@ interface ViewDetailsProps { const OnlineSupervision: React.FC<{}> = () => { const [spin, spinSet] = useState(false); const [visible, setVisible] = useState(false); - const [record, setRecord] = useState([]); //查询分页数据 const [pageData, pageDataSet] = useState({ pageNo: 1, pageSize: 10 }); const history = useHistory(); - const ref = useRef(); - + const viewModalRef = useRef(null); //查看详情 const viewDetails = (record: any) => { setVisible(true); - setRecord(record); + viewModalRef.current?.InitData(record.id); } - //关闭 const closeViewDetails = () => { setVisible(false); @@ -157,7 +147,6 @@ const OnlineSupervision: React.FC<{}> = () => { options={false} bordered={false} size='small' - actionRef={ref} search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { @@ -195,7 +184,7 @@ const OnlineSupervision: React.FC<{}> = () => { rowKey={"id"} /> - closeViewDetails()} data = {record}/> + closeViewDetails()} ref = {viewModalRef}/> ) } diff --git a/src/pages/VideoMonitor/Online/components/ReservedItems.tsx b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx index 4a40b4e..5a52e23 100644 --- a/src/pages/VideoMonitor/Online/components/ReservedItems.tsx +++ b/src/pages/VideoMonitor/Online/components/ReservedItems.tsx @@ -1,6 +1,6 @@ import { isNotEmpty } from '@/utils/CommonUtils'; -import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; -import { Button, Spin, Modal } from 'antd'; +import ProTable, { ProColumns } from '@ant-design/pro-table'; +import { Button, Spin } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; import ViewModal from '../../ViewModal'; @@ -14,19 +14,18 @@ const ReservedItems: React.FC<{}> = () => { const [spin, spinSet] = useState(false); const [visible, setVisible] = useState(false); - const [record, setRecord] = useState([]); //查询分页数据 const [pageData, pageDataSet] = useState({ pageNo: 1, pageSize: 10 }); const history = useHistory(); - const ref = useRef(); + const viewModalRef = useRef(null); //查看详情 const viewDetails = (record: any) => { setVisible(true); - setRecord(record); + viewModalRef.current?.InitData(record.id); } //关闭 @@ -137,7 +136,6 @@ const ReservedItems: React.FC<{}> = () => { options={false} bordered={false} size='small' - actionRef={ref} search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { @@ -175,7 +173,7 @@ const ReservedItems: React.FC<{}> = () => { rowKey={"id"} /> - closeViewDetails()} data = {record}/> + closeViewDetails()} ref = {viewModalRef}/> ) } diff --git a/src/pages/VideoMonitor/Online/service.ts b/src/pages/VideoMonitor/Online/service.ts new file mode 100644 index 0000000..1777360 --- /dev/null +++ b/src/pages/VideoMonitor/Online/service.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request'; +/** + * 查询数据并分页 + * @param params + */ +export async function getPage(params?: any) { + return request('/api/biz-service-ebtp-evaluation//v1/eval/room/reserve/supervise/list', { + method: 'POST', + data: params, + }); +} \ No newline at end of file diff --git a/src/pages/VideoMonitor/Post/index.tsx b/src/pages/VideoMonitor/Post/index.tsx index cf854b9..cdf1089 100644 --- a/src/pages/VideoMonitor/Post/index.tsx +++ b/src/pages/VideoMonitor/Post/index.tsx @@ -1,5 +1,5 @@ import { isNotEmpty } from '@/utils/CommonUtils'; -import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; +import ProTable, { ProColumns } from '@ant-design/pro-table'; import { Button, Spin, message } from 'antd'; import React, { useRef, useState } from 'react'; import { useHistory } from 'umi'; @@ -13,19 +13,18 @@ import { getPage } from '../service'; const PostSupervision: React.FC<{}> = () => { const [spin, spinSet] = useState(false); const [visible, setVisible] = useState(false); - const [record, setRecord] = useState([]); //查询分页数据 const [pageData, pageDataSet] = useState({ pageNo: 1, pageSize: 10 }); const history = useHistory(); - const ref = useRef(); + const viewModalRef = useRef(null); //查看详情 const viewDetails = (record: any) => { setVisible(true); - setRecord(record); + viewModalRef.current?.InitData(record.id); } //关闭 @@ -150,7 +149,6 @@ const PostSupervision: React.FC<{}> = () => { options={false} bordered={false} size='small' - actionRef={ref} search={{ labelWidth: 'auto', span: 6 }} loading={false} request={async (params) => { @@ -188,7 +186,7 @@ const PostSupervision: React.FC<{}> = () => { rowKey={"id"} /> - closeViewDetails()} data = {record}/> + closeViewDetails()} ref = {viewModalRef}/> ) } diff --git a/src/pages/VideoMonitor/ViewModal.tsx b/src/pages/VideoMonitor/ViewModal.tsx index cc7da17..38f8f5b 100644 --- a/src/pages/VideoMonitor/ViewModal.tsx +++ b/src/pages/VideoMonitor/ViewModal.tsx @@ -1,18 +1,38 @@ -import { Spin, Modal, Descriptions, Table } from 'antd'; +import { Spin, Modal, Descriptions, Table, message } from 'antd'; import type { ColumnsType } from 'antd/es/table'; -import React, { useState } from 'react'; +import React, { useState, useImperativeHandle, forwardRef } from 'react'; +import { getReservationInfo, getReportInfo } from './service'; interface ViewDetailsProps { modalVisible: boolean; //开启关闭控制 onCancel: () => void; //关闭方法传入 - data: any //数据传入 +} + +interface ReportInfo { + expertAmount ?: string; + purchaseExpertAmount ?: string; + manageAmount ?: string; + userList ?: DataType[]; } interface DataType { - key: string; - userName: string; - reportStatus: string; - reportTime: string; + key ?: string; + userName ?: string; + status: number; + reportStatus ?: string; + signDate ?: string; +} + +interface ReservationInfo { + projectName ?: string; + projectNum ?: string; + packageNames ?: string; + areaName ?: string; + reserveStartDate ?: string; + reserveEndDate ?: string; + status: number; + realStartDate ?: string; + realEndDate ?: string; } const columns: ColumnsType = [ @@ -33,8 +53,8 @@ const columns: ColumnsType = [ }, { title: '报到时间', - dataIndex: 'reportTime', - key: 'reportTime', + dataIndex: 'signDate', + key: 'signDate', }, ]; @@ -42,53 +62,87 @@ const columns: ColumnsType = [ * 详情弹出层 * @returns */ - const ViewDetails: React.FC = (props) => { - const {modalVisible, onCancel, data} = props; - const [spin, spinSet] = useState(false); - const repostData :DataType[] = [ - { - key: '1', - userName: '1(0001)', - reportStatus: '已报道', - reportTime: '2022-07-02 15:22', - }, - { - key: '2', - userName: '2(0002)', - reportStatus: '已报道', - reportTime: '2022-07-02 15:22', - }, - { - key: '3', - userName: '3(0003)', - reportStatus: '已报道', - reportTime: '2022-07-02 15:22', - }, - { - key: '4', - userName: '4(0004)', - reportStatus: '未报道', - reportTime: '2022-07-02 15:22', - }, - { - key: '5', - userName: '5(0005)', - reportStatus: '已报道', - reportTime: '2022-07-02 15:22', - }, - ]; - const getStateName = (state:any) => { - let result = null; + const ViewDetails: React.FC = forwardRef((props,ref) => { + const {modalVisible, onCancel} = props; + const [initReservationInfo, setInitReservationInfo] = useState(false); + const [initReportInfo, setInitReportInfo] = useState(false); + const [reservationInfo, setReservationInfo] = useState(); + const [reportInfo, setReportInfo] = useState(); + const InitData = (id:string) => { + setInitReservationInfo(true); + setInitReportInfo(true); + //获取预约信息 + getReservationInfo(id) + .then((res) => { + if (res.code == 200) { + setReservationInfo(res.data); + }else{ + message.error(res.message); + } + }) + .catch(res => { + message.error(res.message); + }) + .finally(() => { + setInitReservationInfo(false); + }); + //获取报道信息 + getReportInfo(id) + .then((res) => { + if (res.code == 200) { + let _data: DataType[] = res.data.userList; + _data?.forEach((item, index) =>{ + item.key = (index + 1).toString(); + item.reportStatus = getReportStatus(item.status); + }) + setReportInfo(res.data); + }else{ + message.error(res.message); + } + }) + .catch(res => { + message.error(res.message); + }) + .finally(() => { + setInitReportInfo(false); + }) + } + useImperativeHandle(ref, () => ({ + InitData, + })); + const getStatus = (state: number) => { + let result = ''; switch(state){ - case 0: - result = '未开始'; + case -1: + result = '待确认'; break; - case 1: - result = '评标中'; + case 0: + result = '未开启'; break; - case 2: + case 1: + result = '进行中'; + break; + case 2: result = '已结束'; break; + case 3: + result = '已取消'; + break; + case 4: + result = '结束为使用'; + break; + } + return result; + } + const getReportStatus = (state:number) => { + let result = ''; + switch(state){ + case 0: + result = '未报道'; + break; + case 1: + result = '已报道'; + break; } return result; } @@ -98,30 +152,30 @@ const columns: ColumnsType = [ onCancel = {() => {onCancel()}} title={
详情 - {data?.projectName} + {reservationInfo?.projectName}
} footer={null} width={1000} > - + - {data?.projectNumber} - {data?.sectionName} - {data?.areaRoomName} - {getStateName(data?.state)} - {data?.startTime} - {data?.endTime} - 2022-07-13 12:30 - 2022-07-15 15:00 - 5人 - 2人 - 1人 + {reservationInfo?.projectNum} + {reservationInfo?.packageNames} + {reservationInfo?.areaName} + {reservationInfo?getStatus(reservationInfo?.status):''} + {reservationInfo?.reserveStartDate} + {reservationInfo?.reserveEndDate} + {reservationInfo?.realStartDate} + {reservationInfo?.realEndDate} + {reportInfo?.expertAmount}人 + {reportInfo?.purchaseExpertAmount}人 + {reportInfo?.manageAmount}人

报道信息

-
+
) -} +}) export default ViewDetails; diff --git a/src/pages/VideoMonitor/service.ts b/src/pages/VideoMonitor/service.ts index 1777360..0f62e29 100644 --- a/src/pages/VideoMonitor/service.ts +++ b/src/pages/VideoMonitor/service.ts @@ -4,8 +4,28 @@ import request from '@/utils/request'; * @param params */ export async function getPage(params?: any) { - return request('/api/biz-service-ebtp-evaluation//v1/eval/room/reserve/supervise/list', { + return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/supervise/list', { method: 'POST', data: params, }); +} + +/** + * 查询预约信息 + * @param params + */ + export async function getReservationInfo(params?: string) { + return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/' + params, { + method: 'GET' + }); +} + +/** + * 查询报道信息 + * @param params + */ + export async function getReportInfo(params?: string) { + return request('/api/biz-service-ebtp-evaluation/v1/eleceval/user/number/report/' + params, { + method: 'GET' + }); } \ No newline at end of file From c0e2564b4a14c29f68b31822269f6c4dd29317df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=85?= Date: Thu, 25 Aug 2022 14:44:05 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/router.config.ts | 16 ++++++++++++++++ config/router_transfer.ts | 16 ---------------- .../Online/components/OnlineSupervision.tsx | 2 +- src/pages/VideoMonitor/Post/index.tsx | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/router.config.ts b/config/router.config.ts index 46b1726..d39c5cc 100644 --- a/config/router.config.ts +++ b/config/router.config.ts @@ -323,6 +323,22 @@ export default [ }, ] }, + //在线监督和事后监督 + { + path: '/VideoMonitor', + routes: [ + { + name: 'Online', + path: '/VideoMonitor/Online', + component: './VideoMonitor/Online', + }, + { + name: 'Post', + path: '/VideoMonitor/Post', + component: './VideoMonitor/Post', + }, + ], + }, {//账号信息管理-代理机构管理员 name: 'Account', icon: 'form', diff --git a/config/router_transfer.ts b/config/router_transfer.ts index 712d68e..fe00262 100644 --- a/config/router_transfer.ts +++ b/config/router_transfer.ts @@ -102,20 +102,4 @@ export default [ }, ], }, - { - path: '/VideoMonitor', - routes: [ - { - name: 'Online', - path: '/VideoMonitor/Online', - component: './VideoMonitor/Online', - }, - { - name: 'Post', - path: '/VideoMonitor/Post', - component: './VideoMonitor/Post', - }, - ], - }, - ] diff --git a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx index c922bcf..d2d1d28 100644 --- a/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx +++ b/src/pages/VideoMonitor/Online/components/OnlineSupervision.tsx @@ -32,7 +32,7 @@ const OnlineSupervision: React.FC<{}> = () => { //在线监督 function supervision(record: any): void { - message.warn('功能开发中....'); + window.open("/MonitorScreen/ProjectMonitorRoom?monitorId=" + record.id); } const columns: ProColumns[] = [ diff --git a/src/pages/VideoMonitor/Post/index.tsx b/src/pages/VideoMonitor/Post/index.tsx index cdf1089..05d7ac6 100644 --- a/src/pages/VideoMonitor/Post/index.tsx +++ b/src/pages/VideoMonitor/Post/index.tsx @@ -34,7 +34,7 @@ const PostSupervision: React.FC<{}> = () => { //评标监控回看 function reviewMonitor(record: any): void { - message.warn('功能开发中....'); + window.open("/MonitorScreen/ProjectMonitorRoom?monitorId=" + record.id); } const columns: ProColumns[] = [