基本资料

This commit is contained in:
caishi 2021-09-01 11:24:37 +08:00
parent 58115f8dae
commit 86f50d4278
14 changed files with 281 additions and 115 deletions

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2340181 */ font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1628841816999') format('woff2'), src: url('iconfont.woff2?t=1630465334247') format('woff2'),
url('iconfont.woff?t=1628841816999') format('woff'), url('iconfont.woff?t=1630465334247') format('woff'),
url('iconfont.ttf?t=1628841816999') format('truetype'); url('iconfont.ttf?t=1630465334247') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,90 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-gerenziliao:before {
content: "\e8c4";
}
.icon-xinshouzhiyin:before {
content: "\e8e4";
}
.icon-xinjianxiangmu:before {
content: "\e8e6";
}
.icon-jiaruketang1:before {
content: "\e8e9";
}
.icon-xiangmugonggao:before {
content: "\e8c2";
}
.icon-chengguo:before {
content: "\e8c3";
}
.icon-chengjiaogonggao:before {
content: "\e8c0";
}
.icon-jishuzichan:before {
content: "\e8c1";
}
.icon-feibiaogonggao:before {
content: "\e8bc";
}
.icon-zhongbiaogonggao:before {
content: "\e8bd";
}
.icon-gengzhenggonggao:before {
content: "\e8be";
}
.icon-zhaobiaogonggao:before {
content: "\e8bf";
}
.icon-wenjian6:before {
content: "\e8ba";
}
.icon-wenjianjia4:before {
content: "\e8bb";
}
.icon-quxiaoguanzhu:before {
content: "\e89a";
}
.icon-dianzan_icon:before {
content: "\e8a2";
}
.icon-wenjian5:before {
content: "\e896";
}
.icon-wenjianjia3:before {
content: "\e8a9";
}
.icon-fuzhiicon:before {
content: "\e886";
}
.icon-zhuye-fill:before {
content: "\e876";
}
.icon-daimakuicon:before {
content: "\e884";
}
.icon-xinjian2:before { .icon-xinjian2:before {
content: "\e8b0"; content: "\e8b0";
} }
@ -29,22 +113,6 @@
content: "\e8a6"; content: "\e8a6";
} }
.icon-dianzan_icon:before {
content: "\e8ba";
}
.icon-quxiaoguanzhu:before {
content: "\e8bb";
}
.icon-daimakuicon:before {
content: "\e8a9";
}
.icon-zhuyeicon:before {
content: "\e884";
}
.icon-biaoqianicon:before { .icon-biaoqianicon:before {
content: "\e882"; content: "\e882";
} }
@ -57,10 +125,6 @@
content: "\e885"; content: "\e885";
} }
.icon-fuzhiicon:before {
content: "\e886";
}
.icon-lianjieicon:before { .icon-lianjieicon:before {
content: "\e887"; content: "\e887";
} }
@ -93,10 +157,6 @@
content: "\e899"; content: "\e899";
} }
.icon-wenjian5:before {
content: "\e89a";
}
.icon-tijiaoicon:before { .icon-tijiaoicon:before {
content: "\e89e"; content: "\e89e";
} }
@ -105,10 +165,6 @@
content: "\e89f"; content: "\e89f";
} }
.icon-wenjianjia3:before {
content: "\e8a2";
}
.icon-xialaanniu1:before { .icon-xialaanniu1:before {
content: "\e8a4"; content: "\e8a4";
} }
@ -241,10 +297,6 @@
content: "\e875"; content: "\e875";
} }
.icon-fuzhi_icon:before {
content: "\e876";
}
.icon-shanchuicon:before { .icon-shanchuicon:before {
content: "\e877"; content: "\e877";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,153 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "24014152",
"name": "个人资料",
"font_class": "gerenziliao",
"unicode": "e8c4",
"unicode_decimal": 59588
},
{
"icon_id": "23655968",
"name": "新手指引",
"font_class": "xinshouzhiyin",
"unicode": "e8e4",
"unicode_decimal": 59620
},
{
"icon_id": "23655969",
"name": "新建项目",
"font_class": "xinjianxiangmu",
"unicode": "e8e6",
"unicode_decimal": 59622
},
{
"icon_id": "23658111",
"name": "加入课堂",
"font_class": "jiaruketang1",
"unicode": "e8e9",
"unicode_decimal": 59625
},
{
"icon_id": "23791639",
"name": "项目公告",
"font_class": "xiangmugonggao",
"unicode": "e8c2",
"unicode_decimal": 59586
},
{
"icon_id": "23791640",
"name": "成果",
"font_class": "chengguo",
"unicode": "e8c3",
"unicode_decimal": 59587
},
{
"icon_id": "23791410",
"name": "成交公告",
"font_class": "chengjiaogonggao",
"unicode": "e8c0",
"unicode_decimal": 59584
},
{
"icon_id": "23791411",
"name": "技术资产",
"font_class": "jishuzichan",
"unicode": "e8c1",
"unicode_decimal": 59585
},
{
"icon_id": "23790928",
"name": "废标公告",
"font_class": "feibiaogonggao",
"unicode": "e8bc",
"unicode_decimal": 59580
},
{
"icon_id": "23790929",
"name": "中标公告",
"font_class": "zhongbiaogonggao",
"unicode": "e8bd",
"unicode_decimal": 59581
},
{
"icon_id": "23790930",
"name": "更正公告",
"font_class": "gengzhenggonggao",
"unicode": "e8be",
"unicode_decimal": 59582
},
{
"icon_id": "23790931",
"name": "招标公告",
"font_class": "zhaobiaogonggao",
"unicode": "e8bf",
"unicode_decimal": 59583
},
{
"icon_id": "23732532",
"name": "文件",
"font_class": "wenjian6",
"unicode": "e8ba",
"unicode_decimal": 59578
},
{
"icon_id": "23732533",
"name": "文件夹",
"font_class": "wenjianjia4",
"unicode": "e8bb",
"unicode_decimal": 59579
},
{
"icon_id": "23642443",
"name": "取消关注",
"font_class": "quxiaoguanzhu",
"unicode": "e89a",
"unicode_decimal": 59546
},
{
"icon_id": "23642444",
"name": "点赞_icon",
"font_class": "dianzan_icon",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{
"icon_id": "23639530",
"name": "文件",
"font_class": "wenjian5",
"unicode": "e896",
"unicode_decimal": 59542
},
{
"icon_id": "23639533",
"name": "文件夹",
"font_class": "wenjianjia3",
"unicode": "e8a9",
"unicode_decimal": 59561
},
{
"icon_id": "23639440",
"name": "复制icon",
"font_class": "fuzhiicon",
"unicode": "e886",
"unicode_decimal": 59526
},
{
"icon_id": "23639422",
"name": "主页-fill",
"font_class": "zhuye-fill",
"unicode": "e876",
"unicode_decimal": 59510
},
{
"icon_id": "23639423",
"name": "代码库icon",
"font_class": "daimakuicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{ {
"icon_id": "23572260", "icon_id": "23572260",
"name": "新建", "name": "新建",
@ -33,34 +180,6 @@
"unicode": "e8a6", "unicode": "e8a6",
"unicode_decimal": 59558 "unicode_decimal": 59558
}, },
{
"icon_id": "23492900",
"name": "点赞_icon",
"font_class": "dianzan_icon",
"unicode": "e8ba",
"unicode_decimal": 59578
},
{
"icon_id": "23492901",
"name": "取消关注",
"font_class": "quxiaoguanzhu",
"unicode": "e8bb",
"unicode_decimal": 59579
},
{
"icon_id": "23473151",
"name": "代码库icon",
"font_class": "daimakuicon",
"unicode": "e8a9",
"unicode_decimal": 59561
},
{
"icon_id": "23473104",
"name": "主页icon",
"font_class": "zhuyeicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{ {
"icon_id": "23472253", "icon_id": "23472253",
"name": "标签icon", "name": "标签icon",
@ -82,13 +201,6 @@
"unicode": "e885", "unicode": "e885",
"unicode_decimal": 59525 "unicode_decimal": 59525
}, },
{
"icon_id": "23472257",
"name": "复制icon",
"font_class": "fuzhiicon",
"unicode": "e886",
"unicode_decimal": 59526
},
{ {
"icon_id": "23472258", "icon_id": "23472258",
"name": "链接icon", "name": "链接icon",
@ -145,13 +257,6 @@
"unicode": "e899", "unicode": "e899",
"unicode_decimal": 59545 "unicode_decimal": 59545
}, },
{
"icon_id": "23472268",
"name": "文件",
"font_class": "wenjian5",
"unicode": "e89a",
"unicode_decimal": 59546
},
{ {
"icon_id": "23472269", "icon_id": "23472269",
"name": "提交icon", "name": "提交icon",
@ -166,13 +271,6 @@
"unicode": "e89f", "unicode": "e89f",
"unicode_decimal": 59551 "unicode_decimal": 59551
}, },
{
"icon_id": "23472271",
"name": "文件夹",
"font_class": "wenjianjia3",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{ {
"icon_id": "23472272", "icon_id": "23472272",
"name": "下拉按钮", "name": "下拉按钮",
@ -404,13 +502,6 @@
"unicode": "e875", "unicode": "e875",
"unicode_decimal": 59509 "unicode_decimal": 59509
}, },
{
"icon_id": "23046262",
"name": "复制_icon",
"font_class": "fuzhi_icon",
"unicode": "e876",
"unicode_decimal": 59510
},
{ {
"icon_id": "23046268", "icon_id": "23046268",
"name": "删除icon", "name": "删除icon",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -223,6 +223,15 @@ class NewHeader extends Component {
} }
} }
checkProfile=(url)=>{
const { showCompeleteDialog , completeProfile } = this.props;
if(completeProfile){
showCompeleteDialog && showCompeleteDialog();
}else{
this.props.history.push(url);
}
}
addMenu=(list)=>{ addMenu=(list)=>{
console.log(this.props); console.log(this.props);
return( return(
@ -233,7 +242,7 @@ class NewHeader extends Component {
list.map((item,key)=>{ list.map((item,key)=>{
return( return(
(item.name !=="加入课堂" && item.name !=="加入开发项目") && (item.name !=="加入课堂" && item.name !=="加入开发项目") &&
<Menu.Item key={item.name+key}><a href={item.url}>{item.name}</a></Menu.Item> <Menu.Item key={item.name+key}><a onClick={this.checkProfile(item.url)}>{item.name}</a></Menu.Item>
) )
}) })
} }

View File

@ -18,6 +18,10 @@ const SSHNew = Loadable({
loader: () => import("./sub/New"), loader: () => import("./sub/New"),
loading: Loading, loading: Loading,
}); });
const Profile = Loadable({
loader: () => import("../users/Material/Index"),
loading: Loading,
});
const SSHIndex = Loadable({ const SSHIndex = Loadable({
loader: () => import("./sub/SSH"), loader: () => import("./sub/SSH"),
loading: Loading, loading: Loading,
@ -39,6 +43,10 @@ function Index(props){
<li>安全设置</li> <li>安全设置</li>
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i>SSH密钥</Link></li> <li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i>SSH密钥</Link></li>
</ul> </ul>
<ul className="securityUl">
<li>个人信息</li>
<li className={pathname.indexOf("/settings/profile")>-1 ?"active":""}><Link to={`/settings/profile`}><i className="iconfont icon-gerenziliao mr5 font-14"></i>基本资料</Link></li>
</ul>
</div> </div>
<LongWidth> <LongWidth>
<Gap> <Gap>
@ -49,6 +57,12 @@ function Index(props){
<SSHNew {...props} {...p}/> <SSHNew {...props} {...p}/>
)} )}
></Route> ></Route>
<Route
path="/settings/profile"
render={(p) => (
<Profile {...props} {...p}/>
)}
></Route>
<Route <Route
path="/settings/SSH" path="/settings/SSH"
render={(p) => ( render={(p) => (

View File

@ -36,6 +36,8 @@
.securityUl{ .securityUl{
padding:20px 16px; padding:20px 16px;
color: #333; color: #333;
margin-bottom: 0px;
padding-bottom: 0px;
li{ li{
margin-bottom: 10px; margin-bottom: 10px;
height: 27px; height: 27px;

View File

@ -221,7 +221,7 @@ class Infos extends Component {
{user && user.description} {user && user.description}
</div> </div>
<div> <div>
{user && current_user && user.login === current_user.login && ( {/* {user && current_user && user.login === current_user.login && (
<div className="user-info-star-button "> <div className="user-info-star-button ">
<Button <Button
block block
@ -234,7 +234,7 @@ class Infos extends Component {
修改资料 修改资料
</Button> </Button>
</div> </div>
)} )} */}
{current_user && user && user.login !== current_user.login && ( {current_user && user && user.login !== current_user.login && (
<div className="user-info-star-button "> <div className="user-info-star-button ">
<FocusButton <FocusButton
@ -349,18 +349,18 @@ class Infos extends Component {
return <Organize {...this.props} {...this.state} />; return <Organize {...this.props} {...this.state} />;
}} }}
></Route> ></Route>
<Route {/* <Route
path="/:username/info" path="/:username/info"
render={() => { render={() => {
return <UpdateInfo {...this.props} {...this.state} resetUser={this.resetUser}/>; return <UpdateInfo {...this.props} {...this.state} resetUser={this.resetUser}/>;
}} }}
></Route> ></Route> */}
<Route {/* <Route
path="/:username/password" path="/:username/password"
render={() => { render={() => {
return <UpdateInfo {...this.props} {...this.state}/>; return <UpdateInfo {...this.props} {...this.state}/>;
}} }}
></Route> ></Route> */}
<Route <Route
path="/:username/statistics" path="/:username/statistics"

View File

@ -9,8 +9,9 @@ const { TextArea } = Input;
export default Form.create()( export default Form.create()(
forwardRef((props)=>{ forwardRef((props)=>{
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form; const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
const { username } = props && props.match && props.match.params; // const { username } = props && props.match && props.match.params;
const { user , resetUser , current_user } = props; const { resetUserInfo , current_user } = props;
console.log(props);
useEffect(()=>{ useEffect(()=>{
if(current_user && current_user.login){ if(current_user && current_user.login){
@ -30,7 +31,7 @@ export default Form.create()(
} }
function submitFunc(values) { function submitFunc(values) {
const url = `/users/${username}.json`; const url = `/users/${current_user && current_user.login}.json`;
const params={ const params={
user: { user: {
nickname: values.real_name, nickname: values.real_name,
@ -44,8 +45,7 @@ export default Form.create()(
Axios.put(url,params).then(result=>{ Axios.put(url,params).then(result=>{
if(result && result.data){ if(result && result.data){
props.showNotification("资料修改成功!") props.showNotification("资料修改成功!")
resetUser && resetUser(result.data); resetUserInfo && resetUserInfo();
props.history.push(`/${username}`)
} }
}).catch(error=>{}) }).catch(error=>{})
} }
@ -126,7 +126,7 @@ export default Form.create()(
<AlignCenter> <AlignCenter>
<span className="ant-form-item-label"></span> <span className="ant-form-item-label"></span>
<Button type={"primary"} onClick={submit}>提交</Button> <Button type={"primary"} onClick={submit}>提交</Button>
<Button type={"default"} onClick={()=>props.history.push(`/${username}`)} className="ml20">取消</Button> {/* <Button type={"default"} onClick={()=>props.history.push(`/${current_user && current_user.login}`)} className="ml20">取消</Button> */}
</AlignCenter> </AlignCenter>
</Form> </Form>
) )

View File

@ -6,21 +6,16 @@ import Base from './Base';
import Password from './Password'; import Password from './Password';
function Index(props){ function Index(props){
const { username } = props && props.match && props.match.params; // const { username } = props && props.match && props.match.params;
const { pathname } = props && props.location; const { pathname } = props && props.location;
const { current_user } = props; // const { current_user } = props;
useEffect(()=>{
if((username && current_user && (current_user.login !== username))){
props.history.push(`/${username}`);
}
},[current_user,username])
const [ key , setKey ] = useState("0"); const [ key , setKey ] = useState("0");
useEffect(()=>{ useEffect(()=>{
if(pathname){ if(pathname){
if(pathname === `/${username}/info`){ if(pathname === `/settings/profile`){
setKey("0"); setKey("0");
}else{ }else{
setKey("1"); setKey("1");
@ -32,7 +27,7 @@ function Index(props){
return( return(
<div> <div>
<Menu selectedKeys={[key]} mode={'horizontal'} className="infosRightMenu"> <Menu selectedKeys={[key]} mode={'horizontal'} className="infosRightMenu">
<Menu.Item key="0"><Link to={`/${username}/info`}>基本资料</Link></Menu.Item> <Menu.Item key="0"><Link to={`/settings/profile`}>基本资料</Link></Menu.Item>
{/* <Menu.Item key="1"><Link to={`/${username}/password`}>密码管理</Link></Menu.Item> */} {/* <Menu.Item key="1"><Link to={`/${username}/password`}>密码管理</Link></Menu.Item> */}
</Menu> </Menu>
<div style={{padding:"20px"}}> <div style={{padding:"20px"}}>

View File

@ -6,6 +6,9 @@
.ant-form-explain{ .ant-form-explain{
position: absolute; position: absolute;
} }
.ant-row.ant-form-item{
margin-bottom: 12px;
}
} }
.formBase.passMan{ .formBase.passMan{
.ant-form-item-label{ .ant-form-item-label{

View File

@ -155,7 +155,7 @@ export function TPMIndexHOC(WrappedComponent) {
this.initCommonState(response.data) this.initCommonState(response.data)
this.setState({ this.setState({
tpmLoading: false, tpmLoading: false,
completeProfile:response.data.profile_completed completeProfile:!response.data.profile_completed
}) })
if (this.props.match.path === "/" && response.data.login) { if (this.props.match.path === "/" && response.data.login) {
this.props.history.push(`/${response.data.login}`); this.props.history.push(`/${response.data.login}`);