(data: any)
| 31 | |
| 32 | /** 创建工具 */ |
| 33 | const onFinish = (data: any) => { |
| 34 | const newFormData = data; |
| 35 | const [authType, id] = data?.scm_auth_id?.split('#') ?? []; |
| 36 | delete newFormData.scm_auth_id; |
| 37 | |
| 38 | newFormData.scm_auth = { auth_type: authType }; |
| 39 | |
| 40 | if (SCM_MAP[authType as AuthTypeEnum]) { |
| 41 | newFormData.scm_auth[SCM_MAP[authType as AuthTypeEnum]] = id; |
| 42 | } |
| 43 | |
| 44 | createTool(orgId, newFormData).then(({ id }: any) => { |
| 45 | message.success(t('创建成功')); |
| 46 | history.push(`${getToolsRouter(orgId)}/${id}/rules`); |
| 47 | }); |
| 48 | }; |
| 49 | |
| 50 | return ( |
| 51 | <Dialog |
nothing calls this directly
no test coverage detected