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

chromesetting
jingquan huang 5 years ago
commit f5ee83dde2

@ -768,7 +768,7 @@ class GamesController < ApplicationController
# REDO:需要添加详细的说明
def cost_time
#return if @game.status >= 2
cost_time = (params[:time].to_i < 0 ? 0 : params[:time].to_i) + @game.cost_time.to_i
cost_time = params[:time].to_i < @game.cost_time.to_i ? (@game.cost_time.to_i + params[:time].to_i) : params[:time].to_i
@game.update_attribute(:cost_time, cost_time)
end

@ -625,14 +625,12 @@ class HomeworkCommonsController < ApplicationController
@homework.score_open = params[:score_open]
@homework.save!
# if score_change
# @homework.student_works.has_committed.each do |student_work|
# HomeworksService.new.set_shixun_final_score student_work
# end
# end
if score_change && @homework.end_or_late_none_group
UpdateShixunWorkScoreJob.perform_now(@homework.id)
end
# 更新所有学生的效率分(作业允许补交且补交已截止 或者 作业不允许补交且提交已截止)
if update_eff_score && @homework.end_or_late_none_group
if !score_change && update_eff_score && @homework.end_or_late_none_group
HomeworksService.new.update_student_eff_score HomeworkCommon.find_by(id: @homework.id)
end

@ -0,0 +1,10 @@
class UpdateShixunWorkScoreJob < ApplicationJob
queue_as :default
def perform(homework_id)
homework = HomeworkCommon.find_by(id: homework_id)
return if homework.blank?
homework.update_homework_work_score
end
end

@ -39,7 +39,7 @@ module Searchable::Shixun
end
def should_index?
[0, 1, 2].include?(status) # published
!hidden? && [0, 1, 2].include?(status) # published
end
def to_searchable_json

@ -111,14 +111,14 @@ class StudentWork < ApplicationRecord
# 作品总体评价
def overall_appraisal
case self.work_score.to_i
when (90..100)
case (self.work_score.to_f / homework_common.total_score).round(2)
when (0.90..1.00)
'优秀'
when (70...90)
when (0.70...0.90)
'良好'
when (60...70)
when (0.60...0.70)
'及格'
when (0...60)
when (0.00...0.60)
'不及格'
end
end

@ -699,6 +699,10 @@ class User < ApplicationRecord
LimitForbidControl::UserLogin.new(self).clear
end
def from_sub_site?
laboratory_id.present? && laboratory_id != 1
end
protected
def validate_password_length
# 管理员的初始密码是5位

@ -0,0 +1 @@
json.identifier @game.identifier

@ -11,13 +11,13 @@ if @shixun
json.myself_experience @work.myshixun.try(:total_score).to_i
json.total_experience @shixun.all_score
json.work_score number_with_precision @work.work_score.to_f.round(2), precision: 1
json.all_work_score number_with_precision 100, precision: 1
json.all_work_score number_with_precision @homework.total_score, precision: 1
json.time_consuming @work.myshixun_consume
json.evaluate_count @user_evaluate_count.to_i
if @homework.work_efficiency
json.eff_score_full number_with_precision @homework.eff_score, precision: 1
json.eff_score number_with_precision @work.eff_score.to_f.round(2), precision: 1
json.challenge_score_full number_with_precision (100 - @homework.eff_score), precision: 1
json.challenge_score_full number_with_precision (@homework.total_score - @homework.eff_score), precision: 1
json.challenge_score number_with_precision @work.final_score.to_f.round(2), precision: 1
end

@ -1,4 +1,4 @@
json.qrcode_img Util::FileManage.exists?(@subject, '_qrcode') ? Util::FileManage.source_disk_file_url(@subject, '_qrcode') : nil
json.qrcode_img nil
json.members @members do |member|
json.partial! 'subject_member', locals: { user: member.user }

@ -509,7 +509,7 @@ li.li-width7{width: 7%;text-align: left}
background-position: center;
background-repeat: no-repeat;
}
.invite-tip{position: absolute;top: -5px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.invite-tip{position: absolute;top: -5px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6);z-index: 5000;}
.inviteTipbtn a{font-size:14px;width: 100%;height: 30px;line-height: 30px;display: block;color: #747A7F;background-color: rgba(5,16,26,0.4)}
.inviteTipbtn a:hover{color: #4cacff!important;}
.top-black-trangle{display: block;border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}

@ -13,7 +13,7 @@
})(function(CodeMirror) {
"use strict";
var Pos = CodeMirror.Pos;
var svgNS = "http://www.w3.org/2000/svg";
var svgNS = "https://www.w3.org/2000/svg";
var value, orig1, orig2, dv, panes = 2, highlight = true, connect = null, collapse = false;
CodeMirror.k_init=function(id,newData,oldData){

@ -129,7 +129,7 @@ class TPIContextProvider extends Component {
tpm_cases_modified,
tpm_modified,
tpm_script_modified,
showUpdateDialog: false
showUpdateDialog: false,
})
}
@ -145,7 +145,6 @@ class TPIContextProvider extends Component {
window.__fetchAllFlag = false;
this.fetchAll(stageId);
this.costTimeInterval = window.setInterval(()=> {
const { game } = this.state;
if (!game || game.status === 2) { // 已完成的任务不需要计时
@ -183,7 +182,7 @@ class TPIContextProvider extends Component {
url: url,
async: async, //IMPORTANT, the call will be synchronous
data: {
time: game.cost_time
time: game.cost_time
}
}).done((data) => {
console.log('complete');
@ -406,7 +405,6 @@ pop_box_new(htmlvalue, 480, 182);
}
resData.game = game;
const { tpm_cases_modified, tpm_modified, tpm_script_modified, myshixun } = resData;
if (myshixun.system_tip) {
// system_tip为true的时候 不弹框提示用户更新
@ -440,7 +438,6 @@ pop_box_new(htmlvalue, 480, 182);
this.setState({
...resData,
currentGamePassed: false,
loading: false,
testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0),
@ -519,7 +516,6 @@ pop_box_new(htmlvalue, 480, 182);
// var url = `/api/v1/games/${stageId}`
var url = `/tasks/${stageId}.json`
// {"status":1,"message":"undefined method `authenticate!' for #<Grape::Endpoint:0xc8c91c0>"}
window.__fetchAllFlag = true;

@ -1,4 +1,5 @@
import createHistory from 'history/createBrowserHistory';
// import createHistory from 'history/createBrowserHistory';
const createHistory = require('history').createBrowserHistory;
const history = createHistory();

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="20px" height="20px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M463.9 804.4c-194.7 0-353.1-158.4-353.1-353.1S269.2 98.2 463.9 98.2 817 256.6 817 451.3 658.6 804.4 463.9 804.4z m0-651.9c-164.8 0-298.8 134-298.8 298.8s134 298.8 298.8 298.8 298.8-134 298.8-298.8-134-298.8-298.8-298.8zM884.9 926.6c-7.2 0-14.4-2.9-19.8-8.6l-198-210.6c-10.3-10.9-9.7-28.1 1.2-38.4 10.9-10.3 28.1-9.8 38.4 1.2l198 210.6c10.3 10.9 9.7 28.1-1.2 38.4-5.2 5-11.9 7.4-18.6 7.4z" /></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="20px" height="20px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M463.9 804.4c-194.7 0-353.1-158.4-353.1-353.1S269.2 98.2 463.9 98.2 817 256.6 817 451.3 658.6 804.4 463.9 804.4z m0-651.9c-164.8 0-298.8 134-298.8 298.8s134 298.8 298.8 298.8 298.8-134 298.8-298.8-134-298.8-298.8-298.8zM884.9 926.6c-7.2 0-14.4-2.9-19.8-8.6l-198-210.6c-10.3-10.9-9.7-28.1 1.2-38.4 10.9-10.3 28.1-9.8 38.4 1.2l198 210.6c10.3 10.9 9.7 28.1-1.2 38.4-5.2 5-11.9 7.4-18.6 7.4z" /></svg>

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 675 B

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg version="1.1" id="图层_1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" width="20px" height="18px">
<g>
<path fill="#4DACFF" d="M104.3,898.8c-5.6,0-11.1-2.3-15-6.5c-5-5.4-6.7-13-4.5-20l50.3-160.8C87.4,650.1,62.3,579,62.3,505.2

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg version="1.1" id="图层_1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" width="20px" height="18px">
<g>
<path fill="#989898" d="M104.3,898.8c-5.6,0-11.1-2.3-15-6.5c-5-5.4-6.7-13-4.5-20l50.3-160.8C87.4,650.1,62.3,579,62.3,505.2

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg version="1.1" id="图层_1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" width="16px" height="16px">
<g>
<path fill="#4CACFF" d="M858.9,98.2H167.1c-38,0-69.2,31.1-69.2,69.2v691.8c0,38.1,31.1,69.2,69.2,69.2h691.8c38,0,69.2-31.1,69.2-69.2V167.3

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 987 B

@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<g fill="#61DAFB">
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
<circle cx="420.9" cy="296.5" r="45.7"/>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -38,8 +38,8 @@ class CompetitionMaxImg extends React.Component {
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}
>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp1">在线竞赛平台</p>
<p className="registrationbackp2">在线竞赛平台是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
<div className="registbut1">
@ -57,8 +57,8 @@ class CompetitionMaxImg extends React.Component {
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}
>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp1">在线竞赛平台</p>
<p className="registrationbackp2">在线竞赛平台是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
<div className="registbut1">
@ -76,8 +76,8 @@ class CompetitionMaxImg extends React.Component {
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}
>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp1">在线竞赛平台</p>
<p className="registrationbackp2">在线竞赛平台是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
<div className="registbut1">
@ -92,8 +92,8 @@ class CompetitionMaxImg extends React.Component {
: type === 6 ?
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp1">在线竞赛平台</p>
<p className="registrationbackp2">在线竞赛平台是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
{
@ -160,4 +160,4 @@ export default CompetitionMaxImg;
// // </div>
// //
// // </div>
// // </div>
// // </div>

@ -8,7 +8,7 @@ class NoneData extends Component{
render(){
const { style } = this.props;
return(
<div className="edu-tab-con-box clearfix edu-txt-center" style={style}>
<div className="edu-tab-con-box clearfix edu-txt-center" style={ style || { width:"100%" }}>
<style>
{`
.edu-tab-con-box{

@ -122,11 +122,11 @@ class MessagSub extends Component {
if (item.tiding_type === "Apply") {
if (item.auth_type === 1) {
//系统管理页面
return window.open("/managements/identity_authentication");
return window.open("/admins/identity_authentications");
}
if (item.auth_type === 2) {
//系统管理页面
return window.open("/managements/professional_authentication")
return window.open("/admins/professional_authentications")
}
}
if (item.tiding_type === "System") {
@ -143,7 +143,7 @@ class MessagSub extends Component {
case "ApplyAddDepartment" :
if (item.tiding_type === "Apply") {
//部门审批
return window.open("/managements/depart")
return window.open("/admins/department_applies")
}
if (item.tiding_type === "System") {
// 账号管理页/account/profile
@ -153,7 +153,7 @@ class MessagSub extends Component {
case "ApplyAddSchools" :
if (item.tiding_type === "Apply") {
// 单位审批
return window.open(" /managements/unit")
return window.open("/admins/unit_applies")
}
if (item.tiding_type === "System") {
// 账号管理页
@ -164,7 +164,7 @@ class MessagSub extends Component {
switch (item.parent_container_type) {
case "ApplyShixun" :
if (item.tiding_type === "Apply") {
return window.open("/managements/shixun_authorization")
return window.open("/admins/shixun_authorizations")
}
if (item.tiding_type === "System") {
// 实训详情页 :identifier = identifier
@ -173,10 +173,10 @@ class MessagSub extends Component {
case "ApplySubject" :
if (item.tiding_type === "Apply") {
// 实训课程发布
return window.open("/managements/subject_authorization")
return window.open("/admins/subject_authorizations")
}
if (item.tiding_type === "System") {
// 实践课程详情页 :parent_container_id = parent_container_id
// 课程汇总详情页 :parent_container_id = parent_container_id
return window.open(`/paths/${item.parent_container_id}`)
}
@ -222,7 +222,7 @@ class MessagSub extends Component {
case "Shixun" :
return window.open(`/shixuns/${item.identifier}/challenges`)
case "Subject" :
// 实践课程详情页 :id = container_id
// 课程汇总详情页 :id = container_id
return window.open(`/paths/${item.container_id}`)
case "JournalsForMessage" :
switch (item.parent_container_type) {
@ -452,7 +452,7 @@ class MessagSub extends Component {
case "Library" :
if (item.tiding_type === 'Apply') {
// /managements/library_applies
return window.open(`/managements/library_applies`)
return window.open(`/admins/library_applies`)
}
if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id
@ -467,7 +467,7 @@ class MessagSub extends Component {
} else {
if (item.tiding_type === 'Apply') {
///managements/project_package_applies
return window.open(`/managements/project_package_applies`)
return window.open(`/admins/project_package_applies`)
}
// if(item.tiding_type === 'System'){
//众包详情 :id = container_id
@ -478,7 +478,7 @@ class MessagSub extends Component {
return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
case "Video":
if (item.tiding_type === "Apply") {
return window.open(`/managements/video_applies`);
return window.open(`/admins/video_applies`);
} else if (item.tiding_type === "System") {
return window.open(`/users/${this.props.current_user.login}/videos`);
}
@ -515,7 +515,7 @@ class MessagSub extends Component {
render() {
let {page, limit, typeysl, count, isSpin, data} = this.state;
// console.log("6868686868");
console.log(data);
console.log(data);
return (
<div className="clearfix ml20">
{/*头部筛选数据*/}
@ -529,7 +529,7 @@ class MessagSub extends Component {
onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li>
{/*<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a*/}
{/*onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>*/}
{/*onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>*/}
<li className={typeysl && typeysl === "interaction" ? "active" : ""}><a
onClick={(s, i) => this.getdata("interaction", 1)}>互动提醒</a></li>
@ -545,123 +545,122 @@ class MessagSub extends Component {
{/*下面内容页面*/}
<div className="bor-top-greyE mycenter">
{/*这里可以进行数据处理*/}
<div className="myw100baifenbi edu-back-white">
<div className="myw100baifenbi">
<Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}>
{
data === undefined ?
<NoneData></NoneData> :
data.length === 0 ?
<NoneData></NoneData>
: data.map((item, key) => {
// console.log(data)
// ridinglist-subs
var boolps = true;
if (item.container_type === "PraiseTread" || item.container_type === "Grade" || item.container_type === "ChallengeWorkScore") {
boolps = false;
}
if (item.container_type === "JournalsForMessage") {
if (item.parent_container_type === "Principal") {
<NoneData></NoneData>
: data.map((item, key) => {
// console.log(data)
// ridinglist-subs
var boolps = true;
if (item.container_type === "PraiseTread" || item.container_type === "Grade" || item.container_type === "ChallengeWorkScore") {
boolps = false;
}
if (item.parent_container_type === "HomeworkCommon") {
if (item.homework_type === null || item.homework_type === undefined) {
if (item.container_type === "JournalsForMessage") {
if (item.parent_container_type === "Principal") {
boolps = false;
}
if (item.parent_container_type === "HomeworkCommon") {
if (item.homework_type === null || item.homework_type === undefined) {
boolps = false;
}
}
}
}
// if(item.container_type==="HomeworkCommon"){
// if(item.parent_container_type==="AnonymousAppeal"){
// boolps=false;
// }
// }
if (item.container_type === "ProjectPackage") {
if (item.tiding_type === "Destroyed_end") {
boolps = false;
}
if (item.tiding_type === "Destroyed") {
boolps = false;
// if(item.container_type==="HomeworkCommon"){
// if(item.parent_container_type==="AnonymousAppeal"){
// boolps=false;
// }
// }
if (item.container_type === "ProjectPackage") {
if (item.tiding_type === "Destroyed_end") {
boolps = false;
}
if (item.tiding_type === "Destroyed") {
boolps = false;
}
}
}
if (item.container_type === "Course") {
if (item.tiding_type === "Delete") {
boolps = false;
if (item.container_type === "Course") {
if (item.tiding_type === "Delete") {
boolps = false;
}
}
}
if (item.container_type === "DeleteCourse") {
if (item.tiding_type === "System") {
boolps = false;
if (item.container_type === "DeleteCourse") {
if (item.tiding_type === "System") {
boolps = false;
}
}
}
if (item.container_type === "DeleteCourseMember") {
if (item.tiding_type === "System") {
boolps = false;
if (item.container_type === "DeleteCourseMember") {
if (item.tiding_type === "System") {
boolps = false;
}
}
}
return (
<div className="pl25 ridinglist edu-back-white" key={key}>
<div
className={boolps === true ? "ridinglist-sub clearfix df tiding_item" : "ridinglist-subs clearfix df tiding_item"}
onClick={() => this.gettourl(item)}>
<img onMouseDown={() => this.myCome(item)}
src={getImageUrl("images/" + item.trigger_user.image_url)}
className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1">
<p>
<a className="mr20 private_message_a"
onMouseDown={() => this.myCome(item)}>{item.trigger_user.name}</a>
<span className="color-grey-c">{item.time}</span>
{item.tiding_type === "Apply" ? (
item.status === 0 ?
<span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span> : ""
) : ""}
{item.tiding_type === "Apply" ? (
item.status === 1 ?
<span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span> : ""
) : ""}
return (
<div className="pl25 ridinglist edu-back-white" key={key}>
<div
className={boolps === true ? "ridinglist-sub clearfix df tiding_item" : "ridinglist-subs clearfix df tiding_item"}
onClick={() => this.gettourl(item)}>
<img onMouseDown={() => this.myCome(item)}
src={getImageUrl("images/" + item.trigger_user.image_url)}
className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1">
<p>
<a className="mr20 private_message_a"
onMouseDown={() => this.myCome(item)}>{item.trigger_user.name}</a>
<span className="color-grey-c">{item.time}</span>
{item.tiding_type === "Apply" ? (
item.status === 0 ?
<span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span> : ""
) : ""}
{item.tiding_type === "Apply" ? (
item.status === 1 ?
<span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span> : ""
) : ""}
</p>
<style>
{
`.yslspansk span{
</p>
<style>
{
`.yslspansk span{
color: #FF9966!important;
}
`
}
</style>
<p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}}></p>
}
</style>
<p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}}></p>
</div>
<span className={item.new_tiding === true ? "new-point fr mr40 mt22" : ""}></span>
</div>
<span className={item.new_tiding === true ? "new-point fr mr40 mt22" : ""}></span>
</div>
</div>
)
})}
)
})}
</Spin>
{/*页数*/}
{data === undefined ? ""
:
(count > 10 ?
<div style={{textAlign: "center"}} className="new_expand mt10">
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={count}></Pagination>
</div>
</div> : ""
)
}
</div>
</div>
{/*页数*/}
{data === undefined ? ""
:
(count > 10 ?
<div style={{textAlign: "center"}} className="new_expand mt10">
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={count}></Pagination>
</div>
</div> : ""
)
}
</div>
)
}
}
export default MessagSub;
export default MessagSub;

@ -112,29 +112,6 @@ class CodeRepositoryView extends Component {
.removeClass("codeRepoShow")
// .removeClass("fa-caret-down").addClass("fa-caret-right");
})
// $('#codetab_con_1').append(``)
// $('#codetab_con_1 .codemirrorBackground').hide()
window.addEventListener('beforeunload', this.beforeUnload);
}
componentWillUnmount () {
window.removeEventListener('beforeunload', this.beforeUnload);
}
beforeUnload = (e) => {
// console.log(this.props);
const { game } = this.props;
const url = `/api/tasks/${game.identifier}/cost_time.json`;
axios.get(url).then(res => {
// TODO
});
const msg = '确定要离开吗?';
e = e || window.event;
if (e) {
e.returnValue = msg;
}
return msg;
}
onTreeSelect = (selectedKeys, info) => {

@ -313,10 +313,11 @@ class InfosCourse extends Component{
{/* 289 */}
{
page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
}
{
(!data || (data && data.courses.length==0)) && category && <NoneData></NoneData>
(!data || (data && data.courses.length === 0)) && (category || (!category && this.props.current_user && this.props.current_user.user_identity == "学生")) && <NoneData></NoneData>
}
{
data && data.courses && data.courses.map((item,key)=>{

@ -327,8 +327,7 @@ class InfosPath extends Component{
<div className="square-list clearfix">
{/* 295 */}
{
page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:""
page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:""
}
{
(!data || (data && data.subjects.length==0)) && category && <NoneData></NoneData>

@ -313,7 +313,7 @@ class InfosProject extends Component{
<div className="square-list clearfix">
{/* 289 */}
{
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
page == 1 && is_current ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4" Createtype={"projects"}
{...this.props} {...this.state}
></Create>:""

@ -335,7 +335,7 @@ class InfosShixun extends Component{
<div className="square-list clearfix">
{/* 298 */}
{
page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
page == 1 && is_current && !category ?
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>:""
}
{

@ -513,7 +513,7 @@ li.li-width7{width: 7%;text-align: left}
background-position: center;
background-repeat: no-repeat;
}
.invite-tip{position: absolute;top: -5px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.invite-tip{position: absolute;top: -5px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6);z-index: 5000;}
.inviteTipbtn a{font-size:14px;width: 100%;height: 30px;line-height: 30px;display: block;color: #747A7F;background-color: rgba(5,16,26,0.4)}
.inviteTipbtn a:hover{color: #4cacff!important;}
.top-black-trangle{display: block;border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}

Loading…
Cancel
Save