Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_newshixunModel
jingquan huang 5 years ago
commit 5f2562013b

@ -22,9 +22,9 @@ $.fn.bootstrapViewer = function (options) {
' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' + ' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' +
' <div class="modal-content">\n' + ' <div class="modal-content">\n' +
' <img' + ' <img' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" \n' + '\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" draggable="false"\n' +
'\t\t\t onclick="$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);"\n' + '\t\t\t onclick="/*$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);*/"\n' +
'\t\t\t onmouseover="this.style.cursor=\'zoom-out\';" \n' + '\t\t\t onmouseover="this.style.cursor=\'move\';" \n' +
'\t\t\t onmouseout="this.style.cursor=\'default\'" \n' + '\t\t\t onmouseout="this.style.cursor=\'default\'" \n' +
'\t\t\t />\n' + '\t\t\t />\n' +
' </div>\n' + ' </div>\n' +
@ -37,13 +37,41 @@ $.fn.bootstrapViewer = function (options) {
} else { } else {
throw "图片不存在" throw "图片不存在"
} }
$('#bootstrapViewer').on('hidden.bs.modal', function(){
$('#bootstrapViewer').remove();
});
var $moveDiv = $('#bootstrapViewer .modal-dialog');
var isMove = false;
var div_x = $moveDiv.offset().left;
var div_y = $moveDiv.offset().top;
var mousedownFunc = function (e) {
if (isMove) {
var left = e.pageX - div_x;
var top = e.pageY - div_y;
if(left < 0){ left = 0}
if(top < 0){ top = 0}
$moveDiv.css({"left": left, "top":top});
}
}
$moveDiv.mousedown(function (e) {
$moveDiv.css({ left: $moveDiv[0].offsetLeft, top: $moveDiv[0].offsetTop, marginTop: 0, position: 'absolute' });
isMove = true;
div_x = e.pageX - $moveDiv.offset().left;
div_y = e.pageY - $moveDiv.offset().top;
$(document).mousemove(mousedownFunc);
}).mouseup(function () {
isMove = false;
$(document).unbind('mousemove', mousedownFunc);
});
}) })
$(this).on('mouseover', function () { $(this).on('mouseover', function () {
$(this).css('cursor', 'zoom-in'); $(this).css('cursor', 'zoom-in');
}) })
} }
$.fn.bootstrapViewer.defaults = { $.fn.bootstrapViewer.defaults = {
src: 'src' src: 'src'

@ -1,4 +1,4 @@
class ReachCriteriaController < Ecs::BaseController class Ecs::ReachCriteriaController < Ecs::BaseController
before_action :check_major_manager_permission!, only: [:create] before_action :check_major_manager_permission!, only: [:create]
def create def create

File diff suppressed because one or more lines are too long

@ -27586,9 +27586,9 @@ $.fn.bootstrapViewer = function (options) {
' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' + ' <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n' +
' <div class="modal-content">\n' + ' <div class="modal-content">\n' +
' <img' + ' <img' +
'\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" \n' + '\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" draggable="false"\n' +
'\t\t\t onclick="$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);"\n' + '\t\t\t onclick="/*$(\'#bootstrapViewer\').modal(\'hide\');setTimeout(function(){$(\'#bootstrapViewer\').remove();},200);*/"\n' +
'\t\t\t onmouseover="this.style.cursor=\'zoom-out\';" \n' + '\t\t\t onmouseover="this.style.cursor=\'move\';" \n' +
'\t\t\t onmouseout="this.style.cursor=\'default\'" \n' + '\t\t\t onmouseout="this.style.cursor=\'default\'" \n' +
'\t\t\t />\n' + '\t\t\t />\n' +
' </div>\n' + ' </div>\n' +
@ -27601,13 +27601,41 @@ $.fn.bootstrapViewer = function (options) {
} else { } else {
throw "图片不存在" throw "图片不存在"
} }
$('#bootstrapViewer').on('hidden.bs.modal', function(){
$('#bootstrapViewer').remove();
});
var $moveDiv = $('#bootstrapViewer .modal-dialog');
var isMove = false;
var div_x = $moveDiv.offset().left;
var div_y = $moveDiv.offset().top;
var mousedownFunc = function (e) {
if (isMove) {
var left = e.pageX - div_x;
var top = e.pageY - div_y;
if(left < 0){ left = 0}
if(top < 0){ top = 0}
$moveDiv.css({"left": left, "top":top});
}
}
$moveDiv.mousedown(function (e) {
$moveDiv.css({ left: $moveDiv[0].offsetLeft, top: $moveDiv[0].offsetTop, marginTop: 0, position: 'absolute' });
isMove = true;
div_x = e.pageX - $moveDiv.offset().left;
div_y = e.pageY - $moveDiv.offset().top;
$(document).mousemove(mousedownFunc);
}).mouseup(function () {
isMove = false;
$(document).unbind('mousemove', mousedownFunc);
});
}) })
$(this).on('mouseover', function () { $(this).on('mouseover', function () {
$(this).css('cursor', 'zoom-in'); $(this).css('cursor', 'zoom-in');
}) })
} }
$.fn.bootstrapViewer.defaults = { $.fn.bootstrapViewer.defaults = {
src: 'src' src: 'src'

File diff suppressed because one or more lines are too long

@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) {
} }
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}` config.url = `${config.url}?debug=${'student'}`
} else { } else {
config.url = `${config.url}&debug=${debugType}` config.url = `${config.url}&debug=${'student'}`
} }
} else { } else {
// 加api前缀 // 加api前缀

@ -28,6 +28,21 @@ class Fileslistitem extends Component{
} }
showfiles=(list)=>{ showfiles=(list)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
if(list.is_history_file===false){ if(list.is_history_file===false){
// this.props.DownloadFileA(list.title,list.url) // this.props.DownloadFileA(list.title,list.url)
//window.location.href=list.url; //window.location.href=list.url;
@ -217,7 +232,9 @@ class Fileslistitem extends Component{
{ {
this.props.isNotMember===true? this.props.isNotMember===true?
discussMessage.is_lock === true ? discussMessage.is_lock === true ?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</span> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.title}</span>
</Tooltip>
:<a :<a
onClick={()=>this.showfiles(discussMessage)} onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}

@ -113,31 +113,36 @@ class Fileslists extends Component{
updadatalist=(id)=>{ updadatalist=(id)=>{
// this.seactall(id) // this.seactall(id)
let coursesId=this.props.match.params.coursesId; if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user.login=== null||this.props.user&&this.props.user.login=== undefined){
let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, { }else{
}).then((response) => { let coursesId=this.props.match.params.coursesId;
if(response!=undefined){ let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, {
if(response.data&&response.data) { }).then((response) => {
if (response.data.status != 401) { if(response!=undefined){
let list = response.data.course_modules;
let course_second_categoriess; if(response.data&&response.data) {
list.map((item, key) => { if (response.data.status != 401) {
course_second_categoriess = item.course_second_categories let list = response.data.course_modules;
}) let course_second_categoriess;
list.map((item, key) => {
this.setState({ course_second_categoriess = item.course_second_categories
course_modules: response.data, })
has_course_groups: response.data.has_course_groups,
course_second_categories: course_second_categoriess this.setState({
}) course_modules: response.data,
has_course_groups: response.data.has_course_groups,
course_second_categories: course_second_categoriess
})
}
} }
} }
} })
}
})
} }
updatafiled=()=>{ updatafiled=()=>{
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){

@ -1,115 +1,131 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Tooltip} from 'antd' import {Tooltip} from 'antd'
import moment from 'moment' import moment from 'moment'
import { getUrl, WordsBtn } from 'educoder' import { getUrl, WordsBtn } from 'educoder'
class BoardsListItem extends Component{ class BoardsListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
} }
} }
onTitleClick = (discussMessage) => { onTitleClick = (discussMessage) => {
const isAdminOrStudent = this.props.isAdminOrStudent(); if(this.props.checkIfLogin()===false){
if (!isAdminOrStudent && discussMessage.is_public == false) { this.props.showLoginDialog()
// 没有权限访问 return
return; }
} if(this.props.checkIfProfileCompleted()===false){
const cid = this.props.match.params.coursesId this.setState({
const board_id = this.props.match.params.boardId AccountProfiletype:true
this.props.toDetailPage(cid, board_id, discussMessage.id) })
} return
render(){ }
let { addGroup } = this.state; if(this.props.checkIfProfessionalCertification()===false){
const isAdmin = this.props.isAdmin() this.props.showProfileCompleteDialog()
const isAdminOrStudent = this.props.isAdminOrStudent() return
const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props; }
if (!discussMessage || !discussMessage.author) {
return ''; const isAdminOrStudent = this.props.isAdminOrStudent();
} if (!isAdminOrStudent && discussMessage.is_public == false) {
let canNotLink = !isAdminOrStudent && discussMessage.is_public == false // 没有权限访问
return;
return( }
<div className="panel-inner-fourm boardsList"> const cid = this.props.match.params.coursesId
<style>{` const board_id = this.props.match.params.boardId
.boardsList .panel-list-img { this.props.toDetailPage(cid, board_id, discussMessage.id)
width: 50px; }
height: 50px; render(){
} let { addGroup } = this.state;
`}</style> const isAdmin = this.props.isAdmin()
{ checkBox } const isAdminOrStudent = this.props.isAdminOrStudent()
<a href={`/users/${discussMessage.author.login}`} alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}> const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props;
{/* /images/avatars/User/1?1529221779 */} if (!discussMessage || !discussMessage.author) {
<img return '';
alt="1?1529221779" className="panel-list-img mr15" height="50" }
src={`${getUrl()}/images/${discussMessage.author.image_url}`} width="50" let canNotLink = !isAdminOrStudent && discussMessage.is_public == false
></img>
</a> return(
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}> <div className="panel-inner-fourm boardsList">
<h6> <style>{`
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd" .boardsList .panel-list-img {
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }} width: 50px;
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)} height: 50px;
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} }
>{discussMessage.subject}</a> `}</style>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> } { checkBox }
{ <a href={`/users/${discussMessage.author.login}`} alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}>
{/* /images/avatars/User/1?1529221779 */}
discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`}> <img
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> alt="1?1529221779" className="panel-list-img mr15" height="50"
</Tooltip>) : "" src={`${getUrl()}/images/${discussMessage.author.image_url}`} width="50"
} ></img>
</h6> </a>
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<div className="cl"></div> <h6>
<p className="color-grey panel-lightgrey mt18 fl"> <Tooltip title={canNotLink?"私有属性,非课堂成员不能访问":`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} placement="bottom">
<span className="mr50"> <a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
<a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3 font-14">{discussMessage.author.name}</a> style={{ fontWeight: 'bold', cursor: (canNotLink ? 'poninter' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_replies_count} 回复</span> } >{discussMessage.subject}</a>
{ discussMessage.praises_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.praises_count} 点赞</span> } </Tooltip>
{ discussMessage.visits != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.visits} 浏览</span> } { !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{
<span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span>
</span> discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`} placement="bottom">
</p> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
<div className="fr mt15"> </Tooltip>) : ""
{(isAdmin || discussMessage.author.login == current_user.login) && }
<WordsBtn style="blue" className="fl font-16 ml28" </h6>
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
<div className="cl"></div>
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28" <p className="color-grey panel-lightgrey mt18 fl">
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> <span className="mr50">
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> } <a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3 font-14">{discussMessage.author.name}</a>
</div>
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_replies_count} 回复</span> }
{ discussMessage.praises_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.praises_count} 点赞</span> }
{ discussMessage.visits != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.visits} 浏览</span> }
<span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span>
{/* { (isAdmin || discussMessage.author.login == current_user.login) && </span>
<div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}> </p>
<ul> <div className="fr mt15">
<li className="edu-position edu-position-hidebox"> {(isAdmin || discussMessage.author.login == current_user.login) &&
<i className="fa fa-bars color-grey-b"></i> <WordsBtn style="blue" className="fl font-16 ml28"
<ul className="edu-position-hide undis"> onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li> { isAdmin && <WordsBtn style="blue" className="fl font-16 ml28"
} onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
{isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }> { discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
{ discussMessage.sticky ? '取消置顶' : '置顶' } </div>
</a></li>
}
</ul>
</li>
</ul>
</div> {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
} */} <div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
<ul>
<li className="edu-position edu-position-hidebox">
</div> <i className="fa fa-bars color-grey-b"></i>
</div> <ul className="edu-position-hide undis">
) {(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
} this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li>
} }
{isAdmin && <li><a href="javascript:void(0)" onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();} }>
{ discussMessage.sticky ? '取消置顶' : '置顶' }
</a></li>
}
</ul>
</li>
</ul>
</div>
} */}
</div>
</div>
)
}
}
export default BoardsListItem; export default BoardsListItem;

@ -16,7 +16,23 @@ class CommonWorkItem extends Component{
} }
} }
onItemClick = (item) => { onItemClick = (item) => {
const isStudent = this.props.isStudent()
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
const isStudent = this.props.isStudent()
if (isStudent) { if (isStudent) {
this.props.toWorkQuestionPage(this.props.match.params, item.homework_id) this.props.toWorkQuestionPage(this.props.match.params, item.homework_id)
} else { } else {
@ -144,15 +160,15 @@ class CommonWorkItem extends Component{
} }
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }> <div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
<p className="clearfix mb20"> <p className="clearfix mb20">
<a title={item.name} <Tooltip title={ canNotLink ? "私有属性,非课堂成员不能访问" : item.name} placement="bottom" >
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'default' : 'poninter'}} <span className="fl font-16 font-bd mt2 comnonwidth580 pointer" style={{cursor: canNotLink ? 'poninter' : 'poninter'}}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)} onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>{item.name}</a> >{item.name}</span>
</Tooltip>
{/* 只有非课堂成员且作业是私有的情况下才会为true */} {/* 只有非课堂成员且作业是私有的情况下才会为true */}
{ {
item.private_icon===true ? item.private_icon===true ?
(<Tooltip title={ isAdminOrStudent ? "私有属性" : "私有属性,非课堂成员不能访问"}> (<Tooltip title={ isAdminOrStudent ? "私有属性" : "私有属性,非课堂成员不能访问"} placement="bottom" >
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>) : "" </Tooltip>) : ""
} }
@ -182,7 +198,7 @@ class CommonWorkItem extends Component{
{item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>} {item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>}
{ {
item.status_time!="" && item.status_time!="" &&
<Tooltip title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' : <Tooltip placement="bottom" title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' :
item.status.indexOf('补交中') != -1 ? '补交剩余时间' : item.status.indexOf('补交中') != -1 ? '补交剩余时间' :
item.status.indexOf('申诉中') != -1 ? '申诉剩余时间' : item.status.indexOf('申诉中') != -1 ? '申诉剩余时间' :
item.status.indexOf('匿评中') != -1 ? '匿评剩余时间' : item.status.indexOf('匿评中') != -1 ? '匿评剩余时间' :

@ -641,7 +641,7 @@ class CommonWorkList extends Component{
timeMsg = '申诉剩余时间' timeMsg = '申诉剩余时间'
} }
const hasData = student_works && !!student_works.length && page == 1 const hasData = this.state.homework_status && this.state.homework_status.indexOf("未发布") == -1 // student_works && !!student_works.length && page == 1 &&
// console.log(StudentData) // console.log(StudentData)
// console.log(student_works) // console.log(student_works)

@ -1045,10 +1045,7 @@ class Coursesleftnav extends Component{
}) })
: course_modules===undefined?"":course_modules.map((item,key)=>{ : course_modules===undefined?"":course_modules.map((item,key)=>{
if(key===this.props.indexs){
console.log(key)
console.log(this.props.indexs)
}
return( return(
<div key={key}> <div key={key}>
{/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/} {/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/}

@ -51,6 +51,26 @@ class ExerciseListItem extends Component{
Loadtype:false Loadtype:false
}) })
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let{item,checkBox,index}=this.props; let{item,checkBox,index}=this.props;
let {coursesId,Id}=this.props.match.params let {coursesId,Id}=this.props.match.params
@ -96,20 +116,22 @@ class ExerciseListItem extends Component{
{/*<Link to={`/courses/${coursesId}/exercises/${item.id}/exercises/student_exercise_list?tab=0`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}}>{item.exercise_name}</Link>*/} {/*<Link to={`/courses/${coursesId}/exercises/${item.id}/exercises/student_exercise_list?tab=0`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}}>{item.exercise_name}</Link>*/}
{ {
this.props.isAdmin()? <Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" this.props.isAdmin()? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer"
title={item.exercise_name} title={item.exercise_name}
to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:"" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {
this.props.isStudent()? this.props.isStudent()?
<Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" title={item.exercise_name} to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:"" <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {
this.props.isNotMember()? item.lock_status === 0 ? this.props.isNotMember()? item.lock_status === 0 ?
<span className="fl mt3 font-16 font-bd color-dark comnonwidth580" title={item.exercise_name}>{item.exercise_name}</span> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
: <Link className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" title={item.exercise_name} to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</Link>:"" <span className="fl mt3 font-16 font-bd color-dark comnonwidth580 pointer" title={item.exercise_name}>{item.exercise_name}</span>
</Tooltip>
: <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {

@ -1278,20 +1278,6 @@ class Studentshavecompletedthelist extends Component {
}catch (e) { }catch (e) {
} }
try {
if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){
this.setState({
exercise_status:this.props.Commonheadofthetestpaper.exercise_status,
})
}else{
this.setState({
exercise_status:0,
})
}
}catch (e) {
}
} }
componentWillReceiveProps = (nextProps) => { componentWillReceiveProps = (nextProps) => {
@ -1330,7 +1316,7 @@ class Studentshavecompletedthelist extends Component {
}) })
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) { if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止 // 学生未截止
// console.log("试卷学生未截止");
this.Generatenewdatas(response.data.exercise_users); this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
@ -1377,6 +1363,7 @@ class Studentshavecompletedthelist extends Component {
} }
} else { } else {
//学生已截止 //学生已截止
// console.log("试卷学生已截止");
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
var arr =[]; var arr =[];
@ -1458,7 +1445,7 @@ class Studentshavecompletedthelist extends Component {
else if (response.data.exercise_types.user_permission === 0) { else if (response.data.exercise_types.user_permission === 0) {
// console.log(response.data.exercise_users) // console.log(response.data.exercise_users)
// console.log(response) // console.log(response)
// console.log("试卷老师加载中");
if (thiss.state.loadingstate === false) { if (thiss.state.loadingstate === false) {
thiss.setState({ thiss.setState({
loadingstate: true, loadingstate: true,
@ -1469,7 +1456,9 @@ class Studentshavecompletedthelist extends Component {
thiss.Generatenewdatasy(response.data.exercise_users, response); thiss.Generatenewdatasy(response.data.exercise_users, response);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error);
console.log("其实数据加载失败了");
console.log("1111");
}); });
@ -2490,16 +2479,22 @@ class Studentshavecompletedthelist extends Component {
let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state;
// console.log("Studentshavecompletedthelist"); // console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status); // console.log(this.props.current_status);
// console.log("获取到的数据");
// console.log(datas);
// console.log(data);
// console.log("this.props.Commonheadofthetestpaper.exercise_status");
// console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status);
// console.log(exercise_status);
return ( return (
isAdmin === true ? isAdmin === true ?
( (
<div style={{ <div style={{
"margin": "0 auto", "margin": "0 auto",
" min-width": " 1200px", minWidth: " 1200px",
}}> }}>
{/*老师*/} {/*老师*/}
{ {
exercise_status===0 || exercise_status===1 ? this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
<div className="edu-back-white"> <div className="edu-back-white">
<NoneData></NoneData> <NoneData></NoneData>
</div> </div>
@ -2598,9 +2593,9 @@ class Studentshavecompletedthelist extends Component {
{course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" : {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
<li className="clearfix mt10"> <li className="clearfix mt10">
<tr> <tr>
<td className="w80" style={{"vertical-align": "top"}}><span <td className="w80" style={{verticalAlign: "top"}}><span
className=" mr10 color-grey-8 ">分班情况</span></td> className=" mr10 color-grey-8 ">分班情况</span></td>
<td className="w70" style={{"vertical-align": "top"}}><span><a <td className="w70" style={{verticalAlign: "top"}}><span><a
id="graduation_comment_no_limit" id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "} className={unlimitedtwo === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.funtaskstatustwos()}>不限</a></span> onClick={() => this.funtaskstatustwos()}>不限</a></span>
@ -2714,9 +2709,9 @@ class Studentshavecompletedthelist extends Component {
Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ? Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?
<div> <div>
<div className=" clearfix " <div className=" clearfix "
style={{"margin": "0 auto", "padding-bottom": "100px", " min-width": " 1200px"}}> style={{"margin": "0 auto", "padding-bottom": "100px", minWidth: " 1200px"}}>
{ {
exercise_status === 0 || exercise_status === 1 ? this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white"> <div className="edu-back-white">
<NoneData></NoneData> <NoneData></NoneData>
</div> </div>
@ -2794,10 +2789,10 @@ class Studentshavecompletedthelist extends Component {
<div className="clearfix" style={{ <div className="clearfix" style={{
"margin": "0 auto", "margin": "0 auto",
"padding-bottom": "100px", "padding-bottom": "100px",
" min-width": " 1200px" minWidth: " 1200px"
}}> }}>
{ {
exercise_status === 0 || exercise_status === 1 ? this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white"> <div className="edu-back-white">
<NoneData></NoneData> <NoneData></NoneData>
</div> </div>

@ -436,22 +436,22 @@ class Testpapersettinghomepage extends Component{
/> />
{ {
// 教师列表 // 教师列表
parseInt(tab[0])==0 && <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist> parseInt(tab[0])==0 ? <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>:""
} }
{/*统计结果*/} {/*统计结果*/}
{ {
parseInt(tab[0])==1 && <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult> parseInt(tab[0])==1 ? <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>:""
} }
{ {
parseInt(tab[0])==2 && <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay> parseInt(tab[0])==2 ? <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>:""
} }
{ {
parseInt(tab[0])==3 && <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting> parseInt(tab[0])==3 ? <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:""
} }
</div> </div>
</div> </div>

@ -133,6 +133,26 @@ class GraduateTaskItem extends Component{
setupdate=()=>{ setupdate=()=>{
this.props.funlist this.props.funlist
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let { let {
Modalstype, Modalstype,
@ -215,20 +235,22 @@ class GraduateTaskItem extends Component{
<h6> <h6>
{ {
this.props.isAdmin?<Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"} this.props.isAdmin?<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
{ {
this.props.isStudent? <Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"} this.props.isStudent? <a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
{ {
this.props.isNotMember===true?this.props.discussMessage.private_icon===true? this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
:<a href={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"} <span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" >{discussMessage.name}</span>
</Tooltip>
:<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }

@ -1169,7 +1169,7 @@ 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>
<Tooltip placement="bottom" title={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?"正在交叉评阅,不可取消":"":"":""}> <Tooltip placement="bottomLeft" title={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?"正在交叉评阅,不可取消":"":"":""}>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment} <Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span> disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox> </Checkbox>

@ -1215,7 +1215,7 @@ class GraduationTaskssettinglist extends Component{
<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.all_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" class="color-grey-6 font-12"> <a data-remote="true" class="color-grey-6 font-12">

@ -744,6 +744,8 @@ class GraduationTasks extends Component{
<div className="mt20 edu-back-white pt10 pl30 pr30" key={index}> <div className="mt20 edu-back-white pt10 pl30 pr30" key={index}>
<div className="clearfix"> <div className="clearfix">
<GraduateTaskItem <GraduateTaskItem
{...this.state}
{...this.props}
discussMessage={item} discussMessage={item}
isAdmin={this.props.isAdmin()} isAdmin={this.props.isAdmin()}
isStudent={this.props.isStudent()} isStudent={this.props.isStudent()}

@ -15,6 +15,22 @@ class GraduateTopicItem extends Component{
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`);
} }
toDetailPage=(topicId)=>{ toDetailPage=(topicId)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog("iscancel")
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`);
} }
@ -71,7 +87,9 @@ class GraduateTopicItem extends Component{
<h6> <h6>
{ {
isNotMember? isNotMember?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" <Tooltip title={ discussMessage.private_icon===true?"私有属性,非课堂成员不能访问":discussMessage.name} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>
</Tooltip>:""
} }
{ {

@ -359,6 +359,22 @@ class PollDetailTabForthRules extends Component{
return( return(
<div className="clearfix mb5" key={r}> <div className="clearfix mb5" key={r}>
{
flagPageEdit===undefined?"":
flagPageEdit===true?
<style>
{
`
.yskspickersy
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
:""
}
<div className="with40 fl pr20 df"> <div className="with40 fl pr20 df">
<span className="font-16 pr20 fl mt8">发布规则{r+1}</span> <span className="font-16 pr20 fl mt8">发布规则{r+1}</span>
<div className="flex1"> <div className="flex1">
@ -396,7 +412,7 @@ class PollDetailTabForthRules extends Component{
</p> </p>
</div> </div>
</div> </div>
<div className="fl pr20 with25"> <div className="fl pr20 with25 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}> <Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
<span> <span>
<DatePicker <DatePicker
@ -422,7 +438,7 @@ class PollDetailTabForthRules extends Component{
} }
</p> </p>
</div> </div>
<div className="fl mr20"> <div className="fl mr20 yskspickersy">
<Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}> <Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
<span> <span>
<DatePicker <DatePicker

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import Tooltip from 'material-ui/Tooltip'; import {Tooltip} from 'antd';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import moment from 'moment'; import moment from 'moment';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
@ -15,6 +15,25 @@ class PollListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
toDetailPage=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let{item,checkBox,courseType,index}=this.props; let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params; let {coursesId}=this.props.match.params;
@ -37,12 +56,16 @@ class PollListItem extends Component{
} }
<div className="flex1 pr"> <div className="flex1 pr">
<p className="clearfix mb30"> <p className="clearfix mb30">
{ canNotLink ? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px", "cursor": "default"}} title={item.polls_name}>{item.polls_name}</a> : { canNotLink ?
<Link to={`/courses/${coursesId}/polls/${item.id}/detail`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</Link> <Tooltip title={courseType.user_permission == 0?"私有属性,非课堂成员不能访问":item.polls_name} placement="bottom">
<span className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} >{item.polls_name}</span>
</Tooltip>
:
<a onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</a>
} }
{ {
item.lock_status === 0 ? item.lock_status === 0 ?
<Tooltip title={`${courseType.user_permission == 0 ? "私有属性,非课堂成员不能访问" : "私有属性"}`}> <Tooltip title={`${courseType.user_permission == 0 ? "私有属性,非课堂成员不能访问" : "私有属性"}`} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip> </Tooltip>
:"" :""

@ -3320,7 +3320,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.all_member_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span> className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.work_count&&teacherdata.work_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count&&teacherdata.all_member_count} </span>
<style> <style>
{ {
` `

@ -181,9 +181,7 @@ class ShixunHomeworkPage extends Component {
const isAdmin = this.props.isAdmin(); const isAdmin = this.props.isAdmin();
// console.log(119) // console.log(119)
console.log(jobsettingsdatapage); // console.log(jobsettingsdatapage);
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
<Modals <Modals
@ -197,17 +195,21 @@ class ShixunHomeworkPage extends Component {
</Modals> </Modals>
<div className={"educontent mt10 mb20"} style={{width: "1200px"}}> <div className={"educontent mt10 mb20"} style={{width: "1200px"}}>
<Spin size="large" spinning={this.state.mylistisSpin}> <Spin size="large" spinning={this.state.mylistisSpin}>
<div className="educontent mb20"> {
<p className="clearfix mb20 mt10"> jobsettingsdatapage === undefined?"":
<a className="btn colorgrey fl hovercolorblue " href={this.props.current_user&&this.props.current_user.first_category_url}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}</a> <div className="educontent mb20">
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <p className="clearfix mb20 mt10">
<a <a className="btn colorgrey fl hovercolorblue " href={this.props.current_user&&this.props.current_user.first_category_url}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}</a>
className=" btn colorgrey fl hovercolorblue " <span className="color-grey-9 fl ml3 mr3">&gt;</span>
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}</a> <a
<span className="color-grey-9 fl ml3 mr3">&gt;</span> className=" btn colorgrey fl hovercolorblue "
<WordsBtn className="fl">作业详情</WordsBtn> href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}</a>
</p> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
</div> <WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
}
<div className="educontent mb20"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth: "33px"}}> <p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name} {teacherdatapage === undefined ? "" : teacherdatapage.homework_name}

@ -143,6 +143,27 @@ class ShixunhomeWorkItem extends Component{
ModalsRenametype:false, ModalsRenametype:false,
}) })
} }
hrefjumpskip=(url)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.history.push(url);
}
render(){ render(){
let { let {
Modalstype, Modalstype,
@ -294,23 +315,25 @@ class ShixunhomeWorkItem extends Component{
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{ {
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0"} this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
{ {
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`} this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true? this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`} <span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>
</Tooltip>
: <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }

@ -67,7 +67,7 @@ class Trainingjobsetting extends Component {
// //
// }); // });
this.state = { this.state = {
flagPageEdit: undefined, flagPageEdit: true,
flagPageEdits: false, flagPageEdits: false,
flagPageEditstwo:false, flagPageEditstwo:false,
flagPageEditsthrees:false, flagPageEditsthrees:false,
@ -241,26 +241,26 @@ class Trainingjobsetting extends Component {
} }
} }
} }
console.log("220"); // console.log("220");
var publish_timebools=false; var publish_timebools=false;
if(result.data.publish_time){ if(result.data.publish_time){
publish_timebools= moment(result.data.publish_time,"YYYY-MM-DD HH:mm")<=moment(); publish_timebools= moment(result.data.publish_time,"YYYY-MM-DD HH:mm")<=moment();
} }
console.log("228"); // console.log("228");
console.log(publish_timebools); // console.log(publish_timebools);
var end_timebools =false; var end_timebools =false;
if(result.data.end_time){ if(result.data.end_time){
end_timebools == moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment(); end_timebools == moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
} }
console.log("233"); // console.log("233");
console.log(end_timebools); // console.log(end_timebools);
var late_timess=false; var late_timess=false;
if(result.data.late_time){ if(result.data.late_time){
late_timess== moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment(); late_timess== moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
} }
console.log("240"); // console.log("240");
console.log(late_timess); // console.log(late_timess);
this.setState({ this.setState({
@ -1805,6 +1805,7 @@ class Trainingjobsetting extends Component {
modalSave: this.cancelBox modalSave: this.cancelBox
}) })
} else { } else {
// debugger
var releasetime =true; var releasetime =true;
var deadline = true; var deadline = true;
var endtime =true; var endtime =true;
@ -1851,6 +1852,9 @@ class Trainingjobsetting extends Component {
} }
}catch (e) { }catch (e) {
console.log(1);
console.log(e);
} }
@ -1875,6 +1879,8 @@ class Trainingjobsetting extends Component {
} }
} }
}catch (e) { }catch (e) {
console.log(2);
console.log(e);
this.setState({ this.setState({
flagPageEditsbox:true, flagPageEditsbox:true,
flagPageEdit: true, flagPageEdit: true,
@ -1905,9 +1911,10 @@ class Trainingjobsetting extends Component {
} }
} catch (e) { } catch (e) {
console.log(3);
console.log(e);
} }
} };
//取消编辑 //取消编辑
cancelEdit = () => { cancelEdit = () => {
this.setState({ this.setState({
@ -2117,7 +2124,24 @@ class Trainingjobsetting extends Component {
loadtype={loadtype} loadtype={loadtype}
modalSave={modalSave} modalSave={modalSave}
></Modals> ></Modals>
<div className={"educontent "}>
<div className={"educontent"}>
{
!flagPageEdit && this.props.isAdmin() === true ?
""
:
<style>
{
`
.yskspickers
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
}
<div className="edu-back-white" style={{paddingTop: "20px"}}> <div className="edu-back-white" style={{paddingTop: "20px"}}>
{/*发布设置*/} {/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white"> <div className="stud-class-set bor-bottom-greyE edu-back-white">
@ -2155,7 +2179,7 @@ class Trainingjobsetting extends Component {
<div className="clearfix mb5 ml15"> <div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span> <span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}>
<div className="fl"> <div className="fl yskspickers">
<DatePicker <DatePicker
showToday={false} showToday={false}
id={"publishtimeid"} id={"publishtimeid"}
@ -2188,7 +2212,7 @@ class Trainingjobsetting extends Component {
<div className="clearfix ml15 mb5"> <div className="clearfix ml15 mb5">
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span> <span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}>
<div className="fl"> <div className="fl yskspickers">
<DatePicker <DatePicker
showToday={false} showToday={false}
id={"end_timeid"} id={"end_timeid"}
@ -2261,7 +2285,7 @@ class Trainingjobsetting extends Component {
` `
} }
</style> </style>
<InputNumber disabled={!flagPageEditsfor || !whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9" <InputNumber disabled={!whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
onChange={this.changeTopicName} onChange={this.changeTopicName}
style={{"color":"#999999","height": "40px"}} style={{"color":"#999999","height": "40px"}}
value={this.state.latededuction}/> value={this.state.latededuction}/>
@ -2269,8 +2293,21 @@ class Trainingjobsetting extends Component {
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span> <span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/} {/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
</div> </div>
{
<div className={"h20 mb20 "}> whethertopay&& whethertopay === true ?
<style>
{
`
.yskspickerss
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
`
}
</style>
:""
}
<div className={"h20 mb20 yskspickerss"}>
<span style={{"width": "100px","color":"#999999"}}>结束时间</span> <span style={{"width": "100px","color":"#999999"}}>结束时间</span>
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -2286,7 +2323,7 @@ class Trainingjobsetting extends Component {
onOk={this.ontimeonokthree} onOk={this.ontimeonokthree}
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
width={"210px"} width={"210px"}
disabled={!flagPageEditsfor || !whethertopay} disabled={ !whethertopay}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
className={handclass} className={handclass}
/> />
@ -2403,7 +2440,7 @@ class Trainingjobsetting extends Component {
</span> </span>
</div> </div>
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span <p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p> className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)</span></p>
<div className="ml40 mt15" > <div className="ml40 mt15" >
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => { {this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return ( return (
@ -2433,7 +2470,7 @@ class Trainingjobsetting extends Component {
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}> <RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span <Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio> className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值)</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15" <Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio> value={"满分"}>不扣分 </Radio>
</RadioGroup> </RadioGroup>

@ -84,7 +84,8 @@ class ShixunHomework extends Component{
} }
componentDidMount() { componentDidMount() {
this.setState({ this.setState({
isSpin:true isSpin:true,
}) })
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){
this.setState({ this.setState({
@ -108,7 +109,8 @@ class ShixunHomework extends Component{
} }
seactall=(id)=>{ seactall=(id)=>{
this.setState({ this.setState({
isSpin:true isSpin:true,
checkBoxValues:[]
}) })
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/homework_commons.json?type=4"; let url="/courses/"+coursesId+"/homework_commons.json?type=4";
@ -1080,7 +1082,7 @@ class ShixunHomework extends Component{
</span>: </span>:
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""} <WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""}
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实践课程</WordsBtn>:"":""} {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实践课程</WordsBtn>:"":""}
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.showNewShixunModelType()}>选用实训</a>:""} {this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.showNewShixunModelType()}>选用实训项目</a>:""}
</li> </li>
</p> </p>

@ -398,9 +398,13 @@ class LoginDialog extends Component {
}); });
} }
handleDialogClose = () => { handleDialogClose = () => {
if(this.props.isloginCancel===undefined){
if(this.props.match===undefined){ window.location.href="/";
window.location.href="/"; this.props.Modifyloginvalue();
// this.setState({
// isRender: false
// })
// this.props.Modifyloginvalue();
}else{ }else{
this.setState({ this.setState({
isRender: false isRender: false

@ -3,7 +3,6 @@ import {getImageUrl} from 'educoder';
import {Tooltip,Modal,Icon,Spin,message} from 'antd'; import {Tooltip,Modal,Icon,Spin,message} from 'antd';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd'; import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import DetailCardsEditAndEdit from './DetailCardsEditAndEdit'; import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
import AccountProfile from"../../user/AccountProfile";
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
@ -200,13 +199,16 @@ class DetailCards extends Component{
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.checkIfProfileCompleted()===false){
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
return return
} }
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
let url = "/shixuns/" + id + "/shixun_exec.json"; let url = "/shixuns/" + id + "/shixun_exec.json";
@ -308,16 +310,11 @@ class DetailCards extends Component{
startshixunCombattype:false startshixunCombattype:false
}) })
} }
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){ render(){
let { pathCardsList, let { pathCardsList,
dropid, dropid,
AccountProfiletype,
idsum, idsum,
pathCardsedittype, pathCardsedittype,
pathlistedit, pathlistedit,
@ -339,11 +336,7 @@ class DetailCards extends Component{
// console.log("zzz"+this.props.MenuItemsindextype) // console.log("zzz"+this.props.MenuItemsindextype)
return( return(
<div> <div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}

@ -374,7 +374,7 @@ class DetailCardsEditAndAdd extends Component{
<p className="clearfix mb30"> <p className="clearfix mb30">
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37"> <a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i> <i className="iconfont icon-tianjiafangda fl mr5"></i>
选择实训</a> 选用实训项目</a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span> <span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p> </p>

@ -378,7 +378,7 @@ class DetailCardsEditAndEdit extends Component{
</div> </div>
<p className="clearfix mb30"> <p className="clearfix mb30">
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37"> <a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
<i className="iconfont icon-tianjiafangda fl mr5"></i> <i className="iconfont icon-tianjiafangda fl mr5"></i>
</a> </a>
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span> <span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后可以通过拖拽进行排序调整</span>
</p> </p>

@ -5,7 +5,6 @@ import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder'; import { getImageUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import AccountProfile from"../../user/AccountProfile";
import OpenCourse from './OpenCourse'; import OpenCourse from './OpenCourse';
import Jointheclass from '../../modals/Jointheclass'; import Jointheclass from '../../modals/Jointheclass';
import './DetailTop.css'; import './DetailTop.css';
@ -30,7 +29,7 @@ class DetailTop extends Component{
Pathcourseid:undefined, Pathcourseid:undefined,
OpenCourseTypes:false, OpenCourseTypes:false,
putappointmenttype:false, putappointmenttype:false,
getappointmenttype:false getappointmenttype:false,
} }
} }
componentDidMount(){ componentDidMount(){
@ -249,8 +248,13 @@ class DetailTop extends Component{
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.checkIfProfileCompleted()===false){
if(this.props.current_user&&this.props.current_user.profile_completed===false){ this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog() this.props.showProfileCompleteDialog()
return return
} }
@ -268,13 +272,16 @@ class DetailTop extends Component{
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.checkIfProfileCompleted()===false){
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
return return
} }
if(this.props.checkIfProfessionalCertification()===false){
this.props.showProfileCompleteDialog()
return
}
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
@ -336,14 +343,10 @@ class DetailTop extends Component{
}) })
} }
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){ render(){
let{detailInfoList}=this.props; let{detailInfoList}=this.props;
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state; let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state;
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -373,11 +376,7 @@ class DetailTop extends Component{
return( return(
<div className={this.props.courses===undefined?"subhead":this.props.courses.length===0?applypath===true?"subhead mb100":"subhead":applypath===false?detailInfoList.name.length>40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}> <div className={this.props.courses===undefined?"subhead":this.props.courses.length===0?applypath===true?"subhead mb100":"subhead":applypath===false?detailInfoList.name.length>40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}

@ -167,7 +167,15 @@ class TPMBanner extends Component {
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
@ -390,7 +398,14 @@ class TPMBanner extends Component {
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.checkIfProfessionalCertification()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })

@ -83,6 +83,7 @@ export function TPMIndexHOC(WrappedComponent) {
globalLoading: false, globalLoading: false,
dataquerys:{}, dataquerys:{},
isloginCancel:undefined
} }
} }
@ -429,15 +430,16 @@ export function TPMIndexHOC(WrappedComponent) {
}; };
hideLoginDialog = () => { hideLoginDialog = () => {
this.setState({ this.setState({
isRender: false isRender: false,
isloginCancel:undefined
}) })
} }
showLoginDialog = () => { showLoginDialog = () => {
this.setState({ this.setState({
isRender: true isRender: true,
isloginCancel:"iscancel"
}) })
} }
checkIfLogin = () => { checkIfLogin = () => {
return this.state.current_user && this.state.current_user.login != '' return this.state.current_user && this.state.current_user.login != ''
} }

@ -52,7 +52,7 @@ export default class TPMUpdatepropaede extends Component {
updatepropaedeuticsvalue=()=>{ updatepropaedeuticsvalue=()=>{
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url="/shixuns/"+id+"/update_propaedeutics.json"; let url="/shixuns/"+id+"/update_propaedeutics.json";
const update_propaedeuticsvalue = this.editanswersRef.current.getValue().trim(); const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim();
axios.post(url,{ axios.post(url,{
content:update_propaedeuticsvalue content:update_propaedeuticsvalue
} }

@ -227,8 +227,14 @@ class Challenges extends Component {
return return
} }
if(this.props.checkIfProfileCompleted()===false){
this.setState({
AccountProfiletype:true
})
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.checkIfProfessionalCertification()===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })

@ -16,8 +16,10 @@ import { getImageUrl, toPath } from 'educoder'
import axios from 'axios'; import axios from 'axios';
import NoneData from "../../../courses/coursesPublic/NoneData";
import './Collaborators.css'; import './Collaborators.css';
import SchoolSelect from "../../../courses/members/modal/AddStudentModal";
const $ = window.$; const $ = window.$;
@ -34,7 +36,7 @@ class Collaborators extends Component {
Collaboratorsvisibleadmin: false, Collaboratorsvisibleadmin: false,
value: 1, value: 1,
page: 1, page: 1,
Searchadmin: [], Searchadmin: undefined,
allChangechecked: false, allChangechecked: false,
Collaboratorslist: [], Collaboratorslist: [],
Collaboratorslisttype: false, Collaboratorslisttype: false,
@ -88,6 +90,7 @@ class Collaborators extends Component {
}); });
} }
CollaboratorsshowModal = (type) => { CollaboratorsshowModal = (type) => {
if (type === "cooperation") { if (type === "cooperation") {
this.setState({ this.setState({
Collaboratorsvisibleadmin: false, Collaboratorsvisibleadmin: false,
@ -108,9 +111,10 @@ class Collaborators extends Component {
} }
showCollaboratorsvisible = (type) => { showCollaboratorsvisible = (type) => {
this.setState({ this.setState({
Collaboratorslist: [], Collaboratorslist: [],
Searchadmin:[], Searchadmin:undefined,
onSearchcalue:"" onSearchcalue:""
}) })
let admintype = this.props.identity; let admintype = this.props.identity;
@ -160,7 +164,7 @@ class Collaborators extends Component {
let {collaboratorList,user_name,school_name} = this.state; let {collaboratorList,user_name,school_name} = this.state;
this.setState({ this.setState({
Searchadmin: [], // Searchadmin: undefined,
spinnings:true, spinnings:true,
}) })
// if (value === "") { // if (value === "") {
@ -199,6 +203,7 @@ class Collaborators extends Component {
} }
selectChangenickname = (e, key) => { selectChangenickname = (e, key) => {
let {Searchadmin} = this.state; let {Searchadmin} = this.state;
let newlist = Searchadmin; let newlist = Searchadmin;
for (var i = 0; i < newlist.length; i++) { for (var i = 0; i < newlist.length; i++) {
@ -235,6 +240,7 @@ class Collaborators extends Component {
} }
allChange = (e) => { allChange = (e) => {
let {Searchadmin} = this.state; let {Searchadmin} = this.state;
let newlist = Searchadmin; let newlist = Searchadmin;
for (var i = 0; i < newlist.length; i++) { for (var i = 0; i < newlist.length; i++) {
@ -246,6 +252,7 @@ class Collaborators extends Component {
}) })
} }
submit_add_collaborators_form = () => { submit_add_collaborators_form = () => {
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let {Searchadmin,collaboratorList} = this.state; let {Searchadmin,collaboratorList} = this.state;
let newlist = Searchadmin; let newlist = Searchadmin;
@ -300,6 +307,7 @@ class Collaborators extends Component {
} }
submit_addadminredio = () => { submit_addadminredio = () => {
let {addadminrediovalue} = this.state; let {addadminrediovalue} = this.state;
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
@ -371,6 +379,7 @@ class Collaborators extends Component {
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
let newscrollTop=parseInt(e.currentTarget.scrollTop); let newscrollTop=parseInt(e.currentTarget.scrollTop);
let allclientHeight=e.currentTarget.clientHeight+newscrollTop; let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
@ -395,7 +404,6 @@ class Collaborators extends Component {
newSearchadmin.push(newlist[i]) newSearchadmin.push(newlist[i])
} }
console.log(newSearchadmin)
this.setState({ this.setState({
Searchadmin: newSearchadmin, Searchadmin: newSearchadmin,
collaboratorList: collaboratorList, collaboratorList: collaboratorList,
@ -434,10 +442,10 @@ class Collaborators extends Component {
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
}; };
// console.log(collaboratorList)
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
console.log(Searchadmin)
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mt30" <p className="clearfix mt30"
@ -495,68 +503,68 @@ class Collaborators extends Component {
</Modal> </Modal>
<Modal {Collaboratorsvisibleadmin===true?<Modal
keyboard={false} keyboard={false}
title="添加合作者" title="添加合作者"
visible={Collaboratorsvisibleadmin} visible={Collaboratorsvisibleadmin}
closable={false} closable={false}
footer={null} footer={null}
width={800} width={800}
> >
{/*<Search*/} {/*<Search*/}
{/*placeholder="输入用户的姓名、昵称、邮箱进行搜索"*/} {/*placeholder="输入用户的姓名、昵称、邮箱进行搜索"*/}
{/*value={onSearchcalue}*/} {/*value={onSearchcalue}*/}
{/*onSearch={(value) => this.onSearchadmin(value)}*/} {/*onSearch={(value) => this.onSearchadmin(value)}*/}
{/*onInput={this.onSearchadmins}*/} {/*onInput={this.onSearchadmins}*/}
{/*style={{width: '100%'}}*/} {/*style={{width: '100%'}}*/}
{/*/>*/} {/*/>*/}
<span className="mr10">姓名或手机号:</span> <span className="mr10">姓名或手机号:</span>
<Input placeholder="请输入姓名或手机号码搜索" value={user_name} onInput={(e) => {this.setState({user_name: e.target.value})}} <Input placeholder="请输入姓名或手机号码搜索" value={user_name} onInput={(e) => {this.setState({user_name: e.target.value})}}
style={{ width: '215px'}} style={{ width: '215px'}}
></Input> ></Input>
<span className="label ml10 " style={{ minWidth: '36px' }}>单位:</span> <span className="label ml10 " style={{ minWidth: '36px' }}>单位:</span>
<Input placeholder="请输入单位名称" className="ml10" value={school_name} onInput={(e) => {this.setState({school_name: e.target.value})}} <Input placeholder="请输入单位名称" className="ml10" value={school_name} onInput={(e) => {this.setState({school_name: e.target.value})}}
style={{ width: '215px'}} style={{ width: '215px'}}
> >
</Input> </Input>
<a className="task-btn task-btn-orange ml20" onClick={() => this.onSearchadmin()} <a className="task-btn task-btn-orange ml20" onClick={() => this.onSearchadmin()}
style={{ height: '30px', lineHeight: '30px', width: '70px'}} style={{ height: '30px', lineHeight: '30px', width: '70px'}}
>搜索</a> >搜索</a>
<p className="clearfix pl35 mt20"> <p className="clearfix pl35 mt20">
<span className="fl edu-txt-w100 task-hide font-bd ml10 edu-txt-left">姓名</span> <span className="fl edu-txt-w100 task-hide font-bd ml10 edu-txt-left">姓名</span>
<span className="fl edu-txt-w100 task-hide font-bd">职业</span> <span className="fl edu-txt-w100 task-hide font-bd">职业</span>
<span className="fl edu-txt-w180 task-hide font-bd ml80">单位</span> <span className="fl edu-txt-w180 task-hide font-bd ml80">单位</span>
</p> </p>
<div className="mt5" style={{background: '#f7f9fd'}}> <div className="mt5" style={{background: '#f7f9fd'}}>
<Spin indicator={antIcon} spinning={this.state.spinnings}> <Spin indicator={antIcon} spinning={this.state.spinnings}>
<div className="clearfix"> <div className="clearfix">
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}> <ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}> {Searchadmin === undefined ? <li style={{textAlign: 'center'}}>
<span>请试试搜索一下</span> <span>请试试搜索一下</span>
</li> : Searchadmin.map((item, key) => { </li>:Searchadmin.length === 0 ?<NoneData/>: Searchadmin.map((item, key) => {
return ( return (
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}> <li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
<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 fl span1 edu-txt-w80 edu-txt-left">{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
title={item.school_name} title={item.school_name}
style={{width: '150px'}} style={{width: '150px'}}
className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span> className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span>
</li> </li>
) )
}) })
} }
</ul> </ul>
</div> </div>
</Spin> </Spin>
</div> </div>
<div className="mt10 clearfix"> <div className="mt10 clearfix">
<span className="fl mr15"> <span className="fl mr15">
<Checkbox className="fl" checked={allChangechecked} onChange={this.allChange}>全选</Checkbox> <Checkbox className="fl" checked={allChangechecked} onChange={this.allChange}>全选</Checkbox>
@ -567,15 +575,15 @@ class Collaborators extends Component {
</span> </span>
</div> </div>
{useristrue===true?<span className={"color-red"}>请先选择用户</span>:""} {useristrue===true?<span className={"color-red"}>请先选择用户</span>:""}
<div className="clearfix edu-txt-center mt20"> <div className="clearfix edu-txt-center mt20">
<a className="pop_close task-btn mb10 mr40 colorFFF" <a className="pop_close task-btn mb10 mr40 colorFFF"
onClick={() => this.CollaboratorsshowModal("cooperation")}>取消</a> onClick={() => this.CollaboratorsshowModal("cooperation")}>取消</a>
<a className="task-btn task-btn-orange" <a className="task-btn task-btn-orange"
onClick={() => this.submit_add_collaborators_form()}>确定</a> onClick={() => this.submit_add_collaborators_form()}>确定</a>
</div> </div>
</Modal> </Modal>:""}
<div className="pl20" id="collaborators_list_info"> <div className="pl20" id="collaborators_list_info">
{ {

Loading…
Cancel
Save