caishi 5 years ago
commit 68ea96e61b

@ -263,7 +263,7 @@ class App extends Component {
<Switch> <Switch>
{/*<Route path="/login" component={LoginRegisterPage}/>*/} {/*<Route path="/login" component={LoginRegisterPage}/>*/}
{/*认证*/} {/*认证*/}
{/*<Route path="/account" component={AccountPage}/>*/} <Route path="/account" component={AccountPage}/>
{/*403*/} {/*403*/}
<Route path="/403" component={Shixunauthority}/> <Route path="/403" component={Shixunauthority}/>

@ -39,18 +39,29 @@ class DMDEditor extends Component{
onChange = (val) => { onChange = (val) => {
// this.setState({ value: val }) // this.setState({ value: val })
this.props.onChange(val) this.props.onChange(val)
if (this.state.showError == true) {
this.setState({showError: false})
}
}
showError = () => {
this.mdRef.current.showError()
this.setState({showError: true})
} }
render(){ render(){
const { mdMode } = this.state; const { mdMode, showError } = this.state;
const { initValue } = this.props; const { initValue } = this.props;
let _style = {}
if (showError) {
_style.border = '1px solid red'
}
_style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'})
return( return(
<React.Fragment> <React.Fragment>
<style>{` <style>{`
`}</style> `}</style>
<div id="content_editorMd_show" className="new_li content_editorMd_show" <div id="content_editorMd_show" className="new_li content_editorMd_show"
style={{display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'}} style={_style}
dangerouslySetInnerHTML={{__html: initValue ? markdownToHTML(initValue):this.props.placeholder}} dangerouslySetInnerHTML={{__html: initValue ? markdownToHTML(initValue):this.props.placeholder}}
onClick={this.toMDMode} onClick={this.toMDMode}
> >

@ -238,6 +238,7 @@
width: 100%; width: 100%;
word-wrap: break-word; word-wrap: break-word;
margin-bottom: 4px; margin-bottom: 4px;
margin-top: 4px;
} }
.childComment .break_word_comments{ .childComment .break_word_comments{
line-height: 22px; line-height: 22px;

@ -96,7 +96,7 @@ class CommentItemMDEditor extends Component {
} }
render() { render() {
const { match, history, item, user } = this.props const { match, history, item, user, buttonText } = this.props
if (!item) { if (!item) {
return <div></div> return <div></div>
} }
@ -111,7 +111,7 @@ class CommentItemMDEditor extends Component {
</a> </a>
</div> </div>
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor" <div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor"
style={{ paddingTop: '0px', paddingBottom: '20px', marginTop: '36px' }} style={{ paddingTop: '0px', paddingBottom: '0px', marginTop: '36px' }}
> >
<div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px'}}> <div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px'}}>
<textarea style={{'display': 'none'}}> <textarea style={{'display': 'none'}}>
@ -119,11 +119,14 @@ class CommentItemMDEditor extends Component {
</div> </div>
<div className="editor__resize" href="javascript:void(0);" style={{display: ''}}>调整高度</div> <div className="editor__resize" href="javascript:void(0);" style={{display: ''}}>调整高度</div>
<a id={`commitBtn_${item.id}`} href="javascript:void(0)" <div class="clearfix">
onClick={this.onCommit} style={{ marginRight: '44px' }} <a id={`commitBtn_${item.id}`} href="javascript:void(0)"
className="commentsbtn task-btn task-btn-blue fr " style={{display: ''}}> onClick={this.onCommit} style={{ marginRight: '44px' }}
发送 className="commentsbtn task-btn task-btn-blue fr " style={{display: ''}}>
</a> { buttonText || '发送'}
</a>
</div>
</div> </div>
</div> </div>
); );

@ -408,6 +408,7 @@ class Comments extends Component {
currentReplyComment={currentReplyComment} currentReplyComment={currentReplyComment}
item={item} item={item}
user={user} user={user}
buttonText={this.props.buttonText}
> >
</CommentItemMDEditor> </CommentItemMDEditor>
} }

File diff suppressed because it is too large Load Diff

@ -271,7 +271,7 @@ class Fileslistitem extends Component{
return( return(
<div className="mr50"> <div className="mr50">
<span className="mr15 color-dark">{item.course_group_name}</span> <span className="mr15 color-dark">{item.course_group_name}</span>
<span className="mr15 color-grey9 ">将发布于 { moment(item.course_group_publish_time).format('YYYY-MM-DD hh:mm')}</span> <span className="mr15 color-grey9 ">将发布于 { moment(item.course_group_publish_time).format('YYYY-MM-DD HH:mm')}</span>
</div> </div>
) )
})} })}
@ -289,7 +289,7 @@ class Fileslistitem extends Component{
{/*{moment(discussMessage.publish_time).fromNow()}*/} {/*{moment(discussMessage.publish_time).fromNow()}*/}
{ discussMessage.publish_time===null?"": { discussMessage.publish_time===null?"":
discussMessage.is_publish===true?"":"发布于"} discussMessage.is_publish===true?"":"发布于"}
{ discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD hh:mm')} { discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')}
</span> </span>
</span> </span>
{this.props.isAdmin ||this.props.current_user.login===discussMessage.author.login? {this.props.isAdmin ||this.props.current_user.login===discussMessage.author.login?

@ -668,7 +668,7 @@ class Fileslists extends Component{
<div style={{"display":"inline-block", "marginTop": "22px"}}> <div style={{"display":"inline-block", "marginTop": "22px"}}>
<span> {total_count} 个资源</span> <span> {total_count} 个资源</span>
<span style={{"marginLeft":"16px"}}>已发布{public_count}</span> <span style={{"marginLeft":"16px"}}>已发布{public_count}</span>
{this.props.isAdmin()||this.props.isStudent()?<span style={{"marginLeft":"16px"}}>未发布{private_count}</span>:""} <span style={{"marginLeft":"16px"}}>未发布{private_count}</span>
</div> </div>
} }
onPressEnter={this.onPressEnter} onPressEnter={this.onPressEnter}

@ -416,7 +416,7 @@ class TopicDetail extends Component {
const user = this._getUser(); const user = this._getUser();
this.setState({ this.setState({
comments: addNewComment(comments, _id, content, user) comments: addNewComment(comments, _id, content, user, this)
}) })
const newMemo2 = Object.assign({}, this.state.memo); const newMemo2 = Object.assign({}, this.state.memo);
newMemo2.total_replies_count = newMemo2.total_replies_count + 1; newMemo2.total_replies_count = newMemo2.total_replies_count + 1;
@ -526,8 +526,15 @@ class TopicDetail extends Component {
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
return ( return (
<div className="edu-back-white edu-class-container edu-position course-message" id="forum_index_list"> {/* fl with100 */} <div className="edu-back-white edu-class-container edu-position course-message topicDetail" id="forum_index_list"> {/* fl with100 */}
<style>{` <style>{`
.topicDetail #forum_list .return_btn.no_mr {
margin-right: 1px;
}
/* 有内容时,编辑器下方的边框*/
.topicDetail .borderBottom.commentInputs {
border-bottom: 1px solid rgb(238, 238, 238);
}
.independent { .independent {
background: rgb(250, 250, 250); background: rgb(250, 250, 250);
padding-bottom: 20px; padding-bottom: 20px;
@ -658,7 +665,7 @@ class TopicDetail extends Component {
</div> </div>
<MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么" <MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么"
height={160} showError={true} buttonText={'发表'}></MemoDetailMDEditor> height={160} showError={true} buttonText={'发表'} className={comments && comments.length && 'borderBottom'}></MemoDetailMDEditor>
{/* onClick={ this.createNewComment } {/* onClick={ this.createNewComment }
enableReplyTo={true} enableReplyTo={true}

@ -226,8 +226,8 @@ class CommonWorkDetailIndex extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li> <li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li> <li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -31,7 +31,7 @@ function renderScore(score, content) {
} else if (score >= 60) { } else if (score >= 60) {
color = '#FF6800' color = '#FF6800'
} }
return <a href="javascript:;" style={{ color, minWidth: '30px', display: 'inline-block', textAlign: 'center' }}> return <a href="javascript:;" style={{ color, cursor: 'default', minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>
{score == null || score == undefined || score == '--' ? '--': (content || score)} {score == null || score == undefined || score == '--' ? '--': (content || score)}
</a> </a>
} }
@ -93,7 +93,7 @@ function buildColumns(that, student_works) {
</div> </div>
), ),
}] }]
if (!niPingAndIsStudent) { if (!niPingAndIsStudent && isAdminOrStudent) {
columns.push({ columns.push({
width: 88, width: 88,
title: '学号', title: '学号',
@ -105,7 +105,7 @@ function buildColumns(that, student_works) {
<a href="javascript:;" <a href="javascript:;"
title={record.student_id} title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden' style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden'
, margin: '0 auto'}} , margin: '0 auto', cursor: 'default'}}
>{record.student_id}</a> >{record.student_id}</a>
</span> </span>
), ),
@ -121,7 +121,7 @@ function buildColumns(that, student_works) {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.group_name}</a> <a href="javascript:;" style={{color:'#9A9A9A', cursor: 'default'}}>{record.group_name}</a>
</span> </span>
), ),
} ) } )
@ -177,7 +177,7 @@ function buildColumns(that, student_works) {
} }
return ( return (
<span> <span>
<a href="javascript:;" style={{color: color}}> <a href="javascript:;" style={{color: color, cursor: 'default'}}>
{status === 0 ? "未提交" : status === 1 ? "按时提交" : status === 2 ? "延时提交" : ""} {status === 0 ? "未提交" : status === 1 ? "按时提交" : status === 2 ? "延时提交" : ""}
</a> </a>
</span> </span>
@ -190,7 +190,7 @@ function buildColumns(that, student_works) {
render: (update_time, record) => ( render: (update_time, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#989898'}}>{update_time ? moment(update_time).format('YYYY-MM-DD hh:mm') : '--'}</a> <a href="javascript:;" style={{color:'#989898', cursor: 'default'}}>{update_time ? moment(update_time).format('YYYY-MM-DD HH:mm') : '--'}</a>
</span> </span>
), ),
}]) }])
@ -450,17 +450,17 @@ class CommonWorkList extends Component{
} }
teacherCommentOptionChange = (values, isAllChecked) => { teacherCommentOptionChange = (values, isAllChecked) => {
this.setState({arg_teacher_comment: isAllChecked ? [] : values}, () => { this.setState({arg_teacher_comment: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList() this.fetchList()
}) })
} }
statusOptionChange = (values, isAllChecked) => { statusOptionChange = (values, isAllChecked) => {
this.setState({arg_work_status: isAllChecked ? [] : values}, () => { this.setState({arg_work_status: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList() this.fetchList()
}) })
} }
courseGroupOptionChange = (values, isAllChecked) => { courseGroupOptionChange = (values, isAllChecked) => {
this.setState({arg_course_group: isAllChecked ? [] : values}, () => { this.setState({arg_course_group: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList() this.fetchList()
}) })
} }
@ -648,7 +648,7 @@ class CommonWorkList extends Component{
<CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup> <CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup>
<CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup> <CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup>
{options_course_group.length > 1 && <CheckAllGroup options={options_course_group} label={'分班情况:'} onChange={this.courseGroupOptionChange} checkboxGroupStyle={{width: '86%'}}></CheckAllGroup>} {options_course_group.length > 1 && <CheckAllGroup options={options_course_group} label={'分班情况:'} onChange={this.courseGroupOptionChange} checkboxGroupStyle={{width: '980px'}}></CheckAllGroup>}
{/* value={search} */} {/* value={search} */}

@ -1,153 +1,153 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder'; import { WordsBtn, MarkdownToHtml } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import PublishRightnow from '../PublishRightnow' import PublishRightnow from '../PublishRightnow'
import AccessoryModal from "../../coursesPublic/AccessoryModal"; import AccessoryModal from "../../coursesPublic/AccessoryModal";
const { Option} = Select; const { Option} = Select;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm; const confirm = Modal.confirm;
let GraduationTasksnewtype=true; let GraduationTasksnewtype=true;
const $ = window.$; const $ = window.$;
const Search = Input.Search; const Search = Input.Search;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
class TabRightComponents extends Component{ class TabRightComponents extends Component{
constructor(props){ constructor(props){
super(props) super(props)
this.publishModal = React.createRef(); this.publishModal = React.createRef();
this.endModal = React.createRef(); this.endModal = React.createRef();
this.state={ this.state={
accessoryVisible: false accessoryVisible: false
} }
} }
componentDidMount() { componentDidMount() {
} }
onToPublishClick = () => { onToPublishClick = () => {
} }
// 补交附件 // 补交附件
Cancelvisible=()=>{ Cancelvisible=()=>{
this.setState({ this.setState({
accessoryVisible:false accessoryVisible:false
}) })
} }
addAccessory=()=>{ addAccessory=()=>{
this.setState({ this.setState({
accessoryVisible:true accessoryVisible:true
}) })
} }
setupdate = () => { setupdate = () => {
} }
render(){ render(){
const dateFormat = 'YYYY-MM-DD HH:mm'; const dateFormat = 'YYYY-MM-DD HH:mm';
const { accessoryVisible } = this.state const { accessoryVisible } = this.state
let { work_statuses, publish_immediately, work_id let { work_statuses, publish_immediately, work_id
, end_immediately , end_immediately
} =this.props; } =this.props;
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let workId=this.props.match.params.workId; let workId=this.props.match.params.workId;
const isGroup = this.props.isGroup() const isGroup = this.props.isGroup()
const moduleName = !isGroup? "普通作业":"分组作业"; const moduleName = !isGroup? "普通作业":"分组作业";
const moduleEngName = this.props.getModuleName() const moduleEngName = this.props.getModuleName()
const childModuleName = this.props.moduleName const childModuleName = this.props.moduleName
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin() const isSuperAdmin = this.props.isSuperAdmin()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip` let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx` const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
return( return(
<React.Fragment> <React.Fragment>
{isAdmin ? {isAdmin ?
<React.Fragment> <React.Fragment>
<div style={{display: 'inline', float: 'right'}}> <div style={{display: 'inline', float: 'right'}}>
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]} <PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={true} doWhenSuccess={this.props.doWhenSuccess} checkBeforePost={this.props.saveWorkSetting} isPublish={true} doWhenSuccess={this.props.doWhenSuccess} checkBeforePost={this.props.saveWorkSetting}
onToPublishClick={this.onToPublishClick} onToPublishClick={this.onToPublishClick}
></PublishRightnow> ></PublishRightnow>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]} <PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.props.doWhenSuccess}></PublishRightnow> isPublish={false} doWhenSuccess={this.props.doWhenSuccess}></PublishRightnow>
</div> </div>
<style>{` <style>{`
.drop_down_menu li a { .drop_down_menu li a {
padding: 0px; padding: 0px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
} }
.drop_down_menu { .drop_down_menu {
width: 121px; width: 121px;
} }
.drop_down_menu li { .drop_down_menu li {
overflow: visible; overflow: visible;
width: 121px; width: 121px;
} }
.drop_down_menu, .drop_down_normal { .drop_down_menu, .drop_down_normal {
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
`}</style> `}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li> <li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li> <li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
{/* <a className={"fr color-blue font-16"} href={exportUrl}></a> {/* <a className={"fr color-blue font-16"} href={exportUrl}></a>
<a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a> */} <a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a> */}
{/*<a className={"fr color-blue font-16"}>导出</a>*/} {/*<a className={"fr color-blue font-16"}>导出</a>*/}
{end_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.endModal.current.open() } }>立即截止</a>} {end_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.endModal.current.open() } }>立即截止</a>}
{publish_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.publishModal.current.open() } } >立即发布</a>} {publish_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.publishModal.current.open() } } >立即发布</a>}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/} {/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>} {isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>}
</React.Fragment> : </React.Fragment> :
<React.Fragment> <React.Fragment>
{work_statuses && work_statuses.indexOf('提交作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"} {work_statuses && work_statuses.indexOf('提交作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params)}} onClick={() => { this.props.toWorkPostPage(this.props.match.params)}}
>提交作品</a>} >提交作品</a>}
{work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"} {work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}} onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}}
>修改作品</a>} >修改作品</a>}
{work_statuses && work_statuses.indexOf('补交附件') != -1 && {work_statuses && work_statuses.indexOf('补交附件') != -1 &&
<React.Fragment> <React.Fragment>
<AccessoryModal <AccessoryModal
{...this.props} {...this.props}
modalname={"补交附件"} modalname={"补交附件"}
visible={accessoryVisible} visible={accessoryVisible}
Cancelname={"取消"} Cancelname={"取消"}
Savesname={"确认"} Savesname={"确认"}
Cancel={this.Cancelvisible} Cancel={this.Cancelvisible}
setupdate={this.setupdate} setupdate={this.setupdate}
reviseAttachmentUrl={`/student_works/${work_id}/revise_attachment.json`} reviseAttachmentUrl={`/student_works/${work_id}/revise_attachment.json`}
/> />
<a className={"fr color-blue font-16"} href={"javascript:void(0)"} <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={this.addAccessory} onClick={this.addAccessory}
>补交附件</a> >补交附件</a>
</React.Fragment> </React.Fragment>
} }
</React.Fragment> } </React.Fragment> }
</React.Fragment> </React.Fragment>
) )
} }
} }
export default TabRightComponents; export default TabRightComponents;

@ -64,13 +64,13 @@ export function handleContentBeforeCreateNew(argContent) {
return content return content
} }
export function addNewComment(comments, _id, content, user, isSuperAdmin) { export function addNewComment(comments, _id, content, user, isSuperAdmin, parentComponent) {
if (!comments) { if (!comments) {
comments = []; comments = [];
} }
comments.unshift( { comments.unshift( {
"can_delete": true, "can_delete": true,
"admin": user.admin, "admin": parentComponent ? parentComponent.props.isAdmin() : user.admin ,
isSuperAdmin: isSuperAdmin, isSuperAdmin: isSuperAdmin,
"content": content, "content": content,

@ -175,7 +175,7 @@ class CCommentItem extends Component{
// src={getImageUrl(`images/${item.image_url}`)} // src={getImageUrl(`images/${item.image_url}`)}
return ( return (
<div className="comment_item_cont df clearfix" key={item.id}> <div className="comment_item_cont appraise df clearfix" key={item.id}>
<div className="J_Comment_Face fl"> <div className="J_Comment_Face fl">
{item.is_appeal_info == true ? {item.is_appeal_info == true ?
<a href={`javascript:void(0)`} target="_blank"> <a href={`javascript:void(0)`} target="_blank">

@ -76,7 +76,7 @@ class CommonReply extends Component{
const isSuperAdmin = this.props.isSuperAdmin() const isSuperAdmin = this.props.isSuperAdmin()
this.setState({ this.setState({
comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin), comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin, this),
total_count: this.state.total_count + 1 total_count: this.state.total_count + 1
}) })
this.refs.editor.showEditor(); this.refs.editor.showEditor();

@ -38,8 +38,10 @@
margin-top: 8px; margin-top: 8px;
} }
.course-message .comment_item_cont:last-child { .course-message .comment_item_cont:last-child {
/* 作品评阅需要 */
border-bottom: none; border-bottom: none;
}
.course-message .appraise.comment_item_cont:last-child {
/* 作品评阅需要 */
padding-bottom: 0px; padding-bottom: 0px;
} }

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Input, Spin, Icon } from "antd"; import { Modal,Checkbox,Input, Spin, Icon,notification } from "antd";
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
@ -187,15 +187,26 @@ class Addcourses extends Component{
if(response.data.course_id!=undefined){ if(response.data.course_id!=undefined){
this.submitasyn(response.data.course_id) this.submitasyn(response.data.course_id)
} }
notification.open({
message:"提示",
description:response.data.message
});
this.props.hideAddcoursestype(); this.props.hideAddcoursestype();
this.props.showNotification(response.data.message); // this.props.showNotification(response.data.message);
}else{ }else{
this.setState({
Addcoursestype:false notification.open({
}) message:"提示",
description:response.data.message
});
this.setState({
Addcoursestype:false
})
this.props.hideAddcoursestype(); this.props.hideAddcoursestype();
this.props.showNotification(response.data.message);
// this.setState({ // this.setState({
// loadtype:true, // loadtype:true,
// modalsType:true, // modalsType:true,

@ -1,235 +1,235 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd"; import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd";
import axios from 'axios' import axios from 'axios'
import ModalWrapper from "../../common/ModalWrapper" import ModalWrapper from "../../common/ModalWrapper"
import InfiniteScroll from 'react-infinite-scroller'; import InfiniteScroll from 'react-infinite-scroller';
import { ConditionToolTip } from 'educoder' import { ConditionToolTip } from 'educoder'
const Option = Select.Option; const Option = Select.Option;
const pageCount = 15; const pageCount = 15;
// 代码查重弹框 // 代码查重弹框
class CheckCodeModal extends Component{ class CheckCodeModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
checkBoxValues: [], checkBoxValues: [],
candidates: [], candidates: [],
hasMore: true, hasMore: true,
loading: false, loading: false,
page: 1 page: 1
} }
} }
fetchMemberList = (arg_page) => { fetchMemberList = (arg_page) => {
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
const page = arg_page || this.state.page; const page = arg_page || this.state.page;
const { name, school_name } = this.state const { name, school_name } = this.state
let url = `/courses/${courseId}/search_teacher_candidate.json` let url = `/courses/${courseId}/search_teacher_candidate.json`
this.setState({ loading: true }) this.setState({ loading: true })
axios.post(url, { axios.post(url, {
page: page, page: page,
limit: pageCount, limit: pageCount,
school_name: school_name || '', school_name: school_name || '',
name: name || '' name: name || ''
}) })
.then((response) => { .then((response) => {
if (!response.data.candidates || response.data.candidates.length == 0) { if (!response.data.candidates || response.data.candidates.length == 0) {
this.setState({ this.setState({
page, page,
loading: false, loading: false,
hasMore: false, hasMore: false,
}) })
} else { } else {
this.setState({ this.setState({
candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates), candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates),
page, page,
loading: false, loading: false,
hasMore: response.data.candidates.length == pageCount hasMore: response.data.candidates.length == pageCount
}) })
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
componentDidMount() { componentDidMount() {
} }
fetchOptions = () => { fetchOptions = () => {
// add_teacher_popup // add_teacher_popup
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/add_teacher_popup.json` let url = `/courses/${courseId}/add_teacher_popup.json`
axios.get(url, { axios.get(url, {
}) })
.then((response) => { .then((response) => {
if (response.data.graduation_groups) { if (response.data.graduation_groups) {
this.setState({ this.setState({
graduation_groups: response.data.graduation_groups graduation_groups: response.data.graduation_groups
}) })
} }
if (response.data.course_groups) { if (response.data.course_groups) {
this.setState({ this.setState({
course_groups: response.data.course_groups course_groups: response.data.course_groups
}) })
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
setVisible = (visible) => { setVisible = (visible) => {
if (visible) { if (visible) {
this.fetchMemberList() this.fetchMemberList()
this.fetchOptions() this.fetchOptions()
} }
this.refs.modalWrapper.setVisible(visible) this.refs.modalWrapper.setVisible(visible)
if (visible == false) { if (visible == false) {
this.setState({ this.setState({
checkBoxValues: [] checkBoxValues: []
}) })
} }
} }
onSendOk = () => { onSendOk = () => {
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/add_teacher.json` const url = `/courses/${courseId}/add_teacher.json`
const params = { const params = {
"user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) , "user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) ,
"graduation_group_id": "2", "graduation_group_id": "2",
"course_group_id": "820", "course_group_id": "820",
// "role": ROLE_TEACHER_NUM // "role": ROLE_TEACHER_NUM
} }
const { graduationGroup, courseGroup } = this.state const { graduationGroup, courseGroup } = this.state
if (graduationGroup) { if (graduationGroup) {
params.graduation_group_id = graduationGroup params.graduation_group_id = graduationGroup
} }
if (courseGroup) { if (courseGroup) {
params.course_group_id = courseGroup params.course_group_id = courseGroup
} }
axios.post(url, params) axios.post(url, params)
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.setVisible(false) this.setVisible(false)
this.props.showNotification('添加成功') this.props.showNotification('添加成功')
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
onOk = () => { onOk = () => {
this.onSendOk() this.onSendOk()
} }
onCheckBoxChange = (checkBoxValues) => { onCheckBoxChange = (checkBoxValues) => {
this.setState({ this.setState({
checkBoxValues: checkBoxValues checkBoxValues: checkBoxValues
}) })
} }
handleInfiniteOnLoad = () => { handleInfiniteOnLoad = () => {
this.fetchMemberList(this.state.page + 1) this.fetchMemberList(this.state.page + 1)
} }
onSearch = () => { onSearch = () => {
this.fetchMemberList(1) this.fetchMemberList(1)
} }
handleGradationGroupChange = (value) => { handleGradationGroupChange = (value) => {
this.setState({ this.setState({
graduationGroup: value graduationGroup: value
}) })
} }
handleCourseGroupChange = (value) => { handleCourseGroupChange = (value) => {
this.setState({ this.setState({
courseGroup: value courseGroup: value
}) })
} }
render(){ render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name const { candidates, checkBoxValues, loading, hasMore, name, school_name
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state , graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
const { moduleName } = this.props const { moduleName } = this.props
return( return(
<ModalWrapper <ModalWrapper
ref="modalWrapper" ref="modalWrapper"
width="700px" width="700px"
title={`代码查重`} title={`代码查重`}
{...this.props } {...this.props }
onOk={this.onOk} onOk={this.onOk}
className="checkCodeModal" className="checkCodeModal"
> >
<style> <style>
{` {`
.demo-loading-container { .demo-loading-container {
position: absolute; position: absolute;
bottom: 93px; bottom: 93px;
width: 82%; width: 82%;
text-align: center; text-align: center;
} }
.df { .df {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
margin: 12px 0; margin: 12px 0;
} }
.firstLabel { .firstLabel {
flex: 0 0 60px; flex: 0 0 60px;
} }
.df span.label { .df span.label {
margin-right: 8px; margin-right: 8px;
text-align: right; text-align: right;
margin-left: 12px; margin-left: 12px;
} }
.df .ant-input-affix-wrapper { .df .ant-input-affix-wrapper {
width: 32%; width: 32%;
} }
.checkCodeModal label.task-hide { .checkCodeModal label.task-hide {
width: 100%; width: 100%;
} }
`} `}
</style> </style>
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}> <p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox> <Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'分班名称'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'分班名称'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'有效作品数'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'有效作品数'}</label></span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'上次查重时间'}</label></span> <span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'上次查重时间'}</label></span>
</p> </p>
<div> <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */} {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}> <div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{ candidates && candidates.map( candidate => { { candidates && candidates.map( candidate => {
return ( return (
<p className="clearfix mb7" key={candidate.id}> <p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} ></Checkbox> <Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25"> <span className="fl with25">
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }> <ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with25"> <span className="fl with25">
<ConditionToolTip title={candidate.nickname} condition={candidate.nickname && candidate.nickname.length > 12 }> <ConditionToolTip title={candidate.nickname} condition={candidate.nickname && candidate.nickname.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname}</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span> <span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
</p> </p>
) )
}) } }) }
</Checkbox.Group> </Checkbox.Group>
</div> </div>
</div> </div>
</ModalWrapper> </ModalWrapper>
) )
} }
} }
export default CheckCodeModal; export default CheckCodeModal;

@ -561,7 +561,7 @@ class ExerciseReviewAndAnswer extends Component{
</p> </p>
{ {
exercise && exercise.exercise_description && exercise && exercise.exercise_description &&
<p className="color-grey-3 edu-back-white padding15 edu-txt-center mt30">{exercise.exercise_description}</p> <p className="color-grey-3 edu-back-white padding15 mt30">{exercise.exercise_description}</p>
} }
<p className="padding20-30 clearfix"> <p className="padding20-30 clearfix">
{ {

@ -1,5 +1,5 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn,markdownToHTML} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
@ -102,9 +102,9 @@ class Exercisestatisticalresult extends Component {
} }
`} `}
</style> </style>
<div className={"educontent mb20" }> <div className={"educontent mb20" } style={{width: "1250px"}}>
{data&&data.course_groups.length===0?"":<div className="stud-class-set bor-bottom-greyE"> {data&&data.course_groups.length===0?"":<div className="stud-class-set">
<div className="clearfix edu-back-white"> <div className="clearfix edu-back-white">
<ul className="clearfix" style={{padding:'20px'}}> <ul className="clearfix" style={{padding:'20px'}}>
<li className="clearfix mt10"> <li className="clearfix mt10">
@ -180,13 +180,16 @@ class Exercisestatisticalresult extends Component {
{data&&data.commit_results.map((item,key)=>{ {data&&data.commit_results.map((item,key)=>{
return( return(
<div className="stud-class-set bor-greyE mb20" key={key}> <div className="stud-class-set mb20" key={key}>
<div className="clearfix edu-back-white poll_list" style={{padding: '20px'}}> <div className="clearfix edu-back-white poll_list" style={{padding: '20px'}}>
<div className="font-16 shixunreporttitle fl" > <div className="font-16 shixunreporttitle fl" >
<span className="CACFF">{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span> <span className="CACFF">{item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span>
<span>Q{item.ques_position} <div>
<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span> {/*Q{item.ques_position}*/}
</span> <div dangerouslySetInnerHTML={{__html: markdownToHTML(item.ques_title).replace(/▁/g,"▁▁▁")}}></div>
{/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/}
</div>
</div> </div>
<div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div> <div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
</div> </div>

@ -1,181 +1,186 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn} from 'educoder';
import {Table} from "antd"; import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
class OfficialAcademicTranscript extends Component { class OfficialAcademicTranscript extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
loadingstate:true, loadingstate:true,
datas:undefined datas:undefined
} }
} }
componentDidMount() { componentDidMount() {
} }
render() { render() {
let {data}=this.props; let {data}=this.props;
let datas=[]; let datas=[];
// data&&data.exercise_counts.forEach((item,key)=>{ }) // data&&data.exercise_counts.forEach((item,key)=>{ })
datas.push({ datas.push({
commit_percent:data&&data.exercise_counts.commit_percent, commit_percent:data&&data.exercise_counts.commit_percent,
min_score:data&&data.exercise_counts.min_score, min_score:data&&data.exercise_counts.min_score,
max_score:data&&data.exercise_counts.max_score, max_score:data&&data.exercise_counts.max_score,
average_score:data&&data.exercise_counts.average_score, average_score:data&&data.exercise_counts.average_score,
fail_counts:data&&data.exercise_counts.fail_counts, fail_counts:data&&data.exercise_counts.fail_counts,
pass_counts:data&&data.exercise_counts.pass_counts, pass_counts:data&&data.exercise_counts.pass_counts,
good_counts:data&&data.exercise_counts.good_counts, good_counts:data&&data.exercise_counts.good_counts,
best_counts:data&&data.exercise_counts.best_counts, best_counts:data&&data.exercise_counts.best_counts,
}) })
let columns=[{ let columns=[{
title: '提交率', title: '提交率',
dataIndex: 'commit_percent', dataIndex: 'commit_percent',
key: 'commit_percent', key: 'commit_percent',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#333333'}}> <span style={{color:'#333333'}}>
{record.commit_percent===0?0:(record.commit_percent*100).toFixed(2)}<span className={"font-size12"}>%</span> {record.commit_percent===0?0:(record.commit_percent*100).toFixed(2)}<span className={"font-size12"}>%</span>
</span> </span>
), ),
}, { }, {
title: '最低分', title: '最低分',
dataIndex: 'min_score', dataIndex: 'min_score',
key: 'min_score', key: 'min_score',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<span style={{color:'#333333'}}>{record.min_score}<span className={"font-size12"}></span></span> <span style={{color:'#333333'}}>{record.min_score}<span className={"font-size12"}></span></span>
</span> </span>
), ),
}, { }, {
title: '最高分', title: '最高分',
dataIndex: 'max_score', dataIndex: 'max_score',
key: 'max_score', key: 'max_score',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#FF6800'}}> <span style={{color:'#FF6800'}}>
{record.max_score}<span className={"font-size12"}></span> {record.max_score}<span className={"font-size12"}></span>
</span> </span>
), ),
}, { }, {
title: '平均分', title: '平均分',
key: 'average_score', key: 'average_score',
dataIndex: 'average_score', dataIndex: 'average_score',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#333333'}}> <span style={{color:'#333333'}}>
{record.average_score}<span className={"font-size12"}></span> {record.average_score}<span className={"font-size12"}></span>
</span> </span>
), ),
}, { }, {
title: '不及格(0-60)', title: '不及格(0-60)',
key: 'fail_counts', key: 'fail_counts',
dataIndex: 'fail_counts', dataIndex: 'fail_counts',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#333333'}}> <span style={{color:'#333333'}}>
{record.fail_counts}<span className={"font-size12"}></span> {record.fail_counts}<span className={"font-size12"}></span>
</span> </span>
), ),
}, { }, {
title: '及格(60-70)', title: '及格(60-70)',
key: 'pass_counts', key: 'pass_counts',
dataIndex: 'pass_counts', dataIndex: 'pass_counts',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#333333'}}> <span style={{color:'#333333'}}>
{record.pass_counts}<span className={"font-size12"}></span> {record.pass_counts}<span className={"font-size12"}></span>
</span> </span>
), ),
}, { }, {
title: '良好(70-90)', title: '良好(70-90)',
key: 'good_counts', key: 'good_counts',
dataIndex: 'good_counts', dataIndex: 'good_counts',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<span style={{color:'#333333'}}>{record.good_counts}<span className={"font-size12"}></span></span> <span style={{color:'#333333'}}>{record.good_counts}<span className={"font-size12"}></span></span>
</span> </span>
), ),
}, { }, {
title: '优秀(90-100)', title: '优秀(90-100)',
key: 'best_counts', key: 'best_counts',
dataIndex: 'best_counts', dataIndex: 'best_counts',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<span style={{color:'#FF6800'}}>{record.best_counts}<span className={"font-size12"}></span></span> <span style={{color:'#FF6800'}}>{record.best_counts}<span className={"font-size12"}></span></span>
</span> </span>
), ),
}]; }];
// { // {
// title: '调分', // title: '调分',
// key: 'adjustmentminute', // key: 'adjustmentminute',
// dataIndex: 'adjustmentminute', // dataIndex: 'adjustmentminute',
// //
// render: (text, record) => ( // render: (text, record) => (
// <span> // <span>
// <a>6小时 50分钟 6秒</a> // <a>6小时 50分钟 6秒</a>
// </span> // </span>
// ), // ),
// }, // },
return ( return (
<div> <div>
{/*{data===undefined?"":""}*/} {/*{data===undefined?"":""}*/}
<style>{` <style>{`
.ant-table-thead > tr > th{ .ant-table-thead > tr > th{
text-align: center; text-align: center;
} }
.tasknamebox{ .tasknamebox{
width: 50px; width: 50px;
height: 24px; height: 24px;
border: 1px solid rgba(221,23,23,1); border: 1px solid rgba(221,23,23,1);
border-radius: 12px; border-radius: 12px;
color: rgba(221,23,23,1); color: rgba(221,23,23,1);
display: inline-block; display: inline-block;
line-height: 24px; line-height: 24px;
} }
.tasknameboxs{ .tasknameboxs{
color: #666666 !important; color: #666666 !important;
background:rgba(237,237,237,1) !important; background:rgba(237,237,237,1) !important;
} }
.ant-table-tbody > tr > td{ .ant-table-tbody > tr > td{
font-size:14px; font-size:14px;
} }
.task-hide{ .task-hide{
max-width: 345px; max-width: 345px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.ant-table-tbody > tr{ .ant-table-tbody > tr{
height:64px; height:64px;
text-align: center; text-align: center;
} }
`} .exerctabel .ant-table-tbody > tr >td{
</style> border:1px solid transparent;
{datas===undefined?"":<Table }
dataSource={datas}
columns={columns} `}
pagination={false} </style>
// loading={loadingstate} {datas===undefined?"":<Table
// onChange={this.TablePagination} className={"exerctabel"}
/>} dataSource={datas}
</div> columns={columns}
pagination={false}
) // loading={loadingstate}
} // onChange={this.TablePagination}
} />}
</div>
)
}
}
export default OfficialAcademicTranscript; export default OfficialAcademicTranscript;

@ -66,12 +66,16 @@ class Exercisetablesmubus extends Component {
width:'300px', width:'300px',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#FF6800'}}> <span style={{color:'#FF6800'}}>
{record.max_score===undefined?"":<Progress {record.max_score===undefined?"":<span>
strokeColor={{ <div style={{
'0%': '#29BD8B', float: 'left',
'100%': '#29BD8B', width: '220px'
}} }}><Progress
percent={record.max_score*100} showInfo={false} />} strokeColor={{
'0%': '#29BD8B',
'100%': '#29BD8B',
}}
percent={record.max_score*100} showInfo={false}/></div><div className={"fr"}>{record.max_score*100}%</div></span>}
</span> </span>
), ),
}]; }];
@ -125,10 +129,14 @@ class Exercisetablesmubus extends Component {
} }
.ant-table-tbody > tr > td:nth-child(1){ .ant-table-tbody > tr > td:nth-child(1){
text-align: left; text-align: left;
}
.Exermubu .ant-table-tbody > tr:nth-last-child(1) > td{
border:1px solid transparent;
} }
`} `}
</style> </style>
{datas===undefined?"":<Table {datas===undefined?"":<Table
className={"Exermubu"}
dataSource={datas} dataSource={datas}
columns={columns} columns={columns}
pagination={false} pagination={false}

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return( return(
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"}> <div className={"educontent mb20"} style={{width:"1250px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals {this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback} callback={this.callback}
/>:""} />:""}
<div className="educontent mb20"> <div className="educontent mb20" style={{width:"1250px"}}>
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn> <ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`} `}
</style> </style>
<div className="educontent"> <div className="educontent" style={{width:"1250px"}}>
<p className=" fl color-black summaryname "> <p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name} {Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p> </p>
@ -222,6 +222,8 @@ class Testpapersettinghomepage extends Component{
: :
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0">答题列表</Menu.Item> <Menu.Item key="0">答题列表</Menu.Item>
{Commonheadofthetestpaper&&Commonheadofthetestpaper.show_statistic===true?
<Menu.Item key="1">统计结果</Menu.Item>:""}
<Menu.Item key="3">设置</Menu.Item> <Menu.Item key="3">设置</Menu.Item>
</Menu> </Menu>
} }
@ -258,9 +260,9 @@ class Testpapersettinghomepage extends Component{
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a <li><a
onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)} onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}
calssName="color-dark">学生成绩</a></li> className="color-dark">学生成绩</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} calssName="color-dark">空白试卷</a></li> <li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} className="color-dark">空白试卷</a></li>
<li><a calssName="color-dark" <li><a className="color-dark"
onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)} onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}
>学生答题试卷</a></li> >学生答题试卷</a></li>
</ul> </ul>

@ -55,21 +55,25 @@ class SingleEditor extends Component{
// TODO check // TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
const intScore = parseFloat(question_score) const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) { if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return; this.props.showNotification('分值不能为空'); return;
} else { } else {
if (intScore == 0) { if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return; this.props.showNotification('分值必须大于0'); return;
} }
} }
if(!answerArray || answerArray.length == 0) { if(!answerArray || answerArray.length == 0) {
this.props.showNotification('请先点击本题的正确选项'); return; this.props.showNotification('必须设置标准答案'); return;
} }
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
/** /**
@ -185,12 +189,14 @@ class SingleEditor extends Component{
<TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false} <TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})} initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor> ></TPMMDEditor>
<div> <div>
<RadioGroup onChange={this.onOptionClick} value={standard_answers[0]}> <RadioGroup onChange={this.onOptionClick} value={standard_answers[0]}>
<Radio value={true} disabled={exerciseIsPublish}></Radio> {/* disabled={exerciseIsPublish} */}
<Radio value={false} disabled={exerciseIsPublish}></Radio> <Radio value={true} ></Radio>
<Radio value={false} ></Radio>
</RadioGroup> </RadioGroup>
{/* not work */} {/* not work */}
{/* <Radio value={standard_answers[0]} onClick={() => this.onOptionClick(0)} disabled={exerciseIsPublish}></Radio> {/* <Radio value={standard_answers[0]} onClick={() => this.onOptionClick(0)} disabled={exerciseIsPublish}></Radio>

@ -45,14 +45,17 @@ class MainEditor extends Component{
// TODO check // TODO check
const answerArray = standard_answers const answerArray = standard_answers
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
const intScore = parseFloat(question_score) const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) { if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return; this.props.showNotification('分值不能为空'); return;
} else { } else {
if (intScore == 0) { if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return; this.props.showNotification('分值必须大于0'); return;
} }
} }
// if(!answerArray || answerArray.length == 0 || !answerArray[0]) { // if(!answerArray || answerArray.length == 0 || !answerArray[0]) {
@ -151,7 +154,7 @@ class MainEditor extends Component{
<TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false} <TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})} initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
noStorage={true} noStorage={true} ref="titleEditor"
></TPMMDEditor> ></TPMMDEditor>
<div> <div>

@ -35,6 +35,10 @@ class NullChildEditor extends Component{
// this.mdReactObject = that; // this.mdReactObject = that;
// } // }
showError = (itemIndex) => {
this.refs[`nullChildDMDEditor${itemIndex}`].showError()
}
render() { render() {
let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; let { question_title, question_score, question_type, question_choices, standard_answers } = this.state;
let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish,
@ -49,6 +53,7 @@ class NullChildEditor extends Component{
return <div className="df flex1" > return <div className="df flex1" >
<div className="flex1" style={{ flex: '0 0 1000px'}}> <div className="flex1" style={{ flex: '0 0 1000px'}}>
<DMDEditor <DMDEditor
ref={`nullChildDMDEditor${itemIndex}`}
className={'nullChildEditor'} className={'nullChildEditor'}
placeholder={`请输入参考答案${itemIndex == 0 ?'':'(可选)'}`} placeholder={`请输入参考答案${itemIndex == 0 ?'':'(可选)'}`}
toMDMode={toMDMode} noStorage={true} toMDMode={toMDMode} noStorage={true}

@ -86,7 +86,7 @@ class NullDisplay extends Component{
padding:12px 10px; padding:12px 10px;
margin-bottom:10px; margin-bottom:10px;
border-radius:2px; border-radius:2px;
max-width: 1024px; width: 1024px;
word-break: break-all; word-break: break-all;
} }
.answerRow { .answerRow {

@ -69,14 +69,16 @@ class NullEditor extends Component{
// const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); // const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
let answerArray = [] let answerArray = []
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
const intScore = parseFloat(question_score) const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) { if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return; this.props.showNotification('分值不能为空'); return;
} else { } else {
if (intScore == 0) { if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return; this.props.showNotification('分值必须大于0'); return;
} }
} }
let isEmpty = false; let isEmpty = false;
@ -88,7 +90,9 @@ class NullEditor extends Component{
answers.forEach((item, itemIndex) => { answers.forEach((item, itemIndex) => {
answerArray[index].answer_text.push(item) answerArray[index].answer_text.push(item)
if(!item) { if(!item) {
this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`); this.refs[`nullChildEditor${index}`].showError(itemIndex)
// this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`);
this.props.showNotification(`答案:不能为空`);
isEmpty = true; isEmpty = true;
} }
}) })
@ -97,7 +101,9 @@ class NullEditor extends Component{
return; return;
} }
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
/** /**
@ -294,13 +300,16 @@ class NullEditor extends Component{
<NullMDEditor {...this.props} mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false} <NullMDEditor {...this.props} mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})} initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
onPlaceholderChange={this.onPlaceholderChange} showNullButton={exerciseIsPublish ? false : true} onPlaceholderChange={this.onPlaceholderChange} showNullButton={exerciseIsPublish ? false : true}
ref="titleEditor"
></NullMDEditor> ></NullMDEditor>
<div className="clearfix"> <div className="clearfix">
{ {
standard_answers.map((answers, index) => { standard_answers.map((answers, index) => {
return <NullChildEditor {...this.props} return <NullChildEditor
ref={`nullChildEditor${index}`}
{...this.props}
toMDMode={this.toMDMode} toMDMode={this.toMDMode}
answers={answers} answers={answers}
index={index} index={index}

@ -84,7 +84,9 @@ export default class NullMDEditor extends Component {
} }
showError = () => {
this.refs['nullMDEditor'].showError()
}
render() { render() {
let { let {
@ -94,6 +96,7 @@ export default class NullMDEditor extends Component {
return ( return (
<TPMMDEditor {...this.props} <TPMMDEditor {...this.props}
onCMBeforeChange={this.onCMBeforeChange} onCMBeforeChange={this.onCMBeforeChange}
ref='nullMDEditor'
> >
</TPMMDEditor> </TPMMDEditor>
) )

@ -98,7 +98,7 @@ class ShixunEditor extends Component{
// } // }
for(let _i = 0; _i < question_scores.length; _i++) { for(let _i = 0; _i < question_scores.length; _i++) {
if (!question_scores[_i] || question_scores[_i] == '0') { if (!question_scores[_i] || question_scores[_i] == '0') {
this.props.showNotification(`${_i+1}题的分值必须大于0`); return; this.props.showNotification(`${_i+1}题的分值必须大于0`); return;
} }
} }

@ -87,7 +87,10 @@ class SingleEditor extends Component{
// TODO check // TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1); const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
const intScore = parseFloat(question_score) const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) { if(!question_score || intScore == NaN) {
@ -101,11 +104,15 @@ class SingleEditor extends Component{
this.props.showNotification('请先点击选择本选择题的正确选项'); return; this.props.showNotification('请先点击选择本选择题的正确选项'); return;
} }
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
} }
for(let i = 0; i < question_choices.length; i++) { for(let i = 0; i < question_choices.length; i++) {
if (!question_choices[i]) { if (!question_choices[i]) {
this.refs[`optionEditor${i}`].showError()
this.props.showNotification(`请先输入 ${tagArray[i]} 选项的内容`); return; this.props.showNotification(`请先输入 ${tagArray[i]} 选项的内容`); return;
} }
} }
@ -165,9 +172,9 @@ class SingleEditor extends Component{
} }
onOptionClick = (index) => { onOptionClick = (index) => {
if (this.props.exerciseIsPublish) { // if (this.props.exerciseIsPublish) {
return; // return;
} // }
let standard_answers = this.state.standard_answers.slice(0) let standard_answers = this.state.standard_answers.slice(0)
standard_answers[index] = !standard_answers[index] standard_answers[index] = !standard_answers[index]
this.setState({ standard_answers }) this.setState({ standard_answers })
@ -237,6 +244,8 @@ class SingleEditor extends Component{
<TPMMDEditor mdID={qNumber} placeholder="请您输入题目" height={155} watch={false} className="mb20" <TPMMDEditor mdID={qNumber} placeholder="请您输入题目" height={155} watch={false} className="mb20"
initValue={question_title} onChange={(val) => this.setState({ question_title: val})} initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor> ></TPMMDEditor>
{question_choices.map( (item, index) => { {question_choices.map( (item, index) => {
@ -247,13 +256,14 @@ class SingleEditor extends Component{
{/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */} {/* <Tooltip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'}> */}
<span class={`option-item fr mr10 color-grey select-choice ${bg} `} <span class={`option-item fr mr10 color-grey select-choice ${bg} `}
name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}> name="option_span" onClick={() => this.onOptionClick(index)} style={{flex: '0 0 38px'}}>
<ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={!exerciseIsPublish}> <ConditionToolTip title={standard_answers[index] ? '点击取消标准答案设置' : '点击设置为标准答案'} placement="left" condition={true}>
<div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div> <div style={{width: '100%', height: '100%'}}>{tagArray[index]}</div>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
{/* </Tooltip> */} {/* </Tooltip> */}
<div style={{ flex: '0 0 1038px'}}> <div style={{ flex: '0 0 1038px'}}>
<DMDEditor <DMDEditor
ref={`optionEditor${index}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode} toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={166} className={'optionMdEditor'} watch={false} noStorage={true} height={166} className={'optionMdEditor'} watch={false} noStorage={true}
mdID={qNumber + index} placeholder="" onChange={(value) => this.onOptionContentChange(value, index)} mdID={qNumber + index} placeholder="" onChange={(value) => this.onOptionContentChange(value, index)}

@ -35,6 +35,7 @@ class GraduationTasksSubmitedit extends Component{
attachments:undefined, attachments:undefined,
spinnings:false, spinnings:false,
shixunsreplace:false, shixunsreplace:false,
limit:20
} }
} }
@ -59,7 +60,7 @@ class GraduationTasksSubmitedit extends Component{
if(result.data.task_type===1){ if(result.data.task_type===1){
}else{ }else{
this.searchList("",1,10,result.data.task_id) this.searchList("",1,20,result.data.task_id)
} }
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -222,15 +223,15 @@ class GraduationTasksSubmitedit extends Component{
let {search,workslist} = this.state; let {search,workslist} = this.state;
this.searchList(search,1,10,workslist.task_id) this.searchList(search,1,20,workslist.task_id)
} }
searchList=(search,page,limit,id)=>{ searchList=(search,page,limit,id,types)=>{
let {memberslist}=this.state;
let newmemberslist=memberslist
this.setState({ this.setState({
search:search,
page:page,
limit:10
}) })
let newid=id let newid=id
if(newid===undefined){ if(newid===undefined){
@ -245,9 +246,28 @@ class GraduationTasksSubmitedit extends Component{
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
this.setState({ if(types===1){
memberslist:result.data if(result.data.members.length>0) {
}) result.data.members.map((item, key) => {
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
} }
}).catch((error)=>{ }).catch((error)=>{
@ -265,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{
let newpage=page+2 let newpage=page+2
this.searchList(search,newpage,limit,workslist.task_id) this.searchList(search,newpage,limit,workslist.task_id,1)
} }
@ -274,7 +294,7 @@ class GraduationTasksSubmitedit extends Component{
funtaskstatus=(checkedValues)=>{ funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state; let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members; let newlist =memberslist;
let newcheckedValues=checkedValues; let newcheckedValues=checkedValues;
let selects=[]; let selects=[];
@ -666,8 +686,8 @@ class GraduationTasksSubmitedit extends Component{
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.width87{ .width100{
width: 87px; width: 100px;
height: 24px; height: 24px;
} }
img.edu-nodata-img { img.edu-nodata-img {
@ -675,22 +695,25 @@ class GraduationTasksSubmitedit extends Component{
margin: 50px 90px 20px; margin: 50px 90px 20px;
display: block; display: block;
} }
.autos{
overflow: auto;
}
`}</style> `}</style>
</Form.Item> </Form.Item>
<div className={"ml20 mt10"} style={{width:"100%"}}> <div className={"ml20 mt10"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl autos"}
style={{paddingLeft: '9px'}} style={{paddingLeft: '9px'}}
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===undefined?"":memberslist.members.length===0? <div className="square-list clearfix"> {memberslist===undefined?"":memberslist.length===0? <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p> <p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div> </div>
</div>:memberslist&&memberslist.members.map((item,key)=>{ </div>:memberslist&&memberslist.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px', width: '375px',
@ -703,9 +726,9 @@ class GraduationTasksSubmitedit extends Component{
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div> <div className={"fl ml5 fonthidden width100"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100 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 ml5 color-grey-9 fonthidden width100"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
@ -719,22 +742,30 @@ class GraduationTasksSubmitedit extends Component{
<i className={"iconfont icon-youjiang fl ml20 mr20"}></i> <i className={"iconfont icon-youjiang fl ml20 mr20"}></i>
</div> </div>
<div className={"members fl"}> <div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{ {selectmemberslist&&selectmemberslist.map((item,key)=>{
return( if(item.group_name!=undefined) {
<div key={key} style={{ return (
width: '375px', <div key={key} style={{
height: '30px', width: '375px',
display:item.user_name===undefined?"none":"" height: '30px',
}}> display: item.user_name === undefined ? "none" : ""
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}} title={item.user_name}>{item.user_name}</div> }}>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100"} style={{width: '50px'}}
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> title={item.user_name}>{item.user_name}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} <div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
</div> <div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
) {key > 0 ?
<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"}
style={{marginTop: '-4px'}}
onClick={() => this.delecttask_status(item.user_id)}></i>
</div> : ""}
</div>
)
}
})} })}
</div> </div>

@ -32,7 +32,8 @@ class GraduationTasksSubmitnew extends Component{
selectobjct:undefined, selectobjct:undefined,
Loadtype:false, Loadtype:false,
spinnings:false, spinnings:false,
shixunsreplace:false shixunsreplace:false,
limit:20
} }
} }
@ -58,7 +59,7 @@ class GraduationTasksSubmitnew extends Component{
if(result.data.task_type===1){ if(result.data.task_type===1){
}else{ }else{
this.searchList("",1,10) this.searchList("",1,20)
} }
this.setState({ this.setState({
workslist:result.data, workslist:result.data,
@ -215,29 +216,46 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state; let {search} = this.state;
this.searchList(search,1,10) this.searchList(search,1,20)
} }
searchList=(search,page,limit)=>{ searchList=(search,page,limit,types)=>{
this.setState({
search:search,
page:page,
limit:10
})
let id=this.props.match.params.task_Id; let id=this.props.match.params.task_Id;
let {memberslist}=this.state;
let newmemberslist=memberslist
let url="/graduation_tasks/"+id+"/graduation_works/search_member_list.json"; let url="/graduation_tasks/"+id+"/graduation_works/search_member_list.json";
axios.post(url,{ axios.post(url,{
search:search, search:search,
page:page, page:page,
limit:limit limit:15
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status!=403){ if(result.data.status!=403){
this.setState({ if(types===1){
memberslist:result.data if(result.data.members.length>0){
}) result.data.members.map((item,key)=>{
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
} }
} }
@ -256,7 +274,7 @@ class GraduationTasksSubmitnew extends Component{
let newpage=page+2 let newpage=page+2
this.searchList(search,newpage,limit) this.searchList(search,newpage,limit,1)
} }
@ -265,7 +283,7 @@ class GraduationTasksSubmitnew extends Component{
funtaskstatus=(checkedValues)=>{ funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state; let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members; let newlist =memberslist;
let newcheckedValues=checkedValues; let newcheckedValues=checkedValues;
let selects=[]; let selects=[];
selects.push(selectobjct) selects.push(selectobjct)
@ -318,7 +336,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state; let {search} = this.state;
this.searchList(search,1,10) this.searchList(search,1,20)
} }
} }
onSearchKeywordKeyUps= (e)=>{ onSearchKeywordKeyUps= (e)=>{
@ -648,8 +666,8 @@ render(){
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.width87{ .width100{
width: 87px; width: 100px;
height: 24px; height: 24px;
} }
img.edu-nodata-img { img.edu-nodata-img {
@ -657,21 +675,25 @@ render(){
margin: 50px 90px 20px; margin: 50px 90px 20px;
display: block; display: block;
} }
.autos{
overflow: auto;
}
`}</style> `}</style>
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl autos"}
style={{paddingLeft: '9px'}} style={{paddingLeft: '9px'}}
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===undefined?"":memberslist.members.length===0? {memberslist===undefined?"":memberslist.length===0?
<div className="square-list clearfix"> <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p> {/*<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>*/}
<p className="edu-nodata-p mb20">未找到该学生</p>
</div> </div>
</div>:memberslist&&memberslist.members.map((item,key)=>{ </div>:memberslist&&memberslist.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
@ -684,9 +706,9 @@ render(){
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} title={item.user_name} >{item.user_name}</div> <div className={"fl ml5 fonthidden width100"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100 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 ml5 color-grey-9 fonthidden width100"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div> </div>
) )
@ -704,22 +726,25 @@ render(){
white-space:nowrap white-space:nowrap
} }
`}</style> `}</style>
<div className={"members fl"}> <div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{ {selectmemberslist&&selectmemberslist.map((item,key)=>{
return( if(item.group_name!=undefined){
<div key={key} style={{ return(
width: '375px', <div key={key} style={{
height: '30px', width: '375px',
display:item.user_name===undefined?"none":"" height: '30px',
}}> display:item.user_name===undefined?"none":""
<div className={"fl ml5 fonthidden width87"} title={item.user_name}>{item.user_name}</div> }}>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width100"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> <div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} <div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
) </div>
)
}
})} })}
</div> </div>

@ -33,7 +33,7 @@ class GraduationTasksedit extends Component{
componentDidMount(){ componentDidMount(){
let {title_num}=this.state;
let tasksid=this.props.match.params.category_id; let tasksid=this.props.match.params.category_id;
let url ="/graduation_tasks/"+tasksid+"/edit.json" let url ="/graduation_tasks/"+tasksid+"/edit.json"
@ -52,15 +52,18 @@ class GraduationTasksedit extends Component{
} }
} }
let namelength=result.data.task_name.length;
let sixlength=title_num-namelength
this.setState({ this.setState({
fileList:newfilelist, fileList:newfilelist,
description:result.data.description, description:result.data.description,
tasktype:result.data.task_type, tasktype:result.data.task_type,
name:result.data.task_name, name:result.data.task_name,
data:result.data, data:result.data,
title_num:sixlength
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
tasktype:result.data.task_type, tasktype:result.data.task_type,
name:result.data.task_name, name:result.data.task_name,
@ -240,12 +243,12 @@ class GraduationTasksedit extends Component{
handleSubmit=(e)=>{ handleSubmit=(e)=>{
let {fileList}=this.state; let {fileList}=this.state;
if(fileList.length===0){ // if(fileList.length===0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
return // return
} // }
this.Commoninterface(fileList); this.Commoninterface(fileList);
} }

@ -214,13 +214,13 @@ class GraduationTasksnew extends Component {
// 提交按钮 // 提交按钮
handleSubmit = (e) => { handleSubmit = (e) => {
let {fileList} = this.state; let {fileList} = this.state;
if(fileList.length===0){ // if(fileList.length===0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
//
return // return
} // }
this.Commoninterface(fileList); this.Commoninterface(fileList);
@ -342,8 +342,17 @@ class GraduationTasksnew extends Component {
</style> </style>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb25 edu-back-white"> <div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb25 edu-back-white">
<style>
<Form.Item label="类型" > {
`
.tasktype .ant-form-explain{
margin-top: -20px;
margin-bottom: 15px;
}
`
}
</style>
<Form.Item label="类型" className={"tasktype"}>
{getFieldDecorator('tasktype', { {getFieldDecorator('tasktype', {
rules: [{required: true, message: "请选择任务类型"}], rules: [{required: true, message: "请选择任务类型"}],
})(<Select className={"greyInput mb20"} })(<Select className={"greyInput mb20"}
@ -355,8 +364,17 @@ class GraduationTasksnew extends Component {
<input type="hidden" id='tasktypes'/> <input type="hidden" id='tasktypes'/>
<span className={"newcoursestitle"}>选择确认后无法修改</span> <span className={"newcoursestitle"}>选择确认后无法修改</span>
</Form.Item> </Form.Item>
<style>
<Form.Item label="任务标题" > {
`
.taskname .ant-form-explain{
margin-top: 0px;
margin-bottom: 0px;
}
`
}
</style>
<Form.Item label="任务标题" className={"taskname"} >
{getFieldDecorator('name', { {getFieldDecorator('name', {
rules: [{required: true, message: "不能为空"}], rules: [{required: true, message: "不能为空"}],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle} })(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle}

@ -1056,13 +1056,16 @@ class GraduationTaskssettingapp extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1165,7 +1168,8 @@ class GraduationTaskssettingapp extends Component{
value={end_time===null||end_time===""?"":moment(end_time, dateFormat)} value={end_time===null||end_time===""?"":moment(end_time, dateFormat)}
onChange={this.onChangeTimeend} onChange={this.onChangeTimeend}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
disabled={this.props.isSuperAdmin()===true?flagPageEdit===true?false:true:this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true} // disabled={this.props.isSuperAdmin()===true?flagPageEdit===true?false:true:this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
disabled={this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
className={this.state.endTimetypes===true||end_timetype===true?"noticeTip":""} className={this.state.endTimetypes===true||end_timetype===true?"noticeTip":""}
/> />
</span> </span>
@ -1248,7 +1252,8 @@ class GraduationTaskssettingapp extends Component{
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36"> <div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div> <div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div> <div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span> <Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox> </Checkbox>
{crosscomment===true?<div> {crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}> <div className={"h20 mb30 ml30 mt20 ml87"}>

@ -73,7 +73,7 @@ class GraduationTaskssettingReply extends Component{
const user = this._getUser(); const user = this._getUser();
this.setState({ this.setState({
comments: addNewComment(this.state.comments, _id, content, user), comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1 total_count: this.state.total_count + 1
}) })
this.refs.editor.showEditor(); this.refs.editor.showEditor();

@ -701,7 +701,7 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#989898'}}> <a style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm')}
</a> </a>
</span> </span>
), ),
@ -741,11 +741,11 @@ class GraduationTaskssettinglist extends Component{
className:'edu-txt-center', className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore.work_score==="--"?"未评阅": <pre> <Tooltip placement="right" title={record.finalscore.work_score==="--"?"未评阅": <pre>
{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/> {record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/> {record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>} {record.finalscore.cross_comment_score===undefined||record.finalscore.cross_comment_score==="未批阅"?"交叉评分:--":"交叉评分:"+record.finalscore.cross_comment_score+"分"}<br/>
{record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"+<br/>} {record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"}<br/>
最终成绩{record.finalscore.work_score}<br/> 最终成绩{record.finalscore.work_score}<br/>
</pre>}> </pre>}>
<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a> <a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
@ -800,55 +800,62 @@ class GraduationTaskssettinglist extends Component{
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let task_Id = this.props.match.params.task_Id; let task_Id = this.props.match.params.task_Id;
if(this.props.isStudent()===true){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
if(taskslistdata&&taskslistdata.course_group_count<=0){ if(taskslistdata&&taskslistdata.course_group_count<=0){
//分班有显示
columns.map((item,key)=>{ columns.some((item,key)=> {
if(item.title==="分班"){ if (item.title === "分班") {
columns.splice(key,1) columns.splice(key, 1)
return true
}
} }
}) )
} }
if(taskslistdata&&taskslistdata.cross_comment===false){ if(taskslistdata&&taskslistdata.cross_comment===false){
columns.map((item,key)=>{ columns.some((item,key)=> {
if(item.title==="交叉评分"){ if (item.title === "交叉评分") {
columns.splice(key,1) columns.splice(key, 1)
return true
}
}
)
}
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> {
if (item.title === "关联项目") {
columns.splice(key, 1)
return true
} }
}) }
)
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.map((item,key)=>{
if(item.title==="关联项目"){
columns.splice(key,1)
}
})
columns.map((item,key)=>{ columns.some((item,key)=> {
if(item.title==="分组"){ if (item.title === "分组") {
columns.splice(key,1) columns.splice(key, 1)
} return true
}) }
} }
)
}else{
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.map((item,key)=>{
if(item.title==="关联项目"){
columns.splice(key,1)
}
})
columns.map((item,key)=>{ }
if(item.title==="分组"){
columns.splice(key,1)
}
})
}
}
return( return(
<React.Fragment> <React.Fragment>
@ -1010,13 +1017,16 @@ class GraduationTaskssettinglist extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">学生成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1141,17 +1151,28 @@ class GraduationTaskssettinglist extends Component{
</ul> </ul>
<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}> <div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<style>
{
`
.edu-menu-lists li:hover {
background: #f0f0f0 !important;
}
.edu-menu-lists li:hover a{
color: #666 !important;
}
`
}
</style>
<div className="clearfix"> <div className="clearfix">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12"> {this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span> <span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""} 个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel"> {this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p> <p>
<a data-remote="true"> <a data-remote="true" class="color-grey-6 font-12">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a> {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p> <i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list"> <ul className="edu-menu-list edu-menu-lists" style={{width: '87px'}}>
<li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a> <li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a>
</li> </li>
<li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a> <li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a>

@ -303,13 +303,16 @@ class GraduationTasksquestions extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -17,7 +17,7 @@ class Graduationtaskitem extends Component{
let { item }=this.props; let { item }=this.props;
const _content = item.content && this.parseCommentContent(item.content) const _content = item.content && this.parseCommentContent(item.content)
return( return(
<div className="comment_item_cont df clearfix" key={item.id}> <div className="comment_item_cont appraise df clearfix" key={item.id}>
<div className="J_Comment_Face fl"> <div className="J_Comment_Face fl">
<a href={`${_origin}/users/${item.user_login}`} target="_blank"> <a href={`${_origin}/users/${item.user_login}`} target="_blank">
<img alt="用户头像" height="50" src={getImageUrl(`images/${item.image_url}`)} width="50"/> <img alt="用户头像" height="50" src={getImageUrl(`images/${item.image_url}`)} width="50"/>

@ -67,7 +67,7 @@ class GraduateTopicReply extends Component{
const user = this._getUser(); const user = this._getUser();
this.setState({ this.setState({
comments: addNewComment(this.state.comments, _id, content, user), comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1 total_count: this.state.total_count + 1
}) })
this.refs.editor.showEditor(); this.refs.editor.showEditor();

@ -221,7 +221,8 @@ class AddStudentModal extends Component{
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox> <Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'学号'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'学号'}</label></span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span> <span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{''}</label></span>
</p> </p>
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
@ -252,7 +253,8 @@ class AddStudentModal extends Component{
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.student_id || ' '}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.student_id || ' '}</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span> <span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{candidate.added ? '已加入' : ''}</label></span>
</p> </p>
) )

@ -292,7 +292,8 @@ class AddTeacherModal extends Component{
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox> <Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'昵称'}</label></span> <span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'昵称'}</label></span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span> <span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
</p> </p>
{ candidates && candidates.length ? <div> { candidates && candidates.length ? <div>
@ -322,7 +323,8 @@ class AddTeacherModal extends Component{
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname || ' '}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname || ' '}</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span> <span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{candidate.added ? '已加入' : ''}</label></span>
</p> </p>
) )

@ -0,0 +1,158 @@
import React, { Component } from "react";
import { Modal, Checkbox, Input, Spin, Upload, Divider, Icon } from "antd";
import axios from 'axios'
import ModalWrapper from "../../common/ModalWrapper"
import { ConditionToolTip, getUploadActionUrl } from 'educoder'
const { Dragger } = Upload;
class CreateGroupByImportModal extends Component{
constructor(props){
super(props);
this.state={
}
}
fetchMemberList = (arg_page) => {
}
componentDidMount() {
}
onSendOk = () => {
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/create_group_by_importing_file.json`
let { fileList } =this.state;
if (!fileList || fileList.length == 0) {
// this.props.showNotification('请先上传附件')
this.setState({
errorTip :'请先上传附件',
})
return;
}
let newfileList=[];
for(var list of fileList){
newfileList.push(list.response.id)
}
axios.post(url, {
attachment_ids: newfileList
})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification(response.data.message)
this.setVisible(false)
} else {
}
})
.catch(function (error) {
console.log(error);
});
}
setVisible = (visible) => {
if (visible) {
this.setState({ fileList: [] });
}
this.refs.modalWrapper.setVisible(visible)
}
handleChange = (info) => {
let fileList = info.fileList;
console.log(fileList)
this.setState({ fileList });
}
onOk = () => {
this.onSendOk()
}
onAttachmentRemove = (file) => {
this.props.confirm({
content: '是否确认删除?',
onOk: () => {
this.deleteAttachment(file)
},
onCancel() {
console.log('Cancel');
},
});
return false;
}
deleteAttachment = (file) => {
const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
axios.delete(url, {
})
.then((response) => {
if (response.data) {
// const { status } = response.data;
if (response.data.status === 0) {
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
};
});
}
}
})
.catch(function (error) {
console.log(error);
});
}
render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
const { moduleName } = this.props
const props = {
name: 'file',
multiple: true,
action: getUploadActionUrl(),
onRemove: this.onAttachmentRemove,
onChange: this.handleChange
};
return(
<ModalWrapper
ref="modalWrapper"
width="700px"
title={`导入创建分班`}
{...this.props }
onOk={this.onOk}
className="createGroupByImport"
>
<style>
{`
`}
</style>
<div className="df">
</div>
<Dragger {...props}>
<p className="ant-upload-drag-icon">
<Icon type="inbox" />
</p>
<p className="ant-upload-text">点击或拖拽文件到这里上传</p>
<p className="ant-upload-hint">
单个文件最大150MB
</p>
</Dragger>
</ModalWrapper>
)
}
}
export default CreateGroupByImportModal;

@ -14,6 +14,8 @@ import axios from 'axios'
import _ from 'lodash' import _ from 'lodash'
import NoneData from "../coursesPublic/NoneData" import NoneData from "../coursesPublic/NoneData"
import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
const Search =Input.Search; const Search =Input.Search;
const dataSource = [{ const dataSource = [{
check:<Checkbox></Checkbox>, check:<Checkbox></Checkbox>,
@ -78,6 +80,15 @@ const buildColumns = (that) => {
width:"50%", width:"50%",
className:"color-grey-6" className:"color-grey-6"
}]; }];
const isAdminOrStudent = that.props.isAdminOrStudent()
if (!isAdminOrStudent) {
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
})
}
const isAdmin = that.props.isAdmin() const isAdmin = that.props.isAdmin()
if (isAdmin) { if (isAdmin) {
columns.unshift({ columns.unshift({
@ -488,7 +499,10 @@ class studentsList extends Component{
searchPlaceholder={ '请输入姓名、学号进行搜索' } searchPlaceholder={ '请输入姓名、学号进行搜索' }
firstRowRight={ firstRowRight={
<React.Fragment> <React.Fragment>
{/* { isSuperAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>this.addTeacher()}>导入创建分班</WordsBtn> } */} { isSuperAdmin && <React.Fragment>
{/* <CreateGroupByImportModal ref="createGroupByImportModal" {...this.props}></CreateGroupByImportModal> */}
{/* <WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn> */}
</React.Fragment> }
{ isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建分班</WordsBtn> } { isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> } { isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } { isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
@ -582,11 +596,13 @@ class studentsList extends Component{
) )
}) } }) }
{ isAdmin && { isAdmin &&
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()} onClick={()=>this.addDir()}
>添加分班...</a> >添加分班...</a>
</p> </p>
} }
</ul> </ul>
</li>} </li>}

@ -89,10 +89,20 @@ function buildColumns(that) {
</p>): </p>):
'' ''
} }
{course_groups && course_groups.length > 1 && <li key={'_all' + index} >
{/* 防止被外面group包裹 */}
<Checkbox.Group>
<Checkbox
checked={that.state.checkAllArray[index]}
style={{ marginRight: '6px' }} onClick={(e) => that.onCheckAllChange(e, item, index)} onChange={() => {}}
>全选</Checkbox>
</Checkbox.Group>
</li>}
<Checkbox.Group onChange={(checkedValues) => that.joinCourseGroup(checkedValues, item, index)} <Checkbox.Group onChange={(checkedValues) => that.joinCourseGroup(checkedValues, item, index)}
value={arg_course_groups.map(item => item.id)} value={arg_course_groups.map(item => item.id)}
disabled={!isAdminOrCreator} disabled={!isAdminOrCreator}
> >
{ {
course_groups && course_groups.filter((item) => { course_groups && course_groups.filter((item) => {
return (!that.state.groupSearchValue || item.name.indexOf(that.state.groupSearchValue) != -1) return (!that.state.groupSearchValue || item.name.indexOf(that.state.groupSearchValue) != -1)
@ -107,6 +117,11 @@ function buildColumns(that) {
) )
}) })
} }
<p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6"
onClick={() => trigger('groupAdd', that.props.coursesids)}
>添加分班...</a>
</p>
</Checkbox.Group> </Checkbox.Group>
</ul>} </ul>}
</React.Fragment> } </React.Fragment> }
@ -165,7 +180,7 @@ function buildColumns(that) {
dataIndex: 'course_member_id', dataIndex: 'course_member_id',
key: 'course_member_id', key: 'course_member_id',
render: (content, item, index) => { render: (content, item, index) => {
return <Checkbox value={content}></Checkbox> return content ? <Checkbox value={content}></Checkbox> : ''
} }
}) })
} }
@ -190,7 +205,20 @@ class studentsList extends Component{
teachers: [], teachers: [],
checkBoxValues: [], checkBoxValues: [],
isSpin:false, isSpin:false,
application_list: [] application_list: [],
checkAllArray: []
}
}
onCheckAllChange = (e, item, index) => {
const that = this;
debugger;
const checkAllArray = that.state.checkAllArray.slice(0)
checkAllArray[index] = !checkAllArray[index]
that.setState({checkAllArray})
if (checkAllArray[index]) {
that.joinCourseGroup(that.state.course_groups.map((item) => item.id), item, index)
} else {
that.joinCourseGroup([], item, index)
} }
} }
inputSearch=(e)=>{ inputSearch=(e)=>{

@ -523,9 +523,7 @@ class Poll extends Component{
<p className="fl font-16" style={{"marginTop":"27px"}}> <p className="fl font-16" style={{"marginTop":"27px"}}>
<span className="mr20">{polls_counts && polls_counts.polls_total_counts}个问卷</span> <span className="mr20">{polls_counts && polls_counts.polls_total_counts}个问卷</span>
<span className="mr20">已发布{polls_counts && polls_counts.polls_published_counts}</span> <span className="mr20">已发布{polls_counts && polls_counts.polls_published_counts}</span>
{ <span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>
isAdmin && <span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>
}
</p> </p>
<div className="fr mt16 mb16 searchView"> <div className="fr mt16 mb16 searchView">
<Search <Search

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder'; import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import NoneData from '../coursesPublic/NoneData'
import { import {
Form, Form,
Select, Select,
@ -93,23 +94,27 @@ class ShixunStudentWork extends Component {
let url = "/homework_commons/" + homeworkid + "/code_review_results.json"; let url = "/homework_commons/" + homeworkid + "/code_review_results.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
debugger
if (response.data.status === undefined || response.data.status === 0) { if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){ if(response.data!=undefined){
let datas=[]; if(response.data.status!=-2){
let list=response.data.users_reviews; let datas=[];
for(var i=0; i<list.length; i++){ let list=response.data.users_reviews;
datas.push({ for(var i=0; i<list.length; i++){
number:i+1, datas.push({
name:list[i].username, number:i+1,
stduynumber:list[i].student_id, name:list[i].username,
classroom:parseInt(list[i].code_rate), stduynumber:list[i].student_id,
operating:list[i].user_id classroom:parseInt(list[i].code_rate),
operating:list[i].user_id
})
}
this.setState({
data: response.data,
datalist:datas
}) })
} }
this.setState({
data: response.data,
datalist:datas
})
} }
} }
@ -154,21 +159,24 @@ class ShixunStudentWork extends Component {
}}).then((response) => { }}).then((response) => {
if (response.data.status === undefined || response.data.status === 0) { if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){ if(response.data!=undefined){
let datas=[]; if(response.data.status!=-2) {
let list=response.data.users_reviews; let datas = [];
for(var i=0; i<list.length; i++){ let list = response.data.users_reviews;
datas.push({ for (var i = 0; i < list.length; i++) {
number:i+1, datas.push({
name:list[i].username, number: i + 1,
stduynumber:list[i].student_id, name: list[i].username,
classroom:parseInt(list[i].code_rate), stduynumber: list[i].student_id,
operating:list[i].user_id classroom: parseInt(list[i].code_rate),
operating: list[i].user_id
})
}
this.setState({
data: response.data,
datalist: datas
}) })
} }
this.setState({
data: response.data,
datalist:datas
})
} }
} }
@ -505,6 +513,18 @@ class ShixunStudentWork extends Component {
}, },
]; ];
if(this.props.isNotMember()===true){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
{this.state.showmodel===true?<ShixunWorkModal {this.state.showmodel===true?<ShixunWorkModal
@ -535,7 +555,6 @@ class ShixunStudentWork extends Component {
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
/> />
{data&&data?
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="educontent mb25"> <div className="educontent mb25">
<p className="clearfix mb25 mt5"> <p className="clearfix mb25 mt5">
@ -554,10 +573,10 @@ class ShixunStudentWork extends Component {
</div> </div>
<div className="educontent mb30"> <div className="educontent mb30">
<p className=" fl color-black summaryname"> <p className=" fl color-black summaryname">
{data.homework_name} {data&&data.homework_name}
</p> </p>
<CoursesListType <CoursesListType
typelist={data.homework_status} typelist={data&&data.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a> href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
@ -593,10 +612,10 @@ class ShixunStudentWork extends Component {
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin()? {this.props.isAdmin()?
data.end_immediately===true? data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin()? {this.props.isAdmin()?
data.publish_immediately===true? data&&data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""} <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{/*{this.props.isAdmin()?*/} {/*{this.props.isAdmin()?*/}
@ -623,10 +642,11 @@ class ShixunStudentWork extends Component {
`} `}
</style> </style>
<li className="clearfix startbox" style={{display:duplicatechecking===true?"":"none"}}> <li className="clearfix startbox mb20" style={{display:duplicatechecking===true?"":"none"}}>
<span className={"startfont"}> <span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异 正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span> </span>
<NoneData></NoneData>
</li> </li>
<style> <style>
{` {`
@ -638,6 +658,8 @@ class ShixunStudentWork extends Component {
`} `}
</style> </style>
{data&&data?
<div>
<ul className="clearfix" style={{padding: '20px 40px 10px 40px'}}> <ul className="clearfix" style={{padding: '20px 40px 10px 40px'}}>
<li className="clearfix "> <li className="clearfix ">
@ -742,9 +764,9 @@ class ShixunStudentWork extends Component {
/>} />}
</div> </div>
</div> </div>:""}
</div>:""} </div></div>

@ -14,9 +14,8 @@ class ShixunWorkModal extends Component{
} }
} }
componentDidMount() { 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:{ axios.get(url,{params:{
limit:10, limit:10,
page:1, page:1,
@ -28,9 +27,16 @@ class ShixunWorkModal extends Component{
group_list:undefined group_list:undefined
}) })
}else{ }else{
const newgroup_list=[];
response.data.group_list.map((item,key)=>{
newgroup_list.push(item)
})
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
newgroup_list.push(response.data.ungroup_list)
}
this.setState({ this.setState({
course_groups:response.data, course_groups:response.data,
group_list:response.data.group_list group_list:newgroup_list,
}) })
} }
@ -43,18 +49,36 @@ class ShixunWorkModal extends Component{
//勾选实训 //勾选实训
shixunhomeworkedit=(checkedValues)=>{ shixunhomeworkedit=(checkedValues)=>{
let types=false
let{group_list}=this.state; let{group_list}=this.state;
if(checkedValues.length===group_list.length){ group_list.map((item,key)=>{
this.setState({ if(item!=undefined){
onChangetype:true, checkedValues.map((list,li)=>{
group_ids:checkedValues if(item.id===list){
}) if(item.works_count<2){
}else{ this.props.showNotification(`有效作品数少于2个无法查重`)
this.setState({ types=true
group_ids:checkedValues, return
onChangetype:false }
}) }
} })
}
})
if(types===false){
if(checkedValues.length===group_list.length){
this.setState({
onChangetype:true,
group_ids:checkedValues
})
}else{
this.setState({
group_ids:checkedValues,
onChangetype:false
})
}
}
} }
contentViewScroll=(e)=>{ contentViewScroll=(e)=>{
@ -71,17 +95,33 @@ class ShixunWorkModal extends Component{
page:newpage, page:newpage,
} }
}).then((response) => { }).then((response) => {
response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{ if(response!==null || response!==undefined){
newgroup_list.push(item) if(response.data.group_list.length>0){
}) console.log("84");
response.data. course_groups.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{ response.data.group_list.map((item,key)=>{
newgroup_list.push(items) newgroup_list.push(item);
}) this.setState({
this.setState({ course_groups:response.data,
course_groups:response.data, group_list:newgroup_list,
group_list:newgroup_list, page:newpage
page:newpage })
}) })
}
if(response.data.ungroup_list===undefined || response.data.ungroup_list === null) {
}else {
console.log("95");
console.log(response.data.ungroup_list);
newgroup_list.push(response.data.ungroup_list);
this.setState({
course_groups:response.data,
group_list:newgroup_list,
page:newpage
})
}
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
@ -130,10 +170,10 @@ class ShixunWorkModal extends Component{
this.props.showNotification(`请先选择分班`); this.props.showNotification(`请先选择分班`);
return return
} }
if(group_ids&&group_ids.length < 2){ // if(group_ids&&group_ids.length < 2){
this.props.showNotification(`有效作品数少于2个无法查重`); // this.props.showNotification(`有效作品数少于2个无法查重`);
return // return
} // }
let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json"; let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json";
axios.post(url, { axios.post(url, {
@ -247,17 +287,17 @@ class ShixunWorkModal extends Component{
<Checkbox <Checkbox
className="fl task-hide edu-txt-left" className="fl task-hide edu-txt-left"
name="shixun_homework[]" name="shixun_homework[]"
value={item.id} value={item=== undefined?"":item.id}
> >
<label style={{"textAlign": "left", "color": "#05101A"}} <label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{item.name}</label> className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl" style={{width: '150px'}}> <li className="fl" style={{width: '150px'}}>
{item.works_count} {item===undefined?"":item.works_count}
</li> </li>
<li className="fl" style={{width: '160px'}}> <li className="fl" style={{width: '160px'}}>
{item.last_review_time} {item===undefined?"":item.last_review_time}
</li> </li>
</div> </div>
) )

@ -1676,7 +1676,7 @@ class Trainingjobsetting extends Component {
} }
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?this.state.code_review===false?"": <Link {this.props.isAdmin()?this.state.code_review===true?"": <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
<style>{ <style>{
@ -1708,7 +1708,7 @@ class Trainingjobsetting extends Component {
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""} <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
{this.props.isAdmin()? {this.props.isAdmin()?
this.state.code_review===false?<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> this.state.code_review===true?<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "":""} : "":""}
</div> </div>
</div> </div>

@ -401,7 +401,7 @@ class Workquestionandanswer extends Component {
className="active" className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()? {this.props.isAdmin()?
this.state.code_review===false?"":<Link this.state.code_review===true?"":<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`} // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""} 代码查重</Link>:""}
@ -421,7 +421,7 @@ class Workquestionandanswer extends Component {
{this.props.isAdmin()? {this.props.isAdmin()?
this.state.code_review===false? this.state.code_review===true?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
:"":""} :"":""}

@ -117,7 +117,7 @@ class MemoDetailMDEditor extends Component {
this.initMDEditor() this.initMDEditor()
} }
render() { render() {
const { match, history, memo, placeholder } = this.props const { match, history, memo, placeholder, className } = this.props
const { isInited, errorMsg } = this.state const { isInited, errorMsg } = this.state
if (!memo) { if (!memo) {
return <div></div> return <div></div>
@ -154,7 +154,7 @@ class MemoDetailMDEditor extends Component {
} }
`}</style> `}</style>
<div style={{ display: isInited ? 'none' : '', borderBottom: `${this.props.commentsLength == 0 ? 'none' : '1px solid #EEEEEE'}`}} <div style={{ display: isInited ? 'none' : '', borderBottom: `${this.props.commentsLength == 0 ? 'none' : '1px solid #EEEEEE'}`}}
className="mockInputWrapper commentInput" > className={`mockInputWrapper commentInput ${className}`} >
<input onClick={this.onMockInputClick} placeholder={placeholder || '我要回复'}></input> <input onClick={this.onMockInputClick} placeholder={placeholder || '我要回复'}></input>
<a href="javascript:void(0)" <a href="javascript:void(0)"
onClick={this.onMockInputClick} className="commentsbtn task-btn task-btn-blue"> onClick={this.onMockInputClick} className="commentsbtn task-btn task-btn-blue">
@ -172,7 +172,7 @@ class MemoDetailMDEditor extends Component {
` `
} */} } */}
</style> </style>
<div nhname={`new_message_${memo.id}`} className="commentInput commentInputs" <div nhname={`new_message_${memo.id}`} className={`commentInput commentInputs ${className}`}
style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} > style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} >
<div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px' <div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px'
, border: errorMsg ? '1px solid red' : '1px solid #ddd'}}> , border: errorMsg ? '1px solid red' : '1px solid #ddd'}}>

@ -28,7 +28,7 @@ class CodeEvaluateMultiLevelAnswerUnlock extends Component {
} }
render() { render() {
const { shixun, challenge, lockedAnswers } = this.props; const { shixun, challenge, lockedAnswers, unlockedAnswers } = this.props;
const { currentLevel } = this.state; const { currentLevel } = this.state;
return ( return (
<div className="answerMultiLevelUnlock"> <div className="answerMultiLevelUnlock">
@ -85,7 +85,7 @@ class CodeEvaluateMultiLevelAnswerUnlock extends Component {
<Radio onClick={() => this.onLevelClick(item, index)} <Radio onClick={() => this.onLevelClick(item, index)}
checked={currentLevel>=index}></Radio> checked={currentLevel>=index}></Radio>
</div> </div>
<div className="twoSpanCol">{index + 1}</div> <div className="twoSpanCol">{index + 1 + (unlockedAnswers && unlockedAnswers.length || 0) }</div>
<div className="autoCol">{item.name}</div> <div className="autoCol">{item.name}</div>
<div className="fourSpanCol">{item.score}%</div> <div className="fourSpanCol">{item.score}%</div>
<div className="fourSpanCol goldColor">{challenge.score * item.score / 100}</div> <div className="fourSpanCol goldColor">{challenge.score * item.score / 100}</div>

@ -95,7 +95,7 @@ class SiderBar extends Component {
</div> </div>
<div className="feedback" tooltips="意见反馈"> <div className="feedback" tooltips="意见反馈">
<a target="_blank" className="color_white" href="https://www.educoder.net/help?index=6"> <a target="_blank" className="color_white" href="/help?index=6">
<i className="iconfont icon-yijianfankui color-white font-22"></i> <i className="iconfont icon-yijianfankui color-white font-22"></i>
</a> </a>
</div> </div>

@ -216,7 +216,7 @@ export function TPMIndexHOC(WrappedComponent) {
// 非课堂成员 // 非课堂成员
isNotMember = () => { isNotMember = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity === 6 return this.state.coursedata&&this.state.coursedata.course_identity >= 6
} }
// setTrialapplication = ()=>{ // setTrialapplication = ()=>{

@ -1195,7 +1195,7 @@ export default class TPMsettings extends Component {
} }
</Select> </Select>
<p <p
className="edu-txt-right font-12" className="edu-txt-left font-12"
style={{display:operateauthority?"block":'none'}} style={{display:operateauthority?"block":'none'}}
> >
列表中没有 列表中没有
@ -1214,6 +1214,7 @@ export default class TPMsettings extends Component {
<label className="panel-form-label fl"><span <label className="panel-form-label fl"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
style={{width:'100%'}}
onInput={this.sendsure_applyvalues} onInput={this.sendsure_applyvalues}
value={sendsure_applyvalue} value={sendsure_applyvalue}
placeholder="请输入新增镜像需要安装的软件及版本等信息" id="demand_info"></textarea> placeholder="请输入新增镜像需要安装的软件及版本等信息" id="demand_info"></textarea>
@ -1354,10 +1355,11 @@ export default class TPMsettings extends Component {
<textarea className="task-form-80 task-height-150 panel-box-sizing fl mt10" <textarea className="task-form-80 task-height-150 panel-box-sizing fl mt10"
onInput={this.Executiveorder} onInput={this.Executiveorder}
value={Executiveordervalue} value={Executiveordervalue}
style={{width:'100%'}}
id="executive_command" id="executive_command"
> >
</textarea> </textarea>
<p className="-text-danger fl mt10 ml95" <p className="-text-danger fl mt5"
id="executive_command_notice" id="executive_command_notice"
style={{display: Executivetyoe === false ? "none" : "block"}} style={{display: Executivetyoe === false ? "none" : "block"}}
>执行命令不能为空</p> >执行命令不能为空</p>
@ -1369,6 +1371,7 @@ export default class TPMsettings extends Component {
value={Compilecommandvalue} value={Compilecommandvalue}
onInput={this.Compilecommand} onInput={this.Compilecommand}
id="compile_command" id="compile_command"
style={{width:'100%'}}
> >
</textarea> </textarea>
</li> </li>

@ -239,7 +239,9 @@ export default class TPMMDEditor extends Component {
} }
__editorName.cm.on("change", (_cm, changeObj) => { __editorName.cm.on("change", (_cm, changeObj) => {
that.contentChanged = true; that.contentChanged = true;
if (that.state.showError) {
that.setState({showError: false})
}
that.onEditorChange() that.onEditorChange()
}) })
that.props.onCMBlur && __editorName.cm.on('blur', () => { that.props.onCMBlur && __editorName.cm.on('blur', () => {
@ -256,6 +258,9 @@ export default class TPMMDEditor extends Component {
}, this); }, this);
} }
showError = () => {
this.setState({showError: true})
}
onEditorChange = () => { onEditorChange = () => {
if (!this.answers_editormd) return; if (!this.answers_editormd) return;
const val = this.answers_editormd.getValue(); const val = this.answers_editormd.getValue();
@ -297,14 +302,18 @@ export default class TPMMDEditor extends Component {
render() { render() {
let { let {
choice_url, showError
} = this.state; } = this.state;
let { mdID, className, noStorage } = this.props; let { mdID, className, noStorage } = this.props;
let _style = {}
if (showError) {
_style.border = '1px solid red'
}
return ( return (
<React.Fragment> <React.Fragment>
<div className={`df ${className}`}> <div className={`df ${className}`} >
{/* padding10-20 */} {/* padding10-20 */}
<div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`}> <div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`} style={{..._style}}>
<textarea style={{display: 'none'}} id="evaluate_script_show" name="content"></textarea> <textarea style={{display: 'none'}} id="evaluate_script_show" name="content"></textarea>
<div className="CodeMirror cm-s-defualt"> <div className="CodeMirror cm-s-defualt">
</div> </div>

@ -381,7 +381,7 @@ export default class TPMevaluation extends Component {
// }) // })
// } // }
savegetfilepath=(value)=>{ savegetfilepath=(value)=>{
let {selectpath} = this.state let {selectpath,saveshixunfilepath} = this.state
// let newarr =selectpatharr; // let newarr =selectpatharr;
// let arrtype=false; // let arrtype=false;
// let arrsum=0; // let arrsum=0;
@ -403,9 +403,28 @@ export default class TPMevaluation extends Component {
// newselectpath=newselectpath+newarr[z]+ "" // newselectpath=newselectpath+newarr[z]+ ""
// } // }
// let newselectpath=selectpath+value+ ""
let newselectpath=value
let newselectpath;
if(saveshixunfilepath==="shixunfilepathplay"){
newselectpath=value
}else{
const type = selectpath.split('');
let types=false;
for(var i=0; i<type.length; i++){
if(type[i]===value){
types=true
return
}
}
if(types===false){
newselectpath=selectpath+value+ ""
}else{
newselectpath=selectpath
}
}
this.setState({ this.setState({
// selectpatharr:newarr, // selectpatharr:newarr,
selectpath: newselectpath, selectpath: newselectpath,

@ -4,7 +4,7 @@ import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder'; import {SnackbarHOC} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form} from 'antd'; import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
@ -523,9 +523,17 @@ class Newshixuns extends Component {
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
} }
debugger
if( attachment_ids === undefined || attachment_ids.length===0){ if( attachment_ids === undefined || attachment_ids.length===0){
this.props.showNotification(`请上传附件`);
notification.open(
{
message: '提示',
description:
'请上传附件!',
}
)
return; return;
} }
// console.log("attachment_ids"+attachment_ids); // console.log("attachment_ids"+attachment_ids);
@ -563,7 +571,16 @@ class Newshixuns extends Component {
testcoderunmode:"", testcoderunmode:"",
}) })
} }
this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
notification.open(
{
message: '提示',
description:
'提交成功!',
}
)
this.sendhideModaly()
// this.props.history.push(`/courses/${cid}/graduation_topics`); // this.props.history.push(`/courses/${cid}/graduation_topics`);
// } // }
} }
@ -763,8 +780,15 @@ class Newshixuns extends Component {
// console.log('beforeUpload', file.name); // console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 50; const isLt150M = file.size / 1024 / 1024 < 50;
if (!isLt150M) { if (!isLt150M) {
this.props.showNotification(`文件大小必须小于50MB`); // this.props.showNotification(`文件大小必须小于50MB`);
notification.open(
{
message: '提示',
description:
'文件大小必须小于50MB',
}
)
} }
if(thiss.state.file !== undefined){ if(thiss.state.file !== undefined){
console.log("763") console.log("763")
@ -881,7 +905,7 @@ class Newshixuns extends Component {
}) })
} }
</Select> </Select>
<p className="edu-txt-right font-12"> <p className="edu-txt-left font-12">
列表中没有 列表中没有
<a className="color-blue" onClick={this.post_apply}> 申请新建</a> <a className="color-blue" onClick={this.post_apply}> 申请新建</a>
</p> </p>

@ -33,6 +33,7 @@ class Collaborators extends Component {
Collaboratorsvisible: false, Collaboratorsvisible: false,
Collaboratorsvisibleadmin: false, Collaboratorsvisibleadmin: false,
value: 1, value: 1,
page: 1,
Searchadmin: [], Searchadmin: [],
allChangechecked: false, allChangechecked: false,
Collaboratorslist: [], Collaboratorslist: [],
@ -155,6 +156,9 @@ class Collaborators extends Component {
} }
onSearchadmin = (value) => { onSearchadmin = (value) => {
let {collaboratorList,user_name,school_name} = this.state; let {collaboratorList,user_name,school_name} = this.state;
this.setState({
Searchadmin: [],
})
// if (value === "") { // if (value === "") {
// this.setState({ // this.setState({
// Searchadmin: [], // Searchadmin: [],
@ -172,7 +176,7 @@ class Collaborators extends Component {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{ }else{
let newlist = response.data; let newlist = response.data.users;
for (var i = 0; i < newlist.length; i++) { for (var i = 0; i < newlist.length; i++) {
newlist[i].checked = false newlist[i].checked = false
} }
@ -336,7 +340,48 @@ class Collaborators extends Component {
collaboratorListsumtype:false collaboratorListsumtype:false
}) })
} }
render() {
contentViewScrolledit=(e)=>{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {page,collaboratorList,user_name,school_name,Searchadmin} = this.state;
let newpage=page+1;
let newSearchadmin=Searchadmin
let id = this.props.match.params.shixunId;
let url = "/shixuns/" + id + "/add_collaborators.json";
axios.get(url,{params:{
user_name:user_name ,
school_name:school_name,
page:newpage
}}).then((response) => {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
let newlist = response.data.users;
for (var i = 0; i < newlist.length; i++) {
newlist[i].checked = false
newSearchadmin.push(newlist[i])
}
console.log(newSearchadmin)
this.setState({
Searchadmin: newSearchadmin,
collaboratorList: collaboratorList,
page:newpage
})
}
}).catch((error) => {
console.log(error)
});
}
}
render() {
let { let {
collaboratorList, collaboratorList,
Collaboratorsvisible, Collaboratorsvisible,
@ -445,13 +490,13 @@ class Collaborators extends Component {
>搜索</a> >搜索</a>
<p className="clearfix pl35 mt20"> <p className="clearfix pl35 mt20">
<span className="fl edu-txt-w80 task-hide font-bd ml10 edu-txt-left">姓名</span> <span className="fl edu-txt-w80 task-hide font-bd ml10 edu-txt-left">姓名</span>
<span className="fl edu-txt-w80 task-hide font-bd">呢称</span> <span className="fl edu-txt-w80 task-hide font-bd">职业</span>
<span className="fl edu-txt-w180 task-hide font-bd ml50">单位</span> <span className="fl edu-txt-w180 task-hide font-bd ml50">单位</span>
</p> </p>
<div className="mt5" style={{background: '#f7f9fd'}}> <div className="mt5" style={{background: '#f7f9fd'}}>
<div className="clearfix"> <div className="clearfix">
<ul className="upload_select_box fl" id="search_not_teachers_list"> <ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}> {Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
<span>请试试搜索一下</span> <span>请试试搜索一下</span>
</li> : Searchadmin.map((item, key) => { </li> : Searchadmin.map((item, key) => {
@ -460,10 +505,12 @@ class Collaborators extends Component {
<Checkbox className="fl mr20" checked={item.checked} <Checkbox className="fl mr20" checked={item.checked}
onChange={(e) => this.selectChangenickname(e, key)} onChange={(e) => this.selectChangenickname(e, key)}
id={item.user_id}></Checkbox> id={item.user_id}></Checkbox>
<a className="task-hide color-grey3 ml20 fl span1 edu-txt-w80">{item.nickname}</a> <a className="task-hide color-grey3 fl span1 edu-txt-w80 edu-txt-left">{item.nickname}</a>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identify}</span> <span className="task-hide fl color-grey edu-txt-w80 span2">{item.identify}</span>
<span <span
className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span> title={item.school_name}
style={{width: '150px'}}
className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span>
</li> </li>
) )
}) })

@ -97,3 +97,51 @@ return;
// var uglified = uglify.minify(['file1.js', 'file2.js', 'file3.js']); // var uglified = uglify.minify(['file1.js', 'file2.js', 'file3.js']);
/**
优化
underscore被单独加载了去掉'D:\\Code\\trustieplus\\public\\react\\public\\js\\editormd\\underscore.min.js',
marked
raphaeljs sequence diagrams 1.0.4
统计 js_min_all加载的js
https://github.com/paulmillr/es6-shim
jQuery v1.8.3 jquery.com
Underscore.js 1.8.2
marked v0.3.3
Raphaël 2.1.3 - JavaScript Vector Library
flowchart, v1.3.4
editormd.js
CodeMirror
cm active-line.js
cm mode javascript
cm merge.js
CodeMirror addon hint
cm showHint
cm anyword-hint
CodeMirror python
CodeMirror c-like(java)
CodeMirror matchbrackets
>
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
*/
Loading…
Cancel
Save