9.28 1、异常告警优化 2、大屏,评审中项目,供应商名称加密 3、评委会设置,评标室预约优化

This commit is contained in:
jl-zhoujl2
2022-09-28 14:51:23 +08:00
parent 2f1be12fa5
commit 8e23c61ea2
12 changed files with 1312 additions and 952 deletions

View File

@ -13,6 +13,7 @@ interface BidEvalAppointmentProps {
onSubmit: (value: any) => void;
reload: () => void;
values: any;
initValue: any;//预约时间初始值
type: string; //0-选择评标室 1-修改预约 2-重评预约评标室
}
@ -54,7 +55,7 @@ export const proviceEnum = {
const modalHeight = window.innerHeight * 96 / 100;
const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
const { modalVisible, onCancel, onSubmit, reload, values, type } = props;
const { modalVisible, onCancel, onSubmit, reload, values, initValue, type } = props;
const actionRef = useRef<ActionType>();
const [form] = Form.useForm();
//项目id
@ -190,6 +191,10 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
setDisabledMap({});
}, [values])
useEffect(() => {
initValue && form.setFieldsValue({ ...initValue, reserveStartDate: initValue.startTime, reserveEndDate: initValue.endTime });
}, [initValue, modalVisible])
useEffect(() => {
selectedRowKeys.length > 0 && getDisabledTime(selectedRowKeys);
}, [selectedRowKeys])
@ -301,7 +306,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
rules={[{ required: true, message: '请选择' }]}
extra={<span style={{ color: "#b30000" }}> 7:00 ~ 18:00</span>}
>
<DatePicker showTime showNow={false} disabledDate={disabledDate} disabledTime={(current) => otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => "注:若时间被占用,则置灰不可选"} />
<DatePicker showTime showNow={false} disabledDate={disabledDate} disabledTime={(current) => otherDisabledDateTime(current, disabledMap, "startTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => <span style={{ color: '#b30000' }}></span>} />
</Form.Item>
</Col>
<Col span={12}>
@ -310,7 +315,7 @@ const BidEvalAppointment: React.FC<BidEvalAppointmentProps> = (props) => {
name="reserveEndDate"
rules={[{ required: true, message: '请选择' }]}
>
<DatePicker showTime showNow={false} disabledDate={disabledDate} disabledTime={(current) => otherDisabledDateTime(current, disabledMap)} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => "注:若时间被占用,则置灰不可选"} />
<DatePicker showTime showNow={false} disabledDate={disabledDate} disabledTime={(current) => otherDisabledDateTime(current, disabledMap, "endTime")} showMinute={false} showSecond={false} format={dateFormat} style={{ width: '100%' }} renderExtraFooter={() => <span style={{ color: '#b30000' }}></span>} />
</Form.Item>
</Col>
<Col span={12}>

View File

@ -37,13 +37,13 @@ export const disabledDateTime = () => ({
disabledHours: () => [...range(0, 7), ...range(19, 24)],
});
//不可选小时(额外不可选)
export const otherDisabledDateTime = (current: any, disabledMap: any) => {
export const otherDisabledDateTime = (current: any, disabledMap: any, type: string) => {
let otherHour: any[] = range(0, 24);
if (current) {
otherHour = [];
if (Object.keys(disabledMap).length != 0) {
const time = moment(current).format("yyyy-MM-DD");
disabledMap[time] && (otherHour = [...disabledMap[time]]);
disabledMap[time] && (otherHour = [...disabledMap[time][type]]);
}
}
return ({