隐藏左侧菜单项条件
This commit is contained in:
parent
2e0f6c559f
commit
333aa7904d
|
|
@ -376,12 +376,12 @@ class NewHeader extends Component {
|
|||
}
|
||||
<div className="head-right">
|
||||
{/* { search_url && <HeadSearch {...this.props}/>} */}
|
||||
{
|
||||
{/* {
|
||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||
<img src={require(`./img/add.png`)} alt="" width="16px" className="mr15 ml30"/>
|
||||
</Dropdown>:""
|
||||
}
|
||||
} */}
|
||||
|
||||
{/* { (settings && settings.common && settings.common.notice) && (current_user && current_user.login)?
|
||||
<Popover
|
||||
|
|
|
|||
|
|
@ -256,6 +256,13 @@ export function updateMyResource(data) {
|
|||
|
||||
|
||||
/** 非专区接口,组织工作台相关 */
|
||||
// 获取已开通企业的组织列表
|
||||
export function getOrzCompanyList(){
|
||||
return fetch({
|
||||
url:`/pms/pmsEnterprise/myList`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 查询组织是否开通企业
|
||||
export function checkOpenedEnterprise(orgId){
|
||||
return fetch({
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
font-weight:700;
|
||||
color:#333333;
|
||||
font-size:22px;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.orz-desc{
|
||||
color:#4c5b76;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ function List(props){
|
|||
<img src={getImageUrl(organizeDetail && organizeDetail.avatar_url)} alt=""/>
|
||||
<div className="info-orz">
|
||||
<p className="orz-main">
|
||||
<span className="orz-name">{organizeDetail && organizeDetail.nickname}</span>
|
||||
<span className="orz-name task-hide">{organizeDetail && organizeDetail.nickname}</span>
|
||||
<div>
|
||||
{(organizeDetail && organizeDetail.is_admin && enterpriseOpenInfo) && !enterpriseOpenInfo.isOpen ? <Link to={`/${OIdentifier}/enterprise`}><Button type='primary'>开通工作台</Button></Link> :
|
||||
enterpriseOpenInfo.url ? <Button type='primary' onClick={() => { window.open(enterpriseOpenInfo.url) }}>前往工作台</Button> : <Button type='primary'>正在开通工作台</Button>}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import SystemNotice from '../../forge/Component/NoticeModal/SystemNotice';
|
|||
import cookie from 'react-cookies';
|
||||
import NpsModal from '../modals/npsModal';
|
||||
import { IsPC } from 'educoder';
|
||||
import { getOrzCompanyList } from '../../forge/Information/api';
|
||||
|
||||
|
||||
const items = [
|
||||
|
|
@ -39,6 +40,21 @@ const items = [
|
|||
name: '制品库',
|
||||
icon: 'zhipinkuicon',
|
||||
path: '/repositories'
|
||||
},
|
||||
{
|
||||
name: '知识库',
|
||||
icon: 'wendangicon',
|
||||
path: '/docs'
|
||||
},
|
||||
{
|
||||
name: '成员',
|
||||
icon: 'chengyuanicon',
|
||||
path: '/members'
|
||||
},
|
||||
{
|
||||
name: '设置',
|
||||
icon: 'shezhiicon',
|
||||
path: '/admin'
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -67,7 +83,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
npsModalVisible: false,
|
||||
npsActionType: undefined,
|
||||
npsActionId: undefined,
|
||||
active:""
|
||||
active:"",
|
||||
companyList:undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +123,16 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
}
|
||||
///请求定制化的信息
|
||||
this.getAppdata();
|
||||
this.getComlist();
|
||||
}
|
||||
getComlist=()=>{
|
||||
console.log(this.props.history.location);
|
||||
getOrzCompanyList().then(res=>{
|
||||
console.log(res);
|
||||
this.setState({
|
||||
companyList:res.data.rows
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -321,7 +348,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
render() {
|
||||
let { isRender , current_user , giteaVisible , email ,
|
||||
completeProfile , showCP , showNotice , publicNav , mygetHelmetapi,
|
||||
npsModalVisible, npsActionType, npsActionId , supplyPhone } = this.state;
|
||||
npsModalVisible, npsActionType, npsActionId , supplyPhone , companyList } = this.state;
|
||||
const common = {
|
||||
showLoginDialog: this.showLoginDialog,
|
||||
checkIfLogin: this.checkIfLogin,
|
||||
|
|
@ -356,24 +383,24 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
{ !pathCheck && <Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header> }
|
||||
{!publicNav && <div style={{height:"7vh"}}></div> }
|
||||
<div className="flexTop">
|
||||
<ul className="navBox">
|
||||
{
|
||||
items.map((item, index) => {
|
||||
return <a
|
||||
className={`nav columnAlignCenter title1ColorSpan ${index===3? "active" :""}`}
|
||||
href={ `https://testpm.trustie.net/${ path.split('/')[1] === (current_user && current_user.login) ? 'prefecture' : path.split('/')[1] }${item.path}` }
|
||||
onMouseOver={() => this.setState({active:item.icon}) }
|
||||
onMouseLeave={() => this.setState({active:""}) }
|
||||
// onMouseOver={() => setActive(item.icon)}
|
||||
// onMouseLeave={() => setActive('') }
|
||||
key={ index }
|
||||
>
|
||||
<i className={`font-20 iconfontColor iconcolor-${this.activeOrSelected(item) ? 'xuanzhong-' : ''}${ item.icon }`}></i>
|
||||
<span className="mt3 font-16">{ item.name }</span>
|
||||
</a>
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
{ !(path === `/${current_user && current_user.login}` || path === `/settings/profile`) &&
|
||||
<ul className="navBox">
|
||||
{
|
||||
items.map((item, index) => {
|
||||
return <a
|
||||
className={`nav columnAlignCenter title1ColorSpan ${index===3? "active" :""}`}
|
||||
href={ `https://testpm.trustie.net/${ (companyList && companyList.length>0) &&companyList[0].enterpriseIdentifier}${item.path }` }
|
||||
onMouseOver={() => this.setState({active:item.icon}) }
|
||||
onMouseLeave={() => this.setState({active:""}) }
|
||||
key={ index }
|
||||
>
|
||||
<i className={`font-20 iconfontColor iconcolor-${this.activeOrSelected(item) ? 'xuanzhong-' : ''}${ item.icon }`}></i>
|
||||
<span className="mt3 font-16">{ item.name }</span>
|
||||
</a>
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
<div className="panelMain">
|
||||
<div className="newContainer newContainers">
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue