学位论文算法基于内网版本

This commit is contained in:
caishi 2025-04-27 10:40:59 +08:00
commit cf1eac4421
45 changed files with 992 additions and 202 deletions

View File

@ -3672,7 +3672,7 @@ html>body #ajax-indicator {
.head-nav li a:hover,
.head-nav li.active a {
color: #5091ff
/* color: #5091ff */
}
.head-right {

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1727340588188') format('woff2'),
url('iconfont.woff?t=1727340588188') format('woff'),
url('iconfont.ttf?t=1727340588188') format('truetype');
src: url('iconfont.woff2?t=1743578721658') format('woff2'),
url('iconfont.woff?t=1743578721658') format('woff'),
url('iconfont.ttf?t=1743578721658') format('truetype');
}
.iconfont {
@ -13,6 +13,78 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-yincang3:before {
content: "\e986";
}
.icon-shoujihao:before {
content: "\e987";
}
.icon-xianshi1:before {
content: "\e988";
}
.icon-mima:before {
content: "\e989";
}
.icon-paixu:before {
content: "\e98a";
}
.icon-jiantou_xiangyou:before {
content: "\e98b";
}
.icon-a-fork1:before {
content: "\e98c";
}
.icon-dianzan1:before {
content: "\e983";
}
.icon-yonghuming:before {
content: "\e984";
}
.icon-youxiang2:before {
content: "\e985";
}
.icon-tongzhi1:before {
content: "\e981";
}
.icon-xinzeng:before {
content: "\e982";
}
.icon-a-fenzhi1:before {
content: "\e980";
}
.icon-yunxiazai:before {
content: "\e97b";
}
.icon-lunwen1:before {
content: "\e97c";
}
.icon-zhuanli2:before {
content: "\e97d";
}
.icon-jiantou2:before {
content: "\e97e";
}
.icon-jiantou-you-cuxiantiao:before {
content: "\e97f";
}
.icon-gongxianquequan:before {
content: "\e979";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,132 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "43884585",
"name": "隐藏",
"font_class": "yincang3",
"unicode": "e986",
"unicode_decimal": 59782
},
{
"icon_id": "43884586",
"name": "手机号",
"font_class": "shoujihao",
"unicode": "e987",
"unicode_decimal": 59783
},
{
"icon_id": "43884583",
"name": "显示",
"font_class": "xianshi1",
"unicode": "e988",
"unicode_decimal": 59784
},
{
"icon_id": "43884584",
"name": "密码",
"font_class": "mima",
"unicode": "e989",
"unicode_decimal": 59785
},
{
"icon_id": "43884582",
"name": "排序",
"font_class": "paixu",
"unicode": "e98a",
"unicode_decimal": 59786
},
{
"icon_id": "43884581",
"name": "箭头_向右",
"font_class": "jiantou_xiangyou",
"unicode": "e98b",
"unicode_decimal": 59787
},
{
"icon_id": "43884580",
"name": "fork (1)",
"font_class": "a-fork1",
"unicode": "e98c",
"unicode_decimal": 59788
},
{
"icon_id": "43884589",
"name": "点赞",
"font_class": "dianzan1",
"unicode": "e983",
"unicode_decimal": 59779
},
{
"icon_id": "43884587",
"name": "用户名",
"font_class": "yonghuming",
"unicode": "e984",
"unicode_decimal": 59780
},
{
"icon_id": "43884588",
"name": "邮箱",
"font_class": "youxiang2",
"unicode": "e985",
"unicode_decimal": 59781
},
{
"icon_id": "43788877",
"name": "通知",
"font_class": "tongzhi1",
"unicode": "e981",
"unicode_decimal": 59777
},
{
"icon_id": "43788876",
"name": "新增",
"font_class": "xinzeng",
"unicode": "e982",
"unicode_decimal": 59778
},
{
"icon_id": "39410543",
"name": "分支 (1)",
"font_class": "a-fenzhi1",
"unicode": "e980",
"unicode_decimal": 59776
},
{
"icon_id": "42234576",
"name": "云下载",
"font_class": "yunxiazai",
"unicode": "e97b",
"unicode_decimal": 59771
},
{
"icon_id": "42234575",
"name": "论文",
"font_class": "lunwen1",
"unicode": "e97c",
"unicode_decimal": 59772
},
{
"icon_id": "42234574",
"name": "专利",
"font_class": "zhuanli2",
"unicode": "e97d",
"unicode_decimal": 59773
},
{
"icon_id": "42234573",
"name": "箭头",
"font_class": "jiantou2",
"unicode": "e97e",
"unicode_decimal": 59774
},
{
"icon_id": "42234572",
"name": "箭头-右-粗线条",
"font_class": "jiantou-you-cuxiantiao",
"unicode": "e97f",
"unicode_decimal": 59775
},
{
"icon_id": "41876673",
"name": "贡献确权",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ import {
Switch
} from 'react-router-dom';
import axios from 'axios';
import LoginDialog from './modules/login/LoginDialog';
import LoginDialog from './modules/loginRegister/dissertion';
// import 'babel-polyfill';
import Loading from './Loading';
@ -104,7 +104,7 @@ const ProjectIndex = Loadable({
});
const Home = Loadable({
loader: () => import('./home/Index'),
loader: () => import('./home/dissertionHome'),
loading: Loading,
})
@ -349,7 +349,7 @@ class App extends Component {
<Route path="/hiagent"
render={
(props) => (<Iframe {...this.props} {...props} {...this.state} />)
}
}
></Route>
{/* wiki预览 */}
<Route path="/:owner/:proIdentity/:projectId/wiki/preview" render={

View File

@ -15,6 +15,7 @@ function locationurl(list) {
window.location.href = list
}
}
var proxy = "http://172.168.15.202:4000/";
// TODO 开发期多个身份切换
let debugType = ""
// if (isDev) {
@ -54,7 +55,7 @@ export function initAxiosInterceptors(props) {
// }
// }
config.withCredentials = false;
config.url = url;
config.url = `${proxy}${url}`;
return config;
},
err => {

View File

@ -21,6 +21,7 @@ function share(shareData) {
}
const urlDoneMap = {}
function requestForSignatrue (callback) {
return
const currentUrl = window.location.href.split('#')[0]
if (window.wx) {

View File

@ -106,7 +106,7 @@ function New(props){
<Input placeholder="请输入数据集名称" maxLength={100} />,
)}
</Form.Item>
<Form.Item label="开源许可证">
{/* <Form.Item label="">
{getFieldDecorator('license_id', {
rules: [{
validator: (rule, value, callback) => checkId(rule, value, callback, licensesList, '开源许可证')
@ -127,7 +127,7 @@ function New(props){
}
</AutoComplete>
)}
</Form.Item>
</Form.Item> */}
<Form.Item label="数据集描述">
{getFieldDecorator('description', {
rules: [
@ -139,11 +139,11 @@ function New(props){
<TextArea maxLength={500} placeholder="请输入描述内容" autosize={{ minRows: 5, maxRows: 5 }} showCount/>,
)}
</Form.Item>
<Form.Item label="研究论文">
{/* <Form.Item label="">
{getFieldDecorator('paper_content', {rules:[]})(
<TextArea maxLength={500} placeholder="请输入研究论文" autosize={{ minRows: 5, maxRows: 5 }} showCount/>,
)}
</Form.Item>
</Form.Item> */}
<div className="center">
<Button style={{width:"95px"}} onClick={onCancel}>取消</Button>
<Button type="primary" className="ml20" style={{width:"95px"}} onClick={submit}>确定</Button>

View File

@ -6,8 +6,7 @@ import cookie from 'react-cookies';
import { notification , Dropdown ,Popover, Menu,Badge } from 'antd';
import { Link } from 'react-router-dom';
import LoginDialog from '../../modules/login/LoginDialog';
// import HeadSearch from '../Component/HeadSearch';
import LoginDialog from '../../modules/loginRegister/dissertion';
import AddProjectModal from './AddProjectModal';
import '../../modules/tpm/TPMIndex.css';
@ -84,15 +83,11 @@ class NewHeader extends Component {
// }
}
educoderlogin = () => {
educoderlogin = (type="login") => {
//登录账号
if(window.location.pathname === "/"){
window.location.href="/login";
}else{
this.setState({
isRender: true
})
}
this.setState({
isRender: type
})
}
educoderloginysl = () => {
//退出账号时清除登录页面的下次自动登录(用户再次打开登录页面时下次自动登录框不勾选)
@ -306,7 +301,7 @@ class NewHeader extends Component {
return (
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader">
<div className="headerContent">
{isRender === true ?
{!!isRender ?
<LoginDialog
{...this.props}
{...this.state}
@ -345,33 +340,14 @@ class NewHeader extends Component {
var is_hidden = item.hidden;
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
var wl = waiLian && waiLian.length>0;
if (item.name === '特色专区') {
// 特色专区下拉菜单
return zoneList && zoneList.length > 0 ? <li
className={`${this.matchZone() === true ? 'active drop-li' : 'drop-li'}`}
onMouseOver={ () => { this.setState( {showSubMenu: true }) } }
onMouseOut={ () => { this.setState( {showSubMenu: false }) } }
return (
<li key={key}
className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`}
style={{display:!is_hidden ? 'flex' : 'none'} }
>
<a onClick={ () => { this.setState( {showSubMenu: true }) } }>特色专区</a>
<ul className={ `drop-down ${ showSubMenu ? 'drop-down-show' : '' }` } style={{ height : showSubMenu ? `${ current_user && current_user.login ? ((zoneList.length+1) * 46) : (zoneList.length * 46)}px` : 0 }}>
{
zoneList.map((e, k) => {
return <li className="drop-down-item" key={ k }><a href={ e.link } className="task-hide" title={ e.name } target="_blank">{ e.name }</a></li>
})
}
{current_user && current_user.login && <li className="drop-down-item"><Link to="/zone/apply" target="_blank">+申请创建</Link></li> }
</ul>
</li> : ''
} else {
return (
<li key={key}
className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`}
style={{display:!is_hidden ? 'flex' : 'none'} }
>
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
</li>
)
}
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
</li>
)
})
}
</ul>
@ -408,14 +384,15 @@ class NewHeader extends Component {
{!user || (user && !user.login) ?
<span className="font-15 ml30">
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
{
<a onClick={() => this.educoderlogin("registerByPhone")} className="mr5 regBtn">注册</a>
{/* {
(settings && settings.common && settings.common.register) ?
publicNav ?
<a href='/register' className="regBtn">立即注册</a>
:
<span><em className="vertical-line"></em><a className="ml5 color-white" href='/register'></a></span>
:""
}
} */}
</span>
:
<Dropdown placement={`bottomRight`} overlay={this.renderMenu(settings && settings.personal)}>

View File

@ -350,19 +350,14 @@
}
.regBtn{
height: 40px;
background: #466AFF;
border-radius: 2px;
background: #FFFFFF;
border-radius: 4px;
display: inline-block;
padding:0px 18px;
margin-left: 20px;
font-size: 14px;
font-weight: 400;
color: #FFFFFF!important;
color: $primary-color;
line-height: 40px;
&:hover{
color: #FFFFFF!important;
background-color: #355CFF;
}
}
.head-nav {
text-align: center;
@ -389,6 +384,9 @@
.head-nav {
.pr {
justify-content: center;
&.active{
border-bottom: 2px solid white !important;
}
}
.drop-li {
display: flex;

View File

@ -544,16 +544,16 @@ function CoderDepot(props){
</div>
<div className="depotBtn AlignCenter">
<div className="addOptionBtn">
{
baseOperate &&
<CheckProfile {...props} sureFunc={compare}>+ 合并请求</CheckProfile>
}
{/* {
baseOperate &&
<CheckProfile {...props} sureFunc={compare}>+ 合并请求</CheckProfile>
}*/}
{
issuesFlag &&
<CheckProfile {...props} sureFunc={createIssue} checklogin>+ 疑修</CheckProfile>
}
</div>
</div>
{ fileOperate &&
<Dropdown
overlay={fileMenu()}
@ -688,13 +688,13 @@ function CoderDepot(props){
</div>
}
</div>
{
{/* {
inviteCode &&
<div>
<Divider />
<Invite code={inviteCode}/>
</div>
}
} */}
{
lesson_url &&
<div>
@ -721,7 +721,7 @@ function CoderDepot(props){
{/* 贡献者 */}
{mirror_status ===0 && <Contributors owner={owner} projectsId={projectsId} /> }
{/* 项目画像: 导入/fork项目不展示, open_portrait后台配置是否开启仓库 */}
{__CLIENT__ && projectDetail && !projectDetail.type && !projectDetail.forked_from_project_id && project && project.open_portrait && <ProjectPortrait owner={owner} projectsId={projectsId}/>}
{/* {__CLIENT__ && projectDetail && !projectDetail.type && !projectDetail.forked_from_project_id && project && project.open_portrait && <ProjectPortrait owner={owner} projectsId={projectsId}/>} */}
{/* 语言 */}
{ mirror_status ===0 && <LanguagePower owner={owner} projectsId={projectsId}/> }
</div>

View File

@ -475,6 +475,11 @@ class Detail extends Component {
// 关注和取消关注
focusFunc = (flag) => {
const { current_user , showLoginDialog } = this.props;
if(current_user && !current_user.login){
showLoginDialog();
return
}
const { platform } = this.state;
if (!platform) return;
@ -499,6 +504,11 @@ class Detail extends Component {
// 点赞和取消点赞
pariseFunc = (flag) => {
const { current_user , showLoginDialog } = this.props;
if(current_user && !current_user.login){
showLoginDialog();
return
}
const { platform } = this.state;
if (!platform) return;
const { project_id } = this.state;
@ -704,7 +714,7 @@ class Detail extends Component {
: ""
}
</span>
<span className="detail_tag_btn" loading={forkSpin}>
{/* <span className="detail_tag_btn" loading={forkSpin}>
<Tooltip title="复刻是fork的中文名即复制代码仓库" placement="bottom">
<a className="detail_tag_btn_name" style={{ cursor: platform ? "pointer" : "default" }} onClick={this.forkFunc}>
<i className="iconfont icon-morenfuke_icon1 color-grey-9 mr3 font-16"></i><span>(Fork)</span>
@ -720,7 +730,7 @@ class Detail extends Component {
<span className="detail_tag_btn_count">{forked_count}</span>
: ""
}
</span>
</span> */}
</span>
}
</div>

View File

@ -53,7 +53,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
Array.isArray(menuName)&& menuName.map((item,key)=>{
return(
<React.Fragment key={item.menu_name}>
{
{/* {
item.menu_name === "home" &&
<li className={pathname==="about" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/about`, state }}>
@ -61,7 +61,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
<span>主页</span>
</Link>
</li>
}
} */}
{
item.menu_name === "code" &&
<li className={(pathname==="" || urlFlag) ? "active" : ""}>
@ -71,7 +71,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
</Link>
</li>
}
{
{
item.menu_name === "issues" &&
<li className={pathname==="issues" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/issues`, state }}>
@ -83,7 +83,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
</Link>
</li>
}
{
{/*{
item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
<li className={pathname==="pulls" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/pulls`, state }}>
@ -92,19 +92,20 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
{projectDetail && projectDetail.pull_requests_count ? <span className="num">{numFormat(projectDetail.pull_requests_count)}</span> : ""}
</Link>
</li>:""
}
{/* 引擎仅对当前仓库管理员可见 */}
{/* {
item.menu_name === "devops" ?
<li className={pathname==="devops" ? "active" : ""}>
<Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
<i className="iconfont icon-gongzuoliuicon font-13 mr5 color-grey-3"></i>引擎(Engine)
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
</Link>
</li>
:""
} */}
{/* {
{/* 引擎仅对当前仓库管理员可见 */}
{
// item.menu_name === "devops" ?
// <li className={pathname==="devops" ? "active" : ""}>
// {/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
// <Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
// <i className="iconfont icon-gongzuoliuicon font-13 mr5 color-grey-3"></i>(Engine)
// {/*projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""*/}
// </Link>
// </li>
// :""
}
{
item.menu_name === "dataset" ?
<li className={pathname==="dataset" ? "active" : ""}>
<Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/dataset`, state:{...state,open_devops} }}>
@ -113,7 +114,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
</Link>
</li>
:""
} */}
}
{/* {
item.menu_name === "resources" &&
<li className={pathname==="source" ? "active" : ""}>
@ -124,7 +125,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
</Link>
</li>
} */}
{
{/* {
item.menu_name === "versions" &&
<li className={pathname==="milestones" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/milestones`, state }}>
@ -133,7 +134,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
{projectDetail && projectDetail.versions_count ? <span className="num">{numFormat(projectDetail.versions_count)}</span> :""}
</Link>
</li>
}
} */}
{
item.menu_name === "wiki" &&
<li className={pathname === "wiki" ? "active" : ""}>
@ -143,7 +144,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
</Link>
</li>
}
{
{/* {
item.menu_name === "services" &&
<li className={pathname === "server" ? "active" : ""}>
<Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/service`, state }}>
@ -160,7 +161,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
<span>动态</span>
</Link>
</li>
}
} */}
{
item.menu_name === "settings" && platform &&
<li className={pathname === "settings" ? "active" : ""}>

View File

@ -75,7 +75,7 @@ class Index extends Component {
this.updateDocumentTitle();
// 获取拥有者列表
this.getOwner();
//判断是否为删除新建项目失败后返回,并执行对应逻辑
//判断是否为删除新建仓库失败后返回,并执行对应逻辑
this.isDeleteProjectBack();
// 获取开源许可证
this.getLicenses();
@ -91,7 +91,7 @@ class Index extends Component {
// 更新网页标题
updateDocumentTitle(){
const { projectsType } = this.props.match.params;
document.title = `${projectsType && projectsType === "mirror" ? "导入" : "新建"}项目`;
document.title = `${projectsType && projectsType === "mirror" ? "导入" : "新建"}仓库`;
}
getOwner=()=>{
@ -174,7 +174,7 @@ class Index extends Component {
if (mirror_status === 2 && sessionStorage.newProjectValue) {
Modal.warning({
title: '警告',
content: '项目导入失败!请按操作规范重新导入项目',
content: '仓库导入失败!请按操作规范重新导入仓库',
});
let newProjectValue = JSON.parse(sessionStorage.newProjectValue);
if (newProjectValue) {
@ -223,7 +223,7 @@ class Index extends Component {
licenseFlag , categoreFlag, languageFlag, tokenConTri, isPrivate,isToken} = this.state;
const decoderPass = Base64.encode(values.password);
const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json";
// 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值
// 新建仓库的时候,暂存数据,如果失败,返回的时候可以重新赋值
sessionStorage.newProjectValue=JSON.stringify({...values,project_language_id,project_category_id,license_id,ignore_id});
// 贡献值激励确权机制
const {blockchain_init} = values;
@ -244,7 +244,7 @@ class Index extends Component {
importType:undefined
}).then((result) => {
if (result && result.data.id) {
projectsType && projectsType !== "mirror" && this.props.showNotification(`项目创建成功!`);
projectsType && projectsType !== "mirror" && this.props.showNotification(`仓库创建成功!`);
setTimeout(() => {
this.props.history.push({pathname: `/${result.data.login}/${result.data.identifier}`, query:{showNps: true}});
}, 500);
@ -281,7 +281,7 @@ class Index extends Component {
ChangeAddr=(value,unUpdateName)=>{
// 将路径最后一个/后的字符作为项目标识
// 将路径最后一个/后的字符作为仓库标识
if(value.indexOf("/") > -1 && !unUpdateName){
let arr = value.split("/");
let first = arr[arr.length-1];
@ -317,7 +317,7 @@ class Index extends Component {
showCateFunc =(e)=>{
const { CategoryList } = this.state;
this.setState({categoreFlag:e.target.checked});
// 获取项目类别
// 获取仓库类别
if(e.target.checked && (!CategoryList || (CategoryList && CategoryList.length===0))){
this.getCategory();
}
@ -325,7 +325,7 @@ class Index extends Component {
showLanguageFunc =(e)=>{
const { LanguageList } = this.state;
this.setState({languageFlag:e.target.checked});
// 获取项目语言
// 获取仓库语言
if(e.target.checked && (!LanguageList || (LanguageList && LanguageList.length===0))){
this.getLanguage();
}
@ -422,7 +422,7 @@ class Index extends Component {
}
render() {
const { getFieldDecorator } = this.props.form;
// 项目类型deposit-托管项目mirror-镜像项目
// 仓库类型deposit-托管仓库mirror-镜像仓库
const { projectsType } = this.props.match.params;
const {current_user:{open_blockchain}} = this.props;
@ -473,7 +473,7 @@ class Index extends Component {
required: true, message: '请填写镜像版本库地址'
}],
})(
<Input placeholder="请输入需要导入到本项目的仓库地址" onBlur={(e)=>this.ChangeAddr(e.target.value)} />
<Input placeholder="请输入需要导入到本仓库的仓库地址" onBlur={(e)=>this.ChangeAddr(e.target.value)} />
)}
</Form.Item>
<p className="formTip" style={{color:"#D1d1c9"}}>示例https://github.com/Stability-AI/StableStudio.git</p>
@ -489,7 +489,7 @@ class Index extends Component {
{getFieldDecorator('isPrivate', {
rules: [],
})(
<Checkbox value="importPrivate" onChange={this.changeIsPrivate}>导入私有项目</Checkbox>
<Checkbox value="importPrivate" onChange={this.changeIsPrivate}>导入私有仓库</Checkbox>
)}
</Form.Item>
<Form.Item
@ -586,13 +586,13 @@ class Index extends Component {
</Form.Item>
<span className="ml10 mr10 mt10 font-18">/</span>
<Form.Item
label="项目名称"
label="仓库名称"
className="flex1 explainPos"
colon={false}
>
{getFieldDecorator('name', {
rules: [{
required: true, message: '请填写项目名称'
required: true, message: '请填写仓库名称'
}],
})(
<Input placeholder="例如:团队协作方法与研究" maxLength={50}/>// onBlur={this.changeName}
@ -600,33 +600,33 @@ class Index extends Component {
</Form.Item>
</AlignCenter>
<Form.Item
label={<span>项目标识 <span className="color-grey-9">(项目url标识部分)</span></span>}
label={<span>仓库标识 <span className="color-grey-9">(仓库url标识部分)</span></span>}
colon={false}
>
{getFieldDecorator('repository_name', {
rules: [{
required: true, message: '请填写项目标识'
required: true, message: '请填写仓库标识'
}],
})(
<Input placeholder="项目标识请使用与项目相关的英文关键字" maxLength={100} />
<Input placeholder="仓库标识请使用与仓库相关的英文关键字" maxLength={100} />
)}
</Form.Item>
<div className="pr">
<span className="toprightNum">{descNum}/200</span>
<Form.Item
label="项目简介"
label="仓库简介"
colon={false}
style={{marginBottom:"0px"}}
>
{getFieldDecorator('description', {
rules: [],
})(
<Input.TextArea maxLength={200} placeholder="项目的介绍" autoSize={{ minRows: 2, maxRows: 6 }} onChange={this.changeDesc}/>
<Input.TextArea maxLength={200} placeholder="仓库的介绍" autoSize={{ minRows: 2, maxRows: 6 }} onChange={this.changeDesc}/>
)}
</Form.Item>
</div>
{
{/*
(projectsType === "deposit" || !projectsType) &&
<React.Fragment>
<Form.Item
@ -670,15 +670,15 @@ class Index extends Component {
</Form.Item>
}
</React.Fragment>
}
<Form.Item
*/}
{/* <Form.Item
className="privatePart"
>
{getFieldDecorator('private')(
<Checkbox value="limit">项目设为私有<span className="font-13 color-grey-9">(只有项目所有人或拥有权限的项目成员才能看到)</span></Checkbox>
<Checkbox value="limit">仓库设为私有<span className="font-13 color-grey-9">(只有仓库所有人或拥有权限的仓库成员才能看到)</span></Checkbox>
)}
</Form.Item >
{
</Form.Item > */}
{/*
projectsType && projectsType === "mirror" &&
<Form.Item
className="privatePart"
@ -687,54 +687,72 @@ class Index extends Component {
<Checkbox value="limit">该仓库将是一个<span className="color-blue">镜像</span>(24)</Checkbox>
)}
</Form.Item >
}
<Form.Item
*/}
{/* <Form.Item
style={{ margin: "0px" }}
className="privatePart"
>
{getFieldDecorator('categoreFlag')(
<Checkbox checked={categoreFlag} onChange={(e)=>this.showCateFunc(e)}>项目类别</Checkbox>
<Checkbox checked={categoreFlag} onChange={(e)=>this.showCateFunc(e)}>仓库类别</Checkbox>
)}
</Form.Item>
{categoreFlag &&
<Form.Item className="privatePart">
</Form.Item> */}
{/*categoreFlag &&
<Form.Item
className="privatePart"
>
{getFieldDecorator('project_category', {
rules: [{
required: categoreFlag, message: '请选择项目类别',
required: categoreFlag, message: '请选择仓库类别',
}, {
validator: (rule, value, callback) => this.checkId(rule, value, callback, CategoryList, '项目类别')
validator: (rule, value, callback) => this.checkId(rule, value, callback, CategoryList, '仓库类别')
}],
})(
<DorpChooseMenus idname={"newPanel"} name={"请选择项目类别"} list={CategoryList} getValue={(value)=>this.getValue(value,"project_category")}/>
<AutoComplete
placeholder="请选择仓库类别"
onChange={(value, e) => this.ChangePlatform(value, e, 'project_category', CategoryList)}
className="plateAutoComplete"
onBlur={(value) => this.blurCategory(value, CategoryList, "project_category")}
>
{project_category_list}
</AutoComplete>
)}
</Form.Item>
}
<Form.Item className="privatePart">
*/}
{/* <Form.Item
className="privatePart"
>
{getFieldDecorator('languageFlag')(
<Checkbox checked={languageFlag} onChange={(e)=>this.showLanguageFunc(e)}>项目语言</Checkbox>
<Checkbox checked={languageFlag} onChange={(e)=>this.showLanguageFunc(e)}>仓库语言</Checkbox>
)}
</Form.Item>
{languageFlag &&
</Form.Item> */}
{/*languageFlag &&
<Form.Item>
{getFieldDecorator('project_language', {
rules: [{
required: languageFlag, message: '请选择项目语言'
required: languageFlag, message: '请选择仓库语言'
}, {
validator: (rule, value, callback) => this.checkId(rule, value, callback, LanguageList, '项目语言')
validator: (rule, value, callback) => this.checkId(rule, value, callback, LanguageList, '仓库语言')
}],
})(
<DorpChooseMenus idname={"newPanel"} name={"请选择项目语言"} list={LanguageList} getValue={(value)=>this.getValue(value,"project_language")}/>
<AutoComplete
placeholder="请选择仓库语言"
onChange={(value, e) => this.ChangePlatform(value, e, 'project_language', LanguageList)}
className="plateAutoComplete"
onBlur={(value) => this.blurCategory(value, LanguageList, "project_language")}
>
{project_language_list}
</AutoComplete>
)}
</Form.Item>
}
*/}
{/* 确权 仅在新建项目时 */}
{open_blockchain && projectsType === "deposit" && <div className='mt10 mb10'>
{/* 确权 仅在新建仓库时 */}
{/*open_blockchain && projectsType === "deposit" && <div className='mt10 mb10'>
<p className='font-16'>确权</p>
<div className='mt5 mb5 color-grey3'><Checkbox checked={tokenConTri} onChange={(e)=>{this.setState({tokenConTri:e.target.checked})}}>加入贡献值激励确权机制</Checkbox></div>
{tokenConTri && <Form.Item
className="flex1"
extra="Token指本项目的虚拟货币决定用户在本仓库贡献度的比例可以通过issue悬赏或在个人主页贡献确权页进行转移。创建项目时每个项目的Token总量为10000您可以分配您可获取的Token数量未分配的Token将保留至项目Token余额"
extra="Token指本仓库的虚拟货币决定用户在本仓库贡献度的比例可以通过issue悬赏或在个人主页贡献确权页进行转移。创建仓库时每个仓库的Token总量为10000您可以分配您可获取的Token数量未分配的Token将保留至仓库Token余额"
>
{getFieldDecorator('blockchain_init', {
rules: [{
@ -750,16 +768,16 @@ class Index extends Component {
}
}}],
})(
<Input placeholder='请填写您(项目创建者获取的初始Token值'/>
<Input placeholder='请填写您(仓库创建者获取的初始Token值'/>
)}
</Form.Item>}
</div>}
</div>*/}
<div className="mt20">
<span className="ant-form-item-required"></span>
</div>
<Form.Item className="formTip mt20">
<Button type="primary" onClick={this.subMitFrom} className="mr20">{projectsType && projectsType === "mirror" ? "导入" : "创建"}项目</Button>
<Button type="primary" onClick={this.subMitFrom} className="mr20">{projectsType && projectsType === "mirror" ? "导入" : "创建"}仓库</Button>
<a onClick={()=>window.history.back(-1)} className="btn_32">取消</a>
</Form.Item>
</div>

View File

@ -221,7 +221,7 @@ class UserSubmitComponent extends Component {
return (
<div>
<span className="df" style={{ alignItems: "center" }}>
{/* <span className="df" style={{ alignItems: "center" }}>
<Link to={`/${current_user && current_user.login}`} className="show-user-link" >
<img
src={getImageUrl(`/${current_user && current_user.image_url}`)}
@ -303,7 +303,7 @@ class UserSubmitComponent extends Component {
}
</Form>
</div>
</div>
</div> */}
<div className="mt20">
<Button
type="primary"
@ -325,7 +325,6 @@ class UserSubmitComponent extends Component {
取消
</Button>
</div>
</Spin>
</div>
);
}

View File

@ -35,11 +35,13 @@ class UploadFile extends Component {
// 获取上传后的文件id数组
UploadFunc = (fileList) => {
this.setState({
filename: fileList.fileName,
editorValue: fileList.fileContent,
contentEmpty:fileList.fileContent?false:true
});
if(fileList){
this.setState({
filename: fileList.fileName,
editorValue: fileList.fileContent,
contentEmpty:fileList.fileContent?false:true
});
}
};
checkContent=(flag)=>{

View File

@ -143,17 +143,17 @@ function Index(props){
<li className={active === 1 ?"active":""}><Link to={`/settings/profile`}><i className="iconfont icon-gerenziliao mr5 font-14"></i><span className="text-shodow-bold">基本资料</span></Link></li>
<li className={active === 2 ?"active":""}><Link to={`/settings/phone`}><i className="iconfont icon-xuanzhonganquanshezhi_icon mr5 font-14"></i><span className="text-shodow-bold">账号管理</span></Link></li>
</ul>
{notice_url && <ul className="securityUl ul-border-buttom">
{/* {notice_url && <ul className="securityUl ul-border-buttom">
<li>消息通知</li>
<li className={active === 3 ?"active":""}><Link to={"/settings/notice"}><i className="iconfont icon-wodetongzhi font-14"></i><span className="text-shodow-bold">我的通知</span></Link></li>
<li className={active === 4 ?"active":""}><Link to={'/settings/notice/config'}><i className="iconfont icon-tongzhiguanli font-14"></i><span className="text-shodow-bold">通知管理</span></Link></li>
</ul>}
</ul>} */}
<ul className="securityUl ul-border-buttom">
<li>安全设置</li>
<li className={active === 5 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i><span className="text-shodow-bold">SSH密钥</span></Link></li>
{/* <li className={active === 6 ?"active":""}><Link to={`/settings/CLA`}><i className="iconfont icon-a-zu2044 mr5 font-13"></i><span className="text-shodow-bold">我的CLA</span></Link></li> */}
</ul>
<ul className="securityUl ul-border-buttom">
{/* <ul className="securityUl ul-border-buttom">
<li>Bot开发</li>
<li className={active === 7 ?"active":""}><Link to={`/settings/mybot`}><i className="iconfont icon-kaifabot mr5 font-18"></i><span className="text-shodow-bold">我的Bot</span></Link></li>
<li className={active === 8 ?"active":""}><Link to={`/settings/installbot`}><i className="iconfont icon-BOTpeizhi mr5 font-17"></i><span className="text-shodow-bold">Bot安装</span></Link></li>

View File

@ -65,7 +65,7 @@ class Index extends Component {
</Link>
</p>
</li>
<li
{/* <li
className={
pathname.indexOf("settings/collaborators") > -1 ? "active" : ""
}
@ -76,8 +76,8 @@ class Index extends Component {
成员管理
</Link>
</p>
</li>
<li
</li> */}
{/* <li
className={
pathname.indexOf("settings/webhooks") > -1 ? "active" : ""
}
@ -88,7 +88,7 @@ class Index extends Component {
网络钩子
</Link>
</p>
</li>
</li> */}
<li
className={
pathname.indexOf("settings/branch") > -1 ? "active" : ""
@ -111,7 +111,7 @@ class Index extends Component {
</Link>
</p>
</li> */}
<li
{/* <li
className={pathname.indexOf("settings/softbot") > -1 ? "active" : ""}
>
<p>
@ -120,7 +120,7 @@ class Index extends Component {
已安装Bot
</Link>
</p>
</li>
</li> */}
{/* <li
className={

View File

@ -13,17 +13,17 @@ const { TextArea } = Input;
const { Option } = Select;
const menu = [
{name:"主页",index:"home"},
// {name:"主页",index:"home"},
{name:"代码库",index:"code"},
{name:"疑修 (Issue)",index:"issues"},
{name:"合并请求 (PR)",index:"pulls"},
// {name:"合并请求 (PR)",index:"pulls"},
// {name:"引擎 (Engine)",index:"devops"},
// {name:"数据集",index:"dataset"},
{name:"数据集",index:"dataset"},
// {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
// {name:"里程碑",index:"versions"},
{name:"维基 (Wiki)",index:"wiki"},
{name:"服务",index:"services"},
{name:"动态",index:"activity"},
// {name:"服务",index:"services"},
// {name:"动态",index:"activity"},
]
class Setting extends Component {
constructor(props) {
@ -343,9 +343,9 @@ class Setting extends Component {
disabled={forked_from_project_id}
>
<span className="color-grey-9">将仓库设为私有</span>
<span className="color-grey-6">
{/* <span className="color-grey-6">
{ forked_from_project_id ?`Fork仓库的可见性实时同步自源仓库不支持直接修改`:`修改仓库的可见性将会影响到该仓库下所有Fork仓库的可见性`}
</span>
</span> */}
</Checkbox>
)}
</Form.Item>
@ -374,7 +374,7 @@ class Setting extends Component {
/>
)}
</Form.Item>
<Form.Item label="项目类别">
{/* <Form.Item label="">
{getFieldDecorator("project_category_id", {
rules: [],
})(
@ -395,27 +395,24 @@ class Setting extends Component {
// </Select>
<DorpChooseMenus idname={"baseForm"} name={"请选择项目类别"} list={LanguageList} getValue={(value)=>this.getValue(value,"project_language_id")}/>
)}
</Form.Item>
<span className="mb15">访问权限:</span>
<div className="df" style={{ alignItems: "center" }}>
<span className="mr20 mb15 font-16">合并请求(PR)</span>
<Form.Item label="">
{getFieldDecorator("pr_view_admin", {
rules: [],
})(
<Checkbox
checked={prview_check}
onChange={this.changePrview}
disabled={forked_from_project_id}
>
<span className="color-grey-3">仅管理员可见</span>
{/* <span className="color-grey-6">
合并请求(PR)
</span> */}
</Checkbox>
)}
</Form.Item>
</div>
</Form.Item> */}
{/* <span className="mb15">访:</span>
<div className="df" style={{ alignItems: "center" }}>
<span className="mr20 mb15 font-16">合并请求(PR)</span>
<Form.Item label="">
{getFieldDecorator("pr_view_admin", {
rules: [],
})(
<Checkbox
checked={prview_check}
onChange={this.changePrview}
disabled={forked_from_project_id}
>
<span className="color-grey-3">仅管理员可见</span>
</Checkbox>
)}
</Form.Item>
</div> */}
<Form.Item label="项目导航">
{getFieldDecorator("project_units", {
rules: [],

View File

@ -1,6 +1,6 @@
import React, { useState } from 'react';
import * as ReactDOM from 'react-dom';
import LoginDialog from '../../../../modules/login/LoginDialog';
import LoginDialog from '../../../../modules/loginRegister/dissertion';
// 使
export default function Login(props) {

View File

@ -185,7 +185,7 @@ export default Form.create()((props) => {
/>)}
</Form.Item>
<h3>添加模版</h3>
{/* <h3></h3>
<Radio.Group value={templateBySelect} className="mt10 mb20">
{template.map(item=>{
return <Radio value={item.name} onChange={()=>{
@ -203,7 +203,7 @@ export default Form.create()((props) => {
})
}}>{item.name}</Radio>
})}
</Radio.Group>
</Radio.Group> */}
<Form.Item>
<Button type="primary" htmlType="submit">保存</Button>

View File

@ -386,9 +386,9 @@ class Infos extends Component {
<Menu.Item key="6"><Link to={`/${user && user.login}`} onClick={()=>this.chooseTab("6")}><i className="iconfont icon-personal-center font-20"></i></Link></Menu.Item>
}
<Menu.Item key="0"><Link to={`/${user && user.login}`} onClick={()=>this.chooseTab("0")}><i className="iconfont icon-gailan"></i></Link></Menu.Item>
<Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i></Link></Menu.Item>
{/* <Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i>数据统计</Link></Menu.Item> */}
<Menu.Item key="2"><Link to={`/${user && user.login}/projects`}><i className="iconfont icon-xiangmu"></i></Link></Menu.Item>
{
{/* {
current_user && user && user.login === current_user.login ?
<Menu.Item key="3">
<Link to={`/${user && user.login}/notice`}>
@ -396,22 +396,22 @@ class Infos extends Component {
{undo_events && undo_events >0 ? <span className="menuNum">({undo_events})</span>:""}</Link>
</Menu.Item>
:""
}
} */}
{/* {
current_user && current_user.login && current_user.login === username ?
<Menu.Item key="4"><Link to={`/${user && user.login}/devops/CIService`}><i className="iconfont icon-gongzuoliu1"></i>DevOps</Link></Menu.Item>
:""
} */}
<Menu.Item key="5">
{/* <Menu.Item key="5">
<Link to={`/${user && user.login}/organizes`}>
<i className="iconfont icon-zuzhi"></i>
{ user && user.user_org_count && user.user_org_count > 0 ? <span className="menuNum">({user.user_org_count})</span>:""}
</Link>
</Menu.Item>
</Menu.Item> */}
{/* 当前用户+配置了贡献确权 */}
{current_user && user && user.login === current_user.login && current_user.open_blockchain && <Menu.Item key="7">
{/* {current_user && user && user.login === current_user.login && current_user.open_blockchain && <Menu.Item key="7">
<Link to={`/${user && user.login}/blockchain`}><i className="iconfont icon-gongxianquequan"></i></Link>
</Menu.Item>}
</Menu.Item>} */}
</Menu>
}
{user && (

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

View File

@ -0,0 +1,141 @@
import React , { useEffect , useState } from 'react';
import { Button, Divider, Dropdown, Icon, Input, Menu, Pagination } from 'antd';
import { TPMIndexHOC } from '../../modules/tpm/TPMIndexHOC';
import {platformDataStatistics} from './static';
import bk1 from './image/bk1.png';
import bk2 from './image/bk2.png';
import "./index.scss";
import axios from 'axios';
import { getImageUrl } from '../../common/UrlTool';
function Index(props) {
const { current_user={} } = props;
const {user_id} = current_user;
const name = props && props.mygetHelmetapi && props.mygetHelmetapi.name ;
const LIMIT = 14;
const [ page , setPage ] = useState(1);
const [sort, setSort] = useState("updated_on");
const [ search , setSearch ] = useState(undefined);
const [ projectsList , setProjectsList ] = useState(undefined);
const [ total, setTotal] = useState(undefined);
const [statistics, setStatistics] = useState(undefined);
useEffect(()=>{
axios.get(`/home/index.json`).then(res=>{
console.log('res', res);
if(res && res.data && res.data.statistics_data){
setStatistics(res.data.statistics_data);
}
})
}, [])
useEffect(()=>{
name && (document.title = name)
}, [name])
useEffect(()=>{
getProject();
}, [search, page, sort])
function getProject() {
const url = `/projects.json`;
axios.get(url,{
params:{
user_id: user_id,
page,
pinned:"d",
limit:LIMIT,
search:search,
sort_by: sort
}
}).then(result=>{
if(result && result.data){
setProjectsList(result.data.projects);
setTotal(result.data.total_count);
}
}).catch(()=>{})
}
return(
<div className="dissertion_homePage">
<div className='dissertion_homePage_banner center'>
<p className='font-50 letter-spacing-10'>汇聚海量学术资源</p>
<p className='font-15 opacity86 mb20'>汇聚海量学术资源涵盖前沿研究经典文献与多元数据为探索者提供无尽知识宝藏助力科研突破激发创新灵感开启学术新旅程</p>
<div className='df dataStatistics'>
{statistics && platformDataStatistics.map(item=>{
return <div className='ml30 mr30' key={item.key}>
<p className='font-50 statistics'>{statistics[item.key]}</p>
{item.title}
</div>
})}
</div>
</div>
<div className='projects_bg_box'>
<img src={bk1} alt="" className='dissertion_bk1'/>
<div className='dissertion_projects'>
<div className='df space-between'>
<div>
<p className='font-34 font-bd'>成果汇聚智慧共享</p>
<p className='font-15 color727'>携手汇聚各方智慧结晶共享创新成果激发无限可能开启智慧新未来</p>
</div>
<div className='df align-items-center'>
<Input.Search placeholder='输入关键词' size='large' onSearch={(value)=>{setSearch(value)}} allowClear/>
{current_user && current_user.login && <Dropdown overlay={
<Menu>
<Menu.Item key="updated_on"><a href='/projects/deposit/new'>新建项目</a></Menu.Item>
<Menu.Item key="created_on"><a href to='/projects/mirror/new'>导入项目</a></Menu.Item>
</Menu>
}>
<Button type='primary' size='large' className='ml15 mr10'>新建项目<i className='iconfont icon-arrowRight font-14 ml5'></i></Button>
</Dropdown>}
<Dropdown overlay={
<Menu onClick={({key})=>{setSort(key)}} selectedKeys={[sort]}>
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
<Menu.Item key="created_on">创建时间排序</Menu.Item>
<Menu.Item key="praises_count">点赞数量排序</Menu.Item>
</Menu>
}>
<Button type='link' className='color828'>综合排序<Icon type="swap" rotate="90"/></Button>
</Dropdown>
</div>
</div>
<Divider dashed/>
<div className='dissertion_projects_flex df space-between'>
{projectsList && projectsList.map(item => {
const {author={}} = item;
return <div className='dissertion_project df mb30'>
<div key={item.id} className='df align-items-center'>
<a href={`/${author.login}/${item.identifier}`} className='d-p-photo-a mr20'>
<img className="d-p-photo" alt="" src={getImageUrl(`/${author.image_url}`)} ></img>
</a>
<div className='task-hide'>
<a href={`/${author.login}/${item.identifier}`} title={`${author.name}/${item.name}`} className="color020 font-16" style={{ maxWidth: 470 }}>
{author.name}/{item.name}
</a>
{item.description && <p className="task-hide break_word mb10 color5A6 font-14" title={item.description}>{item.description}</p>}
</div>
</div>
<div className='df space-between d-p-infos font-13'>
{item.last_update_time ? <span className='color828' title={item.full_last_update_time && moment(item.full_last_update_time).format("YYYY-MM-DD HH:mm")}>
<img src={require('./image/time.png')} style={{width: '13px', marginBottom: '2px'}} className='mr3'/>
{item.time_ago}更新
</span> : ""}
{
item.praises_count && item.praises_count > 0 ?
<span className="parise_tag">
<img src={require('./image/dianzan.png')} style={{width: '13px', marginBottom: '2px'}} className='mr3'/>
{item.praises_count}
</span> : ""
}
</div>
</div>
})}
</div>
<Pagination current={page} pageSize={LIMIT} total={total} onChange={(page)=>setPage(page)} showQuickJumper hideOnSinglePage className='dissertion_projects_Pagination'/>
</div>
</div>
<img src={bk2} alt="" className='dissertion_bk2'/>
</div>
)
}
export default TPMIndexHOC(Index);

View File

@ -0,0 +1,110 @@
.dissertion_homePage_banner{
color: #FFFFFF;
height: 413px;
padding-top: 80px;
background-image: url('./image/banner.png');
background-size: 100% 100%;
position: relative;
z-index: 10;
.dataStatistics{
justify-content: center;
}
.statistics{
color: #FFBF6C;
font-family: YouSheBiaoTiHei;
line-height: 70px;
}
}
.dissertion_homePage{
padding-bottom: 100px;
.projects_bg_box{
position: relative;
min-height: 60vh;
}
.dissertion_projects{
width: 1200px;
margin: 0 auto;
position: relative;
z-index: 20;
padding-top: 50px;
}
.dissertion_bk1, .dissertion_bk2{
position: absolute;
width: 100%;
}
.dissertion_bk1{
top: -78px;
}
.dissertion_bk2{
bottom: -250px;
}
}
.dissertion_projects_flex{
flex-wrap: wrap;
.dissertion_project{
width: 48.5%;
height: 126px;
background: #FFFFFF;
border-radius: 8px;
background-image: url('./image/bk.png');
background-size: 100% 100%;
border: 2px solid;
border-color: white white $primary-color white;
flex-direction: column;
justify-content: center;
padding: 0 25px;
}
.d-p-photo-a{
width: 44px;
height: 44px;
border-radius: 50%;
border: 1px solid $primary-color;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.d-p-photo{
width: 36px;
height: 36px;
border-radius: 50%;
}
.d-p-infos{
padding-left: 63px;
margin-top: 12px;
}
.parise_tag{
background: #FFFFFF;
border-radius: 4px;
color: #27254C;
padding: 0px 10px;
}
}
.dissertion_projects_Pagination{
text-align: right;
}
.color727{
color: #72748E
}
.color020{
color: #020814
}
.color5A6{
color: #5A6782
}
.color828{
color: #8284A4
}
.opacity86{
opacity: 0.86;
}
.letter-spacing-10{
letter-spacing: 10px;
}
.space-between{
justify-content: space-between;
}
.align-items-center{
align-items: center;
}

View File

@ -0,0 +1,18 @@
export const platformDataStatistics = [
{
key: "user_count",
title: "平台用户"
},
{
key: "project_count",
title: "仓库个数"
},
{
key: "project_dataset_count",
title: "数据集总数"
},
{
key: "commit_count",
title: "提交总次数"
}
]

View File

@ -0,0 +1,17 @@
.loginRegisterFormItem{
.ant-input-lg{
height: 44px;
padding-left: 60px !important;
}
.ant-input-affix-wrapper .ant-input-prefix{
background: none !important;
}
.ant-form-item-label{
line-height: normal;
margin-bottom: 10px;
}
.ant-form-item-label > label{
color: #30396B;
font-size: 15px;
}
}

View File

@ -0,0 +1,35 @@
import { Divider, Form, Input } from "antd"
import { Fragment } from "react"
import { prefix } from "./register";
import './index.scss';
export default ({ getFieldDecorator }) => {
return <div className="loginRegisterFormItem">
<Form.Item label="账号">
{getFieldDecorator('username', {
rules: [
{
required: true,
message: "请输入手机号/邮箱/用户名"
}
],
validateTrigger: "onBlur",
})(<Input size="large" placeholder="请输入手机号/邮箱/用户名" prefix={prefix("icon-yonghuming")} />)}
</Form.Item>
<Form.Item label="密码">
{getFieldDecorator('password', {
rules: [
{
required: true,
message: "请输入登录密码"
},
{
pattern: /^[^\s]{8,16}$/,
message: '密码必须为8-16位且不能包含空格',
}
],
validateTrigger: "onBlur",
})(<Input.Password size="large" placeholder="请输入登录密码" prefix={prefix("icon-mima")} />)}
</Form.Item>
</div>
}

View File

@ -0,0 +1,64 @@
import { Divider, Form, Input } from "antd"
import { Fragment } from "react"
import './index.scss';
export const prefix = (iconfontName) => <Fragment><i className={`iconfont mr7 colorABA ${iconfontName}`} /><Divider type="vertical" /></Fragment>
export default ({getFieldDecorator, type}) => {
return <div className="loginRegisterFormItem">
<Form.Item label="用户名">
{getFieldDecorator('register_username', {
rules: [
{
required: true,
message: "请输入用户名"
},
{
pattern: /^[a-zA-Z][a-zA-Z0-9]{3,13}$/,
message: '用户名必须为4-14位以字母开头只能包含字母和数字',
}
],
validateTrigger: "onBlur",
})(<Input size="large" placeholder="请输入4-14位用户名以字母开头只能使用字母、数字" prefix={prefix("icon-yonghuming")} />)}
</Form.Item>
{type === "registerByPhone" ? <Form.Item label="手机号">
{getFieldDecorator('phone', {
rules: [
{
required: true,
message: "请输入手机号码"
},
{ pattern: /(^|\s*\+?0?0?86|\D)(1\d{2})[-\s]{0,3}(\d{4})[-\s]{0,3}(\d{4})(?=\D|$)/, message: "请输入正确的手机号码" }
],
validateTrigger: "onBlur",
})(<Input size="large" placeholder="请输入11位数的手机号码" prefix={prefix("icon-shoujihao")} />)}
</Form.Item> : <Form.Item label="邮箱号">
{getFieldDecorator('email', {
rules: [
{
required: true,
message: "请输入邮箱号"
},
{ pattern: /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/, message: "请输入正确的邮箱号" }
],
validateTrigger: "onBlur",
validateFirst: true,
})(<Input size="large" placeholder="请输入邮箱号" prefix={prefix("icon-youxiang2")} />)}
</Form.Item>}
<Form.Item label="密码">
{getFieldDecorator('password', {
rules: [
{
required: true,
message: "请输入登录密码"
},
{
pattern: /^[^\s]{8,16}$/,
message: '密码必须为8-16位且不能包含空格',
}
],
validateTrigger: "onBlur",
})(<Input.Password size="large" placeholder="请输入8-16位密码,区分大小写,不能使用空格" prefix={prefix("icon-mima")} />)}
</Form.Item>
</div>
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

View File

@ -0,0 +1,112 @@
import React, { useState } from "react";
import { Button, Checkbox, Form, Modal } from "antd";
import logo from './image/logo.png';
import logo1 from './image/logo1.png';
import cookie from 'react-cookies';
import './index.scss';
import axios from "axios";
import { Encrypt } from "../../../common/Env";
import Register from "../component/register";
import LoginFormItems from "../component/login";
function Login(prosps){
const {Modifyloginvalue, isRender, form, gopage} = prosps;
const {getFieldDecorator } = form;
const [type, setType] = useState(isRender || "login");
const [message, setMessage] = useState(undefined);
function closeModal(){
Modifyloginvalue();
}
return <Modal width={1000} visible={!!isRender} maskClosable={false} footer={null} onCancel={closeModal} className="dissertion_login_modal" closeIcon={<i className="iconfont icon-cuo colorWhite font-22"></i>}>
<div className="df dissertion_login">
<div className="dissertion_login_left">
<img src={logo} style={{width: '91px'}} className="ml30 mt25"/>
<div className="colorWhite intro_login">
<p className="font-45 mb30">让数据托管使用更简单</p>
<p><span className="fangkuai"></span><span className="opacity80">汇聚学院群智成果覆盖多领域研究需求</span></p>
<p className="mt15 mb15"><span className="fangkuai"></span><span className="opacity80">基于git形式源代码存储便于版本管理</span></p>
<p><span className="fangkuai"></span><span className="opacity80">数据加密存储安全守护学术成果</span></p>
</div>
</div>
<div className="login_register">
<div className="center">
<img src={logo1} style={{width: '91px'}} className="ml25 mb15"/>
<p className="font-26 color-dark font-bd letter-spacing-3">欢迎{type=== "login" ? "使用" : "注册"}<span className="themeColor">学位论文算法库</span></p>
</div>
<Form hideRequiredMark={true} className="dissertion_form">
{type === "login" ? <div className="mt30">
{message && <p className="message mb20">{message}</p>}
<LoginFormItems getFieldDecorator={getFieldDecorator}/>
<div className="df space-between align-items-center">
<Form.Item>
{getFieldDecorator('remember', {
valuePropName: 'checked',
initialValue: cookie.load('autologin'),
})(<Checkbox>下次自动登录</Checkbox>)}
</Form.Item>
<Button type="link" className="mb20" onClick={()=>{form.resetFields();setMessage(undefined);setType("registerByPhone")}}>去注册</Button>
</div>
<Button type="primary" className="onOK mt30" onClick={()=>{
//
setMessage(undefined);
form.validateFields((err, values) => {
if (!err) {
axios.post(`/accounts/login.json`, {
login: values.username,
password: Encrypt(values.password),
autologin: values.remember ? 1 : 0,
}).then((response) => {
if (!response.data.login) {
response.data.status === -2 ? setMessage(response.data.message) : setMessage("错误的账号或密码");
} else {
//
cookie.save('autologin',values.remember);
cookie.save('supplyphone',true);
cookie.save("login",response.data.login);
gopage ? (window.location.href = gopage) : window.location.reload()
}
}).catch((error) => {
console.log('error',error);
})
}
});
}}> </Button>
</div> : <div>
{/* 注册 */}
<div className="mt30 mb20 font-16">
<a className={`register_type ${type==="registerByPhone" ? 'active' : ''}`} onClick={()=>{setMessage(undefined);setType("registerByPhone")}}>手机号注册</a>
<a className={`register_type ${type==="registerByEmail" ? 'active' : ''}`} onClick={()=>{setMessage(undefined);setType("registerByEmail")}}>邮箱注册</a>
</div>
{message && <p className="message mb20">{message}</p>}
<Register getFieldDecorator={getFieldDecorator} type={type}/>
<Button type="primary" className="onOK mt20" onClick={()=>{
form.validateFields((err, values) => {
if (!err) {
axios.post(`/accounts/register.json`, {
login: type === "registerByPhone" ? values.phone : values.email,
namespace: values.register_username.trim(),
password: Encrypt(values.password),
password_confirmation: Encrypt(values.password),
code: '123123'
}).then((response)=>{
if(response.data && response.data.status === 0){
//forge
window.location.reload()
// window.location.href = "/"+values.register_username.trim();
} else {
setMessage(response.data.message);
}
})
}
});
}}> </Button>
</div>}
</Form>
</div>
</div>
</Modal>
}
export default Form.create()(Login);

View File

@ -0,0 +1,91 @@
.dissertion_login_modal{
.ant-modal-close{
right: -55px;
top: -18px !important;
}
.ant-modal-body{
padding: 0;
}
}
.dissertion_login{
min-height: 700px;
}
.dissertion_login_left{
width: 450px;
background-size: 100% 100%;
background-image: linear-gradient( 180deg, #1773D9 0%, #3640CF 100%), url('./image/left.png');
background-repeat: no-repeat;
background-position: right bottom;
background-blend-mode: overlay;
.intro_login{
width: 70%;
margin: 130px 0 0 55px;
}
}
.login_register{
flex: 1;
background-size: 100% 100%;
background-image: url('./image/right.png');
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 50px;
.dissertion_form{
.message{
color: #f5222d;
}
}
.onOK{
width: 100%;
height: 48px;
font-size: 16px;
}
.register_type{
width: 50%;
display: inline-block;
text-align: center;
padding-bottom: 15px;
border-bottom: 1px solid #d3d8e8;
color: #3D4859;
&.active{
color: $primary-color;
border-bottom: 2px solid $primary-color;
}
}
}
.opacity80{
opacity: 0.8
}
.colorWhite{
color: white;
}
.colorABA{
color: #ABADC6
}
.font-45{
font-size: 45px;
}
.themeColor{
color: $primary-color;
}
.letter-spacing-3{
letter-spacing: 3px;
}
.mr7{
margin-right: 7px;
}
.fangkuai{
width: 10px;
height: 10px;
display: inline-block;
background: #FFFFFF;
border-radius: 2px;
opacity: 0.95;
margin-right: 5px;
}
.space-between{
justify-content: space-between;
}
.align-items-center{
align-items: center;
}

View File

@ -34,11 +34,11 @@ body>.-task-title {
}
.newHeaders.publicNav{
position: absolute;
background: rgba(27, 36, 64,0.2);
background: rgba(27, 36, 64,0);
}
.headerContent{
width: 1200px;
margin:0px auto;
/* padding:0px 30px; */
display: flex;
align-items: center;
height: 100%;

View File

@ -4,7 +4,7 @@ import NewFooter from '../../forge/Head/Footer';
import axios from 'axios';
import { Spin } from 'antd';
import './TPMIndex.css';
import LoginDialog from '../login/LoginDialog';
import LoginDialog from '../loginRegister/dissertion';
import EducoderAccount from '../../forge/Component/EducoderAccount';
import ProfileModal from '../../forge/Component/ProfileModal/Index';
import SupplyPhoneModal from '../../forge/Component/ProfileModal/SupplyPhone';
@ -215,7 +215,7 @@ export function TPMIndexHOC(WrappedComponent) {
showLoginDialog = (gopage) => {
this.setState({
isRender: true,
isRender: "login",
isloginCancel: "iscancel",
gopage: gopage,
})
@ -299,7 +299,7 @@ export function TPMIndexHOC(WrappedComponent) {
let notFullPage = !path.includes('softwareFactory')
return (
<div className="indexHOC">
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state}/>}
{/* {(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state}/>} */}
<SystemNotice
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
history={this.props.history}
@ -313,7 +313,7 @@ export function TPMIndexHOC(WrappedComponent) {
history={this.props.history}
/>
<SupplyPhoneModal visible={supplyPhone}/>
{isRender === true ? <LoginDialog
{!!isRender ? <LoginDialog
Modifyloginvalue={() => this.hideLoginDialog()}
{...this.props}
{...this.state}