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}/> <Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy}/>
<Router> <Router>
<Switch> <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" <Route path="/topicbank/:username/:topicstype"
render={ 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() { render() {
let { let {
addonAfter, addonAfter,
@ -3525,7 +3530,7 @@ class PollNewQuestbank extends Component {
}} }}
> >
<li className="clearfix mt30 mb50 fr"> <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" <a type="primary" className=" defalutSubmitbtn fl"
onClick={() => this.submitQuestionnaire()}>提交</a> onClick={() => this.submitQuestionnaire()}>提交</a>
</li> </li>

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

@ -7,12 +7,10 @@ import { SnackbarHOC } from 'educoder';
import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC'; import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../../courses/common/CNotificationHOC' import { CNotificationHOC } from '../../../courses/common/CNotificationHOC'
import "../usersInfo.css" import "../usersInfo.css"
import "../../../courses/css/members.css" import "../../../courses/css/members.css"
import "../../../courses/css/Courses.css" import "../../../courses/css/Courses.css"
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../../../Loading'; import Loading from '../../../../Loading';
@ -102,7 +100,7 @@ class BanksIndex extends Component{
</Breadcrumb> </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> <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> crumbData && <span className="bank_is_public">{crumbData.is_public == true ? '公开':'私有'}</span>
@ -110,14 +108,6 @@ class BanksIndex extends Component{
</p> </p>
<Switch {...this.props}> <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' <Route path='/banks/normal/:workId/edit'
render={ render={
@ -127,6 +117,7 @@ class BanksIndex extends Component{
/>) />)
} }
}></Route> }></Route>
<Route path='/banks/group/:workId/edit' <Route path='/banks/group/:workId/edit'
render={ render={
(props) => { (props) => {
@ -143,48 +134,54 @@ class BanksIndex extends Component{
} }
}></Route> }></Route>
<Route path='/banks/gtopic/:bankId' {/*毕设任务编辑*/}
<Route path='/banks/gtask/:workId/edit'
render={ render={
(props) => { (props) => {
return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common}/>) return (<GtaskBanksEdit {...this.props} {...props} {...this.state} {...common}/>)
} }
}></Route> }></Route>
{/*题库问卷编辑详情*/}
<Route path="/courses/poll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route path='/banks/poll/:bankId' <Route path='/banks/poll/:bankId'
render={ render={
(props) => { (props) => {
return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common} />) return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common} />)
} }
}></Route> }></Route>
{/*题库问卷编辑详情*/}
<Route path="/courses/poll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...this.state} {...common} />)
}
></Route>
{/*毕设任务题库详情*/} {/*毕设任务题库详情*/}
<Route path="/banks/gtask/:workid" <Route path="/banks/gtask/:workid"
render={ render={
(props) => (<Completetaskpage {...this.props} {...this.state} {...common} />) (props) => (<Completetaskpage {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
{/*毕设内容题库详情*/} {/*毕设内容题库详情*/}
<Route path="/banks/gtopic/:workid" <Route path="/banks/gtopic/:workid"
render={ render={
(props) => (<CompletetopicdePage {...this.props} {...this.state} {...common}/>) (props) => (<CompletetopicdePage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*分组作业题库详情*/} {/*分组作业题库详情*/}
<Route path="/banks/group/:workid" <Route path="/banks/group/:workid"
render={ render={
(props) => (<GroupjobbankPage {...this.props} {...this.state} {...common} />) (props) => (<GroupjobbankPage {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
{/* 普通作业题库详情*/} {/* 普通作业题库详情*/}
<Route path="/banks/normal/:workid" <Route path="/banks/normal/:workid"
render={ render={
(props) => (<Generaljobbankdetails {...this.props} {...this.state} {...common} />) (props) => (<Generaljobbankdetails {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
</Switch> </Switch>
</div> </div>
@ -193,3 +190,12 @@ 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 React, { Component } from 'react';
import axios from 'axios' import axios from 'axios'
import NewWorkForm from '../../../courses/busyWork/NewWorkForm'; import NewWorkForm from '../../../courses/busyWork/NewWorkForm';
class GtaskBanksEditEdit extends Component { class GtaskBanksEditEdit extends Component {
@ -61,7 +59,8 @@ class GtaskBanksEditEdit extends Component {
}); });
} }
toWorkDetail = () => { 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 = () => { onCancel = () => {
this.toWorkDetail() this.toWorkDetail()

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

@ -64,7 +64,8 @@ class HomeworkBanksEdit extends Component {
return this.props.isGroup ? 'group' : 'normal' return this.props.isGroup ? 'group' : 'normal'
} }
toWorkDetail = () => { 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 = () => { onCancel = () => {
this.toWorkDetail() this.toWorkDetail()

Loading…
Cancel
Save