7.19 无法选择解密截至时间

This commit is contained in:
jl-zhoujl2
2022-07-19 15:07:48 +08:00
parent 541b685651
commit 7c41bc48f2

View File

@ -699,9 +699,12 @@ const Room: React.FC<{}> = () => {
//解密时限 //解密时限
function onOkJmsx(value: any) { function onOkJmsx(value: any) {
endTimeSet(value.format('yyyy-MM-DD HH:mm:ss')); // endTimeSet(value.format('yyyy-MM-DD HH:mm:ss'));
setTime.current = value.format('yyyy-MM-DD HH:mm:ss');
} }
const [sxLoading, sxLoadingSet] = useState<boolean>(false); const [sxLoading, sxLoadingSet] = useState<boolean>(false);
//设置解密时限存储
const setTime = useRef<string>('')
const jmTime = () => { const jmTime = () => {
return ( return (
<Modal <Modal
@ -715,14 +718,14 @@ const Room: React.FC<{}> = () => {
onCancel={() => { jmTimeVisSet(false); }} onCancel={() => { jmTimeVisSet(false); }}
onOk={async () => { onOk={async () => {
sxLoadingSet(true); sxLoadingSet(true);
if (endTime != '') { if (setTime.current != '') {
await endTimeConfig({ id: tdocId, decryptEndDate: endTime }); await endTimeConfig({ id: tdocId, decryptEndDate: setTime.current });
jmTimeVisSet(false); jmTimeVisSet(false);
countSet(count + 1);
} else { } else {
message.error('您未设置解密截止时间') message.error('您未设置解密截止时间')
} }
sxLoadingSet(false); sxLoadingSet(false);
countSet(count + 1);
}} }}
> >
<Spin spinning={sxLoading}> <Spin spinning={sxLoading}>
@ -733,7 +736,7 @@ const Room: React.FC<{}> = () => {
showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }} showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }}
// disabled={disabled} // disabled={disabled}
showNow={false} showNow={false}
onOk={onOkJmsx} onChange={onOkJmsx}
/> />
</Spin> </Spin>
</Modal> </Modal>