hjm 5 years ago
commit d3cd34b2c1

@ -207,6 +207,12 @@ const UsersInfo = Loadable({
loading: Loading,
})
// 兴趣页面
const Interestpage = Loadable({
loader: () => import('./modules/user/Interestpage'),
loading: Loading,
})
class App extends Component {
constructor(props) {
super(props)
@ -324,8 +330,8 @@ class App extends Component {
</Route> */}
{/* <Route path="/myshixuns/:shixunId/stages/:stageId" component={Index}/> */}
{/* 兴趣页面*/}
{/*<Route path="/interest" component={Interestpage}/>*/}
<Route path="/comment" component={CommentComponent}/>
<Route path="/testMaterial" component={TestMaterialDesignComponent}/>
<Route path="/test" component={TestIndex}/>

@ -38,14 +38,10 @@ class Fileslistitem extends Component{
if(result.data.attachment_histories.length===0){
let link = document.createElement('a');
// link.href = window.URL.createObjectURL(new Blob([result.data.url]));
document.body.appendChild(link);
link.href = result.data.url;
let filesname=encodeURIComponent(result.data.title)
console.log(result.data.title)
link.download = decodeURIComponent(filesname)
link.download = result.data.title;
//兼容火狐浏览器
console.log(result.data.title)
document.body.appendChild(link);
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
@ -300,7 +296,7 @@ class Fileslistitem extends Component{
</WordsBtn>
</span>:""}
{this.props.current_user.login===discussMessage.author.login?
{this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login?
<span className={"fr mrf2 mr10"}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">

@ -7,11 +7,12 @@ import Sendtofilesmodal from "../coursesPublic/SendToFilesModal";
import Selectresource from "../coursesPublic/SelectResource";
import Sendresource from "../coursesPublic/sendResource";
import Selectsetting from "../coursesPublic/SelectSetting";
import CourseLayoutcomponent from '../common/CourseLayoutComponent';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import Fileslistitem from './Fileslistitem';
import Titlesearchsection from '../common/titleSearch/TitleSearchSection';
import './style.css';
import '../css/members.css';
import moment from 'moment';
class Fileslists extends Component{
constructor(props){
@ -232,6 +233,8 @@ class Fileslists extends Component{
this.props.showNotification("请先在列表中选择要发送的资源");
}else if(value===3){
this.props.showNotification("请先在列表中选择要公开的资源");
}else if(value===4){
this.props.showNotification("请先在列表中选择要发布的资源");
}
}
@ -549,7 +552,78 @@ class Fileslists extends Component{
})
}
homeworkstart=()=>{
let selectnum= this.testonSelect();
if(selectnum===true){
this.noSelect(4);
return
}
let starttime= this.props.getNowFormatDates(1);
let endtime=this.props.getNowFormatDates(2);
this.setState({
modalname:"立即发布",
visible:true,
typs:"start",
Topval:"学生将能立即查看和下载发布资源",
// Botvalleft:"暂不发布",
// Botval:`本操作只对"未发布"的分班有效`,
// starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
// starttimes:starttime,
// endtime:"截止时间:"+endtime,
Cancelname:"暂不发布",
Savesname:"立即发布",
Cancel:this.homeworkhide,
Saves:this.homeworkstartend,
})
}
// 立即发布
homeworkstartend=(ds,endtime)=>{
let {checkBoxValues}=this.state;
let coursesId=this.props.match.params.coursesId;
let url ="/files/bulk_publish.json";
axios.put(url, {
course_id:coursesId,
ids :checkBoxValues,
}).then((result)=>{
if(result.status===200){
this.props.showNotification("发布成功")
this.setState({
checkBoxValues:[],
checkAllValue:false
})
this.homeworkhide()
this.props.updataleftNavfun()
this.updatafiled()
}
}).catch((error)=>{
console.log(error);
})
}
homeworkhide=()=>{
this.setState({
modalname:undefined,
modaltype:undefined,
visible:false,
Topval:undefined,
Topvalright:undefined,
Botvalleft:undefined,
Botval:undefined,
starttime:undefined,
endtime:undefined,
Cancelname:undefined,
Savesname:undefined,
Cancel:undefined,
Saves:undefined,
StudentList_value:undefined,
addname:undefined,
addnametype:false,
addnametab:undefined,
typs:undefined,
starttimes:undefined,
})
}
render(){
let { searchValue,
@ -582,6 +656,26 @@ class Fileslists extends Component{
return(
<React.Fragment >
{/*立即发布*/}
{this.state.visible===true?<HomeworkModal
category_id={this.props.match.params.category_id}
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.visible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
starttimes={this.state.starttimes}
typs={this.state.typs}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
/>:""}
{/*发送*/}
<Sendtofilesmodal
@ -687,9 +781,9 @@ class Fileslists extends Component{
<div className="studentList_operation_ul">
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>:""}
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onSend}>发送</a></li>:""}
{/*{this.props.isAdmin()?*/}
{/*<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>*/}
{/*:""}*/}
{this.props.isAdmin()?
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>
:""}
{this.props.isAdmin()?course_is_public===true?
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onOpen}>设为公开</a></li>
:"":""}

@ -88,6 +88,9 @@ class HomeworkModal extends Component{
propsSaves=(ds,endtime)=>{
if(ds.length ===0&&endtime === ""){
this.props.Saves()
}else{
if(this.props.typs!="end"){
if(endtime === ""||endtime===undefined||endtime===null){
@ -107,6 +110,8 @@ class HomeworkModal extends Component{
}
}
this.props.Saves(ds,moment(handleDateString(endtime),"YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm"))
}
}

@ -369,13 +369,13 @@ a.white-btn.use_scope-btn:hover{
}
#memoMD .CodeMirror {
width: 576px !important;
/*width: 576px !important;*/
margin-top: 31px !important;
height: 364px !important;
}
#memoMD .editormd-preview {
width: 567px !important;
width: 578px !important;
top: 40px !important;
height: 364px !important;
}

@ -131,9 +131,9 @@ class Exercisesetting extends Component{
// end_timetype:false
// })
// }else{
this.setState({
end_timetype:true
})
// this.setState({
// end_timetype:true
// })
// }
}

@ -1246,43 +1246,43 @@ class Studentshavecompletedthelist extends Component {
this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
this.state.columnss.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="分班"){
this.state.columnss.splice(key,1)
}
if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
else if(item.title==="客观题得分"){
}
if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
}
})
let columnss2=this.state.columnss;
this.setState({
columnss: columnss2,
columnss: arr,
})
} else {
this.state.columnss.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
}
})
let columnss2=this.state.columnss;
this.setState({
columnss: columnss2
columnss: arr
})
}
@ -1291,73 +1291,73 @@ class Studentshavecompletedthelist extends Component {
//学生已截止
if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
})
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{
}
var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr2.push(item);
}
}
})
let columns2=this.state.columns
thiss.setState({
columns: columns2,
columnstwo: columnstwo2,
columns: arr2,
columnstwo: arr,
loadingstate: true,
})
} else {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
})
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{
}
var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr2.push(item);
}
}
})
let columns2=this.state.columns
thiss.setState({
columns: columns2,
columnstwo:columnstwo2,
columns: arr2,
columnstwo:arr,
})
}
@ -1610,37 +1610,39 @@ class Studentshavecompletedthelist extends Component {
current_answer_user: response.data.current_answer_user,
})
if (response.data.exercise_types.subjective === 0) {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
})
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{
}
var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr2.push(item);
}
}
})
let columns2=this.state.columns
this.setState({
columns: columns2,
columnstwo: columnstwo2,
columns: arr2,
columnstwo: arr,
loadingstate: false,
})
}
@ -1706,7 +1708,6 @@ class Studentshavecompletedthelist extends Component {
// }
}
if (response.data.exercise_types.subjective === 0) {
//===0 不包括主观题
if (indexi === exercise_users.length) {
@ -1715,20 +1716,25 @@ class Studentshavecompletedthelist extends Component {
// console.log("77771111111");
//分班大于0显示分班
//7ge
this.state.columnsys.map((item,key)=>{
// this.state.columnsys.map((item,key)=>{
//
// })
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="主观题得分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else{
arr.push(item);
}
}
})
thiss.setState({
this.setState({
data: datalist,
teacherlist: teacherlist,
Teacherliststudentlist: response.data,
@ -1737,27 +1743,27 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
loadingstate: false,
columnsys: this.state.columnsys,
columnsys: arr,
})
} else {
//分班小于0不显示分班
//6ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="客观题得分"){
}
if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
}
})
thiss.setState({
data: datalist,
@ -1768,7 +1774,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
columnsys: this.state.columnsys,
columnsys: arr,
})
}
@ -1778,19 +1784,23 @@ class Studentshavecompletedthelist extends Component {
if (response.data.exercise_types.groups_count > 0) {
//显示分班
//8ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
}
if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
}
}
})
// console.log(thiss.state.columnsys);
// console.log(arr);
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -1800,27 +1810,28 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
loadingstate: false,
columnsys: this.state.columnsys,
columnsys: arr,
})
} else {
//不显示分班
//7ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="客观题得分"){
}
if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
else if(item.title==="主观题得分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
}
}
})
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -1830,7 +1841,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
loadingstate: false,
columnsys: this.state.columnsys,
columnsys: arr,
})
}
@ -1842,13 +1853,16 @@ class Studentshavecompletedthelist extends Component {
console.log("2548包含主观题不包含分班");
if (response.data.exercise_types.groups_count > 0) {
this.state.columnsys.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
}
})
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -1857,19 +1871,22 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
columnsys: this.state.columnsys,
columnsys: arr,
})
} else {
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
}
}
})
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -1878,7 +1895,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
columnsys: this.state.columnsys,
columnsys:arr,
})
}
} else {
@ -1896,16 +1913,19 @@ class Studentshavecompletedthelist extends Component {
columnsys: this.state.columnsystwo,
})
} else {
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
else{
arr.push(item);
}
}
})
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -1915,7 +1935,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
loadingstate: false,
columnsys: this.state.columnsys,
columnsys: arr,
})
}

@ -95,6 +95,12 @@ class PollNew extends Component {
// 初始化数据
componentDidMount = () => {
// console.log("componentDidMount 50")
if( this.props.isStudent() === true){
this.props.history.push("/403")
return
}
if (this.props.match.params.news !== undefined) {
if (this.props.match.params.news === "new") {
this.state.Newedit === true;
@ -780,19 +786,21 @@ class PollNew extends Component {
}
}
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification(`选项不能少于3个!`);
if (object.question.question_type === 1) {
if (maxtie < 2) {
this.props.showNotification(`选项不能少于2个!`);
return
}
} else if (object.question.question_type === 2) {
if (maxtie < 3) {
this.props.showNotification(`选项不能少于3个!`);
return
}
}
}
if (object.question.question_type === 2) {
if (object.question.max_choices > 0) {
@ -1260,17 +1268,19 @@ class PollNew extends Component {
}
}
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification('选项不能少于3个!');
if (maxtie < 2) {
this.props.showNotification('选项不能少于2个!');
return
}
} else if (object.question.question_type === 2) {
if (maxtie < 3) {
this.props.showNotification('选项不能少于3个!');
return
}
}
}
if (object.question.question_type === 2) {
if (object.question.max_choices > 0) {
@ -2329,6 +2339,25 @@ class PollNew extends Component {
</div>
{/*<Form {...formItemLayout} onSubmit={this.handleSubmit}>*/}
{
this.state.mysave === false ?
<div className="padding20-30" style={{ background: '#fff'}}>
<div className="displayTitle font-16">
<span>{this.state.polls_nametest}</span>
<a className="fr" onClick={() => { this.adddomeditit() }} style={{ lineHeight: '32px'}}>
<Tooltip title="编辑"><i className="iconfont icon-bianjidaibeijing font-20 color-green"></i></Tooltip>
</a>
</div>
<div className="displayDescription color-grey-9" dangerouslySetInnerHTML={{__html: this.state.polls_descriptiontest}}
style={{whiteSpace: 'pre-wrap'}}
></div>
</div>
:""
}
{
this.state.mysave === true ?
<div className="edu-back-white">
<div className="createPage bor-bottom-greyE">
<style>
@ -2350,11 +2379,7 @@ class PollNew extends Component {
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a></span>
</div>
: "")
:
<div className="fr">
<span><a onClick={() => this.adddomeditit()}><Tooltip title="编辑"><i
className="color-green font-18 iconfont icon-bianjidaibeijing"></i></Tooltip></a></span>
</div>
:""
}
</div>
@ -2417,7 +2442,11 @@ class PollNew extends Component {
</div>
</div>
</div>:""
}
<p className="clearfix padding20-30 color-grey-9">
@ -2496,8 +2525,8 @@ class PollNew extends Component {
(<RadioGroup defaultChecked={false} disabled>
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className={"h20 mt20 mb20 "} style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left"}}></Radio>
<div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left",marginTop:"3px"}}></Radio>
{/*<pre className={"break_word flex1 fl"}*/}
{/* style={{"text-align": "left"}}>{items.answer_text}</pre>*/}
{/*<span className={"break_word flex1"}><pre className={"break_word flex1"}>{items.answer_text}</pre> </span>*/}
@ -2511,7 +2540,7 @@ class PollNew extends Component {
(<CheckboxGroup defaultChecked={false} disabled>
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="mt10 mt20 mb20 " style={{"clear": "both"}}>
<div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>

@ -41,7 +41,7 @@ class Homeworddescription extends Component {
super(props);
this.state = {
props: props,
description:undefined,
description:props.description,
}
@ -74,10 +74,8 @@ class Homeworddescription extends Component {
<div >
<div style={{
"background-color":"#FFFFff",
"margin-top":"20px",
"padding":"20px 20px",
"position": "relative",
"border-bottom": "1px solid #EDEDED",
"margin-bottom":" 0px"}}>
<style>
{`
@ -85,7 +83,8 @@ class Homeworddescription extends Component {
`}
</style>
<Form.Item
label="作业说明"
label=""
className="mdInForm"
>
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/}
@ -93,7 +92,7 @@ class Homeworddescription extends Component {
<TPMMDEditor ref={this.mdRef} placeholder={'作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item>
<div className="clearfix">
<div className="clearfix mt10">
<Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button>
<Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>
</div>

@ -753,6 +753,7 @@ class Listofworks extends Component {
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
// var columns2=[];
if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
@ -768,7 +769,7 @@ class Listofworks extends Component {
updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0": student_works[i].complete_count,
levelscore: student_works[i].final_score,
efficiencyscore: student_works[i].eff_score,
efficiencyscore: student_works[i].eff_score==="0.0"?"--":student_works[i].eff_score==="0"?"--":student_works[i].eff_score,
finalscore: student_works[i].work_score,
operating: "查看",
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
@ -787,84 +788,84 @@ class Listofworks extends Component {
if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(item.title==="关卡得分"){
columns.splice(key,1)
else if(item.title==="关卡得分"){
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}else{
if(course_group_info.length < 2){
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(item.title==="关卡得分"){
columns.splice(key,1)
else if(item.title==="关卡得分"){
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}else {
columns.map((item,key)=>{
}else {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="关卡得分"){
columns.splice(key,1)
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}
}
}else {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}else {
if(course_group_info.length < 2) {
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}
columns=this.state.columnss;
}
@ -1440,7 +1441,7 @@ class Listofworks extends Component {
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin() ?
this.state.code_review === true ? "" : <Link
this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}

@ -391,16 +391,16 @@ class Listofworksstudentone extends Component {
let datalist = [];
let datalists = [];
var styletable = {"display": "none"}
var arr =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
}else{
arr.push(item);
}
}
})
let columns2=this.state.columns;
let columns2= arr;
var teacherlist = undefined;
var teacherlists = undefined;
if (teacherdata !== undefined) {
@ -509,14 +509,18 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdata = (teacherdata) => {
let datalist = [];
this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
var arr =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
}
}
})
let columns2=this.state.columns;
let columns2= arr;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据")
@ -748,11 +752,12 @@ class Listofworksstudentone extends Component {
}
setComputeTime=()=>{
let {teacherdata}=this.state;
this.setState({
computeTimetype:false
})
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/"+homeworkid+"/update_student_score.json";
let url = "/homework_commons/"+homeworkid+"/update_student_score.json?shixun_id="+teacherdata.shixun_id;
axios.get(url).then((response) => {
this.props.showNotification(`${response.data.message}`);
@ -925,13 +930,13 @@ class Listofworksstudentone extends Component {
<div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩
</div>}
</span>
</span>}
</div>
@ -1079,22 +1084,61 @@ class Listofworksstudentone extends Component {
<span className="ml20"
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span>
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
line-height: 48px;
text-align: center;
}
.startfont{
font-size:14px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(255,104,0,1);
}
.computeTime{
width: 73px;
height: 24px;
display: inline-block;
padding: 5px;
text-align: center;
line-height: 13px;
color: #4CACFF;
border: 1px solid #4CACFF;
cursor: pointer;
}
.computeTimes{
width: 73px;
height: 24px;
display: inline-block;
padding: 5px;
text-align: center;
line-height: 13px;
color: #C5C5C5;
border: 1px solid #EDEDED;
background:#EDEDED;
cursor: pointer;
}
`}
</style>
<div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩
</div>}
</span>
</span>}
</div>
</span>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
{/*<div className="fr edu-menu-panel">*/}
{/*<ul>*/}

@ -94,7 +94,6 @@ class ShixunStudentWork extends Component {
let url = "/homework_commons/" + homeworkid + "/code_review_results.json";
axios.get(url).then((response) => {
debugger
if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){
if(response.data.status!=-2){
@ -688,6 +687,7 @@ class ShixunStudentWork extends Component {
<span className="fl mr10 color-grey-8">分班情况</span>
<span className="fl ">
<a id="graduation_comment_no_limit"
onClick={()=>this.groupgroup([])}
className={this.state.group_infolist.length===0?"pl10 pr10 mr20 check_on":"pl10 pr10 mr20 "}>
不限
</a>
@ -756,7 +756,7 @@ class ShixunStudentWork extends Component {
dataSource={datalist}
columns={columns}
pagination={{ //分页
total: data&&data.all_reviews_count, //数据总数量
total: datalist.length===0?0:data&&data.all_reviews_count, //数据总数量
pageSize: 10, //显示几条一页
current:page,
}}

@ -51,13 +51,17 @@ class ShixunWorkDetails extends Component {
})
}
goback=()=>{
goback=(sum)=>{
let{data}=this.state
if(sum===1){
window.location.href = "/courses/"+data.course_id+"/students";
}else{
window.history.go(-1)
}
render() {
}
render() {
let{data}=this.state;
console.log(data)
return (
<Spin size="large" spinning={this.state.spinning}>
{data===undefined? "":<div className="newMain clearfix ">
@ -65,17 +69,18 @@ class ShixunWorkDetails extends Component {
<div className="educontent">
<p className="clearfix mt20">
<WordsBtn className="fl color-grey-9" style="btn colorgrey hovercolorblue">
<Link to={"/courses/"+data&&data.course_id+"/students"}>
<span className={"color-grey-9"}>{data&&data.course_name}</span>
</Link>
</WordsBtn>
<a className="fl color-grey-9 btn colorgrey hovercolorblue"
onClick={()=>this.goback(1)}
>
<span className={"color-grey-9"}>{data&&data.course_name}123</span>
</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="btn colorgrey fl hovercolorblue ">
<Link to={"/courses/"+data&&data.course_id+"/"+this.state.shixuntypes+"/"+data&&data.homework_common_id}>
<a className="btn colorgrey fl hovercolorblue grey"
onClick={this.goback}
// to={"/courses/"+data&&data.course_id+"/"+this.state.shixuntypes+"/"+data&&data.homework_common_id}
>
<span className={"color-grey-9"}>实训作业</span>
</Link>
</WordsBtn>
</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p>

@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{
</style>
{this.props.isAdmin?<div className={this.props.isClassManagement?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isClassManagement?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
{this.props.isAdminOrTeacher()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
</div>:""}

@ -87,7 +87,6 @@ class ShixunWorkModal extends Component{
let {page,limit,group_list}=this.state;
let newpage=page+1;
let newgroup_list=group_list;
debugger
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
axios.get(url,{params:{
@ -222,7 +221,7 @@ class ShixunWorkModal extends Component{
let {course_groups,group_ids,onChangetype,group_list}=this.state;
// let {data}=this.props;
// console.log(group_list)
// console.log(course_groups)
console.log(group_list)
return(
<div>
<Modal
@ -278,7 +277,7 @@ class ShixunWorkModal extends Component{
</div>
:
group_list&&group_list.map((item,key)=>{
group_list&&group_list.length===0?"":group_list[0]===undefined?"":group_list.map((item,key)=>{
return(
item.work_count===0?"":<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl task-hide" style={{width: '240px'}}>

@ -1676,7 +1676,7 @@ class Trainingjobsetting extends Component {
}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?this.state.code_review===true?"": <Link
{this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
<style>{
@ -1715,8 +1715,8 @@ class Trainingjobsetting extends Component {
{/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" mt20 pl20">
<p className=" clearfix ">
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></span>
<p className=" clearfix " style={{height:"41px"}}>
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span>
{
!flagPageEdit && this.props.isAdmin() === true ?
<a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
@ -1746,7 +1746,7 @@ class Trainingjobsetting extends Component {
unifiedsetting === undefined ? "" : unifiedsetting=== true ?
<div>
<div className="clearfix mb5 ml15">
<span className="font-16 mr15 fl mt6" style={{"color":"#999999"}}>发布时间</span>
<span className="font-16 fl mt6" style={{"color":"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true ? "发布时间已过,则不能修改" : ""}>
<div className="fl">
<DatePicker
@ -1768,18 +1768,18 @@ class Trainingjobsetting extends Component {
disabled={!flagPageEditstwo}
dropdownClassName="hideDisable"
/>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:""
}
</p>
</div>
</Tooltip>
<span className="ml20 fl mt10" style={{"color":"#999999","text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span>
</div>
<div className="clearfix ml15">
<span className="mr15 fl mt10 font-16" style={{"color":"#999999"}}>截止时间</span>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>
: ""
}
</p>
<div className="clearfix ml15 mb5">
<span className=" fl mt10 font-16" style={{"color":"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true ? "截止时间已过,则不能修改" : ""}>
<div className="fl">
<DatePicker
@ -1801,17 +1801,17 @@ class Trainingjobsetting extends Component {
disabled={!flagPageEditsthrees}
dropdownClassName="hideDisable"
/>
</div>
</Tooltip>
<span className=" ml20 fl mt10 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
</div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span> :""
}
</p>
</div>
</Tooltip>
<span className=" ml20 fl mt10 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
</div>
</div>
:
<div
className="ml40"

@ -401,7 +401,7 @@ class Workquestionandanswer extends Component {
className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?
this.state.code_review===true?"":<Link
this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"":<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""}
@ -410,10 +410,33 @@ class Workquestionandanswer extends Component {
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} >实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li>
</ul>
</li> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
@ -467,19 +490,31 @@ class Workquestionandanswer extends Component {
<div className="font-16 color-green fl pl20 mt10">作业说明:</div>
{
this.props.isAdmin()&&this.props.isAdmin()===true ?
(Showupdateinstructions&& Showupdateinstructions === true?"":
<Tooltip placement="top" title="编辑"><i
className="color-green font-18 iconfont icon-bianjidaibeijing fr pr20 " onClick={()=>this.jobdescriptiondisplaybj()} ></i></Tooltip>
:""
):""
}
</div>
<span>
<div className="font-16 color-dark break_word flex1 pl20 " style={{"padding":"10px 10px 10px 20px"}}>
<div className="font-16 color-dark break_word flex1 " >
{ Showupdateinstructions&& Showupdateinstructions === true?
<div >
<Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} description={jobsettingsdata === undefined ?"":jobsettingsdata === null ?"":jobsettingsdata === "null"?"": jobsettingsdata.data.explanation=== undefined?"":jobsettingsdata.data.explanation=== null?"":jobsettingsdata.data.explanation} ></Homeworddescription>
</div>
:
<div className="pl20 " style={{"padding":"10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无":
<div dangerouslySetInnerHTML={{__html:markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g,"▁▁▁")}}></div>
}
</div>
}
</div>
</span>
</div>
@ -494,12 +529,12 @@ class Workquestionandanswer extends Component {
{/* <div className="edu-back-white mb20 graduateTopic course-message"> */}
{/*<GraduateTopicReply memo={{id: graduation_topic_id, user_id: topicInfo && topicInfo.user_id}} course_id={course_id} {...this.props}></GraduateTopicReply>*/}
{/* </div> */}
{ Showupdateinstructions&& Showupdateinstructions === true?
<div >
<Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} ></Homeworddescription>
</div>
:""
}
{/*{ Showupdateinstructions&& Showupdateinstructions === true?*/}
{/* <div >*/}
{/* <Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} ></Homeworddescription>*/}
{/* </div>*/}
{/* :""*/}
{/*}*/}
{ homework_id && <CommonReply
memo={{
id: homework_id,

@ -25,6 +25,7 @@ import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import LoginRegisterComponent from '../user/LoginRegisterComponent';
import InterestpageComponent from '../user/Interestpage'
import FindPasswordComponent from '../user/FindPasswordComponent';
import passopen from "../../images/login/passopen.png";
//educoder登入页面
@ -59,26 +60,26 @@ class EducoderLogin extends Component {
super(props);
if( props.match.url === "/changepassword" ){
this.state = {
showbool: false,
showbool: 3,
logini:3,
}
}else {
if(props.match.url === "/login"){
this.state = {
showbool: true,
showbool: 1,
loginstatus:true,
logini:1,
}
}else if(props.match.url === "/register"){
this.state = {
showbool: true,
showbool: 1,
loginstatus:false,
logini:2,
}
}else{
this.state = {
showbool: true,
showbool: 1,
logini:1,
}
@ -100,16 +101,18 @@ class EducoderLogin extends Component {
})
}
Setshowbool = () => {
if (this.state.showbool === true) {
Setshowbool = (e) => {
if (e===1) {
this.setState({
showbool: false
showbool: 1
})
} else {
} else if(e===2) {
this.setState({
showbool: 2
})
}else if(e===3){
this.setState({
showbool: true
showbool: 3
})
}
}
@ -135,27 +138,38 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%"
}}>
<div style={{"margin-top": "50px"}}>
<div style={{"margin-top": "20px"}}>
<img src={educodernet}/>
</div>
</div>
{
showbool === true ?
showbool === 1 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool} ></LoginRegisterComponent>
Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
</div>
</div>
:showbool === 2 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
:
<div style={{
"display": "flex",
@ -163,15 +177,14 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></FindPasswordComponent>
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
</div>
</div>
}
<div style={{"height":"180px",
<div style={{"height":"125px",
"display": "flex",
"justify-content": "center",
"align-items": "center",
@ -179,6 +192,7 @@ class EducoderLogin extends Component {
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
<div style={{"height":"100px"}}></div>
</div>
</div>
)

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import {getImageUrl,markdownToHTML} from 'educoder';
import DetailTop from './DetailTop.js';
import DetailCards from './DetailCards.js'
import AddCollaborators from "./addCollaborators.js";
@ -342,9 +342,7 @@ class PathDetailIndex extends Component{
<div className="color-grey-6 clearfix">
<div id="shixuns_propaedeutics" className="new_li fl" style={{"padding":" 0px","textAlign": "justify;"}}>
{detailInfoList === undefined ? "" :detailInfoList.description===null?"":
<textarea>
{detailInfoList.description}
</textarea>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(detailInfoList.description).replace(/▁/g,"▁▁▁")}}></div>
}
</div>
</div>

@ -1,6 +1,6 @@
import React,{ Component } from "react";
import {getUrl} from 'educoder';
import {getUrl,markdownToHTML} from 'educoder';
import {Input} from 'antd';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";

@ -756,6 +756,8 @@ submittojoinclass=(value)=>{
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
<li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}

@ -106,7 +106,7 @@ class SiderBar extends Component {
<span className="inline"><i className="iconfont icon-erweima color-white font-22 fl"></i></span>
<p className="scan_ewm" style={{display: 'none', right:' 75px',opacity: '0'}}>
<p className="pr padding10">
<img src={getImageUrl("images/educoder/EWM.jpg")} width="158px" height="158px" />
<img src={getImageUrl("images/edu_user/EWM.jpg")} width="158px" height="158px" />
<p>微信扫一扫</p>
<p>关注公众号</p>
<span className="trangle_right"></span>

@ -134,7 +134,7 @@ export default class TPMUpdatepropaede extends Component {
})
if(response.data.content[0]!=null){
this.updatepropaedeMD(response.data.content[0], "UpdatepropaedeMD");
this.updatepropaedeMD(response.data.content, "UpdatepropaedeMD");
}else{
this.updatepropaedeMD("", "UpdatepropaedeMD");
}

@ -1553,7 +1553,7 @@ export default class TPMsettings extends Component {
<div className="flex1">
<div className="fl " >
<div className="fl" style={{border:'1px solid #ccc'}}>
{/*<textarea className={"shixunmemoMDdiv"} value={shixunmemoMDvalue} onInput={this.getshixunmemoMDvalue} name="content">*/}
{/*</textarea>*/}
<MonacoEditor
@ -1884,7 +1884,7 @@ export default class TPMsettings extends Component {
<p>
{
// this.props.identity<4&&this.props.status==0?
this.props.identity<4?
this.props.identity<5?
<div className="clearfix mt30">
<a className="defalutSubmitbtn fl mr20"
onClick={this.submit_edit_shixun}>保存</a>

@ -10,24 +10,22 @@
line-height: 30px;
}
#shixundescription .CodeMirror{
width: 570px !important;
margin-top: 31px !important;
height: 364px !important;
}
#shixundescription .editormd-preview{
width: 567px !important;
width:578px !important;
top: 40px !important;
height: 364px !important;
}
#shixunmemoMD .CodeMirror{
width: 548px !important;
margin-top: 31px !important;
height: 578px !important;
}
#shixunmemoMD .editormd-preview{
width: 544px !important;
width: 578px !important;
top: 40px !important;
height: 578px !important;
}

@ -352,7 +352,7 @@ export default class TPManswer extends Component {
</div>
<div className="clearfix mt20" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt20" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={this.challenge_answer_submit}>提交</a>
<a href={"/shixuns/" + shixunId + "/challenges"} className="defalutCancelbtn fl">取消</a>

@ -339,7 +339,7 @@ export default class TPManswer extends Component {
})
}
<div className="clearfix mt20" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt20" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a href={"javascript:void(0)"} className="defalutCancelbtn fl" onClick={this.addAnswer}>新增</a>
</div>
</div>
@ -347,7 +347,7 @@ export default class TPManswer extends Component {
</div>
<div className="clearfix mt20" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt20" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={this.challenge_answer_submit}>提交</a>
<a href={"/shixuns/" + shixunId + "/challenges"} className="defalutCancelbtn fl">取消</a>

@ -575,12 +575,12 @@ export default class TPMchallengesnew extends Component {
<a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div>
@ -739,7 +739,7 @@ export default class TPMchallengesnew extends Component {
</div>
<div className="clearfix mt30"
style={{display:this.props.identity>3||this.props.identity===undefined?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined?"none":'block'}}
>
{checkpointId===undefined?<a className="defalutSubmitbtn fl mr20" onClick={CreatePracticesendtype===true?"":this.CreatePracticesend}>提交</a>:
<a className="defalutSubmitbtn fl mr20" onClick={editPracticesendtype===true?"":this.editPracticesend}>提交</a>}

@ -777,11 +777,11 @@ export default class TPMevaluation extends Component {
<Link to={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1? "none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1? "none":'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</Link>
<Link to={choice_url === undefined ? "" : choice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</Link>
</div>
@ -914,11 +914,9 @@ export default class TPMevaluation extends Component {
<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">效果展现方式</p>
<div className="pr" onMouseLeave={this.handpathoptionvaluess}>
<div className="pr">
<Select className="winput-240-40"
value={pathoptionvalue}
onMouseEnter={this.handpathoptionvalues}
open={handpathopt}
onChange={this.handpathoptionvalue}>
<Option value={-1}>请选择效果展现方式</Option>
<Option value={1}>图片</Option>
@ -951,7 +949,7 @@ export default class TPMevaluation extends Component {
</div>
<div className="edu-back-white mb10 clearfix">
{pathoptionvalue===1?<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">待处理图片路径</p>
<div className="df">
@ -970,10 +968,10 @@ export default class TPMevaluation extends Component {
<div></div>
</div>
</div>
</div>
</div>:""}
<div className="edu-back-white mb10 clearfix">
{pathoptionvalue===1? <div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">标准答案图片路径</p>
<div className="df">
@ -992,10 +990,10 @@ export default class TPMevaluation extends Component {
<div></div>
</div>
</div>
</div>
</div>:""}
<div className="edu-back-white mb10 clearfix">
{pathoptionvalue===1||pathoptionvalue===-1?"":<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">学员答案文件路径</p>
<div className="df">
@ -1013,7 +1011,7 @@ export default class TPMevaluation extends Component {
<div></div>
</div>
</div>
</div>
</div>}
<div className="edu-back-white mb10 clearfix">
@ -1119,7 +1117,7 @@ export default class TPMevaluation extends Component {
</div>
<div className="clearfix mt30" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20" onClick={this.submitarbitrationevaluation}>提交</a>
<a href={"/shixuns/" + shixunId + "/challenges"} className="defalutCancelbtn fl">取消</a>
</div>

@ -1251,10 +1251,10 @@ editanswersMD=(initValue, id)=> {
<a href={practice_url === undefined ? "" : practice_url}
className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增代码编辑类型的任务">+&nbsp;实践类型</a>
<a href={choice_url === undefined ? "" : choice_url} className="fr color-blue mr15 mt4"
style={{display:this.props.identity>3||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
style={{display:this.props.identity>4||this.props.identity===undefined||this.props.status===2||this.props.status===1?"none":'block'}}
data-tip-down="新增选择题类型的任务">+&nbsp;选择题类型</a>
</div>
@ -1345,7 +1345,7 @@ editanswersMD=(initValue, id)=> {
</div>
<div className="clearfix mt30" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20" onClick={sumittype===true?"":this.clickquestionsumit}>提交</a>
<a href={go_back_url}
className="defalutCancelbtn fl">取消</a>
@ -1545,7 +1545,7 @@ editanswersMD=(initValue, id)=> {
</div>
<div className="clearfix mt30" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={this.answer_subit}>提交</a>
<a href={go_back_url}
@ -1735,7 +1735,7 @@ editanswersMD=(initValue, id)=> {
</div>
<div className="clearfix mt30" style={{display:this.props.identity>3||this.props.identity===undefined||power===false?"none":"block"}}>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={()=>this.answer_subit("edit",challenge_choose_id)}>提交</a>
<a href={go_back_url}

@ -61,12 +61,13 @@ a{
#exercisememoMD .CodeMirror {
margin-top: 31px !important;
height: 700px !important;
width: 579px !important;
/*width: 579px !important;*/
}
#exercisememoMD .editormd-preview {
top: 40px !important;
height: 700px !important;
width: 578px !important;
}
#exercisememoMD{
height: 700px !important;
@ -79,7 +80,7 @@ a{
#questioMD .CodeMirror {
width: 550.5px !important;
/*width: 550.5px !important;*/
margin-top: 31px !important;
height: 550px !important;
}
@ -87,10 +88,11 @@ a{
#questioMD .editormd-preview {
top: 40px !important;
height: 550px !important;
width: 578px !important;
}
#newquestioMD .CodeMirror {
width: 549px !important;
/*width: 549px !important;*/
margin-top: 31px !important;
height: 364px !important;
}
@ -98,29 +100,32 @@ a{
#newquestioMD .editormd-preview {
top: 40px !important;
height: 364px !important;
width: 578px !important;
}
#challenge_choose_answer .CodeMirror {
margin-top: 31px !important;
height: 364px !important;
width: 578px !important;
/*width: 578px !important;*/
}
#challenge_choose_answer .editormd-preview {
top: 40px !important;
height: 364px !important;
width: 578px !important;
}
#neweditanswer .CodeMirror {
margin-top: 31px !important;
height: 364px !important;
width: 549.5px !important;
/*width: 549.5px !important;*/
}
#neweditanswer .editormd-preview {
top: 40px !important;
height: 364px !important;
width: 578px !important;
}
#repository_url_tip {
@ -130,22 +135,23 @@ a{
}
#editanswers .CodeMirror{
width: 548px !important;
/*width: 548px !important;*/
height: 358px !important;
margin-top: 30px !important;
}
#editanswers .editormd-preview{
width: 569px !important;
width: 578px !important;
height: 358px !important;
}
#newquestioMDs .CodeMirror{
width: 510px !important;
/*width: 510px !important;*/
height: 358px !important;
margin-top: 30px !important;
}
#newquestioMDs .editormd-preview{
width: 569px !important;
width: 578px !important;
height: 358px !important;
}
@ -155,13 +161,13 @@ a{
}
#answerMD .CodeMirror{
width: 569px !important;
/*width: 569px !important;*/
height: 600px !important;
margin-top: 30px !important;
}
#answerMD .editormd-preview{
width: 569px !important;
width: 578px !important;
height: 600px !important;
}

@ -29,7 +29,7 @@ class TPMNav extends Component {
}
<Link to={`/shixuns/${shixunId}/repository`}
style={{display: this.props.identity >3||this.props.identity===undefined ? "none" : 'block'}}
style={{display: this.props.identity >4||this.props.identity===undefined ? "none" : 'block'}}
className={`${match.url.indexOf('repository') != -1 ? 'active' : ''} fl mr40`}>版本库</Link>
<Link to={`/shixuns/${shixunId}/collaborators`}
@ -43,7 +43,7 @@ class TPMNav extends Component {
{/* target="_blank"*/}
<a
href={`/shixuns/${shixunId}/settings`} className="fr"
style={{display: this.props.identity >3||this.props.identity===undefined ? "none" : 'block'}}
style={{display: this.props.identity >4||this.props.identity===undefined ? "none" : 'block'}}
>配置</a>
</div>
);

@ -357,13 +357,13 @@ a.white-btn.use_scope-btn:hover{
}
#memoMD .CodeMirror {
width: 576px !important;
/*width: 576px !important;*/
margin-top: 31px !important;
height: 364px !important;
}
#memoMD .editormd-preview {
width: 567px !important;
width: 578px !important;
top: 40px !important;
height: 364px !important;
}

@ -175,8 +175,8 @@ class Challenges extends Component {
//开始实战按钮
startshixunCombat = (type, ids, path) => {
let { ChallengesDataList } = this.state;
if(path===null){
let id = this.props.match.params.shixunId;
if (type > 3 || type === false) {
this.setState({
startbtns: true
})
@ -208,9 +208,14 @@ class Challenges extends Component {
startbtns: false
})
});
}else{
if (type > 4 || type === false) {
window.location.href = path;
} else {
window.location.href = "/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + ids + path;
}
}
}
hidestartshixunCombattype=()=>{

@ -36,9 +36,9 @@ class Propaedeutics extends Component {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
if(response.data.content[0]!=null){
if(response.data.content!=null){
this.setState({
PropaedeuticsListcontent:response.data.content[0]
PropaedeuticsListcontent:response.data.content
})
}else{
this.setState({

@ -44,7 +44,7 @@ class LoginRegisterComponent extends Component {
});
};
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
this.props.Setshowbool(1);
}
@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component {
};
loginInputonChange = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
login: e.target.value,
login: stirngt,
})
}
loginInputonChanges = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
password: e.target.value,
password: stirngt,
})
}
loginInputonChangess = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
passwords: e.target.value,
passwords: stirngt,
})
}
//获取code
codesonChange = (e) => {
@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "center", width: " 100%"}}>{Phonenumberisnotco}</span>
<span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span>
</p>
: <div style={{height: "25px"}}></div>
}
<DragValidator
height={38} successGreenColor="#45E15F"
height={38} successGreenColor="#b0e811"
style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

@ -0,0 +1,116 @@
import React, {Component} from 'react';
import {Button} from 'antd';
import axios from 'axios';
import './common.css'
import mytc from './img/mytc.png';
import skzbdx from './img/skzbdx.png';
import zyrs1 from './img/zyrs1.png';
import gouxuan from './img/gouxuan.png';
import meigouxuan from './img/meigouxuan.png';
import qdkf from './img/qdkf.png';
import hdkf from './img/hdkf.png';
import ydkf from './img/ydkf.png';
import sjk from './img/sjk.png';
import ysj from './img/ysj.png';
import yunwei from './img/yunwei.png';
import rgzn from './img/rgzn.png';
import qita from './img/qita.png';
//父组件 EducoderLogin.js
class InterestpageComponent extends Component {
constructor(props) {
super(props)
this.state = {
gouxuans: 0,
gouxuans2:0,
gouxuans3:[{id:1,name:"前端开发",bool:false,url:qdkf},{id:2,name:"后端开发",bool:false,url:hdkf},{id:3,name:"移动开发",bool:false,url:ydkf},{id:4,name:"数据库",bool:false,url:sjk},{id:5,name:"云计算和大数据",bool:false,url:ysj},{id:6,name:"运维与测试",bool:false,url:yunwei},{id:7,name:"人工智能",bool:false,url:rgzn},{id:8,name:"其他",bool:false,url:qita}],
}
}
Clickteacher=(e)=>{
console.log(e);
if(e === 1){
this.setState({
gouxuans:1,
})
}else if(e === 2){
this.setState({
gouxuans:2,
})
}else if(e === 3){
this.setState({
gouxuans:3,
})
}
}
Clickteacher2=(e)=>{
console.log(e);
let {gouxuans3} =this.state;
for (var i=0;i<gouxuans3.length;i++){
if(gouxuans3[i].id === e){
console.log("51");
console.log(e);
if(gouxuans3[i].bool === true){
gouxuans3[i].bool=false;
}else{
gouxuans3[i].bool=true;
}
}
}
console.log(gouxuans3);
this.setState({
gouxuans3:gouxuans3,
})
}
render() {
const {
gouxuans,
gouxuans3
} = this.state
// height: 346px;
return (
<div className="ysllogin_register_contents" style={{width:"800px",height: "620px"}}>
<div className="ysllogin_section">
<div className="mt15"><span className="yslspans1">请选择你的职业</span></div>
<div className="ysldivhome1" >
<div className="ysldivhomediv" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(1)}>{gouxuans ===1? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimg" ><img src={skzbdx} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(2)}>{gouxuans===2? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimg"><img src={mytc} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(3)}>{gouxuans===3?<img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimg"><img src={zyrs1} className="ysldivhomedivimg"/></div>
</div>
</div>
<div className="mt5"><span className="yslspans2">选择你可能感兴趣的内容</span></div>
<div ><span className="yslspans3">基于你关注的内容推荐</span></div>
<div className="ysldivhome2">
{gouxuans3&&gouxuans3.map((item,key)=>{
return(
<div className={item.id<5?"ysldivhomediv1":"ysldivhomediv2"} onClick={()=>this.Clickteacher2(item.id)}>
{item.bool===true?<img src={gouxuan} className="yslgouxuanimg"/>:<div className="yslgouxuanimg2"></div>}
<img className="div1img" src={item.url}/>
<span className="textall">{item.name}</span>
</div>
)
})}
</div>
<Button className="yslbutton" size={"large"} type="primary" style={{width:"255px",height: "36px",background: "#4CACFF"}}>完成</Button>
</div>
</div>
);
}
}
export default (InterestpageComponent);

@ -138,7 +138,7 @@ class LoginRegisterComponent extends Component {
;
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
this.props.Setshowbool(3);
// this.props.Setlogins(3);
this.setState({
login: "",
@ -344,7 +344,8 @@ class LoginRegisterComponent extends Component {
passwords: "",
Agreetotheterms: "",
})
this.props.history.push(result.data.redirect_uri)
// this.props.history.push(result.data.redirect_uri)
this.props.Setshowbool(2);
} catch (e) {
@ -467,11 +468,17 @@ class LoginRegisterComponent extends Component {
//获取登入
loginInputonChange = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
login: e.target.value,
login: stirngt,
})
}
//失去焦点判断
inputOnBlur = (e, id) => {
@ -481,23 +488,48 @@ class LoginRegisterComponent extends Component {
//获取登入密码
passwordonChange = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
password: e.target.value
password: stirngt,
})
// this.setState({
// password: e.target.value
// })
}
//获取注册登入
loginInputonChanges = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
logins: e.target.value,
logins: stirngt,
})
}
//获取注册密码
passwordonChanges = (e) => {
// console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({
passwords: e.target.value
passwords: stirngt,
})
}
//获取code
@ -526,6 +558,12 @@ class LoginRegisterComponent extends Component {
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
}
loginonkeyup =(e)=>{
if(e.keyCode==32){
return false;
}
}
render() {
const {
activeKey,
@ -611,7 +649,7 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
</p>
: <div style={{height:"25px"}}></div>
}
@ -668,14 +706,14 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotcos && Phonenumberisnotcos != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotcos}</span>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
</p>
: <div style={{height:"25px"}}></div>
}
<DragValidator
height={38} className="loginInput" successGreenColor="#45E15F"
height={38} className="loginInput" successGreenColor="#b0e811"
style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

@ -47,3 +47,119 @@
.dragValidator {
margin-bottom: 16px;
}
.ysldivhome1{
display: flex;
flex-direction: row;
margin-left: 100px;
margin-right: 129px;
margin-top: 10px;
}
.ysldivhome2{
display: flex;
flex-flow: row wrap;
align-content:stretch;
margin-top: 10px;
}
.ysldivhomediv{
width: 101px;
height: 147px;
}
.ysldivhomediv1{
width: 110px;
height: 110px;
border-radius:50%;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
background: #fff;
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 15px;
}
.ysldivhomediv2{
width: 110px;
height: 110px;
border-radius:50%;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
background: #fff;
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 20px;
}
.ysldivhomedivtxt{
width:101px;
height:27px;
margin-bottom: 10px;
font-size: 14px;
text-align: center;
}
.ysldivhomedivimg{
width: 101px;
height: 101px;
}
.ysllogin_register_contents{
display: flex;
margin-top: 30px;
justify-content: center;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
border-radius:6px;
background: #fff;
}
.ysllogin_section {
width:800px;
height: 620px;
display: flex;
align-items: center;
flex-direction: column;
}
.yslspans1{
text-align: center;
font-size: 16px;
color: #111C24;
}
.yslspans2{
text-align: center;
font-size: 15px;
color: #05101A;
}
.yslspans3{
text-align: center;
font-size: 13px;
color: #656565;
}
.yslbutton{
width:255px;
height: 36px;
margin-top:30px;
margin-bottom: 19px;
}
.mt22{
margin-top: 22px;
}
.gouxuanimg{
margin-right: 10px;
margin-bottom: 2px;
}
.textall{
text-align: center;
font-size: 13px;
color: #4B4B4B;
}
.div1img{
display: flex;
justify-content:center;
width: 60px;
margin-left: 27px;
}
.yslgouxuanimg{
width: 20px;
height: 20px;
margin-left: 75px;
}
.yslgouxuanimg2{
height: 20px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Loading…
Cancel
Save