Commit 4b095cf8 by zhaochengxiang

资产浏览关键用户允许新增岗位

parent 49bfb6a9
......@@ -339,6 +339,10 @@ export function* checkAdmin() {
return yield call(service.checkAdmin)
}
export function* checkDataKeyUser() {
return yield call(service.checkDataKeyUser)
}
export function* getDrafts(payload) {
return yield call(service.getDrafts, payload);
}
......
......@@ -320,6 +320,10 @@ export function checkAdmin() {
return Post("/dataassetmanager/dataAssetApi/checkCurrentUserIsAdmin")
}
export function checkDataKeyUser() {
return Post("/dataassetmanager/dataAssetApi/checkCurrentUserIsDataKeyUser")
}
export function getDrafts(payload) {
return GetJSON("/dataassetmanager/draftApi/listDataAssetsByPage", payload)
}
......
......@@ -135,6 +135,7 @@ const AssetTable = (props) => {
const [elements, setElements] = useState()
const [currentElementId, setCurrentElementId] = useState()
const [isAdmin, setAdmin] = React.useState()
const [isDataKeyUser, setDataKeyUser] = React.useState()
const [ modal, contextHolder ] = Modal.useModal();
const anchorId = getQueryParam(AnchorId, props?.location?.search);
......@@ -180,6 +181,7 @@ const AssetTable = (props) => {
useEffect(() => {
getAdmin();
judgeDataKeyUser();
getUsers();
if (reference === AssetRecycleReference) {
getTemplates()
......@@ -297,6 +299,15 @@ const AssetTable = (props) => {
})
}
const judgeDataKeyUser = () => {
dispatch({
type: 'assetmanage.checkDataKeyUser',
callback: (data) => {
setDataKeyUser((data==='true')?true:false)
}
})
}
const getTemplates = () => {
setLoadingTemplates(true)
dispatch({
......@@ -1030,7 +1041,7 @@ const AssetTable = (props) => {
>
<Space size={15}>
{
(reference===AssetManageReference && isPostAsset(getTemplateType()) && nodeAllowdLoadDataAsset) && <Button onClick={addAsset}>新增</Button>
((reference===AssetManageReference||isDataKeyUser) && isPostAsset(getTemplateType()) && nodeAllowdLoadDataAsset) && <Button onClick={addAsset}>新增</Button>
}
{
......
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