Merge branch 'dev_aliyun' into dev_cxt

dev_ec
cxt 6 years ago
commit 00433b9e03

@ -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

@ -1,7 +1,7 @@
class Ecs::ReachEvaluationsController < Ecs::BaseController class Ecs::ReachEvaluationsController < Ecs::BaseController
def show def show
preload = { ec_graduation_subitems: { ec_course_support: [:ec_course, :ec_graduation_requirement_calculation] } } preload = { ec_graduation_subitems: { ec_course_supports: [:ec_course, :ec_graduation_requirement_calculation] } }
@graduation_requirements = current_year.ec_graduation_requirements.includes(preload) @graduation_requirements = current_year.ec_graduation_requirements.includes(preload)
respond_to do |format| respond_to do |format|

@ -692,7 +692,7 @@ class PollsController < ApplicationController
else else
unified_setting = @poll.unified_setting unified_setting = @poll.unified_setting
end end
show_result = params[:show_result] ? 1 : 0 show_result = params[:show_result].to_i
un_anonymous = params[:un_anonymous] ? true : false un_anonymous = params[:un_anonymous] ? true : false
# 统一设置或者分班为0则更新问卷并删除问卷分组 # 统一设置或者分班为0则更新问卷并删除问卷分组
if unified_setting || (course_group_ids.size == 0) if unified_setting || (course_group_ids.size == 0)

@ -126,10 +126,11 @@ module ApplicationHelper
# 用户图像url如果不存在的话source为匿名用户即默认使用匿名用户图像 # 用户图像url如果不存在的话source为匿名用户即默认使用匿名用户图像
def url_to_avatar(source) def url_to_avatar(source)
if File.exist?(disk_filename(source.class, source.id)) if File.exist?(disk_filename(source.class, source.id))
ctime = File.ctime(disk_filename(source.class, source.id)).to_i
if source.class.to_s == 'User' if source.class.to_s == 'User'
File.join(relative_path, ["#{source.class}", "#{source.id}"]) File.join(relative_path, ["#{source.class}", "#{source.id}"]) + "?t=#{ctime}"
else else
File.join("images/avatars", ["#{source.class}", "#{source.id}"]) File.join("images/avatars", ["#{source.class}", "#{source.id}"]) + "?t=#{ctime}"
end end
elsif source.class.to_s == 'User' elsif source.class.to_s == 'User'
str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g"

@ -11,6 +11,7 @@ json.tasks @tasks.each do |task|
task_curr_status = task_curr_status(task, @course) task_curr_status = task_curr_status(task, @course)
json.status task_curr_status[:status] json.status task_curr_status[:status]
json.status_time task_curr_status[:time] json.status_time task_curr_status[:time]
json.author task.user.real_name
unless task_curr_status[:status].include?("未发布") unless task_curr_status[:status].include?("未发布")
json.commit_count grduationwork_count task, 1 json.commit_count grduationwork_count task, 1

@ -4,5 +4,5 @@ json.name user.full_name
json.grade user.grade json.grade user.grade
json.identity user&.user_extension&.identity json.identity user&.user_extension&.identity
# json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开
json.image_url image_tag(url_to_avatar(user)) json.image_url url_to_avatar(user)
json.school user.school_name json.school user.school_name

@ -5,6 +5,7 @@ json.members_count course.course_members_count
# json.homework_commons_count course.homework_commons_count # json.homework_commons_count course.homework_commons_count
json.homework_commons_count get_tasks_count course json.homework_commons_count get_tasks_count course
json.attachments_count course.attachments.count json.attachments_count course.attachments.count
json.visits course.visits
json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course) json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course)

@ -1,6 +1,6 @@
json.id @user.id json.id @user.id
json.name @user.full_name json.name @user.full_name
json.avatar_url image_tag(url_to_avatar(@user)) json.avatar_url url_to_avatar(@user)
json.is_logged_user @user.logged_user? json.is_logged_user @user.logged_user?
json.experience @user.experience json.experience @user.experience
json.grade @user.grade json.grade @user.grade

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'

@ -113,13 +113,13 @@
} }
this.hide().lockScreen(false).hideMask(); this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false; return false;
}], }],
cancel : [lang.buttons.cancel, function() { cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask(); this.hide().lockScreen(false).hideMask();
cm.focus && cm.focus()
return false; return false;
}] }]
} }

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map", // devtool: "cheap-module-eval-source-map",
// 开启调试 // 开启调试
// devtool: "eval", // 开启调试 // devtool: "eval-source-map", // 开启调试
// These are the "entry points" to our application. // These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle. // This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS. // The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -3,13 +3,12 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />--> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no --> <!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> --> <!-- <meta name="viewport" content=""> -->
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"> <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

@ -2,6 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
<!-- <!--

File diff suppressed because one or more lines are too long

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前缀

@ -299,7 +299,6 @@ class CoursesIndex extends Component{
this.historyArray = [window.location.pathname]; this.historyArray = [window.location.pathname];
this.props.history.listen( location => { this.props.history.listen( location => {
console.log(location);
this.historyArray.unshift(window.location.pathname); this.historyArray.unshift(window.location.pathname);
this.historyArray.length = 2; this.historyArray.length = 2;
//Do your stuff here //Do your stuff here

@ -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,6 +113,9 @@ class Fileslists extends Component{
updadatalist=(id)=>{ updadatalist=(id)=>{
// this.seactall(id) // this.seactall(id)
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user.login=== null||this.props.user&&this.props.user.login=== undefined){
}else{
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/attahcment_category_list.json"; let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, { axios.get(url, {
@ -139,6 +142,8 @@ class Fileslists extends Component{
}) })
} }
}
updatafiled=()=>{ updatafiled=()=>{
if(this.props.match.params.main_id){ if(this.props.match.params.main_id){
this.seactall(); this.seactall();

@ -10,6 +10,21 @@ class BoardsListItem extends Component{
} }
} }
onTitleClick = (discussMessage) => { onTitleClick = (discussMessage) => {
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 isAdminOrStudent = this.props.isAdminOrStudent(); const isAdminOrStudent = this.props.isAdminOrStudent();
if (!isAdminOrStudent && discussMessage.is_public == false) { if (!isAdminOrStudent && discussMessage.is_public == false) {
// 没有权限访问 // 没有权限访问
@ -47,15 +62,16 @@ class BoardsListItem extends Component{
</a> </a>
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}> <div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<h6> <h6>
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd" <Tooltip title={canNotLink?"私有属性,非课堂成员不能访问":`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} placement="bottom">
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }} <a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'poninter' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)} onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`}
>{discussMessage.subject}</a> >{discussMessage.subject}</a>
</Tooltip>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> } { !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{ {
discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`}> discussMessage.is_public == false ? (<Tooltip title={`${isAdminOrStudent ? '私有属性' : '私有属性,非课堂成员不能访问'}`} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip>) : "" </Tooltip>) : ""
} }

@ -16,6 +16,22 @@ class CommonWorkItem extends Component{
} }
} }
onItemClick = (item) => { onItemClick = (item) => {
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() 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)
@ -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)

@ -70,10 +70,23 @@ class NewWorkForm extends Component{
contentFileList, contentFileList,
answerFileList, answerFileList,
}, () => { }, () => {
setTimeout(() => { // setTimeout(() => {
this.contentMdRef.current.setValue(data.description || '') // this._scrollToTop()
this.answerMdRef.current.setValue(data.reference_answer || '') // 阻止setValue的滚动
}, 2000) // $(window).scroll( function() {
// $("html").scrollTop(0)
// $(window).unbind("scroll");
// });
/**
setValue会调用到 codemirror的 o.scrollIntoView(i), 会导致滚动条跳动
*/
// $('.editormd').parent().css('position', 'fixed').css('left', '-1000px')
// this.contentMdRef.current.setValue(data.description || '')
// this.answerMdRef.current.setValue(data.reference_answer || '')
// setTimeout(() => {
// $('.editormd').parent().css('position', '').css('left', 'auto')
// }, 100);
// }, 500)
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
title: data.name, title: data.name,
@ -85,12 +98,13 @@ class NewWorkForm extends Component{
} else { // new } else { // new
} }
this._scrollToTop() // this._scrollToTop()
} }
_scrollToTop = () => { _scrollToTop = () => {
setTimeout(() => { // setTimeout(() => {
$("html").animate({ scrollTop: 0 }) $("html").scrollTop(0)
}, 1500) // $("html").animate({ scrollTop: 0 })
// }, 1000)
} }
// 输入title // 输入title
@ -303,15 +317,13 @@ class NewWorkForm extends Component{
let{ let{
title_value, contentFileList, answerFileList, max_num, min_num, base_on_project, title_value, contentFileList, answerFileList, max_num, min_num, base_on_project,
init_max_num, init_min_num, init_max_num, init_min_num,
title_num, course_name, category, has_commit, has_project, title_num, course_name, category, has_commit, has_project
isEdit
}=this.state }=this.state
const { current_user } = this.props const { current_user } = this.props
const courseId = this.state.course_id || this.props.match.params.coursesId ; const courseId = this.state.course_id || this.props.match.params.coursesId ;
this.isEdit = this.isEdit || this.props.match.url.indexOf('/edit') != -1
if ((isEdit) && !this.state.workLoaded) { if ((this.isEdit) && !this.state.description && this.state.description != '') {
return '' return ''
} }
const uploadProps = { const uploadProps = {
@ -439,7 +451,8 @@ class NewWorkForm extends Component{
}], }],
})( })(
<TPMMDEditor ref={this.contentMdRef} placeholder="请在此输入作业内容和要求,最大限制5000个字符" mdID={'courseContentMD'} refreshTimeout={1500} <TPMMDEditor ref={this.contentMdRef} placeholder="请在此输入作业内容和要求,最大限制5000个字符" mdID={'courseContentMD'} refreshTimeout={1500}
className="courseMessageMD" initValue={this.state.description}></TPMMDEditor> initValue={this.state.description} noSetValueOnInit={!!this.isEdit}
className="courseMessageMD" ></TPMMDEditor>
)} )}
</Form.Item> } </Form.Item> }
<Upload {...uploadProps} className="upload_1 newWorkUpload"> <Upload {...uploadProps} className="upload_1 newWorkUpload">
@ -507,7 +520,8 @@ class NewWorkForm extends Component{
}], }],
})( })(
<TPMMDEditor ref={this.answerMdRef} placeholder="请在此输入作业的参考答案,最大限制5000个字符" mdID={'workAnswerMD'} <TPMMDEditor ref={this.answerMdRef} placeholder="请在此输入作业的参考答案,最大限制5000个字符" mdID={'workAnswerMD'}
className="courseMessageMD" refreshTimeout={1500} initValue={this.state.reference_answer || ''}></TPMMDEditor> initValue={this.state.reference_answer || ''} noSetValueOnInit={!!this.isEdit}
className="courseMessageMD" refreshTimeout={1500} ></TPMMDEditor>
)} )}
</Form.Item> </Form.Item>
<Upload {...answerUploadProps} className="upload_1 newWorkUpload resetNewWorkUpload"> <Upload {...answerUploadProps} className="upload_1 newWorkUpload resetNewWorkUpload">

@ -16,7 +16,7 @@ class CBreadcrumb extends Component{
return '' return ''
} }
if (item.to) { if (item.to) {
return <React.Fragment> return <React.Fragment key={index}>
<WordsBtn style="grey" className="fl hovercolorblue" to={item.to}>{item.name}</WordsBtn> <WordsBtn style="grey" className="fl hovercolorblue" to={item.to}>{item.name}</WordsBtn>
{separator ? {separator ?
<span className="color-grey-9 fl ml3 mr3">{separator}</span> : <span className="color-grey-9 fl ml3 mr3">{separator}</span> :
@ -24,7 +24,7 @@ class CBreadcrumb extends Component{
} }
</React.Fragment> </React.Fragment>
} else { } else {
return <span>{item.name}</span> return <span key={index}>{item.name}</span>
} }
})} })}
</p> </p>

@ -181,7 +181,7 @@ class Coursesleftnav extends Component{
on('editshixunname',this.editshixunchild) on('editshixunname',this.editshixunchild)
on('editshixunmainname',this.editshixunmainname) on('editshixunmainname',this.editshixunmainname)
this.props.updataleftNavfun(); // this.props.updataleftNavfun();
// this.props.getleftNavid && this.props.getleftNavid("shixun_homework"); // this.props.getleftNavid && this.props.getleftNavid("shixun_homework");
// const position =parseInt(this.props.match.params.position); // const position =parseInt(this.props.match.params.position);
@ -239,50 +239,52 @@ class Coursesleftnav extends Component{
setnavid=(e,key,id,type,url)=>{ setnavid=(e,key,id,type,url)=>{
// this.props.getleftNavid && this.props.getleftNavid(key,type); // this.props.getleftNavid && this.props.getleftNavid(key,type);
let {selectnavid,navid}=this.state; // let {selectnavid,navid}=this.state;
//
if(navidtype===true&&selectnavid===false){ // if(navidtype===true&&selectnavid===false){
//
if(navid===key){ // if(navid===key){
this.setState({ // this.setState({
navid:"", // navid:"",
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
}else{ // }else{
this.setState({ // this.setState({
navid:key, // navid:key,
positiontype:type, // positiontype:type,
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
} // }
}else{ // }else{
// console.log(navidtype) // // console.log(navidtype)
// console.log(selectnavid) // // console.log(selectnavid)
this.setState({ // this.setState({
navid:"", // navid:"",
selectnavid:false, // selectnavid:false,
newselectnavid:id // newselectnavid:id
}) // })
} // }
this.props.updataleftNavfun(); //
this.props.history.replace( url ); // this.props.updataleftNavfun();
e.stopPropagation();//阻止冒泡 // this.props.history.replace( url );
// e.stopPropagation();//阻止冒泡
this.selectnavid(e,key,id,type,url)
} }
selectnavid=(e,key,id,type,urls,index)=>{ selectnavid=(e,key,id,type,urls,index)=>{
let {url}=this.state; let {url}=this.state;
if(urls!=url){ if(urls!=url){
this.props.history.replace(urls);
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.history.replace(urls);
}else{ }else{
if (key === this.props.indexs) { if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined) this.props.unlocationNavfun(undefined)
} else { } else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key) this.props.unlocationNavfun(key)
this.props.history.replace(urls); this.props.history.replace(urls);
} }
@ -304,8 +306,9 @@ class Coursesleftnav extends Component{
url:urls, url:urls,
indexs:index indexs:index
}) })
this.props.history.replace(urls);
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.history.replace(urls);
} }
@ -721,24 +724,27 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
} }
showsandians=(e,key,urls,num)=> { showsandians=(e,key,urls,num,id,type,index)=> {
let {url}=this.state; let {url}=this.state;
if (key === this.props.indexs) { if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined) this.props.unlocationNavfun(undefined)
this.props.history.replace(urls); this.props.history.replace(urls);
} else { } else {
this.props.updataleftNavfun();
this.props.unlocationNavfun(key) this.props.unlocationNavfun(key)
this.props.history.replace(urls); this.props.history.replace(urls);
} }
if(urls!=url){ if(urls!=url){
this.props.updataleftNavfun();
this.props.history.replace(urls); this.props.history.replace(urls);
} }
// if(this.props.indexs===undefined){ this.setState({
// selectnavid:true,
// }else{ newselectnavid:id,
// url:urls,
// } indexs:index
})
} }
maincontent=(item,key)=>{ maincontent=(item,key)=>{
@ -930,8 +936,8 @@ class Coursesleftnav extends Component{
return( return(
<div key={key} > <div key={key} >
<a> <a>
<li title={item.name.length<7?"":item.name} onClick={(e)=>this.showsandians(e,key,item.category_url,1)} className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}> <li title={item.name.length<7?"":item.name} onClick={(e)=>this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={this.props.mainurl===item.category_url?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}>
<a onClick={(e)=>this.showsandians(e,key,item.category_url,1)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}> <a onClick={(e)=>this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}>
{ {
item.type==="announcement"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-xiaoxi1 mr10 fl":"iconfont icon-xiaoxi1 mr10 fl"}></i>: item.type==="announcement"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-xiaoxi1 mr10 fl":"iconfont icon-xiaoxi1 mr10 fl"}></i>:
item.type==="online_learning"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-kecheng mr10 fl font-16":"iconfont icon-kecheng mr10 fl font-16"}></i>: item.type==="online_learning"?<i className={this.props.location.pathname===item.category_url?"color-blue iconfont icon-kecheng mr10 fl font-16":"iconfont icon-kecheng mr10 fl font-16"}></i>:
@ -976,7 +982,7 @@ class Coursesleftnav extends Component{
ref={provided.innerRef} ref={provided.innerRef}
{...provided.droppableProps} {...provided.droppableProps}
className={"droppableul"} className={"droppableul"}
style={{display: this.props.mainurl===item.category_url&&key===this.props.indexs?"":"none"}} style={{display: key===this.props.indexs?"":"none"}}
> >
{item.second_category===undefined?"":item.second_category.map((iem,index)=>{ {item.second_category===undefined?"":item.second_category.map((iem,index)=>{
if(item.type==="course_group"){ if(item.type==="course_group"){
@ -1044,7 +1050,7 @@ class Coursesleftnav extends Component{
<div key={key}> <div key={key}>
{/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/} {/*<Tooltip placement="bottom" title={"点击空白处展开二级菜单,点击模块名字跳转到对应模块"}>*/}
<a > <a >
<li className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"} <li className={this.props.mainurl===item.category_url?"liactive":"clearfix active"}
onClick={(e)=>this.setnavid(e,key,item.id,item.type,item.category_url)} onMouseEnter={(e)=>this.showsandian(e,key)} onClick={(e)=>this.setnavid(e,key,item.id,item.type,item.category_url)} onMouseEnter={(e)=>this.showsandian(e,key)}
title={item.name.length<7?"":item.name} title={item.name.length<7?"":item.name}
> >
@ -1069,11 +1075,8 @@ class Coursesleftnav extends Component{
</a> </a>
</li> </li>
</a> </a>
{/*</Tooltip>*/}
{/*下拉列表*/} <ul style={{display:key===this.props.indexs?"":"none"}} class="droppableul">
{/* className={this.props.location.pathname===item.category_url||this.props.location.pathname===this.state.url&&key===this.state.indexs?"":""}*/}
<ul style={{display:this.props.mainurl===item.category_url&&key===this.props.indexs?"":"none"}} class="droppableul">
{ {
item.second_category===undefined?"":item.second_category.map((iem,index)=>{ item.second_category===undefined?"":item.second_category.map((iem,index)=>{
@ -1115,72 +1118,3 @@ class Coursesleftnav extends Component{
export default Coursesleftnav; export default Coursesleftnav;
//
// sandianshow=(e,key)=>{
// this.setState({
// sandiantype:key
// })
// e.stopPropagation();//阻止冒泡
// }
// hidesandian=(e,key)=>{
// this.setState({
// sandiantypes:undefined
// })
// e.stopPropagation();//阻止冒泡
// }
// sandianshow=(e,key)=>{
// this.setState({
// sandiantype:key
// })
// e.stopPropagation();//阻止冒泡
// }
// sandianhide=(e)=>{
// this.setState({
// sandiantype:undefined,
//
// })
// e.stopPropagation();//阻止冒泡
// }
// twosandianshows=(e,key,type)=>{
//
// this.setState({
// twosandiantypenum:key,
// toopvisible:false,
// toopvisibleindex:undefined,
// twosandiantypes:type
// })
// e.stopPropagation();//阻止冒泡
// }
// twoMouseLeave=(e)=>{
// this.setState({
// toopvisible:false,
// })
// e.stopPropagation();//阻止冒泡
// }
{/*{ is_teacher===true?*/}
{/* <div className={hidden_modules.length===0?"none":""}>*/}
{/* <li className="clearfix addjia ebebeb">*/}
{/* <span className="addtaskmodle">*/}
{/* <i className={addGroup===true?"iconfont icon-jia mr5 ml110 fl martop1":"none"} onClick={this.addGroupmodel}></i>*/}
{/* <div className={addGroup===false?"ml100":"none"} onClick={this.addGroupmodelsave}>确定</div>*/}
{/* </span>*/}
{/* </li>*/}
{/* </div> :""}*/}
{/*{ is_teacher===true?<div className={addGroup===false?"CheckboxGroup":"none"}>*/}
{/* <CheckboxGroup style={{ width: '100%' }} value={addCheckboxGroup} onChange={this.addCheckboxGroupID}>*/}
{/* {hidden_modules.length===0?"":hidden_modules.map((list,key)=>{*/}
{/* return(*/}
{/* <li className="clearfix pl20" key={key}>*/}
{/* <Checkbox value={list.id} className="fl "></Checkbox>*/}
{/* <span className="task-hide activity-left-name ml3">{list.name}</span>*/}
{/* </li>*/}
{/* )*/}
{/* })}*/}
{/* </CheckboxGroup>*/}
{/* </div> :""}*/}

@ -30,7 +30,7 @@ class CoursesListType extends Component {
return( return(
<span style={{display:'inline-block'}}> <span style={{display:'inline-block'}}>
{ {
typelist===undefined?"":typelist.map((item,key)=>{ typelist===undefined || typelist=== 403 || typelist === 401 || typelist=== 407 || typelist=== 408|| typelist=== 409 || typelist === 500?"":typelist.map((item,key)=>{
return( return(
<Tooltip placement="bottom" title={tipval} getPopupContainer={()=>document.querySelector('.TabsWarp')} key={key}> <Tooltip placement="bottom" title={tipval} getPopupContainer={()=>document.querySelector('.TabsWarp')} key={key}>
<span key={key}> <span key={key}>

@ -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>:""
} }
{ {
@ -150,13 +172,13 @@ class ExerciseListItem extends Component{
{ {
item.exercise_status ===2? item.exercise_status ===2?
<Tooltip title="提交剩余时间" placement="bottom"> <Tooltip title="提交剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span> <span className="mr20 fl">{"提交剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:"" </Tooltip>:""
} }
{ {
item.exercise_status ===3? item.exercise_left_time===null?"":item.exercise_status ===3?
<Tooltip title="截止剩余时间" placement="bottom"> <Tooltip title="截止剩余时间" placement="bottom">
<span className="mr20 fl">{item.exercise_left_time}</span> <span className="mr20 fl">{"截止剩余时间:"+item.exercise_left_time}</span>
</Tooltip>:"" </Tooltip>:""
} }
{/*{*/} {/*{*/}

@ -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>:""
} }
@ -249,15 +271,15 @@ class GraduateTaskItem extends Component{
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey panel-lightgrey mt16 fl"> <p className="color-grey mt16 fl">
<span className="mr50"> <span className="mr50">
{/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */} {/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */}
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.commit_count} 已交</span>} {discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.commit_count} 已交</span>}
{discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.uncommit_count} 未交</span>} {discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9 font-14">{discussMessage.uncommit_count} 未交</span>}
{/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/} {/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}
<Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":""} placement="bottom"> <Tooltip title={discussMessage.task_status===1?"提交剩余时间":discussMessage.task_status===2?"补交剩余时间":discussMessage.task_status===3?"交叉评阅剩余时间":""} placement="bottom">
<span className="mr15 color-grey9 font-14">{discussMessage.status_time}</span> <span className="mr15 color-grey9 font-14">{discussMessage.task_status===1&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"提交剩余时间:"+discussMessage.status_time:discussMessage.task_status===2&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"补交剩余时间:"+discussMessage.status_time:discussMessage.task_status===3&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"交叉评阅剩余时间:"+discussMessage.status_time:discussMessage.status_time}</span>
</Tooltip> </Tooltip>
{/* { discussMessage.replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.replies_count} </span> } {/* { discussMessage.replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.replies_count} </span> }

@ -285,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{
let{ search,page,limit,workslist}=this.state; let{ search,page,limit,workslist}=this.state;
let newpage=page+2 let newpage=page+1
this.searchList(search,newpage,limit,workslist.task_id,1) this.searchList(search,newpage,limit,workslist.task_id,1)

@ -271,20 +271,27 @@ class GraduationTasksSubmitnew extends Component{
contentViewScroll=(e)=>{ contentViewScroll=(e)=>{
//滑动到底判断 //滑动到底判断
const {memberslist} = this.state;
let newscrollTop=parseInt(e.currentTarget.scrollTop); let newscrollTop=parseInt(e.currentTarget.scrollTop);
let allclientHeight=e.currentTarget.clientHeight+newscrollTop; let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){ if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){
// console.log("到达底部");
if(memberslist.length===0){
return;
}else{
let{ search,page,limit }=this.state; let{ search,page,limit }=this.state;
let newpage=page+2 let newpage=page+1
this.searchList(search,newpage,limit,1) this.searchList(search,newpage,limit,1)
} }
}
} }

@ -32,8 +32,10 @@ class GraduationTasksappraise extends Component{
axios.get(zrl).then((result)=>{ axios.get(zrl).then((result)=>{
if(result.status===200){ if(result.status===200){
let status=result.data.status;
if(status===undefined || status=== 403 || status === 401 || status=== 407 || status=== 408|| status=== 409 || status === 500||status===-1){
if(result.data.status!=-1){ }else{
this.setState({ this.setState({
firelistdata:result.data, firelistdata:result.data,
}) })

@ -80,6 +80,8 @@ class GraduationTaskssettingapp extends Component{
starttime:undefined, starttime:undefined,
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
commentstatustype:undefined,
commenttimeone:undefined
} }
} }
@ -102,10 +104,10 @@ class GraduationTaskssettingapp extends Component{
} }
let starttype=false; let starttype=false;
let endtype=false; let endtype=false;
if(moment(result.data.publish_time)<moment()){ if(moment(result.data.publish_time)<=moment()){
starttype=true starttype=true
} }
if(moment(result.data.end_time)<moment()){ if(moment(result.data.end_time)<=moment()){
endtype=true endtype=true
} }
@ -130,6 +132,7 @@ class GraduationTaskssettingapp extends Component{
taskname: result.data.task_name, taskname: result.data.task_name,
coursename: result.data.course_name, coursename: result.data.course_name,
commentstatus: result.data.comment_status, commentstatus: result.data.comment_status,
commentstatustype:result.data.status,
commentnum: result.data.comment_num, commentnum: result.data.comment_num,
operworks: result.data.open_work, operworks: result.data.open_work,
opergrade: result.data.open_score, opergrade: result.data.open_score,
@ -343,28 +346,33 @@ class GraduationTaskssettingapp extends Component{
let {endtimetype}=this.state; let {endtimetype}=this.state;
if(types===1){ if(types===1){
this.setState({ this.setState({
latetime:newlatetime, // latetime:newlatetime,
crosscomment:true, crosscomment:true,
commenttime:newcommenttime commenttime:newlatetime,
commenttimeone:newlatetime,
}) })
}else{ }else{
if(endtimetype===true){ if(endtimetype===true){
this.setState({ this.setState({
crosscomment:true, crosscomment:true,
commenttime:newcommenttime commenttime:newlatetime,
commenttimeone:newlatetime,
}) })
}else{ }else{
this.setState({ this.setState({
end_time:newlatetime, // end_time:newlatetime,
crosscomment:true, crosscomment:true,
commenttime:newcommenttime commenttime:newlatetime,
commenttimeone:newlatetime,
}) })
} }
} }
} }
funcrosscomment=(e)=>{ funcrosscomment=(e)=>{
let {latetime,end_time,allowlate}=this.state; let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state;
let commenttimetype=commenttime===null||commenttime==="";
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm"); let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
@ -377,8 +385,8 @@ class GraduationTaskssettingapp extends Component{
let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm"); let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newtime;
if(e.target.checked===true){ if(e.target.checked===true){
if(commenttimetype===true){
if(allowlate===1||allowlate===true){ if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){ if(latetime===null||latetime===""){
@ -393,6 +401,13 @@ class GraduationTaskssettingapp extends Component{
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed) this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
} }
} }
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:commenttimeone,
})
}
}else{ }else{
this.setState({ this.setState({
crosscomment:e.target.checked, crosscomment:e.target.checked,
@ -519,10 +534,10 @@ class GraduationTaskssettingapp extends Component{
} }
if(moment(end_time)<moment(publish_time)){ if(moment(end_time)<=moment(publish_time)){
this.setState({ this.setState({
endTimetypes:true, endTimetypes:true,
endTimetypesval:"截止时间不能早于发布时间" endTimetypesval:"截止时间必须晚于发布时间"
}) })
return return
}else{ }else{
@ -531,16 +546,16 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
if(moment(latetime)<moment(publish_time)){ if(moment(latetime)<=moment(publish_time)){
this.setState({ this.setState({
latetimetype:true, latetimetype:true,
latetimetypeval:"结束时间不能早于发布时间" latetimetypeval:"结束时间必须晚于发布时间"
}) })
return return
}else if(moment(latetime)<moment(end_time)){ }else if(moment(latetime)<=moment(end_time)){
this.setState({ this.setState({
latetimetype:true, latetimetype:true,
latetimetypeval:"结束时间不能早于截止时间" latetimetypeval:"结束时间必须晚于截止时间"
}) })
return return
}else{ }else{
@ -562,7 +577,7 @@ class GraduationTaskssettingapp extends Component{
commenttimetype:false commenttimetype:false
}) })
} }
if(moment(this.state.commenttime)<moment(publish_time)){ if(moment(this.state.commenttime)<=moment(publish_time)){
this.setState({ this.setState({
commenttimetype:true, commenttimetype:true,
commenttimevalue:"开始时间不能小于发布时间", commenttimevalue:"开始时间不能小于发布时间",
@ -574,7 +589,7 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
if(moment(this.state.commenttime)<moment(end_time)){ if(moment(this.state.commenttime)<=moment(end_time)){
this.setState({ this.setState({
commenttimetype:true, commenttimetype:true,
commenttimevalue:"开始时间不能小于截止时间", commenttimevalue:"开始时间不能小于截止时间",
@ -918,7 +933,8 @@ class GraduationTaskssettingapp extends Component{
endtimetype, endtimetype,
commenttimetype, commenttimetype,
commenttimevalue, commenttimevalue,
flagPageEdit flagPageEdit,
commentstatustype
} =this.state; } =this.state;
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
@ -992,7 +1008,7 @@ class GraduationTaskssettingapp extends Component{
} }
{/*内容*/} {/*内容*/}
{task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" > {task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" >
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div> <div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}></span></div>
<div className={"mb30 h20 ml40"}> <div className={"mb30 h20 ml40"}>
<Input className={numtype===true?"noticeTip mr20":"mr20"} style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/> <Input className={numtype===true?"noticeTip mr20":"mr20"} style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr20">~</span> <span className="mr20">~</span>
@ -1153,9 +1169,11 @@ 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="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?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>
</Tooltip>
{crosscomment===true?<div> {crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}> <div className={"h20 mb30 ml30 mt20 ml87"}>
<span>开始时间</span> <span>开始时间</span>

@ -40,7 +40,7 @@ class GraduationTaskssettinglist extends Component{
task_status:undefined, task_status:undefined,
cross_comment:null, cross_comment:null,
search:null, search:null,
order:"updated_at", order:"update_time",
b_order:"desc", b_order:"desc",
course_group:undefined, course_group:undefined,
loadingstate:true, loadingstate:true,
@ -92,6 +92,7 @@ class GraduationTaskssettinglist extends Component{
seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{
let{page,limit}=this.state; let{page,limit}=this.state;
// console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search) // console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search)
let task_Id=this.props.match.params.task_Id; let task_Id=this.props.match.params.task_Id;
let url="/graduation_tasks/"+task_Id+"/tasks_list.json"; let url="/graduation_tasks/"+task_Id+"/tasks_list.json";
@ -106,7 +107,7 @@ class GraduationTaskssettinglist extends Component{
order:order===null?undefined:order, order:order===null?undefined:order,
b_order:b_order===null?undefined:b_order, b_order:b_order===null?undefined:b_order,
search:search===null?undefined:search, search:search===null?undefined:search,
page:pages===null?undefined:page, page:pages,
limit:20, limit:20,
}, },
paramsSerializer: function(params) { paramsSerializer: function(params) {
@ -281,8 +282,6 @@ class GraduationTaskssettinglist extends Component{
funtaskstatus=(checkedValues,key)=>{ funtaskstatus=(checkedValues,key)=>{
// console.log(checkedValues) // console.log(checkedValues)
console.log(checkedValues);
let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state; let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state;
@ -599,7 +598,7 @@ class GraduationTaskssettinglist extends Component{
this.cannerassocition(); this.cannerassocition();
let {taskslistdata}=this.state; let {taskslistdata}=this.state;
let url = "/graduation_tasks/"+taskslistdata.task_id+"/graduation_works/cancel_relate_project.json"; let url = "/graduation_tasks/"+taskslistdata.task_id+"/graduation_works/cancel_relate_project.json";
console.log(url)
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
@ -655,8 +654,7 @@ class GraduationTaskssettinglist extends Component{
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
debugger;
console.log(1);
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
let params ={ let params ={
@ -958,7 +956,7 @@ class GraduationTaskssettinglist extends Component{
} }
console.log(this.props.questionslist.status)
return( return(
<React.Fragment> <React.Fragment>
@ -1217,14 +1215,14 @@ 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">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a> {order==="update_time"?"更新时间":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 edu-menu-lists" style={{width: '87px'}}> <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("update_time")}><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>
</li> </li>
@ -1415,10 +1413,10 @@ class GraduationTaskssettinglist extends Component{
</span> </span>
<div className="fr color-grey-6 edu-menu-panel"> <div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true"> <p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i {order==="update_time"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p> className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list"> <ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a> <li onClick={(e)=>this.funorder("update_time")} className={order==="update_time"?"none":""}><a data-remote="true">时间</a>
</li> </li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a> <li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li> </li>

@ -107,9 +107,10 @@ class GraduationTasks extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
// {"status":1,"message":"删除成功"} // {"status":1,"message":"删除成功"}
this.fetchAll(search,page,order) this.fetchAll(search,page,order)
this.props.showNotification(response.data.message);
this.setState({ this.setState({
Modalstype:true, // Modalstype:true,
Modalstopval:response.data.message, // Modalstopval:response.data.message,
ModalsBottomval:"", ModalsBottomval:"",
ModalSave:this.cancelmodel, ModalSave:this.cancelmodel,
Loadtype:true, Loadtype:true,
@ -743,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()
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>
:"" :""
@ -73,7 +96,7 @@ class PollListItem extends Component{
{ {
item.polls_status ==2 && item.publish_time !=null && item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间"> <Tooltip title="提交剩余时间">
<span className="mr20 fl mt3">{formatDuring(t)}</span> <span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</Tooltip> </Tooltip>
} }
{ {

@ -2863,7 +2863,7 @@ class PollNew extends Component {
} }
</style> </style>
<Input placeholder="请输入问卷标题最大限制60个字符" maxLength="60" <Input placeholder="请输入问卷标题最大限制60个字符" maxLength="60"
style={{"margin-top": "15px", "text-align": "left"}} style={{"margin-top": "15px", textAlign: "left"}}
onInput={this.changeTopicName} onInput={this.changeTopicName}
readOnly={readOnlys} readOnly={readOnlys}
autoComplete="off" autoComplete="off"
@ -2887,7 +2887,7 @@ class PollNew extends Component {
<div style={{"color": "#212121", "font-size": "16px"}}>问卷须知</div> <div style={{"color": "#212121", "font-size": "16px"}}>问卷须知</div>
<TextArea placeholder="请输入本次问卷答题的相关说明最大限制100个字符" <TextArea placeholder="请输入本次问卷答题的相关说明最大限制100个字符"
style={{"height": "120px", "margin-top": "15px", "text-align": "left"}} style={{"height": "120px", "margin-top": "15px", textAlign: "left"}}
maxLength="100" maxLength="100"
readOnly={readOnlys} readOnly={readOnlys}
onInput={this.changeTopicNametwo} onInput={this.changeTopicNametwo}
@ -3012,8 +3012,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return ( return (
<div className="h20 pt20" style={{"clear": "both"}}> <div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left",marginTop:"3px"}}></Radio> <Radio value={i} className={"fl"} style={{textAlign: "left",marginTop:"3px"}}></Radio>
<span className={" flex1 "} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span> <span className={" flex1 "} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
</div> </div>
) )
@ -3029,8 +3029,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return ( return (
<div className="mt10 pt20 " style={{"clear": "both"}}> <div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} key={i} className={"fl"} style={{"text-align": "left"}}></Checkbox> <Checkbox value={i} key={i} className={"fl"} style={{textAlign: "left",marginRight:"8px"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span> <span className={" flex1"} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}}>{items.answer_text}</span>
</div> </div>
) )
})} })}
@ -3086,7 +3086,7 @@ class PollNew extends Component {
<p className="df mb20"> <p className="df mb20">
<span <span
className="color-grey-6 mr3 w60 font-16 lineh-40" className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span> style={{textAlign: "center"}}>其它</span>
<input <input
className="mr20 input-flex-40 TextAreainput" disabled className="mr20 input-flex-40 TextAreainput" disabled
@ -3100,7 +3100,7 @@ class PollNew extends Component {
: ""} : ""}
</p>) : (<p className="df mb20"> </p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40" <span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span> style={{textAlign: "center"}}>选项</span>
<TextArea <TextArea
autosize={{minRows: 1, maxRows: 5}} autosize={{minRows: 1, maxRows: 5}}
@ -3172,7 +3172,7 @@ class PollNew extends Component {
"height": "80%"; "height": "80%";
"margin-top": "5px"; "margin-top": "5px";
"margin-left": "5px"; "margin-left": "5px";
"text-align": "center"; textAlign: "center";
"display": "block"; "display": "block";
"opacity": "1"; "opacity": "1";
} }
@ -3328,7 +3328,7 @@ class PollNew extends Component {
<p className="df mb20"> <p className="df mb20">
<span <span
className="color-grey-6 mr3 w60 font-16 lineh-40" className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span> style={{textAlign: "center"}}>其它</span>
<input <input
className="mr20 input-flex-40 TextAreainput" disabled className="mr20 input-flex-40 TextAreainput" disabled
@ -3342,7 +3342,7 @@ class PollNew extends Component {
: ""} : ""}
</p>) : (<p className="df mb20"> </p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40" <span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span> style={{textAlign: "center"}}>选项</span>
<TextArea <TextArea
autosize={{minRows: 1, maxRows: 5}} autosize={{minRows: 1, maxRows: 5}}
@ -3414,7 +3414,7 @@ class PollNew extends Component {
"height": "80%"; "height": "80%";
"margin-top": "5px"; "margin-top": "5px";
"margin-left": "5px"; "margin-left": "5px";
"text-align": "center"; textAlign: "center";
"display": "block"; "display": "block";
"opacity": "1"; "opacity": "1";
} }
@ -3579,7 +3579,7 @@ class PollNew extends Component {
<p className="df mb20"> <p className="df mb20">
<span <span
className="color-grey-6 mr3 w60 font-16 lineh-40" className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span> style={{textAlign: "center"}}>其它</span>
<input <input
className="mr20 input-flex-40 TextAreainput" disabled className="mr20 input-flex-40 TextAreainput" disabled
@ -3593,7 +3593,7 @@ class PollNew extends Component {
: ""} : ""}
</p>) : (<p className="df mb20"> </p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40" <span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span> style={{textAlign: "center"}}>选项</span>
<TextArea <TextArea
autosize={{minRows: 1, maxRows: 5}} autosize={{minRows: 1, maxRows: 5}}
@ -3665,7 +3665,7 @@ class PollNew extends Component {
"height": "80%"; "height": "80%";
"margin-top": "5px"; "margin-top": "5px";
"margin-left": "5px"; "margin-left": "5px";
"text-align": "center"; textAlign: "center";
"display": "block"; "display": "block";
"opacity": "1"; "opacity": "1";
} }

@ -3231,7 +3231,7 @@ class Listofworksstudentone extends Component {
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}> <div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
{course_is_end===true?"":<span> {course_is_end===true?"":<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true? {teacherdata&&teacherdata.update_score===true&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTimet}> (this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTimet}>
查看最新成绩 查看最新成绩
</div>:""): </div>:""):
@ -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>
{ {
` `
@ -3555,9 +3555,13 @@ class Listofworksstudentone extends Component {
{ course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span> { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true? {computeTimetype===true?
(this.props.isNotMember()===false? (this.props.isNotMember()===false?
(
teacherdata&&teacherdata.update_score===true?
<div className={"computeTime font-16"} onClick={this.setComputeTime}> <div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩 查看最新成绩
</div> </div>
:""
)
:"") :"")
: :
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
@ -3783,9 +3787,15 @@ class Listofworksstudentone extends Component {
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span> <span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{ course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span> { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true? {computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTime}>
(this.props.isNotMember()===false?
(
teacherdata&&teacherdata.update_score===true?
<div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩 查看最新成绩
</div>:""): </div>:""
)
:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-16"}> (this.props.isNotMember()===false?<div className={"computeTimes font-16"}>
查看最新成绩 查看最新成绩

@ -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,6 +195,8 @@ 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}>
{
jobsettingsdatapage === undefined?"":
<div className="educontent mb20"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<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> <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>
@ -208,6 +208,8 @@ class ShixunHomeworkPage extends Component {
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </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>:""
} }
@ -329,7 +352,7 @@ class ShixunhomeWorkItem extends Component{
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey panel-lightgrey mt16 fl"> <p className="color-grey mt16 fl">
<span className="mr50 df"> <span className="mr50 df">
{/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */} {/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */}
{ discussMessage.author && <span className="mr15 color-grey-3">{discussMessage.author}</span> } { discussMessage.author && <span className="mr15 color-grey-3">{discussMessage.author}</span> }

@ -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,
@ -137,7 +137,7 @@ class Trainingjobsetting extends Component {
componentDidMount() { componentDidMount() {
console.log("Trainingjobsetting"); console.log("Trainingjobsetting");
console.log("componentDidMount"); console.log("componentDidMount");
this.getTrainingjobsetting(); this.getTrainingjobsetting(true);
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
this.setState({ this.setState({
@ -165,7 +165,7 @@ class Trainingjobsetting extends Component {
// } // }
// 获取数据地方 // 获取数据地方
getTrainingjobsetting = () => { getTrainingjobsetting = (bool) => {
// console.log("getTrainingjobsetting") // console.log("getTrainingjobsetting")
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid) // console.log(homeworkid)
@ -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({
@ -293,6 +293,14 @@ class Trainingjobsetting extends Component {
code_review:result.data.code_review code_review:result.data.code_review
}) })
this.props.Getdataback(result,result.data); this.props.Getdataback(result,result.data);
if(bool===true){
if(this.props.isAdmin() !== undefined){
if(this.props.isAdmin() === true){
this.editSettings(result);
}
}
}
} }
}) })
@ -1592,7 +1600,7 @@ class Trainingjobsetting extends Component {
description:result.data.message description:result.data.message
}); });
this.homeworkhide(); this.homeworkhide();
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
} }
} }
@ -1623,7 +1631,7 @@ class Trainingjobsetting extends Component {
// message:"提示", // message:"提示",
// description:response.data.message // description:response.data.message
// }); // });
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
this.homeworkhide() this.homeworkhide()
} }
}) })
@ -1717,6 +1725,19 @@ class Trainingjobsetting extends Component {
unifiedsetting:this.state.unifiedsetting, unifiedsetting:this.state.unifiedsetting,
latedeductiontwo:20, latedeductiontwo:20,
}); });
//均分比例
try {
if(this.state.proportion==="均分比例"){
this.Equalproportion(20);
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio(20);
}
}catch (e) {
}
}else { }else {
this.setState({ this.setState({
flagPageEditsbox:true, flagPageEditsbox:true,
@ -1725,7 +1746,6 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime, flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline, flagPageEditsthrees:deadline,
flagPageEditsfor:endtime, flagPageEditsfor:endtime,
unifiedsetting:this.state.unifiedsetting, unifiedsetting:this.state.unifiedsetting,
}); });
if(this.state.work_efficiencys===true){ if(this.state.work_efficiencys===true){
@ -1770,9 +1790,131 @@ class Trainingjobsetting extends Component {
} }
} catch (e) { } catch (e) {
}
};
//一进来就是老师要用的编辑页面
editSettings=(datas)=>{
console.log("编辑页面");
console.log(datas);
try {
if (datas.data.is_end === true) {
this.setState({
modalsType: true,
modalsTopval: "课堂已结束不能再修改!",
loadtype: true,
modalSave: this.cancelBox
})
} else {
// debugger
var releasetime =true;
var deadline = true;
var endtime =true;
var whethertopays =true;
//发布时间
if(moment(datas.data.publish_time,"YYYY-MM-DD HH:mm")<=moment()){
releasetime=false;
}
//截止时间
if(moment(datas.data.end_time,"YYYY-MM-DD HH:mm")<=moment()){
deadline=false;
}
//结束时间
if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false;
}
if(datas.data.allow_late === false){
whethertopays=false;
}
try {
if(datas.data&& datas.data.homework_status[0]==="未发布"){
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
completionefficiencyscore:true,
work_efficiencys:true,
unifiedsetting:datas.data.unified_setting,
latedeductiontwo:20,
});
//均分比例
// result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ?
try {
if(datas.data.shixun_evaluation === 0){
this.Equalproportion(20);
}else if(datas.data.shixun_evaluation === 1){
this.Empiricalvalueratio(20);
}
}catch (e) {
console.log(1);
console.log(e);
} }
}else {
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:datas.data.unified_setting,
});
if(datas.data.work_efficiency===true){
this.setState({
completionefficiencyscore:true,
})
}else{
this.setState({
completionefficiencyscore:false,
})
}
}
}catch (e) {
console.log(2);
console.log(e);
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:datas.data.unified_setting,
});
if(datas.data.work_efficiency===true){
this.setState({
completionefficiencyscore:true,
})
}else{
this.setState({
completionefficiencyscore:false,
})
}
} }
if(datas.data.shixun_evaluation === 2){
this.setState({
boolUnitetwoname:"自定义分值",
boolUnitetwo: false,
flagPageEdits:true,
})
}
}
} catch (e) {
console.log(3);
console.log(e);
}
};
//取消编辑 //取消编辑
cancelEdit = () => { cancelEdit = () => {
this.setState({ this.setState({
@ -1794,7 +1936,7 @@ class Trainingjobsetting extends Component {
unit_e_tip: "", unit_e_tip: "",
}) })
this.refs.targetElementTrainingjobsetting.scrollIntoView(); this.refs.targetElementTrainingjobsetting.scrollIntoView();
this.getTrainingjobsetting(); this.getTrainingjobsetting(false);
} }
rulesCheckInfo=(rules)=>{ rulesCheckInfo=(rules)=>{
@ -1906,8 +2048,8 @@ class Trainingjobsetting extends Component {
const dataformat = 'YYYY-MM-DD HH:mm'; const dataformat = 'YYYY-MM-DD HH:mm';
let {flagPageEdit,testscripttiptype,publish_timebool,end_timebool,late_timesbool,work_efficiencys,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state; let {flagPageEdit,testscripttiptype,publish_timebool,end_timebool,late_timesbool,work_efficiencys,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
console.log(publish_timebool); // console.log(publish_timebool);
console.log(!flagPageEditstwo); // console.log(!flagPageEditstwo);
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -1982,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">
@ -2020,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"}
@ -2053,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"}
@ -2126,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}/>
@ -2134,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}
@ -2151,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}
/> />
@ -2268,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 (
@ -2298,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

@ -1,58 +1,62 @@
import React, { Component } from 'react'; import React, {Component} from 'react';
import { import {
Spin, Spin,
Pagination, Pagination,
} from "antd"; } from "antd";
import axios from 'axios'; import axios from 'axios';
import {getImageUrl,markdownToHTML} from 'educoder'; import {getImageUrl, markdownToHTML} from 'educoder';
import "../css/messagemy.css" import "../css/messagemy.css"
//消息页面 //消息页面
class MessagSub extends Component{ class MessagSub extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state = {
page:1, page: 1,
limit:10, limit: 10,
typeysl:"", typeysl: "",
count:0, count: 0,
isSpin:false, isSpin: false,
data:undefined, data: undefined,
} }
} }
// 初始化数据 // 初始化数据
componentDidMount(){ componentDidMount() {
// console.log("初始化数据了MessagSub"); // console.log("初始化数据了MessagSub");
// console.log(this.props); // console.log(this.props);
this.getdata("",this.state.page); this.getdata("", this.state.page);
// this.Messageprivatemessageunreadmessage(); // this.Messageprivatemessageunreadmessage();
try { try {
this.props.Mtab(1); this.props.Mtab(1);
}catch (e) { } catch (e) {
} }
this.props.triggerRef(this) this.props.triggerRef(this)
} }
//塞选页数 //塞选页数
paginationonChanges=(pageNumber)=>{ paginationonChanges = (pageNumber) => {
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
}) })
this.getdata(this.state.typeysl,pageNumber); this.getdata(this.state.typeysl, pageNumber);
} }
//获取数据源 //获取数据源
getdata=(types,page)=>{ getdata = (types, page) => {
this.setState({ this.setState({
isSpin:true, isSpin: true,
}) })
let{limit}=this.state; let {limit} = this.state;
let url = `/users/tidings.json`; let url = `/users/tidings.json`;
axios.get((url),{params:{ axios.get((url), {
type:types, params: {
page:page, type: types,
per_page:limit, page: page,
}}).then((result) => { per_page: limit,
}
}).then((result) => {
if (result) { if (result) {
// if (result.data.status === 0) { // if (result.data.status === 0) {
@ -68,21 +72,23 @@ class MessagSub extends Component{
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
this.setState({ this.setState({
isSpin:false, isSpin: false,
}) })
}) })
}; };
getdatas=()=>{ getdatas = () => {
this.setState({ this.setState({
isSpin:true, isSpin: true,
}) })
let{typeysl,page,limit}=this.state; let {typeysl, page, limit} = this.state;
let url = `/users/tidings.json`; let url = `/users/tidings.json`;
axios.get((url),{params:{ axios.get((url), {
type:typeysl, params: {
page:page, type: typeysl,
per_page:limit, page: page,
}}).then((result) => { per_page: limit,
}
}).then((result) => {
if (result) { if (result) {
// if (result.data.status === 0) { // if (result.data.status === 0) {
@ -98,36 +104,36 @@ class MessagSub extends Component{
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
this.setState({ this.setState({
isSpin:false, isSpin: false,
}) })
}) })
} }
componentWillUnmount(){ componentWillUnmount() {
// 卸载异步操作设置状态 // 卸载异步操作设置状态
this.setState = (state, callback) => { this.setState = (state, callback) => {
return; return;
} }
} }
gettourl=(item)=>{ gettourl = (item) => {
switch (item.container_type) { switch (item.container_type) {
case "ApplyUserAuthentication" : case "ApplyUserAuthentication" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
if(item.auth_type===1){ if (item.auth_type === 1) {
//系统管理页面 //系统管理页面
return window.open("/managements/identity_authentication"); return window.open("/managements/identity_authentication");
} }
if(item.auth_type===2){ if (item.auth_type === 2) {
//系统管理页面 //系统管理页面
return window.open("/managements/professional_authentication") return window.open("/managements/professional_authentication")
} }
} }
if(item.tiding_type ==="System"){ if (item.tiding_type === "System") {
// 账号管理页-认证信息 // 账号管理页-认证信息
return window.open("/account/certification") return window.open("/account/certification")
} }
return ; return;
case "CancelUserAuthentication" : case "CancelUserAuthentication" :
// 账号管理页-认证信息 // 账号管理页-认证信息
return window.open("/account/certification") return window.open("/account/certification")
@ -135,65 +141,65 @@ class MessagSub extends Component{
// 账号管理页-认证信息 // 账号管理页-认证信息
return window.open("/account/certification") return window.open("/account/certification")
case "ApplyAddDepartment" : case "ApplyAddDepartment" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
//部门审批 //部门审批
return window.open("/managements/depart") return window.open("/managements/depart")
} }
if(item.tiding_type==="System"){ if (item.tiding_type === "System") {
// 账号管理页/account/profile // 账号管理页/account/profile
return window.open("/account/profile") return window.open("/account/profile")
} }
return ; return;
case "ApplyAddSchools" : case "ApplyAddSchools" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
// 单位审批 // 单位审批
return window.open(" /managements/unit") return window.open(" /managements/unit")
} }
if(item.tiding_type==="System"){ if (item.tiding_type === "System") {
// 账号管理页 // 账号管理页
return window.open("/account/profile") return window.open("/account/profile")
} }
return ; return;
case "ApplyAction" : case "ApplyAction" :
switch (item.parent_container_type) { switch (item.parent_container_type) {
case "ApplyShixun" : case "ApplyShixun" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
return window.open("/managements/shixun_authorization") return window.open("/managements/shixun_authorization")
} }
if(item.tiding_type==="System"){ if (item.tiding_type === "System") {
// 实训详情页 :identifier = identifier // 实训详情页 :identifier = identifier
return window.open(`/shixuns/${item.identifier}/challenges`) return window.open(`/shixuns/${item.identifier}/challenges`)
} }
case "ApplySubject" : case "ApplySubject" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
// 实训课程发布 // 实训课程发布
return window.open("/managements/subject_authorization") return window.open("/managements/subject_authorization")
} }
if(item.tiding_type==="System"){ if (item.tiding_type === "System") {
// 实践课程详情页 :parent_container_id = parent_container_id // 实践课程详情页 :parent_container_id = parent_container_id
return window.open(`/paths/${item.parent_container_id}`) return window.open(`/paths/${item.parent_container_id}`)
} }
case "TrialAuthorization" : case "TrialAuthorization" :
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
// 试用授权页面 // 试用授权页面
return window.open("/managements/trial_authorization") return window.open("/managements/trial_authorization")
} }
if(item.tiding_type==="System"){ if (item.tiding_type === "System") {
// 账号管理页 // 账号管理页
return window.open("/account/profile") return window.open("/account/profile")
} }
} }
return ; return;
case 'JoinCourse' : case 'JoinCourse' :
// 课堂详情页 :id = // 课堂详情页 :id =
return window.open(`/courses/${item.belong_container_id}/teachers`) return window.open(`/courses/${item.belong_container_id}/teachers`)
case 'StudentJoinCourse': case 'StudentJoinCourse':
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
if(item.tiding_type === 'Apply') { if (item.tiding_type === 'Apply') {
return window.open(`/courses/${item.belong_container_id}/teachers`); return window.open(`/courses/${item.belong_container_id}/teachers`);
} }
if(item.tiding_type === 'System'){ if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id //教学案例详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/students`); return window.open(`/courses/${item.belong_container_id}/students`);
} }
@ -205,7 +211,7 @@ class MessagSub extends Component{
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'Course' : case 'Course' :
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
if(item.tiding_type==="Delete"){ if (item.tiding_type === "Delete") {
return; return;
} }
@ -226,15 +232,15 @@ class MessagSub extends Component{
return ''; return '';
case "HomeworkCommon" : case "HomeworkCommon" :
//学生作业页 homework = parent_container_id //学生作业页 homework = parent_container_id
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
} }
@ -244,15 +250,15 @@ class MessagSub extends Component{
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case "StudentWorksScore" : case "StudentWorksScore" :
//学生作业页 //学生作业页
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
} }
@ -329,70 +335,70 @@ class MessagSub extends Component{
switch (item.parent_container_type) { switch (item.parent_container_type) {
case "AnonymousCommentFail" : case "AnonymousCommentFail" :
// 课堂-作业列表 homework = container_id // 课堂-作业列表 homework = container_id
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
case "HomeworkPublish" : case "HomeworkPublish" :
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
case "AnonymousAppeal" : case "AnonymousAppeal" :
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
default : default :
// 课堂-作业列表 homework = container_id // 课堂-作业列表 homework = container_id
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
} }
case "StudentWork" : case "StudentWork" :
//课堂-作业 :id = container_id //课堂-作业 :id = container_id
if(item.homework_type==="normal"){ if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`) return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
} }
if(item.homework_type==="group"){ if (item.homework_type === "group") {
//分组作业/courses/1208/group_homeworks/22373/1219130/appraise //分组作业/courses/1208/group_homeworks/22373/1219130/appraise
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`) return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
} }
if(item.homework_type==="practice"){ if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
@ -448,17 +454,17 @@ class MessagSub extends Component{
// /managements/library_applies // /managements/library_applies
return window.open(`/managements/library_applies`) return window.open(`/managements/library_applies`)
} }
if(item.tiding_type === 'System'){ if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id //教学案例详情 :id = container_id
return window.open(`/moop_cases/${item.container_id}`) return window.open(`/moop_cases/${item.container_id}`)
} }
case "ProjectPackage" : case "ProjectPackage" :
if(item.tiding_type==="Destroyed"){ if (item.tiding_type === "Destroyed") {
return ; return;
} }
if(item.tiding_type==="Destroyed_end"){ if (item.tiding_type === "Destroyed_end") {
return ; return;
}else { } else {
if (item.tiding_type === 'Apply') { if (item.tiding_type === 'Apply') {
///managements/project_package_applies ///managements/project_package_applies
return window.open(`/managements/project_package_applies`) return window.open(`/managements/project_package_applies`)
@ -471,9 +477,9 @@ class MessagSub extends Component{
case "Discuss": case "Discuss":
return window.open(`/shixuns/${item.identifier}/shixun_discuss`); return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
case "Video": case "Video":
if(item.tiding_type==="Apply"){ if (item.tiding_type === "Apply") {
return window.open(`/managements/video_applies`); return window.open(`/managements/video_applies`);
}else if(item.tiding_type==="System"){ } else if (item.tiding_type === "System") {
return window.open(`/users/${this.props.current_user.login}/videos`); return window.open(`/users/${this.props.current_user.login}/videos`);
} }
return ''; return '';
@ -481,34 +487,44 @@ class MessagSub extends Component{
return window.open(`/courses/${item.container_id}/informs`); return window.open(`/courses/${item.container_id}/informs`);
case "SubjectStartCourse": case "SubjectStartCourse":
return window.open(`/paths/${item.container_id}`); return window.open(`/paths/${item.container_id}`);
case "ResubmitStudentWork":
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}/appraise`);
case "AdjustScore":
//belong_container_id course的id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.parent_container_id}`);
default : default :
return window.open("/") return window.open("/")
} }
} }
render() { render() {
let{page,limit,typeysl,count,isSpin,data}=this.state; let {page, limit, typeysl, count, isSpin, data} = this.state;
// console.log("6868686868"); // console.log("6868686868");
// console.log(data); // console.log(data);
return ( return (
<div className="clearfix ml20"> <div className="clearfix ml20">
{/*头部筛选数据*/} {/*头部筛选数据*/}
<ul className="pl10 ridingNav clearfix edu-back-white"> <ul className="pl10 ridingNav clearfix edu-back-white">
<li className={typeysl===""?"active":""}><a onClick={(s,i)=>this.getdata("",1)}>全部</a></li> <li className={typeysl === "" ? "active" : ""}><a onClick={(s, i) => this.getdata("", 1)}>全部</a></li>
<li className={typeysl&&typeysl==="course"?"active":""} ><a onClick={(s,i)=>this.getdata("course",1)}>课堂提醒</a></li>
<li className={typeysl&&typeysl==="project"?"active":""} ><a onClick={(s,i)=>this.getdata("project",1)}>项目提醒</a></li>
<li className={typeysl&&typeysl==="project_package"?"active":""}><a onClick={(s,i)=>this.getdata("project_package",1)}>众包提醒</a></li> <li className={typeysl && typeysl === "course" ? "active" : ""}><a
onClick={(s, i) => this.getdata("course", 1)}>课堂提醒</a></li>
<li className={typeysl&&typeysl==="interaction"?"active":""}><a onClick={(s,i)=>this.getdata("interaction",1)}>互动提醒</a></li> <li className={typeysl && typeysl === "project" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li>
<li className={typeysl&&typeysl==="apply"?"active":""}><a onClick={(s,i)=>this.getdata("apply",1)}>审核</a></li> {/*<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a*/}
{/*onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>*/}
<li className={typeysl&&typeysl==="notice"?"active":""}><a onClick={(s,i)=>this.getdata("notice",1)}>通知</a></li> <li className={typeysl && typeysl === "interaction" ? "active" : ""}><a
onClick={(s, i) => this.getdata("interaction", 1)}>互动提醒</a></li>
<li className={typeysl && typeysl === "apply" ? "active" : ""}><a
onClick={(s, i) => this.getdata("apply", 1)}>审核</a></li>
<li className={typeysl && typeysl === "notice" ? "active" : ""}><a
onClick={(s, i) => this.getdata("notice", 1)}>通知</a></li>
</ul> </ul>
@ -519,25 +535,25 @@ class MessagSub extends Component{
<Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}> <Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}>
{ {
data===undefined?"":data.length===0? data === undefined ? "" : data.length === 0 ?
<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">暂无数据哦~</p> <p className="edu-nodata-p mb20">暂无数据哦~</p>
</div> </div>
:data.map((item,key)=>{ : data.map((item, key) => {
// console.log(data) // console.log(data)
// ridinglist-subs // ridinglist-subs
var boolps=true; var boolps = true;
if(item.container_type==="PraiseTread"||item.container_type==="Grade"||item.container_type==="ChallengeWorkScore"){ if (item.container_type === "PraiseTread" || item.container_type === "Grade" || item.container_type === "ChallengeWorkScore") {
boolps=false; boolps = false;
} }
if(item.container_type==="JournalsForMessage"){ if (item.container_type === "JournalsForMessage") {
if(item.parent_container_type==="Principal"){ if (item.parent_container_type === "Principal") {
boolps=false; boolps = false;
} }
if(item.parent_container_type==="HomeworkCommon"){ if (item.parent_container_type === "HomeworkCommon") {
if(item.homework_type===null||item.homework_type===undefined){ if (item.homework_type === null || item.homework_type === undefined) {
boolps=false; boolps = false;
} }
} }
} }
@ -546,36 +562,41 @@ class MessagSub extends Component{
// boolps=false; // boolps=false;
// } // }
// } // }
if(item.container_type==="ProjectPackage"){ if (item.container_type === "ProjectPackage") {
if(item.tiding_type==="Destroyed_end"){ if (item.tiding_type === "Destroyed_end") {
boolps=false; boolps = false;
} }
if(item.tiding_type==="Destroyed"){ if (item.tiding_type === "Destroyed") {
boolps=false; boolps = false;
} }
} }
if(item.container_type==="Course"){ if (item.container_type === "Course") {
if(item.tiding_type==="Delete"){ if (item.tiding_type === "Delete") {
boolps=false; boolps = false;
} }
} }
return( return (
<div className="pl25 ridinglist edu-back-white" key={key}> <div className="pl25 ridinglist edu-back-white" key={key}>
<div className={boolps===true?"ridinglist-sub clearfix df tiding_item":"ridinglist-subs clearfix df tiding_item"} onClick={()=>this.gettourl(item)}> <div
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("images/"+item.trigger_user.image_url)} className="radius mr10 fl myimgw48 myimgh48"/> className={boolps === true ? "ridinglist-sub clearfix df tiding_item" : "ridinglist-subs clearfix df tiding_item"}
onClick={() => this.gettourl(item)}>
<img onMouseDown={() => this.myCome(item)}
src={getImageUrl("images/" + item.trigger_user.image_url)}
className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1"> <div className="fl flex1">
<p> <p>
<a className="mr20 private_message_a" onMouseDown={()=>this.myCome(item)}>{item.trigger_user.name}</a> <a className="mr20 private_message_a"
onMouseDown={() => this.myCome(item)}>{item.trigger_user.name}</a>
<span className="color-grey-c">{item.time}</span> <span className="color-grey-c">{item.time}</span>
{item.tiding_type==="Apply"?( {item.tiding_type === "Apply" ? (
item.status===0? item.status === 0 ?
<span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span>:"" <span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span> : ""
):""} ) : ""}
{item.tiding_type==="Apply"?( {item.tiding_type === "Apply" ? (
item.status===1? item.status === 1 ?
<span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span>:"" <span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span> : ""
):""} ) : ""}
</p> </p>
<style> <style>
@ -586,10 +607,11 @@ class MessagSub extends Component{
` `
} }
</style> </style>
<p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}} ></p> <p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}}></p>
</div> </div>
<span className={item.new_tiding===true?"new-point fr mr40 mt22":""}></span> <span className={item.new_tiding === true ? "new-point fr mr40 mt22" : ""}></span>
</div> </div>
</div> </div>
@ -598,16 +620,16 @@ class MessagSub extends Component{
</Spin> </Spin>
{/*页数*/} {/*页数*/}
{ data===undefined?"" {data === undefined ? ""
: :
(count>10? (count > 10 ?
<div style={{textAlign: "center"}} className="new_expand mt10"> <div style={{textAlign: "center"}} className="new_expand mt10">
<div className="edu-txt-center mt30"> <div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page} <Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit} onChange={this.paginationonChanges} pageSize={limit}
total={count}></Pagination> total={count}></Pagination>
</div> </div>
</div>:"" </div> : ""
) )
} }
@ -618,4 +640,5 @@ class MessagSub extends Component{
) )
} }
} }
export default MessagSub; export default MessagSub;

@ -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}
@ -495,7 +488,7 @@ class DetailCards extends Component{
: :
<li className={showparagraph===false?"none":"fr status_li"}> <li className={showparagraph===false?"none":"fr status_li"}>
{ {
showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.MenuItemsindextype===2?"":<div> showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"&&this.props.courses!=undefined?"":<div>
<Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link> <Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link>
{line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战</a>} {line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战</a>}
</div>:"" </div>:""

@ -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>

@ -79,3 +79,10 @@
margin-top: 43px; margin-top: 43px;
} }
.mb120{
margin-bottom: 120px !important;
}
.mb80{
margin-bottom: 80px !important;
}

@ -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,11 +248,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.props.showProfileCompleteDialog() // AccountProfiletype:true
return // })
} // return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
this.setState({ this.setState({
@ -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',
@ -372,12 +375,8 @@ class DetailTop extends Component{
return( return(
<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead":applypath===false?"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb100":"subhead mb70"}> <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}
@ -390,10 +389,24 @@ class DetailTop extends Component{
</Modals> </Modals>
{this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo(this.state.MenuItemskey)}></Jointheclass>:""} {this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo(this.state.MenuItemskey)}></Jointheclass>:""}
{this.state.OpenCourseTypes===true?<OpenCourse {...this.props} {...this.state} OpenCourseCancel={()=>this.OpenCourseCancel()}/>:""} {this.state.OpenCourseTypes===true?<OpenCourse {...this.props} {...this.state} OpenCourseCancel={()=>this.OpenCourseCancel()}/>:""}
<style>
{
`
.subhead_content{
position: relative;
}
.userNavs{
position: absolute;
width: 1200px;
}
`
}
</style>
{ {
detailInfoList && detailInfoList &&
<div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content pt100"}> <div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content "}>
<div className="font-28 color-white clearfix"> <div className="font-28 color-white clearfix">
{/*<Tooltip placement="bottom" title={detailInfoList.name.length>27?detailInfoList.name:""}>*/} {/*<Tooltip placement="bottom" title={detailInfoList.name.length>27?detailInfoList.name:""}>*/}

@ -621,7 +621,10 @@ class PathDetailIndex extends Component{
{/*}*/} {/*}*/}
</p> </p>
<div className="clearfix"> <div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p> <p className="color-grey-9 font-12 fl">
<span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div> </div>
</div> </div>
</div> </div>
@ -645,7 +648,9 @@ class PathDetailIndex extends Component{
} }
</p> </p>
<div className="clearfix"> <div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p> <p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div> </div>
{ {
detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div> detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div>
@ -674,7 +679,9 @@ class PathDetailIndex extends Component{
{/*}*/} {/*}*/}
</p> </p>
<div className="clearfix"> <div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p> <p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div> </div>
</div> </div>
</div> </div>

@ -167,12 +167,20 @@ class TPMBanner extends Component {
this.props.showLoginDialog() this.props.showLoginDialog()
return return
} }
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ // if(this.props.checkIfProfileCompleted()===false){
AccountProfiletype:true // this.setState({
}) // AccountProfiletype:true
return // })
} // return
// }
//
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json"; let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({ this.setState({
@ -390,13 +398,20 @@ 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({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
return return
} }
// if(this.props.checkIfProfessionalCertification()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
let {shixunsDetails} = this.props let {shixunsDetails} = this.props
if( shixunsDetails.shixun_status>1){ if( shixunsDetails.shixun_status>1){
this.setState({ this.setState({

@ -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
} }

@ -236,19 +236,24 @@ export default class TPMMDEditor extends Component {
setTimeout(() => { setTimeout(() => {
if (that.props.needRecreate == true) { if (that.props.needRecreate == true) {
__editorName.recreate() __editorName.recreate() // 注意 必须在setValue之前触发不然会清空
} else { } else {
__editorName.resize() __editorName.resize()
} }
console.log('timeout', __editorName.id) console.log('timeout', __editorName.id)
__editorName.cm && __editorName.cm.refresh() __editorName.cm && __editorName.cm.refresh()
}, that.props.refreshTimeout || 500) }, that.props.refreshTimeout || 500)
if (this.props.noSetValueOnInit) {
that.onEditorChange()
} else {
if (that.props.initValue != undefined && that.props.initValue != '') { if (that.props.initValue != undefined && that.props.initValue != '') {
__editorName.setValue(that.props.initValue) __editorName.setValue(that.props.initValue)
} }
if (that.state.initValue) { if (that.state.initValue) {
__editorName.setValue(that.state.initValue) __editorName.setValue(that.state.initValue)
} }
}
__editorName.cm.on("change", (_cm, changeObj) => { __editorName.cm.on("change", (_cm, changeObj) => {
that.contentChanged = true; that.contentChanged = true;
if (that.state.showError) { if (that.state.showError) {
@ -277,6 +282,7 @@ export default class TPMMDEditor extends Component {
onEditorChange = () => { onEditorChange = () => {
if (!this.answers_editormd) return; if (!this.answers_editormd) return;
const val = this.answers_editormd.getValue(); const val = this.answers_editormd.getValue();
//console.log('onEditorChange', this.props.id, val)
try { try {
this.props.onChange && this.props.onChange(val) this.props.onChange && this.props.onChange(val)
} catch(e) { } catch(e) {

@ -227,14 +227,20 @@ class Challenges extends Component {
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.setState({
// AccountProfiletype:true
// })
// return
// }
let { ChallengesDataList } = this.state; let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId; // let id = this.props.match.params.shixunId;

@ -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,7 +503,7 @@ class Collaborators extends Component {
</Modal> </Modal>
<Modal {Collaboratorsvisibleadmin===true?<Modal
keyboard={false} keyboard={false}
title="添加合作者" title="添加合作者"
visible={Collaboratorsvisibleadmin} visible={Collaboratorsvisibleadmin}
@ -533,9 +541,9 @@ class Collaborators extends Component {
<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}
@ -575,7 +583,7 @@ class Collaborators extends Component {
<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">
{ {

@ -109,7 +109,7 @@ class ChangeHeaderPicModal extends Component{
// https://www.trustie.net/issues/22461 // https://www.trustie.net/issues/22461
if ( this.props.current_user.image_url.indexOf('avatars/User/b') != -1 if ( this.props.current_user.image_url.indexOf('avatars/User/b') != -1
|| this.props.current_user.image_url.indexOf('avatars/User/g') != -1 ) { || this.props.current_user.image_url.indexOf('avatars/User/g') != -1 ) {
this.setTimeout(() => { window.setTimeout(() => {
this.doAfterUpdated() this.doAfterUpdated()
}, 1000) }, 1000)
} else { } else {

@ -39,14 +39,14 @@ class InfosBanner extends Component{
<div className="bannerPanel mb60"> <div className="bannerPanel mb60">
<div className="educontent"> <div className="educontent">
<div className="clearfix color-white mb25"> <div className="clearfix color-white mb25">
<p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/></p> <p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}?t=${new Date().getTime()}`}/></p>
<div className="fl"> <div className="fl">
<p className="clearfix mt20"> <p className="clearfix mt20">
<span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span> <span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span>
{ {/*{*/}
data && is_current == false && data.identity =="学生" ? "" : {/*data && is_current == false && data.identity =="学生" ? "" : */}
<span className="userpost"><label>{data && data.identity}</label></span> {/*<span className="userpost"><label>{data && data.identity}</label></span>*/}
} {/*}*/}
</p> </p>
<p className="mt15"> <p className="mt15">
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}> <Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>

@ -163,6 +163,13 @@ class InfosCourse extends Component{
</div> </div>
<div className="edu-txt-center course-bottom"> <div className="edu-txt-center course-bottom">
<div className="inline color-grey-6"> <div className="inline color-grey-6">
{item.visits>0?<span className="fl ml10 mr10 squareIconSpan">
<Tooltip placement="bottom" title="访问量">
<i className="iconfont icon-liulanyan fl mr3"></i>{item.visits}
</Tooltip>
</span>:""}
{ {
item.members_count > 0 && item.members_count > 0 &&
<Tooltip placement="bottom" title="成员"> <Tooltip placement="bottom" title="成员">
@ -177,13 +184,13 @@ class InfosCourse extends Component{
<i className="iconfont icon-zuoye fl mr3" data-tip-down="作业"></i>{item.homework_commons_count}</span> <i className="iconfont icon-zuoye fl mr3" data-tip-down="作业"></i>{item.homework_commons_count}</span>
</Tooltip> </Tooltip>
} }
{ {/*{*/}
item.attachments_count > 0 && {/*item.attachments_count > 0 && */}
<Tooltip placement="bottom" title="资源"> {/*<Tooltip placement="bottom" title="资源">*/}
<span className="fl ml10 mr10 squareIconSpan"> {/*<span className="fl ml10 mr10 squareIconSpan">*/}
<i className="iconfont icon-ziyuan fl mr3" data-tip-down="资源"></i>{item.attachments_count}</span> {/*<i className="iconfont icon-ziyuan fl mr3" data-tip-down="资源"></i>{item.attachments_count}</span>*/}
</Tooltip> {/*</Tooltip>*/}
} {/*}*/}
</div> </div>
</div> </div>
</div> </div>

@ -541,7 +541,7 @@ class InfosTopics extends Component{
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey panel-lightgrey mt16 fl"> <p className="color-grey mt16 fl">
<span className={"topicswidth600"}> <span className={"topicswidth600"}>
{types==="publicly"?<span className="topsics135 color-grey9 mr50">{item.creator_name}</span>:""} {types==="publicly"?<span className="topsics135 color-grey9 mr50">{item.creator_name}</span>:""}
<span className="mr50 color-grey9">{item.quotes_count} 次引用</span> <span className="mr50 color-grey9">{item.quotes_count} 次引用</span>

Loading…
Cancel
Save