Merge branches 'dev_Ysl' and 'topic_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl

dev_aliyun_beta
杨树林 6 years ago
commit bb11085f15

@ -372,36 +372,7 @@ class App extends Component {
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy}/>
<Router>
<Switch>
{/*题库问卷编辑详情*/}
<Route path="/banks/gtpoll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...props} {...this.state} />)
}
></Route>
{/*毕设任务题库详情*/}
<Route path="/banks/gtask/:workid"
render={
(props) => (<Completetaskpage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*毕设内容题库详情*/}
<Route path="/banks/gtopic/:workid"
render={
(props) => (<CompletetopicdePage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*分组作业题库详情*/}
<Route path="/banks/group/:workid"
render={
(props) => (<GroupjobbankPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 普通作业题库详情*/}
<Route path="/banks/normal/:workid"
render={
(props) => (<Generaljobbankdetails {...this.props} {...props} {...this.state} />)
}
></Route>
{/*题库*/}
<Route path="/topicbank/:username/:topicstype"
render={

@ -2434,6 +2434,11 @@ class PollNewQuestbank extends Component {
// }
}
//试图
toWorkDetail = () => {
this.props.history.push(`/banks/poll/${this.props.match.params.workId}`);
this.props.initPublic(undefined);
}
render() {
let {
addonAfter,
@ -3525,7 +3530,7 @@ class PollNewQuestbank extends Component {
}}
>
<li className="clearfix mt30 mb50 fr">
<a className="defalutCancelbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
<a className="defalutCancelbtn fl mr20"onClick={() => this.toWorkDetail()}>取消</a>
<a type="primary" className=" defalutSubmitbtn fl"
onClick={() => this.submitQuestionnaire()}>提交</a>
</li>

@ -373,11 +373,10 @@ class InfosTopics extends Component{
<a className={types==="personal"?"topicstopfont fr topcsactive":"topicstopfont fr"}
href={`/users/${username}/topics/personal`}>个人题库</a>
<a className={types==="publicly"?"topicstopfont fl topcsactive":"topicstopfont fl"}
href={`/topicbank/${username}/publicly`}
>公共题库</a>
</div>:<div className={"topcschild"}>
<a className={types==="personal"?"topicstopfont fl topcsactive":"topicstopfont fl"}
href={`/users/${username}/topics/personal`}>我的题库</a>
>我的题库</a>
<a className={types==="publicly"?"topicstopfont fr topcsactive":"topicstopfont fr"}
href={`/topicbank/${username}/publicly`}
>公共题库</a>
@ -472,7 +471,7 @@ class InfosTopics extends Component{
category==="normal"?`/banks/normal/${item.id}?tab=0`:
category==="group"?`/banks/group/${item.id}?tab=0`:
category==="poll"?`/banks/poll/${item.id}`:
category==="exercise"?``:
category==="exercise"?`/banks/exercise/${item.id}`:
category==="gtask"?`/banks/gtask/${item.id}`:
category==="gtopic"?`/banks/gtopic/${item.id}`:""
}
@ -499,11 +498,11 @@ class InfosTopics extends Component{
<div className="homepagePostSetting homepagePostSettingname topscisright">
{types==="personal"?user_id===targetuserid&&user_type!="学生"?
<a className="btn colorblue mr25 font-16 fr"
href={category==="normal"?``:
category==="group"?``:
href={category==="normal"?`/banks/normal/${item.id}/edit`:
category==="group"?`/banks/group/${item.id}/edit`:
category==="poll"?`/banks/poll/${item.id}/edit`:
category==="exercise"?``:
category==="gtask"?``:
category==="exercise"?`/banks/exercise/${item.id}/edit`:
category==="gtask"?`/banks/gtask/${item.id}/edit`:
category==="gtopic"?`/banks/gtopic/${item.id}/edit`:""
}
>编辑</a>

@ -7,12 +7,10 @@ import { SnackbarHOC } from 'educoder';
import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../../courses/common/CNotificationHOC'
import "../usersInfo.css"
import "../../../courses/css/members.css"
import "../../../courses/css/Courses.css"
import Loadable from 'react-loadable';
import Loading from '../../../../Loading';
@ -102,7 +100,7 @@ class BanksIndex extends Component{
</Breadcrumb>
}
<p className="clearfix mt20 mb20">
<p className="clearfix mt30">
<span className="fl font-24 color-grey-3 task-hide lineh-30" style={{maxWidth:'800px'}}>{crumbData && crumbData.title}</span>
{
crumbData && <span className="bank_is_public">{crumbData.is_public == true ? '公开':'私有'}</span>
@ -110,14 +108,6 @@ class BanksIndex extends Component{
</p>
<Switch {...this.props}>
{/*毕设任务编辑*/}
<Route path='/banks/gtask/:workId/edit'
render={
(props) => {
return (<GtaskBanksEdit {...this.props} {...props} {...this.state} {...common}/>)
}
}></Route>
<Route path='/banks/normal/:workId/edit'
render={
@ -127,6 +117,7 @@ class BanksIndex extends Component{
/>)
}
}></Route>
<Route path='/banks/group/:workId/edit'
render={
(props) => {
@ -143,48 +134,54 @@ class BanksIndex extends Component{
}
}></Route>
<Route path='/banks/gtopic/:bankId'
render={
(props) => {
return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common}/>)
}
}></Route>
<Route path='/banks/poll/:bankId'
{/*毕设任务编辑*/}
<Route path='/banks/gtask/:workId/edit'
render={
(props) => {
return (<GtaskBanksEdit {...this.props} {...props} {...this.state} {...common}/>)
}
}></Route>
{/*题库问卷编辑详情*/}
<Route path="/courses/poll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route path='/banks/poll/:bankId'
render={
(props) => {
return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common} />)
}
}></Route>
{/*题库问卷编辑详情*/}
<Route path="/courses/poll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...this.state} {...common} />)
}
></Route>
{/*毕设任务题库详情*/}
<Route path="/banks/gtask/:workid"
render={
(props) => (<Completetaskpage {...this.props} {...this.state} {...common} />)
(props) => (<Completetaskpage {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
{/*毕设内容题库详情*/}
<Route path="/banks/gtopic/:workid"
render={
(props) => (<CompletetopicdePage {...this.props} {...this.state} {...common}/>)
(props) => (<CompletetopicdePage {...this.props} {...props} {...this.state} {...common}/>)
}
></Route>
{/*分组作业题库详情*/}
<Route path="/banks/group/:workid"
render={
(props) => (<GroupjobbankPage {...this.props} {...this.state} {...common} />)
(props) => (<GroupjobbankPage {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
{/* 普通作业题库详情*/}
<Route path="/banks/normal/:workid"
render={
(props) => (<Generaljobbankdetails {...this.props} {...this.state} {...common} />)
(props) => (<Generaljobbankdetails {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
</Switch>
</div>
@ -192,4 +189,13 @@ class BanksIndex extends Component{
)
}
}
export default CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC(BanksIndex) ));
export default CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC(BanksIndex) ));
// <Route path='/banks/gtopic/:bankId'
// render={
// (props) => {
// return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common}/>)
// }
// }></Route>

@ -1,7 +1,5 @@
import React, { Component } from 'react';
import axios from 'axios'
import NewWorkForm from '../../../courses/busyWork/NewWorkForm';
class GtaskBanksEditEdit extends Component {
@ -61,7 +59,8 @@ class GtaskBanksEditEdit extends Component {
});
}
toWorkDetail = () => {
this.props.history.push(`/banks/task/${this.props.match.params.workId}`)
this.props.history.push(`/banks/gtask/${this.props.match.params.workId}`);
this.props.initPublic(undefined);
}
onCancel = () => {
this.toWorkDetail()

@ -57,6 +57,7 @@ class GtopicBanksEdit extends Component{
// 取消
editCancel = () =>{
this.props.history.push(`/banks/gtopic/${this.props.match.params.bankId}`);
this.props.initPublic(undefined);
}
render(){

@ -64,7 +64,8 @@ class HomeworkBanksEdit extends Component {
return this.props.isGroup ? 'group' : 'normal'
}
toWorkDetail = () => {
this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}`)
this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}?tab=0`)
this.props.initPublic(undefined);
}
onCancel = () => {
this.toWorkDetail()

Loading…
Cancel
Save