现场人员权限精确到分钟

This commit is contained in:
zhangyx
2022-11-15 15:54:33 +08:00
parent c852fd29e0
commit 0e49ce320d
2 changed files with 15 additions and 5 deletions

View File

@ -314,9 +314,9 @@ const AuthorizeModal: React.FC<AuthorizeModalProps> = (props) => {
rules={rule('权限开始时间')} rules={rule('权限开始时间')}
> >
<DatePicker <DatePicker
format="YYYY-MM-DD" format="yyyy-MM-DD HH:mm"
disabledDate={disabledDate} disabledDate={disabledDate}
showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }} showTime={{ defaultValue: moment('00', 'ss') }}
showNow={false} showNow={false}
style={{ width: "90%" }} style={{ width: "90%" }}
/> />
@ -327,9 +327,9 @@ const AuthorizeModal: React.FC<AuthorizeModalProps> = (props) => {
rules={rule('权限结束时间')} rules={rule('权限结束时间')}
> >
<DatePicker <DatePicker
format="YYYY-MM-DD" format="yyyy-MM-DD HH:mm"
disabledDate={disabledDate} disabledDate={disabledDate}
showTime={{ defaultValue: moment('23:59:59', 'HH:mm:ss') }} showTime={{ defaultValue: moment('00', 'ss') }}
showNow={false} showNow={false}
style={{ width: "90%" }} style={{ width: "90%" }}
/> />

View File

@ -42,6 +42,7 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
useEffect(() => { useEffect(() => {
console.log(type)
if (JSON.stringify(values) !== "{}") { if (JSON.stringify(values) !== "{}") {
setGroupValue(values.groupStatus); setGroupValue(values.groupStatus);
form.setFieldsValue({ form.setFieldsValue({
@ -75,13 +76,15 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
const renderFooter = () => { const renderFooter = () => {
console.log(type == "edit")
console.log(type == "insert")
if (type == "read") { if (type == "read") {
return ( return (
<> <>
<Button onClick={onCancel}></Button> <Button onClick={onCancel}></Button>
</> </>
); );
} else { } else if (type == "edit") {
return ( return (
<> <>
<Popconfirm <Popconfirm
@ -95,6 +98,13 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
<Button onClick={onCancel}></Button> <Button onClick={onCancel}></Button>
</> </>
); );
} else {
return (
<>
<Button type="primary" loading={loading} onClick={onOk}></Button>
<Button onClick={onCancel}></Button>
</>
);
} }
} }