Commit ee27b8a2 by zhaochengxiang

授权

parent 933c9f2a
import React,{ useState, useEffect, useRef } from "react";
import React,{ useState, useEffect, useRef, useContext } from "react";
import { Button, Pagination, Space, Modal, Input, Table, Tooltip, Checkbox, Typography, Dropdown, Menu } from "antd";
import classNames from 'classnames';
import { Resizable } from 'react-resizable';
......@@ -21,6 +21,7 @@ import WorkbookDrawer from "./WorkbookDrawer";
import "./AssetTable.less";
import 'react-contexify/dist/ReactContexify.css';
import { AppContext } from "../../../../App";
const { Text } = Typography;
const { Search } = Input;
......@@ -156,6 +157,7 @@ const AssetTable = (props) => {
const [ biType, setBiType ] = useState('');
const [ reportTypes, setReportTypes ] = useState();
const [ report, setReport ] = useState();
const app = useContext(AppContext);
const [ modal, contextHolder ] = Modal.useModal();
const anchorId = getQueryParam(AnchorId, props?.location?.search);
......@@ -807,6 +809,15 @@ const AssetTable = (props) => {
});
}
});
} else if (key === 'authorization') {
if (contextMenuItem?.metadata?.metadataTableId) {
app?.setGlobalState && app?.setGlobalState({
message: 'data-govern-assets-admit',
data: contextMenuItem
})
} else {
showMessage("warn","该资产目录没有关联元数据信息");
}
}
}
......@@ -1098,6 +1109,9 @@ const AssetTable = (props) => {
转为非资产
</RcItem>
}
<RcItem id="authorization" onClick={handleItemClick}>
授权
</RcItem>
</RcMenu>
{contextHolder}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment