Merge pull request '开源首页改版、修改创客空间首页自适应手机端' (#467) from tongChong/forgeplus-react:pre_dev_military into pre_dev_military
|
@ -4126,7 +4126,7 @@
|
|||
},
|
||||
"cross-port-killer": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/cross-port-killer/-/cross-port-killer-1.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/cross-port-killer/-/cross-port-killer-1.4.0.tgz",
|
||||
"integrity": "sha512-ujqfftKsSeorFMVI6JP25xMBixHEaDWVK+NarRZAGnJjR5AhebRQU+g+k/Lj8OHwM6f+wrrs8u5kkCdI7RLtxQ=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
|
|
|
@ -16,13 +16,13 @@ import marked from './common/marked';
|
|||
import moment from 'moment'
|
||||
|
||||
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
|
||||
import SiderBar from './forge/Component/SiderBar'
|
||||
// import SiderBar from './forge/Component/SiderBar'
|
||||
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
import { initAxiosInterceptors } from './AppConfig'
|
||||
import { Provider } from 'react-redux';
|
||||
import configureStore from './redux/stores/configureStore';
|
||||
import { indexOf } from 'lodash';
|
||||
import './phone.scss';
|
||||
const store = configureStore();
|
||||
window.marked = marked;
|
||||
const theme = createMuiTheme({
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
import React from 'react'
|
||||
import MiniPagination from './components/mini-pagination'
|
||||
|
||||
export default () => {
|
||||
function onPageChange(page) {
|
||||
console.log(page, '-----------')
|
||||
}
|
||||
return <MiniPagination onChange={onPageChange} current={1} total={100} pageSize={16} />
|
||||
}
|
|
@ -305,4 +305,31 @@ export function returnbar(str){
|
|||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
// 手动添加/修改mate标签
|
||||
export function addMeta(name, content){
|
||||
if(document.querySelector(`meta[name='${name}']`)){
|
||||
document.querySelector(`meta[name='${name}']`).content=content;
|
||||
}else{
|
||||
const meta = document.createElement('meta');
|
||||
meta.content = content;
|
||||
meta.name = name;
|
||||
document.getElementsByTagName('head')[0].appendChild(meta);
|
||||
}
|
||||
};
|
||||
|
||||
export function IsPC(){
|
||||
var userAgentInfo = navigator.userAgent;
|
||||
var Agents = ["Android", "iPhone",
|
||||
"SymbianOS", "Windows Phone",
|
||||
"iPad", "iPod"];
|
||||
var flag = true;
|
||||
for (var v = 0; v < Agents.length; v++) {
|
||||
if (userAgentInfo.indexOf(Agents[v]) > 0) {
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
|
@ -7,7 +7,7 @@ export {
|
|||
getImageUrl as getImageUrl,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
|
||||
, getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
|
||||
, getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl,getTestImage as getTestImage,getLogoImageUrl as getLogoImageUrl,
|
||||
turnbar,returnbar,getUrlToken as getUrlToken
|
||||
turnbar,returnbar,getUrlToken,addMeta,IsPC
|
||||
} from './UrlTool';
|
||||
|
||||
export { setmiyah as setmiyah } from './Component';
|
||||
|
|
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 993 B |
|
@ -41,7 +41,7 @@ class Index extends Component {
|
|||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
{window.location.href.indexOf('osredm.jk') < 0&&<Handbook/>}
|
||||
{/* {window.location.href.indexOf('osredm.jk') < 0&&<Handbook/>} */}
|
||||
<Switch {...this.props}>
|
||||
<Route
|
||||
path="/projects/:projectsType/new/:OIdentifier"
|
||||
|
|
|
@ -15,7 +15,18 @@ import CheckProfile from '../Component/ProfileModal/Profile';
|
|||
import Slider from 'react-slick';
|
||||
import left from './img/left.png';
|
||||
import right from './img/right.png';
|
||||
import { getImageUrl } from '../../managements/common/utils';
|
||||
import explore1 from '../Images/explore1.png';
|
||||
import explore2 from '../Images/explore2.png';
|
||||
import explore3 from '../Images/explore3.png';
|
||||
import explore4 from '../Images/explore4.png';
|
||||
import explore5 from '../Images/explore5.png';
|
||||
import explore6 from '../Images/explore6.png';
|
||||
import explore7 from '../Images/explore7.png';
|
||||
import explore8 from '../Images/explore8.png';
|
||||
import explore9 from '../Images/explore9.png';
|
||||
import explore10 from '../Images/explore10.png';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Search = Input.Search;
|
||||
|
||||
|
@ -38,7 +49,12 @@ class Index extends Component {
|
|||
languageList:undefined,
|
||||
languageId:undefined,
|
||||
CategoryList:undefined,
|
||||
bannerList: undefined
|
||||
bannerList: undefined,
|
||||
// 今日、本周热门项目
|
||||
hotProjectTime: 1,
|
||||
hotProjectList: undefined,
|
||||
// 热门开发者
|
||||
authorList: undefined
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,6 +68,35 @@ class Index extends Component {
|
|||
this.getLanguage();
|
||||
this.getBannerList();
|
||||
// this.getRecommandOri();
|
||||
this.getList(1);
|
||||
this.getAuthorList();
|
||||
}
|
||||
|
||||
// 获取热门开发者
|
||||
getAuthorList = ()=>{
|
||||
axios.get(`/user_rank.json`,{
|
||||
params:{
|
||||
time: 30
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
this.setState({authorList: result.data.users.slice(0,10)})
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
// 获取热门项目
|
||||
getList = (time) => {
|
||||
const url = `/project_rank.json`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
time
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
this.setState({hotProjectList: result.data.projects})
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
// 获取banner图列表
|
||||
|
@ -152,7 +197,7 @@ class Index extends Component {
|
|||
<li key={key} className={ parseInt(active_type) === item.id ? 'active' : ''} onClick={() => this.changeType(`${item.id}`, list)}>
|
||||
<p>
|
||||
<span className="font-16">{item.name}</span>
|
||||
<span className="color-blue">{item.projects_count}</span>
|
||||
{/* <span className="color-blue">{item.projects_count}</span> */}
|
||||
</p>
|
||||
</li>
|
||||
)
|
||||
|
@ -195,7 +240,7 @@ class Index extends Component {
|
|||
<li key={key} className={parseInt(active_id) === item.id ? 'active' : ''} onClick={() => this.changeCategory(`${item.id}`, list)}>
|
||||
<p>
|
||||
<span className="font-16">{item.name}</span>
|
||||
<span className="color-blue">{item.projects_count}</span>
|
||||
{/* <span className="color-blue">{item.projects_count}</span> */}
|
||||
</p>
|
||||
</li>
|
||||
)
|
||||
|
@ -271,7 +316,7 @@ class Index extends Component {
|
|||
|
||||
newItem = ()=>{
|
||||
return(
|
||||
<ul>
|
||||
<ul className='newProject'>
|
||||
<li onClick={()=>{this.props.history.push('/projects/deposit/new')}}>新建项目
|
||||
{/* <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}}>新建项目</CheckProfile> */}
|
||||
</li>
|
||||
|
@ -295,7 +340,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const { current_user, mygetHelmetapi} = this.props;
|
||||
|
||||
const { projectsList ,isSpin, total, search, limit, page, typeList, categoryList ,bannerList } = this.state;
|
||||
const { projectsList ,isSpin, total, search, limit, page, typeList, categoryList ,bannerList, hotProjectTime, hotProjectList, authorList } = this.state;
|
||||
|
||||
let settings={
|
||||
dots:true,
|
||||
|
@ -308,12 +353,13 @@ class Index extends Component {
|
|||
pauseOnFocus:true,
|
||||
autoplay:true,
|
||||
arrows:true,
|
||||
prevArrow:<button type='button' class='changeImgBut'><img src={left} width="70px" alt=""/></button>,
|
||||
nextArrow:<button type='button' class='changeImgBut'><img src={right} width="70px" alt=""/></button>
|
||||
prevArrow:<button type='button' className='changeImgBut'><img src={left} width="70px" alt=""/></button>,
|
||||
nextArrow:<button type='button' className='changeImgBut'><img src={right} width="70px" alt=""/></button>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div style={{backgroundColor: '#f5f7fa'}}>
|
||||
{/* banner图 */}
|
||||
{bannerList ? bannerList.length === 1 ? bannerList[0].url ? <a href={bannerList[0].url} target={'_blank'}><img alt={bannerList[0].title} src={bannerList[0].image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${bannerList[0].image}` : banner} width='100%' height='100%' className='imgBox'/></a> :
|
||||
<img alt={bannerList[0].title} src={bannerList[0].image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${bannerList[0].image}` : banner} width='100%' height='100%' className='imgBox'/> :
|
||||
<Slider {...settings} className="projectBannerBox">
|
||||
|
@ -327,57 +373,38 @@ class Index extends Component {
|
|||
})}
|
||||
</Slider>: <img src={banner} width="100%" alt=""/>}
|
||||
{bannerList && bannerList.length === 0 && <img src={banner} width="100%" alt=""/>}
|
||||
<div className="ProjectListIndex">
|
||||
{/* 项目列表 */}
|
||||
<div className="ProjectListIndex exploreBox">
|
||||
<Affix className="affix-list-left" offsetTop={90}>
|
||||
<div className="affix-list-content">
|
||||
<ul className="list-l-Menu">
|
||||
<li
|
||||
className="MenuTitle"
|
||||
onClick={() => {
|
||||
this.getType();
|
||||
this.changeType(undefined, this.state.typeList);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<i className="iconfont icon-bianchengyuyan color-grey-9 font-15 mr5"></i>
|
||||
语言
|
||||
</span>
|
||||
<li className="MenuTitle">
|
||||
<img src={explore1} alt="" width={18} className='mr5'/>语言
|
||||
</li>
|
||||
<div className="list-affix">{typeList}</div>
|
||||
</ul>
|
||||
<ul className="list-l-Menu">
|
||||
<li
|
||||
className="MenuTitle"
|
||||
onClick={() => {
|
||||
this.getCategory();
|
||||
this.changeCategory(undefined, this.state.categoryList);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<i className="iconfont icon-xiangmuleibie color-grey-9 font-15 mr5"></i>
|
||||
项目类别
|
||||
</span>
|
||||
<li className="MenuTitle">
|
||||
<img src={explore2} alt="" width={18} className='mr5'/>项目类别
|
||||
</li>
|
||||
<div className="list-affix">{categoryList}</div>
|
||||
</ul>
|
||||
</div>
|
||||
</Affix>
|
||||
|
||||
<div
|
||||
className="list-right boxShandow radius-2"
|
||||
style={{ padding: 0 }}
|
||||
>
|
||||
<div className="list-right boxShandow radius-2" style={{ padding: 0 }}>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="list-r-operation">
|
||||
<div>
|
||||
<Search
|
||||
placeholder="输入项目名称关键字进行搜索"
|
||||
enterButton="搜索"
|
||||
enterButton={<img src={explore9} alt="" width={20}/>}
|
||||
size="large"
|
||||
onSearch={this.searchFun}
|
||||
className="list-r-Search"
|
||||
className="list-r-Search searchBox"
|
||||
value={search}
|
||||
onChange={this.changeSearchValue}
|
||||
allowClear
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -389,10 +416,8 @@ class Index extends Component {
|
|||
placement="bottom"
|
||||
className="mr50"
|
||||
>
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">
|
||||
<img src={img_new} alt="" width="13px" /> 新建
|
||||
</span>
|
||||
<a className="ant-dropdown-link font-15 actionBtnBox">
|
||||
<i className='iconfont icon-jiashang1 mr5'></i>新建
|
||||
</a>
|
||||
</Popover>
|
||||
)}
|
||||
|
@ -402,10 +427,8 @@ class Index extends Component {
|
|||
trigger={["click"]}
|
||||
placement="bottom"
|
||||
>
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">
|
||||
排序 <img src={img_array} alt="" width="10px" />
|
||||
</span>
|
||||
<a className="ant-dropdown-link font-15 actionBtnBox top">
|
||||
排序 <i className='iconfont icon-sanjiaoxing-down ml5'></i>
|
||||
</a>
|
||||
</Popover>
|
||||
</div>
|
||||
|
@ -419,6 +442,61 @@ class Index extends Component {
|
|||
{this.pagination(total, limit, page)}
|
||||
</Spin>
|
||||
</div>
|
||||
<div style={{width: '320px'}} className='ml20'>
|
||||
{/* 帮助手册 */}
|
||||
{window.location.href.indexOf('osredm.jk') < 0 &&<div className='helpText font-28'>
|
||||
<a href="https://help.osredm.com/#/git" target='_blank'>
|
||||
<img src={explore10} alt="" className="helpImg1"/>
|
||||
</a>
|
||||
</div>}
|
||||
{/* 热门项目(今日/本周) */}
|
||||
<div className='hotProjects mt20'>
|
||||
<div className='hotProjectsTitle font-17'>
|
||||
<div className={`oneItemTil ${hotProjectTime === 1 ? 'activeHot' : ''}`} onClick={()=>{this.setState({hotProjectTime: 1}); this.getList(1)}}>
|
||||
<img src={explore3} alt="" className="helpImg2 mr10" width={18}/>
|
||||
<span>今日热门</span>
|
||||
</div>
|
||||
<div className={`oneItemTil ${hotProjectTime === 7 ? 'activeHot' : ''}`} onClick={()=>{this.setState({hotProjectTime: 7}); this.getList(7)}}>
|
||||
<img src={explore4} alt="" className="helpImg2 mr10" width={18}/>
|
||||
<span>本周热门</span>
|
||||
</div>
|
||||
</div>
|
||||
{hotProjectList && hotProjectList.length > 0 && hotProjectList.map((i, index)=>{
|
||||
return <div className='hotProjectItem' key={index}>
|
||||
<div className="mInfos">
|
||||
<Link target="_blank" to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide font-16">{i.owner && i.owner.name}/{i.name}</Link>
|
||||
<span className='font-14'>
|
||||
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
||||
</span>
|
||||
</div>
|
||||
<div className="sInfos task-hide-2 font-14 mt10">
|
||||
{i.description ? i.description : "暂无项目简介"}
|
||||
</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
{/* 热门开发者 */}
|
||||
<div className='hotProjects mt20'>
|
||||
<div className='hotProjectsTitle font-17 pl30'>
|
||||
<img src={explore5} alt="" className="helpImg2 mr10" width={18}/>开源贡献者TOP10
|
||||
</div>
|
||||
<div className='hotAuthor til font-15'>
|
||||
<div className='hotAuthor1'>排名</div>
|
||||
<div className='hotAuthor2'>贡献者</div>
|
||||
<div className='hotAuthor3'>总积分</div>
|
||||
</div>
|
||||
{authorList && authorList.length > 0 && authorList.map((i, index) =>{
|
||||
return <div className={`hotAuthor font-15 ${index%2 === 0 ? 'otherColor' : ''}`} key={index}>
|
||||
<div className='hotAuthor1'>{index<3 ? <img src={index === 0 ? explore6 : index === 1 ? explore7 : explore8} alt='' width={23}/> : index+1}</div>
|
||||
<Link target="_blank" to={`/${i.login}`} className='hotAuthor2 task-hide'>
|
||||
<img src={getImageUrl(`/${i.avatar_url}`)} alt="" width={24} className='mr5'/>
|
||||
<span style={{lineHeight: '3'}}>{i.name}</span>
|
||||
</Link>
|
||||
<div className='hotAuthor3 ml20'>{i.score}</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -578,4 +578,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.newProject li{
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
|
@ -73,11 +73,11 @@ class IndexItem extends Component {
|
|||
{
|
||||
item.platform === "educoder" ?
|
||||
<a href="javascript:void(0)" style={{ cursor: "default" }} className="show-user-link">
|
||||
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
||||
<img className="p-r-photo explore" alt="" src={item.author && item.author.image_url} ></img>
|
||||
</a>
|
||||
:
|
||||
<Link to={`/${item.author && item.author.login}`} className="show-user-link">
|
||||
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
||||
<img className="p-r-photo explore" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
||||
</Link>
|
||||
}
|
||||
<div className="p-r-Infos">
|
||||
|
@ -101,7 +101,7 @@ class IndexItem extends Component {
|
|||
</Tooltip>:""
|
||||
}
|
||||
</AlignCenter> */}
|
||||
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 color-grey-3 font-18 task-hide fwt-500 " style={{ whiteSpace: "wrap", width: 400 }}>
|
||||
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 font-16 task-hide" style={{ whiteSpace: "wrap", display: 'flex', flex: 1, color:'#232a39'}}>
|
||||
{item.author.name}/{item.name}
|
||||
{
|
||||
item.forked_from_project_id ?
|
||||
|
@ -123,19 +123,18 @@ class IndexItem extends Component {
|
|||
</a>
|
||||
<span className="p-r-tags">
|
||||
<span className="pariseTag">
|
||||
<img src={img_parise} alt="" className="pariseImg" />赞 {item.praises_count}
|
||||
<i className='iconfont icon-morendianzan_icon font-14 mr3'></i>赞 {item.praises_count}
|
||||
</span>
|
||||
<span>
|
||||
<i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}
|
||||
<i className="iconfont icon-fork mr3 font-16"/>fork {item.forked_count}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px", lineHeight: "22px" }}>{item.description}</p>
|
||||
|
||||
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px", lineHeight: "22px", color: '#525561'}}>{item.description}</p>
|
||||
<div className="p-r-about">
|
||||
<span className="p-r-detail">
|
||||
{item.last_update_time ? <span><label>更新于</label>{item.time_ago}</span> : ""}
|
||||
{item.language && item.language.id ? <span className="color-grey-3">{item.language.name}</span> : ""}
|
||||
<span className="p-r-detail font-13">
|
||||
{item.last_update_time ? <span><i className='iconfont icon-shijianicon font-13 mr3'/>更新于{item.time_ago}</span> : ""}
|
||||
{item.language && item.language.id ? <span>{item.language.name}</span> : ""}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,6 +11,110 @@
|
|||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-wrap:wrap;
|
||||
&.exploreBox{
|
||||
flex-wrap: nowrap;
|
||||
.actionBtnBox{
|
||||
color: #2a3ee9;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
&.top{
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
}
|
||||
.searchBox .ant-input{
|
||||
padding-left: 16px;
|
||||
height: 36px;
|
||||
border: 1px solid #ffffff;
|
||||
background-color: #f8fbff !important;
|
||||
}
|
||||
.searchBox .ant-input-search-button{
|
||||
height: 36px !important;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.helpText{
|
||||
height:100px;
|
||||
background-image:linear-gradient(131.52deg,#2a3ee9 0%,#428cff 46.02%,#6479ff 100%);
|
||||
border:2px solid #ffffff;
|
||||
.helpImg1{
|
||||
width: 96%;
|
||||
margin: 1.5% 2.1%;
|
||||
}
|
||||
}
|
||||
.helpImg2{
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
.hotProjects{
|
||||
background-image:linear-gradient(180deg,#f4f5f8 0%,#fbfcfd 100%);
|
||||
border:2px solid #ffffff;
|
||||
}
|
||||
.hotProjectsTitle{
|
||||
color: #000000;
|
||||
height:50px;
|
||||
line-height: 50px;
|
||||
background-color:rgba(243, 250, 255, 0.74);
|
||||
box-shadow:0px 2px 3px rgba(212, 217, 255, 0.57);
|
||||
}
|
||||
.oneItemTil{
|
||||
display: inline-block;
|
||||
width: 158px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.activeHot{
|
||||
color:#2a3ee9;
|
||||
border-bottom: 1px solid #2a3ee9;
|
||||
}
|
||||
.hotProjectItem{
|
||||
padding-bottom: 16px;
|
||||
margin: 20px 20px 16px;
|
||||
border-bottom: 1px dashed #cccfd6;
|
||||
.mInfos{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
color: #656977;
|
||||
.name{
|
||||
flex:1;
|
||||
color:#232a39;
|
||||
}
|
||||
}
|
||||
.sInfos{
|
||||
background: #F7F8F9;
|
||||
font-weight: 400;
|
||||
color:#525561;
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.hotProjectItem:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.hotAuthor{
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.til{
|
||||
color:#989fab;
|
||||
}
|
||||
&.otherColor{
|
||||
background-color:rgba(238, 243, 251, 0.76);
|
||||
}
|
||||
&:not(.til):hover{
|
||||
background-color:rgba(225, 225, 225, 0.28);
|
||||
}
|
||||
}
|
||||
.hotAuthor1{
|
||||
width: 90px;
|
||||
text-align: center;
|
||||
}
|
||||
.hotAuthor2{
|
||||
flex: 1;
|
||||
}
|
||||
.hotAuthor3{
|
||||
width: 75px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-left{
|
||||
width: 26%;
|
||||
|
@ -19,13 +123,10 @@
|
|||
margin-bottom: 20px;
|
||||
}
|
||||
.affix-list-left{
|
||||
width: 26%;
|
||||
width:200px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.affix-list-content{
|
||||
padding-right:20px;
|
||||
}
|
||||
.list-left > div{
|
||||
border:1px solid #eee;
|
||||
}
|
||||
|
@ -61,8 +162,7 @@
|
|||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
padding:25px 30px;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
padding: 15px 23px 0;
|
||||
}
|
||||
.list-r-Search{
|
||||
width: 400px;
|
||||
|
@ -100,12 +200,13 @@
|
|||
}
|
||||
.p-r-Item{
|
||||
display: flex;
|
||||
border-bottom:1px solid rgba(238,238,238,1);
|
||||
padding:22px 0px;
|
||||
justify-content: flex-start;
|
||||
padding-top: 22px;
|
||||
}
|
||||
.boxShandow{
|
||||
box-shadow:0px 2px 20px 10px rgba(0,0,0,0.03);
|
||||
flex: 1;
|
||||
background-image:linear-gradient(180deg,#f3f5f8 0%,#ffffff 100%);
|
||||
box-shadow:8px 6px 18px rgba(171, 202, 255, 0.24) inset;
|
||||
}
|
||||
.p-r-photo{
|
||||
width: 60px;
|
||||
|
@ -113,10 +214,17 @@
|
|||
border-radius: 50%;
|
||||
margin-right: 22px;
|
||||
margin-top: 8px;
|
||||
&.explore{
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.p-r-Infos{
|
||||
flex: 1;
|
||||
width: 0;
|
||||
padding-bottom: 19px;
|
||||
border-bottom: 1px dashed #cccfd6;
|
||||
}
|
||||
.p-r-name{
|
||||
display: flex;
|
||||
|
@ -166,16 +274,16 @@
|
|||
margin-left: 15px;
|
||||
padding:0px 10px;
|
||||
border-radius:15px;
|
||||
background: #EBF4FE;
|
||||
color: #333;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
background: #e3ebff;
|
||||
color:#656977;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
}
|
||||
.p-r-tags > span.pariseTag{
|
||||
background: #FFF3DC;
|
||||
background: rgba(223, 115, 20, 0.08);
|
||||
}
|
||||
.p-r-tags.large > span >label{
|
||||
padding:0px 12px;
|
||||
|
@ -207,10 +315,7 @@
|
|||
}
|
||||
.p-r-detail > span{
|
||||
margin-right: 22px;
|
||||
color: #888;
|
||||
}
|
||||
.p-r-detail > span > label{
|
||||
color: #999;
|
||||
color:#9b9eaa;
|
||||
}
|
||||
|
||||
.p-r-about{
|
||||
|
@ -218,7 +323,7 @@
|
|||
justify-content: space-between;
|
||||
flex-wrap: nowrap;
|
||||
margin-top: 8px;
|
||||
color: #666;
|
||||
color:#9b9eaa;
|
||||
}
|
||||
.spincontent{
|
||||
height:400px;
|
||||
|
|
|
@ -550,4 +550,10 @@
|
|||
border-left-style: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.newProject li{
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
|
@ -102,11 +102,11 @@ function List(props){
|
|||
</Menu>
|
||||
)
|
||||
const menu_new=(
|
||||
<ul>
|
||||
<li onClick={()=>{this.props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建项目
|
||||
<ul className='newProject'>
|
||||
<li onClick={()=>{props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建项目
|
||||
{/* <CheckProfile {...props} sureFunc={()=>{props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建项目</CheckProfile> */}
|
||||
</li>
|
||||
<li onClick={()=>{this.props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>导入项目
|
||||
<li onClick={()=>{props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>导入项目
|
||||
{/* <CheckProfile {...props} sureFunc={()=>{props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>导入项目</CheckProfile> */}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -63,6 +63,7 @@ ul,ol,dl{
|
|||
display: inline-block;
|
||||
}
|
||||
.ProjectListIndex{
|
||||
background-color:#f5f7fa;
|
||||
.ant-affix{
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -228,26 +229,34 @@ form{
|
|||
}
|
||||
}
|
||||
.list-l-Menu{
|
||||
margin-bottom: 12px!important;
|
||||
border-radius:2px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||
margin-bottom: 35px!important;
|
||||
background-image:linear-gradient(180deg,#f4f5f8 0%,#fbfcfd 100%);
|
||||
border:2px solid #ffffff;
|
||||
.list-affix{
|
||||
min-height: 20px;
|
||||
max-height: 308px;
|
||||
max-height: 285px;
|
||||
overflow-y: auto;
|
||||
&::-webkit-scrollbar-thumb{
|
||||
background-color:#e6edf9;
|
||||
box-shadow: none
|
||||
}
|
||||
&::-webkit-scrollbar-track{
|
||||
display: none;
|
||||
}
|
||||
&::-webkit-scrollbar{
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
li{
|
||||
font-size: 1rem;
|
||||
padding:0px 0px 0px 20px;
|
||||
box-sizing: border-box;
|
||||
color: #333;
|
||||
color:#4c5b76;
|
||||
position: relative;
|
||||
p{
|
||||
height: 62px;
|
||||
line-height: 62px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
@ -256,39 +265,38 @@ form{
|
|||
a{
|
||||
width:100%;
|
||||
}
|
||||
& span:last-child{
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
&:last-child > p{
|
||||
border-bottom: none;
|
||||
}
|
||||
&:not(.MenuTitle):hover{
|
||||
background-color: #fafafa;
|
||||
&:not(.MenuTitle):not(.active):hover{
|
||||
background-color: rgba(225, 225, 225, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
li.active{
|
||||
background-color: #fafafa;
|
||||
background-color: rgba(70, 106, 255, 0.09);
|
||||
color:#2a3ee9;
|
||||
}
|
||||
li.active::before{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 15px;
|
||||
top: 10px;
|
||||
width: 6px;
|
||||
content: '';
|
||||
height: 33px;
|
||||
height: 29px;
|
||||
background: #4154f1;
|
||||
}
|
||||
.MenuTitle{
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
background-size: 100% 100%;
|
||||
color: #333!important;
|
||||
height: 62px;
|
||||
line-height: 62px;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
color:#000000;
|
||||
height: 71px;
|
||||
line-height: 48px;
|
||||
font-weight: 400;
|
||||
padding-left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span{
|
||||
display: block;
|
||||
width: 50%;
|
||||
|
@ -297,7 +305,6 @@ form{
|
|||
}
|
||||
span:hover{
|
||||
color: #4154f1;
|
||||
|
||||
.iconfont{
|
||||
color: #4154f1 !important;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ class InfosUser extends Component {
|
|||
);
|
||||
|
||||
newItem =()=> (
|
||||
<ul>
|
||||
<ul className='newProject'>
|
||||
<li onClick={()=>{this.props.history.push('/projects/deposit/new')}}>新建项目
|
||||
{/* <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}}>新建项目</CheckProfile> */}
|
||||
</li>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
// 2行省略号
|
||||
.ellipsis-2 {
|
||||
|
|
|
@ -78,8 +78,9 @@ const display = (node, newTd) => {
|
|||
|
||||
const tableToExcel = (table, fileName, worksheet) => {
|
||||
const uri = 'data:application/vnd.ms-excel;base64,';
|
||||
const styles='<style>table{corlor:#666;border-color:#666;padding:3px 10px;} .w-e-menu .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; text-align: left;}.w-e-menu .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-menu .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-menu .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px; margin-top: 10px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block;}.w-e-menu .w-e-panel-container .w-e-up-img-container,.w-e-menu .w-e-panel-container .w-e-up-video-container { text-align: center;}.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn,.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn { display: inline-block; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover,.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover { color: #333;}</style>';
|
||||
// 定义文档的类型
|
||||
const template = '<html><head><meta charset="UTF-8"></head><body><table border="1">{table}</table></body></html>';
|
||||
const template = `<html><head><meta charset="UTF-8">${styles}</head><body><table border="1" borderColor="grey" style="font-size:16px;corlor:#666;border:1px solid #666;padding:3px 10px;">{table}</table></body></html>`;
|
||||
const base64 = function (s) {
|
||||
return window.btoa(unescape(encodeURIComponent(s)))
|
||||
};
|
||||
|
@ -102,10 +103,18 @@ const tableToExcel = (table, fileName, worksheet) => {
|
|||
for (let thItem of thArray) {
|
||||
let newTh = document.createElement("th");
|
||||
const {rowSpan = 1, colSpan = 1, style} = thItem;
|
||||
// style.borderColor="#999";
|
||||
// style.color="#999";
|
||||
// style.fontSize="20px";
|
||||
// style.font={
|
||||
// name: "微软雅黑",
|
||||
// sz: 20,
|
||||
// },
|
||||
traverseNodes(thItem, newTh);
|
||||
newTh.rowSpan = rowSpan; //跨行
|
||||
newTh.colSpan = colSpan; //跨列
|
||||
newTh.style = style; // 样式
|
||||
console.log(style);
|
||||
newTr.appendChild(newTh);
|
||||
}
|
||||
for (let tdItem of tdArray) {
|
||||
|
@ -149,4 +158,5 @@ const getExplorer = () => {
|
|||
else if (explorer.indexOf("Safari") >= 0) { //Safari
|
||||
return 'Safari';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState, useMemo, useEffect } from "react";
|
||||
import { Input, Select, Button, Form, Table, Upload, Modal, Popconfirm, message } from 'antd';
|
||||
import cookie from 'react-cookies';
|
||||
import { exportExcel } from '../components/exportExcel.js';
|
||||
import { exportExcel } from '../../components/exportExcel.js';
|
||||
import Paginationtable from "../../../components/pagination-table";
|
||||
import { Info } from '../../components/ModalFun';
|
||||
import { expertList, deleteExpert } from "../api";
|
||||
|
|
|
@ -58,6 +58,20 @@ export async function getTaskList(params) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function taskExportList(){
|
||||
let res = await fetch({
|
||||
url: '/api/tasks/backend/admin/exportTasks',
|
||||
method: 'get',
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
// 首页推荐任务列表查询
|
||||
export async function getRecommendTasks(params) {
|
||||
let res = await fetch({
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
.phoneClass {
|
||||
// 创客
|
||||
.centerbox {
|
||||
margin-top: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-content {
|
||||
margin: 0;
|
||||
padding-top:0;
|
||||
}
|
||||
|
||||
.choose-box-big {
|
||||
font-size: .8rem;
|
||||
|
||||
.choose-title {
|
||||
width: 5em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.choose-item {
|
||||
padding: 0 .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.centerScreen {
|
||||
display: block;
|
||||
height: auto;
|
||||
padding: .5em 0;
|
||||
}
|
||||
|
||||
.sort-box {
|
||||
margin-bottom: .15rem;
|
||||
|
||||
.sort-item {
|
||||
padding: 0 .5em;
|
||||
font-size: .9rem;
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
margin: 0;
|
||||
padding-right: 1.25rem .8rem;
|
||||
|
||||
.price {
|
||||
padding-top: 0;
|
||||
|
||||
.font-16 {
|
||||
font-size: .85rem !important;
|
||||
}
|
||||
|
||||
.font-24 {
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-title {
|
||||
font-size: .85rem;
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
||||
.chuangke_icon {
|
||||
width: 5.5rem;
|
||||
margin-left: -1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.list-other {
|
||||
white-space: nowrap;
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,208 @@
|
|||
import React, { useCallback, useEffect, useState, useMemo } from 'react';
|
||||
import { Table } from 'antd';
|
||||
import moment from 'moment';
|
||||
import { exportExcel } from '../../components/exportExcel.js';
|
||||
import { taskExportList} from '../api';
|
||||
|
||||
|
||||
const formatDelay = "YYYY-MM-DD";
|
||||
|
||||
export default ({downloading,setDownloading}) => {
|
||||
const [dataAll,setDataAll]= useState([]);
|
||||
|
||||
|
||||
const exportColumns=useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
width:50,
|
||||
render:(text, record,index) => (
|
||||
index+1
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务领域',
|
||||
dataIndex: 'task_category',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务编号',
|
||||
dataIndex: 'number',
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务标题',
|
||||
dataIndex: 'title',
|
||||
width:300,
|
||||
},
|
||||
{
|
||||
title: '任务详情',
|
||||
dataIndex: 'description',
|
||||
render:(text)=>{
|
||||
return <div className="content-text editor-w-text" dangerouslySetInnerHTML={{ __html: text }}></div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '截止投稿时间',
|
||||
dataIndex: 'collecting_days',
|
||||
width: 120,
|
||||
render: (text, record) => {
|
||||
return text?text+'天':'--'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '赏金额度',
|
||||
dataIndex: 'bounty',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '赏金分配方式',
|
||||
dataIndex: 'bounty',
|
||||
width:130,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '发布方式',
|
||||
dataIndex: 'publish_mode',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '发布者ID',
|
||||
dataIndex: 'user_id',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '姓名/企业名称',
|
||||
dataIndex: 'enterprise_name',
|
||||
width:130,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '身份证/信用代码',
|
||||
dataIndex: 'card',
|
||||
width:200,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '所在行业',
|
||||
dataIndex: 'entity_type',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '企业规模',
|
||||
dataIndex: 'scale',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '所在职位',
|
||||
dataIndex: 'position',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务状态',
|
||||
dataIndex: 'status',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '应征者名单公示',
|
||||
dataIndex: 'show_user_mode',
|
||||
width:130,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '投稿报名数',
|
||||
dataIndex: 'papers_count',
|
||||
width:100,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '中标作品编号',
|
||||
dataIndex: 'win_paper_number',
|
||||
width:120,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务发布时间',
|
||||
dataIndex: 'published_at',
|
||||
width:120,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '任务创建时间',
|
||||
dataIndex: 'created_at',
|
||||
width:120,
|
||||
render:(text) => (
|
||||
text||'--'
|
||||
)
|
||||
},
|
||||
]
|
||||
}, []);
|
||||
|
||||
|
||||
// 获取下载数据的列表
|
||||
useEffect(() => {
|
||||
if (!downloading) {
|
||||
return;
|
||||
}
|
||||
setDownloading(true);
|
||||
taskExportList().then(data => {
|
||||
setDataAll(data || []);
|
||||
setTimeout(()=>{
|
||||
setDownloading(false);
|
||||
exportExcel("#exportList table", "创客任务列表_" + moment().format(formatDelay));
|
||||
},200)
|
||||
});
|
||||
}, [downloading]);
|
||||
|
||||
return (
|
||||
<Table
|
||||
id="exportList"
|
||||
style={{ display: "none" }}
|
||||
columns={exportColumns}
|
||||
dataSource={dataAll}
|
||||
pagination={false}
|
||||
rowKey={(row) => row.id}
|
||||
/>
|
||||
)
|
||||
}
|
|
@ -10,6 +10,7 @@ import '../index.scss';
|
|||
import './index.scss';
|
||||
import { getRules, selectExpertList } from 'src/military/expert/api';
|
||||
import PaginationTable from '../../../components/pagination-table';
|
||||
import ExportTable from './exportTable';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
const formatDelay = "YYYY-MM-DD";
|
||||
const Option = Select.Option;
|
||||
|
@ -42,6 +43,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
const [expertReview, setExpertReview] = useState('');
|
||||
const [downloading,setDownloading] = useState(false);
|
||||
|
||||
//查看评审规则、查看选取专家、发布评审任务
|
||||
const [lookRules, setLookRules] = useState(false);
|
||||
|
@ -238,6 +240,7 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
]
|
||||
}, [isDelete, curPage]);
|
||||
|
||||
|
||||
//已选取专家
|
||||
const columnsExperts = useMemo(() => {
|
||||
return [
|
||||
|
@ -536,6 +539,8 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="task-manage-all ">
|
||||
<div className='management-content-head'>
|
||||
|
@ -699,10 +704,10 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
'createdAt'
|
||||
)}
|
||||
<div className="button-div">
|
||||
{/* <a href="/admin/tasks.xlsx" class="fr edu-default-btn edu-blueback-btn plr30">导出</a> */}
|
||||
{/* <a href="/admin/tasks.xlsx" class="fr edu-default-btn edu-blueback-btn plr30">导出</a> downloadFile*/}
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" onClick={clearSearch}>清除</Button>
|
||||
<Button className="mr10" type="primary" onClick={downloadFile}>导出</Button>
|
||||
<Button loading={downloading} className="mr10" type="primary" onClick={()=>{setDownloading(true)}}>导出</Button>
|
||||
</div>
|
||||
<span className={classNames({ "sort-active": sort === 'Desc', 'sort-icon': true, 'mt5': true })} onClick={() => { changeSort('Desc') }}>
|
||||
<i className="fa fa-long-arrow-down font-16 "></i>
|
||||
|
@ -749,6 +754,9 @@ export default Form.create()(({ form, showNotification, match, history, state })
|
|||
null
|
||||
)}
|
||||
</Modal>
|
||||
|
||||
<ExportTable downloading={downloading} setDownloading={setDownloading}/>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -165,19 +165,19 @@ export default Form.create()(
|
|||
if (detailData.status === status) {
|
||||
switch (status) {
|
||||
case 3:
|
||||
surplus = detailData.collectingDays * 24 * 3600 - (new Date() - new Date(detailData.publishedAt || detailData.createdAt)) / 1000;
|
||||
surplus = detailData.collectingDays * 24 * 3600 - (new Date() - new Date((detailData.publishedAt || detailData.createdAt).replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 4:
|
||||
surplus = detailData.choosingDays * 24 * 3600 - (new Date() - new Date(detailData.collectingCompleteAt)) / 1000;
|
||||
surplus = detailData.choosingDays * 24 * 3600 - (new Date() - new Date(detailData.collectingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 5:
|
||||
surplus = detailData.makePublicDays * 24 * 3600 - (new Date() - new Date(detailData.makePublicAt)) / 1000;
|
||||
surplus = detailData.makePublicDays * 24 * 3600 - (new Date() - new Date(detailData.makePublicAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 6:
|
||||
surplus = detailData.signingDays * 24 * 3600 - (new Date() - new Date(detailData.publicityCompleteAt)) / 1000;
|
||||
surplus = detailData.signingDays * 24 * 3600 - (new Date() - new Date(detailData.publicityCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 7:
|
||||
surplus = detailData.payingDays * 24 * 3600 - (new Date() - new Date(detailData.signingCompleteAt)) / 1000;
|
||||
surplus = detailData.payingDays * 24 * 3600 - (new Date() - new Date(detailData.signingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
default:
|
||||
surplus = 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { Input, Button, Modal } from 'antd';
|
||||
import moment from 'moment';
|
||||
import { formatDuring, getUrlToken } from 'educoder';
|
||||
import { formatDuring, getUrlToken, addMeta, IsPC } from 'educoder';
|
||||
import ChooseNav from '../../components/chooseNav';
|
||||
import SortBox from '../../components/sortBox';
|
||||
import ItemListTask from '../components/itemListTask';
|
||||
|
@ -9,6 +9,7 @@ import { taskTimeArr, taskStatusArr, sortArr, taskModeIdArr } from '../static';
|
|||
import { getTaskList, getTaskCategory, getCompanyInfo } from '../api';
|
||||
import polify from '../image/polify.png';
|
||||
import '../index.scss';
|
||||
import '../phone.scss';
|
||||
import { Link } from 'react-router-dom';
|
||||
const Search = Input.Search;
|
||||
|
||||
|
@ -16,21 +17,43 @@ const Search = Input.Search;
|
|||
export default ({ history, current_user, showLoginDialog, location, mygetHelmetapi }) => {
|
||||
|
||||
let initType = getUrlToken('type', location.search) || '';
|
||||
let taskParams=sessionStorage.getItem("taskParams")?JSON.parse(sessionStorage.getItem("taskParams")):{};
|
||||
let taskParams = sessionStorage.getItem("taskParams") ? JSON.parse(sessionStorage.getItem("taskParams")) : {};
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [taskCategoryArr, setTaskCategoryArr] = useState([]);
|
||||
const [categoryId, setCategoryId] = useState(initType||taskParams.categoryId||'');
|
||||
const [taskModeId, setTaskModeId] = useState(taskParams.taskModeId||'');
|
||||
const [categoryId, setCategoryId] = useState(initType || taskParams.categoryId || '');
|
||||
const [taskModeId, setTaskModeId] = useState(taskParams.taskModeId || '');
|
||||
const [expiredStartTime, setExpiredStartTime] = useState('');//taskParams.expiredStartTime|| 任务shi xian
|
||||
const [expiredEndTime, setExpiredEndTime] = useState('');//taskParams.expiredEndTime||
|
||||
const [statusString, setStatusString] = useState(taskParams.statusString||'3,4,5,6,7,8');
|
||||
const [searchInput, setSearchInput] = useState(taskParams.searchInput||'');
|
||||
const [orderBy, setOrderBy] = useState(taskParams.orderBy||'');
|
||||
const [curPage, setCurPage] = useState(taskParams.curPage||1);
|
||||
const [statusString, setStatusString] = useState(taskParams.statusString || '3,4,5,6,7,8');
|
||||
const [searchInput, setSearchInput] = useState(taskParams.searchInput || '');
|
||||
const [orderBy, setOrderBy] = useState(taskParams.orderBy || '');
|
||||
const [curPage, setCurPage] = useState(taskParams.curPage || 1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
const [visible,setVisible]=useState(false);
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
// 手机端适配
|
||||
useEffect(() => {
|
||||
if (!IsPC()) {
|
||||
// 手动添加mate标签
|
||||
addMeta(
|
||||
'viewport',
|
||||
'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover',
|
||||
);
|
||||
document.querySelector('body').className = "phoneClass";
|
||||
document.querySelector('#root').className = "page -layout-v -fit widthunit phoneClass";
|
||||
|
||||
return () => {
|
||||
addMeta(
|
||||
'viewport',
|
||||
'width=1200',
|
||||
);
|
||||
document.querySelector('#root').className = "page -layout-v -fit widthunit";
|
||||
document.querySelector('body').className = "";
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
// 获取分类数据
|
||||
useEffect(() => {
|
||||
|
@ -46,7 +69,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
}, []);
|
||||
|
||||
// 获取任务列表
|
||||
useEffect(() => {
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
categoryId,
|
||||
taskModeId,
|
||||
|
@ -66,6 +89,17 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
}
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
|
||||
// 存储搜索条件
|
||||
let params = {
|
||||
categoryId,
|
||||
taskModeId,
|
||||
statusString,
|
||||
searchInput,
|
||||
orderBy,
|
||||
curPage,
|
||||
}
|
||||
sessionStorage.setItem("taskParams", JSON.stringify(params));
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
|
@ -93,23 +127,24 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
setCurPage(1);
|
||||
}, []);
|
||||
|
||||
// 计算任务时间,返回延时/剩余时间
|
||||
function surplusTime(item) {
|
||||
let surplus;
|
||||
switch (item.status) {
|
||||
case 3:
|
||||
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date(item.publishedAt || item.createdAt)) / 1000;
|
||||
surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date((item.publishedAt || item.createdAt).replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 4:
|
||||
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt)) / 1000;
|
||||
surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 5:
|
||||
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt)) / 1000;
|
||||
surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 6:
|
||||
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt)) / 1000;
|
||||
surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
case 7:
|
||||
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt)) / 1000;
|
||||
surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt.replace(/-/g,'/'))) / 1000;
|
||||
break;
|
||||
default:
|
||||
surplus = 0;
|
||||
|
@ -134,21 +169,12 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
}, []);
|
||||
|
||||
function taskClick(id) {
|
||||
// 登录与否的判断
|
||||
// if (!current_user.user_id) {
|
||||
// showLoginDialog();
|
||||
// return;
|
||||
// }
|
||||
let params={
|
||||
categoryId,
|
||||
taskModeId,
|
||||
// expiredStartTime,
|
||||
// expiredEndTime,
|
||||
statusString,
|
||||
searchInput,
|
||||
orderBy,
|
||||
curPage,
|
||||
}
|
||||
sessionStorage.setItem("taskParams",JSON.stringify(params));
|
||||
|
||||
history.push(`/task/taskDetail/${id}`);
|
||||
}
|
||||
|
||||
|
@ -162,35 +188,17 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
if (res) {
|
||||
if (res.message === 'success') {
|
||||
history.push("/task/taskAdd");
|
||||
} else { //if (res.message === '未进行实体认证')
|
||||
} else { //if (res.message === '未进行实体认证')
|
||||
setVisible(true)
|
||||
// Modal.info({
|
||||
// title: '因为以下原因,您暂时不能进行本操作',
|
||||
// content: <div className="mt10">
|
||||
// <p>完成条件后,重新点击查看您的最新参与资格</p>
|
||||
// <div className="inline mt10">
|
||||
// <span className="mr30"> <i className="iconfont icon-mingpian"></i> <span className="color-red">未进行实名未认证</span> </span>
|
||||
// </div>
|
||||
// </div>,
|
||||
// onOk: () => {
|
||||
// window.location.href = mygetHelmetapi && mygetHelmetapi.main_web_site_url + `/users/${current_user.login}/profiles`;
|
||||
// },
|
||||
// okText: '好的',
|
||||
// className: 'go_profiles'
|
||||
// });
|
||||
}
|
||||
// else {
|
||||
// Modal.info({
|
||||
// content: '您没有权限需求提报',
|
||||
// className:'failByPression'
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="centerbox" style={{ marginTop: '20px' }}>
|
||||
|
||||
{/* 选项条件 */}
|
||||
<div className="nav-content">
|
||||
<ChooseNav
|
||||
key={'taskCategory'}
|
||||
|
@ -227,17 +235,19 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
title={'任务状态:'}
|
||||
options={taskStatusArr}
|
||||
changeOptionId={changeOptionId}
|
||||
defaultOption={{ code: statusString=='3,4,5,6,7,8'?"":statusString, dicItemName: "", dicItemCode: statusString=='3,4,5,6,7,8'?"":statusString }}
|
||||
defaultOption={{ code: statusString == '3,4,5,6,7,8' ? "" : statusString, dicItemName: "", dicItemCode: statusString == '3,4,5,6,7,8' ? "" : statusString }}
|
||||
size='big'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="center-content">
|
||||
|
||||
{/* 排序条件+搜索 */}
|
||||
<div className="centerScreen" >
|
||||
|
||||
<SortBox
|
||||
options={sortArr}
|
||||
defaultOption={orderBy?{ type: orderBy || "" }:''}
|
||||
defaultOption={orderBy ? { type: orderBy || "" } : ''}
|
||||
changeOptionId={changeSort}
|
||||
/>
|
||||
|
||||
|
@ -255,6 +265,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* 列表 */}
|
||||
<ItemListTask
|
||||
list={taskList}
|
||||
itemClick={taskClick}
|
||||
|
@ -271,17 +282,17 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
className='go_profiles'
|
||||
visible={visible}
|
||||
closable={true}
|
||||
onOk={()=>{setVisible(false)}}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
onOk={() => { setVisible(false) }}
|
||||
onCancel={() => { setVisible(false) }}
|
||||
okText='好的'
|
||||
cancelButtonProps={null}
|
||||
closeIcon={<i className='iconfont icon-shanchuicon'></i>}
|
||||
>
|
||||
<div className='profiles-tit'>您暂无发布权限,仅<span >平台指定企业</span>允许需求提报</div>
|
||||
<img className='polify' src={polify} />
|
||||
<div className='profiles-content'>
|
||||
若想发布需求,请在账号管理处<a href={`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`}>完善企业认证信息</a>,或<Link to={'/needs/new'}>点击此处</Link>提交需求申请信息,后续管理员将与您联系。
|
||||
</div>
|
||||
<div className='profiles-tit'>您暂无权限,仅<span >平台指定企业</span>允许需求提报</div>
|
||||
<img className='polify' src={polify} />
|
||||
<div className='profiles-content'>
|
||||
若想需求提报,请在账号管理处<a href={`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`}>完善企业认证信息</a>,或<Link to={'/needs/new'}>点击此处</Link>提交需求申请信息,后续管理员将与您联系。
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -159,3 +159,12 @@
|
|||
.MuiModal-root-15 {
|
||||
z-index: 10001 !important;
|
||||
}
|
||||
|
||||
.thirdBox{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.thirdLog{
|
||||
width: 120px;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import { notification } from 'antd';
|
|||
|
||||
import axios from 'axios';
|
||||
import educoderLogo from './educoder.png';
|
||||
import openKylin from './openKylin.svg';
|
||||
import gitLink from './gitLink.png';
|
||||
|
||||
import './LoginDialog.css';
|
||||
import { broadcastChannelPostMessage } from 'educoder'
|
||||
|
@ -104,7 +106,7 @@ class LoginDialog extends Component {
|
|||
Phonenumberisnotcobool: false,
|
||||
weixinlogin: false,
|
||||
qqlogin: false,
|
||||
settings:undefined,
|
||||
settings: undefined,
|
||||
};
|
||||
}
|
||||
enter = (num) => {
|
||||
|
@ -368,7 +370,7 @@ class LoginDialog extends Component {
|
|||
let url = '/accounts/login.json'
|
||||
axios.post(url, {
|
||||
login: newloginValue,
|
||||
password: Base64.encode(newpassValue),
|
||||
password: Base64.encode(newpassValue),
|
||||
autologin: isGoingValue
|
||||
}
|
||||
).then((response) => {
|
||||
|
@ -380,7 +382,7 @@ class LoginDialog extends Component {
|
|||
const messge = (
|
||||
<div>
|
||||
<p>登录密码出错已达上限,账号已被锁定;</p>
|
||||
<p className="mt10">请10分钟后重新登录或<a href="/resetPassword" style={{textDecoration: "underline",color: "#4CACFF"}}>找回密码</a></p>
|
||||
<p className="mt10">请10分钟后重新登录或<a href="/resetPassword" style={{ textDecoration: "underline", color: "#4CACFF" }}>找回密码</a></p>
|
||||
</div>
|
||||
)
|
||||
this.openNotifications(messge);
|
||||
|
@ -459,14 +461,14 @@ class LoginDialog extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
let { login, isGoing, isGoingValue, disabled , Phonenumberisnotco , dialogBox, isRender, weixinlogin, settings } = this.state;
|
||||
let { login, isGoing, isGoingValue, disabled, Phonenumberisnotco, dialogBox, isRender, weixinlogin, settings } = this.state;
|
||||
|
||||
if (isRender === undefined) {
|
||||
isRender = false
|
||||
}
|
||||
|
||||
const main_web_site_url =localStorage.chromesetting && JSON.parse(localStorage.chromesetting).main_web_site_url;
|
||||
const current_main_site_url =localStorage.chromesetting && JSON.parse(localStorage.chromesetting).current_main_site_url;
|
||||
const main_web_site_url = localStorage.chromesetting && JSON.parse(localStorage.chromesetting).main_web_site_url;
|
||||
const current_main_site_url = localStorage.chromesetting && JSON.parse(localStorage.chromesetting).current_main_site_url;
|
||||
|
||||
return (
|
||||
<Dialog open={true} id="DialogID"
|
||||
|
@ -528,8 +530,8 @@ class LoginDialog extends Component {
|
|||
<div style={{ height: '25px' }}><p className="color-orange edu-txt-left none" id="username_error_notice"
|
||||
style={{ display: Phonenumberisnotco === undefined ? 'none' : 'block' }}>{Phonenumberisnotco}</p></div>
|
||||
<div>
|
||||
<input
|
||||
type="password"
|
||||
<input
|
||||
type="password"
|
||||
id="password_loggin_input"
|
||||
name="password"
|
||||
ref="passwordText"
|
||||
|
@ -540,7 +542,7 @@ class LoginDialog extends Component {
|
|||
this.loginEDU : () => {
|
||||
}
|
||||
}
|
||||
placeholder="请输入登录密码"
|
||||
placeholder="请输入登录密码"
|
||||
/>
|
||||
<div style={{ height: '25px' }}>
|
||||
<p className="color-orange edu-txt-left none" id="password_error_notice">
|
||||
|
@ -573,21 +575,22 @@ class LoginDialog extends Component {
|
|||
</span>
|
||||
</p>
|
||||
{
|
||||
settings && settings.third_party && settings.third_party.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className={"mt10"}>
|
||||
{settings.third_party.map((item,key)=>{
|
||||
return(
|
||||
<a href={`${item.url}`}>
|
||||
<img src={item.name === "educoder" ? educoderLogo : ""} width="46px" alt={`${item.name}登录`} />
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
:""
|
||||
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className="thirdBox">
|
||||
{settings.third_party_test.map((item, key) => {
|
||||
return (
|
||||
<a href={`${item.url}`}>
|
||||
{item.name === "GitLink" && <img className="gitLinkLog thirdLog" src={gitLink} alt={`${item.name}登录`} />}
|
||||
{item.name === "Openkyin" && <img className="thirdLog" src={openKylin} alt={`${item.name}登录`} />}
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
: ""
|
||||
}
|
||||
</form>
|
||||
</div>
|
||||
|
|
After Width: | Height: | Size: 5.3 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 5000 1300"><defs><style>.cls-1{fill:url(#未命名的渐变_297);}.cls-2{fill:url(#未命名的渐变_297-2);}.cls-3{fill:url(#未命名的渐变_297-3);}.cls-4{fill:url(#未命名的渐变_297-4);}.cls-5{fill:url(#未命名的渐变_305);}.cls-6{fill:url(#未命名的渐变_297-5);}.cls-7{fill:url(#未命名的渐变_297-6);}.cls-8{fill:url(#未命名的渐变_297-7);}.cls-9{fill:url(#未命名的渐变_297-8);}.cls-10{fill:url(#未命名的渐变_297-9);}</style><linearGradient id="未命名的渐变_297" x1="998.5" y1="460.21" x2="998.5" y2="1071.6" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3da4ff"/><stop offset="1" stop-color="#134bd6"/></linearGradient><linearGradient id="未命名的渐变_297-2" x1="410.03" y1="460.21" x2="410.03" y2="1071.61" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-3" x1="1586.97" y1="460.21" x2="1586.97" y2="1071.61" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-4" x1="2175.39" y1="460.21" x2="2175.39" y2="1071.6" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_305" x1="2826.98" y1="1050" x2="2826.98" y2="250" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ed5f00"/><stop offset="1" stop-color="#ffc52b"/></linearGradient><linearGradient id="未命名的渐变_297-5" x1="3915.51" y1="460.21" x2="3915.51" y2="1071.61" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-6" x1="4642.7" y1="460.21" x2="4642.7" y2="1071.6" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-7" x1="3418.16" y1="460.21" x2="3418.16" y2="1071.61" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-8" x1="4258.7" y1="460.21" x2="4258.7" y2="1071.61" xlink:href="#未命名的渐变_297"/><linearGradient id="未命名的渐变_297-9" x1="4258.7" y1="460.21" x2="4258.7" y2="1071.6" xlink:href="#未命名的渐变_297"/></defs><g id="渐变"><path class="cls-1" d="M991,489.06H779.27v.13c-2-.08-4-.13-6.09-.13h0V1050H920.33V954.68H991c128.58,0,232.82-104.23,232.82-232.81S1119.58,489.06,991,489.06Zm0,318.47H920.33V636.21H991a85.66,85.66,0,1,1,0,171.32Z"/><path class="cls-2" d="M410,494C282,494,174.15,580.61,141.89,698.43A278.53,278.53,0,0,0,132,772c0,153.53,124.46,278,278,278S688,925.54,688,772a278.12,278.12,0,0,0-9.86-73.58C645.9,580.61,538.09,494,410,494Zm0,408.84c-72.15,0-130.85-58.7-130.85-130.84S337.88,641.16,410,641.16,540.87,699.86,540.87,772,482.18,902.85,410,902.85Z"/><path class="cls-3" d="M1855.06,698.56l0-.13C1822.11,579.26,1711.29,492,1582.37,494.05c-126,2-231.65,87.94-263.54,204.33a278.44,278.44,0,0,0-9.84,76.2c1.36,149.81,123,272.65,272.8,275.37,118.14,2.15,219.82-69.42,262.16-171.76H1663.43c-.4.29-.79.59-1.2.88a129.64,129.64,0,0,1-71.29,23.71c-1.28,0-2.57,0-3.86.05h-2.35c-.32,0-.63,0-1,0A131.08,131.08,0,0,1,1479,845.58h376.12a278.7,278.7,0,0,0,9.8-78.78A275.35,275.35,0,0,0,1855.06,698.56Zm-376.2-.13a130.7,130.7,0,0,1,216.25,0Z"/><path class="cls-4" d="M2175.39,518.23a224.08,224.08,0,0,0-135,45.09,146.5,146.5,0,0,0-90.21-30.9h0V1050h147.15V743.5a78.12,78.12,0,1,1,156.23,0V1050h147.15V743.5C2400.66,619.28,2299.61,518.23,2175.39,518.23Z"/><polygon class="cls-5" points="3168.14 250 2897.14 250 2695.68 496.54 2695.68 496.09 2695.68 250 2485.82 250 2485.82 496.09 2485.82 496.09 2485.82 753.37 2485.82 1050 2514.45 1050 2695.68 1050 2695.68 828.2 2695.68 828.2 2742.99 770.31 2897.14 1050 3168.14 1050 2889.52 590.99 3168.14 250"/><polygon class="cls-6" points="3878.21 489.06 3731.06 489.06 3731.06 902.85 3731.06 1050 3878.21 1050 4025.36 1050 4099.97 1050 4099.97 902.85 3878.21 902.85 3878.21 489.06"/><path class="cls-7" d="M4642.7,518.23a224.08,224.08,0,0,0-135.05,45.09,146.54,146.54,0,0,0-90.21-30.9V1050h147.15V743.5a78.12,78.12,0,1,1,156.23,0V1050H4868V743.5C4868,619.28,4766.91,518.23,4642.7,518.23Z"/><path class="cls-8" d="M3498.75,673.56A80.59,80.59,0,0,1,3340,693.09a251.94,251.94,0,0,1-2.41-34V489.06H3190.41v184.5c0,99.84,64.59,184.88,154.17,215.54V1050h147.15V889.1h0c89.58-30.66,154.17-115.7,154.17-215.54V489.06H3498.75Z"/><rect class="cls-9" x="4185.13" y="489.06" width="147.15" height="99.06"/><rect class="cls-10" x="4185.13" y="627.13" width="147.15" height="422.87"/></g></svg>
|
After Width: | Height: | Size: 4.3 KiB |
|
@ -2,9 +2,11 @@ import React, { useEffect, useState } from "react";
|
|||
import { Form, Input, Button, Checkbox } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
import axios from 'axios';
|
||||
import educoderLogo from '../login/educoder.png';
|
||||
// import educoderLogo from '../login/educoder.png';
|
||||
import openKylin from '../login/openKylin.svg';
|
||||
import gitLink from '../login/gitLink.png';
|
||||
import cookie from 'react-cookies';
|
||||
import { getImageUrl} from 'educoder';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import './LoginRegisterPage.scss';
|
||||
|
||||
function Login(props) {
|
||||
|
@ -114,18 +116,20 @@ function Login(props) {
|
|||
</Form>
|
||||
|
||||
{
|
||||
setting && setting.third_party && setting.third_party.length > 0 ?
|
||||
<p className="quick_logon">
|
||||
<p className="quick_logon_p"></p>
|
||||
<span className={"startlogin"}> 快速登录 </span>
|
||||
{setting.third_party.map((item, key) => {
|
||||
return (
|
||||
<a href={`${item.url}`}>
|
||||
<img src={item.name === "educoder" ? educoderLogo : ""} width="46px" alt={`${item.name}登录`} />
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
settings && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className="thirdBox">
|
||||
{settings.third_party_test.map((item, key) => {
|
||||
return (
|
||||
<a href={`${item.url}`}>
|
||||
{item.name === "GitLink" && <img className="gitLinkLog thirdLog" src={gitLink} alt={`${item.name}登录`} />}
|
||||
{item.name === "Openkyin" && <img className="thirdLog" src={openKylin} alt={`${item.name}登录`} />}
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
: ""
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
|||
import Login from "./Login";
|
||||
import Register from "./Register";
|
||||
import ResetPassword from "./ResetPassword";
|
||||
import { getImageUrl} from 'educoder';
|
||||
import { getImageUrl ,addMeta} from 'educoder';
|
||||
|
||||
// import logo from './img/logo.svg';
|
||||
// import banner from './img/banner.png';
|
||||
|
@ -14,17 +14,14 @@ import '../loginRegister/LoginRegisterPage.scss';
|
|||
function LoginRegisterPage(props) {
|
||||
useEffect(() => {
|
||||
// 手动添加mate标签
|
||||
const addMeta = (name, content) => {
|
||||
const meta = document.createElement('meta');
|
||||
meta.content = content;
|
||||
meta.name = name;
|
||||
document.getElementsByTagName('head')[0].appendChild(meta);
|
||||
};
|
||||
|
||||
addMeta(
|
||||
'viewport',
|
||||
'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover',
|
||||
);
|
||||
|
||||
return ()=>{
|
||||
document.getElementsByTagName('head')[0].removeChild(document.querySelector("meta[name='viewport']"));
|
||||
}
|
||||
})
|
||||
return (
|
||||
<div className="loginRegister">
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
.thirdBox{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.thirdLog{
|
||||
width: 120px;
|
||||
}
|
||||
/*当页面宽度大于1000px*/
|
||||
@media screen and (min-width:1000px) {
|
||||
.banner{
|
||||
|
@ -261,7 +269,7 @@
|
|||
padding-top:0;
|
||||
}
|
||||
.login_register_right .right_cont{
|
||||
padding:8vh 15px
|
||||
padding:2vh 15px
|
||||
}
|
||||
.ant-form-item-label, .ant-form-item-control-wrapper{
|
||||
width: auto !important;
|
||||
|
@ -288,11 +296,18 @@
|
|||
@media screen and (max-width:360px) {
|
||||
.login_register_right .right_cont{
|
||||
font-size: 12px;
|
||||
padding:5vh 10px
|
||||
padding:1vh 10px;
|
||||
.ant-form-item{
|
||||
margin-bottom: .9rem;
|
||||
}
|
||||
}
|
||||
.login_register_right{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.has-success{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.login_agreement{
|
||||
|
|
|
@ -844,7 +844,7 @@ class NewHeader extends Component {
|
|||
</img>
|
||||
{/* </a> */}
|
||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
||||
<li className="bor-bottom-greyE" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
|
||||
<li className="bor-bottom-greyE ellipsis-1" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
|
||||
{
|
||||
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
|
||||
return(
|
||||
|
|
|
@ -46,6 +46,12 @@ body>.-task-title {
|
|||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.ellipsis-1 {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
.globalSpin {
|
||||
max-height: 700px !important;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
.phoneClass {
|
||||
width: 100vw !important;
|
||||
|
||||
// 解除1200限制
|
||||
.newHeaders,
|
||||
.newContainers,
|
||||
.newMain,
|
||||
.newFooter {
|
||||
min-width: 100vw;
|
||||
}
|
||||
.newMain{
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
// 头部
|
||||
.newHeaders {
|
||||
height: 3.2rem;
|
||||
}
|
||||
|
||||
.headerContent {
|
||||
padding: 0;
|
||||
|
||||
>.edu-menu-panel {
|
||||
margin-left: 2vw;
|
||||
}
|
||||
|
||||
>a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.head-nav ul#header-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding:0 .2em;
|
||||
li {
|
||||
margin: 0 2px;
|
||||
|
||||
a {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.head-right {
|
||||
// .mr30,
|
||||
// .edu-menu-panel {
|
||||
display: none;
|
||||
// }
|
||||
}
|
||||
|
||||
.login-box{
|
||||
font-size: .85rem;
|
||||
.vertical-line{
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.newContainers {
|
||||
>div:first-child {
|
||||
height: 3.2rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 登陆框
|
||||
.MuiDialog-paperWidthSm-11,#log_reg_content{
|
||||
max-width: 95vw;
|
||||
}
|
||||
#DialogID .dialogBox{
|
||||
max-width: 95vw;
|
||||
|
||||
.logincloseIcon{
|
||||
top:-70px !important;
|
||||
right: 2px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
// 系统消息
|
||||
.systemBox .ant-modal-body .sysnoticeBox{
|
||||
width: 95vw;
|
||||
.nContent{
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
// 底部
|
||||
.footerbottom {
|
||||
height: 210px !important;
|
||||
|
||||
>div {
|
||||
margin: 0 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.newFooter p {
|
||||
font-size: .5rem;
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
a{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.footer-right{
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|