毕设任务

dev_forum
caishi 6 years ago
parent 68b85b7364
commit 19bf3d635a

@ -744,24 +744,20 @@ class GraduationTasks extends Component{
</Checkbox.Group> </Checkbox.Group>
</Spin> </Spin>
<div className="mb40 edu-txt-center padding20-30" {
style={ all_count > 15 &&
{ <div className="mb40 edu-txt-center padding20-30" >
display: all_count===undefined?1:all_count< 15 ? 'none' : 'block' <Pagination
} showQuickJumper
} defaultCurrent={1}
> pageSize={15}
<Pagination total={all_count}
showQuickJumper current={page}
defaultCurrent={1}
pageSize={15} onChange={this.PaginationTask}
total={all_count} />
current={page} </div>
}
onChange={this.PaginationTask}
/>
</div>
<div className="alltask edu-back-white" <div className="alltask edu-back-white"
style={ style={
{ {
@ -769,9 +765,9 @@ class GraduationTasks extends Component{
} }
} }
> >
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20" <div className="edu-tab-con-box clearfix edu-txt-center">
src="https://www.educoder.net/images/educoder/nodata.png" /> <img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div> <p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div> </div>
<div> <div>

@ -120,7 +120,7 @@ class GraduateTopicDetail extends Component{
<div className="fl mt6 task_menu_ul ml30"> <div className="fl mt6 task_menu_ul ml30">
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}> <Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}>
<Menu.Item key="1">选题列表</Menu.Item> <Menu.Item key="1">选题列表</Menu.Item>
<Menu.Item key="2">课题详情</Menu.Item> <Menu.Item key="2">选题问答</Menu.Item>
</Menu> </Menu>
</div> </div>
{/* null: 未选题 0待确认 1已同意 2已拒绝 */} {/* null: 未选题 0待确认 1已同意 2已拒绝 */}

@ -6,7 +6,7 @@ import '../style.css'
import axios from "axios"; import axios from "axios";
import GraduateTopicReply from './GraduateTopicReply' import GraduateTopicReply from './GraduateTopicReply'
import { ConditionToolTip,markdownToHTML } from 'educoder' import { ConditionToolTip,MarkdownToHtml } from 'educoder'
const $=window.$; const $=window.$;
const type={1: "设计",2: "论文", 3: "创作"} const type={1: "设计",2: "论文", 3: "创作"}
@ -21,18 +21,6 @@ class GraduateTopicDetailTable extends Component{
topicInfo:undefined topicInfo:undefined
} }
} }
updatamakedown=(id)=>{
setTimeout(()=>{
var shixunDescr = window.editormd.markdownToHTML(id, {
htmlDecode: "style,script,iframe",
taskList: true,
tex: true,
flowChart: true,
sequenceDiagram: true
});
$("#"+id+" p:first").addClass("ReactMarkdown");
}, 200)
}
componentDidMount=()=>{ componentDidMount=()=>{
let course_id=this.props.match.params.course_id; let course_id=this.props.match.params.course_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id; let graduation_topic_id=this.props.match.params.graduation_topic_id;
@ -47,7 +35,6 @@ class GraduateTopicDetailTable extends Component{
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
this.updatamakedown("gratuationTopic_Detail");
} }
render(){ render(){
let{topicInfo}=this.state let{topicInfo}=this.state
@ -67,7 +54,7 @@ class GraduateTopicDetailTable extends Component{
<div id="gratuationTopic_Detail" className="new_li markdown-body justify"> <div id="gratuationTopic_Detail" className="new_li markdown-body justify">
{ {
topicInfo && topicInfo.description!="" && topicInfo && topicInfo.description!="" &&
<span className="markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(topicInfo.description)}}></span> <MarkdownToHtml content={topicInfo.description} ></MarkdownToHtml>
} }
</div> </div>
{ {

@ -15,6 +15,8 @@ import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
import update from 'immutability-helper' import update from 'immutability-helper'
import Trialapplication from '../../login/Trialapplication'
const $ = window.$; const $ = window.$;
class Infos extends Component{ class Infos extends Component{
@ -26,7 +28,8 @@ class Infos extends Component{
is_edit:false, is_edit:false,
sign:undefined, sign:undefined,
type:0, type:0,
login:undefined login:undefined,
isRenders:false
} }
} }
componentDidMount =()=>{ componentDidMount =()=>{
@ -44,6 +47,14 @@ class Infos extends Component{
} }
} }
} }
// 试用申请
trialapplications =()=>{
this.setState({
isRenders: true,
})
}
//获取个人主页信息 //获取个人主页信息
getInfo = (user_login) =>{ getInfo = (user_login) =>{
let url =`/users/${user_login}/homepage_info.json`; let url =`/users/${user_login}/homepage_info.json`;
@ -155,12 +166,16 @@ class Infos extends Component{
type, type,
followed, followed,
id, id,
login login,
isRenders
}=this.state; }=this.state;
let {username}= this.props.match.params; let {username}= this.props.match.params;
let {isAdmin}=this.props.isAdmin(); let {isAdmin}=this.props.isAdmin();
return( return(
<div className="newMain"> <div className="newMain">
{
isRenders && <Trialapplication {...this.state} />
}
<div className="user-main-half"> <div className="user-main-half">
<div className="user-headImg"></div> <div className="user-headImg"></div>
<div className="user-headCon"> <div className="user-headCon">
@ -251,7 +266,7 @@ class Infos extends Component{
: :
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a> <a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
: :
<a herf="javascript:void(0);" onClick="user_apply_trail();" id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a> <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
} }
</div> </div>
: :

Loading…
Cancel
Save