import React, {useState} from 'react';
import {Button, Drawer} from "antd";
import {ProTable} from "@ant-design/pro-components";
import LoginPolicyBind from "./LoginPolicyBind";
import loginPolicyApi from "../../api/login-policy";
import Show from "../../dd/fi/show";
const actionRef = React.createRef();
const LoginPolicyUser = ({active, loginPolicyId}) => {
let [visible, setVisible] = useState(false);
const handleUnbind = async (userId) => {
await loginPolicyApi.Unbind(loginPolicyId, [{'userId': userId}]);
actionRef.current.reload();
}
const columns = [
{
dataIndex: 'index',
valueType: 'indexBorder',
width: 48,
},
{
title: '登录账号',
dataIndex: 'username',
copyable: true,
},
{
title: '昵称',
dataIndex: 'nickname',
copyable: true,
},
{
title: '邮箱',
key: 'mail',
dataIndex: 'mail',
},
{
title: '创建时间',
key: 'created',
dataIndex: 'created',
hideInSearch: true,
},
{
title: '操作',
valueType: 'option',
key: 'option',
render: (text, record, _, action) => [