使用手册

This commit is contained in:
caishi 2020-07-17 17:36:36 +08:00
parent 529184f6a5
commit 72bb222e95
10 changed files with 130 additions and 122 deletions

View File

@ -88,4 +88,35 @@ li.ant-menu-item{
background:#F73030;
color:#FCEEEE ;
}
}
.handleBox{
position: fixed;
top:45%;
right:240px;
z-index: 10000;
}
@media screen and (max-width: 1800px){
.handleBox{
right:190px;
}
}
@media screen and (max-width: 1700px){
.handleBox{
right:140px;
}
}
@media screen and (max-width: 1600px){
.handleBox{
right:90px;
}
}
@media screen and (max-width: 1450px){
.handleBox{
right:10px;
}
}
@media screen and (max-width: 1380px){
.handleBox{
right:0px;
}
}

View File

@ -0,0 +1,13 @@
import React from 'react';
import Handbook from '../Images/handbook.png';
import './Component.scss';
export default (()=>{
return(
<div className="handleBox">
<a href="https://www.trustie.net/forums/82/memos/3075" target="_blank" >
<img src={Handbook} alt=""/>
</a>
</div>
)
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -6,7 +6,7 @@ import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
import Handbook from './Component/Handbook';
import "./css/index.scss";
import Loadable from "react-loadable";
@ -37,6 +37,7 @@ class Index extends Component {
render() {
return (
<div className="newMain clearfix">
<Handbook />
<Switch {...this.props}>
<Route
path="/projects/:projectsType/new"

View File

@ -54,7 +54,7 @@ class OrderItem extends Component {
{current_user && current_user.login && checkbox}
<div className="flex-1">
<p className="mb15 df" style={{alignItems:"center"}}>
<Link to={`/projects/${projectsId}/orders/${item.id}/detail`} target="_blank" className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
<Link to={`/projects/${projectsId}/orders/${item.id}/detail`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
{TagInfo(item.priority,"mr10")}
</p>
<p className="color-grey-6 font-12">

View File

@ -193,7 +193,7 @@
text-align: center;
cursor: pointer;
color: #666;
width: 90px;
width: 86px;
text-align: center;
display: inline-block;
overflow: hidden;

View File

@ -1,5 +1,6 @@
import React, { Component } from "react";
import { Input, Dropdown, Menu, Icon, Pagination, Spin, DatePicker, Checkbox } from "antd";
import { Link } from 'react-router-dom';
import "./order.css";
import './index.scss';
import moment from 'moment';
@ -336,12 +337,22 @@ class order extends Component {
};
islogin() {
this.props.showLoginDialog();
}
renderNew =()=>{
const { projectsId } = this.props.match.params;
if (this.props.checkIfLogin() === false) {
this.props.showLoginDialog();
return;
} else {
this.props.history.push(`/projects/${projectsId}/orders/new`);
if (this.props.checkIfLogin()) {
return(
<Link className="topWrapper_btn ml10" target="_blank" to={`/projects/${projectsId}/orders/new`}>
+&nbsp;创建任务
</Link>
)
}else{
return(
<a className="topWrapper_btn ml10" onClick={this.islogin}>
+&nbsp;创建任务
</a>
)
}
}
@ -530,9 +541,7 @@ class order extends Component {
onClick={() => this.openorder("2")}>{data && data.close_count}</span>
</li>
</ul>
<a className="topWrapper_btn ml10" onClick={() => this.islogin()}>
+&nbsp;创建任务
</a>
{this.renderNew()}
</div>
<div className="topWrapper">
<div className="target-detail-search">

View File

@ -189,9 +189,9 @@ class order_form extends Component {
issue_type: issue_type,
})
.then((result) => {
if (result) {
if (result && result.data.id) {
this.props.showNotification("任务创建成功!");
this.props.history.push(`/projects/${projectsId}/orders`);
this.props.history.push(`/projects/${projectsId}/orders/${result.data.id}/detail`);
this.setState({
description: "",
isSpin: false,

View File

@ -6,6 +6,7 @@ import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
import Handbook from '../Component/Handbook';
const Infos = Loadable({
loader: () => import("./Infos"),
loading: Loading,
@ -13,14 +14,17 @@ const Infos = Loadable({
export default withRouter(
(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
return(
<Switch>
<Route
path="/users/:username"
render={() => (
<Infos {...props} />
)}
></Route>
</Switch>
<div>
<Handbook />
<Switch>
<Route
path="/users/:username"
render={() => (
<Infos {...props} />
)}
></Route>
</Switch>
</div>
)
}))))
)

View File

@ -57,7 +57,6 @@ class NewHeader extends Component {
componentDidMount() {
this.getAppdata();
window._header_componentHandler = this;
//下拉框的显示隐藏
var hoverTimeout;
var hoveredPanel;
@ -79,13 +78,10 @@ class NewHeader extends Component {
}, 800)
});
//获取游览器地址
try {
window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href))
} catch (e) {
}
} catch (e) {}
}
openNotification = (messge) => {
@ -125,16 +121,15 @@ class NewHeader extends Component {
const url = `/accounts/logout.json`
this.delCookie("autologin_trustie")
axios.get(url, {
})
.then((response) => {
if (response.data.status === 1) {
this.setState({
user: undefined
})
window.location.href = "/login"
message.success('退出成功');
}
});
}).then((response) => {
if (response.data.status === 1) {
this.setState({
user: undefined
})
window.location.href = "/login"
message.success('退出成功');
}
});
}
tojoinclass = () => {
@ -151,14 +146,12 @@ class NewHeader extends Component {
})
return;
}
if (user && user.profile_completed === false) {
this.setState({
AccountProfiletype: true
})
return;
}
this.setState({
Addcoursestypes: true,
})
@ -345,7 +338,7 @@ class NewHeader extends Component {
let pamst = [];
let num = 0;
for (var i = 0; i < newrolearr.length; i++) {
if (newrolearr[i] != "") {
if (newrolearr[i] !== "") {
pamst.push(newrolearr[i])
} else {
num = num + 1
@ -416,7 +409,6 @@ class NewHeader extends Component {
this.setState({
showSearchOpentype: true
})
}
hideshowSearchOpen = (e) => {
@ -426,7 +418,6 @@ class NewHeader extends Component {
showSearchOpentype: false,
setevaluatinghides: false
})
}
}
@ -436,19 +427,15 @@ class NewHeader extends Component {
}
onKeywordSearchKeyDowns = () => {
this.setState(
{
setevaluatinghides: false
}
)
this.setState({
setevaluatinghides: false
})
}
setevaluatinghides = () => {
this.setState(
{
setevaluatinghides: true
}
)
this.setState({
setevaluatinghides: true
})
}
//头部获取是否已经登录了
getUser = (url, type) => {
@ -538,15 +525,12 @@ class NewHeader extends Component {
document.head.appendChild(link);
}
handleVisibleChanges = (boll) => {
this.setState({
visiblemyss: boll,
})
}
getAppdata = () => {
try {
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
@ -583,19 +567,12 @@ class NewHeader extends Component {
} catch (e) {
this.gettablogourlnull();
}
} else {
this.gettablogourlnull();
}
} else {
this.gettablogourlnull();
}
}).catch((error) => {
this.gettablogourlnull();
@ -683,7 +660,6 @@ class NewHeader extends Component {
}
let headtypes = '/';
if (mygetHelmetapi2) {
if (mygetHelmetapi2.navbar) {
if (mygetHelmetapi2.navbar.length > 0) {
@ -747,78 +723,52 @@ class NewHeader extends Component {
{...this.props}
{...this.state}
/> : ""}
{
goshowqqgtounp === true ?
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool) => this.setgoshowqqgtounp(bool)}></GotoQQgroup>
:
""
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool) => this.setgoshowqqgtounp(bool)}></GotoQQgroup>
:
""
}
<a href={"/"} onClick={() => this.headtypesonClick("/", false)} className={"fl mr30"}>
{
mygetHelmetapi2 && mygetHelmetapi2.nav_logo_url && mygetHelmetapi2.nav_logo_url ?
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(mygetHelmetapi2.nav_logo_url)}></img>
:
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(mygetHelmetapi2.nav_logo_url)}></img>
:
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
}
</a>
{
mygetHelmetapi2 && mygetHelmetapi2.navbar && mygetHelmetapi2.navbar.length > 0 ?
<div className="head-nav pr" id={"head-navpre1"}>
<ul id="header-nav">
{
mygetHelmetapi2.navbar && mygetHelmetapi2.navbar.map((item, key) => {
var new_link = item.link;
var user_login = this.props.user && this.props.user.login;
var is_hidden = item.hidden
<div className="head-nav pr" id={"head-navpre1"}>
<ul id="header-nav">
{
mygetHelmetapi2.navbar && mygetHelmetapi2.navbar.map((item, key) => {
var new_link = item.link;
var user_login = this.props.user && this.props.user.login;
var is_hidden = item.hidden
if (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1) {
if (user_login) {
if (new_link.indexOf("courses") > -1) {
new_link = new_link.replace(/courses/g, "users/" + user_login + "/courses")
} else if (new_link.indexOf("contests") > -1) {
new_link = new_link.replace(/contests/g, "users/" + user_login + "/contests")
}
} else {
is_hidden = true
if (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1) {
if (user_login) {
if (new_link.indexOf("courses") > -1) {
new_link = new_link.replace(/courses/g, "users/" + user_login + "/courses")
} else if (new_link.indexOf("contests") > -1) {
new_link = new_link.replace(/contests/g, "users/" + user_login + "/contests")
}
}
// var str = new RegExp("projects");
// var strbool = false;
// if (item.link) {
// if (str.test(item.link) === true) {
// strbool = true
// } else {
// strbool = false
// }
// }
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>
{/* {
strbool ?
<React.Fragment>
<Link to={item.link}>{item.name}</Link>
</React.Fragment>
:
<a href={new_link} target='_blank'>{item.name}</a>
} */}
</li>
)
})
}
{/* {
this.props.current_user && this.props.current_user.login &&
<li key="projects" onClick={() => this.headtypesonClick(`/users/${this.props.current_user.login}`, true)} className={`${this.matchpaths(`/users/${this.props.current_user.login}`) === true ? 'pr active' : 'pr'}`} style={true ? { display: 'flex' } : { display: 'none' }}>
<Link to={`/users/${this.props.current_user.login}`}>项目</Link>
</li>
} */}
</ul>
</div>
: ""
} else {
is_hidden = true
}
}
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>
</li>
)
})
}
</ul>
</div>
: ""
}
<div className="head-right">
@ -914,7 +864,7 @@ class NewHeader extends Component {
</a>
<ul className="edu-menu-list" style={{ top: '46px', 'textAlign': 'center' }}>
<li className="bor-bottom-greyE">
<a href={`/users/${this.props.current_user.login}`}>个人中心</a>
<Link to={`/users/${this.props.current_user.login}`}>个人中心</Link>
</li>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_courses &&