@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Simplified Chinese translation for bootstrap-datetimepicker
|
||||||
|
* Yuan Cheung <advanimal@gmail.com>
|
||||||
|
*/
|
||||||
|
;(function($){
|
||||||
|
$.fn.datetimepicker.dates['zh-CN'] = {
|
||||||
|
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
|
||||||
|
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||||
|
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
|
||||||
|
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||||
|
monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||||
|
today: "今天",
|
||||||
|
suffix: [],
|
||||||
|
meridiem: ["上午", "下午"]
|
||||||
|
};
|
||||||
|
}(jQuery));
|
@ -0,0 +1,25 @@
|
|||||||
|
require 'uri'
|
||||||
|
require 'net/http'
|
||||||
|
|
||||||
|
class SyncTrustieJob < ApplicationJob
|
||||||
|
queue_as :default
|
||||||
|
|
||||||
|
def perform(type, count)
|
||||||
|
Rails.logger.info("#######_________response__sync__start__#########")
|
||||||
|
configs_content = Rails.application.config_for(:configuration)
|
||||||
|
|
||||||
|
token = configs_content["sync_token"]
|
||||||
|
token_url = configs_content["sync_url"]
|
||||||
|
url = "#{token_url}/api/v1/homes/sync_count"
|
||||||
|
sync_json = {
|
||||||
|
"token": token,
|
||||||
|
"type": type,
|
||||||
|
"number": count
|
||||||
|
}
|
||||||
|
uri = URI.parse(url)
|
||||||
|
|
||||||
|
http = Net::HTTP.new(uri.hostname, uri.port)
|
||||||
|
http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'})
|
||||||
|
Rails.logger.info("#######_________response__sync__end_____#########")
|
||||||
|
end
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
json.count @users.total_count
|
json.count @users.total_count
|
||||||
json.users do
|
json.users do
|
||||||
json.array! @users.each do |user|
|
json.array! @users.each do |user|
|
||||||
json.extract! user, :id, :login, :real_name, :identity, :school_name
|
json.extract! user, :id, :login, :real_name, :identity, :school_name, :hidden_phone
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -1,6 +1,6 @@
|
|||||||
json.count @users.total_count
|
json.count @users.total_count
|
||||||
json.users do
|
json.users do
|
||||||
json.array! @users.each do |user|
|
json.array! @users.each do |user|
|
||||||
json.extract! user, :id, :login, :real_name, :identity, :school_name
|
json.extract! user, :id, :login, :real_name, :identity, :school_name, :hidden_phone
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
json.user do
|
||||||
|
json.partial! 'weapps/shared/user', locals: { user: current_user }
|
||||||
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
json.user do
|
||||||
|
json.partial! 'weapps/shared/user', locals: { user: current_user }
|
||||||
|
end
|
@ -0,0 +1,14 @@
|
|||||||
|
json.username user.full_name
|
||||||
|
json.real_name user.real_name
|
||||||
|
json.login user.login
|
||||||
|
json.user_id user.id
|
||||||
|
json.image_url url_to_avatar(user)
|
||||||
|
json.admin user.admin?
|
||||||
|
json.business user.business?
|
||||||
|
json.is_teacher user.user_extension&.teacher?
|
||||||
|
json.user_identity user.identity
|
||||||
|
json.tidding_count 0
|
||||||
|
json.user_phone_binded user.phone.present?
|
||||||
|
json.phone user.phone
|
||||||
|
json.profile_completed user.profile_completed?
|
||||||
|
json.professional_certification user.professional_certification
|
@ -0,0 +1,26 @@
|
|||||||
|
class MigrateComModuleResource < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
Competition.all.each do |competition|
|
||||||
|
competition.competition_modules.each do |com_module|
|
||||||
|
mod_type = ""
|
||||||
|
case com_module.name.strip
|
||||||
|
when '首页'
|
||||||
|
mod_type = "home"
|
||||||
|
when '报名'
|
||||||
|
mod_type = "enroll"
|
||||||
|
when '通知公告'
|
||||||
|
mod_type = "inform"
|
||||||
|
when '参赛手册'
|
||||||
|
mod_type = "manual"
|
||||||
|
when '排行榜'
|
||||||
|
mod_type = "chart"
|
||||||
|
when '资料下载'
|
||||||
|
mod_type = "resource"
|
||||||
|
else
|
||||||
|
mod_type = "md"
|
||||||
|
end
|
||||||
|
com_module.update_attributes!(module_type: mod_type)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class MigrateCompetitionModuleManual < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
CompetitionModule.where(module_type: "manual").update_all(module_type: "md")
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,17 @@
|
|||||||
|
class MigrateCompetitionModuleContent < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
Competition.all.each do |competition|
|
||||||
|
competition.informs.each do |inform|
|
||||||
|
if inform.status == 1
|
||||||
|
com_module = competition.competition_modules.find_by(module_type: "inform")
|
||||||
|
elsif inform.status == 2
|
||||||
|
com_module = competition.competition_modules.find_by(name: "参赛手册")
|
||||||
|
end
|
||||||
|
if com_module
|
||||||
|
new_md = CompetitionModuleMdContent.create!(competition_module_id: com_module.id, content: inform.description, name: inform.name)
|
||||||
|
Attachment.where(container_id: inform.id, container_type: "Inform").update_all(container_id: new_md.id, container_type: "CompetitionModuleMdContent")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,14 @@
|
|||||||
|
class MigrateCompetitionChartRules < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_column :competition_module_md_contents, :competition_stage_id, :integer, default: 0
|
||||||
|
|
||||||
|
ChartRule.all.each do |rule|
|
||||||
|
if rule.competition
|
||||||
|
com_module = rule.competition.competition_modules.find_by(module_type: "chart")
|
||||||
|
if com_module
|
||||||
|
CompetitionModuleMdContent.create!(content: rule.content, competition_module_id: com_module.id, competition_stage_id: rule.competition_stage_id ? rule.competition_stage_id : 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 137 KiB |
@ -0,0 +1,59 @@
|
|||||||
|
import React, {Component} from 'react';
|
||||||
|
import {getImageUrl} from 'educoder';
|
||||||
|
import {Modal, Input, Spin, Tooltip, Icon, Dropdown, Button} from 'antd';
|
||||||
|
import axios from 'axios';
|
||||||
|
import competition from '../comcss/competition.css';
|
||||||
|
import Registrationitem from "../Registrationitem";
|
||||||
|
import InfiniteScroll from 'react-infinite-scroller';
|
||||||
|
// import PersonModaltion from "./PersonModaltion";
|
||||||
|
const {Search} = Input;
|
||||||
|
|
||||||
|
//退出战队
|
||||||
|
class ExittheteamModel extends React.Component {
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
addonAfter, test, test3, Numberofteammentors, Thecurrentnumber, person1, person2
|
||||||
|
} = this.state;
|
||||||
|
//Modal
|
||||||
|
//keyboard是否支持键盘 esc 关闭
|
||||||
|
//closable 是否显示右上角的关闭按钮
|
||||||
|
//底部内容,当不需要默认底部按钮时,可以设为 footer={null}
|
||||||
|
//destroyOnClose 关闭时销毁 Modal 里的子元素
|
||||||
|
//centered 垂直居中展示 Modal
|
||||||
|
//visible 弹出框是否显示
|
||||||
|
|
||||||
|
return (
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
keyboard={false}
|
||||||
|
closable={false}
|
||||||
|
footer={null}
|
||||||
|
destroyOnClose={true}
|
||||||
|
title={this.props.messageexit}
|
||||||
|
centered={true}
|
||||||
|
visible={this.props.messageexitol === undefined ? false : this.props.messageexitol}
|
||||||
|
width="480px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div className="task-popup-content">
|
||||||
|
<div className="task-popup-text-center font-14">{this.props.exitintpermessages}</div>
|
||||||
|
</div>
|
||||||
|
<div className="task-popup-submit clearfix">
|
||||||
|
<a className="pop_close task-btn mb10 mr40 colorFFF"
|
||||||
|
onClick={() => this.props.Exittheteam(false)}>取消</a>
|
||||||
|
<a className="task-btn task-btn-orange fr" onClick={() => this.props.Exittheteam(true)}>确定</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Modal>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ExittheteamModel;
|
@ -0,0 +1,38 @@
|
|||||||
|
import React, { Component } from 'react';
|
||||||
|
import {Button,Layout} from 'antd';
|
||||||
|
import axios from 'axios';
|
||||||
|
import {markdownToHTML,getImageUrl} from 'educoder';
|
||||||
|
import NoneData from "../../courses/shixunHomework/shixunHomework";
|
||||||
|
|
||||||
|
const { Header, Footer, Sider, Content } = Layout;
|
||||||
|
class CompetitionContents extends Component{
|
||||||
|
constructor(props) {
|
||||||
|
super(props)
|
||||||
|
this.state={
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount(){
|
||||||
|
window.document.title = '竞赛';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
return (
|
||||||
|
|
||||||
|
<div className={"fr"}>
|
||||||
|
<Button className={"fr"} type="primary" ghost>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("").replace(/▁/g, "▁▁▁")}}>
|
||||||
|
</Content>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default CompetitionContents;
|
@ -0,0 +1,189 @@
|
|||||||
|
import React, { Component } from 'react';
|
||||||
|
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd';
|
||||||
|
import axios from 'axios';
|
||||||
|
import {markdownToHTML,getImageUrl} from 'educoder';
|
||||||
|
import NoneData from "../../courses/shixunHomework/shixunHomework";
|
||||||
|
|
||||||
|
const { Header, Footer, Sider, Content } = Layout;
|
||||||
|
const { TabPane } = Tabs;
|
||||||
|
const { Meta } = Card;
|
||||||
|
|
||||||
|
class CompetitionContents extends Component{
|
||||||
|
constructor(props) {
|
||||||
|
super(props)
|
||||||
|
this.state={
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount(){
|
||||||
|
window.document.title = '竞赛';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const operations = <Icon type="form" />;
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'Name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
render: text => <a>{text}</a>,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Age',
|
||||||
|
dataIndex: 'age',
|
||||||
|
key: 'age',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Address',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'address',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Tags',
|
||||||
|
key: 'tags',
|
||||||
|
dataIndex: 'tags',
|
||||||
|
render: tags => (
|
||||||
|
<span>
|
||||||
|
123123
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Action',
|
||||||
|
key: 'action',
|
||||||
|
render: (text, record) => (
|
||||||
|
<span>
|
||||||
|
<a>Invite {record.name}</a>
|
||||||
|
<a>Delete</a>
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Values',
|
||||||
|
key: 'values',
|
||||||
|
dataIndex: 'values',
|
||||||
|
render: tags => (
|
||||||
|
<span>
|
||||||
|
123123
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
key: '1',
|
||||||
|
name: 'John Brown',
|
||||||
|
age: 32,
|
||||||
|
address: 'New York No. 1 Lake Park',
|
||||||
|
tags: ['nice', 'developer'],
|
||||||
|
values:123
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '2',
|
||||||
|
name: 'Jim Green',
|
||||||
|
age: 42,
|
||||||
|
address: 'London No. 1 Lake Park',
|
||||||
|
tags: ['loser'],
|
||||||
|
values:123
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '3',
|
||||||
|
name: 'Joe Black',
|
||||||
|
age: 32,
|
||||||
|
address: 'Sidney No. 1 Lake Park',
|
||||||
|
tags: ['cool', 'teacher'],
|
||||||
|
values:123
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Tabs tabBarExtraContent={operations}>
|
||||||
|
<TabPane tab="总排行榜" key="1">
|
||||||
|
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 1").replace(/▁/g, "▁▁▁")}}>
|
||||||
|
</Content>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane tab="决赛排行榜" key="2">
|
||||||
|
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 2").replace(/▁/g, "▁▁▁")}}>
|
||||||
|
</Content>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane tab="预赛排行榜" key="3">
|
||||||
|
<Content className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML("Content of tab 3").replace(/▁/g, "▁▁▁")}}>
|
||||||
|
</Content>
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<Col className="gutter-row Competitioncharts mt30 mb30">
|
||||||
|
总排名
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Row calssName={"Competition399"}>
|
||||||
|
<Col className="mt40" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 2 }}>
|
||||||
|
<Card
|
||||||
|
className={"Competitionthird"}
|
||||||
|
cover={
|
||||||
|
<img
|
||||||
|
alt="example"
|
||||||
|
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Meta
|
||||||
|
title="Card title"
|
||||||
|
description="This is the description"
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
<Col xs={{ span: 11, offset: 1 }} lg={{ span: 6, offset: 1 }}>
|
||||||
|
<Card
|
||||||
|
className={"Competitionfirst"}
|
||||||
|
cover={
|
||||||
|
<img
|
||||||
|
alt="example"
|
||||||
|
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Meta
|
||||||
|
title="Card title"
|
||||||
|
description="This is the description"
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
<Col className="mt30" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 1 }}>
|
||||||
|
<Card
|
||||||
|
className={"Competitionsecondary"}
|
||||||
|
cover={
|
||||||
|
<img
|
||||||
|
alt="example"
|
||||||
|
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Meta
|
||||||
|
title="Card title"
|
||||||
|
description="This is the description"
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row className={"mt80 mb80"}>
|
||||||
|
<Table className="Competitiontransparent" columns={columns} dataSource={data} showHeader={false} pagination={false}/>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default CompetitionContents;
|