授权记录 先隐藏

This commit is contained in:
Wang Kejun 2023-01-17 19:43:36 +08:00
parent ed6f35194a
commit 948e3be220
5 changed files with 39 additions and 86 deletions

View File

@ -5,7 +5,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
var antd_1 = require("antd");
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
var cellButton_1 = tslib_1.__importDefault(require("../../../components/userEntityGrant/cellButton"));
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
function render(props) {
var _a = props.data, pagination = _a.pagination, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, showBack = _a.showBack, variant = _a.variant, oakFullpath = _a.oakFullpath;
@ -69,16 +68,21 @@ function render(props) {
return ((0, jsx_runtime_1.jsxs)(antd_1.Typography.Text, tslib_1.__assign({ type: record.expired ? 'danger' : 'success' }, { children: [record.expired ? '失效' : '有效', !record.expired && ((0, jsx_runtime_1.jsxs)(antd_1.Typography.Text, { children: ["\u00A0", (0, dayjs_1.default)(record.expiresAt).format('YYYY-MM-DD HH:mm')] }))] })));
},
},
{
dataIndex: 'op',
width: 200,
title: '操作',
align: 'center',
render: function (value, record, index) {
return ((0, jsx_runtime_1.jsx)(cellButton_1.default, { oakId: record.id, oakPath: "".concat(oakFullpath, ".").concat(record.id) }));
},
fixed: 'right',
},
// {
// dataIndex: 'op',
// width: 200,
// title: '操作',
// align: 'center',
// render: (value, record, index) => {
// return (
// <CellButton
// oakId={record.id}
// oakPath={`${oakFullpath}.${record.id}`}
// />
// );
// },
// fixed: 'right',
// },
], pagination: {
total: total,
pageSize: pageSize,

View File

@ -5,7 +5,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var antd_1 = require("antd");
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
var list_1 = tslib_1.__importDefault(require("../../../pages/userEntityGrant/list"));
// import UserEntityGrantList from '../../../pages/userEntityGrant/list';
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
function Render(props) {
var _this = this;
@ -14,9 +14,7 @@ function Render(props) {
var _d = props.methods, goUpsert = _d.goUpsert, t = _d.t, setCurrentPage = _d.setCurrentPage, setPageSize = _d.setPageSize, confirmDelete = _d.confirmDelete, goUpdate = _d.goUpdate;
var _e = tslib_1.__read((0, react_1.useState)(undefined), 2), idRemove = _e[0], setIdRemove = _e[1];
var _f = tslib_1.__read((0, react_1.useState)(false), 2), inviteVisible = _f[0], setInviteVisible = _f[1];
return ((0, jsx_runtime_1.jsxs)(pageHeader_1.default, tslib_1.__assign({ title: "\u6743\u9650\u5217\u8868" }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () { return goUpsert(); } }, { children: "\u6DFB\u52A0" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () { return setInviteVisible(true); } }, { children: "\u9080\u8BF7\u8BB0\u5F55" }))] }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading,
// ref={this.tableRef}
rowKey: "id", columns: [
return ((0, jsx_runtime_1.jsxs)(pageHeader_1.default, tslib_1.__assign({ title: "\u6743\u9650\u5217\u8868" }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () { return goUpsert(); } }, { children: "\u6DFB\u52A0" })) }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, rowKey: "id", columns: [
{
width: 100,
dataIndex: 'index',
@ -33,34 +31,10 @@ function Render(props) {
{
dataIndex: 'name',
title: '姓名',
// edit: {
// component: Input,
// props: {
// clearable: true,
// autofocus: true,
// autoWidth: true,
// },
// rules: [
// { required: true, message: '不能为空' },
// ],
// showEditIcon: false,
// },
},
{
dataIndex: 'nickname',
title: '昵称',
// edit: {
// component: Input,
// props: {
// clearable: true,
// autofocus: true,
// autoWidth: true,
// },
// rules: [
// { required: true, message: '不能为空' },
// ],
// showEditIcon: false,
// },
},
{
dataIndex: 'mobile',
@ -104,6 +78,6 @@ function Render(props) {
return [2 /*return*/];
}
});
}); }, onCancel: function () { return setIdRemove(undefined); }, cancelText: t('common:action.cancel'), okText: t('common:action.confirm') }, { children: (0, jsx_runtime_1.jsx)("p", { children: t('confirmRevokeAll') }) })), (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: "\u9080\u8BF7\u8BB0\u5F55", open: inviteVisible, onCancel: function () { return setInviteVisible(false); }, width: "80%", footer: null }, { children: (0, jsx_runtime_1.jsx)(list_1.default, { entity: entity, entityId: entityId, variant: "dialog", oakPath: "$userRelation/list-userEntityGrant/list" }) }))] })));
}); }, onCancel: function () { return setIdRemove(undefined); }, cancelText: t('common:action.cancel'), okText: t('common:action.confirm') }, { children: (0, jsx_runtime_1.jsx)("p", { children: t('confirmRevokeAll') }) }))] })));
}
exports.default = Render;

View File

@ -23,7 +23,7 @@ function render(props) {
update({ relation: value });
}, options: relations === null || relations === void 0 ? void 0 : relations.map(function (ele) { return ({
value: ele,
label: (t(entity + ':r.' + ele)) || ele,
label: t(entity + ':r.' + ele) || ele,
}); }) }) })), type === 'grant' && ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u4EBA\u6570", rules: [
{
required: true,

View File

@ -122,21 +122,21 @@ export default function render(
);
},
},
{
dataIndex: 'op',
width: 200,
title: '操作',
align: 'center',
render: (value, record, index) => {
return (
<CellButton
oakId={record.id}
oakPath={`${oakFullpath}.${record.id}`}
/>
);
},
fixed: 'right',
},
// {
// dataIndex: 'op',
// width: 200,
// title: '操作',
// align: 'center',
// render: (value, record, index) => {
// return (
// <CellButton
// oakId={record.id}
// oakPath={`${oakFullpath}.${record.id}`}
// />
// );
// },
// fixed: 'right',
// },
]}
pagination={{
total,

View File

@ -10,7 +10,7 @@ import {
Modal,
} from 'antd';
import PageHeader from '../../../components/common/pageHeader';
import UserEntityGrantList from '../../../pages/userEntityGrant/list';
// import UserEntityGrantList from '../../../pages/userEntityGrant/list';
import Style from './web.module.less';
import { WebComponentProps } from 'oak-frontend-base';
@ -45,16 +45,15 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
<Button type="primary" onClick={() => goUpsert()}>
</Button>
<Button
{/* <Button
onClick={() => setInviteVisible(true)}
>
</Button>
</Button> */}
</Space>
<Table
loading={oakLoading}
// ref={this.tableRef}
rowKey="id"
columns={[
{
@ -77,34 +76,10 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
{
dataIndex: 'name',
title: '姓名',
// edit: {
// component: Input,
// props: {
// clearable: true,
// autofocus: true,
// autoWidth: true,
// },
// rules: [
// { required: true, message: '不能为空' },
// ],
// showEditIcon: false,
// },
},
{
dataIndex: 'nickname',
title: '昵称',
// edit: {
// component: Input,
// props: {
// clearable: true,
// autofocus: true,
// autoWidth: true,
// },
// rules: [
// { required: true, message: '不能为空' },
// ],
// showEditIcon: false,
// },
},
{
dataIndex: 'mobile',
@ -187,7 +162,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
<p>{t('confirmRevokeAll')}</p>
</Modal>
<Modal
{/* <Modal
title="邀请记录"
open={inviteVisible}
onCancel={() => setInviteVisible(false)}
@ -200,7 +175,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
variant="dialog"
oakPath="$userRelation/list-userEntityGrant/list"
/>
</Modal>
</Modal> */}
</PageHeader>
);
}