9.9 重评预约评标室,地图轮播tooltip
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Col, DatePicker, Descriptions, Form, Input, message, Modal, Row } from 'antd';
|
||||
import { Col, DatePicker, Descriptions, Form, Input, message, Modal, Row, Spin } from 'antd';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getBidEvalRoom, saveAppointmentEdit } from './service';
|
||||
import { getBidEvalRoom, handleTakeEffectReserve, saveAppointmentEdit } from './service';
|
||||
import { dateFormat, disabledDate, disabledDateTime, validateMessages } from './MeetingReservation';
|
||||
import moment from 'moment';
|
||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||
@ -13,7 +13,7 @@ interface BidEvalAppointmentProps {
|
||||
onSubmit: (value: any) => void;
|
||||
reload: () => void;
|
||||
values: any;
|
||||
type: string; //0-选择评标室 1-修改预约
|
||||
type: string; //0-选择评标室 1-修改预约 2-重评预约评标室
|
||||
}
|
||||
|
||||
export const proviceEnum = {
|
||||
@ -63,6 +63,8 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
//当前选择行数据
|
||||
const [selectedRecord, setSelectedRecord] = useState<any>();
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const columns: ProColumns<any>[] = [
|
||||
{
|
||||
valueType: 'index',
|
||||
@ -128,7 +130,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
value["contactTel"] = selectedRecord.contactTel;
|
||||
value["areaNumber"] = selectedRecord.areaNumber;
|
||||
onSubmit(value);
|
||||
} else {//修改预约
|
||||
} else if (type == "1") {//修改预约
|
||||
const params = {
|
||||
...values,
|
||||
areaId: selectedRecord.id,
|
||||
@ -138,12 +140,34 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
reserveBy: value.reserveBy,
|
||||
reserveContactNumber: value.reserveContactNumber,
|
||||
}
|
||||
setLoading(true);
|
||||
saveAppointmentEdit(params).then(res => {
|
||||
if (res?.code == 200) {
|
||||
message.success("预约成功");
|
||||
onCancel();
|
||||
reload();
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
} else {//重评保存预约
|
||||
const params = {
|
||||
areaId: selectedRecord.id,
|
||||
placeId: selectedRecord.placeId,
|
||||
reserveStartDate: moment(value.reserveStartDate).format(dateTimeFormatter),
|
||||
reserveEndDate: moment(value.reserveEndDate).format(dateTimeFormatter),
|
||||
reserveBy: value.reserveBy,
|
||||
reserveContactNumber: value.reserveContactNumber,
|
||||
}
|
||||
setLoading(true);
|
||||
handleTakeEffectReserve(values?.id, params).then(res => {
|
||||
if (res?.code == 200) {
|
||||
message.success("操作成功");
|
||||
onCancel();
|
||||
reload();
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -169,128 +193,130 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
className="confirm table-no-alert"
|
||||
centered
|
||||
>
|
||||
{values?.areaId && (
|
||||
<>
|
||||
<h3 className='first-title'>{type == "0" ? "已选择评标室" : "已预约评标室"}</h3>
|
||||
<Descriptions size="middle">
|
||||
<Descriptions.Item label="评标室名称">{values?.areaName}</Descriptions.Item>
|
||||
{values?.contactName && <Descriptions.Item label="联系人">{values?.contactName}</Descriptions.Item>}
|
||||
{values?.contactTel && <Descriptions.Item label="联系电话">{values?.contactTel}</Descriptions.Item>}
|
||||
<Descriptions.Item label="可容纳人数">{values?.areaNumber ? values?.areaNumber : values?.numberInMeeting}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标开始时间">{moment(values?.reserveStartDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标结束时间">{moment(values?.reserveEndDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<h3 className='first-title'>选择评标室</h3>
|
||||
</>
|
||||
)}
|
||||
<ProTable<any>
|
||||
columns={columns}
|
||||
actionRef={actionRef}
|
||||
bordered={false}
|
||||
request={async (params: any) => {
|
||||
return await getBidEvalRoom(params).then(res => {
|
||||
if (res?.code == 200) {
|
||||
return {
|
||||
data: res?.data.records,
|
||||
success: res?.success,
|
||||
total: res?.data.total,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
data: [],
|
||||
success: false,
|
||||
total: 0,
|
||||
}
|
||||
}
|
||||
})
|
||||
}}
|
||||
rowKey="id"
|
||||
search={{
|
||||
labelWidth: 'auto',
|
||||
}}
|
||||
options={false}
|
||||
pagination={{
|
||||
size: "small",
|
||||
defaultPageSize: 10,
|
||||
showSizeChanger: true,
|
||||
}}
|
||||
rowSelection={{
|
||||
type: "radio",
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
setSelectedRecord(selectedRows[0]);
|
||||
},
|
||||
}}
|
||||
dateFormatter="string"
|
||||
toolBarRender={false}
|
||||
/>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
preserve={false}
|
||||
validateMessages={validateMessages}
|
||||
>
|
||||
<Form.Item
|
||||
label="是否预约评标室"
|
||||
name="reserveStatus"
|
||||
initialValue={"1"}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="项目id"
|
||||
name="projectId"
|
||||
initialValue={proId}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
{selectedRowKeys.length > 0 && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预计评标开始时间"
|
||||
name="reserveStartDate"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
extra={<span style={{ color: "#b30000" }}>预约时间范围 7:00 ~ 18:00</span>}
|
||||
>
|
||||
<DatePicker showTime={{ defaultValue: moment().hour(7) }} showNow={false} disabledDate={disabledDate} disabledTime={disabledDateTime} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预计评标结束时间"
|
||||
name="reserveEndDate"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
>
|
||||
<DatePicker showTime={{ defaultValue: moment().hour(7) }} showNow={false} disabledDate={disabledDate} disabledTime={disabledDateTime} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预约人"
|
||||
name="reserveBy"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input maxLength={20} placeholder="预约人姓名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预约人联系方式"
|
||||
name="reserveContactNumber"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input type="number" maxLength={20} placeholder="预约人手机号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Spin spinning={loading}>
|
||||
{values?.areaId && (
|
||||
<>
|
||||
<h3 className='first-title'>{type == "0" ? "已选择评标室" : "已预约评标室"}</h3>
|
||||
<Descriptions size="middle">
|
||||
<Descriptions.Item label="评标室名称">{values?.areaName}</Descriptions.Item>
|
||||
{values?.contactName && <Descriptions.Item label="联系人">{values?.contactName}</Descriptions.Item>}
|
||||
{values?.contactTel && <Descriptions.Item label="联系电话">{values?.contactTel}</Descriptions.Item>}
|
||||
<Descriptions.Item label="可容纳人数">{values?.areaNumber ? values?.areaNumber : values?.numberInMeeting}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标开始时间">{moment(values?.reserveStartDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标结束时间">{moment(values?.reserveEndDate).format(dateTimeFormatter)}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<h3 className='first-title'>选择评标室</h3>
|
||||
</>
|
||||
)}
|
||||
</Form>
|
||||
<ProTable<any>
|
||||
columns={columns}
|
||||
actionRef={actionRef}
|
||||
bordered={false}
|
||||
request={async (params: any) => {
|
||||
return await getBidEvalRoom(params).then(res => {
|
||||
if (res?.code == 200) {
|
||||
return {
|
||||
data: res?.data.records,
|
||||
success: res?.success,
|
||||
total: res?.data.total,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
data: [],
|
||||
success: false,
|
||||
total: 0,
|
||||
}
|
||||
}
|
||||
})
|
||||
}}
|
||||
rowKey="id"
|
||||
search={{
|
||||
labelWidth: 'auto',
|
||||
}}
|
||||
options={false}
|
||||
pagination={{
|
||||
size: "small",
|
||||
defaultPageSize: 10,
|
||||
showSizeChanger: true,
|
||||
}}
|
||||
rowSelection={{
|
||||
type: "radio",
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
setSelectedRecord(selectedRows[0]);
|
||||
},
|
||||
}}
|
||||
dateFormatter="string"
|
||||
toolBarRender={false}
|
||||
/>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
preserve={false}
|
||||
validateMessages={validateMessages}
|
||||
>
|
||||
<Form.Item
|
||||
label="是否预约评标室"
|
||||
name="reserveStatus"
|
||||
initialValue={"1"}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="项目id"
|
||||
name="projectId"
|
||||
initialValue={proId}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
{selectedRowKeys.length > 0 && (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预计评标开始时间"
|
||||
name="reserveStartDate"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
extra={<span style={{ color: "#b30000" }}>预约时间范围 7:00 ~ 18:00</span>}
|
||||
>
|
||||
<DatePicker showTime={{ defaultValue: moment().hour(7) }} showNow={false} disabledDate={disabledDate} disabledTime={disabledDateTime} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预计评标结束时间"
|
||||
name="reserveEndDate"
|
||||
rules={[{ required: true, message: '请选择' }]}
|
||||
>
|
||||
<DatePicker showTime={{ defaultValue: moment().hour(7) }} showNow={false} disabledDate={disabledDate} disabledTime={disabledDateTime} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预约人"
|
||||
name="reserveBy"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input maxLength={20} placeholder="预约人姓名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="预约人联系方式"
|
||||
name="reserveContactNumber"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input type="number" maxLength={20} placeholder="预约人手机号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
)}
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -74,4 +74,15 @@ export async function getCameraList(params: any) {
|
||||
method: 'GET',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新评标生效(预约评标室)
|
||||
* @method POST
|
||||
*/
|
||||
export async function handleTakeEffectReserve(params: any, data: any) {
|
||||
return request("/api/biz-service-ebtp-project/v1/projectReEvaluation/achieve/" + params, {
|
||||
method: "POST",
|
||||
data: data,
|
||||
})
|
||||
}
|
@ -178,6 +178,25 @@ const GraphChart = (props: { type: string, chartData: any[] }) => {
|
||||
};
|
||||
var dataValue = dealWithData();
|
||||
var data1 = dataValue.splice(0, 3);
|
||||
var index = 0;
|
||||
const autoTooltip = () => {
|
||||
const dataLength = data1.length;
|
||||
setTimeout(() => {
|
||||
myChart.dispatchAction({
|
||||
type: 'showTip',
|
||||
seriesIndex: 2,
|
||||
dataIndex: index,
|
||||
position: (point: number[], params: any, dom: any, rect: any, size: { contentSize: number[] }) => {
|
||||
return [point[0] + 20, point[1] - size.contentSize[1] + 45];
|
||||
},
|
||||
});
|
||||
index++;
|
||||
if (index >= dataLength) {
|
||||
index = 0;
|
||||
}
|
||||
autoTooltip();
|
||||
}, 10000);
|
||||
}
|
||||
const pieOption: EChartsOption = {
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
@ -376,6 +395,7 @@ const GraphChart = (props: { type: string, chartData: any[] }) => {
|
||||
const resize = () => {
|
||||
myChart && myChart.resize();
|
||||
};
|
||||
type == "map" && autoTooltip();//地图自动轮播tooltip
|
||||
window.addEventListener("resize", debounce(() => resize(), 100));
|
||||
return () => {
|
||||
window.removeEventListener("resize", debounce(() => resize(), 100));
|
||||
|
@ -1,8 +1,10 @@
|
||||
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import { checkObjectId } from '@/utils/DownloadUtils';
|
||||
import { getProMethod } from '@/utils/session';
|
||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { Button, Drawer, message, Popconfirm } from 'antd';
|
||||
import { Button, Drawer, message, Modal, Popconfirm } from 'antd';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
checkedAddAfresh,
|
||||
@ -23,6 +25,7 @@ interface MoreEvaluationProps {
|
||||
}
|
||||
|
||||
const drawerWidth = window.innerWidth - 208;
|
||||
const { confirm } = Modal;
|
||||
|
||||
const MoreEvaluation: React.FC<MoreEvaluationProps> = (props) => {
|
||||
const { title, drawerVisible, onCancel, values } = props;
|
||||
@ -42,6 +45,8 @@ const MoreEvaluation: React.FC<MoreEvaluationProps> = (props) => {
|
||||
const [sectionType, setSectionType] = useState<any>('评审');
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
//电子评标室-评标室预约选择 2022.9.8 zhoujianlong
|
||||
const [selectEvalVisible, setSelectEvalVisible] = useState<boolean>(false);
|
||||
|
||||
const toAdd = async () => {
|
||||
await checkedAddAfresh(values.id).then((res) => {
|
||||
@ -81,6 +86,24 @@ const MoreEvaluation: React.FC<MoreEvaluationProps> = (props) => {
|
||||
setLoading(false);
|
||||
});
|
||||
};
|
||||
//是否预约评标室
|
||||
const isReserve = async (record: any) => {
|
||||
confirm({
|
||||
title: '是否预约评标室?',
|
||||
icon: <InfoCircleOutlined />,
|
||||
okText: '不预约',
|
||||
cancelText: '预约',
|
||||
okType: 'danger',
|
||||
centered: true,
|
||||
onOk() {
|
||||
toTakeEffect(record);
|
||||
},
|
||||
onCancel() {
|
||||
setRecordData(record);
|
||||
setSelectEvalVisible(true);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//生效
|
||||
const toTakeEffect = async (record: any) => {
|
||||
@ -209,7 +232,7 @@ const MoreEvaluation: React.FC<MoreEvaluationProps> = (props) => {
|
||||
<a
|
||||
key="3"
|
||||
hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])}
|
||||
onClick={() => toTakeEffect(record)}
|
||||
onClick={() => isReserve(record)}
|
||||
>
|
||||
生效
|
||||
</a>
|
||||
@ -340,6 +363,8 @@ const MoreEvaluation: React.FC<MoreEvaluationProps> = (props) => {
|
||||
values={values}
|
||||
data={recordData}
|
||||
/>
|
||||
{/**电子评标室-评标室预约选择 */}
|
||||
<BidEvalAppointment modalVisible={selectEvalVisible} onCancel={() => { setSelectEvalVisible(false), setRecordData(undefined) }} onSubmit={() => { }} values={recordData} type={"2"} reload={() => { actionRef.current?.reload?.(); }} />
|
||||
</Drawer>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user