9.9 修改预约管理页面
This commit is contained in:
@ -193,4 +193,36 @@
|
|||||||
.ant-pro-table-alert {
|
.ant-pro-table-alert {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-reserve-table {
|
||||||
|
.ant-table-small .ant-table-thead>tr>th {
|
||||||
|
background-color: #fff
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>th,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>td,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>td,
|
||||||
|
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>td {
|
||||||
|
border-right: 1px solid #eaeaea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-thead>tr>th,
|
||||||
|
.ant-table-tbody>tr>td {
|
||||||
|
border-bottom: 1px solid #eaeaea;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-reserve-collapse {
|
||||||
|
.ant-collapse-content>.ant-collapse-content-box {
|
||||||
|
padding: 16px 0;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,17 +1,19 @@
|
|||||||
import ProList from '@ant-design/pro-list';
|
|
||||||
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import ProTable from '@ant-design/pro-table';
|
import ProTable from '@ant-design/pro-table';
|
||||||
import { Button, Card, Space, Tag } from 'antd';
|
import { Button, Card, Collapse, Space, Tag } from 'antd';
|
||||||
import React, { ReactText, useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
||||||
import { getRecordData, getSiteList } from './service';
|
import { getRecordData, getSiteList } from './service';
|
||||||
import { isEmpty } from '@/utils/CommonUtils';
|
import { isEmpty } from '@/utils/CommonUtils';
|
||||||
|
|
||||||
const orange_bg = { background: '#f59a23', color: '#0000ff', cursor: 'pointer', width: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
const orange_bg = { background: '#ffbc83', color: '#333333', cursor: 'pointer', width: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
||||||
const green_bg = { background: '#4b7902' };
|
const light_orange_bg = { background: '#faf7e5' };
|
||||||
const align_middle = { display: 'flex', alignItems: 'center' };
|
const align_middle = { display: 'flex', alignItems: 'center' };
|
||||||
const tag_size = { height: '20px', width: '20px' };
|
const tag_size = { height: '20px', width: '20px' };
|
||||||
|
const panel_title = { fontWeight: 500 };
|
||||||
|
const panel_sub_title = { ...panel_title, color: '#999999' };
|
||||||
|
const { Panel } = Collapse;
|
||||||
|
|
||||||
const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refresh: number }) => {
|
const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refresh: number }) => {
|
||||||
const { record, onCellClick, refresh } = props;
|
const { record, onCellClick, refresh } = props;
|
||||||
@ -27,55 +29,9 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
const columnsSplice = (weeksData: any[]) => {
|
const columnsSplice = (weeksData: any[]) => {
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
title: '评标室名称',
|
title: '时段场次',
|
||||||
dataIndex: 'name',
|
|
||||||
align: 'center',
|
|
||||||
render: (_, record, index) => {
|
|
||||||
return {
|
|
||||||
children: _,
|
|
||||||
props: {
|
|
||||||
rowSpan: index % 24 == 0 ? 24 : 0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '可容纳人数(人)',
|
|
||||||
dataIndex: 'rs',
|
|
||||||
align: 'center',
|
|
||||||
render: (_, record, index) => {
|
|
||||||
return {
|
|
||||||
children: _,
|
|
||||||
props: {
|
|
||||||
rowSpan: index % 24 == 0 ? 24 : 0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '场次',
|
|
||||||
align: 'center',
|
|
||||||
colSpan: 2,
|
|
||||||
render: (_, record, index) => {
|
|
||||||
return {
|
|
||||||
children: "07:00 ~ 18:00",
|
|
||||||
props: {
|
|
||||||
rowSpan: index % 24 == 0 ? 24 : 0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: "time",
|
dataIndex: "time",
|
||||||
align: 'right',
|
align: 'center',
|
||||||
width: '100px',
|
|
||||||
colSpan: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '预约时间',
|
|
||||||
dataIndex: "info_time",
|
|
||||||
valueType: 'date',
|
|
||||||
hideInTable: true,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
for (const ite of weeksData) {
|
for (const ite of weeksData) {
|
||||||
@ -86,7 +42,7 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
onCell: (record) => {
|
onCell: (record) => {
|
||||||
return {
|
return {
|
||||||
style: record[ite.id]?.iskssj ? orange_bg : green_bg,
|
style: record[ite.id]?.iskssj ? orange_bg : light_orange_bg,
|
||||||
onClick: record[ite.id]?.iskssj ? () => onCellClick(record[ite.id]?.id) : void 0,
|
onClick: record[ite.id]?.iskssj ? () => onCellClick(record[ite.id]?.id) : void 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -127,14 +83,20 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{tableData.length > 0 && (
|
{tableData.length > 0 && (
|
||||||
<Space style={{ margin: '10px 0' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: 16 }}>
|
||||||
<Button key="last-week" size='small' type="primary" onClick={() => weekChange("0")}>
|
<Space>
|
||||||
上一周
|
<Button key="last-week" size='small' type="primary" onClick={() => weekChange("0")}>
|
||||||
</Button>
|
上一周
|
||||||
<Button key="after-week" size='small' type="primary" onClick={() => weekChange("1")}>
|
</Button>
|
||||||
下一周
|
<Button key="after-week" size='small' type="primary" onClick={() => weekChange("1")}>
|
||||||
</Button>
|
下一周
|
||||||
</Space>
|
</Button>
|
||||||
|
</Space>
|
||||||
|
<Space size="middle">
|
||||||
|
<div style={align_middle}><Tag color="#faf7e5" style={tag_size}></Tag>可预约电子评标室</div>
|
||||||
|
<div style={align_middle}><Tag color="#ffbc83" style={tag_size}></Tag>已预约电子评标室</div>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
<ProTable<any>
|
<ProTable<any>
|
||||||
columns={tableColumns}
|
columns={tableColumns}
|
||||||
@ -142,6 +104,7 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
bordered
|
bordered
|
||||||
size='small'
|
size='small'
|
||||||
dataSource={tableData}
|
dataSource={tableData}
|
||||||
|
className="screen-reserve-table"
|
||||||
rowKey="time"
|
rowKey="time"
|
||||||
search={false}
|
search={false}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
@ -158,7 +121,7 @@ export default () => {
|
|||||||
//评标场所列表数据
|
//评标场所列表数据
|
||||||
const [siteListData, setSiteListData] = useState<any[]>([]);
|
const [siteListData, setSiteListData] = useState<any[]>([]);
|
||||||
//评标场所列表展开
|
//评标场所列表展开
|
||||||
const [expandedRowKeys, setExpandedRowKeys] = useState<readonly ReactText[]>([]);
|
const [expandedRowKeys, setExpandedRowKeys] = useState<any[]>([]);
|
||||||
//预约状态
|
//预约状态
|
||||||
const [meetStatus, setMeetStatus] = useState<string>("2");
|
const [meetStatus, setMeetStatus] = useState<string>("2");
|
||||||
//预约id
|
//预约id
|
||||||
@ -200,8 +163,8 @@ export default () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title="评标室预约情况" bodyStyle={{ padding: '16px 0px 24px', height: window.innerHeight - 120, overflowY: 'auto' }}>
|
<Card title="评标室预约情况" bodyStyle={{ padding: '16px 0px', height: window.innerHeight - 120, overflowY: 'auto' }}>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 24px 16px' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 36px 16px' }}>
|
||||||
<Space>
|
<Space>
|
||||||
<Button key="yuyue" type="primary" onClick={() => createMeet()}>
|
<Button key="yuyue" type="primary" onClick={() => createMeet()}>
|
||||||
预约
|
预约
|
||||||
@ -210,30 +173,25 @@ export default () => {
|
|||||||
查看预约详情
|
查看预约详情
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
<Space size="middle">
|
|
||||||
<div style={align_middle}><Tag color="#f59a23" style={tag_size}></Tag>已预约</div>
|
|
||||||
<div style={align_middle}><Tag color="#4b7902" style={tag_size}></Tag>未预约</div>
|
|
||||||
</Space>
|
|
||||||
</div>
|
</div>
|
||||||
<ProList<any>
|
<Collapse activeKey={expandedRowKeys} onChange={(value) => setExpandedRowKeys(value as any[])} className="screen-reserve-collapse" style={{ margin: '0 36px' }}>
|
||||||
rowKey="id"
|
{siteListData.map(item => (
|
||||||
expandable={{
|
<Panel
|
||||||
expandedRowKeys, onExpandedRowsChange: setExpandedRowKeys,
|
header={<>
|
||||||
}}
|
<span style={panel_title}>{item.areaName}</span>
|
||||||
dataSource={siteListData}
|
<span style={panel_sub_title}>(可容纳{isEmpty(item.areaNumber) ? '' : item.areaNumber}人)</span>
|
||||||
toolBarRender={false}
|
</>}
|
||||||
metas={{
|
extra={
|
||||||
title: {
|
<>
|
||||||
render: (_: any, record: any) => <span onClick={() => setExpandedRowKeys(keys => keys.includes(record.id) ? [] : [record.id])}>{record.areaName}</span>,
|
<span style={panel_title}>时间:07:00 ~ 18:00</span>
|
||||||
},
|
</>
|
||||||
subTitle: {
|
}
|
||||||
render: (_: any, record: any) => `可容纳人数:${isEmpty(record.areaNumber) ? '' : record.areaNumber}人`,
|
key={item.id}
|
||||||
},
|
>
|
||||||
description: {
|
<ScreenTable record={item} onCellClick={viewMeet} refresh={refresh} />
|
||||||
render: (_: any, record: any) => <ScreenTable record={record} onCellClick={viewMeet} refresh={refresh} />,
|
</Panel>
|
||||||
},
|
))}
|
||||||
}}
|
</Collapse>
|
||||||
/>
|
|
||||||
{modalVisible && <MeetingReservation modalVisible={modalVisible} onCancel={() => { setModalVisible(false); getSiteListData("1") }} roomList={siteListData} status={meetStatus} meetId={meetId} onSubmit={() => { setModalVisible(false); setRefresh(refresh => refresh + 1) }} />}
|
{modalVisible && <MeetingReservation modalVisible={modalVisible} onCancel={() => { setModalVisible(false); getSiteListData("1") }} roomList={siteListData} status={meetStatus} meetId={meetId} onSubmit={() => { setModalVisible(false); setRefresh(refresh => refresh + 1) }} />}
|
||||||
</Card >
|
</Card >
|
||||||
);
|
);
|
||||||
|
@ -173,7 +173,7 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
|||||||
message: '当前项不可为空',
|
message: '当前项不可为空',
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<ExpertPhotoUpload maxSize={60} />
|
<ExpertPhotoUpload maxSize={200} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
@ -1409,7 +1409,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
name="faceId"
|
name="faceId"
|
||||||
style={{ display: 'inline-block', width: '60%' }}
|
style={{ display: 'inline-block', width: '60%' }}
|
||||||
>
|
>
|
||||||
<ExpertPhotoUpload maxSize={60} />
|
<ExpertPhotoUpload maxSize={200} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
||||||
|
@ -1289,7 +1289,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
|||||||
name="faceId"
|
name="faceId"
|
||||||
style={{ display: 'inline-block', width: '60%' }}
|
style={{ display: 'inline-block', width: '60%' }}
|
||||||
>
|
>
|
||||||
<ExpertPhotoUpload maxSize={60} />
|
<ExpertPhotoUpload maxSize={200} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
||||||
|
Reference in New Issue
Block a user