合并阿里云

dev_auth
杨树林 5 years ago
commit b80cde484e

@ -471,45 +471,45 @@ $(document).on('turbolinks:load', function(){
' </div>\n' +
' <div id="small_panel_'+count+'" class="small_panel">\n' +
' <div class="row d-flex small_panel_item" attr_line="sub_new_new" count="1">\n' +
' <span class="col-1 mt-2 subName">第1阶段</span>\n' +
' <span class="mt-2 subName mr10">第1阶段</span>\n' +
' <div class="flex-1">\n' +
' <div class="row">\n' +
' <span class="mt-2 ml20">有效时间:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="row col-6"><span class="mt-2 ml20">有效时间:</span>\n' +
' <div class="col-4 no_padding">\n' +
' <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="有效开始时间">\n' +
' </div>\n' +
' <span class="mt-2">~</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="col-4 no_padding ">\n' +
' <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="有效结束时间">\n' +
' </div>\n' +
' <span class="col-2 text-right mt-2 no_padding">总任务数:</span>\n' +
' <div class="col-1 no_padding input_small">\n' +
' </div></div>\n' +
' <div class="row col-3"><span class="col-4 text-right mt-2 no_padding">总任务数:</span>\n' +
' <div class="col-6 no_padding ">\n' +
' <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n' +
' </div>\n' +
' <span class="col-1 text-right mt-2 no_padding">成绩来源:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' </div></div>\n' +
' <div class="row col-4"><span class="col-3 text-right mt-2 no_padding">成绩来源:</span>\n' +
' <div class="col-7 no_padding ">\n' +
' <select class="form-control" name="stage[][score_source]">\n' +
' <option value="0">经验值</option>\n' +
' <option value="1">预测准确率</option>\n' +
' </select>\n' +
' </div>\n' +
' </div></div>\n' +
' </div>\n' +
' <div class="row mt-2" id="task_Input_sub_new_new">\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务1</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务1</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务2</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务2</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务3</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务3</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
@ -547,45 +547,45 @@ $(document).on('turbolinks:load', function(){
var html='<div class="row d-flex small_panel_item" attr_line="sub_'+index+'_'+count+'" count="'+count+'">\n' +
' <span class="col-1 mt-2 subName">第'+showCount+'阶段</span>\n' +
' <span class="mr10 mt-2 subName">第'+showCount+'阶段</span>\n' +
' <div class="flex-1">\n' +
' <div class="row">\n' +
' <span class="mt-2 ml20">有效时间:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="row col-6"><span class="mt-2 ml20 mr10">有效时间:</span>\n' +
' <div class="col-4 no_padding ">\n' +
' <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="有效开始时间">\n' +
' </div>\n' +
' <span class="mt-2">~</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="col-4 no_padding ">\n' +
' <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="有效结束时间">\n' +
' </div>\n' +
' <span class="col-2 text-right mt-2 no_padding">总任务数:</span>\n' +
' <div class="col-1 no_padding input_small">\n' +
' </div></div>\n' +
' <div class="row col-3"><span class="col-4 text-right mt-2 no_padding mr10">总任务数:</span>\n' +
' <div class="col-6 no_padding ">\n' +
' <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n' +
' </div>\n' +
' <span class="col-1 text-right mt-2 no_padding">成绩来源:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' </div></div>\n' +
' <div class="row col-4"><span class="col-3 mr10 text-right mt-2 no_padding">成绩来源:</span>\n' +
' <div class="col-7 no_padding ">\n' +
' <select class="form-control" name="stage[][score_source]">\n' +
' <option value="0">经验值</option>\n' +
' <option value="1">预测准确率</option>\n' +
' </select>\n' +
' </div>\n' +
' </div></div>\n' +
' </div>\n' +
' <div class="row mt-2" id="task_Input_sub_'+index+'_'+count+'">\n'+
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务1</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务1</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务2</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务2</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务3</span>\n' +
' <div class="col-8">\n' +
' <span class="col-4 text-right mt-3 no_padding mr10">任务3</span>\n' +
' <div class="col-6 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
@ -633,8 +633,8 @@ function change_total(item) {
var html = "";
if(count > divCount){
for(var i=0;i < count-divCount ;i++){
html+='<div class="col-4 row task_Input_div"><span class="col-3 text-center mt-3">任务'+(divCount+i+1)+'</span>\n' +
'<div class="col-8">\n' +
html+='<div class="col-4 row task_Input_div"><span class="col-4 text-right mt-3 no_padding mr10">任务'+(divCount+i+1)+'</span>\n' +
'<div class="col-6 no_padding">\n' +
'<input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
'</div>\n' +
'</div>';
@ -688,45 +688,45 @@ function addNewTab(competition_id) {
' </div>\n' +
' <div id="small_panel_'+count+'" class="small_panel">\n' +
' <div class="row d-flex small_panel_item" attr_line="sub_new_new" count="1">\n' +
' <span class="col-1 mt-2 subName">第1阶段</span>\n' +
' <span class="mt-2 subName mr10">第1阶段</span>\n' +
' <div class="flex-1">\n' +
' <div class="row">\n' +
' <span class="mt-2 ml20">有效时间:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="row col-6"><span class="mt-2 ml20 mr10">有效时间:</span>\n' +
' <div class="col-4 no_padding ">\n' +
' <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="有效开始时间">\n' +
' </div>\n' +
' <span class="mt-2">~</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' <div class="col-4 no_padding input_middle">\n' +
' <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="有效结束时间">\n' +
' </div>\n' +
' <span class="col-2 text-right mt-2 no_padding">总任务数:</span>\n' +
' <div class="col-1 no_padding input_small">\n' +
' </div></div>\n' +
' <div class="row col-3"><span class="col-4 text-right mt-2 no_padding mr10">总任务数:</span>\n' +
' <div class="col-6 no_padding ">\n' +
' <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n' +
' </div>\n' +
' <span class="col-1 text-right mt-2 no_padding">成绩来源:</span>\n' +
' <div class="col-2 no_padding input_middle">\n' +
' </div></div>\n' +
' <div class="row col-4"><span class="col-3 text-right mt-2 no_padding mr10">成绩来源:</span>\n' +
' <div class="col-7 no_padding ">\n' +
' <select class="form-control" name="stage[][score_source]">\n' +
' <option value="0">经验值</option>\n' +
' <option value="1">预测准确率</option>\n' +
' </select>\n' +
' </div>\n' +
' </div></div>\n' +
' </div>\n' +
' <div class="row mt-2" id="task_Input_sub_new_new">\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务1</span>\n' +
' <div class="col-8">\n' +
' <span class="col-3 text-right mt-3 no_padding mr10">任务1</span>\n' +
' <div class="col-8 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务2</span>\n' +
' <div class="col-8">\n' +
' <span class="col-3 text-right mt-3 no_padding mr10">任务2</span>\n' +
' <div class="col-8 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-4 row task_Input_div">\n' +
' <span class="col-3 text-center mt-3">任务3</span>\n' +
' <div class="col-8">\n' +
' <span class="col-3 text-right no_padding mr10 mt-3">任务3</span>\n' +
' <div class="col-8 no_padding">\n' +
' <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">\n' +
' </div>\n' +
' </div>\n' +

@ -87,5 +87,30 @@
.row:last-child{
border:none;
}
.task_Input_div:nth-child(3n-2) > span.col-4{
flex: 0 0 81px;
max-width: 81px;
}
.task_Input_div:nth-child(3n-2){
flex: 0 0 50%;
max-width: 50%;
}
.task_Input_div:nth-child(3n-1){
flex: 0 0 25%;
max-width: 25%;
}
.task_Input_div:nth-child(3n){
flex: 0 0 33.3%;
max-width: 33.3%;
}
.task_Input_div:nth-child(3n) > span.col-4{
flex: 0 0 25%;
max-width: 25%;
}
.task_Input_div:nth-child(3n) > div.col-6{
flex: 0 0 58.3%;
max-width: 58.3%;
}
}
}

@ -386,34 +386,40 @@
<div id="small_panel_<%= index + 1 %>" class="small_panel">
<% stage.competition_stage_sections.each_with_index do |section, j| %>
<div class="row d-flex small_panel_item" attr_line="sub_<%= index %>_<%= j %>" count="<%= j + 1 %>">
<span class="col-1 mt-2 subName">第<%= j + 1 %>阶段</span>
<span class="mt-2 subName mr10">第<%= j + 1 %>阶段</span>
<div class="flex-1">
<div class="row">
<span class="mt-2 ml20">有效时间:</span>
<div class="col-2 no_padding input_middle">
<div class="row col-6">
<span class="ml20 mt-2 mr10">有效时间:</span>
<div class="col-4 no_padding">
<%= text_field_tag 'stage[][start_time]', section.start_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %>
</div>
<span class="mt-2">~</span>
<div class="col-2 no_padding input_middle">
<div class="col-4 no_padding">
<%= text_field_tag 'stage[][end_time]', section.end_time&.strftime('%Y-%m-%d %H:%M'), autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %>
</div>
<span class="col-2 text-right mt-2 no_padding">总任务数:</span>
<div class="col-1 no_padding input_small">
</div>
<div class="row col-3">
<span class="col-4 text-right mt-2 no_padding mr10">总任务数:</span>
<div class="col-6 no_padding">
<input type="number" class="form-control task_all" value="<%= section.entry %>" onchange="change_total(this)" name="stage[][entry]"/>
</div>
<span class="col-1 text-right mt-2 no_padding">成绩来源:</span>
<div class="col-2 no_padding input_middle">
</div>
<div class="row col-4">
<span class="col-3 text-right mt-2 no_padding mr10">成绩来源:</span>
<div class="col-7 no_padding">
<select class="form-control" name="stage[][score_source]">
<option value="0" <%= section.score_source == 0 ? "selected='selected'" : "" %>>经验值</option>
<option value="1" <%= section.score_source == 1 ? "selected='selected'" : "" %>>预测准确率</option>
</select>
</div>
</div>
</div>
<div class="row mt-2" id="task_Input_sub_<%= index %>_<%= j %>">
<% section.competition_entries.each_with_index do |entry, z| %>
<div class="col-4 row task_Input_div">
<span class="col-3 text-center mt-3">任务<%= z+1 %></span>
<div class="col-8">
<span class="col-4 text-right mt-3 no_padding mr10">任务<%= z+1 %></span>
<div class="col-6 no_padding">
<input type="text" class="form-control mt-2" value="<%= entry.shixun_identifier %>" name="stage[][identifiers][]" placeholder="请填写实训ID">
</div>
</div>
@ -450,45 +456,51 @@
</div>
<div id="small_panel_1" class="small_panel">
<div class="row d-flex small_panel_item" attr_line="sub_new_new" count="1">
<span class="col-1 mt-2 subName">第1阶段</span>
<span class="mt-2 subName mr10">第1阶段</span>
<div class="flex-1">
<div class="row">
<span class="mt-2 ml20">有效时间:</span>
<div class="col-2 no_padding input_middle">
<div class="row col-6">
<span class="mt-2 ml20 mr10">有效时间:</span>
<div class="col-4 no_padding">
<%= text_field_tag 'stage[][start_time]', '', autocomplete: 'off', class: 'section-start-time form-control', placeholder: '有效开始时间' %>
</div>
<span class="mt-2">~</span>
<div class="col-2 no_padding input_middle">
<div class="col-4 no_padding">
<%= text_field_tag 'stage[][end_time]', '', autocomplete: 'off', class: 'section-end-time form-control', placeholder: '有效结束时间' %>
</div>
<span class="col-2 text-right mt-2 no_padding">总任务数:</span>
<div class="col-1 no_padding input_small">
</div>
<div class="row col-3">
<span class="col-4 text-right mt-2 no_padding mr10">总任务数:</span>
<div class="col-6 no_padding">
<input type="number" class="form-control task_all" onchange="change_total(this)" value="3" name="stage[][entry]"/>
</div>
<span class="col-1 text-right mt-2 no_padding">成绩来源:</span>
<div class="col-2 no_padding input_middle">
</div>
<div class="row col-4">
<span class="col-3 text-right mt-2 no_padding mr10">成绩来源:</span>
<div class="col-7 no_padding">
<select class="form-control" name="stage[][score_source]">
<option value="0">经验值</option>
<option value="1">预测准确率</option>
</select>
</div>
</div>
</div>
<div class="row mt-2" id="task_Input_sub_new_new">
<div class="col-4 row task_Input_div">
<span class="col-3 text-center mt-3">任务1</span>
<div class="col-8">
<span class="col-4 text-right mt-3 no_padding mr10">任务1</span>
<div class="col-6 no_padding">
<input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">
</div>
</div>
<div class="col-4 row task_Input_div">
<span class="col-3 text-center mt-3">任务2</span>
<div class="col-8">
<span class="col-4 text-right mt-3 no_padding mr10">任务2</span>
<div class="col-6 no_padding">
<input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">
</div>
</div>
<div class="col-4 row task_Input_div">
<span class="col-3 text-center mt-3">任务3</span>
<div class="col-8">
<span class="col-4 text-right mt-3 no_padding mr10">任务3</span>
<div class="col-6 no_padding">
<input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="请填写实训ID">
</div>
</div>

@ -960,7 +960,7 @@ class Registration extends React.Component {
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link
to={`/competitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
to={`/competitions/${this.props.match.params.identifier}`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
{/*<Breadcrumb.Item*/}
{/* href={`/competitions/${this.props.match.params.identifier}/common_header`}></Breadcrumb.Item>*/}
<Breadcrumb.Item>报名</Breadcrumb.Item>

@ -117,16 +117,14 @@ class CompetitionsIndex extends Component{
size="large"
dataSource={datas&&datas}
renderItem={(item,key) => (
<a target="_blank"
href={item.competition_status === "ended" ? `/competitions/${item.identifier}/common_header` : item.competition_status === "nearly_published" ? item.permission.editable == true ? `/competitions/${item.identifier}/common_header` : null : item.competition_status === "progressing" ? `/competitions/${item.identifier}/common_header` : null}
<a target="_blank" href={item.competition_status==="ended"?`/competitions/${item.identifier}`:item.competition_status==="nearly_published"?item.permission.editable==true?`/competitions/${item.identifier}`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}`:null}
className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}
>
<div className={"CompetitionsList"} >
{item.competition_status==="nearly_published"?
item.permission.editable == true ? "" :
<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div> : ""}
item.permission.editable==true?"":<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>:""}
{/*<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>*/}
{/*{item.description===null||item.description===undefined||item.description===""?<style>*/}
{/*{*/}
@ -177,7 +175,7 @@ class CompetitionsIndex extends Component{
title={<a className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
item.permission.editable==true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}>
<a target="_blank" className={"competitionstitles"}
href={item.competition_status === "ended" ? `/competitions/${item.identifier}/common_header` : item.competition_status === "nearly_published" ? item.permission.editable == true ? `/competitions/${item.identifier}/common_header` : null : item.competition_status === "progressing" ? `/competitions/${item.identifier}/common_header` : null}
href={item.competition_status==="ended"?`/competitions/${item.identifier}`:item.competition_status==="nearly_published"? item.permission.editable==true?`/competitions/${item.identifier}`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}`:null}
>{item.name}{item.sub_title===null?"":`——${item.sub_title}`}</a>
{/*<span>{item.sub_title===null?"":*/}
{/*<Tag className="competitionsrelative" color="#87d068">{item.sub_title}</Tag>}*/}

@ -3,7 +3,6 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Tooltip} from 'antd';
import { Link } from 'react-router-dom';
import axios from 'axios';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './Competitionteams.css';
const { Content } = Layout;

@ -6,7 +6,6 @@ import {markdownToHTML,getImageUrl} from 'educoder';
import CompetitionContents from './CompetitionContents';
import CompetitionContentsChart from './CompetitionContentsChart';
import CompetitionContentsMd from './CompetitionContentsMd';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './CompetitionCommon.css';

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {Button,Layout} from 'antd';
import axios from 'axios';
import {markdownToHTML,getImageUrl,AttachmentList} from 'educoder';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Header, Footer, Sider, Content } = Layout;
class CompetitionContents extends Component{

@ -2,7 +2,6 @@ import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder';
import axios from 'axios';
import NoneData from "../../courses/shixunHomework/shixunHomework";
const { Content } = Layout;
const { TabPane } = Tabs;

@ -69,7 +69,7 @@ class Competitions extends Component {
/>
{/*新版竞赛详情页面*/}
<Route path="/competitions/:identifier/common_header"
<Route path="/competitions/:identifier"
render={
(props) => (<CompetitionCommon {...this.props} {...props} {...this.state} />)
}

@ -414,7 +414,7 @@ class ShixunhomeWorkItem extends Component{
{
discussMessage && discussMessage.upper_category_name &&
<ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }>
{ <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"268px"}:{"maxWidth":"550px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>}
{ <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"216px"}:{"maxWidth":"550px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>}
</ConditionToolTip>
}

@ -19,7 +19,9 @@ import {
class Dynamiclist extends Component{
constructor(props){
super(props);
this.state = {}
this.state={
}
}
@ -65,8 +67,8 @@ class Dynamiclist extends Component {
<Col span={12} className={"top10s"}>Top 10</Col>
<Col span={12} className={"Statisticsliboxjsgz"}>
<span className={"mr10"}>计算规则</span>
<Popover placement="bottom" content={content} trigger="hover">
<Icon type="exclamation-circle"/>
<Popover placement="bottom" title={"活动规则计算说明"} content={content} trigger="hover">
<Icon type="info-circle" />
</Popover>
</Col>
</Row>
@ -85,5 +87,4 @@ class Dynamiclist extends Component {
)
}
}
export default Dynamiclist;

@ -101,7 +101,6 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.Statisticslibox .ant-menu-item{
height: 20px;
line-height: 20px;
@ -124,5 +123,9 @@
height: 30px;
font-size: 12px;
color: rgba(153,153,153,1);
line-height: 30px;
line-height: 20px;
}
.Statisticsmxxy{
font-size: 16px;
margin-left:15px;
}

@ -4,7 +4,9 @@ import {WordsBtn, on, off, trigger, getImageUrl, sortDirections} from 'educoder'
import axios from'axios';
import Dropdownbox from './Dropdownbox';
import Dynamiclist from './Dynamiclist';
import NoneData from "../../courses/coursesPublic/NoneData";
import './Statistics.css';
const { TabPane } = Tabs;
class Statistics extends Component{
constructor(props){
@ -56,12 +58,13 @@ class Statistics extends Component{
course_groups:result.data.course_groups
})
let list=result.data.course_groups;
if (list.length > 0) {
this.setState({
group_ids: [list[0].id],
})
this.getwork_scoredata(page, [list[0].id], sort);
}
// if(list.length>0){
// this.setState({
// group_ids:[list[0].id],
// })
// }
this.getwork_scoredata(page,undefined,sort);
}
}).catch((error) => {
console.log(error);
@ -75,8 +78,7 @@ class Statistics extends Component{
let data={
group_ids:group_ids,
}
axios.get(url, {
params:
axios.get(url,{params:
data
}).then((result) => {
if (result) {
@ -98,7 +100,7 @@ class Statistics extends Component{
this.setState({
page:page,
sort:sort,
group_ids: group_ids,
group_ids:this.props.isStudent()===true?undefined:group_ids,
bomisSpin:true,
})
@ -108,11 +110,10 @@ class Statistics extends Component{
let data={
limit:20,
page:page,
group_ids: group_ids,
group_ids:this.props.isStudent()===true?undefined:group_ids,
sort:sort
}
axios.get(url, {
params:
axios.get(url,{params:
data
}).then((result) => {
if (result) {
@ -161,8 +162,7 @@ class Statistics extends Component{
let data={
group_id:group_ids
}
axios.get(url, {
params:
axios.get(url,{params:
data
}).then((response)=>{
if(response === undefined){
@ -210,7 +210,7 @@ class Statistics extends Component{
}
render(){
let {nd1, nd2, nd3, data, bomdata} = this.state;
let {nd1,nd2,nd3,data,bomdata,course_members}=this.state;
const columns = [
{
@ -283,13 +283,11 @@ class Statistics extends Component{
let course_grouptype=false;
if(this.props&&this.props.course_modules!=undefined){
{
this.props && this.props.course_modules.map((item, key) => {
{this.props&&this.props.course_modules.map((item,key)=>{
if(item.type==="course_group"){
course_grouptype=true
}
})
}
})}
}
if(course_grouptype===false){
columns.some((item,key)=> {
@ -319,8 +317,7 @@ class Statistics extends Component{
{...this.state}
postwork_scoredata={(group_idss)=>this.getwork_scoredata(1,group_idss,'desc')}
/>
<a className={"ml20 ant-btn-link"}
onClick={() => this.derivefun(`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`)}>导出</a>
<a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`)}>导出</a>
</React.Fragment>;
return(
<React.Fragment>
@ -328,7 +325,7 @@ class Statistics extends Component{
<Spin size="large" spinning={this.state.topisSpin}>
<p className="clearfix padding30">
<Row gutter={24}>
<Col>
<Col className={"Statisticsmxxy"}>
明星学员
</Col>
</Row>
@ -371,8 +368,7 @@ class Statistics extends Component{
return(
<Col span={5} className={"relatives"}>
<li className="pr rankingss">
<img src="https://test-newweb.educoder.net/images/educoder/huangguan.png"
className="huangguans mb5"/>
<img src="https://test-newweb.educoder.net/images/educoder/huangguan.png" className="huangguans mb5" />
<a href={`/users/${item.user_login}`} className="color-dark">
<img src={getImageUrl(`images/${item.avatar_url}`)} className={"mb10 mt5"}/>
</a>
@ -441,7 +437,7 @@ class Statistics extends Component{
return(
<Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col>
<Col>2th</Col>
<Col>2nd</Col>
</Col>
)
}
@ -451,7 +447,7 @@ class Statistics extends Component{
return(
<Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col>
<Col>1th</Col>
<Col>1st</Col>
</Col>
)
}
@ -461,7 +457,7 @@ class Statistics extends Component{
return(
<Col span={5} className={"Statisticscenter"}>
<Col>{item.user_name}</Col>
<Col>3th</Col>
<Col>3rd</Col>
</Col>
)
}
@ -494,31 +490,30 @@ class Statistics extends Component{
}
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 16px 0px;
text-align: center;
}
`
}</style>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey}
tabBarExtraContent={this.props.isAdmin() === true ? operations : ""}>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}>
<TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} >
<Table
{bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table
columns={columns}
dataSource={bomdata}
pagination={false}
onChange={this.handleTableChange}
/>
/>}
</TabPane>
<TabPane tab="课堂活跃度" key="2">
<Dynamiclist
{course_members===undefined||course_members===null?"":course_members.length===0?<NoneData/>:<Dynamiclist
{...this.state}
{...this.props}
/>
/>}
</TabPane>
</Tabs>
</Spin>
</div>
{this.state.all_count === undefined || this.state.all_count === null || this.state.activeKey === "2" ? '' : this.state.all_count > 20 && this.props.isAdmin() === true ?
<div className="mb40 edu-txt-center padding20-30"
{this.state.all_count===undefined||this.state.all_count===null||this.state.activeKey==="2"?'':this.state.all_count >20&&this.props.isAdmin()===true?<div className="mb40 edu-txt-center padding20-30"
>

@ -427,14 +427,14 @@ export default class TPMchallengesnew extends Component {
<Link to={go_back_url === undefined ? "" : go_back_url}
className="color-grey-6 fr font-15 mt3">返回</Link>
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
}
{ prev_challenge===undefined?"":
<a href={prev_challenge} className="fr color-blue mr15 mt4">上一关</a>
}
{ next_challenge===undefined?"":
<a href={next_challenge}className="fr color-blue mr15 mt4">下一关</a>
}
<a href={practice_url === undefined ? "" : practice_url}

Loading…
Cancel
Save