dev_forum
杨树明 6 years ago
parent a019b59761
commit 9ab9cc7ce2

@ -1,5 +1,5 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder'; import { WordsBtn,getUrl } from 'educoder';
@ -571,7 +571,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"fl ml20"}>成员要求25</div> <div className={"fl ml20"}>成员要求25</div>
<Search <Search
className={"fl mt5 ml20"} className={"fl mt5 ml20"}
style={{width:"20%"}} style={{width:"270px"}}
placeholder="请输入姓名或学号搜索" placeholder="请输入姓名或学号搜索"
id="subject_search_input" id="subject_search_input"
value={search} value={search}
@ -581,26 +581,54 @@ class GraduationTasksSubmitedit extends Component{
></Search> ></Search>
</div> </div>
<style>{`
.fonthidden{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
height: 24px;
}
img.edu-nodata-img {
width: 200px;
margin: 50px 90px 20px;
display: block;
}
`}</style>
</Form.Item> </Form.Item>
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20 mt10"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl"}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist&&memberslist.members.map((item,key)=>{ {memberslist===undefined?"":memberslist.members.length===0? <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px', width: '375px',
height: '30px' height: '30px'
}}> }}>
<Checkbox value={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false} disabled={item.commit_status===true?true:false} className="fl "></Checkbox> <Checkbox value={item.user_id}
<div className={"fl ml5"} style={{width: '70px'}}>{item.user_name}</div> checked={
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div> task_status.map((item,key)=>{
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div> return parseInt(task_status[key])===item.user_id?true:false
<div className={"fl ml40"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div> })
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
})} })}

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder'; import { WordsBtn,getUrl,getImageUrl} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
const Search = Input.Search; const Search = Input.Search;
@ -354,7 +354,6 @@ class GraduationTasksSubmitnew extends Component{
let newlist =memberslist.members; let newlist =memberslist.members;
let newcheckedValues=checkedValues; let newcheckedValues=checkedValues;
let selects=[]; let selects=[];
selects.push(selectobjct) selects.push(selectobjct)
for(var i=0; i<newlist.length; i++){ for(var i=0; i<newlist.length; i++){
for(var z=0; z<newcheckedValues.length; z++){ for(var z=0; z<newcheckedValues.length; z++){
@ -379,6 +378,7 @@ class GraduationTasksSubmitnew extends Component{
let selects=selectmemberslist; let selects=selectmemberslist;
for(var i=0; i<newlist.length; i++){ for(var i=0; i<newlist.length; i++){
if(newlist[i]===id){ if(newlist[i]===id){
newlist.splice(i,1) newlist.splice(i,1)
} }
@ -389,6 +389,7 @@ class GraduationTasksSubmitnew extends Component{
selects.splice(z,1) selects.splice(z,1)
} }
} }
this.setState({ this.setState({
task_status:newlist, task_status:newlist,
selectmemberslist:selects selectmemberslist:selects
@ -522,7 +523,7 @@ render(){
<div className={"fl ml20"}>成员要求25</div> <div className={"fl ml20"}>成员要求25</div>
<Search <Search
className={"fl mt5 ml20"} className={"fl mt5 ml20"}
style={{width:"20%"}} style={{width:"270px"}}
placeholder="请输入姓名或学号搜索" placeholder="请输入姓名或学号搜索"
id="subject_search_input" id="subject_search_input"
value={search} value={search}
@ -541,6 +542,15 @@ render(){
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.width87{
width: 87px;
height: 24px;
}
img.edu-nodata-img {
width: 200px;
margin: 50px 90px 20px;
display: block;
}
`}</style> `}</style>
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20"} style={{width:"100%"}}>
@ -548,17 +558,31 @@ render(){
<div className={"members fl"} <div className={"members fl"}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist&&memberslist.members.map((item,key)=>{ {memberslist===undefined?"":memberslist.members.length===0?
<div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px', width: '375px',
height: '30px' height: '30px'
}}> }}>
<Checkbox value={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false} disabled={item.commit_status===true?true:false} className="fl "></Checkbox> <Checkbox value={item.user_id} checked={
<Tooltip placement="bottom" title={item.user_nam}><div className={"fl ml5 fonthidden"} style={{width: '70px'}}>{item.user_name}</div></Tooltip> task_status.map((item,key)=>{
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div> return parseInt(task_status[key])===item.user_id?true:false
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div> })
<div className={"fl ml40"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div> }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
})} })}
@ -584,12 +608,13 @@ render(){
height: '30px', height: '30px',
display:item.user_name===undefined?"none":"" display:item.user_name===undefined?"none":""
}}> }}>
<Tooltip placement="bottom" title={item.user_nam}> <Tooltip placement="bottom" title={item.user_name}>
<div className={"fl ml5 fonthidden"} style={{width: '50px'}}>{item.user_name}</div> <div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip> </Tooltip>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fr"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} {key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div> </div>
) )
})} })}

@ -92,7 +92,7 @@ class GraduationTaskssettinglist extends Component{
for (var i = 0; i < worklists.length; i++) { for (var i = 0; i < worklists.length; i++) {
datalist.push({ datalist.push({
name: worklists[i].name, name: worklists[i].name,
number: (parseInt(page)-1)*parseInt(limit)+(i+1), number: (parseInt(pages)-1)*parseInt(limit)+(i+1),
stduynumber: worklists[i].student_id, stduynumber: worklists[i].student_id,
classroom: worklists[i].class_grouping_name, classroom: worklists[i].class_grouping_name,
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,

@ -576,6 +576,7 @@ class LoginRegisterComponent extends Component {
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login} <Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
onChange={this.loginInputonChange} onChange={this.loginInputonChange}
name="username" name="username"
className="loginInput"
style={{marginTop: '30px'}}></Input> style={{marginTop: '30px'}}></Input>
{ {
@ -605,7 +606,7 @@ class LoginRegisterComponent extends Component {
{ {
parseInt(tab[0])==1 && parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
<Input className={loginInputsyl} placeholder="请使用手机号/邮箱账号进行注册" <Input className={loginInputsyl+" loginInput"} placeholder="请使用手机号/邮箱账号进行注册"
value={this.state.logins} value={this.state.logins}
type="text" autoComplete="off" type="text" autoComplete="off"
onChange={this.loginInputonChanges} onChange={this.loginInputonChanges}

@ -29,7 +29,9 @@
.loginInput { .loginInput {
width: 100%; width: 100%;
margin-bottom: 16px; margin-bottom: 16px;
height: 38px; background-color: #fff!important;
height: 45px;
padding: 5px;
} }
.left_right { .left_right {

Loading…
Cancel
Save