修改合并后的issue

This commit is contained in:
何童崇 2022-03-03 09:10:38 +08:00
commit 8159325806
21 changed files with 82 additions and 103 deletions

View File

@ -1,15 +1,30 @@
import { queryString } from 'educoder'
import { queryString } from "educoder";
export function updatePageParams(pageNum, props) {
const url = props.match.url
const _search = props.location.search;
let parsed = {};
if (_search) {
parsed = queryString.parse(_search);
}
const url = props.match.url;
// 修改page參數
parsed.page = pageNum
const _search = props.location.search;
let parsed = {};
if (_search) {
parsed = queryString.parse(_search);
}
props.history.push(`${url}?${queryString.stringify(parsed)}`)
// 修改page參數
parsed.page = pageNum;
props.history.push(`${url}?${queryString.stringify(parsed)}`);
}
export function goUser(login) {
const main_web_site_url =
localStorage.chromesetting &&
JSON.parse(localStorage.chromesetting).main_web_site_url;
window.location.href = `${main_web_site_url}/accounts/${login}`;
// window.location.href = `/${login}`;
}
export function goUserMes(login) {
const main_web_site_url =
localStorage.chromesetting &&
JSON.parse(localStorage.chromesetting).main_web_site_url;
window.location.href = `${main_web_site_url}/accounts/${login}`;
}

View File

@ -20,7 +20,7 @@ export {
, broadcastChannelPostMessage, broadcastChannelOnmessage
} from './EventUtil';
export { updatePageParams as updatePageParams } from './RouterUtil';
export { updatePageParams as updatePageParams ,goUserMes,goUser} from './RouterUtil';
export { bytesToSize as bytesToSize } from './UnitUtil';

View File

@ -260,11 +260,11 @@ function New({ form , match , showNotification , history }) {
</span> */}
<span>
<Checkbox value="create">创建</Checkbox>
<span>创建分支或标记</span>
<span>删除分支或标签</span>
</span>
<span>
<Checkbox value="delete">删除</Checkbox>
<span>删除分支或标</span>
<span>删除分支或标</span>
</span>
</div>
<p className="color-grey-3 mt10 mb10">合并请求事件</p>

View File

@ -121,7 +121,7 @@ function Index(props) {
}
}).then(result=>{
if(result && result.data){
setCloudData({categories:[]});
setCloudData(result.data || []);
}
}).catch(error=>{})
}
@ -202,7 +202,7 @@ function Index(props) {
<div className="echartBox">
<p>展示你擅长关注感兴趣的专业范围通过你参与项目收藏项目关注项目复刻项目等数据来统计</p>
{
cloudData && cloudData.length >0?
cloudData && cloudData.categories && cloudData.categories.length >0 ?
<Cloud data={cloudData}/>
:
<Nodata _html="暂无数据" small={true}/>

View File

@ -112,7 +112,7 @@
&.newHeaders {
// background-color: #1a2358;
background-color: #0037af;
z-index: 1000000;
z-index: 1000;
}
.newFooter{
background: inherit;

View File

@ -10,6 +10,8 @@ export default props => {
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 noticeUrl =localStorage.chromesetting&& JSON.parse(localStorage.chromesetting).api_urls.notice;
const [current,setCurrent]=useState(JSON.parse(sessionStorage.adminRouter||'[]'));
const [title,setTitle]=useState('');
@ -68,10 +70,8 @@ export default props => {
return <Menu >
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/managements/messages_list`}>帖子</a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/managements/apply_destroy_memos`}>申请删帖</a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/managements/memo_reply_list`}></a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/managements/memo_reply_list`}></a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/admin/forum_sections`}>版块配置</a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/admin/banned_users`}>禁言列表</a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/admin/forum_applies`}>版主审批</a></Menu.Item>
</Menu>
});
@ -79,7 +79,6 @@ export default props => {
const checkMenu = useMemo(() => {
return <Menu selectedKeys={current} onClick={handleClick}>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/managements/enterprise_authentication`}>企业认证</a></Menu.Item>
<Menu.Item><a rel="noopener noreferrer" href={`${main_web_site_url}/admin/reviews/projects_list`}>开源项目</a></Menu.Item>
<Menu.Item title="approver" key={"taskManage1"}><Link to="/managements/task/taskManage/1">统筹任务发布审批</Link></Menu.Item>
<Menu.Item title="approver" key={"taskManage0"}><Link to="/managements/task/taskManage/0">自主任务发布审批</Link></Menu.Item>
<Menu.Item title="approver" key={"paperManage"}><Link to="/managements/task/paperManage">成果/评论审批</Link></Menu.Item>
@ -108,7 +107,12 @@ export default props => {
</Menu>
});
console.log(title);
const noticeMenu = useMemo(() => {
return <Menu>
<Menu.Item><a rel="noopener noreferrer" href={`${noticeUrl}/admin/index#/`}>招标公告</a></Menu.Item>
</Menu>
});
return (
<div className="centerbox managements_menus clearfix">
<Dropdown key={'projectMenu'} overlay={projectMenu} placement="bottomLeft">
@ -143,8 +147,12 @@ export default props => {
<div className="drop-div">权限管理</div>
</Dropdown>
<Dropdown key={'configMenu'} overlay={configMenu} placement="bottomLeft">
{/* <Dropdown key={'configMenu'} overlay={configMenu} placement="bottomLeft">
<div className="drop-div">网站配置</div>
</Dropdown> */}
<Dropdown key={'notice'} overlay={noticeMenu} placement="bottomLeft">
<div className="drop-div">招标公告</div>
</Dropdown>
</div>
)

View File

@ -95,16 +95,13 @@ function Competition(props){
}
},
{
title: "开始时间",
title: "比赛时间",
dataIndex: "start_time",
key: "startTime",
align: "center",
},
{
title: "截止时间",
dataIndex: "end_time",
key: "endTime",
key: "time",
align: "center",
render:(text, record)=>{
return text +' ~ '+ record.end_time;
}
},
{
title: "报名人数",

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/134') }}>专家注册表模板.xlsx</p>
<p className="link" onClick={() => { window.open(`${httpUrl}/busiAttachments/download/${window.location.host.indexOf('osredm') === -1 ? '171' : '137'}`) }}>专家注册表模板.xlsx</p>
<p className='hint'>提示只能在导入模版上增减数据才能导入成功</p>
</Modal>
</div>)

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;

View File

@ -3,7 +3,7 @@ import { Pagination, Modal, Input, Form, } from 'antd';
import { Link } from "react-router-dom";
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import { timeAgo, getImageUrl } from 'educoder';
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
import { adminCheckAgreement } from '../../api';
import { httpUrl } from '../../fetch';
import './index.scss';
@ -67,14 +67,6 @@ export default Form.create()((props) => {
});
}
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
function downFile(item) {
let url = httpUrl + '/busiAttachments/download/' + item.id;
window.open(url);

View File

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import moment from 'moment';
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import { getImageUrl, formatDuring } from 'educoder';
import { getImageUrl, formatDuring,goUser,goUserMes } from 'educoder';
import { taskStatusAllArr } from '../../static';
import { delayTask, closeTask } from '../../api';
import './index.scss';
@ -70,14 +70,6 @@ export default Form.create()((props) => {
});
}
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
const helper = useCallback(
(label, name, rules, widget, initialValue) => (
<Form.Item label={label}>

View File

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import Upload from 'military/components/Upload';
import { timeAgo, getImageUrl } from 'educoder';
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
import { uploadPayProof } from '../../api';
import './index.scss';
@ -16,16 +16,6 @@ export default Form.create()((props) => {
const [fileList, setFileList] = useState(null);
const pageSize = props.pageSize || 10;
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
//
function uploadFunc(fileList, files) {
setFileList(fileList);

View File

@ -3,7 +3,7 @@ import { Pagination, Modal, Input } from 'antd';
import { Link } from "react-router-dom";
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import { timeAgo, getImageUrl } from 'educoder';
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
import { checkProof } from '../../api';
import { httpUrl } from '../../fetch';
import './index.scss';
@ -60,13 +60,6 @@ export default (props) => {
});
}
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
function downFile(item) {
let url = httpUrl + '/busiAttachments/download/' + item.id;

View File

@ -3,7 +3,7 @@ import { Pagination, Modal, Input, Radio, Form, InputNumber } from 'antd';
import { Link } from "react-router-dom";
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import { timeAgo, getImageUrl } from 'educoder';
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
import { checkPublicity } from '../../api';
import { httpUrl } from '../../fetch';
import './index.scss';
@ -49,14 +49,6 @@ export default Form.create()((props) => {
}
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
function downFile(item) {
let url = httpUrl + '/busiAttachments/download/' + item.id;
window.open(url);

View File

@ -3,7 +3,7 @@ import { Pagination, Modal, Input, Radio, Button } from 'antd';
import { Link } from "react-router-dom";
import Nodata from 'forge/Nodata';
import Loading from "src/Loading";
import { timeAgo, getImageUrl } from 'educoder';
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
import { main_web_site_url } from '../../static';
import { checkTask } from '../../api';
import './index.scss';
@ -61,14 +61,6 @@ export default (props) => {
});
}
function goUser(login) {
window.location.href = `/users/${login}`;
}
function goUserMes(login) {
window.location.href = `/users/${login}/message_detail`;
}
function scale(scale) {
if (scale > 10000) {
return '10000人以上';

View File

@ -128,4 +128,14 @@ span.list-gray {
}
.failByPression .ant-modal-body .anticon, .center-right-but .ant-input-search-icon:hover, .center-content .ant-pagination-item-active a{
color: #4154f1;
}
.go_profiles .ant-modal-body{
text-align: center;
.anticon{
color: #4154f1;
margin-left: 30px;
}
.ant-modal-confirm-btns{
float: none;
}
}

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,8 +364,7 @@ export default Form.create()(
}
function goUserProfiles() {
const main_web_site_url =localStorage.chromesetting&& JSON.parse(localStorage.chromesetting).main_web_site_url;
window.open(`${main_web_site_url}/users/${current_user.login}/profiles`);
window.open(mygetHelmetapi && mygetHelmetapi.main_web_site_url+`/users/${current_user.login}/profiles`);
}
function backPublicEnd(makePublicAt, makePublicDays) {

View File

@ -11,7 +11,7 @@ import '../index.scss';
const Search = Input.Search;
export default ({ history, current_user, showLoginDialog, location }) => {
export default ({ history, current_user, showLoginDialog, location, mygetHelmetapi }) => {
// console.log(current_user);
let initType = getUrlToken('type', location.search) || '';
@ -147,7 +147,7 @@ export default ({ history, current_user, showLoginDialog, location }) => {
if (res) {
if (res.message === 'success') {
history.push("/task/taskAdd");
} else if (res.message === '主体信息未认证') {
} else if (res.message === '进行实体认证') {
Modal.info({
title: '因为以下原因,您暂时不能进行本操作',
content: <div className="mt10">
@ -157,9 +157,10 @@ export default ({ history, current_user, showLoginDialog, location }) => {
</div>
</div>,
onOk: () => {
window.location.href = `/users/${current_user.login}/profiles`;
window.location.href = mygetHelmetapi && mygetHelmetapi.main_web_site_url + `/users/${current_user.login}/profiles`;
},
okText: '立即完善',
className: 'go_profiles'
});
} else {
Modal.info({

View File

@ -1,9 +1,7 @@
import React, { Component } from 'react';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { SnackbarHOC, getImageUrl } from 'educoder';
import Loading from "../../Loading";
import Loading from '../../Loading';
class http500 extends Component {
constructor(props) {
super(props);

View File

@ -128,7 +128,7 @@ class NewHeader extends Component {
}
onLogout = () => {
const url = `/accounts/logout.json`
this.delCookie("autologin_forge_military")
this.delCookie("autologin_trustie")
axios.get(url, {
}).then((response) => {
if (response.data.status === 1) {
@ -744,8 +744,7 @@ class NewHeader extends Component {
var wl = waiLian && waiLian.length>0;
return (
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
<a href={new_link} >{item.name}</a>
{/* target={wl ? "_self":"_blank"} */}
<a href={new_link}>{item.name}</a>
</li>
)
})
@ -853,7 +852,7 @@ class NewHeader extends Component {
{
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
return(
<li key={key}><a href={item.url} target="_blank">{item.name}</a></li>
<li key={key}><a href={item.url}>{item.name}</a></li>
)
})
}

View File

@ -119,7 +119,7 @@ class NewHeader extends Component {
};
onLogout = () => {
const url = `/accounts/logout.json`;
this.delCookie("autologin_forge_military");
this.delCookie("autologin_trustie");
axios.get(url, {}).then((response) => {
if (response.data.status === 1) {
this.setState({