已开通工作台不需要显示组织管理按钮
This commit is contained in:
parent
9657eacc41
commit
dd9c5f5697
|
|
@ -2522,7 +2522,6 @@ _extend(KRange, {
|
|||
return self;
|
||||
},
|
||||
dump : function() {
|
||||
console.log('--------------------');
|
||||
console.log(this.startContainer.nodeType == 3 ? this.startContainer.nodeValue : this.startContainer, this.startOffset);
|
||||
console.log(this.endContainer.nodeType == 3 ? this.endContainer.nodeValue : this.endContainer, this.endOffset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "s
|
|||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
console.log("base:",props.projectBase && props.projectBase.author && props.projectBase.author.type);
|
||||
this.state = {
|
||||
Addcoursestype: false,
|
||||
Addcoursestypes: false,
|
||||
|
|
@ -218,6 +219,7 @@ class App extends Component {
|
|||
let url = `/owners/${pathname}.json`;
|
||||
axios.get(url).then((response) => {
|
||||
if (response && response.status === 200) {
|
||||
console.log("data:",response.data.type);
|
||||
this.setState({
|
||||
pathType: response.data.type || '404',
|
||||
pathName: pathname,
|
||||
|
|
@ -511,13 +513,6 @@ class App extends Component {
|
|||
}>
|
||||
</Route>
|
||||
|
||||
<Route path={"/:OIdentifier/enterprise"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/* 判断为用户/组织,并进入对应页面 */}
|
||||
{
|
||||
pathType === 'User' ?
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ function requestForSignatrue (callback) {
|
|||
service.post(url, {
|
||||
url: currentUrl,
|
||||
}).then((response) => {
|
||||
console.log('got res')
|
||||
const data = response.data && response.data.data;
|
||||
|
||||
wx.config({
|
||||
|
|
@ -125,7 +124,6 @@ export function configShareForCourses () {
|
|||
|
||||
// detail
|
||||
export function configShareForCustom (title, desc, imgUrl, path) {
|
||||
console.log('--------------------', title,desc)
|
||||
requestForSignatrue(() => {
|
||||
console.log('configShareForCustom', host)
|
||||
const _url = window.location.href.split('#')[0];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function beforeFetch(actionUrl){
|
|||
axios.defaults.withCredentials = true;
|
||||
}
|
||||
const config = {
|
||||
// headers:{Authorization:"Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjo0NCwidXNlcl9rZXkiOiI3NWY3MmJmYmE2NGU4N2U3NWVjNWMwZDk2OThkMDFiN2EyODE0YjYwIiwidXNlcm5hbWUiOiJpbm5vdiJ9.IviAyZQjPFc4rT3ejAKfJYx3_QgS78RCKHx1XS-A4uI_mrc7_l6wK76HVIoPCEvP0Qimzyc6dpeVW4cE2fILZw"},
|
||||
headers:{Authorization:"Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjo0NCwidXNlcl9rZXkiOiI3NWY3MmJmYmE2NGU4N2U3NWVjNWMwZDk2OThkMDFiN2EyODE0YjYwIiwidXNlcm5hbWUiOiJpbm5vdiJ9.IviAyZQjPFc4rT3ejAKfJYx3_QgS78RCKHx1XS-A4uI_mrc7_l6wK76HVIoPCEvP0Qimzyc6dpeVW4cE2fILZw"},
|
||||
baseURL: actionUrl,
|
||||
timeout: 1800000, // 请求超时时间
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,8 +216,7 @@ class Detail extends Component {
|
|||
}
|
||||
|
||||
|
||||
componentDidMount = () => {
|
||||
// this.getProject();
|
||||
componentDidMount=()=>{
|
||||
let history = this.props.location;
|
||||
this.clearIssueCookies(history);
|
||||
if (this.props.clearProject) {
|
||||
|
|
@ -228,23 +227,6 @@ class Detail extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
componentDidUpdate = async (prevState) => {
|
||||
let prevParam = prevState.match.params;
|
||||
let propsParam = this.props.match.params;
|
||||
if (prevState && this.props && (prevParam.projectsId !== propsParam.projectsId || prevParam.owner !== propsParam.owner)) {
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const data = await getProjectFunc(owner, projectsId);
|
||||
if (data.data) {
|
||||
this.getProject(data.data)
|
||||
}
|
||||
}
|
||||
|
||||
this.props.history.listen((history) => {
|
||||
// 非issue链接地址清除cookie states,具体保存和操作在order.js页面
|
||||
this.clearIssueCookies(history);
|
||||
})
|
||||
}
|
||||
|
||||
clearIssueCookies = (history) => {
|
||||
const { pathname } = history;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
|
|
@ -257,7 +239,7 @@ class Detail extends Component {
|
|||
async componentWillMount() {
|
||||
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
|
||||
console.log(this.props);
|
||||
if (!this.props.projectBase) {
|
||||
const data = await getProjectFunc(owner, projectsId);
|
||||
if (data && data.data) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const Img = styled.img`{
|
|||
height:45px;
|
||||
margin-right:12px;
|
||||
}`
|
||||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile }) {
|
||||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile , enterpriseOpened }) {
|
||||
const [ languageData, setLanguageData ] = useState(undefined);
|
||||
const [ memberData, setMemberData ] = useState(undefined);
|
||||
const [ groupData, setGroupData ] = useState(undefined);
|
||||
|
|
@ -148,7 +148,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
|||
</Box>
|
||||
:""
|
||||
}
|
||||
<Box
|
||||
{!enterpriseOpened && <Box
|
||||
name="组织团队"
|
||||
count={groupData && groupData.total_count}
|
||||
icon={<i className="iconfont icon-zuzhituandui font-17 mr8"></i>}
|
||||
|
|
@ -188,6 +188,7 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
|||
</React.Fragment>:<Nodata _html="暂无团队" small/>
|
||||
}
|
||||
</Box>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const CLANew = Loadable({
|
|||
export default (( props )=>{
|
||||
const pathname = props.location.pathname;
|
||||
const OIdentifier = props.match.params.OIdentifier;
|
||||
const {organizeDetail} = props;
|
||||
const { organizeDetail , enterpriseOpened } = props;
|
||||
useEffect(()=>{
|
||||
if(organizeDetail){
|
||||
const {nickname} = organizeDetail;
|
||||
|
|
@ -68,8 +68,9 @@ export default (( props )=>{
|
|||
const array = {list:[
|
||||
{name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/setting`},
|
||||
{name:'组织首页管理',icon:"icon-huabanfuben",href:`/${OIdentifier}/setting/index`},
|
||||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/setting/member`},
|
||||
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`},
|
||||
// ,href: enterpriseOpened ? `${ mygetHelmetapi && mygetHelmetapi.common.zone }/${OIdentifier}/members` : `/${OIdentifier}/setting/member`
|
||||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/setting/member`, hide: enterpriseOpened},
|
||||
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`, hide: enterpriseOpened},
|
||||
// {name:'管理web钩子',icon:"icon-zhongqingdianxinicon10",href:`/${OIdentifier}/setting/hooks`}
|
||||
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/agreement`,hide:organizeDetail && !organizeDetail.enabling_cla}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { Pagination , Spin } from 'antd';
|
|||
import AddMemberBox from './Component/AddMemberBox';
|
||||
|
||||
const limit = 16;
|
||||
function TeamMember({organizeDetail,current_user,history,match}){
|
||||
function TeamMember({organizeDetail,current_user,history,match,enterpriseOpened}){
|
||||
const OIdentifier = match.params.OIdentifier;
|
||||
const [ page , setPage ] = useState(1);
|
||||
const [ total , setTotal ] = useState(0);
|
||||
|
|
@ -46,7 +46,7 @@ function TeamMember({organizeDetail,current_user,history,match}){
|
|||
<WhiteBack style={{marginBottom:"30px",border:'1px solid #eee'}}>
|
||||
<Banner>组织成员
|
||||
{
|
||||
organizeDetail && organizeDetail.is_admin &&
|
||||
!enterpriseOpened && organizeDetail && organizeDetail.is_admin &&
|
||||
<AddMemberBox
|
||||
className="addMemberBtn"
|
||||
orzId={organizeDetail && organizeDetail.id}
|
||||
|
|
|
|||
|
|
@ -23,54 +23,6 @@ class DetailTop extends Component {
|
|||
super(props);
|
||||
this.state = {}
|
||||
}
|
||||
|
||||
// getProject = (num) => {
|
||||
// const { projectsId, owner } = this.props.match.params;
|
||||
// const url = `/${owner}/${projectsId}/simple.json`;
|
||||
// axios.get(url).then((result) => {
|
||||
// if (result && result.data) {
|
||||
// this.setState({
|
||||
// project: result.data,
|
||||
// open_devops: result.data.open_devops,
|
||||
// platform: result.data.platform && result.data.platform !== 'educoder'
|
||||
// })
|
||||
// if (result.data.type !== 0 && result.data.mirror_status === 1) {
|
||||
// console.log("--------start channel --------");
|
||||
// // 是镜像项目,且未完成迁移
|
||||
// this.canvasChannel();
|
||||
// if (num) {
|
||||
// this.setState({
|
||||
// secondSync: true,
|
||||
// firstSync: false
|
||||
// })
|
||||
// } else {
|
||||
// this.setState({
|
||||
// firstSync: true,
|
||||
// secondSync: false
|
||||
// })
|
||||
// }
|
||||
// this.setState({
|
||||
// mirror_status:1
|
||||
// })
|
||||
// } else if (result.data.mirror_status === 2) {
|
||||
// this.setState({
|
||||
// mirror_status:2,
|
||||
// firstSync: false
|
||||
// })
|
||||
// this.deleteProjectBack();
|
||||
// } else {
|
||||
// this.setState({
|
||||
// firstSync: false,
|
||||
// secondSync: false,
|
||||
// mirror_status:0
|
||||
// })
|
||||
// this.getBanner();
|
||||
// this.getDetail();
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
render() {
|
||||
// 个人中心新增的二级目录都需在此添加一次。将项目放组织和个人名下后,此处根据二级目录作判断,
|
||||
let secondRouter = '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue