import React from 'react';
import { Form, Radio, Button, Alert, InputNumber, Space, Checkbox, Select, Switch, } from 'antd';
import UserEntityGrantShare from '../../../userEntityGrant/share';
import Style from './web.pc.module.less';
export default function render(props) {
const { relations, userEntityGrant, userEntityGrantId, period, unit, maxes, oakExecutable, rules, } = props.data;
const { relationIds, type, rule, multiple, relationEntity } = userEntityGrant || {};
const { update, t, onBack, confirm, setInit, setPeriod, setUnit } = props.methods;
const P = !!userEntityGrantId ? (<>
>) : (
{
update({ relationIds: val });
}} options={relations?.map((ele) => ({
value: ele.id,
label: ele.display ||
relationEntity && t(`${relationEntity}:r.${ele.name}`),
}))}/>
{relationIds?.length > 1 && (
update({
rule: target.value,
})} options={rules.map((ele) => ({
value: ele,
label: t(`userEntityGrant:v.rule.${ele}`),
}))}/>
)}
{type === 'grant' && (
update({ multiple: val })}/>
)}
{t('expiresHelp')}} tooltip="通过配置实现在规定的时效内扫描二维码不过期的效果。">
setPeriod(value)}
// addonAfter="分钟"
addonAfter={}/>
);
return {P}
;
}