9.9 重评预约评标室,地图轮播tooltip
This commit is contained in:
@ -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