Commit ede19b8b by zhaochengxiang

模型去掉admin接口

parent 32849ef5
...@@ -366,10 +366,6 @@ export function* getDesignPrivilege() { ...@@ -366,10 +366,6 @@ export function* getDesignPrivilege() {
return yield call(datamodelerService.getDesignPrivilege); return yield call(datamodelerService.getDesignPrivilege);
} }
export function* getPrivilegeAdmin() {
return yield call(datamodelerService.getPrivilegeAdmin);
}
export function* getCatalogAdmin() { export function* getCatalogAdmin() {
return yield call(datamodelerService.getCatalogAdmin); return yield call(datamodelerService.getCatalogAdmin);
} }
......
...@@ -317,10 +317,6 @@ export function getDesignPrivilege() { ...@@ -317,10 +317,6 @@ export function getDesignPrivilege() {
return GetJSON("/datamodeler/easyDataModelerPrivilegeProvider/getDesignPrivilege"); return GetJSON("/datamodeler/easyDataModelerPrivilegeProvider/getDesignPrivilege");
} }
export function getPrivilegeAdmin() {
return Get("/datamodeler/easyDataModelerPrivilegeProvider/getAdmin");
}
export function getCatalogAdmin() { export function getCatalogAdmin() {
return Get("/datamodeler/easyDataModelerPrivilegeProvider/getCatalogAdmin"); return Get("/datamodeler/easyDataModelerPrivilegeProvider/getCatalogAdmin");
} }
......
...@@ -60,7 +60,6 @@ const ModelTree = (props) => { ...@@ -60,7 +60,6 @@ const ModelTree = (props) => {
const [ searchKeyword, setSearchKeyword ] = useState(''); const [ searchKeyword, setSearchKeyword ] = useState('');
const [ dataList, setDataList ] = useState([]); const [ dataList, setDataList ] = useState([]);
const [options, setOptions] = useState([]); const [options, setOptions] = useState([]);
const [isAdmin, setAdmin] = useState(false);
const [isCatalogAdmin, setCatalogAdmin] = useState(false); const [isCatalogAdmin, setCatalogAdmin] = useState(false);
const [isBranchAdmin, setBranchAdmin] = useState(false); const [isBranchAdmin, setBranchAdmin] = useState(false);
const [loadingRoot, setLoadingRoot] = useState(false); const [loadingRoot, setLoadingRoot] = useState(false);
...@@ -73,7 +72,6 @@ const ModelTree = (props) => { ...@@ -73,7 +72,6 @@ const ModelTree = (props) => {
useEffect(() => { useEffect(() => {
getShowSyncAndDomains(); getShowSyncAndDomains();
getPrivilegeAdmin();
getCatalogAdmin(); getCatalogAdmin();
getPrivilegeBranchAdmin(); getPrivilegeBranchAdmin();
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
...@@ -125,15 +123,6 @@ const ModelTree = (props) => { ...@@ -125,15 +123,6 @@ const ModelTree = (props) => {
}); });
} }
const getPrivilegeAdmin = () => {
dispatch({
type: 'datamodel.getPrivilegeAdmin',
callback: data => {
setAdmin(data==='true'?true:false);
}
});
}
const getCatalogAdmin = () => { const getCatalogAdmin = () => {
dispatch({ dispatch({
type: 'datamodel.getCatalogAdmin', type: 'datamodel.getCatalogAdmin',
...@@ -639,7 +628,7 @@ const ModelTree = (props) => { ...@@ -639,7 +628,7 @@ const ModelTree = (props) => {
</Dropdown> </Dropdown>
{ {
((viewSelectedKey==='dir'&&(isAdmin||isCatalogAdmin)) || (viewSelectedKey==='branch'&&(isAdmin||isBranchAdmin))) && ( ((viewSelectedKey==='dir'&&isCatalogAdmin) || (viewSelectedKey==='branch'&&isBranchAdmin)) && (
<Tooltip title={(viewSelectedKey==='dir')?"新增目录":'新增项目'}> <Tooltip title={(viewSelectedKey==='dir')?"新增目录":'新增项目'}>
<PlusOutlined className='default' onClick={add} style={{ fontSize:16,cursor:'pointer' }} /> <PlusOutlined className='default' onClick={add} style={{ fontSize:16,cursor:'pointer' }} />
</Tooltip> </Tooltip>
...@@ -658,7 +647,7 @@ const ModelTree = (props) => { ...@@ -658,7 +647,7 @@ const ModelTree = (props) => {
</Tooltip> </Tooltip>
{ {
(viewSelectedKey==='dir'&&(isAdmin||isCatalogAdmin)) && !isSetRootId && ( (viewSelectedKey==='dir'&&isCatalogAdmin) && !isSetRootId && (
<Dropdown overlay={syncMenu} placement="bottomLeft"> <Dropdown overlay={syncMenu} placement="bottomLeft">
<Tooltip title="同步目录"> <Tooltip title="同步目录">
<SyncOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} /> <SyncOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} />
...@@ -668,7 +657,7 @@ const ModelTree = (props) => { ...@@ -668,7 +657,7 @@ const ModelTree = (props) => {
} }
{ {
(viewSelectedKey==='dir'&&(isAdmin||isCatalogAdmin)) && isSetRootId && ( (viewSelectedKey==='dir'&&isCatalogAdmin) && isSetRootId && (
<Tooltip title="同步目录" className='ml-2'> <Tooltip title="同步目录" className='ml-2'>
<SyncOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} onClick={sync} /> <SyncOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} onClick={sync} />
</Tooltip> </Tooltip>
...@@ -676,7 +665,7 @@ const ModelTree = (props) => { ...@@ -676,7 +665,7 @@ const ModelTree = (props) => {
} }
{ {
(viewSelectedKey==='dir'&&!isAdmin&&!isCatalogAdmin) && <React.Fragment> (viewSelectedKey==='dir'&&!isCatalogAdmin) && <React.Fragment>
<div style={{ width: 16 }}></div> <div style={{ width: 16 }}></div>
<div style={{ width: 16 }}></div> <div style={{ width: 16 }}></div>
</React.Fragment> </React.Fragment>
...@@ -728,7 +717,7 @@ const ModelTree = (props) => { ...@@ -728,7 +717,7 @@ const ModelTree = (props) => {
return <span title={nodeData?.remark||''}>{nodeData?.name||''}</span>; return <span title={nodeData?.remark||''}>{nodeData?.name||''}</span>;
}} }}
onRightClick={({event, node}) => { onRightClick={({event, node}) => {
if ((viewSelectedKey==='dir'&&(isAdmin||isCatalogAdmin)) || (viewSelectedKey === 'branch')) { if ((viewSelectedKey==='dir'&&isCatalogAdmin) || (viewSelectedKey === 'branch')) {
setCurrentRightClickDir(node); setCurrentRightClickDir(node);
displayMenu(event); displayMenu(event);
} }
......
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