dev_forum
杨树林 5 years ago
parent cb4d361590
commit 661d030243

@ -41,7 +41,7 @@ class Homeworddescription extends Component {
super(props);
this.state = {
props: props,
description:undefined,
description:props.description,
}
@ -74,10 +74,8 @@ class Homeworddescription extends Component {
<div >
<div style={{
"background-color":"#FFFFff",
"margin-top":"20px",
"padding":"20px 20px",
"position": "relative",
"border-bottom": "1px solid #EDEDED",
"margin-bottom":" 0px"}}>
<style>
{`
@ -85,7 +83,8 @@ class Homeworddescription extends Component {
`}
</style>
<Form.Item
label="作业说明"
label=""
className="mdInForm"
>
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/}
@ -93,7 +92,7 @@ class Homeworddescription extends Component {
<TPMMDEditor ref={this.mdRef} placeholder={'作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item>
<div className="clearfix">
<div className="clearfix mt10">
<Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button>
<Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>
</div>

@ -15,7 +15,7 @@ class ShixunWorkModal extends Component{
}
componentDidMount() {
let {group_list}=this.state;
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
axios.get(url,{params:{
limit:10,
page:1,
@ -32,7 +32,6 @@ class ShixunWorkModal extends Component{
newgroup_list.push(item)
})
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
console.log()
newgroup_list.push(response.data.ungroup_list)
}
this.setState({
@ -50,7 +49,7 @@ class ShixunWorkModal extends Component{
//勾选实训
shixunhomeworkedit=(checkedValues)=>{
let types=false
let types=false
let{group_list}=this.state;
group_list.map((item,key)=>{
if(item!=undefined){
@ -88,7 +87,6 @@ class ShixunWorkModal extends Component{
let {page,limit,group_list}=this.state;
let newpage=page+1;
let newgroup_list=group_list;
debugger
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
axios.get(url,{params:{
@ -134,30 +132,30 @@ class ShixunWorkModal extends Component{
let {data}=this.props;
if(e.target.checked===true){
if(data&&data.length===0){
if(data&&data.length===0){
let id=[]
group_list.forEach((item,key)=>{
id.push(item.id)
})
this.setState({
group_ids:id,
onChangetype:e.target.checked
})
}else{
let id=[]
group_list.forEach((item,key)=>{
id.push(item.id)
})
this.setState({
group_ids:id,
onChangetype:e.target.checked
})
}
}else{
this.setState({
group_ids:[],
group_ids:id,
onChangetype:e.target.checked
})
}else{
let id=[]
group_list.forEach((item,key)=>{
id.push(item.id)
})
this.setState({
group_ids:id,
onChangetype:e.target.checked
})
}
}else{
this.setState({
group_ids:[],
onChangetype:e.target.checked
})
}
}
@ -187,7 +185,7 @@ class ShixunWorkModal extends Component{
message:"提示",
description: response.data.message
});
console.log(this.props)
console.log(this.props)
}else if(response.data.status === -1){
notification.open({
message:"提示",
@ -222,7 +220,7 @@ class ShixunWorkModal extends Component{
render(){
let {course_groups,group_ids,onChangetype,group_list}=this.state;
// let {data}=this.props;
// console.log(group_list)
// console.log(group_list)
// console.log(course_groups)
return(
<div>
@ -251,59 +249,59 @@ class ShixunWorkModal extends Component{
{course_groups===undefined?"":
<ul className="upload_select_box fl clearfix mt10 mb10" tyle={{"overflow-y":"auto"}}id="search_not_members_list"
onScroll={this.contentViewScroll}
>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit} value={group_ids}>
{
group_list===undefined?course_groups.ungroup_list.work_count===0?"":
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
<li className="fl task-hide" style={{width: '240px'}}>
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={course_groups.ungroup_list.id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{course_groups.ungroup_list.name}</label>
</Checkbox>
</li>
<li className="fl" style={{width: '100px'}}>
{course_groups.ungroup_list.work_count}
</li>
<li className="fl" style={{width: '160px'}}>
{course_groups.ungroup_list.last_review_time}
</li>
</div>
:
group_list&&group_list.map((item,key)=>{
return(
item.work_count===0?"":<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl task-hide" style={{width: '240px'}}>
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={item=== undefined?"":item.id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
</Checkbox>
</li>
<li className="fl" style={{width: '100px'}}>
{item===undefined?"":item.works_count===undefined?item.work_count:item.works_count}
</li>
<li className="fl" style={{width: '160px'}}>
{item===undefined?"":item.last_review_time}
</li>
</div>
onScroll={this.contentViewScroll}
>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit} value={group_ids}>
{
group_list===undefined?course_groups.ungroup_list.work_count===0?"":
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
<li className="fl task-hide" style={{width: '240px'}}>
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={course_groups.ungroup_list.id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{course_groups.ungroup_list.name}</label>
</Checkbox>
</li>
<li className="fl" style={{width: '100px'}}>
{course_groups.ungroup_list.work_count}
</li>
<li className="fl" style={{width: '160px'}}>
{course_groups.ungroup_list.last_review_time}
</li>
</div>
:
group_list&&group_list.map((item,key)=>{
return(
item.work_count===0?"":<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl task-hide" style={{width: '240px'}}>
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={item=== undefined?"":item.id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
</Checkbox>
</li>
<li className="fl" style={{width: '100px'}}>
{item===undefined?"":item.works_count===undefined?item.work_count:item.works_count}
</li>
<li className="fl" style={{width: '160px'}}>
{item===undefined?"":item.last_review_time}
</li>
</div>
)
})
}
</Checkbox.Group>
</ul>
}
</Checkbox.Group>
</ul>
}
<div className={"clearfix"}>
<Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox>

@ -467,19 +467,31 @@ class Workquestionandanswer extends Component {
<div className="font-16 color-green fl pl20 mt10">作业说明:</div>
{
this.props.isAdmin()&&this.props.isAdmin()===true ?
(Showupdateinstructions&& Showupdateinstructions === true?"":
<Tooltip placement="top" title="编辑"><i
className="color-green font-18 iconfont icon-bianjidaibeijing fr pr20 " onClick={()=>this.jobdescriptiondisplaybj()} ></i></Tooltip>
:""
className="color-green font-18 iconfont icon-bianjidaibeijing fr pr20 " onClick={()=>this.jobdescriptiondisplaybj()} ></i></Tooltip>
):""
}
</div>
<span>
<div className="font-16 color-dark break_word flex1 pl20 " style={{"padding":"10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无":
<div dangerouslySetInnerHTML={{__html:markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g,"▁▁▁")}}></div>
}
<div className="font-16 color-dark break_word flex1 " >
{ Showupdateinstructions&& Showupdateinstructions === true?
<div >
<Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} description={jobsettingsdata === undefined ?"":jobsettingsdata === null ?"":jobsettingsdata === "null"?"": jobsettingsdata.data.explanation=== undefined?"":jobsettingsdata.data.explanation=== null?"":jobsettingsdata.data.explanation} ></Homeworddescription>
</div>
:
<div className="pl20 " style={{"padding":"10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无":
<div dangerouslySetInnerHTML={{__html:markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g,"▁▁▁")}}></div>
}
</div>
}
</div>
</span>
</div>
@ -494,12 +506,12 @@ class Workquestionandanswer extends Component {
{/* <div className="edu-back-white mb20 graduateTopic course-message"> */}
{/*<GraduateTopicReply memo={{id: graduation_topic_id, user_id: topicInfo && topicInfo.user_id}} course_id={course_id} {...this.props}></GraduateTopicReply>*/}
{/* </div> */}
{ Showupdateinstructions&& Showupdateinstructions === true?
<div >
<Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} ></Homeworddescription>
</div>
:""
}
{/*{ Showupdateinstructions&& Showupdateinstructions === true?*/}
{/* <div >*/}
{/* <Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} ></Homeworddescription>*/}
{/* </div>*/}
{/* :""*/}
{/*}*/}
{ homework_id && <CommonReply
memo={{
id: homework_id,

Loading…
Cancel
Save