Merge branch 'dev_aliyun' into develop

dev_forum
daiao 5 years ago
commit f96a0f747d

@ -32,8 +32,11 @@ class AccountsController < ApplicationController
end 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}") 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) # 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 # todo 上线前请删除万能验证码"513231"
return normal_status(-2, "验证码已失效") if !verifi_code&.effective? 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 code = generate_identifier User, 8
login = pre + code 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" # params[:pics] = "a.png,b.png,c.png"
def training_task_status def training_task_status
logger.info("##################training_task_status_start#{jsonTestDetails['buildID']}")
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
t1 = Time.now t1 = Time.now
Rails.logger.info("@@@222222#{params[:jsonTestDetails]}")
jsonTestDetails = JSON.parse(params[:jsonTestDetails]) jsonTestDetails = JSON.parse(params[:jsonTestDetails])
timeCost = JSON.parse(params[:timeCost]) timeCost = JSON.parse(params[:timeCost])
brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present? 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) # is_public = test_sets.where(:position => j_test_set['caseId']).first.try(:is_public)
logger.info "actual_output:################################################# #{actual_output}" logger.info "actual_output:################################################# #{actual_output}"
ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).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 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'], 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, :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index,
@ -210,10 +210,10 @@ class MyshixunsController < ApplicationController
end end
uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
sucess_status sucess_status
rescue Exception => e # rescue Exception => e
tip_exception(e.message) # tip_exception(e.message)
uid_logger_error("training_task_status error: #{e}") # uid_logger_error("training_task_status error: #{e}")
raise ActiveRecord::Rollback # raise ActiveRecord::Rollback
end end
end 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; #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} left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;} .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_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{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;} .log-botton:hover{color: #FFFFff!important;}

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

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({ this.setState({
type:types, type:types,
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
this.funshixunpathlist(Searchvalue,types,true,1) this.funshixunpathlist(Searchvalue,types,true,1)
} }
@ -105,7 +105,7 @@ class PathModal extends Component{
SenttotheSearch=(value)=>{ SenttotheSearch=(value)=>{
this.setState({ this.setState({
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
let{type}=this.state; let{type}=this.state;
this.funshixunpathlist(value,type,true,1) this.funshixunpathlist(value,type,true,1)
@ -267,12 +267,19 @@ class PathModal extends Component{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
`} `}
</style> </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} onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}> style={{height:"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{ {

@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[]; let newpatheditarry=[];
if (this.props.singleChoose == true) { if (this.props.singleChoose == true) {
if (list.length > 0) { if (list.length > 0) {
@ -330,7 +329,7 @@ debugger
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{height:"158px"}}> >
<style> <style>
{ {
` `
@ -355,8 +354,12 @@ debugger
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/} {/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ newshixunmodallist === undefined ? "":newshixunmodallist.length===0?
console.log(item) <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( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide"> <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 update from 'immutability-helper'
import axios from 'axios'; import axios from 'axios';
import './new/common.css'
const Textarea =Input.TextArea const Textarea =Input.TextArea
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',

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

@ -1,8 +1,14 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn, MarkdownToHtml} from 'educoder';
import {Table,Progress} from "antd"; import {Table,Progress} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; 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 { class Exercisetablesmubus extends Component {
constructor(props) { constructor(props) {
@ -19,12 +25,17 @@ class Exercisetablesmubus extends Component {
render() { render() {
let {data,type,effictive_counts,choicetype}=this.props; let {data,type,effictive_counts,choicetype, tableNum}=this.props;
let datas=[]; let datas=[];
data&&data.forEach((item,key)=>{ data&&data.forEach((item,key)=>{
datas.push({ 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}, min_score:{value:item.choice_users_count,type:item.choice_right_boolean},
max_score:item.choice_percent, max_score:item.choice_percent,
}) })
@ -40,13 +51,23 @@ class Exercisetablesmubus extends Component {
title: '选项', title: '选项',
dataIndex: 'commit_percent', dataIndex: 'commit_percent',
key: 'commit_percent', key: 'commit_percent',
render: (text, record) => ( render: (text, record, index) => {
<span style={{color:text.type===true? "#29BD8B":'#333333'}}> const _content = <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong"?text.value:false} {text.value!="有效填写量"&&text.value!="wrong" &&
{text.value==="wrong"?"填写了错误答案":false} <MarkdownToHtml content={text.value} selector={(tableNum+1) + '' + (index+1)}></MarkdownToHtml>
{text.value==="有效填写量"?"有效填写量":false} }
</span> {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: '小计', title: '小计',
dataIndex: 'min_score', dataIndex: 'min_score',

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

@ -33,4 +33,8 @@
.singleDisplay .options .markdown-body { .singleDisplay .options .markdown-body {
max-width: 1116px; 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' import axios from 'axios'
const tagArray = [ const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class Multiple extends Component{ class Multiple extends Component{
constructor(props){ constructor(props){
@ -41,14 +41,17 @@ class Multiple extends Component{
let isStudent =this.props.isStudent(); let isStudent =this.props.isStudent();
console.log(questionType); console.log(questionType);
return( 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}> <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)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return( return(
<p className="clearfix mb15 df"> <p className="clearfix mb15 df">
<Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox> <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 mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span> {/* <span class="fl lineh-20 mt1"></span> */}
<span style={{display:"inline-block"}} className="markdown-body " dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p> </p>
) )
}) })

@ -4,9 +4,9 @@ import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder' import {markdownToHTML} from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class single extends Component{ class single extends Component{
constructor(props){ constructor(props){
@ -36,14 +36,16 @@ class single extends Component{
let isStudent =this.props.isStudent(); let isStudent =this.props.isStudent();
return( 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}> <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)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return( return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}> <p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}></Radio> <Radio className="fl lineh-20" value={item.choice_id}>{prefix}</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> {/* <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> </p>
) )
}) })

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

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

@ -1,5 +1,6 @@
import React, {Component} from "React"; import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd"; import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios'; import axios from 'axios';
import "../css/Courses.css"; import "../css/Courses.css";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -7,6 +8,7 @@ import moment from 'moment';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const { Option } = Select; const { Option } = Select;
@ -134,7 +136,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId; let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state let {is_public,datatime} = this.state
// console.log(is_public) // console.log(is_public)
if (coursesId != undefined) { if (coursesId != undefined) {
// 编辑 // 编辑
@ -180,7 +181,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,
@ -234,7 +235,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,
@ -285,12 +286,13 @@ class CoursesNew extends Component {
// console.log(e.target.checked); // console.log(e.target.checked);
} }
Searchvalue=(value)=>{ Searchvalue=(value)=>{
let url="/courses/search_course_list.json"; let url="/courses/search_course_list.json";
axios.post(url,{ axios.post(url,{
search:value search:value
}).then((result)=>{ }).then((result)=>{
// console.log(result.data) // console.log(result.data)
if (result.data.message===undefined) { if (result.data.status===0) {
this.setState({ this.setState({
searchlist: result.data.course_lists, searchlist: result.data.course_lists,
// course:value, // course:value,
@ -305,14 +307,19 @@ class CoursesNew extends Component {
}) })
} }
handleSearch=(value)=>{ handleSearch=(value)=>{
this.props.form.setFieldsValue({
classroom:value, if(value!=""){
course:value this.props.form.setFieldsValue({
}); classroom:value,
this.Searchvalue(value) course:value
});
this.Searchvalue(value)
}
}; };
handleChange=(value)=>{ handleChange=(value)=>{
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
course:value, course:value,
classroom:value classroom:value
@ -321,13 +328,24 @@ class CoursesNew extends Component {
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
this.props.form.setFieldsValue({ if(value!="") {
school:value, this.props.form.setFieldsValue({
fetching:true, school: value,
}); fetching: true,
this.Searchvalue(value) });
this.getschool(value)
}
}; };
handleChangeschools=(value)=>{
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
}
handleChangeschool=(value)=>{ handleChangeschool=(value)=>{
this.setState({ this.setState({
@ -339,35 +357,56 @@ class CoursesNew extends Component {
}; };
getschool=(value)=>{ getschool=(value)=>{
let url="/schools/school_list.json"; let url="/schools/school_list.json";
axios.get(url,{ axios.get(url,{
params: { params: {
search: value search: value
} }
}).then((result)=>{ }).then((result)=>{
if (result.data.message===undefined) { if (result.data.status===0) {
this.setState({ this.setState({
searchlistscholl: result.data.school_names, searchlistscholl: result.data.school_names,
scholl: value school: value
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
scholl: value school: value
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
render() { render() {
let {datatime} = this.state; let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form; 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 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) // console.log(this.props.current_user.user_school)
// form合并了
// console.log(optionschool)
return ( return (
<React.Fragment> <React.Fragment>
<div> <div>
<style>
{
`
.color-green-light {
color: #45E660!important;
}
`
}
</style>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...propsWithoutForm}></ApplyForAddOrgModal>
{/*提示*/} {/*提示*/}
<Modals <Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -412,31 +451,9 @@ class CoursesNew extends Component {
} }
`} `}
</style> </style>
<div className="stud-class-set bor-bottom-greyE padding10200"> {/*<div className="stud-class-set bor-bottom-greyE padding10200">*/}
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', { {/*</div>*/}
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 className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}> <div className={"TabsWarpcourse"}>
@ -456,7 +473,6 @@ class CoursesNew extends Component {
> >
{options} {options}
</Select> </Select>
)} )}
<span className={"newcoursestitle fl"}> <span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/} {/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
@ -606,7 +622,7 @@ class CoursesNew extends Component {
</Form.Item> </Form.Item>
</span> </span>
</div> </div>
<div className="stud-class-set padding10200 coursenavbox"> <div className="stud-class-set padding10200 coursenavbox bor-bottom-greyE">
<Form.Item <Form.Item
label="公开设置" label="公开设置"
hasFeedback hasFeedback
@ -620,9 +636,45 @@ class CoursesNew extends Component {
<span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span> <span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span>
</Form.Item> </Form.Item>
</div> </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"}> <div className={"FAFAFA"}>
<Form.Item wrapperCol={{span: 12, offset: 5}}> <Form.Item >
<div className="clearfix mt80 mb30"> <div className="clearfix mt40 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"> <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交 提交
</Button> </Button>

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

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

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

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

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

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

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

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

@ -136,7 +136,7 @@ body>.-task-title {
margin-right: 20px; margin-right: 20px;
} }
.HeaderSearch .ant-input-search .ant-input{ .HeaderSearch .ant-input-search .ant-input{
height:30px; /*height:30px;*/
background: #373e3f !important; background: #373e3f !important;
border: 1px solid #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> <span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20"> <div className="flex1 mr20">
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500} <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>
<div> <div>
<span <span

@ -71,7 +71,23 @@ class InterestpageComponent extends Component {
}if(response.data.repertoires[i].id===9){ }if(response.data.repertoires[i].id===9){
qdkfys=rgzn; 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); gouxuans4.push(datas);
this.setState({ this.setState({
gouxuans4:gouxuans4, gouxuans4:gouxuans4,
@ -166,7 +182,7 @@ class InterestpageComponent extends Component {
//兴趣页面点击 //兴趣页面点击
Interestcompletionpage(){ Interestcompletionpage(){
if(this.state.gouxuans.length === 0){ if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业"); this.openNotification("请选择职业");
return return
} }
@ -177,7 +193,7 @@ class InterestpageComponent extends Component {
} }
} }
if(ints.length<1){ if(ints.length<1){
this.openNotification("内容是最少得选一个"); this.openNotification("请至少选择一个您感兴趣的内容");
return return
} }
var url = "/users/interest.json"; var url = "/users/interest.json";
@ -188,11 +204,11 @@ class InterestpageComponent extends Component {
if (response !== undefined) { if (response !== undefined) {
// this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
// window.location.href = "/" // 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="ysldivhome1" >
<div className="ysldivhomediv" style={{marginLeft:"30px"}} > <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="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>
<div className="ysldivhomediv" style={{ marginLeft:"101px",marginRight:"101px"}}> <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="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>
<div className="ysldivhomediv" > <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="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>
</div> </div>
<p className="yslspans2">选择你可能感兴趣的内容</p> <p className="yslspans2">选择你可能感兴趣的内容</p>

@ -71,7 +71,23 @@ class InterestpageMax extends Component {
}if(response.data.repertoires[i].id===9){ }if(response.data.repertoires[i].id===9){
qdkfys=rgzn; 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); gouxuans4.push(datas);
this.setState({ this.setState({
gouxuans4:gouxuans4, gouxuans4:gouxuans4,
@ -166,8 +182,12 @@ class InterestpageMax extends Component {
//兴趣页面点击 //兴趣页面点击
Interestcompletionpage(){ Interestcompletionpage(){
this.setState({
setpagecomplet:true
})
if(this.state.gouxuans.length === 0){ if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业"); this.openNotification("请选择职业");
return return
} }
@ -178,7 +198,7 @@ class InterestpageMax extends Component {
} }
} }
if(ints.length<1){ if(ints.length<1){
this.openNotification("内容是最少得选一个"); this.openNotification("请至少选择一个您感兴趣的内容");
return return
} }
var url = "/users/interest.json"; var url = "/users/interest.json";
@ -189,12 +209,9 @@ class InterestpageMax extends Component {
if (response !== undefined) { if (response !== undefined) {
// this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
// window.location.href = "/" // window.location.href = "/"
if(response.data.status===0){
if(response.data.message!==undefined){ this.setMyEduCoderModals()
return;
} }
this.setMyEduCoderModals()
} }
@ -260,15 +277,15 @@ class InterestpageMax extends Component {
<div className="ysldivhome12" > <div className="ysldivhome12" >
<div className="ysldivhomediv222" style={{marginLeft:"30px"}} > <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="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>
<div className="ysldivhomediv222" style={{ marginLeft:"101px",marginRight:"101px"}}> <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="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>
<div className="ysldivhomediv222" > <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="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> </div>
<div><span className="yslspans22">选择你可能感兴趣的内容</span></div> <div><span className="yslspans22">选择你可能感兴趣的内容</span></div>
@ -285,7 +302,7 @@ class InterestpageMax extends Component {
) )
})} })}
</div> </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>
</div> </div>

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

@ -71,6 +71,7 @@
margin-top: 10px; margin-top: 10px;
} }
.ysldivhome22{ .ysldivhome22{
width: 800px;
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
align-content:stretch; 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; #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} left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;} .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_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{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;} .log-botton:hover{color: #FFFFff!important;}

Loading…
Cancel
Save