import * as React from 'react'; import { Button, Drawer, Input, Form } from 'kts-xui'; import { FormInstance } from 'kts-components-antd-x4/lib/form'; import agent from '../Server'; /** Props接口 */ interface IProps { onClose: () => void; onSuccess: () => void; id: string; } export default class UIComponents extends React.Component { formRef:any = React.createRef(); constructor(props) { super(props); this.state = { id: props.id } } onClose = () => { this.props.onClose(); } onSubmit = () => { this.formRef.current?.submit(); } onFinish = async values => { const data = { ...values, taskUuid: this.state.id } const res: any = await agent.post('/web/verifierTask/closeTask', data, this); if (res.er) { return; } else if (res.res) { this.props.onSuccess(); } } render() { return (
} >
); } }