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) {
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 setTime = useRef<string>('')
const jmTime = () => {
return (
<Modal
@ -715,14 +718,14 @@ const Room: React.FC<{}> = () => {
onCancel={() => { jmTimeVisSet(false); }}
onOk={async () => {
sxLoadingSet(true);
if (endTime != '') {
await endTimeConfig({ id: tdocId, decryptEndDate: endTime });
if (setTime.current != '') {
await endTimeConfig({ id: tdocId, decryptEndDate: setTime.current });
jmTimeVisSet(false);
countSet(count + 1);
} else {
message.error('您未设置解密截止时间')
}
sxLoadingSet(false);
countSet(count + 1);
}}
>
<Spin spinning={sxLoading}>
@ -733,7 +736,7 @@ const Room: React.FC<{}> = () => {
showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }}
// disabled={disabled}
showNow={false}
onOk={onOkJmsx}
onChange={onOkJmsx}
/>
</Spin>
</Modal>