jingquan huang 6 years ago
commit 9d34878955

@ -81,8 +81,6 @@ class AccountsController < ApplicationController
return normal_status(-2, "错误的账号或密码")
end
@user.update_column(:last_login_on, Time.now)
successful_authentication(@user)
session[:user_id] = @user.id
@ -124,7 +122,7 @@ class AccountsController < ApplicationController
set_autologin_cookie(user)
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
user.update_column(:last_login_on, Time.now)
# 注册完成后有一天的试用申请(先去掉)
# UserDayCertification.create(user_id: user.id, status: 1)
end

@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base
@user_course_identity = current_user.course_identity(@course)
if @user_course_identity > Course::STUDENT && @course.is_public == 0
tip_exception(401, "..") unless User.current.logged?
check_account
tip_exception(409, "您没有权限进入")
end
uid_logger("###############user_course_identity:#{@user_course_identity}")
@ -189,8 +190,8 @@ class ApplicationController < ActionController::Base
# 资料是否完善
def check_account
if !current_user.profile_completed?
info_url = '/account/profile'
tip_exception(402, info_url)
#info_url = '/account/profile'
tip_exception(402, nil)
end
end

@ -1,5 +1,5 @@
class ChallengesController < ApplicationController
before_action :require_login, :check_auth
before_action :require_login, :check_auth, except: [:index]
before_action :find_shixun, only: [:new, :create, :index]
skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer]
before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up,
@ -155,6 +155,7 @@ class ChallengesController < ApplicationController
@editable = @shixun.status == 0 # before_action有判断权限如果没发布则肯定是管理人员
@user = current_user
@shixun.increment!(:visits)
end
def show

@ -49,30 +49,12 @@ class CoursesController < ApplicationController
@user = current_user
# 根据分类查询课堂(全部,我的,最新,最热)
@order = params[:order].present? ? params[:order] : "all"
order_str = @order != "course_members_count" && @order != "created_at" ? "updated_at" : @order
# if @order == "all"
# @course = Course.where(is_delete: 0, is_hidden: 0).select("select c.name, c.id, s.name, u.login, ifnull(concat(u.lastname,u.firstname),
# u.login), s.name from courses c, users u, user_extensions ue, schools s where c.is_delete=0 and
# c.tea_id=u.id and u.id=ue.user_id and ue.school_id=s.id")
# @courses = Course.where(is_delete: 0, is_hidden: 0)
# .order("courses.id = 1309 desc, courses.created_at desc")
# @courses = Course.where(is_delete: 0, is_hidden: 0).select("courses.id, courses.tea_id, courses.name, courses.exercises_count, courses.polls_count,
# courses.is_public, courses.is_end, courses.visits, courses.course_members_count,courses.homework_commons_count,(SELECT MAX(created_at)
# FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a")
# .order("courses.id = 1309 desc, a desc")
if @order == "mine"
tip_exception(401, "..") unless current_user.logged?
@courses = Course.joins(:course_members)
.where("is_delete = 0 AND is_hidden = 0 AND course_members.user_id = ?", @user.id).distinct
elsif @order == "created_at"
# REDO:Extension
@courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0).distinct
if @order == "visits"
order_str = "courses.id = 1309 DESC, courses.visits DESC"
@courses = Course.where(is_delete: 0, is_hidden: 0)
else
# REDO:Extension
@courses = Course.where(is_delete: 0, is_hidden: 0).distinct
order_str = "courses.id = 1309 DESC, courses.homepage_show DESC, courses.created_at desc"
@courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0)
end
# 根据搜索关键字进一步筛选
@ -92,7 +74,7 @@ class CoursesController < ApplicationController
.where("#{sql}", keyword: "%#{params[:search]}%").distinct
end
@courses_count = @courses.count("courses.id")
@courses = @courses.order("courses.id = 1309 DESC, courses.#{order_str} DESC")
@courses = @courses.order(order_str)
# 分页
page = params[:page] || 1

@ -1,5 +1,6 @@
class DiscussesController < ApplicationController
LIMIT = 10
before_action :require_login, only: [:create, :reply, :hidden, :reward_code, :plus, :destroy]
before_action :find_container, only: [:index, :hidden]
before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus]

@ -1347,6 +1347,7 @@ class HomeworkCommonsController < ApplicationController
def group_list
@page = params[:page] || 1
@limit = params[:limit] || 10
@course_member_count = @course.course_groups.count
@course_groups = @course.course_groups.page(@page).per(@limit)
@ungroup_user_ids = @course.course_members.ungroup_students.pluck(:user_id)
end

@ -2,7 +2,8 @@ class ShixunsController < ApplicationController
include ShixunsHelper
include ApplicationHelper
before_action :require_login, :check_auth, except: [:download_file, :index, :menus]
before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right, :ranking_list,
:discusses, :collaborators, :fork_list, :propaedeutics]
before_action :check_account, only: [:new, :create, :shixun_exec]

@ -1,5 +1,5 @@
class StagesController < ApplicationController
before_action :require_login, :check_auth
before_action :require_login, :check_auth, except: [:index]
before_action :find_subject, only: [:create, :index]
before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position]
before_action :allowed, except: [:index]
@ -18,7 +18,7 @@ class StagesController < ApplicationController
@stage.position = @subject.stages.count + 1
@stage.save!
unless params[:shixun_id].blank?
shixuns = Shixun.where(id: params[:shixun_id])
shixuns = Shixun.where(id: params[:shixun_id]).order("field(id, #{params[:shixun_id].join(",")})")
shixuns.each do |shixun|
StageShixun.create!(stage_id: @stage.id, subject_id: @subject.id, shixun_id: shixun.id, position: @stage.stage_shixuns.count + 1)
end

@ -1,7 +1,7 @@
class SubjectsController < ApplicationController
before_action :require_login, :check_auth, except: [:index]
before_action :require_login, :check_auth, except: [:index, :show]
# before_action :check_auth, except: [:index]
before_action :check_account, only: [:new, :create]
before_action :check_account, except: [:index, :show]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,

@ -17,6 +17,7 @@ module Searchable::Dependents::User
# reindex subject
created_subjects.each(&:reindex)
subjects.each(&:reindex)
end
end
end

@ -27,6 +27,7 @@ module Searchable::Subject
{
author_name: user.real_name,
author_school_name: user.school_name,
member_user_names: users.map(&:real_name).join(' ')
}
end

@ -246,6 +246,10 @@ class Shixun < ApplicationRecord
Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count
end
def has_web_route?
self.mirror_name.include?('JavaWeb') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web')
end
private
def send_tiding

@ -29,6 +29,7 @@ module ElasticsearchAble
subject_stages: { type: 'plain' },
content: { type: 'plain' },
descendants_contents: { type: 'plain' },
member_user_names: { type: 'plain' }
}
}
end

File diff suppressed because it is too large Load Diff

@ -13,6 +13,7 @@ elsif @tab == 1
# 评测设置的编辑模式
json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path,
:web_route, :test_set_score, :test_set_average)
json.has_web_route @shixun.has_web_route?
json.test_sets @challenge.test_sets do |set|
json.hidden (set.is_public ? 0 : 1)
json.(set, :input, :output, :score)

@ -3,6 +3,7 @@ json.candidates do
json.id user.id
json.name user.real_name
json.nickname user.nickname
json.login user.login
json.school_name user.user_extension.school.try(:name)
json.school_id user.user_extension.school.try(:id)
json.added @course.course_member?(user.id, [1, 2, 3])

@ -7,7 +7,8 @@ json.group_list do
end
end
# 未分班展示情况放在最后
if @course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i
if (@course_groups.count != 0 && @course_groups.count < @limit.to_i) ||
((@page.to_i - 1)*@limit.to_i == @course_member_count && @course_groups.count == 0)
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0
json.ungroup_list do

@ -1,5 +1,6 @@
json.memo do
json.id memo.id
json.forum_id memo.forum_id
json.subject memo.subject
json.is_md memo.is_md
json.content memo.content
@ -9,6 +10,6 @@ json.memo do
json.tag memo.tag_repertoires.map(&:name)
json.time memo.created_at
json.replies_count memo.all_replies_count
json.user_praise memo.praise_treads.user_liker(@user.try(:id)).count > 0 ? true : false
json.user_praise memo.praise_treads.user_liker(@user.try(:id)).count > 0
json.memo_praise_count memo.praise_treads.liker.count
end

@ -16,7 +16,7 @@ json.college_identifier @user.college_identifier
json.followed User.current.watched?(@user)
if @user.logged_user?
json.can_apply_trial @user.can_apply_trial?
#json.can_apply_trial @user.can_apply_trial?
json.attendance_signed @user.attendance_signed?
json.tomorrow_attendance_gold @user.tomorrow_attendance_gold
end

@ -1,64 +1,64 @@
class SecondMofidyKeContentsForMd < ActiveRecord::Migration[5.2]
include ActionView::Helpers::SanitizeHelper
def change
def ke_transform_to_md content
return content if content.blank?
s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
.gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
end
# 作业
HomeworkCommon.find_each do |hc|
description = ke_transform_to_md hc.description
reference_answer = ke_transform_to_md hc.reference_answer
explanation = ke_transform_to_md hc.explanation
hc.update_attributes(description: description, reference_answer: reference_answer, explanation: explanation)
end
# 作业题库
HomeworkBank.find_each do |hb|
description = ke_transform_to_md hb.description
reference_answer = ke_transform_to_md hb.reference_answer
hb.update_attributes(description: description, reference_answer: reference_answer)
end
# 毕业任务
GraduationTask.find_each do |gt|
description = ke_transform_to_md gt.description
gt.update_column(:description, description)
end
# 毕设选题
GraduationTopic.find_each do |gt|
description = ke_transform_to_md gt.description
gt.update_column(:description, description)
end
# 毕设作品
GraduationWork.find_each do |gw|
description = ke_transform_to_md gw.description
gw.update_column(:description, description)
end
# 毕设任务题库
GtaskBank.find_each do |gb|
description = ke_transform_to_md gb.description
gb.update_column(:description, description)
end
# 毕设选题题库
GtopicBank.find_each do |gb|
description = ke_transform_to_md gb.description
gb.update_column(:description, description)
end
# 交流问答
Memo.find_each do |m|
content = ke_transform_to_md m.content
m.update_column(:content, content)
end
# def ke_transform_to_md content
# return content if content.blank?
# s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
# s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
# .gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
#
# end
#
# # 作业
# HomeworkCommon.find_each do |hc|
# description = ke_transform_to_md hc.description
# reference_answer = ke_transform_to_md hc.reference_answer
# explanation = ke_transform_to_md hc.explanation
# hc.update_attributes(description: description, reference_answer: reference_answer, explanation: explanation)
# end
#
# # 作业题库
# HomeworkBank.find_each do |hb|
# description = ke_transform_to_md hb.description
# reference_answer = ke_transform_to_md hb.reference_answer
# hb.update_attributes(description: description, reference_answer: reference_answer)
# end
#
# # 毕业任务
# GraduationTask.find_each do |gt|
# description = ke_transform_to_md gt.description
# gt.update_column(:description, description)
# end
#
# # 毕设选题
# GraduationTopic.find_each do |gt|
# description = ke_transform_to_md gt.description
# gt.update_column(:description, description)
# end
#
# # 毕设作品
# GraduationWork.find_each do |gw|
# description = ke_transform_to_md gw.description
# gw.update_column(:description, description)
# end
#
# # 毕设任务题库
# GtaskBank.find_each do |gb|
# description = ke_transform_to_md gb.description
# gb.update_column(:description, description)
# end
#
# # 毕设选题题库
# GtopicBank.find_each do |gb|
# description = ke_transform_to_md gb.description
# gb.update_column(:description, description)
# end
#
# # 交流问答
# Memo.find_each do |m|
# content = ke_transform_to_md m.content
# m.update_column(:content, content)
# end
end
end

@ -1,17 +1,17 @@
class ThirdModifyKeForStudentWork < ActiveRecord::Migration[5.2]
include ActionView::Helpers::SanitizeHelper
def change
def ke_transform_to_md content
return content if content.blank?
s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
.gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
end
# 学生的作品 过滤掉一些描述的ke图片的作品
StudentWork.where("description is not null and LENGTH(description) < 1000000").find_each do |sw|
description = ke_transform_to_md sw.description
sw.update_column(:description, description)
end
# def ke_transform_to_md content
# return content if content.blank?
# s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style))
# s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "&nbsp;").gsub(/(\n)+/, "<br />")
# .gsub("\t", "&nbsp;&nbsp;&nbsp;&nbsp;").gsub("\n", "").gsub(" ", "&nbsp;").gsub(/(<br\s?\/?>)+/, "<br />")
# end
#
# # 学生的作品 过滤掉一些描述的ke图片的作品
# StudentWork.where("description is not null and LENGTH(description) < 1000000").find_each do |sw|
# description = ke_transform_to_md sw.description
# sw.update_column(:description, description)
# end
end
end

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -29,7 +29,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
devtool: "source-map", // 开启调试
devtool: "cheap-module-eval-source-map", // 开启调试
// These are the "entry points" to our application.
// 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.

@ -301,8 +301,8 @@ module.exports = {
},
warnings: false,
compress: {
drop_debugger: false,
drop_console: false
drop_debugger: true,
drop_console: true
}
}
}),

@ -96,7 +96,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
/*块状列表*/
.square-list{width: 100%;box-sizing: border-box;margin-top:20px}
.square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); }
.square-Item:hover{bottom: 3px; box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover{
/*bottom: 3px;*/
box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover .closeSquare{display: block}
.square-Item:nth-child(4n+0){margin-right: 0px;}
.square-Item .square-img{display: block;width: 100%}

@ -10,7 +10,6 @@ broadcastChannelOnmessage('refreshPage', () => {
})
function locationurl(list){
debugger
if (window.location.port === "3007") {
} else {
@ -43,6 +42,10 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.educoder.net"
// proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080"
// wy
// proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -8,7 +8,15 @@ class LinkAfterLogin extends Component {
}
checkAuth = () => {
if (this.props.checkIfLogin()) {
this.props.history.push(this.props.to)
if(this.props.checkProfileComplete){
if(this.props.checkIfProfileCompleted()){
this.props.history.push(this.props.to)
}else{
this.props.showProfileCompleteDialog();
}
}else{
this.props.history.push(this.props.to)
}
} else {
this.props.showLoginDialog()
}

@ -59,4 +59,8 @@ export { default as Clappr } from './components/media/Clappr'
export { default as ImageLayerHook } from './hooks/ImageLayerHook'
export { default as ImageLayerHook } from './hooks/ImageLayerHook'
// 外部
export { default as CBreadcrumb } from '../modules/courses/common/CBreadcrumb'

@ -498,7 +498,7 @@ pop_box_new(htmlvalue, 480, 182);
return resData
}
fetchAll(stageId) {
fetchAll(stageId, noTimeout) {
if (window.__fetchAllFlag == true ) {
console.log('TPIContextProvider call fetchAll repeatly!')
@ -544,6 +544,13 @@ pop_box_new(htmlvalue, 480, 182);
return;
}
if (response.data.status == 404) {
// 如果第一次发生404则隔1s后再调用一次本接口因为ucloud主从同步可能有延迟
if (!noTimeout) {
setTimeout(() => {
this.fetchAll(stageId, true)
}, 1000)
return;
}
window.location.href = '/myshixuns/not_found'
return;
}

@ -787,17 +787,17 @@ class CoursesIndex extends Component{
{/* }*/}
{/*></Route>*/}
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/* <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"*/}
{/* render={*/}
{/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
{/* }*/}
{/* ></Route>*/}
{/*/!*实训学生作品列表已公布*!/*/}
{/*<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"*/}
{/* render={*/}
{/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
{/* }*/}
{/*></Route>*/}

@ -68,7 +68,7 @@ class ListPageIndex extends Component{
constructor(props) {
super(props);
this.state={
yslGuideone:true,
yslGuideone:null,
}
}
@ -96,8 +96,8 @@ class ListPageIndex extends Component{
}
render() {
let {yslGuideone} =this.state;
console.log("98");
console.log(yslGuideone);
// console.log("98");
// console.log(yslGuideone);
return (
<div>
<div className="newMain clearfix">

@ -85,9 +85,9 @@ function buildColumns(that, student_works) {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
width: '98px',
width: '74px',
margin: '0 auto'
}} title={text}>
}} title={text && text.length > 5 ? text : ''}>
{/* <Tooltip placement="bottom" title={text}>
</Tooltip> */}
{text}
@ -104,8 +104,8 @@ function buildColumns(that, student_works) {
render: (text, record) => (
<span>
<a href="javascript:;"
title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden'
title={text && text.length > 12 ? text : ''}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '98px', display: 'block', overflow: 'hidden'
, margin: '0 auto', cursor: 'default'}}
>{record.student_id}</a>
</span>
@ -136,7 +136,7 @@ function buildColumns(that, student_works) {
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#4CACFF'}}>{record.work_group}</a>
<a href="javascript:void(0);" style={{color:'#4CACFF'}}>{record.work_group}</a>
</span>
),
})
@ -150,8 +150,9 @@ function buildColumns(that, student_works) {
render: (project_info, record) => (
<span>
{project_info && project_info.name && <a href={`/projects/${project_info.id}`} target="_blank"
className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name}
{project_info && project_info.name && <a href={project_info.id == -1 ? 'javascript:void(0)' : `/projects/${project_info.id}`}
target={ project_info.id == -1 ? '' : "_blank" }
className="overflowHidden1" style={{color:'#4CACFF', width: that.state.anonymous_comment ? '80px' : '130px', margin: '0 auto', display: 'block'}} title={project_info.name}
>{project_info.name}</a>}
</span>
),
@ -184,7 +185,7 @@ function buildColumns(that, student_works) {
</span>
)},
}, {
width: 150,
width: 106,
title: '更新时间',
dataIndex: 'update_time',
key: 'update_time',
@ -249,7 +250,8 @@ function buildColumns(that, student_works) {
*/
columns.push({
width: 84,
title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div></div>,
// title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div>评分</div>,
title: <div style={{color: 'rgba(0,0,0,.85)'}}>匿评评分</div>,
key: 'student_score',
dataIndex: 'student_score',
@ -323,7 +325,7 @@ function buildColumns(that, student_works) {
}
if (isAdminOrStudent || that.props.work_public == true) {
columns.push({
width: 92,
width: 72,
title: '操作',
key: 'operation',
dataIndex: 'operation',
@ -614,6 +616,7 @@ class CommonWorkList extends Component{
ref="checkCodeModal"
{...this.props}
></CheckCodeModal>
<AccessoryModal
{...this.props}
modalname={"补交附件"}
@ -649,6 +652,10 @@ class CommonWorkList extends Component{
position: absolute;
right: 18px;
}
.workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td {
padding: 10px 1px;
}
`}</style>
<div style={{ background: '#fff'}} className="workListContent">
{ isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}>
@ -742,6 +749,9 @@ class CommonWorkList extends Component{
border-bottom: none;
}
.studentTable .ant-table-tbody { background: '#F1F9FF' }
.studentTable table, .stageTable table{
font-size: 13px !important;
}
`}</style>
{ isStudent &&StudentData===undefined?"":StudentData===undefined?"":
<Table

@ -42,6 +42,9 @@ function disabledDateTime() {
// disabledSeconds: () => [55, 56],
};
}
function disabledDateFunc(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkSetting extends Component{
@ -1093,6 +1096,7 @@ class CommonWorkSetting extends Component{
onChange={this.onChangeTimeend}
disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false}
disabled={moment(this.state.init_end_time) < moment() || noAuth}
disabledDate={disabledDateFunc}
// disabledDate={ (end_time) =>
// {
@ -1166,6 +1170,7 @@ class CommonWorkSetting extends Component{
disabledTime={disabledDateTime}
// || moment(init_late_time) < moment()
disabled={!allow_late || noAuth }
disabledDate={disabledDateFunc}
// disabledDate={ (late_time) =>
// {
// const end_time = this.state.end_time
@ -1247,6 +1252,8 @@ class CommonWorkSetting extends Component{
onChange={this.onChangeEvaluationEnd}
disabledTime={disabledDateTime}
disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()}
disabledDate={disabledDateFunc}
// disabledDate={ (evaluation_end) =>
// {
// const evaluation_start = this.state.evaluation_start
@ -1335,6 +1342,7 @@ class CommonWorkSetting extends Component{
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
disabledTime={disabledDateTime}
disabledDate={disabledDateFunc}
showToday={false}
locale={locale}
format={dateFormat}

@ -8,7 +8,7 @@ class CBreadcrumb extends Component{
}
render(){
let { items, className }=this.props;
let { items, className, separator }=this.props;
return(
<p className={`clearfix mb10 ${className}`}>
{ items && items.map( (item, index) => {
@ -18,7 +18,10 @@ class CBreadcrumb extends Component{
if (item.to) {
return <React.Fragment>
<WordsBtn style="grey" className="fl hovercolorblue" to={item.to}>{item.name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
{separator ?
<span className="color-grey-9 fl ml3 mr3">{separator}</span> :
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
}
</React.Fragment>
} else {
return <span>{item.name}</span>

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import {getImageUrl, trigger, on, off} from 'educoder';
import { Tooltip, message,Popover} from 'antd';
import { Tooltip, message,Popover,Breadcrumb} from 'antd';
import CoursesListType from '../coursesPublic/CoursesListType';
import AccountProfile from"../../user/AccountProfile";
import Addcourses from '../coursesPublic/Addcourses';
@ -353,8 +353,8 @@ class CoursesBanner extends Component {
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
@ -489,23 +489,42 @@ class CoursesBanner extends Component {
<div className="clearfix clearfixborder">
<ul className="fl color-grey-eb pathInfo pathInfobox mt10">
<li className={"mt7 teachersbox"} >
<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c fl font-16">教师</span>
<span
className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span>
</Link>
</li>
<style>
{`
.ant-breadcrumb-separator{
color: rgba(255,255,255,0.3) !important;
}
`}
</style>
<Breadcrumb separator="|" className={"mt5"}>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c font-16"><span className={"mr10"}>教师</span> <span className={"mr10"}>{coursedata.teacher_count}</span></span>
</Breadcrumb.Item>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span>
</Breadcrumb.Item>
<Breadcrumb.Item>{coursedata.credit===null?"":
<span className="color-grey-c font-16"><span className={"mr10 ml10"}>学分</span> <span className={"mr10"}>{coursedata.credit}</span></span>
}</Breadcrumb.Item>
</Breadcrumb>
{/*<li className={"mt7 teachersbox"} >*/}
{/*<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}>*/}
{/*<span className="color-grey-c fl font-16">教师</span>*/}
{/*<span*/}
{/*className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span>*/}
{/*</Link>*/}
{/*</li>*/}
<li className={"mt7"}>
<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c fl font-16">学生</span>
<span
className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>
{coursedata.student_count}
</span>
</Link>
</li>
{/*<li className={"mt7 teachersbox"}>*/}
{/*<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}>*/}
{/*<span className="color-grey-c fl font-16">学生</span>*/}
{/*<span*/}
{/*className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>*/}
{/*{coursedata.student_count}*/}
{/*</span>*/}
{/*</Link>*/}
{/*</li>*/}
{/*<li className={"mt7"}>*/}
{/*<a>*/}
@ -514,13 +533,13 @@ class CoursesBanner extends Component {
{/*</a>*/}
{/*</li>*/}
{coursedata.credit===null?"":<li className={"mt7"}>
<a>
<span className="color-grey-c fl font-16 mr10">学分</span>
<span className="color-white fl font-16 "
>{coursedata.credit}</span>
</a>
</li>}
{/*{coursedata.credit===null?"":<li className={"mt7"}>*/}
{/*<a>*/}
{/*<span className="color-grey-c fl font-16 mr10">学分</span>*/}
{/*<span className="color-white fl font-16 "*/}
{/*>{coursedata.credit}</span>*/}
{/*</a>*/}
{/*</li>}*/}
{/*{coursedata.course_end===true? <li className={"mt7"}>*/}
{/*<span className="color-grey-c fl font-16">已结束</span>*/}

@ -16,7 +16,7 @@ class CoursesHome extends Component{
this.state = {
limit:16,
page:1,
order:"all",
order:"created_at",
coursesHomelist:undefined,
search:"",
}
@ -118,25 +118,25 @@ class CoursesHome extends Component{
</div>
<div className="mt20 educontent mb20 clearfix">
<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("all")}>全部</a>
<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("mine")}>我的</a>
{/*<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
{/*onClick={ () => this.changeStatus("all")}>全部</a>*/}
{/*<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
{/*onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a className={ order == "created_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "course_members_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("course_members_count")}>最热</a>
<div className="fr mr5 search-new">
{/* <Search
placeholder="课堂名称/教师姓名/学校名称"
id="subject_search_input"
value={search}
onInput={this.inputSearchValue}
onSearch={this.searchValue}
autoComplete="off"
></Search> */}
</div>
<a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("visits")}>最热</a>
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}
{/*placeholder="课堂名称/教师姓名/学校名称"*/}
{/*id="subject_search_input"*/}
{/*value={search}*/}
{/*onInput={this.inputSearchValue}*/}
{/*onSearch={this.searchValue}*/}
{/*autoComplete="off"*/}
{/*></Search> *!/*/}
{/*</div>*/}
</div>

@ -248,7 +248,7 @@ class Addcourses extends Component{
}else{
notification.open({
response.data.message && notification.open({
message:"提示",
description:response.data.message
});

@ -122,16 +122,20 @@ class PathModal extends Component{
contentViewScrolledit=(e)=>{
//滑动到底判断
const {shixunmodallist} = this.state;
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page,shixunpathlist}=this.state;
let newpage=page+1
this.funshixunpathlist(Searchvalue,type,true,newpage)
this.setState({
page:newpage
})
if(shixunmodallist.subject_list.length===0){
return;
}else{
let {Searchvalue,type,page,shixunpathlist}=this.state;
let newpage=page+1
this.funshixunpathlist(Searchvalue,type,true,newpage)
this.setState({
page:newpage
})
}
}
}
@ -288,17 +292,19 @@ class PathModal extends Component{
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 newtaskhide">
<Checkbox
id={"shixun_input_"+item.subject_id} value={item.subject_id}
id={"shixun_input_"+item.subject_id}
value={item.subject_id}
key={item.subject_id}
className="task-hide edu-txt-left newtaskhide"
style={{"width":"280px"}}
name="shixun_homework[]"
>
<label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title="frerere">{item.subject_name}</label>
<label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title={item.subject_name}>{item.subject_name}</label>
</Checkbox>
</li>
<li className="fl with30 edu-txt-left task-hide pl40">{item.shixun_count}</li>
<li className="fl with10 paddingl10">{item.myshixun_count}</li>
<Tooltip title="查看详情">
<Tooltip title="新窗口查看详情">
<li className="fr with10"><a className="color-blue" href={"/paths/"+item.subject_id} target="_blank">详情</a></li>
</Tooltip>
</div>

@ -100,17 +100,21 @@ class ShixunModal extends Component{
}
contentViewScrolledit=(e)=>{
const {shixunmodallist}=this.state;
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page}=this.state;
let newpage=page+1
this.setupdatalist(Searchvalue,type,true,newpage)
this.setState({
page:newpage
})
}
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight) {
if (shixunmodallist.shixun_list.length === 0) {
return;
} else {
let {Searchvalue, type, page} = this.state;
let newpage = page + 1
this.setupdatalist(Searchvalue, type, true, newpage)
this.setState({
page: newpage
})
}
}
}
//搜索

@ -477,9 +477,9 @@ a.white-btn.use_scope-btn:hover{
}
.pathInfobox li{
margin-right: 20px;
height: 15px;
height: 20px;
/*overflow: hidden;*/
line-height: 15px;
line-height: 20px;
}
.width70f{
width: 70px;

@ -526,7 +526,7 @@ class ExerciseReviewAndAnswer extends Component{
height: 28px;
}
`}</style>
<p style={{height:"60px"}}></p>
{/*<p style={{height:"60px"}}></p>*/}
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}

@ -221,7 +221,7 @@ class AddStudentModal extends Component{
</p>
<Spin size="large" spinning={isSpin}>
{ users && users.length ? <div>
{ loading || users.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll
@ -242,7 +242,7 @@ class AddStudentModal extends Component{
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>
{ candidate.name ?
<a href={`/users/${candidate.login}`} target="_blank">
<a href={`/users/${candidate.login}`} target="_blank" style={{"maxWidth":"208px;"}}>
{ candidate.name }
</a> : <span> </span> }
</label>

@ -205,7 +205,7 @@ class AddTeacherModal extends Component{
{`
.demo-loading-container {
position: absolute;
bottom: 93px;
bottom: 210px;
width: 82%;
text-align: center;
}
@ -219,8 +219,7 @@ class AddTeacherModal extends Component{
}
.df span.label {
margin-right: 8px;
text-align: right;
margin-left: 12px;
text-align: left;
}
.df .ant-input-affix-wrapper {
width: 32%;
@ -232,11 +231,11 @@ class AddTeacherModal extends Component{
`}
</style>
<div className="df">
<span className="firstLabel label">姓名:</span>
<span className="firstLabel label" style={{ flex: '0 0 40px' }}>姓名:</span>
<Input allowClear placeholder="请输入真实姓名" value={name} onChange={(e) => {this.setState({name: e.target.value})}}
style={{ width: '200px'}}>
style={{ width: '200px', marginRight: '18px' }}>
</Input>
<span className="label" style={{ minWidth: '36px' }}>单位:</span>
<span className="label" style={{ minWidth: '36px', flex: '0 0 40px' }}>单位:</span>
<SchoolSelect
value={school_name}
onChange={this.onOrgNameChange}
@ -256,37 +255,7 @@ class AddTeacherModal extends Component{
>搜索</a>
</div>
{/* graduation_groups && !!graduation_groups.length */}
{ this.hasGraduationModule() && <div className="df" style={{ marginTop: '24px' }} >
<span className="firstLabel label">答辩组:</span>
<Select style={{ width: 457 }} onChange={this.handleGradationGroupChange} value={graduationGroup}
dropdownRender={menu => (
<div>
{menu}
<Divider style={{ margin: '4px 0' }} />
{/* <ActionBtn
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>添加答辩组</ActionBtn> */}
<div style={{ padding: '8px', cursor: 'pointer' }}
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>
<Icon type="plus" /> 添加答辩组
</div>
</div>
)}
>
{ graduation_groups && graduation_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div>}
{ course_groups && !!course_groups.length && <div className="df">
<span className="firstLabel label">管理权限:</span>
<Select style={{ width: 457 }} onChange={this.handleCourseGroupChange} value={courseGroup}>
{ course_groups && course_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div> }
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
@ -296,7 +265,7 @@ class AddTeacherModal extends Component{
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
</p>
{ candidates && candidates.length ? <div>
{ loading || candidates.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll
@ -314,8 +283,14 @@ class AddTeacherModal extends Component{
<p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25">
{/* "color":"#4c4c4c" */}
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}
>
<a href={`/users/${candidate.login}`} target="_blank"
style={{}}
>{candidate.name}</a>
</label>
</ConditionToolTip>
</span>
<span className="fl with25">
@ -339,6 +314,40 @@ class AddTeacherModal extends Component{
</InfiniteScroll>
</div>
</div> : <NoneData></NoneData> }
<div className="df">
{ this.hasGraduationModule() && <div className="df" style={{ marginTop: '24px' }} >
<span className="firstLabel label" style={{ flex: '0 0 96px' }}>添加至答辩组:</span>
<Select style={{ width: 218, marginRight: '18px' }} onChange={this.handleGradationGroupChange} value={graduationGroup}
dropdownRender={menu => (
<div>
{menu}
<Divider style={{ margin: '4px 0' }} />
{/* <ActionBtn
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>添加答辩组</ActionBtn> */}
<div style={{ padding: '8px', cursor: 'pointer' }}
onMouseDown={() => { debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
>
<Icon type="plus" /> 添加答辩组
</div>
</div>
)}
>
{ graduation_groups && graduation_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div>}
{ course_groups && !!course_groups.length && <div className="df">
<span className="firstLabel label">管理权限:</span>
<Select style={{ width: 218 }} onChange={this.handleCourseGroupChange} value={courseGroup}>
{ course_groups && course_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}
</Select>
</div> }
</div>
</ModalWrapper>
)
}

@ -305,7 +305,7 @@ class PollInfo extends Component{
let isStudent=this.props.isStudent();
return(
<div className="newMain" style={{paddingTop:"0px"}}>
<p style={{height:"60px"}}></p>
{/*<p style={{height:"60px"}}></p>*/}
<Modals
modalsType={modalsType}
modalsTopval={modalsTopval}

@ -122,8 +122,8 @@ class PollNew extends Component {
}
}
// this.getPollInfo();
console.log("问卷返回");
console.log(this.props);
}
//获取权限

@ -106,7 +106,8 @@ class CommitSummary extends Component{
// console.log("提交总结接口")
// console.log(JSON.stringify(result))
// message.success(result.data.message);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`);
// 这里以前是学生
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`);
}
}).catch((error) => {
console.log(error)
@ -179,7 +180,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交
</Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`}>取消</a>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`}>取消</a>
</div>
</Form.Item>
</Form>

@ -21,21 +21,32 @@ class Guide extends Component {
}
componentDidMount() {
// 1366x768
// var mywidthone=7;
var mywidthone=0;
var mywidthone=0;
if(window.screen.width===1024){
mywidthone=1;
}
if(window.screen.width===1280){
else if(window.screen.width===1280){
mywidthone=2;
}
if(window.screen.width===1440){
else if(window.screen.width===1440){
mywidthone=3;
}
if(window.screen.width===1680){
else if(window.screen.width===1680){
mywidthone=4;
}
if(window.screen.width===1920){
else if(window.screen.width===1920){
mywidthone=5;
}
else if(window.screen.width===1366){
mywidthone=6;
}
else if(window.screen.width===1600){
mywidthone=7;
}
else{
mywidthone=5;
}
this.setState({
@ -54,8 +65,9 @@ class Guide extends Component {
render() {
let {page,mywidth}=this.state;
// console.log("屏幕宽度");
// console.log(window.screen.width);
// console.log(mywidth);
console.log(window.screen.width);
console.log(mywidth);
return (
<div className="guide-shadow">
<style>
@ -70,14 +82,14 @@ class Guide extends Component {
{
page===1?
<div className="guide-content">
<img className={mywidth===1?"ysldiv11024":mywidth===2?"ysldiv11280":mywidth===3?"ysldiv11440":mywidth===4?"ysldiv11680":"ysldiv11900"} src={guihome1} onClick={(i)=>this.thissetPage(2)} />
<img className={mywidth===1?"ysldiv11024":mywidth===2?"ysldiv11280":mywidth===3?"ysldiv11440":mywidth===4?"ysldiv11680":mywidth===5?"ysldiv11900":mywidth===6?"ysldiv11366":mywidth===7?"ysldiv11600":"ysldiv11900"} src={guihome1} onClick={(i)=>this.thissetPage(2)} />
</div>
:""
}
{
page===2?
<div className="guide-content">
<img className={mywidth===1?"ysldiv21024":mywidth===2?"ysldiv21280":mywidth===3?"ysldiv21440":mywidth===4?"ysldiv21680":"ysldiv21900"} src={guihome2} onClick={(i)=>this.thissetPage(3)}/>
<img className={mywidth===1?"ysldiv21024":mywidth===2?"ysldiv21280":mywidth===3?"ysldiv21440":mywidth===4?"ysldiv21680":mywidth===5?"ysldiv21900":mywidth===6?"ysldiv21366":mywidth===7?"ysldiv21600":"ysldiv21900"} src={guihome2} onClick={(i)=>this.thissetPage(3)}/>
</div>
:
""
@ -85,7 +97,7 @@ class Guide extends Component {
{
page===3?
<div className="guide-content">
<img className={mywidth===1?"ysldiv31024":mywidth===2?"ysldiv31280":mywidth===3?"ysldiv31440":mywidth===4?"ysldiv31680":"ysldiv31900"} src={guihome3} onClick={(i)=>this.thissetPage(4)}/>
<img className={mywidth===1?"ysldiv31024":mywidth===2?"ysldiv31280":mywidth===3?"ysldiv31440":mywidth===4?"ysldiv31680":mywidth===5?"ysldiv31900":mywidth===6?"ysldiv31366":mywidth===7?"ysldiv31600":"ysldiv31900"} src={guihome3} onClick={(i)=>this.thissetPage(4)}/>
</div>
:
""
@ -93,7 +105,7 @@ class Guide extends Component {
{
page===4?
<div className="guide-content">
<img className={mywidth===1?"ysldiv41024":mywidth===2?"ysldiv41280":mywidth===3?"ysldiv41440":mywidth===4?"ysldiv41680":"ysldiv41900"} src={guihome4} onClick={(i)=>this.thissetPage(5)}/>
<img className={mywidth===1?"ysldiv41024":mywidth===2?"ysldiv41280":mywidth===3?"ysldiv41440":mywidth===4?"ysldiv41680":mywidth===5?"ysldiv41900":mywidth===6?"ysldiv41366":mywidth===7?"ysldiv41600":"ysldiv41900"} src={guihome4} onClick={(i)=>this.thissetPage(5)}/>
</div>
:
""
@ -101,7 +113,7 @@ class Guide extends Component {
{
page===5?
<div className="guide-content">
<img className={mywidth===1?"ysldiv51024":mywidth===2?"ysldiv51280":mywidth===3?"ysldiv51440":mywidth===4?"ysldiv51680":"ysldiv51900"} src={guihome5} onClick={(i)=>this.thissetPage(6)}/>
<img className={mywidth===1?"ysldiv51024":mywidth===2?"ysldiv51280":mywidth===3?"ysldiv51440":mywidth===4?"ysldiv51680":mywidth===5?"ysldiv51900":mywidth===6?"ysldiv51366":mywidth===7?"ysldiv51600":"ysldiv51900"} src={guihome5} onClick={(i)=>this.thissetPage(6)}/>
</div>
:
""
@ -109,7 +121,7 @@ class Guide extends Component {
{
page===6?
<div className="guide-content">
<img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/>
<img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":mywidth===5?"ysldiv61900":mywidth===6?"ysldiv61366":mywidth===7?"ysldiv61600":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/>
</div>
:
""

@ -124,10 +124,10 @@ class Listofworksstudentone extends Component {
dataIndex: 'name',
key: 'name',
align: "center",
className:'font-14',
className:'font-14 maxnamewidth100',
width:'100px',
render: (text, record) => (
<span>
<span className="maxnamewidth100">
{record.name === undefined ?
<span style={{
"color": '#9A9A9A',
@ -152,10 +152,10 @@ class Listofworksstudentone extends Component {
"text-align": "center"
}}>--</span>
:
<span style={{
<a className="maxnamewidth100" title={record.name} style={{
"color": '#07111B',
"text-align": "center"
}}>{record.name}</span>
}}>{record.name}</a>
}
</span>
@ -166,13 +166,42 @@ class Listofworksstudentone extends Component {
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
className:'font-14',
className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => (
<span>
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</span>
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span>
),
},
@ -393,23 +422,53 @@ class Listofworksstudentone extends Component {
dataIndex: 'name',
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
className:'font-14 maxnamewidth100',
width:'100px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
<a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
)
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: 'center',
className:'font-14',
align: "center",
className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => (
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span>
),
},
@ -420,7 +479,9 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
<span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
</span>
)
},
{
@ -655,23 +716,53 @@ class Listofworksstudentone extends Component {
dataIndex: 'name',
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
className:'font-14 maxnamewidth100',
width:'100px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
<a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
)
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: 'center',
className:'font-14',
align: "center",
className:'font-14 maxnamewidth110',
width:'110px',
render: (text, record) => (
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--
</span>
:
<a
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{
record.stduynumber
}
</a>
}
</span>
),
},
@ -682,7 +773,9 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
<span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
</span>
)
},
{
@ -1101,6 +1194,8 @@ class Listofworksstudentone extends Component {
}
seacthdatas = (teacherdata,student_works) => {
console.log("1197");
console.log(this.props.isNotMember());
let {page, limit,work_efficiency} = this.state;
let datalist = [];
let datalists = [];
@ -1108,17 +1203,38 @@ class Listofworksstudentone extends Component {
var arr =[];
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
if (work_efficiency === false) {
if(item.title==="关卡得分"){
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
else if(item.title==="效率分"){
if(item.title==="学号") {
continue
}
else{
arr.push(item);
}
}
else{
if (work_efficiency === false) {
if(item.title==="关卡得分"){
continue
}
else if(item.title==="效率分"){
continue
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
}
}else{
arr.push(item);
}
}else{
arr.push(item);
}
}
let columns2= arr;
@ -1207,8 +1323,7 @@ class Listofworksstudentone extends Component {
}
// console.log("554");
// console.log(columns2);
// console.log(arr);
this.setState({
data: datalist,
datas: datalists,
@ -1220,23 +1335,44 @@ class Listofworksstudentone extends Component {
}
// 设置数据
seacthdata = (teacherdata) => {
console.log("1326");
console.log(this.props.isNotMember());
let datalist = [];
var arr =[];
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
if (this.state.work_efficiency === false) {
if (item.title === "关卡得分") {
} else if (item.title === "效率分") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
arr.push(item);
}
}else{
if (this.state.work_efficiency === false) {
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
continue
}else{
arr.push(item);
}
}else{
arr.push(item);
}
}
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
}
}
let columns2= arr;
@ -1472,7 +1608,7 @@ class Listofworksstudentone extends Component {
}
paginationonChanges = (pageNumber) => {
paginationonChangestwo = (pageNumber) => {
this.setState({
page: pageNumber,
loadingstate: true,
@ -1622,66 +1758,144 @@ class Listofworksstudentone extends Component {
if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分
console.log("1739");
console.log(this.props.isNotMember());
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{
columns2js.push(item);
if(item.title==="分班"){
continue
}
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}else {
columns2js.push(item);
}
}
}
}else{
console.log("1767");
console.log(this.props.isNotMember());
if(course_group_info.length < 2){
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{
columns2js.push(item);
if(item.title==="分班"){
continue
}
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}
else {
columns2js.push(item);
}
}
}
}else {
console.log("1795");
console.log(this.props.isNotMember());
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{
if(item.title==="关卡得分"){
continue
}
if(item.title==="效率分"){
continue
}else {
columns2js.push(item);
}
}
}
}
}
}else {
console.log("1821");
console.log(this.props.isNotMember());
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{
columns2js.push(item);
if(item.title==="分班"){
continue
}else{
columns2js.push(item);
}
}
}
@ -1689,15 +1903,34 @@ class Listofworksstudentone extends Component {
}else {
console.log("1849");
console.log(this.props.isNotMember());
if(course_group_info.length < 2) {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
columns2js.push(item);
}
}else{
columns2js.push(item);
if(item.title==="分班"){
continue
}else{
columns2js.push(item);
}
}
}
}
@ -1710,6 +1943,7 @@ class Listofworksstudentone extends Component {
//
// console.log(datalist);
// console.log("1712");
this.setState({
datajs: datalistjs,
columns: columns2js,
@ -2261,7 +2495,10 @@ class Listofworksstudentone extends Component {
// console.log(datajs);
// console.log("2202");
// console.log(this.props.isAdmin());
// console.log("2498");
// console.log(data);
// console.log(datas);
// console.log(this.props.isAdmin());
return (
this.props.isAdmin() === true ?
(
@ -2492,7 +2729,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works&&teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.all_member_count}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style>
{
`
@ -2535,20 +2772,26 @@ class Listofworksstudentone extends Component {
</div>
:
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<div className={"justify break_full_word new_li "} style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
.edu-table thead th,.edu-table tbody tr:last-child td{
border-bottom: none!important;
height: 85px;
height: 58px;
}
.ant-tables .ant-table-tbody > tr > td {
height: 85px;
height: 58px;
}
.ysltableo .ant-table-thead > tr > th{
height: 58px;
}
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style>
<div className="edu-table edu-back-white ant-tables">
<div className="edu-table edu-back-white ant-tables ysltableo table1">
{datajs === undefined ? "" : <Table
dataSource={datajs}
columns={columns}
@ -2687,8 +2930,8 @@ class Listofworksstudentone extends Component {
<span className="fl color-grey-6 font-12">
<span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span>
className="color-orange-tip">{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span>
}
@ -2723,15 +2966,30 @@ class Listofworksstudentone extends Component {
</div>
</div>
<div className={"justify break_full_word new_li edu-back-white"}
<div className={"justify break_full_word new_li"}
style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableow .ant-table-thead > tr > th{
height: 58px;
}
.ysltableow .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style>
<div className="edu-table edu-back-white ">
{data === undefined ? "222222" : <Table
<div className="edu-table edu-back-white ysltableow table2">
{data === undefined ? "" : <Table
dataSource={data}
columns={columnsstu}
pagination={false}
@ -2784,7 +3042,7 @@ class Listofworksstudentone extends Component {
}
<div className={"educontent mb20"}>
<div className="edu-back-white">
<div >
<style>
{
`
@ -2802,29 +3060,48 @@ class Listofworksstudentone extends Component {
</span>
</li>:""}
<div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableows .ant-table-thead > tr > th{
height: 58px;
}
.ysltableows .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`
}
</style>
<div className="edu-table edu-back-white ysltableows table3">
{data === undefined ? "" : <Table
style={styletable}
dataSource={data}
columns={columnsstu}
pagination={false}
loading={false}
showHeader={false}
/>}
</div>
{JSON.stringify(datas) !== "[]" ?
<div>
<div id="graduation_work_list" style={{
<div id="graduation_work_list" className="edu-back-white" style={{
padding: '20px 20px 10px 20px',
marginBottom: "10px"
}}>
<div className="clearfix">
<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">
{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}
{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}
</span>
<span className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span>
<span className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span>}
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
@ -2913,14 +3190,29 @@ class Listofworksstudentone extends Component {
</div>
<div className={"justify break_full_word new_li edu-back-white"}
<div className={"justify break_full_word new_li"}
style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th{
height: 58px;
}
.ysltableowss .ant-table-tbody > tr > td{
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style>
<div className="edu-table edu-back-white ">
<div className="edu-table edu-back-white ysltableowss table4">
{datas === undefined ? "" : <Table
dataSource={datas}
columns={columnsstu}
@ -2928,16 +3220,17 @@ class Listofworksstudentone extends Component {
loading={loadingstate}
/>}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center ysyslxh mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChangestwo} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
:
<div id="forum_list" className="forum_table">

@ -132,7 +132,7 @@ class ShixunHomeworkPage extends Component {
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>
<div className={"educontent mt20 mb20"} style={{width: "1200px"}}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">

@ -783,7 +783,9 @@ class ShixunStudentWork extends Component {
<CheckboxGroup onChange={this.groupgroup}
value={this.state.group_infolist}
style={{paddingTop: '4px'}}>
style={{paddingTop: '4px',float: 'left',
maxWidth: '1020px'}}
>
{data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => {
return (
<span key={key}>

@ -75,10 +75,15 @@ class ShixunWorkReport extends Component {
let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => {
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({
data:result.data,
spinning:false
})
}
}).catch((error) => {
console.log(error)
this.setState({
@ -109,8 +114,15 @@ class ShixunWorkReport extends Component {
this.props.history.push(this.props.current_user.first_category_url);
}
}
goback = () => {
this.props.history.goBack()
}
render() {
let{data} =this.state;
console.log(data)
console.log(this.props)
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid;
@ -147,9 +159,10 @@ class ShixunWorkReport extends Component {
{/*className="fr color-blue font-16"*/}
{/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/}
{/*>导出实训报告数据</a> : ""}*/}
{/*<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>*/}
</div>
<div className="stud-class-set bor-bottom-greyE">
<div className="stud-class-set">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div>

@ -305,7 +305,7 @@ class ShixunhomeWorkItem extends Component{
}
{
this.props.isStudent? <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
this.props.isStudent? <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
@ -313,7 +313,7 @@ class ShixunhomeWorkItem extends Component{
{
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>
: <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
: <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}

@ -132,13 +132,14 @@ class ShixunWorkModal extends Component{
onChange=(e)=>{
let{group_list}=this.state;
let {data}=this.props;
if(e.target.checked===true){
if(data&&data.length===0){
let id=[]
group_list.forEach((item,key)=>{
id.push(item.id)
if(item.works_count!=0){
id.push(item.id)
}
})
this.setState({
group_ids:id,
@ -147,7 +148,9 @@ class ShixunWorkModal extends Component{
}else{
let id=[]
group_list.forEach((item,key)=>{
id.push(item.id)
if(item.works_count!=0){
id.push(item.id)
}
})
this.setState({
group_ids:id,
@ -161,6 +164,9 @@ class ShixunWorkModal extends Component{
})
}
}
@ -189,7 +195,7 @@ class ShixunWorkModal extends Component{
// message:"提示",
// description: response.data.message
// });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`);
window.location.href=`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`;
}else if(response.data.status === -1){
notification.open({
message:"提示",
@ -302,6 +308,7 @@ class ShixunWorkModal extends Component{
}
<div className={"clearfix"}>
<Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox>
{/*<span>有效作品都为0</span>*/}
</div>
<div className="clearfix mt30 edu-txt-center mb10">

@ -79,14 +79,14 @@ class TraineetraininginformationModal extends Component {
return str;
}
render() {
console.log(83);
console.log(this.props.boolgalist);
// console.log(83);
// console.log(this.props.boolgalist);
const columns = [
{
title: '关卡',
dataIndex: 'number',
key: 'number',
width: 92,
width:"91px",
align: "center",
render: (text, record) => (
<span>
@ -98,7 +98,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: 178,
width:"150px",
align: "center",
render: (text, record) => (
<span>
@ -113,7 +113,7 @@ class TraineetraininginformationModal extends Component {
title: '',
dataIndex: 'complete_status',
key: 'complete_status',
width: 100,
width:"87px",
align: "center",
render: (text, record) => (
<span>
@ -127,7 +127,7 @@ class TraineetraininginformationModal extends Component {
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
width: 92,
width:"150px",
align: "center",
render: (text, record) => (
<span>
@ -138,7 +138,7 @@ class TraineetraininginformationModal extends Component {
{
title: '经验值',
key: 'classroom',
width: 92,
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
@ -147,7 +147,7 @@ class TraineetraininginformationModal extends Component {
</span>
),
}
]
];
const columnss = [
{
@ -155,7 +155,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'number',
key: 'number',
align: "center",
width: "117px",
width:"119px",
render: (text, record) => (
<span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
@ -166,7 +166,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: "203px",
width:"174px",
align: "center",
render: (text, record) => (
<span >
@ -179,7 +179,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
width: "117px",
width:"119px",
render: (text, record) => (
<span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
@ -191,14 +191,14 @@ class TraineetraininginformationModal extends Component {
key: 'classroom',
dataIndex: 'classroom',
align: "center",
width: "117px",
render: (text, record) => (
<span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span>
),
}
]
];
return (
<div>
@ -209,6 +209,8 @@ class TraineetraininginformationModal extends Component {
visible={this.props.visible}
footer={null}
onCancel={this.Cancel}
maskClosable={false}
destroyOnClose={true}
>
<div style={{width:"100%" }} >
<div style={{"width": "100%","text-align": "left","clear": "both"}}>
@ -252,7 +254,18 @@ class TraineetraininginformationModal extends Component {
{
` .ant-table-body{
overflow: hidden !important;
}`
}
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
@ -263,24 +276,33 @@ class TraineetraininginformationModal extends Component {
columns={columns}
loading={false}
pagination={false}
onChange={this.TablePagination}
/>}
</div>
:
<div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table
className="mt20"
dataSource={this.props.game_list}
columns={columns}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false}
pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }}
/>}
</div>
@ -302,7 +324,15 @@ class TraineetraininginformationModal extends Component {
{
` .ant-table-body{
overflow: hidden !important;
}`
}
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
`
}
</style>
@ -313,24 +343,32 @@ class TraineetraininginformationModal extends Component {
columns={columnss}
loading={false}
pagination={false}
onChange={this.TablePagination}
/>}
</div>
:
<div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table
className="mt20"
dataSource={this.props.game_list}
columns={columnss}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false}
pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }}
/>}
</div>

@ -20,7 +20,7 @@
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
background-color: rgba(0, 0, 0, 0.4);
transition: all .3s ease-out;
display: flex;
justify-content: center;
@ -236,15 +236,19 @@
}
.ysldiv11680{
margin-top: 11%;
margin-left: 13%;
margin-right: 10%;
margin-top: 11.5%;
margin-left: 13%;
margin-right: 9%;
}
.ysldiv11600{
margin-top: 12%;
margin-left: 11%;
margin-right: 7%;
}
.ysldiv11440{
margin-top: 14%;
margin-left: 7%;
margin-right: 3%;
height: 60%;
}
.ysldiv11280{
@ -253,6 +257,12 @@
margin-right: 0%;
height: 60%;
}
.ysldiv11366{
margin-top: 15%;
margin-left: 5%;
margin-right: 2%;
height: 60%;
}
.ysldiv11024{
margin-top: 20%;
margin-left: 0%;
@ -270,16 +280,19 @@
}
.ysldiv21680{
margin-top: 11%;
margin-left: 45%;
margin-top: 11.5%;
margin-left: 45%;
margin-right: 20%;
}
.ysldiv21600{
margin-top: 12%;
margin-left: 47%;
margin-right: 20%;
height: 24%;
}
.ysldiv21440{
margin-top: 14%;
margin-left: 47%;
margin-right: 17%;
height: 25%;
}
.ysldiv21280{
@ -288,6 +301,12 @@
margin-right: 14%;
height: 25%;
}
.ysldiv21366{
margin-top: 15%;
margin-left: 51%;
margin-right: 14%;
height: 23%;
}
.ysldiv21024{
margin-top: 20%;
margin-left: 61%;
@ -303,12 +322,17 @@
}
.ysldiv31680{
margin-top: 11%;
margin-left: 14%;
margin-top: 11.5%;
margin-left: 14%;
margin-right: 45%;
}
.ysldiv31600{
margin-top: 12%;
margin-left: 12%;
margin-right: 45%;
}
.ysldiv31440{
margin-top: 13%;
margin-top: 13.5%;
margin-left: 8%;
margin-right: 44%;
}
@ -318,6 +342,11 @@
margin-left: 3%;
margin-right: 44%;
}
.ysldiv31366{
margin-top: 14%;
margin-left: 6%;
margin-right: 43%;
}
.ysldiv31024{
margin-top: 18%;
margin-left: 1%;
@ -327,27 +356,37 @@
/*目录管理*/
.ysldiv41900{
margin-top: 18%;
margin-top: 16%;
margin-left: 19%;
margin-right: 28%;
margin-right: 29%;
}
.ysldiv41680{
margin-top: 21%;
margin-top: 18%;
margin-left: 14%;
margin-right: 24%;
}
.ysldiv41600{
margin-top: 19%;
margin-left: 12%;
margin-right: 23%;
}
.ysldiv41440{
margin-top: 24%;
margin-top: 21%;
margin-left: 8%;
margin-right: 19%;
margin-right: 20%;
}
.ysldiv41280{
margin-top: 27%;
margin-top: 24%;
margin-left: 3%;
margin-right: 17%;
}
.ysldiv41366{
margin-top: 22%;
margin-left: 6%;
margin-right: 20%;
}
.ysldiv41024{
margin-top: 29%;
margin-left: 0%;
@ -356,27 +395,37 @@
/*导航排序*/
.ysldiv51900{
margin-top: 18%;
margin-top: 16%;
margin-left: 18%;
margin-right: 42%;
}
.ysldiv51680{
margin-top: 20%;
margin-left: 13%;
margin-right: 41%;
margin-top: 18%;
margin-left: 13%;
margin-right: 40%;
}
.ysldiv51600{
margin-top: 19%;
margin-left: 11%;
margin-right: 39%;
}
.ysldiv51440{
margin-top: 24%;
margin-top: 21%;
margin-left: 7%;
margin-right: 38%;
margin-right: 39%;
}
.ysldiv51280{
margin-top: 27%;
margin-top: 24%;
margin-left: 2%;
margin-right: 38%;
}
.ysldiv51366{
margin-top: 22%;
margin-left: 5%;
margin-right: 39%;
}
.ysldiv51024{
margin-top: 34%;
margin-left: -1%;
@ -395,6 +444,11 @@
margin-left: 31%;
margin-right: 14%;
}
.ysldiv61600{
margin-top: 19%;
margin-left: 30%;
margin-right: 12%;
}
.ysldiv61440{
margin-top: 21%;
margin-left: 28%;
@ -407,6 +461,12 @@
margin-right: 3%;
height: 53%;
}
.ysldiv61366{
margin-top: 22%;
margin-left: 26%;
margin-right: 6%;
height: 53%;
}
.ysldiv61024{
margin-top: 26%;
margin-left: 27%;

@ -44,7 +44,7 @@ class Coursesshixundetails extends Component {
data&&data.forEach((item,key)=>{
datas.push({
number: item.position,
name: item.output_detail
name: item.output_detail=== ""||item.output_detail===null?"暂无数据":item.output_detail
})
})

@ -177,6 +177,8 @@ class OfficialAcademicTranscript extends Component {
}
.TaskForms{
width: 500px;
text-align: left !important;
padding: 16px !important;
}
.TaskForms.ant-table-header-column{
width: 100%;

@ -12,6 +12,7 @@ function startechart(data){
var option = {
title: {
text: '工作效率',
subtext: '工作效率=log(实训总得分/实训总耗时)'
},
grid:{
left: '3%',
@ -61,7 +62,7 @@ function startechart(data){
yAxis: [
{
type : "value",
name : " 实训总得分/实训总耗时",
name : " ",
nameGap: 20,
nameTextStyle: {
color: '#000',
@ -169,6 +170,7 @@ function startechart(data){
var option1 = {
title: {
text: '能力值',
subtext: '能力值(实训获得经验值/实训评测次数)'
},
backgroundColor: '#fff',
color: [
@ -212,7 +214,7 @@ function startechart(data){
},
yAxis: {
type: 'value',
name: " 实训获得经验值/实训评测次数",
name: " ",
nameLocation: 'end',
nameGap: 20,
nameTextStyle: {
@ -356,7 +358,7 @@ class Shixunechart extends Component {
`}
</style>
<div className="fl with24 ml50">
<div className="fl ml50">
<div className="bor-grey-e bor-radius4 clearfix mt100 colorE6F3FF pd10">
<div className="fl with25 colorE6F3FF" style={{textAlign:"right",paddingRight:"5%"}}>
<li className="mt5 mb5 color-grey-9">姓名</li>

@ -1,39 +1,56 @@
.ant-checkbox-group > div .boardsList{
/* border-top: 1px solid #ebebeb; */
padding:10px 0px 20px!important;
}
.ant-checkbox-group > div:first-child .boardsList{
border-top: none;
}
.boardsList .contentSection {
flex: 1;
margin-left: 15px;
}
.ant-select-selection--single,.ant-select-selection__rendered{
height: 40px;
line-height: 40px;
}
.ant-input:focus + .ant-input-group-addon{
background-color: #fff!important;
}
.ant-input-group-addon{
color: #666!important;
font-size: 12px;
border: 1px solid #d9d9d9!important;
border-left: none!important;
}
.courseForm .ant-form-item-label{
margin-left: unset;
}
/* 毕设选题列表 */
.TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px}
.TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;}
.TopicDetailTable .bottomBody{padding:0px 30px}
.TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;}
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
.ant-checkbox-group > div .boardsList{
/* border-top: 1px solid #ebebeb; */
padding:10px 0px 20px!important;
}
.ant-checkbox-group > div:first-child .boardsList{
border-top: none;
}
.boardsList .contentSection {
flex: 1;
margin-left: 15px;
}
.ant-select-selection--single,.ant-select-selection__rendered{
height: 40px;
line-height: 40px;
}
.ant-input:focus + .ant-input-group-addon{
background-color: #fff!important;
}
.ant-input-group-addon{
color: #666!important;
font-size: 12px;
border: 1px solid #d9d9d9!important;
border-left: none!important;
}
.courseForm .ant-form-item-label{
margin-left: unset;
}
/* 毕设选题列表 */
.TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px}
.TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;}
.TopicDetailTable .bottomBody{padding:0px 30px}
.TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;}
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
.maxnamewidth100{
max-width: 100px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth110{
max-width: 110px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.ysyslxh{
background: #fafafa;
}

@ -22,8 +22,11 @@ import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC'
import MemoDetailKEEditor from './MemoDetailKEEditor'
import MemoDetailMDEditor from './MemoDetailMDEditor'
import { bytesToSize } from 'educoder'
import { bytesToSize, CBreadcrumb } from 'educoder'
import { Tooltip } from 'antd'
// import CBreadcrumb from '../courses/common/CBreadcrumb'
import { typeNameMap2 } from './MemoNew'
const $ = window.$
function urlStringify(params) {
let noParams = true;
@ -682,6 +685,13 @@ class MemoDetail extends Component {
memo.isDetailPage = true;
// TODO 图片上传地址
return (
<React.Fragment>
<CBreadcrumb items={[
{ to: `/forums/categories/${memo.forum_id}`, name: typeNameMap2[memo.forum_id]},
{ name: '详情' },
]}
separator={' / '}
></CBreadcrumb>
<div className="edu-back-white memoDetail" id="forum_index_list"> {/* fl with100 */}
<style>{`
.memoDetail .commentsbtn {
@ -735,12 +745,12 @@ class MemoDetail extends Component {
</ul>
</div>
}
<Link className={`task-hide fr return_btn color-grey-6 mt2 ${ _current_user && (_current_user.admin === true
{/* <Link className={`task-hide fr return_btn color-grey-6 mt2 ${ _current_user && (_current_user.admin === true
|| _current_user.user_id === author_info.user_id) ? '': 'no_mr'} `} to="/forums"
style={{ marginRight: '10px'}}
>
返回
</Link>
</Link> */}
</div>
</div>
<div className="color-grey-9 clearfix">
@ -837,6 +847,7 @@ class MemoDetail extends Component {
</div>
</div>
</React.Fragment>
);
}
}

@ -121,7 +121,7 @@ const typeNameMap = {
'技术分享': 5,
'操作指南': 3,
}
const typeNameMap2 = {
export const typeNameMap2 = {
5: '技术分享',
3: '操作指南',
}

@ -308,7 +308,7 @@ class MessagSub extends Component{
//记得跳评阅页面
default :
// 课堂-试卷列表详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}`)
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
}
case 'StudentGraduationTopic' :
//课堂-毕业选题详情 :id = parent_container_id

@ -20,7 +20,7 @@ class CaseItem extends Component{
libraries && libraries.map((item,key)=>{
return(
<li className="library_list_item">
<img alt={item.id} className="mr15 mt3 radius4" height="90" src={getUrl(`${item.cover_url}`)} width="120" />
<img alt={item.id} className="mr15 mt3 radius4" height="90" src={getUrl(`${item.cover_url || "/images/educoder/library-default-cover.png"}`)} width="120" />
<div className="flex1">
<p className="clearfix mb25 lineh-40">
<a href={`/moop_cases/${item.id}`} className="task-hide font-22 library_l_name">{item.title}</a>
@ -32,15 +32,15 @@ class CaseItem extends Component{
<span className="color-grey-c fr">
{
item.visited_count && item.visited_count != 0 ?
<span className="color-grey-c mr20"><span className=" item-group-icon mr5"><i className="fa fa-eye"></i></span>{item.visited_count} </span>:""
<span className="color-grey-c ml20"><span className=" item-group-icon mr5"><i className="fa fa-eye"></i></span>{item.visited_count} </span>:""
}
{
item.praise_count && item.praise_count != 0 ?
<span className="color-grey-c mr20"><span className=" item-group-icon mr5"><i className="fa fa-thumbs-o-up"></i></span>{item.praise_count} </span>:""
<span className="color-grey-c ml20"><span className=" item-group-icon mr5"><i className="fa fa-thumbs-o-up"></i></span>{item.praise_count} </span>:""
}
{
item.download_count && item.download_count != 0 ?
<span className="color-grey-c" style={{"marginRight":'1px'}}><span className=" item-group-icon mr5"><i className="fa fa-download"></i></span>{item.download_count} </span>:""
<span className="color-grey-c ml20" style={{"marginRight":'1px'}}><span className=" item-group-icon mr5"><i className="fa fa-download"></i></span>{item.download_count} </span>:""
}
</span>
</p>

@ -94,6 +94,7 @@ class CaseList extends Component{
render(){
let { type , search ,libraries , totalCount ,pageSize ,page } = this.state;
let { checkIfLogin } = this.props;
return(
<React.Fragment>
<img src={mainImg} width="100%" />
@ -101,7 +102,9 @@ class CaseList extends Component{
<div className="edu-back-white mb30 mt30">
<p className="padding20-30 clearfix bor-bottom-greyE">
<span className="font-18 fl color-grey-3">教学案例</span>
<LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn">发布案例</LinkAfterLogin>
<LinkAfterLogin {...this.props} to={'/moop_cases/new'} className="fr edu-default-btn edu-blueline-btn" checkProfileComplete = {true}
>发布案例</LinkAfterLogin>
{/* <ActionBtn style="colorBlue" className="fr" to="/moop_cases/new">发布案例</ActionBtn> */}
</p>
<div className="clearfix pl30 pr30">

@ -203,7 +203,9 @@ class CaseNew extends Component{
author_name:values.userName,
author_school_name:values.userUnit,
content:values.description,
attachment_ids:this.state.filesID,
attachment_ids:this.state.contentFileList.map(item=>{
return (item.response ? item.response.id : item.id )
}),
tag_ids:this.state.casesTags,
cover_id:this.state.coverID,
publish:type == 'save' ? false : true
@ -436,7 +438,7 @@ class CaseNew extends Component{
<Form.Item>
<div className="clearfix mt30 mb30">
{
(!caseID || (CaseDetail && CaseDetail.status == "pending")) ? <Button type="primary" onClick={()=>this.handleSubmit("submit")} className="defalutSubmitbtn fl mr20">申请发布</Button> : ""
(!caseID || (CaseDetail && CaseDetail.status == "pending" || CaseDetail && CaseDetail.status == "refused")) ? <Button type="primary" onClick={()=>this.handleSubmit("submit")} className="defalutSubmitbtn fl mr20">申请发布</Button> : ""
}
<a className="defalutCancelbtn fl" onClick={()=>this.handleSubmit("save")}>保存</ a>
</div>

@ -193,12 +193,20 @@ class DetailCards extends Component{
}
startgameid=(id)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {
@ -330,8 +338,8 @@ class DetailCards extends Component{
<div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
<Modals

@ -326,6 +326,15 @@ class PathDetailIndex extends Component{
return(
<div className="newContainer">
<style>
{
`
.head-right{
line-height: 30px;
}
`
}
</style>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
@ -417,7 +426,7 @@ class PathDetailIndex extends Component{
</div>
}
{
detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" :
this.props.checkIfLogin()===false?"":detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" :
<div className="edu-back-white myProgress padding40-20 mb10">
<p className="mb20">
<span className="font-16 mr10">我的进展</span>

@ -1,216 +1,213 @@
import React, { Component } from 'react';
import { Modal,Checkbox,Input } from "antd";
import axios from 'axios';
const Search = Input.Search;
const CheckboxGroup = Checkbox.Group;
class addCollaborators extends Component{
constructor(props){
super(props);
this.state = {
addPartner:false,
page:1,
partnerList:undefined,
search:'',
partnerListid:[],
checkAll: false,
optionss:[]
}
}
addBox=()=>{
this.setState({
addPartner:true,
search:"",
page:1,
partnerList:undefined,
optionss:[]
})
this.searchList("")
}
hideAddBox=()=>{
this.setState({
addPartner:false,
optionss:[],
partnerListid:[]
})
}
// 搜索框输入
changeSearchValue=(e)=>{
this.setState({
search: e.target.value
})
}
// 回车搜索--搜索成功后page为1
searchList=()=>{
let id=this.props.match.params.pathId;
let {search,page}=this.state;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page;
axios.post(url).then((result)=>{
if(result.status==200){
let list=result.data.users;
let optionss=[]
for(var i=0; i<list.length;i++){
optionss.push(list[i].user_id)
}
this.setState({
partnerList:result.data.users,
page:1,
optionss:optionss
})
}
}).catch((error)=>{
console.log(error);
})
}
SaveAddBox=()=>{
let {partnerListid} =this.state;
let id=this.props.match.params.pathId;
let url="/paths/"+id+"/add_subject_members.json"
axios.post(url,{
user_ids:partnerListid
}).then((response) => {
if(response.status==200){
this.setState({
addPartner:false,
optionss:[],
partnerListid:[]
})
this.props.updatadetailInfoLists();
}
}).catch((error) => {
console.log(error)
});
}
addCollaboratorsid=(id)=>{
this.setState({
partnerListid:id
})
}
onCheckAllChange = (e) => {
let {optionss} =this.state;
if(e.target.checked===true){
this.setState({
checkAll: e.target.checked,
partnerListid:optionss
});
}else{
this.setState({
checkAll: e.target.checked,
partnerListid:[]
});
}
}
contentViewScroll=(e)=>{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
let id=this.props.match.params.pathId;
let {search,page,partnerList,optionss}=this.state;
let newpage=page+1;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage;
axios.post(url).then((result)=>{
if(result.status==200){
let list=result.data.users;
let newlist=partnerList;
for(var j=0; j<list.length;j++){
newlist.push(list[j])
}
let newoptionss=optionss
for(var i=0; i<list.length;i++){
newoptionss.push(list[i].user_id)
}
this.setState({
partnerList:newlist,
page:newpage,
optionss:optionss
})
}
}).catch((error)=>{
console.log(error);
})
}
}
render(){
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
return(
<div className="edu-back-white bor-top-greyE addTeamMember">
{
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
:""
}
<Modal
keyboard={false}
title="添加合作者"
visible={addPartner}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox clearfix">
<div className="mb20">
<Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}}
autocomplete="off"
value={search}
onInput={this.changeSearchValue}
onSearch={search => this.searchList(search)} />
</div>
<p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}>
<Checkbox className="fl"
onChange={this.onCheckAllChange}
checked={this.state.checkAll}
></Checkbox>
<span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span>
<span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span>
<span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span>
<span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span>
</p>
<ul className="upload_select_box fl clearfix mb15"
style={{"overflow-y":"auto"}}
id="search_not_members_list"
onScroll={this.contentViewScroll}
>
<CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}>
{
partnerList && partnerList.map((item,key)=>{
return(
<li className="clearfix">
<Checkbox value={item.user_id} key={key} className="fl"></Checkbox>
<a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span>
<span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
</li>
)
})
}
</CheckboxGroup>
</ul>
<div className="mt20 marginauto clearfix edu-txt-center">
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
</div>
</div>
</Modal>
</div>
)
}
}
import React, { Component } from 'react';
import { Modal,Checkbox,Input } from "antd";
import axios from 'axios';
const Search = Input.Search;
const CheckboxGroup = Checkbox.Group;
class addCollaborators extends Component{
constructor(props){
super(props);
this.state = {
addPartner:false,
page:1,
partnerList:undefined,
search:'',
partnerListid:[],
checkAll: false,
optionss:[]
}
}
addBox=()=>{
this.setState({
addPartner:true,
search:"",
page:1,
partnerList:undefined,
optionss:[]
})
this.searchList("")
}
hideAddBox=()=>{
this.setState({
addPartner:false,
optionss:[],
partnerListid:[]
})
}
// 搜索框输入
changeSearchValue=(e)=>{
this.setState({
search: e.target.value
})
}
// 回车搜索--搜索成功后page为1
searchList=()=>{
let id=this.props.match.params.pathId;
let {search,page}=this.state;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page;
axios.post(url).then((result)=>{
if(result.status==200){
let list=result.data.users;
let optionss=[]
for(var i=0; i<list.length;i++){
optionss.push(list[i].user_id)
}
this.setState({
partnerList:result.data.users,
page:1,
optionss:optionss
})
}
}).catch((error)=>{
console.log(error);
})
}
SaveAddBox=()=>{
let {partnerListid} =this.state;
let id=this.props.match.params.pathId;
let url="/paths/"+id+"/add_subject_members.json"
axios.post(url,{
user_ids:partnerListid
}).then((response) => {
if(response.status==200){
this.setState({
addPartner:false,
optionss:[],
partnerListid:[]
})
this.props.updatadetailInfoLists();
}
}).catch((error) => {
console.log(error)
});
}
addCollaboratorsid=(id)=>{
this.setState({
partnerListid:id
})
}
onCheckAllChange = (e) => {
let {optionss} =this.state;
if(e.target.checked===true){
this.setState({
checkAll: e.target.checked,
partnerListid:optionss
});
}else{
this.setState({
checkAll: e.target.checked,
partnerListid:[]
});
}
}
contentViewScroll=(e)=>{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
let id=this.props.match.params.pathId;
let {search,page,partnerList,optionss}=this.state;
let newpage=page+1;
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage;
axios.post(url).then((result)=>{
if(result.status==200){
let list=result.data.users;
let newlist=partnerList;
for(var j=0; j<list.length;j++){
newlist.push(list[j])
}
let newoptionss=optionss
for(var i=0; i<list.length;i++){
newoptionss.push(list[i].user_id)
}
this.setState({
partnerList:newlist,
page:newpage,
optionss:optionss
})
}
}).catch((error)=>{
console.log(error);
})
}
}
render(){
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
return(
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
<div className="edu-back-white bor-top-greyE addTeamMember">
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
<Modal
keyboard={false}
title="添加合作者"
visible={addPartner}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox clearfix">
<div className="mb20">
<Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}}
autocomplete="off"
value={search}
onInput={this.changeSearchValue}
onSearch={search => this.searchList(search)} />
</div>
<p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}>
<Checkbox className="fl"
onChange={this.onCheckAllChange}
checked={this.state.checkAll}
></Checkbox>
<span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span>
<span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span>
<span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span>
<span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span>
</p>
<ul className="upload_select_box fl clearfix mb15"
style={{"overflow-y":"auto"}}
id="search_not_members_list"
onScroll={this.contentViewScroll}
>
<CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}>
{
partnerList && partnerList.map((item,key)=>{
return(
<li className="clearfix">
<Checkbox value={item.user_id} key={key} className="fl"></Checkbox>
<a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span>
<span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
</li>
)
})
}
</CheckboxGroup>
</ul>
<div className="mt20 marginauto clearfix edu-txt-center">
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
</div>
</div>
</Modal>
</div>:""
)
}
}
export default addCollaborators;

@ -27,9 +27,27 @@ class sendPanel extends Component{
//发送至
SentToLesson =() =>{
this.setState({
sentShixunPath:true
})
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
if (result.data.status === 403||result.data.status === 402||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({
sendToCourseList:result.data,
sentShixunPath:true
})
}
}
}).catch((error)=>{
console.log(error);
})
// this.setState({
// sentShixunPath:true
// })
}
//隐藏发送至弹框
hideSenttothevalue =()=>{
@ -99,17 +117,17 @@ class sendPanel extends Component{
}
componentDidMount(){
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
sendToCourseList:result.data
})
}
}).catch((error)=>{
console.log(error);
})
// let id=this.props.detailInfoList.id;
// let url="/paths/"+id+"/choose_course.json";
// axios.get(url).then((result)=>{
// if(result.status==200){
// this.setState({
// sendToCourseList:result.data
// })
// }
// }).catch((error)=>{
// console.log(error);
// })
}
cardsModalcancel=()=>{

@ -14,7 +14,7 @@ class ShixunPathSearch extends Component{
constructor(props) {
super(props)
this.state = {
order:"publish_time",
order:"updated_at",
select:0,
search:"",
page:1,
@ -126,20 +126,20 @@ class ShixunPathSearch extends Component{
</div>
</div>
<div className="mt20 educontent mb20 clearfix">
<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a>
<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>
<a href="javascript:void(0)" className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a>
<a href="javascript:void(0)" className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a>
<div className="fr mr5 search-new">
{/* <Search
placeholder="请输入路径名称进行搜索"
id="subject_search_input"
value={search}
onInput={this.inputSearchValue}
onSearch={this.searchValue}
autoComplete="off"
></Search> */}
</div>
{/*<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a>*/}
{/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a>
<a className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a>
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}
{/*placeholder="请输入路径名称进行搜索"*/}
{/*id="subject_search_input"*/}
{/*value={search}*/}
{/*onInput={this.inputSearchValue}*/}
{/*onSearch={this.searchValue}*/}
{/*autoComplete="off"*/}
{/*></Search> *!/*/}
{/*</div>*/}
</div>
<PathCard {...this.props} {...this.state}></PathCard>
{

@ -204,14 +204,14 @@ class PackageConcent extends Component {
<div className="educontent clearfix mtf10" style={{flex: "1 0 auto"}}>
{isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
<div className="stud-class-set">
<div className="news">

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
// /images/educoder/icon/search.svg
import { getImageUrl, toPath } from 'educoder'
import { getImageUrl, toPath ,trigger,broadcastChannelPostMessage} from 'educoder'
import axios from 'axios';
@ -30,8 +30,6 @@ import 'antd/lib/input/style/index.css';
import './TPMIndex.css';
import { trigger, broadcastChannelPostMessage } from 'educoder';
const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用
@ -316,6 +314,7 @@ class NewHeader extends Component {
// this.setState({
// isRender:true
// })
broadcastChannelPostMessage('refreshPage')
window.location.href = "/";
}
}).catch((error) => {
@ -649,7 +648,7 @@ submittojoinclass=(value)=>{
return (
<div className="newHeader" id="nHeader" >
<div className="newHeaders" id="nHeader" >
{isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()}
@ -659,10 +658,10 @@ submittojoinclass=(value)=>{
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
<a href="/" className={"fl mr60 ml25"}>
<a href="/" className={"fl mr60 ml25 mt15"}>
<img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
</a>
@ -806,11 +805,11 @@ submittojoinclass=(value)=>{
<%= link_to '注册', user_join_path, :className => "ml5" %>
</span>*/}
{ user===undefined?
<span className="font-15 fr mt17 ml10 mr25">
<span className="font-15 fr mt17 ml5 mr25">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a>
</span> :user.login===""?<span className="font-15 fr mt17 ml20 mr25">
</span> :user.login===""?<span className="font-15 fr mt17 ml5 mr25">
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
<em className="vertical-line"></em>
<a href={"/register"} className="mr5 color-white">注册</a>
@ -881,9 +880,9 @@ submittojoinclass=(value)=>{
/>:""}
{/* /courses/join_course_multi_role */}
{/*<li>*/}
<li>
<a onClick={this.tojoinitem}>加入项目</a>
{/*</li>*/}
</li>
{tojoinitemtype===true?<Modal
keyboard={false}
title="加入项目"

@ -172,7 +172,17 @@ class TPMBanner extends Component {
* 发送至按钮
* */
Senttothe=()=>{
let id = this.props.match.params.shixunId;
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({
Senttothetype:true
@ -384,6 +394,11 @@ class TPMBanner extends Component {
//开始实战按钮
startshixunCombat=(id, reset)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
@ -471,7 +486,22 @@ class TPMBanner extends Component {
})
}
render() {
showonMouseOver=()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
}
hideonMouseOut=()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
}
render() {
let {
Forkvisible,
Senttothetype,
@ -541,21 +571,6 @@ class TPMBanner extends Component {
// }
// }
// }
$("#commentsStar").hover(()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
},()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
})
const radioStyle = {
display: 'block',
height: '30px',
@ -571,8 +586,8 @@ class TPMBanner extends Component {
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
@ -617,12 +632,12 @@ class TPMBanner extends Component {
</li>
</ul>
<div className="pr fl" id="commentsStar">
<div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
<div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/>
</div>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}}>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div className="pr">
<span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
@ -638,7 +653,7 @@ class TPMBanner extends Component {
</div>
</div>
</div>
<div className="fr">
<div className="fr width360">
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
@ -900,18 +915,25 @@ class TPMBanner extends Component {
</div>
</div>
{this.state.Senttothevcaluetype===true?<div className={"color-red"}>请选择你要发送的课堂</div>:""}
<div className="mt10 marginauto">
<Pagination size="small" style={{display: courses_count > 12 ? "block" : "none"}}
<div className="mt10 marginauto" style={{display: courses_count > 12 ? "block" : "none"}}>
<Pagination size="small" className="mb20"
showQuickJumper defaultCurrent={1} current={pages} pageSize={12}
total={courses_count} onChange={this.onChangesendeSenttothe}/>
</div>
<a className="task-btn task-btn-orange fr margin-tp26"
onClick={this.sendeSenttothevcalue}
id="submit_send_shixun">确定</a>
<div className="mt10 marginauto flexbannerright">
<div className={"-flex"}></div>
<div className={"-flex"}></div>
<div className={"-flex"}>
<a onClick={this.hideSenttothevcalue}
className="pop_close task-btn mr10 ml25 margin-tp26">取消</a>
<a className="task-btn task-btn-orange margin-tp26"
onClick={this.sendeSenttothevcalue}
id="submit_send_shixun">确定</a>
</div>
<a onClick={this.hideSenttothevcalue}
className="pop_close task-btn fr mr10 margin-tp26">取消</a>
</div>
</div>
</div>
</div>

@ -10,6 +10,8 @@ import axios from 'axios';
import './TPMIndex.css'
import LoginDialog from '../login/LoginDialog';
import AccountProfile from '../user/AccountProfile';
import Trialapplication from "../login/Trialapplication";
// import "antd/dist/antd.css";
// import '../../css/educoder/edu-common.css'
@ -33,14 +35,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?7`));
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?7`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`));
// index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?7`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')
@ -76,7 +78,8 @@ export function TPMIndexHOC(WrappedComponent) {
Footerdown:undefined,
coursedata: {},
isRender: false
isRender: false,
AccountProfiletype: false
}
}
@ -300,11 +303,26 @@ export function TPMIndexHOC(WrappedComponent) {
isRender: true
})
}
checkIfLogin = () => {
return this.state.current_user && this.state.current_user.login != ''
}
hideAccountProfile = () => {
this.setState({
AccountProfiletype: false
})
}
showProfileCompleteDialog = () => {
this.setState({
AccountProfiletype: true
})
}
checkIfProfileCompleted = () => {
return this.state.current_user && this.state.current_user.profile_completed
}
render() {
let{Headertop,Footerdown, isRender}=this.state;
let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state;
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
@ -319,14 +337,21 @@ export function TPMIndexHOC(WrappedComponent) {
showLoginDialog: this.showLoginDialog,
checkIfLogin: this.checkIfLogin,
showProfileCompleteDialog: this.showProfileCompleteDialog,
checkIfProfileCompleted: this.checkIfProfileCompleted,
}
return (
<div>
{isRender===true ? <LoginDialog
Modifyloginvalue={()=>this.hideLoginDialog()}
{...this.state}
{...this.props}
{...this.state}
/> : ""}
{AccountProfiletype===true ? <AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<SiderBar Headertop={Headertop}/>
{/* 注释掉了1440 影响到了手机屏幕的展示 */}
<style>{
@ -336,7 +361,16 @@ export function TPMIndexHOC(WrappedComponent) {
max-width: unset;
overflow: hidden;
}
.newHeaders{
max-width: unset;
background: #24292D !important;
width: 100%;
height: 60px !important;
min-width: 1200px;
z-index: 1000;
-moz-box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
}
`
}</style>
<NewHeader {...this.state} {...this.props}></NewHeader>

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor';
//MonacoDiffEditor 对比模式
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb} from 'antd';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification} from 'antd';
// import "antd/dist/antd.css";
@ -15,7 +15,7 @@ import axios from 'axios';
import './css/TPMsettings.css';
import { getImageUrl, toPath, getUrl } from 'educoder';
import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll} from 'educoder';
let origin = getUrl();
@ -30,7 +30,7 @@ let currentValue;
const Option = Select.Option;
const RadioGroup = Radio.Group;
const confirm = Modal.confirm;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
@ -207,6 +207,7 @@ export default class TPMsettings extends Component {
constructor(props) {
super(props)
this.state = {
fileList: [],
commandLine: 0,
Openpublic: 0,
settingsData: undefined,
@ -268,7 +269,8 @@ export default class TPMsettings extends Component {
pod_exist_time: undefined,
pod_exist_timetype: false,
shixunmemoMDvalue:"",
language:""
language:"",
deleteisnot:true
}
}
descriptionMD=(initValue, id)=> {
@ -1011,32 +1013,168 @@ export default class TPMsettings extends Component {
})
}
sendsure_apply = () => {
let {sendsure_applyvalue} = this.state;
let url = "/shixuns/apply_shixun_mirror.json";
axios.post(url, {
note: sendsure_applyvalue
}).then((response) => {
if (response.status === 200) {
if (response.data.status == 1) {
this.setState({
postapplyvisible: false,
postapplytitle: true
})
}
setlanguagewrite = (e)=>{
this.setState({
languagewrite: e.target.value
})
}
}
}).catch((error) => {
console.log(error)
});
setsystemenvironment = (e) => {
this.setState({
systemenvironment: e.target.value
})
}
}
settestcoderunmode = (e) => {
this.setState({
testcoderunmode: e.target.value
})
sendhideModaly = () => {
this.setState({
postapplyvisible: false
})
}
}
sendsure_apply = () => {
let {languagewrite,systemenvironment,testcoderunmode} = this.state;
// console.log("点击确定")
// console.log("languagewrite"+languagewrite);
// console.log("systemenvironment"+systemenvironment);
// console.log("testcoderunmode"+testcoderunmode);
// let attachment_ids = undefined
// if (this.state.fileList) {
// attachment_ids = this.state.fileList.map(item => {
// return item.response ? item.response.id : item.id
// })
// }
if(languagewrite === undefined || languagewrite === "" ){
// this.props.showNotification(`请填写该镜像是基于什么语言`);
this.setState({
languagewritetype:true
})
return
}
if(systemenvironment === undefined || systemenvironment === ""){
// this.props.showNotification(`请填写该镜像是基于什么语言系统环境`);
this.setState({
systemenvironmenttype:true
})
return;
}
if(testcoderunmode === undefined || testcoderunmode === "") {
// this.props.showNotification(`请填写该镜像中测试代码运行方式`);
this.setState({
testcoderunmodetype:true
})
return;
}
var attachment_ids=undefined;
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
}
if( attachment_ids === undefined || attachment_ids.length===0){
// notification.open(
// {
// message: '提示',
// description:
// '请上传附件!',
//
// }
// )
this.setState({
attachmentidstype:true
})
return;
}
// console.log("attachment_ids"+attachment_ids);
// alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids);
var data={
language:languagewrite,
runtime:systemenvironment,
run_method:testcoderunmode,
attachment_id:attachment_ids[0],
}
var url =`/shixuns/apply_shixun_mirror.json`;
axios.post(url,data
).then((response) => {
try {
if (response.data) {
// const { id } = response.data;
// if (id) {
if(this.state.file !== undefined){
console.log("549");
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
// this.props.showNotification('提交成功!');
notification.open(
{
message: '提示',
description:
'提交成功!',
}
)
this.sendhideModaly()
// this.props.history.push(`/courses/${cid}/graduation_topics`);
// }
}
}catch (e) {
}
})
}
sendhideModaly = () => {
this.setState({
postapplyvisible: false,
})
if(this.state.file !== undefined){
console.log("580");
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
}
yeshidemodel = () => {
this.setState({
@ -1198,29 +1336,80 @@ export default class TPMsettings extends Component {
})
}
handleChange = (info) => {
console.log("handleChange1");
let {fileList}=this.state;
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false});
}
}
onAttachmentRemove = (file) => {
confirm({
title: '确定要删除这个附件吗?',
okText: '确定',
cancelText: '取消',
// content: 'Some descriptions',
onOk: () => {
console.log("665")
this.deleteAttachment(file)
},
onCancel() {
console.log('Cancel');
},
});
return false;
}
deleteAttachment = (file) => {
console.log(file);
let id=file.response ==undefined ? file.id : file.response.id
const url = `/attachments/${id}.json`
axios.delete(url, {
})
.then((response) => {
if (response.data) {
const { status } = response.data;
if (status == 0) {
// console.log('--- success')
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
deleteisnot:true
};
});
}
}
})
.catch(function (error) {
console.log(error);
});
}
render() {
render() {
let {
postapplyvisible,
sendsure_applyvalue,
postapplytitle,
shixunnametype,
shixunmaintype,
evaluate_scripttype,
exec_timetype,
traineetype,
standard_scripts,
description,
evaluate_script,
name,
settingsData,
webssh,
use_scope,
shixunsstatus,
shixunsID,
exec_time,
pod_exist_time,
pod_exist_timetype,
can_copy,
choice_standard_scripts,
Executiveordervalue,
@ -1241,19 +1430,15 @@ export default class TPMsettings extends Component {
standard_scriptsModal,
standard_scriptsModals,
SelectTheCommandtype,
status,
opers,
operss,
opersss,
testscripttiptype,
operateshixunstype,
opening_time,
opensmail,
scope_partmenttype,
newuse_scope,
scope_partments,
shixunmemoMDvalue,delType,
shixun_service_configs
shixun_service_configs,
fileList,
} = this.state;
let options;
@ -1265,7 +1450,45 @@ export default class TPMsettings extends Component {
)
})
}
const uploadProps = {
width: 600,
fileList,
multiple: true,
// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange,
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
// console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 50;
if (!isLt150M) {
// this.props.showNotification(`文件大小必须小于50MB`);
notification.open(
{
message: '提示',
description:
'文件大小必须小于50MB',
}
)
}
if(this.state.file !== undefined){
console.log("763")
this.setState({
file:file
})
}else {
this.setState({
file:file
})
}
console.log("handleChange2");
return isLt150M;
},
}
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
@ -1391,13 +1614,13 @@ export default class TPMsettings extends Component {
})
}
</Select>
{/*<p*/}
{/*className="edu-txt-left font-12"*/}
{/*style={{display:operateauthority?"block":'none'}}*/}
{/*>*/}
{/*列表中没有?*/}
{/*<a className="color-blue" onClick={this.post_apply}>申请新建</a>*/}
{/*</p>*/}
<p
className="edu-txt-left font-12"
style={{display:operateauthority?"block":'none'}}
>
列表中没有
<a className="color-blue" onClick={this.post_apply}>申请新建</a>
</p>
<Modal
keyboard={false}
@ -1405,26 +1628,75 @@ export default class TPMsettings extends Component {
visible={postapplyvisible}
closable={false}
footer={null}
width={850}
heigth={720}
>
<div>
<li className="clearfix mb15">
<label className="panel-form-label fl"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<li className="clearfix ml82" >
<label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150"
style={{width:'100%'}}
onInput={this.sendsure_applyvalues}
value={sendsure_applyvalue}
placeholder="请输入新增镜像需要安装的软件及版本等信息" id="demand_info"></textarea>
style={{width:'89%',height:'100px'}}
onInput={this.setlanguagewrite}
value={this.state.languagewrite}
placeholder="请填写该镜像是基于什么语言示例Python"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix ml1">
<label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 "
onInput={this.setsystemenvironment}
style={{height:'100px'}}
value={this.state.systemenvironment}
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}</div>
<li className="clearfix">
<label className="fl mt10" ><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 "
onInput={this.settestcoderunmode}
value={this.state.testcoderunmode}
style={{height:'100px'}}
placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}</div>
<li className="clearfix ml50">
<label className="panel-form-label fl mt-5"><span
className="color-red fl">*</span>&nbsp;&nbsp;</label>
<div className="mt10" style={{
display: "inline-block"
}}>
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
</div>
</li>
<div className={"color-red shixunspanred"}>
{this.state.attachmentidstype===true?"请上传附件":""}
</div>
<li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30"
onClick={() => this.sendhideModaly()}
>取消</a>
<Button type="primary" onClick={()=>this.sendsure_apply()}
className="task-btn task-btn-orange">确定</Button>
</li>
<a onClick={() => this.sendsure_apply()}
className="task-btn task-btn-orange fr mr12">确定</a>
<a className="pop_close task-btn fr mr10"
onClick={() => this.sendhideModaly()}
>取消</a>
<div className="cl"></div>
</div>
</Modal>
<Modal
keyboard={false}
title="提示"

@ -100,4 +100,14 @@ a.newuse_scope-btn {
.shixunmemoMDdiv{
width: 99%;
height: 615px;
}
}
.shixunspanred{
margin-left: 142px;
margin-top: 5px;
margin-bottom: 5px;
}
.ml82{
margin-left:82px;
}

@ -178,7 +178,9 @@ export default class TPMchallengesnew extends Component {
}
CreatePracticesend = () => {
this.setState({
this.setState({
CreatePracticesendtype:true
})
@ -237,17 +239,18 @@ export default class TPMchallengesnew extends Component {
exec_time:exec_time
}).then((response) => {
if (response.data.status === 1) {
$("html").animate({ scrollTop: 0 })
// $("html").animate({ scrollTop: 0 })
this.setState({
setopen: true,
CreatePracticesendtype:false,
tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",
tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3",
})
window.location.href=`/shixuns/${id}/challenges/${response.data.challenge_id}/editcheckpoint`;
// this.setState({
// setopen: true,
// CreatePracticesendtype:false,
// tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",
// tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3",
// })
}
this.props.showSnackbar(response.data.messages);
// this.props.showSnackbar(response.data.messages);
}).catch((error) => {
console.log(error)
});

@ -124,7 +124,8 @@ export default class TPMevaluation extends Component {
handpathopt:false,
scorevalue:false,
markvalue:true,
scoretype:undefined
scoretype:undefined,
web_route:null
}
}
@ -215,6 +216,8 @@ export default class TPMevaluation extends Component {
position: response.data.position, //int 关卡位置,导航栏中的第几关
scorevalue:response.data.test_set_score,
markvalue:response.data.test_set_average,
web_route:response.data.web_route,
has_web_route:response.data.has_web_route
})
this.evaluationoninputvalueonload();
if(response.data.power===false){
@ -579,7 +582,7 @@ export default class TPMevaluation extends Component {
$('textarea[autoHeight]').autoHeight();
}
submitarbitrationevaluation=()=>{
let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue}=this.state;
let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue,web_route}=this.state;
let newscorevalue;
@ -647,7 +650,8 @@ export default class TPMevaluation extends Component {
expect_picture_path:shixunfilestandardpicturepath,
picture_path:shixunfilepicturepath,
test_set_score:newscorevalue,
test_set_average:markvalue
test_set_average:markvalue,
web_route:web_route===null?undefined:web_route
},
test_set:evaluationlist
}
@ -741,6 +745,12 @@ export default class TPMevaluation extends Component {
});
}
updatewebroute=(e)=>{
this.setState({
web_route:e.target.value
})
}
render() {
let {
@ -768,10 +778,11 @@ export default class TPMevaluation extends Component {
next_challenge,
StudentTaskPapers,
StudentTaskDocs,
handpathopt,
web_route,
scorevalue,
markvalue,
scoretype
scoretype,
has_web_route
} = this.state;
let tab1url="/shixuns/" + shixunId + "/challenges/"+checkpointId+"/editcheckpoint";
@ -978,6 +989,20 @@ export default class TPMevaluation extends Component {
</div>
</div>
{pathoptionvalue===4&&web_route!=null||pathoptionvalue===4&&has_web_route===true?<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">Web路由</p>
<div className="df">
<div className="flex1 mr20">
<input type="text" className="input-100-45 change" autoComplete="off"
id="shixun_file_picture_path" name="challenge[picture_path]"
value={web_route}
onInput={(e)=>this.updatewebroute(e)}
placeholder="网站类型实训请填写Web路由地址。例java/mypage"/>
</div>
</div>
</div>
</div>:""}
{pathoptionvalue===1||pathoptionvalue===5||pathoptionvalue===6?<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder';
import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -635,16 +635,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
// this.props.showNotification('提交成功!');
@ -676,16 +680,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}else {
this.setState({
file:undefined,
deleteisnot:true,
languagewrite:"",
systemenvironment:"",
testcoderunmode:"",
fileList:[]
})
}
}
@ -752,10 +760,16 @@ class Newshixuns extends Component {
// 附件相关 START
handleChange = (info) => {
let {fileList}=this.state;
console.log("handleChange1");
let fileList = info.fileList;
this.setState({ fileList:fileList,
deleteisnot:false});
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false});
}
}
onAttachmentRemove = (file) => {
confirm({
@ -837,7 +851,6 @@ class Newshixuns extends Component {
}
render() {
const { getFieldDecorator } = this.props.form;
const thiss=this;
let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state;
let options
if (departmentslist != undefined) {
@ -871,14 +884,13 @@ class Newshixuns extends Component {
}
)
}
if(thiss.state.file !== undefined){
if(this.state.file !== undefined){
console.log("763")
// thiss.deleteAttachment(thiss.state.file);
thiss.setState({
this.setState({
file:file
})
}else {
thiss.setState({
this.setState({
file:file
})
}
@ -1004,7 +1016,7 @@ class Newshixuns extends Component {
>
{/*<Form onSubmit={this.handleSubmit}>*/}
<div>
<li className="clearfix ml85" >
<li className="clearfix ml82" >
<label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150"
@ -1015,7 +1027,7 @@ class Newshixuns extends Component {
id="demand_info"></textarea>
</li>
<div className={"color-red shixunspanred"}>{this.state.languagewritetype===true?"请填写该镜像语言":""}</div>
<li className="clearfix">
<li className="clearfix ml1">
<label className="panel-form-label fl ml50"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 "
@ -1044,32 +1056,12 @@ class Newshixuns extends Component {
<div className="mt10" style={{
display: "inline-block"
}}>
{/*<Form.Item>*/}
{/* {*/}
{/* getFieldDecorator('file',{*/}
{/* rules:[{*/}
{/* }]*/}
{/* })(*/}
{
deleteisnot=== true?
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
{/* )*/}
{/* }*/}
{/*</Form.Item>*/}
<Upload {...uploadProps}>
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
</div>
</li>
@ -1088,6 +1080,8 @@ class Newshixuns extends Component {
{/*</Form>*/}
</Modal>
<Modal
keyboard={false}
title="提示"

@ -382,3 +382,6 @@ a.white-btn.use_scope-btn:hover{
margin-bottom: 5px;
}
.ml82{
margin-left: 82px;
}

@ -220,6 +220,13 @@ class Challenges extends Component {
//开始实战按钮
startshixunCombat = (type, ids, id) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
@ -227,7 +234,7 @@ class Challenges extends Component {
return
}
debugger
let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId;
this.setState({
@ -299,8 +306,8 @@ class Challenges extends Component {
<React.Fragment>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
{...this.state}
/>:""}
{loadingContent ?

@ -1,251 +1,253 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route} from "react-router-dom";
import { Switch ,Input,Tooltip,Icon} from 'antd';
import PropTypes from 'prop-types';
import classNames from 'classnames'
import 'antd/lib/switch/style/index.css'
import './shixunCss/ShixunCardList.css';
import { on, off } from 'educoder'
const $ = window.$;
const Search = Input.Search;
class ShixunCardList extends Component {
constructor(props) {
super(props);
this.state={
allevent:"desc",
mine:0,
InputValue: props.keyword || "",
typemy:0,
hots:0,
news:0,
shixunid:"",
upcircle:false,
typekeyid:undefined,
}
}
componentDidUpdate = (prevProps, prevState) => {
if (this.props.keyword != prevProps.keyword) {
this.setState({
InputValue: this.props.keyword
})
}
}
componentDidMount = () => {
on('searchKeywordChange', (event, data) => {
// console.log(data)
this.Input_search(data)
})
}
componentWillUnmount = () => {
off('searchKeywordChange')
}
latestHot=(e,key)=>{
let{upcircle,typekeyid}=this.state;
let id = e.target.id;
$("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active");
let type;
if(id==="all"){
type="publish_time";
}
if(id==="hot"){
type="hot";
}else if(id==="new"){
type="new";
}
if(typekeyid===key){
if(upcircle===true){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(upcircle===false){
this.setState({
upcircle:true,
})
this.props.Shixunsupcircles("asc")
}
}else{
this.setState({
typekeyid:key
})
}
//allevent
this.props.ShixunsState(false,type);
}
onSwitchChange=(e,key)=>{
let id=e.target.id
$("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active");
let {typemy,upcircle,typekeyid}=this.state;
if(typekeyid===key){
if(upcircle===true){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(upcircle===false){
this.setState({
upcircle:true
})
this.props.Shixunsupcircles("asc")
}
}else{
this.setState({
typekeyid:key
})
}
if(typemy===0){
this.setState({
typemy:1
})
}else{
this.setState({
typemy:0
})
}
// allevent
this.props.ShixunsSwitch();
}
//输入框搜索
Input_search = (value) => {
this.setState({
InputValue: value
})
this.props.OnSearchInput(value,true);
}
Input_searchs = (e) => {
this.setState({
InputValue: e.target.value
})
this.props.OnSearchInput(e.target.value,false);
}
upcircles=(val)=>{
if(val==="asc"){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(val==="desc"){
this.setState({
upcircle:true
})
this.props.Shixunsupcircles("asc")
}
}
render(){
let {mine,InputValue,upcircle}=this.state;
return (
<div className="educontent mt20">
<div className="clearfix">
<div className="fl mr20 font-16 bestChoose shixun_repertoire active"
id={"all"}
onClick={(e)=>this.latestHot(e,1)}>全部
</div>
<div className="fl mr20 font-16 bestChoose shixun_repertoire"
id={mine}
onClick={(e)=>this.onSwitchChange(e,2)}>我的
</div>
<div className="fl mr20 font-16 bestChoose shixun_repertoire"
id="hot"
onClick={(e)=>this.latestHot(e,3)}>最热
</div>
<div className="fl font-16 bestChoose shixun_repertoire"
id="new"
onClick={(e)=>this.latestHot(e,4)}>最新
</div>
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"
style={{display:upcircle===true?"block":"none"}}
// onClick={()=>this.upcircles("asc")}
>
<Tooltip placement="bottom" title={"升序"}>
<Icon type="up-circle" theme="twoTone" />
{/*<Icon type="sort-descending" />*/}
</Tooltip>
</div>
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"
// onClick={()=>this.upcircles("desc")}
style={{display:upcircle===true?"none":"block"}}
>
<Tooltip placement="bottom" title={"降序"}>
<Icon type="down-circle" theme="twoTone" />
{/*<Icon type="sort-ascending" />*/}
</Tooltip>
</div>
<div className="fr mt3">
{/*<Search*/}
{/*style={{ width: 300 }}*/}
{/*className="search-new-input fl"*/}
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
{/*value={InputValue}*/}
{/*onInput={this.Input_searchs}*/}
{/*onSearch={value => this.Input_search(value)}*/}
{/*enterButton*/}
{/*/>*/}
{/* <Search
style={{ width: 300 }}
className="fl"
placeholder="请输入创建者/实训/关卡名称进行搜索"
value={InputValue}
onInput={this.Input_searchs}
onSearch={value => this.Input_search(value)}
autoComplete="off"
></Search> */}
</div>
<div className="fr">
<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{
this.props.search_tags === null ? "" : this.props.search_tags
}</span>
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
{/*/!* <div className="controlblue"></div>*/}
{/*<span className="controlring"></span> *!/*/}
{/*<Switch*/}
{/*className="controlbtn mr10 mt10 pr"*/}
{/*size="small"*/}
{/*style={{marginTop:'1px'}}*/}
{/*onChange={this.onSwitchChange}*/}
{/*/>*/}
{/*</div>*/}
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
</div>
<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>
</div>
</div>
);
}
}
export default ShixunCardList;
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route} from "react-router-dom";
import { Switch ,Input,Tooltip,Icon} from 'antd';
import PropTypes from 'prop-types';
import classNames from 'classnames'
import 'antd/lib/switch/style/index.css'
import './shixunCss/ShixunCardList.css';
import { on, off } from 'educoder'
const $ = window.$;
const Search = Input.Search;
class ShixunCardList extends Component {
constructor(props) {
super(props);
this.state={
allevent:"desc",
mine:0,
InputValue: props.keyword || "",
typemy:0,
hots:0,
news:0,
shixunid:"",
upcircle:false,
typekeyid:undefined,
}
}
componentDidUpdate = (prevProps, prevState) => {
if (this.props.keyword != prevProps.keyword) {
this.setState({
InputValue: this.props.keyword
})
}
}
componentDidMount = () => {
on('searchKeywordChange', (event, data) => {
// console.log(data)
this.Input_search(data)
})
}
componentWillUnmount = () => {
off('searchKeywordChange')
}
latestHot=(e,key)=>{
let{upcircle,typekeyid}=this.state;
let id = e.target.id;
$("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active");
let type;
// if(id==="all"){
// type="publish_time";
// }
if(id==="hot"){
type="hot";
}else if(id==="new"){
type="new";
}
if(typekeyid===key){
if(upcircle===true){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(upcircle===false){
this.setState({
upcircle:true,
})
this.props.Shixunsupcircles("asc")
}
}else{
this.setState({
typekeyid:key
})
}
//allevent
this.props.ShixunsState(false,type);
}
onSwitchChange=(e,key)=>{
let id=e.target.id
$("#"+id).siblings().removeClass("active");
$("#"+id).addClass("active");
let {typemy,upcircle,typekeyid}=this.state;
if(typekeyid===key){
if(upcircle===true){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(upcircle===false){
this.setState({
upcircle:true
})
this.props.Shixunsupcircles("asc")
}
}else{
this.setState({
typekeyid:key
})
}
if(typemy===0){
this.setState({
typemy:1
})
}else{
this.setState({
typemy:0
})
}
// allevent
this.props.ShixunsSwitch();
}
//输入框搜索
Input_search = (value) => {
this.setState({
InputValue: value
})
this.props.OnSearchInput(value,true);
}
Input_searchs = (e) => {
this.setState({
InputValue: e.target.value
})
this.props.OnSearchInput(e.target.value,false);
}
upcircles=(val)=>{
if(val==="asc"){
this.setState({
upcircle:false,
})
this.props.Shixunsupcircles("desc")
}else if(val==="desc"){
this.setState({
upcircle:true
})
this.props.Shixunsupcircles("asc")
}
}
render(){
let {mine,InputValue,upcircle}=this.state;
return (
<div className="educontent mt20">
<div className="clearfix">
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire active"*/}
{/*id={"all"}*/}
{/*onClick={(e)=>this.latestHot(e,1)}>全部*/}
{/*</div>*/}
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire"*/}
{/*id={mine}*/}
{/*onClick={(e)=>this.onSwitchChange(e,2)}>我的*/}
{/*</div>*/}
<div className="fl mr20 font-16 bestChoose shixun_repertoire active"
id="new"
onClick={(e)=>this.latestHot(e,4)}>最新
</div>
<div className="fl font-16 bestChoose shixun_repertoire"
id="hot"
onClick={(e)=>this.latestHot(e,3)}>最热
</div>
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
{/*style={{display:upcircle===true?"block":"none"}}*/}
{/*// onClick={()=>this.upcircles("asc")}*/}
{/*>*/}
{/*<Tooltip placement="bottom" title={"升序"}>*/}
{/*<Icon type="up-circle" theme="twoTone" />*/}
{/*/!*<Icon type="sort-descending" />*!/*/}
{/*</Tooltip>*/}
{/*</div>*/}
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
{/*// onClick={()=>this.upcircles("desc")}*/}
{/*style={{display:upcircle===true?"none":"block"}}*/}
{/*>*/}
{/*<Tooltip placement="bottom" title={"降序"}>*/}
{/*<Icon type="down-circle" theme="twoTone" />*/}
{/*/!*<Icon type="sort-ascending" />*!/*/}
{/*</Tooltip>*/}
{/*</div>*/}
{/*<div className="fr mt3">*/}
{/*<Search*/}
{/*style={{ width: 300 }}*/}
{/*className="search-new-input fl"*/}
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
{/*value={InputValue}*/}
{/*onInput={this.Input_searchs}*/}
{/*onSearch={value => this.Input_search(value)}*/}
{/*enterButton*/}
{/*/>*/}
{/* <Search
style={{ width: 300 }}
className="fl"
placeholder="请输入创建者/实训/关卡名称进行搜索"
value={InputValue}
onInput={this.Input_searchs}
onSearch={value => this.Input_search(value)}
autoComplete="off"
></Search> */}
{/*</div>*/}
{/*<div className="fr">*/}
{/*<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{*/}
{/*this.props.search_tags === null ? "" : this.props.search_tags*/}
{/*}</span>*/}
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
{/*/!* <div className="controlblue"></div>*/}
{/*<span className="controlring"></span> *!/*/}
{/*<Switch*/}
{/*className="controlbtn mr10 mt10 pr"*/}
{/*size="small"*/}
{/*style={{marginTop:'1px'}}*/}
{/*onChange={this.onSwitchChange}*/}
{/*/>*/}
{/*</div>*/}
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
{/*</div>*/}
{/*<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>*/}
</div>
</div>
);
}
}
export default ShixunCardList;

@ -28,7 +28,7 @@ class ShixunsIndex extends Component {
constructor(props) {
super(props)
this.state={
order_by: "publish_time",
order_by: "new",
page:1,
limit:16,
keyword:"",
@ -115,10 +115,9 @@ class ShixunsIndex extends Component {
}
allUpdatashixunlist=()=>{
let{sort}=this.state;
let{sort,order_by}=this.state;
this.setState({
order_by: 'publish_time',
tag_level: 1,
tag_id:'',
page: 1,
@ -129,7 +128,7 @@ class ShixunsIndex extends Component {
})
let params={
order_by: 'publish_time',
order_by:order_by,
tag_level: 1,
tag_id:'',
page: 1,
@ -379,7 +378,7 @@ class ShixunsIndex extends Component {
render() {
let {middleshixundata, typepvisible, pages, search_tags, keyword,parsedid,newtag_level,newpalce} = this.state;
console.log(this.state.updata)
// console.log(this.state.updata)
return (
<div className="newMain clearfix backFAFAFA">
{this.state.updata===undefined?"":<UpgradeModals

@ -84,11 +84,13 @@ a:active{text-decoration:none;}
.height39 {
height: 39px !important;
}
#commentsStar{
margin-top: -7px;
width: 90px;
height: 80px;
}
.startbtnModal .ant-modal-content{
background: transparent;
box-shadow: 0 4px 12px transparent;
@ -100,4 +102,13 @@ a:active{text-decoration:none;}
.mr51{
margin-right:51px;
}
.flexbannerright{
display: flex;
justify-content: flex-end;
}
.width360{
width:360px;
}

@ -342,16 +342,14 @@ class Infos extends Component{
is_current ?
<div className="inline">
{
data && data.can_apply_trial == false ?
data.attendance_signed ?
<React.Fragment>
<span className="user_default_btn user_grey_btn mb5">已签到</span>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
</React.Fragment>
:
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
data && data.attendance_signed ?
<React.Fragment>
<span className="user_default_btn user_grey_btn mb5">已签到</span>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
</React.Fragment>
:
<a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
// <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
}
</div>
:

@ -13,10 +13,10 @@ class SearchPage extends Component{
constructor(props) {
super(props);
this.state={
tab:"0",
tab:"1",
count:0,
keywords:undefined,
type:"shixun",
type:"subject",
page:1,
perpages:20,
data:[],
@ -25,7 +25,7 @@ class SearchPage extends Component{
}
//切换tab
changeTab=(e)=>{
// course 课堂, shixun 开发社区 subject 实践课程 memo 交流问答
let types ="";
if(parseInt(e.key)===0){
@ -247,8 +247,20 @@ class SearchPage extends Component{
})
}
</div>
<div>
{/*合作单位*/}
{item.content.member_user_names === undefined || item.content.member_user_names===0?"": item.content.member_user_names.map((item7, key7) => {
return (
<div className={"df"}>
<span style={{flex: '0 0 82px'}}>合作团队</span>
<span className={key7>1?" tzbq ":" tzbqx"}
dangerouslySetInnerHTML={{__html:item7}} />
</div>
)
})
}
</div>
<div className="mt20">
{/* <span className="ziticor">

@ -98,7 +98,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
/*块状列表*/
.square-list{width: 100%;box-sizing: border-box;margin-top:20px}
.square-Item{position: relative;width:280px;margin-right: 26px;margin-bottom: 26px;float: left;border-radius: 6px;background-color:#fff;box-shadow: 0px 0px 12px rgba(0,0,0,0.1); }
.square-Item:hover{bottom: 3px; box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover{
/*bottom: 3px; */
box-shadow: 0px 0px 12px rgba(0,0,0,0.3);}
.square-Item:hover .closeSquare{display: block}
.square-Item:nth-child(4n+0){margin-right: 0px;}
.square-Item .square-img{display: block;width: 100%}

@ -169,7 +169,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/
.newMain{ padding-bottom: 120px !important; }
/*高度*/

Loading…
Cancel
Save