hjm 6 years ago
commit fd43a9674a

@ -315,14 +315,14 @@ class Fileslists extends Component{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看", Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?", ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel, ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen, ModalSave:this.saveonOpen,
}) })
} }
saveonOpen=()=>{ saveonOpen=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })

@ -122,11 +122,12 @@ class CoursesBanner extends Component {
this.showActionPoll(i,s) this.showActionPoll(i,s)
} }
if (i === 3) { if (i === 3) {
s = "您确定要设置为公开?"; s = "设为公开后,非课堂成员也可以访问查看";
this.showActionPoll(i,s) ss = "是否确认设为公开?";
this.showActionPoll(i,s,ss)
} }
if(i===4){ if(i===4){
if(coursedata.code_halt === true){ if(coursedata.code_halt === true){
var url = `/courses/${this.props.match.params.coursesId}/set_invite_code_halt.json` var url = `/courses/${this.props.match.params.coursesId}/set_invite_code_halt.json`
axios.post(url, {}).then((result) => { axios.post(url, {}).then((result) => {

@ -40,7 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/> className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p> <p className="font-14 color-white">非成员不能访问</p>
</div> </div>
<a href={item.first_category_url} className="square-img" target="_blank"> <a href={item.first_category_url} className="square-img" >
{/*target="_blank"*/}
{ {
item.is_public===1&&item.id===1309? item.is_public===1&&item.id===1309?
<div> <div>

@ -235,15 +235,17 @@ class GraduationTasks extends Component{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看", Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?", ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel, ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen, ModalSave:this.saveonOpen,
}) })
} }
// onSticky = (message) => {
// onSticky = (message) => {
// const cid = this.props.match.params.coursesId // const cid = this.props.match.params.coursesId
// const url = `/messages/${message.id}/sticky_top.json` // const url = `/messages/${message.id}/sticky_top.json`
// axios.put(url, { // axios.put(url, {

@ -1,114 +1,114 @@
import React, {Component} from "react"; import React, {Component} from "react";
import { import {
Form, Form,
Select, Select,
Input, Input,
Button, Button,
Checkbox, Checkbox,
Upload, Upload,
Icon, Icon,
message, message,
Modal, Modal,
Table, Table,
Divider, Divider,
InputNumber, InputNumber,
Tag, Tag,
DatePicker, DatePicker,
Radio, Radio,
Tooltip, Tooltip,
notification notification
} from "antd"; } from "antd";
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
import {Link, Switch, Route, Redirect} from 'react-router-dom'; import {Link, Switch, Route, Redirect} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import '../css/members.css' import '../css/members.css'
import "../common/formCommon.css" import "../common/formCommon.css"
import '../css/Courses.css' import '../css/Courses.css'
import '../css/members.css' import '../css/members.css'
import "../common/formCommon.css" import "../common/formCommon.css"
import '../css/Courses.css' import '../css/Courses.css'
import moment from 'moment'; import moment from 'moment';
import '../css/members.css' import '../css/members.css'
import "../common/formCommon.css" import "../common/formCommon.css"
import './style.css' import './style.css'
import Workquestionandanswer from "./Workquestionandanswer"; import Workquestionandanswer from "./Workquestionandanswer";
const { TextArea } = Input; const { TextArea } = Input;
class Homeworddescription extends Component { class Homeworddescription extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
props: props, props: props,
description:undefined, description:undefined,
} }
} }
componentDidMount() { componentDidMount() {
} }
//取消操作 //取消操作
clickcancel =()=>{ clickcancel =()=>{
this.props.NOReleaseNotes(); this.props.NOReleaseNotes();
} }
//确认操作 //确认操作
onSaveExercise=()=>{ onSaveExercise=()=>{
if(this.state.description === "" || this.state.description===undefined || this.state.description === null){ if(this.state.description === "" || this.state.description===undefined || this.state.description === null){
this.props.showNotification("请输入作业说明"); this.props.showNotification("请输入作业说明");
return return
} }
this.props.ReleaseNotes(this.state.description); this.props.ReleaseNotes(this.state.description);
} }
//获取输入框 //获取输入框
settextarea=(e)=>{ settextarea=(e)=>{
this.setState({ this.setState({
description:e description:e
}) })
} }
render() { render() {
return ( return (
<div > <div >
<div style={{ <div style={{
"background-color":"#FFFFff", "background-color":"#FFFFff",
"margin-top":"20px", "margin-top":"20px",
"padding":"20px 20px", "padding":"20px 20px",
"position": "relative", "position": "relative",
"border-bottom": "1px solid #EDEDED", "border-bottom": "1px solid #EDEDED",
"margin-bottom":" 0px"}}> "margin-bottom":" 0px"}}>
<style> <style>
{` {`
.ant-form-item-label{width:80px;} .ant-form-item-label{width:80px;}
`} `}
</style> </style>
<Form.Item <Form.Item
label="作业说明" label="作业说明"
> >
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/} {/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/} {/*<TextArea style={{"height": "120px"}}*/}
{/* autoComplete="off" ></TextArea>*/} {/* autoComplete="off" ></TextArea>*/}
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为5000个字符'} <TPMMDEditor ref={this.mdRef} placeholder={'作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor> mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item> </Form.Item>
<div className="clearfix"> <div className="clearfix">
<Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button> <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> <Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }
const Homeworddescriptions = Form.create({name: 'taskPollNew'})(Homeworddescription); const Homeworddescriptions = Form.create({name: 'taskPollNew'})(Homeworddescription);
export default Homeworddescriptions; export default Homeworddescriptions;

@ -75,7 +75,7 @@ class Listofworks extends Component {
teacherlist: undefined, teacherlist: undefined,
searchtext: "", searchtext: "",
course_groupysls: undefined, course_groupysls: undefined,
course_groupyslstwo: undefined, course_groupyslstwo: [],
visible: false, visible: false,
userid: 0, userid: 0,
course_group: null, course_group: null,
@ -1164,7 +1164,7 @@ class Listofworks extends Component {
// console.log(checkedValues); // console.log(checkedValues);
this.setState({ this.setState({
unlimited: 0, unlimited: 0,
course_groupyslstwo: undefined, course_groupyslstwo: [],
loadingstate: true, loadingstate: true,
}) })
@ -1172,7 +1172,7 @@ class Listofworks extends Component {
} else if (checkedValues.length === data.length) { } else if (checkedValues.length === data.length) {
this.setState({ this.setState({
unlimited: 0, unlimited: 0,
course_groupyslstwo: undefined, course_groupyslstwo: [],
loadingstate: true, loadingstate: true,
}) })
this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
@ -1198,6 +1198,7 @@ class Listofworks extends Component {
this.setState({ this.setState({
unlimitedtwo: 1, unlimitedtwo: 1,
course_groupysls: undefined, course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true, loadingstate: true,
}) })
@ -1206,6 +1207,7 @@ class Listofworks extends Component {
this.setState({ this.setState({
unlimitedtwo: 1, unlimitedtwo: 1,
course_groupysls: undefined, course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true, loadingstate: true,
}) })
this.Startsorting(this.state.order, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, this.state.page, this.state.limit);
@ -1485,22 +1487,22 @@ class Listofworks extends Component {
notlimiteds = () => { notlimiteds = () => {
this.setState({ this.setState({
checkedValuesine: undefined, checkedValuesine: undefined,
course_groupyslstwo: undefined, course_groupyslstwo: [],
unlimited: 0, unlimited: 0,
loadingstate: true, loadingstate: true,
}) })
this.Startsorting(this.state.order, null, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, [], this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
} }
notlimitedst = () => { notlimitedst = () => {
// console.log(this.state.course_group_info); // console.log(this.state.course_group_info);
this.setState({ this.setState({
unlimitedtwo: 1, unlimitedtwo: 1,
checkedValuesineinfo: undefined, checkedValuesineinfo: [],
course_groupysls: undefined, course_groupysls: undefined,
loadingstate: true, loadingstate: true,
}) })
this.Startsorting(this.state.order, this.state.course_groupyslstwo, undefined, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, this.state.course_groupyslstwo, [], this.state.searchtext, this.state.page, this.state.limit);
} }
//立即截止确定按钮 //立即截止确定按钮
coursetaskend = () => { coursetaskend = () => {

@ -334,7 +334,7 @@ class ShixunhomeWorkItem extends Component{
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.commit_count} 已交</span>} {discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.commit_count} 已交</span>}
{discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.uncommit_count} 未交</span>} {discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.uncommit_count} 未交</span>}
{/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/} {/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}
<Tooltip title={discussMessage.time_status>0?"剩余时间":""} placement="bottom"> <Tooltip title={discussMessage.time_status===1?"提交剩余时间":"补交剩余时间"} placement="bottom">
<span className="mr15 color-grey9">{discussMessage.status_time}</span> <span className="mr15 color-grey9">{discussMessage.status_time}</span>
</Tooltip> </Tooltip>
@ -349,7 +349,7 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className="homepagePostSetting" style={{"right":"4px","top":"44px","display":"block","width":"192px"}}> {this.props.isAdmin?<div className="homepagePostSetting" style={{"right":"4px","top":"44px","display":"block","width":"192px"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a> <a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a> {this.props.isClassManagement()?<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> <WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
</div>:""} </div>:""}

@ -429,27 +429,36 @@ class Workquestionandanswer extends Component {
{jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" : <div className=" clearfix edu-back-white poll_list mt20 mr20 "> {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" : <div className=" clearfix edu-back-white poll_list mt20 mr20 ">
<span> <span>
<style>
{
`
hr{
display:none;
}
`
}
</style>
<div className={"font-16 color-dark fl pl20 "}> <div className={"font-16 color-dark fl pl20 "}>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g,"▁▁▁")}}></div> <div dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g,"▁▁▁")}}></div>
{/* /!*{}}></div> {/* /!*{}}></div>
{/* /!*{jobsettingsdata.data.description}*!/*/} {/* /!*{jobsettingsdata.data.description}*!/*/}
{/* <textarea>*/} {/* <textarea>*/}
{/* {*/} {/* {*/}
{/* this.state.namestring*/} {/* this.state.namestring*/}
{/* }*/} {/* }*/}
{/* </textarea>*/} {/* </textarea>*/}
</div> </div>
{/* <div className="justify break_full_word new_li markdown-body"*/} {/* <div className="justify break_full_word new_li markdown-body"*/}
{/* id="challenge_editorMd_description">*/} {/* id="challenge_editorMd_description">*/}
{/* <p id="ReactMarkdown" style={{overflow:'hidden'}}>*/} {/* <p id="ReactMarkdown" style={{overflow:'hidden'}}>*/}
{/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/}
{/* <textarea className="w200">*/} {/* <textarea className="w200">*/}
{/* {jobsettingsdata.data.description}*/} {/* {jobsettingsdata.data.description}*/}
{/* </textarea>*/} {/* </textarea>*/}
{/* /!*}*!/*/} {/* /!*}*!/*/}
{/* </p>*/} {/* </p>*/}
{/*</div>*/} {/*</div>*/}
</span> </span>
</div>} </div>}

@ -827,8 +827,8 @@ class ShixunHomework extends Component{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看", Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?", ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel, ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen, ModalSave:this.saveonOpen,
}) })
@ -1190,6 +1190,7 @@ class ShixunHomework extends Component{
isAdmin={this.props.isAdmin()} isAdmin={this.props.isAdmin()}
isStudent={this.props.isStudent()} isStudent={this.props.isStudent()}
isNotMember={this.props.isNotMember()} isNotMember={this.props.isNotMember()}
isClassManagement={this.props.isClassManagement()}
checkBox={this.props.isAdmin()?<Checkbox value={item.homework_id}></Checkbox>:""} checkBox={this.props.isAdmin()?<Checkbox value={item.homework_id}></Checkbox>:""}
match={this.props.match} match={this.props.match}
coursedata={this.props.coursedata} coursedata={this.props.coursedata}

@ -30,7 +30,7 @@ class Trialapplication extends Component {
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
readonlyInput: true, readonlyInput: true,
user_phone_binded: false, user_phone_binded: props.user_phone_binded,
showTrial: false, showTrial: false,
user: undefined, user: undefined,
} }
@ -383,7 +383,7 @@ class Trialapplication extends Component {
{ {
isRenders === false ? "" : isRenders === false ? "" :
<div style={{"border-radius": "15px"}}> <div style={{"border-radius": "10px"}}>
<style> <style>
{ {
` `
@ -427,7 +427,7 @@ class Trialapplication extends Component {
#DialogIDysl div { #DialogIDysl div {
overflow-y:visible !important; overflow-y:visible !important;
box-shadow:none !important; box-shadow:none !important;
border-radius:15px !important; border-radius:10px !important;
} }
#wrapper{ #wrapper{
position: relative; position: relative;
@ -541,19 +541,19 @@ class Trialapplication extends Component {
style={{height: '0', width: '0', border: 'none', display: "none"}}/> style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Dialog open={true} id="DialogIDysl" <Dialog open={true} id="DialogIDysl"
style={{display: isRenders == false ? 'none' : '', "border-radius": "15px"}} style={{display: isRenders == false ? 'none' : '', "border-radius": "10px"}}
> >
<div id="closeIcon" onClick={() => { <div id="closeIcon" onClick={() => {
this.handleDialogClose() this.handleDialogClose()
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "15px", "width": "560px"}}> <div className={"login_register_content"} style={{"border-radius": "10px", "width": "560px"}}>
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?
{ {
"width": "560px", "height": "280px", "width": "560px", "height": "295px",
"border-radius": "15px", "border-radius": "15px",
"background": " #FFFFff", "background": " #FFFFff",
"text-align": "center", "text-align": "center",
@ -564,8 +564,8 @@ class Trialapplication extends Component {
} }
: :
{ {
"width": "560px", "height": "390px", "width": "560px", "height": "410px",
"border-radius": "15px", "border-radius": "10px",
"background": " #FFFFff", "background": " #FFFFff",
"text-align": "center", "text-align": "center",
// "position": "absolute", // "position": "absolute",
@ -575,14 +575,12 @@ class Trialapplication extends Component {
} }
} }
> >
<ul> <ul style={{"margin-top": "10px","margin-bottom": "10px"}}>
<span style={{ <span style={{
"padding": "20px",
"text-align": "center!important", "text-align": "center!important",
"color": "#05101A", "color": "#05101A",
"font-weight": "bold", "font-weight": "bold",
"font-size": "17px", "font-size": "17px",
"margin-top": "10px",
}}>试用申请</span> }}>试用申请</span>
</ul> </ul>
@ -597,7 +595,7 @@ class Trialapplication extends Component {
{ {
user_phone_binded === true ? "" : user_phone_binded === true ? "" :
<div style={{ <div style={{
"margin-top": "15px", "padding-left": "50px", "margin-top": "20px", "padding-left": "50px",
"padding-right": "50px" "padding-right": "50px"
}}> }}>
<Input placeholder="请输入手机号码" value={login} <Input placeholder="请输入手机号码" value={login}
@ -611,7 +609,7 @@ class Trialapplication extends Component {
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span>{Phonenumberisnotco}</span> <span>{Phonenumberisnotco}</span>
</p> </p>
: <div className="mt5 mb5" style={{height: "20px"}}></div> : <div style={{height: "20px"}}></div>
} }
</div> </div>
} }
@ -665,10 +663,10 @@ class Trialapplication extends Component {
{ {
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}> <p className="color-red " style={{width: " 100%", height: "20px"}}>
<span>{Phonenumberisnotcocodes}</span> <span>{Phonenumberisnotcocodes}</span>
</p> </p>
: <div className="mt2 mb2" style={{height: "23px"}}></div> : <div style={{height: "20px"}}></div>
} }
<div style={{ <div style={{
"padding-left": "50px", "padding-left": "50px",
@ -680,10 +678,10 @@ class Trialapplication extends Component {
name="mynames"></Input> name="mynames"></Input>
{ {
Phonenumberisnotcoreason && Phonenumberisnotcoreason != "" ? Phonenumberisnotcoreason && Phonenumberisnotcoreason != "" ?
<p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}> <p className="color-red" style={{width: " 100%", height: "20px"}}>
<span>{Phonenumberisnotcoreason}</span> <span>{Phonenumberisnotcoreason}</span>
</p> </p>
: <div className="mt2 mb2" style={{height: "23px"}}></div> : <div style={{height: "20px"}}></div>
} }
</div> </div>

@ -1,78 +1,80 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import axios from 'axios'; import axios from 'axios';
class ShixunPathCard extends Component{ class ShixunPathCard extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
} }
render(){ render(){
let {pathList}=this.props; let {pathList}=this.props;
return( return(
<div className="educontent" id="subjects_list_content"> <div className="educontent" id="subjects_list_content">
{ {
pathList && pathList.length > 0 ? pathList && pathList.length > 0 ?
( (
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
pathList && pathList.map((item,key)=>{ pathList && pathList.map((item,key)=>{
return( return(
<div className="square-Item" id={"item_"+key}> <div className="square-Item" id={"item_"+key}>
{ {
item.tag_name === null ? "" : item.tag_name === null ? "" :
<div className="tag-green"> <div className="tag-green">
<span className="tag-name">{item.tag_name}</span> <span className="tag-name">{item.tag_name}</span>
<img src={getImageUrl('images/educoder/tag2.png')}/> <img src={getImageUrl('images/educoder/tag2.png')}/>
</div> </div>
} }
<div className={item.allow_visit=== false ? "closeSquare" : "none"}> <div className={item.allow_visit=== false ? "closeSquare" : "none"}>
<img src={getImageUrl("images/educoder/icon/lockclose.svg")} <img src={getImageUrl("images/educoder/icon/lockclose.svg")}
className="mt80 mb25"/> className="mt80 mb25"/>
<p className="font-14 color-white">非试用内容需要授权</p> <p className="font-14 color-white">非试用内容需要授权</p>
</div> </div>
<Link to={"/paths/"+item.id} className="square-img" target="_blank"> <Link to={"/paths/"+item.id} className="square-img" >
<img alt="13?1543211263" src={item.image_url} style={{"display":"block"}}/> {/*target="_blank"*/}
</Link> <img alt="13?1543211263" src={item.image_url} style={{"display":"block"}}/>
<div className="square-main"> </Link>
<p className="task-hide"> <div className="square-main">
<Link to={"/paths/"+item.id} className="justify color-grey-name" target="_blank">{item.name}</Link> <p className="task-hide">
</p> <Link to={"/paths/"+item.id} className="justify color-grey-name" >{item.name}</Link>
<p className="clearfix mt8 font-12 color-grey-B4"> {/*target="_blank"*/}
</p>
<Tooltip placement="bottom" title={"章节"}> <p className="clearfix mt8 font-12 color-grey-B4">
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-shixun fl mr3"></i>{item.stages_count}</span>
</Tooltip> <Tooltip placement="bottom" title={"章节"}>
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-shixun fl mr3"></i>{item.stages_count}</span>
{/*<Tooltip placement="bottom" title={"经验值"}>*/} </Tooltip>
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{item.shixuns_count}</span>*/}
{/*</Tooltip>*/} {/*<Tooltip placement="bottom" title={"经验值"}>*/}
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{item.shixuns_count}</span>*/}
<Tooltip placement="bottom" title={"学习人数"}> {/*</Tooltip>*/}
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-chengyuan fl mr3"></i>{item.members_count}</span>
</Tooltip> <Tooltip placement="bottom" title={"学习人数"}>
</p> <span className="mr10 fl squareIconSpan"><i className="iconfont icon-chengyuan fl mr3"></i>{item.members_count}</span>
</div> </Tooltip>
</div> </p>
) </div>
}) </div>
} )
</div> })
):( }
<div className="edu-tab-con-box clearfix edu-txt-center"> </div>
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> ):(
<p className="edu-nodata-p mb20">暂无数据哦~</p> <div className="edu-tab-con-box clearfix edu-txt-center">
</div> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
) <p className="edu-nodata-p mb20">暂无数据哦~</p>
} </div>
)
</div> }
)
} </div>
} )
}
}
export default ShixunPathCard; export default ShixunPathCard;

@ -170,7 +170,7 @@ class NewHeader extends Component {
submitapplications:false, submitapplications:false,
isRender:false, isRender:false,
isRenders:false, isRenders:false,
showTrial:true, showTrial:false,
} }
// console.log("176") // console.log("176")
// console.log(props); // console.log(props);

@ -183,7 +183,12 @@ export function TPMIndexHOC(WrappedComponent) {
// return false // return false
return this.state.coursedata&&this.state.coursedata.course_identity === 0 return this.state.coursedata&&this.state.coursedata.course_identity === 0
} }
// 管理员等 // 课堂管理等
isClassManagement = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 2
}
//老师等
isAdminOrCreator = () => { isAdminOrCreator = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 3 return this.state.coursedata&&this.state.coursedata.course_identity < 3
@ -279,7 +284,7 @@ export function TPMIndexHOC(WrappedComponent) {
const common = { const common = {
isSuperAdmin:this.isSuperAdmin, isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator, isAdminOrCreator:this.isAdminOrCreator,
isClassManagement:this.isClassManagement,
isAdmin: this.isAdmin, isAdmin: this.isAdmin,
isAdminOrTeacher: this.isAdminOrTeacher, isAdminOrTeacher: this.isAdminOrTeacher,
isStudent: this.isStudent, isStudent: this.isStudent,

@ -324,7 +324,7 @@ export default class TPMsettings extends Component {
opening_time:response.data.shixun.opening_time, opening_time:response.data.shixun.opening_time,
newuse_scope:response.data.shixun.use_scope, newuse_scope:response.data.shixun.use_scope,
scope_partments: response.data.shixun.scope_partment.length, scope_partments: response.data.shixun.scope_partment.length,
shixunmemoMDvalue:response.data.shixun.evaluate_script shixunmemoMDvalue:response.data.shixun.evaluate_script,
}) })
// if(response.data.status===403){ // if(response.data.status===403){
@ -598,7 +598,7 @@ export default class TPMsettings extends Component {
evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
opening_time, pod_exist_time,shixunmemoMDvalue opening_time, pod_exist_time,shixunmemoMDvalue
} = this.state; } = this.state;
let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1; let operateauthority=this.props.identity<4&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
const description_editormd = this.description_editormd.getValue(); const description_editormd = this.description_editormd.getValue();
@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component {
} }
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.props.status==0; let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.state.status==0?true:false;
return ( return (
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}> <div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}>
@ -1092,21 +1092,21 @@ export default class TPMsettings extends Component {
<div className="padding30 bor-bottom-greyE clearfix"> <div className="padding30 bor-bottom-greyE clearfix">
<span className="fl font-16">配置</span> <span className="fl font-16">配置</span>
{ {
this.props.identity===1&&this.props.status==2? this.props.identity===1&&this.state.status==2?
<a className="edu-default-btn edu-blueline-btn ml20 fr" <a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(2)}> onClick={()=>this.operateshixuns(2)}>
永久关闭 永久关闭
</a>:"" </a>:""
} }
{ {
this.props.identity < 4 && this.props.status==0? this.props.identity < 4 && this.state.status==0?
<a className="edu-default-btn edu-blueline-btn ml20 fr" <a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}> onClick={()=>this.operateshixuns(1)}>
删除实训 删除实训
</a>:"" </a>:""
} }
{ {
this.props.identity == 1 && this.props.status == 2 ? this.props.identity == 1 && this.state.status == 2 ?
<a className="edu-default-btn edu-blueline-btn ml20 fr" <a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}> onClick={()=>this.operateshixuns(1)}>
删除实训 删除实训
@ -1510,7 +1510,7 @@ export default class TPMsettings extends Component {
</RadioGroup> </RadioGroup>
</div> </div>
<div className="edu-back-white mb10 padding40-20" style={{display:this.props.identity===1?"block":this.props.status===2&&newuse_scope===0||this.props.status===1&&newuse_scope===0?"none":"block"}}> <div className="edu-back-white mb10 padding40-20" style={{display:this.props.identity===1?"block":this.state.status===2&&newuse_scope===0||this.state.status===1&&newuse_scope===0?"none":"block"}}>
<p className="color-grey-6 font-16 mb30">公开程度</p> <p className="color-grey-6 font-16 mb30">公开程度</p>
<RadioGroup onChange={this.SelectOpenpublic} value={use_scope}> <RadioGroup onChange={this.SelectOpenpublic} value={use_scope}>
<Radio className="radioStyle" value={0}><span>对所有公开</span> <span className="color-grey-9">()</span></Radio> <Radio className="radioStyle" value={0}><span>对所有公开</span> <span className="color-grey-9">()</span></Radio>
@ -1556,7 +1556,7 @@ export default class TPMsettings extends Component {
onClick={(key)=>this.deleteScopeInput(key)} onClick={(key)=>this.deleteScopeInput(key)}
// style={{display:this.props.status===2&&this.props.identity>1||this.props.status===1&&this.props.identity>1===true?"none":"block"}} // style={{display:this.props.status===2&&this.props.identity>1||this.props.status===1&&this.props.identity>1===true?"none":"block"}}
> >
{this.props.identity===1?"x":this.props.status===2&&scope_partment===scope_partments||this.props.status===1&&scope_partment===scope_partments?"":"×"} {this.props.identity===1?"x":this.state.status===2&&scope_partment===scope_partments||this.state.status===1&&scope_partment===scope_partments?"":"×"}
</a> </a>
</li> </li>
) )

@ -1,174 +1,177 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
// import { Rating,Loading} from '@icedesign/base'; // import { Rating,Loading} from '@icedesign/base';
import {getImageUrl,setImagesUrl, toPath} from 'educoder'; import {getImageUrl,setImagesUrl, toPath} from 'educoder';
// import { Pagination,Row,Col } from 'antd'; // import { Pagination,Row,Col } from 'antd';
import 'antd/lib/pagination/style/index.css'; import 'antd/lib/pagination/style/index.css';
import './shixunCss/shixunCard.css'; import './shixunCss/shixunCard.css';
import Rating from '@icedesign/base/lib/rating'; import Rating from '@icedesign/base/lib/rating';
import Pagination from '@icedesign/base/lib/pagination'; import Pagination from '@icedesign/base/lib/pagination';
// import Loading from '@icedesign/base/lib/loading'; // import Loading from '@icedesign/base/lib/loading';
// 引入业务组件样式 // 引入业务组件样式
import '@icedesign/base/lib/pagination/style.js'; import '@icedesign/base/lib/pagination/style.js';
import '@icedesign/base/lib/rating/style.js'; import '@icedesign/base/lib/rating/style.js';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
// import '@icedesign/base/lib/loading/style.js'; // import '@icedesign/base/lib/loading/style.js';
import axios from 'axios'; import axios from 'axios';
const $ = window.$; const $ = window.$;
class ShixunCard extends Component { class ShixunCard extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
startValue:[], startValue:[],
order_by:"", order_by:"",
page:1, page:1,
limit:16, limit:16,
keyword:"", keyword:"",
status:0, status:0,
diff:0, diff:0,
hideme:false, hideme:false,
tag_level:3, tag_level:3,
tag_id:'' tag_id:''
} }
} }
PaginationonChange=(pageNumber)=> { PaginationonChange=(pageNumber)=> {
this.props.shixunsPage(pageNumber); this.props.shixunsPage(pageNumber);
} }
render() { render() {
let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props;
return ( return (
<div className="educontent mb80"> <div className="educontent mb80">
{/*<Loading visible={typepvisible} shape="dot-circle" color='#4AC7FF'>*/} {/*<Loading visible={typepvisible} shape="dot-circle" color='#4AC7FF'>*/}
<div id="shixun_list_content" <div id="shixun_list_content"
style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "block" : "none"}}> style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "block" : "none"}}>
<div className="square-list clearfix"> <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p> <p className="edu-nodata-p mb20">暂无数据哦~</p>
</div> </div>
</div> </div>
<div className="educontent edu-txt-center mb80"> <div className="educontent edu-txt-center mb80">
<div className="inline pages_user_show"> <div className="inline pages_user_show">
<ul> <ul>
</ul> </ul>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
</div> </div>
</div> </div>
<div className="mt10 mb20 clearfix" <div className="mt10 mb20 clearfix"
style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}> style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}>
<div className="shixun_list_content"> <div className="shixun_list_content">
<div className="square-list clearfix"> <div className="square-list clearfix">
{ middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{ { middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{
return( return(
<div className="square-Item" key={key} id={item.id}> <div className="square-Item" key={key} id={item.id}>
{ {
item.tag_name === null ? "": item.tag_name === null ? "":
<div className="tag-green"> <div className="tag-green">
<span className="tag-name"> {item.tag_name}</span> <span className="tag-name"> {item.tag_name}</span>
<img style={{display:'block',height: '28px'}} src={require(`./shixunCss/tag2.png`)}/> <img style={{display:'block',height: '28px'}} src={require(`./shixunCss/tag2.png`)}/>
</div> </div>
} }
<div className={item.power === false ? "closeSquare" : "none"}> <div className={item.power === false ? "closeSquare" : "none"}>
<img src={getImageUrl("images/educoder/icon/lockclose.svg")} <img src={getImageUrl("images/educoder/icon/lockclose.svg")}
className="mt80 mb25"/> className="mt80 mb25"/>
<p className="font-14 color-white">非试用内容需要授权</p> <p className="font-14 color-white">非试用内容需要授权</p>
</div> </div>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="square-img"> <a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img">
{/*<img src={getImageUrl("images/"+item.pic+"?1540534846")}/>*/} {/*<img src={getImageUrl("images/"+item.pic+"?1540534846")}/>*/}
<img src={setImagesUrl(`${item.pic}`)}/> <img src={setImagesUrl(`${item.pic}`)}/>
</a> </a>
{/*target="_blank"*/}
<div className="square-main">
<p className="task-hide"> <div className="square-main">
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="justify color-grey-name" title={item.name}> <p className="task-hide">
{item.name} <a href={"/shixuns/"+item.identifier+"/challenges"} className="justify color-grey-name" title={item.name}>
</a> {item.name}
</p> </a>
</p>
<p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> {/*target="_blank"*/}
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />
</span> <p className="clearfix mt8 ml-3">
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
</p> <Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />
</span>
<p className="clearfix mt8 font-12 color-grey-B4"> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
<Tooltip placement="bottom" title={"关卡"}> </p>
<span className="mr10 fl squareIconSpan">
<i className="iconfont icon-shixunguanqia fl mr3"></i>{item.challenges_count} <p className="clearfix mt8 font-12 color-grey-B4">
</span> <Tooltip placement="bottom" title={"关卡"}>
</Tooltip> <span className="mr10 fl squareIconSpan">
<i className="iconfont icon-shixunguanqia fl mr3"></i>{item.challenges_count}
{/*<Tooltip placement="bottom" title={"经验值"}>*/} </span>
{/*<span className="mr10 fl squareIconSpan">*/} </Tooltip>
{/*<i className="iconfont icon-jingyan fl mr3"></i>{item.exp}*/}
{/*</span>*/} {/*<Tooltip placement="bottom" title={"经验值"}>*/}
{/*</Tooltip>*/} {/*<span className="mr10 fl squareIconSpan">*/}
{/*<i className="iconfont icon-jingyan fl mr3"></i>{item.exp}*/}
<Tooltip placement="bottom" title={"学习人数"}> {/*</span>*/}
<span className="mr10 fl squareIconSpan" style={{display:item.stu_num===0?"none":"block"}}> {/*</Tooltip>*/}
<i className="iconfont icon-chengyuan fl mr3"></i>{item.stu_num}
</span> <Tooltip placement="bottom" title={"学习人数"}>
</Tooltip> <span className="mr10 fl squareIconSpan" style={{display:item.stu_num===0?"none":"block"}}>
<i className="iconfont icon-chengyuan fl mr3"></i>{item.stu_num}
<span className="fr color-grey-B3 squareIconSpan">{item.level}</span> </span>
</p> </Tooltip>
</div> <span className="fr color-grey-B3 squareIconSpan">{item.level}</span>
</div> </p>
)
}) </div>
} </div>
)
</div> })
}
<div className="both"></div>
{/*totalcount*/} </div>
<div className={"ml425"}
//className={totalcount < 22 ? "ml425" : "ml425"} <div className="both"></div>
style={{display: pagination ? "block" : "none"}}> {/*totalcount*/}
{/*<Pagination showQuickJumper defaultCurrent={1} current={pages} total={totalcount} pageSize={12} onChange={this.PaginationonChange} />*/} <div className={"ml425"}
{/* 不加参数请求的时候,没返回总数了。加了个比较大的数字,让他可以翻页 */} //className={totalcount < 22 ? "ml425" : "ml425"}
<Pagination defaultCurrent={1} current={pages} total={ totalcount || 1299 } type="mini" pageSize={16} onChange={this.PaginationonChange} /> style={{display: pagination ? "block" : "none"}}>
</div> {/*<Pagination showQuickJumper defaultCurrent={1} current={pages} total={totalcount} pageSize={12} onChange={this.PaginationonChange} />*/}
{/* 不加参数请求的时候,没返回总数了。加了个比较大的数字,让他可以翻页 */}
</div> <Pagination defaultCurrent={1} current={pages} total={ totalcount || 1299 } type="mini" pageSize={16} onChange={this.PaginationonChange} />
</div>
</div>
{/*</Loading>*/} </div>
</div>
) </div>
} {/*</Loading>*/}
} </div>
)
export default ShixunCard; }
}
export default ShixunCard;

Loading…
Cancel
Save