Merge pull request '8000环境issue修改' (#341) from durian/forgeplus-react:JKDevelop into JKDevelop

This commit is contained in:
xxq250 2022-02-25 16:20:27 +08:00
commit 7009db819c
53 changed files with 21365 additions and 156 deletions

4
.gitignore vendored
View File

@ -6,6 +6,8 @@ yarn-debug.log*
yarn-error.log*
yarn.lock
package-lock.json*
# Runtime data
pids
*.pid
@ -87,5 +89,3 @@ typings/
.DS_Store
.idea/*
package.json
package-lock.json

21082
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@
"code-prettify": "^0.1.0",
"codemirror": "^5.64.0",
"connected-react-router": "4.4.1",
"cross-port-killer": "^1.0.1",
"css-loader": "^3.5.2",
"dompurify": "^2.3.3",
"dotenv": "4.0.0",
@ -204,7 +205,7 @@
"babel-preset-stage-2": "^6.24.1",
"compression-webpack-plugin": "^1.1.12",
"concat": "^1.0.3",
"cross-env": "^7.0.3",
"cross-env": "^5.1.1",
"happypack": "^5.0.1",
"less": "^3.9.0",
"less-loader": "^4.1.0",

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1642391410353') format('woff2'),
url('iconfont.woff?t=1642391410353') format('woff'),
url('iconfont.ttf?t=1642391410353') format('truetype');
src: url('iconfont.woff2?t=1644907653340') format('woff2'),
url('iconfont.woff?t=1644907653340') format('woff'),
url('iconfont.ttf?t=1644907653340') format('truetype');
}
.iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-icon2:before {
content: "\e912";
}
.icon-a-21:before {
content: "\e913";
}
.icon-a-2:before {
content: "\e90f";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,20 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "27299393",
"name": "icon",
"font_class": "icon2",
"unicode": "e912",
"unicode_decimal": 59666
},
{
"icon_id": "27299394",
"name": "2",
"font_class": "a-21",
"unicode": "e913",
"unicode_decimal": 59667
},
{
"icon_id": "27200759",
"name": "2",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -300,7 +300,8 @@ class App extends Component {
<ConfigProvider locale={zhCN}>
<MuiThemeProvider theme={theme}>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
<SiderBar />
{/* 红山开源项目暂无右下方便捷按钮 */}
{/* <SiderBar /> */}
{/* <Router> */}
<Switch>
{/* wiki预览 */}

View File

@ -25,13 +25,14 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'a'
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'admin'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
// 判断网络是否连接
initOnlineOfflineListener();
// var proxy = "http://192.168.1.40:3000";
var proxy = "http://111.8.36.180:8000";
//响应前的设置
axios.interceptors.request.use(

View File

@ -9,7 +9,20 @@ class Loading extends Component {
}
render() {
return ""
return (
<div className="App" style={{ minHeight: '800px', width: "100%" }}>
<style>
{
`
.margintop{
margin-top:20%;
}
`
}
</style>
<Spin size="large" className={"margintop"} />
</div>
);
}
}

View File

@ -6,18 +6,17 @@ const { Search } = Input;
const $ = window.$;
const isDev = window.location.port == 3007;
const isdev2= window.location.hostname ==='www.educoder.net'
// export const TEST_HOST = "http://39.105.176.215:49999"
export const TEST_HOST = "http://117.50.100.12:49999";
export const TEST_HOST = "http://111.8.36.180:8000";
export function getImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
// const local = 'http://localhost:3000'
// const local = 'http://39.105.176.215:49999';
const local = 'http://117.50.100.12:49999';
const local = 'http://111.8.36.180:8000';
if (isDev) {
return `${local}/${path}`
}
path && !path.startsWith('/') && (path = '/'.concat(path));
return `${path}`;
}
@ -39,10 +38,7 @@ export function numFormat(num, digits){
}
export function getImage(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'http://39.105.176.215:49999';
const local = 'http://111.8.36.180:8000';
if (path&&path.indexOf("http://") === -1) {
if (isDev) {
return `${local}/images/${path}`
@ -54,10 +50,7 @@ export function getImage(path) {
}
export function getTestImage(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'http://117.50.100.12:49999';
const local = 'http://111.8.36.180:8000';
if (path && path.indexOf("http://") === -1) {
if (isDev) {
return `${local}${path}`
@ -69,7 +62,7 @@ export function getTestImage(path) {
}
export function getLogoImageUrl(path) {
const local = 'http://117.50.100.12:49999';
const local = 'http://111.8.36.180:8000';
if (isDev) {
return `${local}/${path}`
@ -78,9 +71,6 @@ export function getLogoImageUrl(path) {
}
export function getcdnImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const testlocal = 'https://testali-cdn.educoder.net'
const local = 'https://ali-cdn.educoder.net'
let firstStr = path.substr(0, 1);

View File

@ -135,6 +135,7 @@
// 右上角小铃铛单独样式
.notice-popover{
z-index: 1000001;
//popover小尖尖
.ant-popover-arrow{
display: none;
@ -184,7 +185,7 @@
.message-icon{
position: relative;
.ant-scroll-number{
right:12px;
// right:12px;
padding: 0 0px;
}
}

View File

@ -11,6 +11,7 @@ import "./css/index.scss";
import Loadable from "react-loadable";
import Loading from "../Loading";
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
import Handbook from "./Component/Handbook";
const ProjectNew = Loadable({
@ -40,6 +41,7 @@ class Index extends Component {
return (
<div className="newMain clearfix">
<Handbook/>
<Switch {...this.props}>
<Route
path="/projects/:projectsType/new/:OIdentifier"

View File

@ -551,7 +551,7 @@ class Detail extends Component {
return (
<div>
<SpecialModal {...this.props} visible={visible} hideModal={this.sureModal} user_apply_signatures={user_apply_signatures} project_id={project_id} sureModal={this.sureModal}></SpecialModal>
<div className="detailHeader-wrapper">
<div className="detailHeader-wrapper open-sourse">
<div className="normal">
<AlignTop style={{ padding: "18px 0px 10px", justifyContent: "space-between" }}>
<div>

View File

@ -10,6 +10,7 @@ import ListItem from './IndexItem';
import axios from 'axios';
import img_new from '../Images/new.png';
import img_array from '../Images/array.png';
import banner from '../Images/banner_list.png';
import CheckProfile from '../Component/ProfileModal/Profile';
const Search = Input.Search;
@ -131,7 +132,7 @@ class Index extends Component {
name:'全部语言',
id:0,
});
this.setTypeList(result.data, undefined)
this.setTypeList(result.data, 0)
}
}).catch((error) => { })
}
@ -140,7 +141,7 @@ class Index extends Component {
this.setState({
typeList: list.map((item, key) => {
return (
<li key={key} className={ (active_type && parseInt(active_type) === item.id) ? 'active' : ''} onClick={() => this.changeType(`${item.id}`, list)}>
<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>
@ -174,7 +175,7 @@ class Index extends Component {
name:'全部类别',
id:0,
});
this.setCategoryList(result.data, undefined);
this.setCategoryList(result.data, 0);
}
}).catch((error) => { })
}
@ -183,7 +184,7 @@ class Index extends Component {
this.setState({
categoryList: list.map((item, key) => {
return (
<li key={key} className={active_id && parseInt(active_id) === item.id ? 'active' : ''} onClick={() => this.changeCategory(`${item.id}`, list)}>
<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>
@ -291,9 +292,9 @@ class Index extends Component {
return (
<div>
{/* <p className="t_project_banner">
<p className="t_project_banner">
<img src={banner} width="100%" alt=""/>
</p> */}
</p>
{/* {
recommendOriList && recommendOriList.length>0?
<Slider {...settings} className="recommandOri">

View File

@ -102,18 +102,12 @@ class IndexItem extends Component {
}
</AlignCenter>
<span className="p-r-tags">
{
item.praises_count && item.praises_count>0 ?
<span className="pariseTag">
<img src={img_parise} alt="" className="pariseImg" /> {item.praises_count}
</span>:""
}
{
item.forked_count && item.forked_count>0 ?
<span>
<i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}
</span>:""
}
<span className="pariseTag">
<img src={img_parise} alt="" className="pariseImg" /> {item.praises_count}
</span>
<span>
<i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}
</span>
</span>
</div>
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>

View File

@ -66,6 +66,9 @@
}
.list-r-Search{
width: 400px;
.ant-input:hover{
border-color: #4154f1;
}
}
.padding0-25{
padding:0px 25px;
@ -229,6 +232,9 @@
background-color:#FBFCFF;
border-bottom:1px solid #e2e2e2;
}
.open-sourse + .ant-spin-nested-loading{
margin-bottom: 130px;
}
.headerMenu-wrapper{
display: flex;
flex-direction: row;

View File

@ -886,7 +886,7 @@ class order extends Component {
{search_count === 0 ? (
<NoneData _html="暂时还没有相关数据!" />
) : (
<div style={{ minHeight: "500px" }}>
<div style={{ minHeight: "400px" }}>
<Checkbox.Group name="issues" onChange={this.checkIssues} value={checkedValue} style={{ width: "100%" }}>
{issues && issues.length > 0 && issues.map((item, key) => {
return (

View File

@ -83,11 +83,11 @@ function Index(props){
<div className="userDetail">
<div className="userHeadPhoto">
<img src={getImageUrl(`/${current_user && current_user.image_url}`)} alt=""/>
<span className="userUpdateBox"onClick={()=>setAvatarVisible(true)}>修改头像</span>
{/* <span className="userUpdateBox"onClick={()=>setAvatarVisible(true)}>修改头像</span> */}
</div>
<span>{current_user && current_user.username}</span>
</div>
<ul className="securityUl ul-border-buttom">
{/* <ul className="securityUl ul-border-buttom">
<li>个人信息</li>
<li className={pathname.indexOf("/settings/profile")>-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={pathname.indexOf("/settings/password")>-1 ?"active":""}><Link to={`/settings/password`}><i className="iconfont icon-xuanzhonganquanshezhi_icon mr5 font-14"></i><span className="text-shodow-bold">密码管理</span></Link></li>
@ -100,6 +100,10 @@ function Index(props){
<ul className="securityUl">
<li>安全设置</li>
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i><span className="text-shodow-bold">SSH密钥</span></Link></li>
</ul> */}
<ul className="securityUl ul-border-buttom">
<li>消息通知</li>
<li className={(pathname.indexOf("/settings/notice")>-1 && pathname.indexOf("/settings/notice/config") == -1) || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}><Link to={"/settings/notice"}><i className="iconfont icon-wodetongzhi"></i><span className="text-shodow-bold">我的通知</span></Link></li>
</ul>
</div>
<LongWidth>

View File

@ -6,6 +6,7 @@
padding:30px 0px 10px;
.shortW{
width: 198px;
height: 300px;
border: 1px solid rgba(153, 153, 153, 0.22);
border-radius: 4px;
// min-height: 400px;
@ -77,7 +78,7 @@
}
}
.ul-border-buttom{
border-bottom: 1px solid rgba(153, 153, 153, 0.22);
// border-bottom: 1px solid rgba(153, 153, 153, 0.22);
padding-bottom: 5px;
}
}

View File

@ -32,11 +32,11 @@ function MyNotice(props) {
useEffect(()=>{
let notice = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
let login = current_user && current_user.login;
if(!login){
history.push(`/explore`);
}else if(!notice){
history.push(`/settings/profile`);
}
// if(!login){
// history.push(`/explore`);
// }else if(!notice){
// history.push(`/settings/profile`);
// }
},[mygetHelmetapi])
useEffect(()=>{

View File

@ -113,7 +113,7 @@ class Index extends Component {
</p>
</li>
{
projectDetail && projectDetail.permission && (projectDetail.permission === "Owner" || projectDetail.permission === "Admin") ?
false && projectDetail && projectDetail.permission && (projectDetail.permission === "Owner" || projectDetail.permission === "Admin") ?
<li
className={pathname.indexOf("settings/special") > -1 ? "active" : ""}
>

View File

@ -14,7 +14,7 @@ const menu = [
{name:"代码库",index:"code"},
{name:"疑修 (Issue)",index:"issues"},
{name:"合并请求 (PR)",index:"pulls"},
{name:"引擎 (Engine)",index:"devops"},
// {name:"引擎 (Engine)",index:"devops"},
// {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
{name:"维基 (Wiki)",index:"wiki"},

View File

@ -2,7 +2,8 @@ ul,ol,dl{
margin-bottom: 0px;
}
.newMain{
background-color: #fff;
padding-bottom: 110px;
background-color: #f5f5f5;
}
.newTable{
background-color: #F0F5FF;
@ -272,7 +273,7 @@ form{
width: 6px;
content: '';
height: 33px;
background: #1484EF;
background: #4154f1;
}
.MenuTitle{
font-size: 16px;
@ -290,10 +291,10 @@ form{
cursor: pointer;
}
span:hover{
color: #1484EF;
color: #4154f1;
.iconfont{
color: #1484EF !important;
color: #4154f1 !important;
}
}
}

View File

@ -218,7 +218,7 @@ class Infos extends Component {
const { username } = this.props.match.params;
const { user, isSpin, route_type , undo_events , menuKey , avatarVisible } = this.state;
return (
<div className="newMain clearfix">
<div className="newMain clearfix whiteMain">
{
avatarVisible &&
<Avatar
@ -244,11 +244,11 @@ class Infos extends Component {
}
</span>
</span>
{
{/* {
current_user && current_user.login && current_user.login === username ?
<span className="updateAvatar" onClick={()=>{this.setState({avatarVisible:true})}}>修改头像</span>
:""
}
} */}
</div>
<div className="text-center mt15 font-24 task-hide" title={user && user.username}>
{user && user.username}
@ -328,11 +328,11 @@ class Infos extends Component {
</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">
<Link to={`/${user && user.login}/organizes`}>
<i className="iconfont icon-zuzhi"></i>

View File

@ -54,3 +54,6 @@ a.text-button-grey{
}
.text-right{text-align: right;}
.bbt{border-bottom: 1px solid #e0e0e0;}
.whiteMain{
background-color: #fff;
}

View File

@ -33,7 +33,7 @@ function FourthSection({ fourth, history }) {
<h2 className="homePage-blue-tit">开源项目</h2>
<h4 className="homePage-subhead">开源项目版块集项目托管版本管理等功能于一体为开源协作和群智汇聚提供创作环境</h4>
<Line />
<Button className="homepage-btn" type="primary" onClick={()=>{history.push('/projects')}}>查看项目 <i className="iconfont icon-gengduoicon"></i></Button>
<Button className="homepage-btn" type="primary" onClick={()=>{history.push('/explore/all')}}>查看项目 <i className="iconfont icon-gengduoicon"></i></Button>
</div>
<div className={fourth ? "code-box clearfix activeCode" : "code-box clearfix"} >

View File

@ -84,7 +84,7 @@ export default props => {
const checkMenu = useMemo(() => {
return <Menu selectedKeys={current} onClick={handleClick}>
<Menu.Item><a target="_blank" rel="noopener noreferrer" href={`${main_web_site_url}/managements/enterprise_authentication`}>企业认证</a></Menu.Item>
<Menu.Item><a target="_blank" rel="noopener noreferrer" href={`${main_web_site_url}/admin/reviews/projects_list`}>开源项目</a></Menu.Item>
{/* <Menu.Item><a target="_blank" rel="noopener noreferrer" href={`${main_web_site_url}/admin/reviews/projects_list`}>开源项目</a></Menu.Item> */}
<Menu.Item key={"taskManage1"}><Link to="/task/taskManage/1">统筹任务发布审批</Link></Menu.Item>
<Menu.Item key={"taskManage0"}><Link to="/task/taskManage/0">自主任务发布审批</Link></Menu.Item>
<Menu.Item key={"paperManage"}><Link to="/task/paperManage">成果/评论审批</Link></Menu.Item>

View File

@ -221,7 +221,6 @@ export async function assignExperts(data){
//删除指派专家
export function deleteExperts(taskExpertId,isDelete) {
console.log('taskExpertId',taskExpertId,'isDelete',isDelete);
return fetch({
url: `/api/taskExpert/${taskExpertId}?isDelete=${isDelete}`,
method: 'delete'

View File

@ -310,7 +310,7 @@ function RegisterList({ showNotification }) {
showUploadList: true,
withCredentials: true,
headers: {
Authorization: cookie.load('autologin_forge_military') || sessionStorage.osredmToken,
Authorization: cookie.load('autologin_trustie') || sessionStorage.osredmToken,
},
};
@ -393,7 +393,7 @@ function RegisterList({ showNotification }) {
>
<button className="but41_fill">导入</button>
</Upload>
<p className="link" onClick={() => { window.open(httpUrl + '/busiAttachments/download/883') }}>专家注册表模板.xlsx</p>
<p className="link" onClick={() => { window.open(httpUrl + '/busiAttachments/download/134') }}>专家注册表模板.xlsx</p>
<p className='hint'>提示只能在导入模版上增减数据才能导入成功</p>
</Modal>
</div>)

View File

@ -222,12 +222,13 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
gradesTwo: '',
opsContent: item.works_remark,
opsFiles: item.work_file.id,
opsFilesAttachments: item.work_file,
opsFilesAttachments: new Array(item.work_file),
opsId: item.id,
opsParentId: containerId,
opsParentType: containerType,
opsType: containerType,
status: 2
status: 2,
competitionTeamName: item.name
});
}
}

View File

@ -3,8 +3,7 @@ import javaFetch from '../javaFetch';
let settings = localStorage.chromesetting && JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert : 'http://117.50.100.12:8066';
// http://117.50.100.12:8067/
let actionUrl = settings && settings.api_urls && settings.api_urls.expert ? settings.api_urls.expert : 'http://111.8.36.180:8094';
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;
export const main_web_site_url = settings && settings.main_web_site_url;

View File

@ -145,7 +145,9 @@ function GradesModal({ setVisible, visible, taskId, opsDetail, containerType })
>
<div className="opsDetail">
综合排名: {opsDetail && opsDetail.id}
<span className="ml30">应征者:&nbsp;&nbsp;</span> {opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)}
<span className="ml30">{containerType == 1 ? '应征者': '战队名称'}:&nbsp;&nbsp;</span>
{containerType == 1 && opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)}
{containerType == 2 && opsDetail && opsDetail.competitionTeamName}
<span className="ml30">平均得分:&nbsp;&nbsp;</span> {opsDetail && opsDetail.finalGrades || `--`}
<span className="ml30">是否胜出:&nbsp;&nbsp;</span> {opsDetail && opsDetail.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : '未胜出'}
</div>

View File

@ -38,11 +38,11 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
dataIndex: 'applicantInfo.nickname',
key: 'expertName',
render: (text, record) => {
return text === null ? record.applicantInfo.login : text
return containerType ==1 ? text === null ? record.applicantInfo.login : text : record.competitionTeamName || '--';
}
},
{
title: '平均得分',
title: '最终得分',
dataIndex: 'finalGrades',
key: 'phone',
},
@ -65,6 +65,8 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
return record.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : status == 4 ? <Checkbox onChange={(e)=>{changeIsWin(record.applicantInfo.id, e.target.checked)}}>胜出</Checkbox> : '未胜出';
}
});
}else{
columns[1].title = "战队名称";
}
useEffect(()=>{
@ -197,16 +199,17 @@ function ReviewResult({ history, match, mygetHelmetapi}) {
</p>
</div>
{status > 3 ? <React.Fragment>
<p className="font-16 font-w mb10">应征者排名</p>
<p className="font-16 font-w mb10">{containerType ==1 ? '应征者':'战队'}排名</p>
<PaginationTable
dataSource= {dataList}
columns= {columns}
scroll={{ y: 384 }}
/>
<div className="openResult">
{status == 4 && <button className={(containerType ==1 && winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
{/* 公示结果仅保留给创客使用 */}
{containerType == 1 && status == 4 && <button className={(containerType ==1 && winIds && taskModeId == 1 && winIds.length >1) || result === null ? 'disableBut': 'but41_fill'} onClick={openResult}>公示结果</button>}
</div>
</React.Fragment>:<div className="nodata font-20">暂无数据此任务暂未进入成果评选阶段</div>}
</React.Fragment>:<div className="nodata font-20">暂无数据此任务暂未进入{containerType ==1 ? '成果':'竞赛'}评选阶段</div>}
<Modal
title= "请确认公示范围"
visible= {openResultVisible}

View File

@ -187,11 +187,17 @@ function SelectExpert(props) {
};
expertList(params).then(data => {
if (data && Array.isArray(data.rows)) {
let index = 1;
for (const item of data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
if(data.rows.length === 0 && curPage > 1 && activeKey == 1){
//
setCurPage(curPage-1);
}else{
let index = 1;
for (const item of data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
}
}
}
setDataList(data && data.rows);
setLoading(false);
@ -210,13 +216,18 @@ function SelectExpert(props) {
}
selectExpertList(params).then(response=>{
if (response && response.data && Array.isArray(response.data.rows)) {
let index = 1;
for (const item of response.data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
if(response.data.rows.length === 0 && curPage > 1 && activeKey == 0){
//
setCurPage(curPage-1);
}else{
let index = 1;
for (const item of response.data.rows) {
item.reviewAreas = `${item.reviewAreaOne} ${item.reviewAreaTwo ? `${item.reviewAreaTwo}`:''} ${item.reviewAreaThree ? `${item.reviewAreaThree}`:''}`;
item.index = (index++) + (curPage > 1 ? (curPage - 1) * 10 : 0);
}
setSelectExperts(response && response.data.rows);
setSelectedExpertTotal(response && response.data.total);
}
setSelectExperts(response && response.data.rows);
setSelectedExpertTotal(response && response.data.total);
}
}).finally(()=>{
setLoading(false);

View File

@ -123,11 +123,11 @@
max-width: 500px;
}
.link {
color: #0089ff;
.link, .link:hover {
color: #4154f1;
cursor: pointer;
&:hover {
color: #509eff;
opacity: 0.8;
}
}

View File

@ -2,7 +2,7 @@ import { notification} from 'antd';
import axios from 'axios';
import cookie from 'react-cookies';
export const TokenKey = 'autologin_forge_military';
export const TokenKey = 'autologin_trustie';
export default function javaFetch(actionUrl){
if (window.location.href.indexOf('localhost') < 0) {
axios.defaults.withCredentials = true;
@ -17,11 +17,11 @@ export default function javaFetch(actionUrl){
// request拦截器
service.interceptors.request.use(config => {
if (cookie.load(TokenKey)) {
config.headers['Authorization'] = cookie.load(TokenKey); // 让每个请求携带自定义token 请根据实际情况自行修改
config.headers['Authorization'] = cookie.load(TokenKey) ||cookie.load('autologin_trustie'); // 让每个请求携带自定义token 请根据实际情况自行修改
}
if (window.location.port === "3007") {
// 模拟token为登录用户
const osredmToken = sessionStorage.osredmToken;
const osredmToken = cookie.load(TokenKey) ||cookie.load('autologin_trustie')||sessionStorage.osredmToken;
if (config.url.indexOf('?') === -1) {
config.url = `${config.url}?token=${osredmToken}`;
} else {

View File

@ -41,9 +41,16 @@
justify-content: space-between;
padding: .3rem 2rem 1.5rem;
margin: 0px -1.25rem;
// border: 1px solid;
border-bottom: 1px solid #E0E0E0;
// background: #f5f5f5;
.ant-input:hover{
border-color: #4154f1;
}
.ant-btn-primary{
background-color: #4154f1;
&:hover{
opacity: 0.8;
}
}
}
.notice-center-content{
@ -66,7 +73,7 @@
}
i{
margin-right: .25em;
color: #1890FF;
color: #4154f1;
}
}
}
@ -91,10 +98,10 @@
color: #333;
cursor: pointer;
&:hover{
color: #1890FF;
color: #4154f1;
}
&.active{
color: #1890FF;
color: #4154f1;
}
}
}
@ -108,6 +115,9 @@
margin-right: 20px;
width: 20.8em;
caret-color: rgba(0, 0, 0, 0);
.menu-ul:last-child{
margin-top: 12px;
}
}
.none_p_title{
@ -135,9 +145,9 @@
}
span:hover{
color: #1484EF;
color: #4154f1;
.iconfont{
color: #1484EF !important;
color: #4154f1 !important;
}
}
}
@ -174,7 +184,7 @@
width: 6px;
content: '';
height: 30px;
background: #1484EF;
background: #4154f1;
}
}
@ -185,4 +195,21 @@
.ant-input-group-addon .ant-btn-lg {
height: 40px;
}
.edu-txt-center .ant-pagination {
margin: 2rem auto;
text-align: center;
.ant-pagination-item:focus, .ant-pagination-item:hover, .ant-pagination-item-active, .ant-pagination-prev:hover a, .ant-pagination-next:hover a, .ant-pagination-options-quick-jumper input:focus, .ant-pagination-options-quick-jumper input:hover{
border-color: #4154f1;
}
.ant-pagination-disabled{
& a, & :hover a, & :focus a, & .ant-pagination-item-link, &:hover .ant-pagination-item-link , &:focus .ant-pagination-item-link {
color: rgba(0, 0, 0, 0.25) !important;
border-color: #d9d9d9;
}
}
.ant-pagination-item-active a{
color: #4154f1
}
}

View File

@ -42,9 +42,9 @@ export default (props) => {
</div>
<div className="list-other">
<span className="user-box mr30" onClick={() => { goUser(item.user.login) }}>
<img alt="" className="head-log-small" src={getImageUrl(item.user.logo)} />
<span>{item.user.nickname || item.user.login}</span>
<span className="user-box mr30" onClick={() => { goUser(item.user && item.user.login) }}>
<img alt="" className="head-log-small" src={getImageUrl(item.user && item.user.logo)} />
<span>{(item.user && item.user.nickname) || (item.user && item.user.login)}</span>
</span>
<span className="font-14 mr30"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.visits || 0}</span>
<span className="font-14 mr30"><Icon type="user" /><span className="color-orange">{item.papersCount || 0}</span>人参与</span>

View File

@ -4,7 +4,7 @@ import javaFetch from '../javaFetch';
let settings=localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.api_urls? settings.api_urls.task :'https://task.osredm.com';
// let actionUrl = 'http://117.50.100.12:8066'
// let actionUrl = 'http://111.8.36.180:8094'
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;

View File

@ -90,6 +90,15 @@ span.list-gray {
.center-content .ant-pagination {
margin: 2rem auto;
text-align: center;
.ant-pagination-item:focus, .ant-pagination-item:hover, .ant-pagination-item-active, .ant-pagination-prev:hover a, .ant-pagination-next:hover a, .ant-pagination-options-quick-jumper input:focus, .ant-pagination-options-quick-jumper input:hover{
border-color: #4154f1;
}
.ant-pagination-disabled{
& a, & :hover a, & :focus a, & .ant-pagination-item-link, &:hover .ant-pagination-item-link , &:focus .ant-pagination-item-link {
color: rgba(0, 0, 0, 0.25) !important;
border-color: #d9d9d9;
}
}
}
.text-ellipsis {
@ -105,3 +114,18 @@ span.list-gray {
max-width: 80%;
}
}
.demand_submission,.demand_submission:focus,.failByPression .ant-modal-body .ant-btn-primary{
background-color: #4154f1;
border: none;
&:hover{
background-color: #4154f1;
opacity: 0.8;
}
}
.center-right-but .ant-input:hover, .center-content .ant-pagination-prev:hover{
border-color: #4154f1 !important;
}
.failByPression .ant-modal-body .anticon, .center-right-but .ant-input-search-icon:hover, .center-content .ant-pagination-item-active a{
color: #4154f1;
}

View File

@ -28,7 +28,8 @@ for (const item of applyStatusAllArr) {
export default Form.create()(
forwardRef(({ match, current_user, form, history, showNotification }, ref) => {
forwardRef((props, ref) => {
const { match, current_user, form, history, showNotification, mygetHelmetapi } = props;
const id = match.params.taskId;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
@ -363,7 +364,7 @@ export default Form.create()(
}
function goUserProfiles() {
window.open(`/users/${current_user.login}/profiles`);
window.open(mygetHelmetapi && mygetHelmetapi.main_web_site_url+`/users/${current_user.login}/profiles`);
}
function backPublicEnd(makePublicAt, makePublicDays) {
@ -470,7 +471,7 @@ export default Form.create()(
</div>
{!current_user.enterpriseCertification && <div className="edu-back-white padding30 mt20 font-16 text-center mb50">
<a onClick={goUserProfiles} className="color-blue_4C">请先完善主体信息</a>
<a onClick={goUserProfiles} className="color-blue_41">请先完善主体信息</a>
</div>}
{current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}

View File

@ -21,7 +21,7 @@
background: #f1f8ff;
border-radius: 4px;
float: left;
color: #459be6;
color: #4154f1;
height: 1.25rem;
line-height: 1.25rem;
}
@ -61,7 +61,7 @@
}
.tasks_status li.active {
background: #4cacff;
background: #4154f1;
color: #fff;
}
@ -92,7 +92,7 @@
}
.tasks_status li.active:after {
border-color: transparent transparent #4cacff transparent;
border-color: transparent transparent #4154f1 transparent;
transform: rotate(90deg);
}
@ -167,4 +167,8 @@
li.except-close{
background: #fa6400;
color: #fff;
}
.color-blue_41{
color: #4154f1;
}

View File

@ -163,7 +163,8 @@ export default ({ history, current_user, showLoginDialog, location }) => {
});
} else {
Modal.info({
content: '您没有权限需求提报'
content: '您没有权限需求提报',
className:'failByPression'
});
}
}
@ -227,7 +228,7 @@ export default ({ history, current_user, showLoginDialog, location }) => {
onSearch={(value) => { setSearchInput(value); setCurPage(1); }}
/>
<Button className="mr20 font-12" type="primary" onClick={goAdd}><i className="iconfont icon-zaibianji font-12 mr3"></i>需求提报</Button>
<Button className="mr20 font-12 demand_submission" type="primary" onClick={goAdd}><i className="iconfont icon-zaibianji font-12 mr3"></i>需求提报</Button>
</div>
</div>

View File

@ -52,7 +52,7 @@ export default Form.create()(({ form, showNotification, match, history }) => {
}
setLoading(false);
})
}, [reload, statusString, curPage, searchObj]);
}, [reload, statusString, curPage, searchObj ,publishMode]);
const helper = useCallback(

View File

@ -580,7 +580,7 @@ span.CodeMirror-selectedtext {
body #root {
background: #fff;
background: #f5f5f5;
}
.newedu-class-leftnav {
@ -1531,7 +1531,7 @@ samp {
}
.ant-input-search-icon:hover {
color: #4CACFF !important;
/* color: #4CACFF !important; */
}
.coursehomework:hover .activity-title {

View File

@ -463,6 +463,9 @@ class LoginDialog extends Component {
if (isRender === undefined) {
isRender = false
}
const main_web_site_url =localStorage.chromesetting && JSON.parse(localStorage.chromesetting).main_web_site_url;
return (
<Dialog open={true} id="DialogID"
className="zindextest"
@ -518,7 +521,7 @@ class LoginDialog extends Component {
}
value={this.state.loginValue}
name="username"
placeholder="请输入邮箱地址/用户名" ></input>
placeholder="请输入有效的手机号/邮箱号" ></input>
<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>
@ -562,9 +565,9 @@ class LoginDialog extends Component {
<label htmlFor="p_autolog" style={{ top: '0px' }}>下次自动登录</label>
</span>
<span className="fr">
<a href="/resetPassword" className="mr3 color-grey-9">找回密码</a>
<em className="vertical-line"></em>
<a href="/register" className="color-grey-9">注册</a>
<a onClick={(url) => this.getloginurl(`${main_web_site_url}/account/lost_password`)}
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
<a onClick={(url) => this.getloginurl(`${main_web_site_url}/user_join`)} className="color-grey-9">注册</a>
</span>
</p>
{

View File

@ -24,11 +24,12 @@ class NewFooter extends Component {
render() {
const {forge_footer} = this.state;
return (
<div className="newFooter edu-txt-center ">
{
forge_footer && this.showhtml(forge_footer)
}
</div>
// <div className="newFooter edu-txt-center ">
// {
// forge_footer && this.showhtml(forge_footer)
// }
// </div>
this.showhtml(forge_footer)
);
}
}

View File

@ -4,7 +4,7 @@ import AccountProfile from "../user/AccountProfile";
import { getImageUrl,getLogoImageUrl } from 'educoder';
import { getUserInfo } from 'src/military/expert/api';
import axios from 'axios';
import { Modal, Input, message, notification, Button } from 'antd';
import { Modal, Input, message, notification, Button, Popover, Badge } from 'antd';
import LoginDialog from '../login/LoginDialog';
import GotoQQgroup from '../../modal/GotoQQgroup'
@ -16,6 +16,7 @@ import './TPMIndex.css';
import './css/headerExcess.css';
import logo from './images/hskylogo.png';
import AddProjectModal from '../../forge/Head/AddProjectModal';
import NoticeContent from 'src/forge/Head/NoticeContent';
const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用
@ -50,11 +51,11 @@ class NewHeader extends Component {
mydisplay: false,
headtypesonClickbool: false,
headtypess: "/",
mygetHelmetapi2: null,
settings: null,
goshowqqgtounp: false,
visiblemyss: false,
isExpert: false,
visible:false, //浮动消息框展示控制
}
}
componentDidMount() {
@ -590,6 +591,9 @@ class NewHeader extends Component {
}
}
handleVisibleChange = visible => {
this.setState({ visible });
};
// 处理弹框
setgoshowqqgtounp = (bool) => {
@ -598,7 +602,7 @@ class NewHeader extends Component {
})
}
render() {
const { match,current_user } = this.props;
const { resetUserInfo , showNotification, match, current_user } = this.props;
let { Addcoursestypes,
tojoinitemtype,
@ -615,7 +619,7 @@ class NewHeader extends Component {
headtypess,
settings,
goshowqqgtounp,
mygetHelmetapi2,
visible,
} = this.state;
let activeIndex =match.path === '/'?true: '';
let headtypes = '/';
@ -741,7 +745,7 @@ class NewHeader extends Component {
</div>
}
{this.props.user && this.props.user.login &&
<div className="edu-menu-panel">
<div className="edu-menu-panel mr5">
<i className={`iconfont icon-tianjiafangda ${activeIndex?'color-home':'color-grey-6'} `}></i>
<div className="edu-menu-list" style={{ top: '48px' }}>
<div className="overPart"></div>
@ -751,7 +755,7 @@ class NewHeader extends Component {
{
settings && settings.add && settings.add.map((item,key)=>{
return(
<li><a href={item.url}>{item.name}</a></li>
<li key={key}><a href={item.url}>{item.name}</a></li>
)
})
}
@ -763,16 +767,23 @@ class NewHeader extends Component {
</div>
</div>
}
{this.props.user && this.props.user.login &&
<div className="ml30 edu-menu-panel">
{user && user.login &&
<a href={`${settings && settings.new_course && settings.new_course.tiding_url}`} style={{ position: 'relative' }} target="_blank">
<i className={`iconfont icon-xiaoxilingdang ${activeIndex?'color-home':'color-grey-6'}`}></i>
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
</span>
</a>
}
</div>
{ (settings && settings.common && settings.common.notice) && (current_user && current_user.login)?
<Popover
overlayClassName="notice-popover"
placement={`bottomRight`}
content={<NoticeContent visible={visible} current_user={current_user} showNotification={showNotification} resetUserInfo={resetUserInfo}/>}
visible={visible}
onVisibleChange={this.handleVisibleChange}
destroyTooltipOnHide
>
<Link to={"/settings/notice"} className="message-icon mt3">
{current_user && <Badge count={current_user.message_unread_total}>
{/* <img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/> */}
<i className={`iconfont icon-xiaoxilingdang ml20 ${activeIndex?'color-home':'color-grey-6'}`}></i>
</Badge>}
</Link>
</Popover>
: ""
}
<Modal
keyboard={false}
@ -805,20 +816,20 @@ class NewHeader extends Component {
<span className="login-box">
<a onClick={() => this.educoderlogin()} className={`mr5 ${activeIndex ? 'color-home' : 'color-grey-6'}`}>登录</a>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url && (
settings && settings.new_course && settings.new_course.register_url && (
activeIndex ?
<Button className="register-button" type="primary" size="large" ><a href={`${mygetHelmetapi2.new_course.register_url}`}>免费注册</a></Button> :
<span><em className="vertical-line"></em><a className={`ml5 ${activeIndex ? 'color-home' : 'color-grey-6'}`} href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
<Button className="register-button" type="primary" size="large" ><a href={`${settings.new_course.register_url}`}>免费注册</a></Button> :
<span><em className="vertical-line"></em><a className={`ml5 ${activeIndex ? 'color-home' : 'color-grey-6'}`} href={`${settings.new_course.register_url}`} target="_blank"></a></span>
)
}
</span>
:
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
<a href={`/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>
{/* <a href={`/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}> */}
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
src={getImageUrl(`/` + user.image_url)} width="34">
src={getImageUrl(user.image_url)} width="34">
</img>
</a>
{/* </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>
{

View File

@ -32,7 +32,7 @@ body>.-task-title {
position: fixed;
background: #fff;
color: #333;
box-shadow: 0 0 12px rgb(0 ,0 ,0,10%);
/* box-shadow: 0 0 12px rgb(0 ,0 ,0,10%); */
}
.newHeaders.publicNav{
position: absolute;
@ -42,7 +42,6 @@ body>.-task-title {
width:100%;
padding:0px 70px;
margin:0px auto;
padding:0px 30px;
display: flex;
align-items: center;
height: 100%;
@ -103,7 +102,7 @@ body>.-task-title {
}
.newContainer {
background: #fff;
background: #fafafa;
}
.ant-modal-title {

View File

@ -301,7 +301,7 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
{...this.state}
/> : ""}
{/* <Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header> */}
<NewHeader {...this.state} {...this.props}></NewHeader>
<NewHeader {...this.state} {...this.props} {...common}></NewHeader>
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
size="large" tip={this._gLoadingTip || "加载中..."}
>