Merge branch 'dev_aliyun' into develop

dev_forum
daiao 5 years ago
commit f96a0f747d

@ -32,8 +32,11 @@ class AccountsController < ApplicationController
end
uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}")
# check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60)
return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
return normal_status(-2, "验证码已失效") if !verifi_code&.effective?
# todo 上线前请删除万能验证码"513231"
if code != "513231"
return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
return normal_status(-2, "验证码已失效") if !verifi_code&.effective?
end
code = generate_identifier User, 8
login = pre + code

File diff suppressed because it is too large Load Diff

@ -90,10 +90,10 @@ class MyshixunsController < ApplicationController
# params[:pics] = "a.png,b.png,c.png"
def training_task_status
logger.info("##################training_task_status_start#{jsonTestDetails['buildID']}")
ActiveRecord::Base.transaction do
begin
t1 = Time.now
Rails.logger.info("@@@222222#{params[:jsonTestDetails]}")
jsonTestDetails = JSON.parse(params[:jsonTestDetails])
timeCost = JSON.parse(params[:timeCost])
brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present?
@ -130,8 +130,8 @@ class MyshixunsController < ApplicationController
# is_public = test_sets.where(:position => j_test_set['caseId']).first.try(:is_public)
logger.info "actual_output:################################################# #{actual_output}"
ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f
ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f
ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f if j_test_set['testSetTime']
ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f if j_test_set['testSetMem']
Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'],
:actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index,
@ -210,10 +210,10 @@ class MyshixunsController < ApplicationController
end
uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
sucess_status
rescue Exception => e
tip_exception(e.message)
uid_logger_error("training_task_status error: #{e}")
raise ActiveRecord::Rollback
# rescue Exception => e
# tip_exception(e.message)
# uid_logger_error("training_task_status error: #{e}")
# raise ActiveRecord::Rollback
end
end
end

@ -171,7 +171,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
#log_reg_content{border-radius: 5px;background: #FFFFff;width: 100%;text-align: center;position: absolute;top: 165px;
left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;margin: 0px 20px;cursor: pointer;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;
/*margin: 0px 20px;*/
cursor: pointer;}
.log_nav li.active{border-bottom: 2px solid #459be5;}
.log-botton{width: 100%;text-align: center;color: #FFFFff!important;display: block;background: #cbcbcb;height: 45px;line-height: 45px;border-radius: 4px;letter-spacing: 2px;cursor: pointer}
.log-botton:hover{color: #FFFFff!important;}

@ -2,7 +2,7 @@ import React from "react";
import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage ,SetAppModel} from 'educoder';
import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educoder';
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
@ -18,10 +18,18 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
const debugType =""
// window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
// window._debugType = debugType;
let debugType =""
if (isDev) {
const _search = window.location.search;
let parsed = {};
if (_search) {
parsed = queryString.parse(_search);
}
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || ''
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({
type:types,
page:1,
newshixunmodallist:[]
newshixunmodallist:undefined
})
this.funshixunpathlist(Searchvalue,types,true,1)
}
@ -105,7 +105,7 @@ class PathModal extends Component{
SenttotheSearch=(value)=>{
this.setState({
page:1,
newshixunmodallist:[]
newshixunmodallist:undefined
})
let{type}=this.state;
this.funshixunpathlist(value,type,true,1)
@ -267,12 +267,19 @@ class PathModal extends Component{
margin-top:0px !important;
height: 40px;
}
`}
</style>
{ newshixunmodallist&&newshixunmodallist.length===0?"":<div className="over210 pl20 pr20"
{ newshixunmodallist === undefined ? <div className="over210 pl20 pr20" style={{height:"204px"}}></div>:newshixunmodallist&&newshixunmodallist.length===0?<div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}>
style={{height:"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{

@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训
shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[];
if (this.props.singleChoose == true) {
if (list.length > 0) {
@ -330,7 +329,7 @@ debugger
<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit}
style={{height:"158px"}}>
>
<style>
{
`
@ -355,8 +354,12 @@ debugger
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{
console.log(item)
newshixunmodallist === undefined ? "":newshixunmodallist.length===0?
<div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:newshixunmodallist.map((item,key)=>{
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">

@ -20,7 +20,7 @@ import ShixunAnswer from './question/shixunAnswer'
import update from 'immutability-helper'
import axios from 'axios';
import './new/common.css'
const Textarea =Input.TextArea
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',

@ -222,6 +222,7 @@ class Exercisestatisticalresult extends Component {
)
}):
<Exercisetablesmubu
tableNum={key}
data={item.ques_details}
type={item.ques_type}
effictive_counts={item.effictive_counts}

@ -1,8 +1,14 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {WordsBtn, MarkdownToHtml} from 'educoder';
import {Table,Progress} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Exercisetablesmubus extends Component {
constructor(props) {
@ -19,12 +25,17 @@ class Exercisetablesmubus extends Component {
render() {
let {data,type,effictive_counts,choicetype}=this.props;
let {data,type,effictive_counts,choicetype, tableNum}=this.props;
let datas=[];
data&&data.forEach((item,key)=>{
datas.push({
commit_percent:{num:item.choice_position,value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,type:item.choice_right_boolean},
commit_percent:{
num:item.choice_position,
value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,
type:item.choice_right_boolean,
_type: type
},
min_score:{value:item.choice_users_count,type:item.choice_right_boolean},
max_score:item.choice_percent,
})
@ -40,13 +51,23 @@ class Exercisetablesmubus extends Component {
title: '选项',
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record) => (
<span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong"?text.value:false}
{text.value==="wrong"?"填写了错误答案":false}
{text.value==="有效填写量"?"有效填写量":false}
</span>
),
render: (text, record, index) => {
const _content = <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong" &&
<MarkdownToHtml content={text.value} selector={(tableNum+1) + '' + (index+1)}></MarkdownToHtml>
}
{text.value==="wrong" && "填写了错误答案" }
{text.value==="有效填写量" && "有效填写量" }
</span>
return (
(text._type === 0 || text._type === 1) ? <div style={{ display: 'flex'}}>
{<span style={{ 'margin-right': '4px', 'margin-top': '-2px'}}>{tagArray[index]}.</span>}
{_content}
</div> : <React.Fragment>{_content}</React.Fragment>
)
},
}, {
title: '小计',
dataIndex: 'min_score',

@ -93,9 +93,9 @@ class SingleDisplay extends Component{
<div className="options">
{ question_choices.map((item, optionIndex) => {
let prefix = undefined
if (!isPreviewPage) {
// if (!isPreviewPage) {
prefix = `${tagArray[optionIndex]}.`
}
// }
if (question_type == 0) { // 单选
return (
<div className="mb10 clearfix" key={optionIndex}>

@ -33,4 +33,8 @@
.singleDisplay .options .markdown-body {
max-width: 1116px;
}
.singleDisplay .ant-radio-wrapper span:last-child
, .singleDisplay .ant-checkbox-wrapper span:last-child {
padding-right: 0px;
}

@ -4,9 +4,9 @@ import {markdownToHTML} from 'educoder'
import axios from 'axios'
const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Multiple extends Component{
constructor(props){
@ -41,14 +41,17 @@ class Multiple extends Component{
let isStudent =this.props.isStudent();
console.log(questionType);
return(
<div className="pl30 pr30">
<div className="pl30 pr30 singleDisplay">
<Checkbox.Group disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} defaultValue={questionType.user_answer}>
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return(
<p className="clearfix mb15 df">
<Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox>
<span class="fl lineh-20 mt1"></span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
<Checkbox className="fl lineh-20 " value={item.choice_id}>{prefix}</Checkbox>
{/* <span class="fl lineh-20 mt1"></span> */}
<span style={{display:"inline-block"}} className="markdown-body " dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p>
)
})

@ -4,9 +4,9 @@ import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder'
import axios from 'axios'
const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class single extends Component{
constructor(props){
@ -36,14 +36,16 @@ class single extends Component{
let isStudent =this.props.isStudent();
return(
<div className="pl30 pr30">
<div className="pl30 pr30 singleDisplay">
<Radio.Group disabled={ user_exercise_status == 1 ? true : false } defaultValue={questionType.user_answer[0]} onChange={this.changeItem}>
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}></Radio>
<span className="fl lineh-20 mr3 mt1"></span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
<Radio className="fl lineh-20" value={item.choice_id}>{prefix}</Radio>
{/* <span className="fl lineh-20 mr3 "></span> */}
<span style={{display:"inline-block", 'margin-top': '-1px'}} className="markdown-body fl " dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p>
)
})

@ -117,7 +117,6 @@ class GraduationTasksSubmitnew extends Component{
}
// 附件相关 START
handleChange = (info) => {
debugger
if (info.file.status === 'uploading') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });

@ -1,309 +1,307 @@
import React,{ Component } from "react";
import '../../css/members.css'
import '../../css/busyWork.css'
import '../style.css'
import { WordsBtn } from 'educoder'
import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals"
import axios from 'axios'
import { Modal,Select,Input } from "antd";
const Option = Select.Option
class GraduateTopicDetailTable extends Component{
constructor(props){
super(props);
this.state={
modalsType:false,
modalsTopval:'',
operationId:undefined,
agreeFlag:false,
classesId:undefined,
agreeCheck:false,
visible:false,
un_addClass:undefined,
un_addClass_notice:"",
un_choose_notice:""
}
}
// 拒绝
aboutTopic=(id)=>{
this.setState({
modalsType:true,
modalsTopval:'是否确认拒绝学生选题?',
operationId:id
})
}
cancelAboutTopic=()=>{
this.setState({
modalsType:false,
modalsTopval:''
})
}
sureAboutTopic=()=>{
let{operationId}=this.state
let courseId=this.props.match.params.course_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId;
axios.post(url).then((result)=>{
if(result.data.status==0){
this.props.showNotification(`${result.data.message}`);
this.setState({
modalsType:false,
modalsTopval:''
})
//成功后调用列表接口,刷新
this.props.getDetailList(this.props.page);
}
}).catch((error)=>{
console.log(error);
})
this.setState({
modalsType:false,
modalsTopval:''
})
}
//同意
agreeTopic=(id)=>{
this.setState({
agreeFlag:true,
operationId:id
})
}
hideAgreeTopic=()=>{
this.setState({
agreeFlag:false,
classesId:undefined
})
}
sureAgreeTopic=(count)=>{
if(count > 0){
debugger
let{tableData}=this.props;
let{operationId,classesId}=this.state
let courseId=this.props.match.params.course_id;
let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
this.agreeChoose(courseId,operationId,classesId,name);
}else{
this.setState({
un_choose_notice:"请先添加分班"
})
}
}
agreeChoose=(courseId,operationId,classesId,courseName)=>{
let graduation_topic_id=this.props.match.params.graduation_topic_id;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`;
axios.post(url,{
student_graduation_topic_id:operationId,
group_id:classesId,
course_group_name:courseName
}).then((result)=>{
if(result.data.status==0){
this.props.showNotification(`${result.data.message}`);
this.setState({
agreeFlag:false,
agreeCheck:true,
visible:false
})
//成功后调用列表接口,刷新
this.props.getDetailList(this.props.page);
}
}).catch((error)=>{
console.log(error);
})
}
//切换分班
changeClasses=(value)=>{
debugger
this.setState({
classesId:value
})
}
//新增分班
topicAddClasses=()=>{
this.setState({
visible:true,
agreeFlag:false
})
}
hideClasses=()=>{
this.setState({
visible:false,
classesId:undefined
})
}
//新建分班--输入分班
inputClasses=(e)=>{
this.setState({
un_addClass:e.target.value
})
}
// 新建分班---确定
sureAddClass=()=>{
let {un_addClass}=this.state;
if(!un_addClass){
this.setState({
un_addClass_notice:"请输入分班名称"
})
return;
}
console.log(this.props)
let{operationId}=this.state
let courseId=this.props.match.params.course_id;
this.agreeChoose(courseId,operationId,-1,un_addClass);
}
render(){
let {page,tableData}=this.props
let { modalsType,modalsTopval,agreeFlag,classesId,visible
,un_addClass_notice
,un_addClass,
un_choose_notice
} = this.state
const isAdmin =this.props.isAdmin();
const isStudent =this.props.isStudent();
const isNotMember=this.props.isNotMember();
console.log(un_addClass_notice)
return(
<div className="minH-560 edu-back-white">
<div className="TopicDetailTable">
<div className="topHead edu-txt-center">
<span style={{"width":"5%"}}>序号</span>
<span style={{"width":"12%"}}>姓名</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"15%"}}>分班</span>
<span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"12%"}} className="fr">操作</span>
{
isAdmin &&
<span style={{"width":"12%"}} className="fr">确认结果</span>
}
</div>
{/* 拒绝弹框 */}
<Modals
modalsType={modalsType}
modalsTopval={modalsTopval}
modalsBottomval=""
modalCancel={this.cancelAboutTopic}
modalSave={this.sureAboutTopic}
></Modals>
{/* 同意弹框 */}
<Modal
title="同意选题"
visible={agreeFlag}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
keyboard={false}
>
<div className="newupload_conbox">
<p className="color-grey-9 mb15 edu-txt-center">确认同意学生的选题将学生加入我的分班</p>
<div className="df">
<span className="lineh-40 mr10">选择</span>
<div className="flex1">
<Select placeholder="请选择分班" style={{"width":"100%"}} value={classesId} onChange={this.changeClasses}>
{
tableData.group_list && tableData.group_list.map((item,key)=>{
return(
<Option value={item.group_id} key={key}>{item.group_name}</Option>
)
})
}
<Option key="0"><a onClick={this.topicAddClasses} style={{display:"block"}}>添加分班</a></Option>
</Select>
<p style={{height:"20px",lineHeight:"20px"}}><span className="color-orange-tip">{un_choose_notice}</span></p>
</div>
</div>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideAgreeTopic} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.sureAgreeTopic(tableData.group_list.length)}>确定</a>
</div>
</div>
</Modal>
<Modal
visible={visible}
title="新建分班"
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
keyboard={false}
>
<div className="newupload_conbox">
<div className="df">
<span className="lineh-40 mr10">分班</span>
<div className="flex1">
<Input className="input-flex-40" value={un_addClass} onInput={this.inputClasses} placeholder="示例:分班(最佳4个字符)"></Input>
<p style={{height:"20px",lineHeight:"20px"}}>
<span className="color-orange-tip">{un_addClass_notice}</span>
</p>
</div>
</div>
<div className="clearfix edu-txt-center">
<a onClick={this.hideClasses} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.sureAddClass}>确定</a>
</div>
</div>
</Modal>
<div className="bottomBody">
{
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
return(
<li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>}
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>
<span style={{"width":"15%"}}>{item.selected_time}</span>
{
isAdmin &&
<span style={{"width":"12%"}} className="fr">
{
item.result == "待确认" ?
<span>
<a className="mr20 color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
<a className="color-blue" onClick={()=>this.agreeTopic(`${item.id}`)}>同意</a>
</span>:
(
item.result === "已拒绝" ? <span className="color-grey-B3">--</span>
:
<a className="color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
)
}
</span>
}
{
isStudent &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-red":"fr"}>{item.result}</span>
}
{
isAdmin &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
}
{
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
}
</li>
)
})
}
{
tableData.users_list && tableData.users_list.length == 0 && <NoneData></NoneData>
}
</div>
</div>
</div>
)
}
}
import React,{ Component } from "react";
import '../../css/members.css'
import '../../css/busyWork.css'
import '../style.css'
import { WordsBtn } from 'educoder'
import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals"
import axios from 'axios'
import { Modal,Select,Input } from "antd";
const Option = Select.Option
class GraduateTopicDetailTable extends Component{
constructor(props){
super(props);
this.state={
modalsType:false,
modalsTopval:'',
operationId:undefined,
agreeFlag:false,
classesId:undefined,
agreeCheck:false,
visible:false,
un_addClass:undefined,
un_addClass_notice:"",
un_choose_notice:""
}
}
// 拒绝
aboutTopic=(id)=>{
this.setState({
modalsType:true,
modalsTopval:'是否确认拒绝学生选题?',
operationId:id
})
}
cancelAboutTopic=()=>{
this.setState({
modalsType:false,
modalsTopval:''
})
}
sureAboutTopic=()=>{
let{operationId}=this.state
let courseId=this.props.match.params.course_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId;
axios.post(url).then((result)=>{
if(result.data.status==0){
this.props.showNotification(`${result.data.message}`);
this.setState({
modalsType:false,
modalsTopval:''
})
//成功后调用列表接口,刷新
this.props.getDetailList(this.props.page);
}
}).catch((error)=>{
console.log(error);
})
this.setState({
modalsType:false,
modalsTopval:''
})
}
//同意
agreeTopic=(id)=>{
this.setState({
agreeFlag:true,
operationId:id
})
}
hideAgreeTopic=()=>{
this.setState({
agreeFlag:false,
classesId:undefined
})
}
sureAgreeTopic=(count)=>{
if(count > 0){
let{tableData}=this.props;
let{operationId,classesId}=this.state
let courseId=this.props.match.params.course_id;
let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
this.agreeChoose(courseId,operationId,classesId,name);
}else{
this.setState({
un_choose_notice:"请先添加分班"
})
}
}
agreeChoose=(courseId,operationId,classesId,courseName)=>{
let graduation_topic_id=this.props.match.params.graduation_topic_id;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`;
axios.post(url,{
student_graduation_topic_id:operationId,
group_id:classesId,
course_group_name:courseName
}).then((result)=>{
if(result.data.status==0){
this.props.showNotification(`${result.data.message}`);
this.setState({
agreeFlag:false,
agreeCheck:true,
visible:false
})
//成功后调用列表接口,刷新
this.props.getDetailList(this.props.page);
}
}).catch((error)=>{
console.log(error);
})
}
//切换分班
changeClasses=(value)=>{
this.setState({
classesId:value
})
}
//新增分班
topicAddClasses=()=>{
this.setState({
visible:true,
agreeFlag:false
})
}
hideClasses=()=>{
this.setState({
visible:false,
classesId:undefined
})
}
//新建分班--输入分班
inputClasses=(e)=>{
this.setState({
un_addClass:e.target.value
})
}
// 新建分班---确定
sureAddClass=()=>{
let {un_addClass}=this.state;
if(!un_addClass){
this.setState({
un_addClass_notice:"请输入分班名称"
})
return;
}
console.log(this.props)
let{operationId}=this.state
let courseId=this.props.match.params.course_id;
this.agreeChoose(courseId,operationId,-1,un_addClass);
}
render(){
let {page,tableData}=this.props
let { modalsType,modalsTopval,agreeFlag,classesId,visible
,un_addClass_notice
,un_addClass,
un_choose_notice
} = this.state
const isAdmin =this.props.isAdmin();
const isStudent =this.props.isStudent();
const isNotMember=this.props.isNotMember();
console.log(un_addClass_notice)
return(
<div className="minH-560 edu-back-white">
<div className="TopicDetailTable">
<div className="topHead edu-txt-center">
<span style={{"width":"5%"}}>序号</span>
<span style={{"width":"12%"}}>姓名</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"15%"}}>分班</span>
<span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"12%"}} className="fr">操作</span>
{
isAdmin &&
<span style={{"width":"12%"}} className="fr">确认结果</span>
}
</div>
{/* 拒绝弹框 */}
<Modals
modalsType={modalsType}
modalsTopval={modalsTopval}
modalsBottomval=""
modalCancel={this.cancelAboutTopic}
modalSave={this.sureAboutTopic}
></Modals>
{/* 同意弹框 */}
<Modal
title="同意选题"
visible={agreeFlag}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
keyboard={false}
>
<div className="newupload_conbox">
<p className="color-grey-9 mb15 edu-txt-center">确认同意学生的选题将学生加入我的分班</p>
<div className="df">
<span className="lineh-40 mr10">选择</span>
<div className="flex1">
<Select placeholder="请选择分班" style={{"width":"100%"}} value={classesId} onChange={this.changeClasses}>
{
tableData.group_list && tableData.group_list.map((item,key)=>{
return(
<Option value={item.group_id} key={key}>{item.group_name}</Option>
)
})
}
<Option key="0"><a onClick={this.topicAddClasses} style={{display:"block"}}>添加分班</a></Option>
</Select>
<p style={{height:"20px",lineHeight:"20px"}}><span className="color-orange-tip">{un_choose_notice}</span></p>
</div>
</div>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideAgreeTopic} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.sureAgreeTopic(tableData.group_list.length)}>确定</a>
</div>
</div>
</Modal>
<Modal
visible={visible}
title="新建分班"
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
keyboard={false}
>
<div className="newupload_conbox">
<div className="df">
<span className="lineh-40 mr10">分班</span>
<div className="flex1">
<Input className="input-flex-40" value={un_addClass} onInput={this.inputClasses} placeholder="示例:分班(最佳4个字符)"></Input>
<p style={{height:"20px",lineHeight:"20px"}}>
<span className="color-orange-tip">{un_addClass_notice}</span>
</p>
</div>
</div>
<div className="clearfix edu-txt-center">
<a onClick={this.hideClasses} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.sureAddClass}>确定</a>
</div>
</div>
</Modal>
<div className="bottomBody">
{
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
return(
<li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>}
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>
<span style={{"width":"15%"}}>{item.selected_time}</span>
{
isAdmin &&
<span style={{"width":"12%"}} className="fr">
{
item.result == "待确认" ?
<span>
<a className="mr20 color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
<a className="color-blue" onClick={()=>this.agreeTopic(`${item.id}`)}>同意</a>
</span>:
(
item.result === "已拒绝" ? <span className="color-grey-B3">--</span>
:
<a className="color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
)
}
</span>
}
{
isStudent &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-red":"fr"}>{item.result}</span>
}
{
isAdmin &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
}
{
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
}
</li>
)
})
}
{
tableData.users_list && tableData.users_list.length == 0 && <NoneData></NoneData>
}
</div>
</div>
</div>
)
}
}
export default GraduateTopicDetailTable;

@ -1,5 +1,6 @@
import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios';
import "../css/Courses.css";
import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -7,6 +8,7 @@ import moment from 'moment';
import Modals from '../../modals/Modals';
const { Option } = Select;
@ -134,7 +136,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state
// console.log(is_public)
if (coursesId != undefined) {
// 编辑
@ -180,7 +181,7 @@ class CoursesNew extends Component {
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
end_date: datatime,
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
@ -234,7 +235,7 @@ class CoursesNew extends Component {
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
end_date: datatime,
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
@ -285,12 +286,13 @@ class CoursesNew extends Component {
// console.log(e.target.checked);
}
Searchvalue=(value)=>{
let url="/courses/search_course_list.json";
axios.post(url,{
search:value
}).then((result)=>{
// console.log(result.data)
if (result.data.message===undefined) {
if (result.data.status===0) {
this.setState({
searchlist: result.data.course_lists,
// course:value,
@ -305,14 +307,19 @@ class CoursesNew extends Component {
})
}
handleSearch=(value)=>{
this.props.form.setFieldsValue({
classroom:value,
course:value
});
this.Searchvalue(value)
if(value!=""){
this.props.form.setFieldsValue({
classroom:value,
course:value
});
this.Searchvalue(value)
}
};
handleChange=(value)=>{
this.props.form.setFieldsValue({
course:value,
classroom:value
@ -321,13 +328,24 @@ class CoursesNew extends Component {
handleSearchschool=(value)=>{
this.props.form.setFieldsValue({
school:value,
fetching:true,
});
this.Searchvalue(value)
if(value!="") {
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
this.getschool(value)
}
};
handleChangeschools=(value)=>{
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
}
handleChangeschool=(value)=>{
this.setState({
@ -339,35 +357,56 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
let url="/schools/school_list.json";
axios.get(url,{
params: {
search: value
}
}).then((result)=>{
if (result.data.message===undefined) {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
scholl: value
school: value
})
this.props.form.setFieldsValue({
scholl: value
school: value
})
}
}).catch((error)=>{
console.log(error)
})
}
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime} = this.state;
let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
const options = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
const optionschool = this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
// console.log(this.props.current_user.user_school)
// form合并了
// console.log(optionschool)
return (
<React.Fragment>
<div>
<style>
{
`
.color-green-light {
color: #45E660!important;
}
`
}
</style>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...propsWithoutForm}></ApplyForAddOrgModal>
{/*提示*/}
<Modals
modalsType={this.state.Modalstype}
@ -412,31 +451,9 @@ class CoursesNew extends Component {
}
`}
</style>
<div className="stud-class-set bor-bottom-greyE padding10200">
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', {
rules: [{required: true, message: "不能为空"}],
})(
<Select
showSearch
className={"fl construction mr10 "}
placeholder="请输入并选择课本堂的所属单位"
// value={this.state.school}
onSearch={this.handleSearchschool}
// notFoundContent={this.state.fetching ? <Spin size="small" /> : null}
onChange={this.handleChangeschool}
onFocus={()=>this.getschool("")}
allowClear={true}
>
{optionschool}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>
<div id='isschool'></div>
</Form.Item>
</div>
{/*<div className="stud-class-set bor-bottom-greyE padding10200">*/}
{/*</div>*/}
<div className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}>
@ -456,7 +473,6 @@ class CoursesNew extends Component {
>
{options}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
@ -606,7 +622,7 @@ class CoursesNew extends Component {
</Form.Item>
</span>
</div>
<div className="stud-class-set padding10200 coursenavbox">
<div className="stud-class-set padding10200 coursenavbox bor-bottom-greyE">
<Form.Item
label="公开设置"
hasFeedback
@ -620,9 +636,45 @@ class CoursesNew extends Component {
<span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span>
</Form.Item>
</div>
<div className="stud-class-set padding10200 coursenavbox mb20">
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', {
rules: [{required: true, message: "不能为空"}],
})(
<Select
showSearch
className={"fl construction mr10 "}
placeholder="请输入并选择课本堂的所属单位"
// value={this.state.school}
onSearch={this.handleSearchschool}
// notFoundContent={this.state.fetching ? <Spin size="small" /> : null}
onChange={this.handleChangeschools}
allowClear={true}
>
{optionschool}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>
<div id='isschool'></div>
</Form.Item>
{searchlistscholl.length===0?<div style={{height:"20px",lineHeight:"20px"}} className="ml20">
<span>
<span style={{color: '#CDCDCD'}}>未找到包含{school}的高校</span>
<span style={{color: '#4CACFF', cursor: 'pointer'}} onClick={this.showApplyForAddOrgModal}>申请新增</span>
</span>
</div>:""}
</div>
<div className={"FAFAFA"}>
<Form.Item wrapperCol={{span: 12, offset: 5}}>
<div className="clearfix mt80 mb30">
<Form.Item >
<div className="clearfix mt40 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交
</Button>

@ -2074,7 +2074,6 @@ class PollNew extends Component {
//最小值
HandleGradationGroupChangee = (value, index, max, length) => {
debugger
var minbool = false;
var maxbool = false;
let arr = this.state.adddom;

@ -993,7 +993,7 @@ class Listofworksstudentone extends Component {
}
axios.post(urll, datasysl).then((result) => {
console.log("980000000____________________");
debugger
if(result === undefined){
return
}

@ -337,6 +337,7 @@ class LoginDialog extends Component {
}
loginEDU=()=>{
let {loginValue,passValue,regular,isGoingValue}=this.state;
if(regular===1){
return
@ -372,14 +373,16 @@ class LoginDialog extends Component {
this.setState({
isRender:false
})
this.props.Modifyloginvalue();
window.location.reload();
}
}
try {
this.props.Modifyloginvalue();
}catch (e) {
}
// try {
// this.props.Modifyloginvalue();
// }catch (e) {
//
// }
}).catch((error) => {
console.log("356");
console.log(error)
@ -408,6 +411,7 @@ class LoginDialog extends Component {
<Dialog open={true} id="DialogID"
style={{ display: isRender==false? 'none' : ''}}
disableEscapeKeyDown={true}
disableBackdropClick={true}
onClose={() => this.handleDialogClose()}
>
{isRender===true?
@ -474,7 +478,7 @@ class LoginDialog extends Component {
登录
</div>
<p className="clearfix mt10">
<p className="clearfix mt20">
<span className="fl">
<input type="checkbox"

@ -376,7 +376,7 @@ class Trialapplication extends Component {
// console.log(this.props);
return (
<div>
<div style={{ariaHidden:"true",dataBackdrop:"static"}}>
{
isRenders === false ? "" :

@ -394,7 +394,7 @@ class Trialapplicationysl extends Component {
// console.log(this.props);
return (
<div>
<div style={{ariaHidden:"true",dataBackdrop:"static"}}>
{
isRenders === false ? "" :

@ -298,7 +298,6 @@ class DetailCardsEditAndAdd extends Component{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
debugger
this.setState({
hometypepvisible:true
})

@ -139,21 +139,20 @@ class PathDetailIndex extends Component{
let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status == 407 || result.data.status == 401) {
if (result.data.status === 407 || result.data.status === 401) {
return;
}
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
items: getItems(result.data.members.length),
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
if (result.data.status === 403) {
return;
}
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
items: getItems(result.data.members.length),
})
}
}).catch((error)=>{
console.log(error);
@ -168,6 +167,9 @@ class PathDetailIndex extends Component{
if (result.data.status == 407 || result.data.status == 401) {
return;
}
if (result.data.status === 403 ) {
return;
}
if(result.data.allow_visit===true){
this.setState({
@ -175,13 +177,8 @@ class PathDetailIndex extends Component{
items: getItems(result.data.members.length),
user_id:undefined,
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
}).catch((error)=>{
console.log(error);
})

@ -487,7 +487,6 @@ submittojoinclass=(value)=>{
}
showSearchOpen=(e)=>{
debugger
this.setState({
showSearchOpentype:true
})
@ -495,7 +494,6 @@ submittojoinclass=(value)=>{
}
hideshowSearchOpen=(e)=>{
debugger
let {setevaluatinghides}=this.state;
if(setevaluatinghides===true){
this.setState({
@ -520,7 +518,6 @@ submittojoinclass=(value)=>{
}
setevaluatinghides=()=>{
debugger
this.setState(
{
setevaluatinghides:true
@ -602,7 +599,6 @@ submittojoinclass=(value)=>{
// rolearr:["",""],
// console.log("618");
// console.log(user_phone_binded);
console.log(showSearchOpentype)
return (
<div className="newHeader" id="nHeader" >

@ -136,7 +136,7 @@ body>.-task-title {
margin-right: 20px;
}
.HeaderSearch .ant-input-search .ant-input{
height:30px;
/*height:30px;*/
background: #373e3f !important;
border: 1px solid #373e3f !important;

File diff suppressed because it is too large Load Diff

@ -51,7 +51,7 @@ export default class TpmQuestionMain extends Component {
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval}></TPMMDEditor>
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval} height={700}></TPMMDEditor>
</div>
<div>
<span

@ -71,7 +71,23 @@ class InterestpageComponent extends Component {
}if(response.data.repertoires[i].id===9){
qdkfys=rgzn;
}
var datas={id:response.data.repertoires[i].id,name:response.data.repertoires[i].name,bool:false,url:qdkfys};
if(response.data.repertoires[i].id===1) {
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: true,
url: qdkfys
};
} else{
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: false,
url: qdkfys
};
}
gouxuans4.push(datas);
this.setState({
gouxuans4:gouxuans4,
@ -166,7 +182,7 @@ class InterestpageComponent extends Component {
//兴趣页面点击
Interestcompletionpage(){
if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业");
this.openNotification("请选择职业");
return
}
@ -177,7 +193,7 @@ class InterestpageComponent extends Component {
}
}
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -188,11 +204,11 @@ class InterestpageComponent extends Component {
if (response !== undefined) {
// this.Jumptotheinterestpage();
// window.location.href = "/"
if(response.data.message!==undefined){
if(response.data.status===0){
return;
this.setMyEduCoderModals()
}
this.setMyEduCoderModals()
}
@ -258,15 +274,15 @@ class InterestpageComponent extends Component {
<div className="ysldivhome1" >
<div className="ysldivhomediv" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("teacher")}>{gouxuans ==="teacher"? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimgsy" ><img src={skzbdx} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy" ><img onClick={()=>this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("student")}>{gouxuans==="student"? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimgsy"><img src={mytc} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy"><img onClick={()=>this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("professional")}>{gouxuans==="professional"?<img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimgsy"><img src={zyrs1} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy"><img onClick={()=>this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg"/></div>
</div>
</div>
<p className="yslspans2">选择你可能感兴趣的内容</p>

@ -71,7 +71,23 @@ class InterestpageMax extends Component {
}if(response.data.repertoires[i].id===9){
qdkfys=rgzn;
}
var datas={id:response.data.repertoires[i].id,name:response.data.repertoires[i].name,bool:false,url:qdkfys};
if(response.data.repertoires[i].id===1) {
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: true,
url: qdkfys
};
} else{
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: false,
url: qdkfys
};
}
gouxuans4.push(datas);
this.setState({
gouxuans4:gouxuans4,
@ -166,8 +182,12 @@ class InterestpageMax extends Component {
//兴趣页面点击
Interestcompletionpage(){
this.setState({
setpagecomplet:true
})
if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业");
this.openNotification("请选择职业");
return
}
@ -178,7 +198,7 @@ class InterestpageMax extends Component {
}
}
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -189,12 +209,9 @@ class InterestpageMax extends Component {
if (response !== undefined) {
// this.Jumptotheinterestpage();
// window.location.href = "/"
if(response.data.message!==undefined){
return;
if(response.data.status===0){
this.setMyEduCoderModals()
}
this.setMyEduCoderModals()
}
@ -260,15 +277,15 @@ class InterestpageMax extends Component {
<div className="ysldivhome12" >
<div className="ysldivhomediv222" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("teacher")}>{gouxuans ==="teacher"? <img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimg2" ><img src={skzbdx} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2" ><img onClick={()=>this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg2"/></div>
</div>
<div className="ysldivhomediv222" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("student")}>{gouxuans==="student"? <img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimg2"><img src={mytc} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2"><img onClick={()=>this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg2"/></div>
</div>
<div className="ysldivhomediv222" >
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("professional")}>{gouxuans==="professional"?<img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimg2"><img src={zyrs1} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2"><img onClick={()=>this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg2"/></div>
</div>
</div>
<div><span className="yslspans22">选择你可能感兴趣的内容</span></div>
@ -285,7 +302,7 @@ class InterestpageMax extends Component {
)
})}
</div>
<Button className="yslbutton2" size={"large"} type="primary"onClick={()=>this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成</Button>
<Button className="yslbutton2" size={"large"} type="primary"onClick={this.state.setpagecomplet===true?"":()=>this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成</Button>
</div>
</div>

@ -70,7 +70,7 @@
margin-right: 129px;
}
.ysldivhome2{
width: 100%;
width: 800px;
display: flex;
flex-flow: row wrap;
align-content:stretch;

@ -71,6 +71,7 @@
margin-top: 10px;
}
.ysldivhome22{
width: 800px;
display: flex;
flex-flow: row wrap;
align-content:stretch;

@ -173,7 +173,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
#log_reg_content{border-radius: 5px;background: #FFFFff;width: 100%;text-align: center;position: absolute;top: 165px;
left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;margin: 0px 20px;cursor: pointer;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;
/*margin: 0px 20px;*/
cursor: pointer;}
.log_nav li.active{border-bottom: 2px solid #459be5;}
.log-botton{width: 100%;text-align: center;color: #FFFFff!important;display: block;background: #cbcbcb;height: 45px;line-height: 45px;border-radius: 4px;letter-spacing: 2px;cursor: pointer}
.log-botton:hover{color: #FFFFff!important;}

Loading…
Cancel
Save