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,6 +193,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
className="confirm table-no-alert"
|
||||
centered
|
||||
>
|
||||
<Spin spinning={loading}>
|
||||
{values?.areaId && (
|
||||
<>
|
||||
<h3 className='first-title'>{type == "0" ? "已选择评标室" : "已预约评标室"}</h3>
|
||||
@ -291,6 +316,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
|
||||
</Row>
|
||||
)}
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -75,3 +75,14 @@ export async function getCameraList(params: any) {
|
||||
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