diff --git a/src/AppConfig.js b/src/AppConfig.js index 2c34caa67..f897831fc 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 5be749510..61b2df722 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -462,7 +462,7 @@ class Detail extends Component { firstSync ? "": { - current_user && current_user.login && (projectDetail && projectDetail.type && projectDetail.type === 2) ? + ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ? 同步镜像 : "" } @@ -639,6 +639,11 @@ class Detail extends Component { } > {/* 新建合并请求 */} + () + } + > () diff --git a/src/forge/users/Material/Base.jsx b/src/forge/users/Material/Base.jsx index 578ae97fd..7a2001116 100644 --- a/src/forge/users/Material/Base.jsx +++ b/src/forge/users/Material/Base.jsx @@ -43,6 +43,7 @@ export default Form.create()( } Axios.put(url,params).then(result=>{ if(result && result.data){ + props.showNotification("资料修改成功!") resetUser && resetUser(result.data); } }).catch(error=>{}) diff --git a/src/forge/users/Statistics/Index.jsx b/src/forge/users/Statistics/Index.jsx index 282bff1d5..457ddff07 100644 --- a/src/forge/users/Statistics/Index.jsx +++ b/src/forge/users/Statistics/Index.jsx @@ -84,7 +84,7 @@ function Index(props) { let percent = result.data.user && result.data.user.languages_percent; let arr = []; Object.keys(percent).map((item,key)=>{ - arr.push({name:item,p:percent[item]*100,color:getColor()}); + arr.push({name:item,p:parseFloat(percent[item]*100).toFixed(1),color:getColor()}); }) setPercentData(arr); }