import React from 'react'; import { Button, Space, Switch, Table, Tooltip, Modal, Select } from 'antd'; import Styles from './web.pc.module.less'; import { CheckOutlined, CloseOutlined, ExclamationCircleFilled } from '@ant-design/icons'; const { confirm } = Modal; export default function render(props) { const { data, methods } = props; const { oakFullpath, oakDirty, oakExecutable, oakExecuting, applicationPassports, systemId, applications, passports, apArray, } = data; const { clean, execute, t, onCheckedChange, updateItem, checkLastOne } = methods; if (!(applications && applications.length > 0)) { return (
请先前往应用管理创建application
); } if (!(passports && passports.length > 0)) { return (
请先完成登录配置,启用登录方式
); } let columns = [ { title: '', key: 'applicationName', dataIndex: 'aName', fixed: 'left', }, ]; const showConfirm = (apId, pId, aId) => { confirm({ title: '当前application将无登录方式', icon: , content: '关闭后,当前applicaion将无登录方式,可能影响用户登录', onOk() { onCheckedChange(apId, pId, aId, false); }, onCancel() { }, }); }; if (passports && passports.length > 0) { for (let idx = 0; idx < passports.length; ++idx) { columns.push({ title: t(`passport:v.type.${passports[idx].type}`) + t('login'), dataIndex: 'passports[' + idx + ']', key: `${passports[idx].id} `, align: 'center', render: (_, { passports, aId }) => } unCheckedChildren={} checked={passports[idx].checked} onChange={(checked) => { if (!checked && checkLastOne(aId, passports[idx].apId)) { showConfirm(passports[idx].apId, passports[idx].pId, aId); } else { onCheckedChange(passports[idx].apId, passports[idx].pId, aId, checked); } }}/> }); } columns.push({ title: '默认登录方式', key: 'default', dataIndex: 'defaultValue', fixed: 'right', width: 140, render: (_, { defaultOptions, defaultValue, aId }) => <>