hjm 6 years ago
commit fd43a9674a

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

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

@ -40,7 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</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?
<div>

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

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

@ -75,7 +75,7 @@ class Listofworks extends Component {
teacherlist: undefined,
searchtext: "",
course_groupysls: undefined,
course_groupyslstwo: undefined,
course_groupyslstwo: [],
visible: false,
userid: 0,
course_group: null,
@ -1164,7 +1164,7 @@ class Listofworks extends Component {
// console.log(checkedValues);
this.setState({
unlimited: 0,
course_groupyslstwo: undefined,
course_groupyslstwo: [],
loadingstate: true,
})
@ -1172,7 +1172,7 @@ class Listofworks extends Component {
} else if (checkedValues.length === data.length) {
this.setState({
unlimited: 0,
course_groupyslstwo: undefined,
course_groupyslstwo: [],
loadingstate: true,
})
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({
unlimitedtwo: 1,
course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true,
})
@ -1206,6 +1207,7 @@ class Listofworks extends Component {
this.setState({
unlimitedtwo: 1,
course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true,
})
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 = () => {
this.setState({
checkedValuesine: undefined,
course_groupyslstwo: undefined,
course_groupyslstwo: [],
unlimited: 0,
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 = () => {
// console.log(this.state.course_group_info);
this.setState({
unlimitedtwo: 1,
checkedValuesineinfo: undefined,
checkedValuesineinfo: [],
course_groupysls: undefined,
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 = () => {

@ -334,7 +334,7 @@ class ShixunhomeWorkItem extends Component{
{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>}
{/*<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>
</Tooltip>
@ -349,7 +349,7 @@ class ShixunhomeWorkItem extends Component{
{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 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>
</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 ">
<span>
<style>
{
`
hr{
display:none;
}
`
}
</style>
<div className={"font-16 color-dark fl pl20 "}>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g,"▁▁▁")}}></div>
{/* /!*{}}></div>
{/* /!*{jobsettingsdata.data.description}*!/*/}
{/* <textarea>*/}
{/* {*/}
{/* this.state.namestring*/}
{/* }*/}
{/* </textarea>*/}
{/* <textarea>*/}
{/* {*/}
{/* this.state.namestring*/}
{/* }*/}
{/* </textarea>*/}
</div>
{/* <div className="justify break_full_word new_li markdown-body"*/}
{/* id="challenge_editorMd_description">*/}
{/* <p id="ReactMarkdown" style={{overflow:'hidden'}}>*/}
{/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/}
{/* <textarea className="w200">*/}
{/* {jobsettingsdata.data.description}*/}
{/* </textarea>*/}
{/* /!*}*!/*/}
{/* </p>*/}
{/*</div>*/}
{/* <div className="justify break_full_word new_li markdown-body"*/}
{/* id="challenge_editorMd_description">*/}
{/* <p id="ReactMarkdown" style={{overflow:'hidden'}}>*/}
{/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/}
{/* <textarea className="w200">*/}
{/* {jobsettingsdata.data.description}*/}
{/* </textarea>*/}
{/* /!*}*!/*/}
{/* </p>*/}
{/*</div>*/}
</span>
</div>}

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

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

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

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

@ -183,7 +183,12 @@ export function TPMIndexHOC(WrappedComponent) {
// return false
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 = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 3
@ -279,7 +284,7 @@ export function TPMIndexHOC(WrappedComponent) {
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
isClassManagement:this.isClassManagement,
isAdmin: this.isAdmin,
isAdminOrTeacher: this.isAdminOrTeacher,
isStudent: this.isStudent,

@ -324,7 +324,7 @@ export default class TPMsettings extends Component {
opening_time:response.data.shixun.opening_time,
newuse_scope:response.data.shixun.use_scope,
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){
@ -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,
opening_time, pod_exist_time,shixunmemoMDvalue
} = 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();
@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component {
}
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 (
<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">
<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"
onClick={()=>this.operateshixuns(2)}>
永久关闭
</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"
onClick={()=>this.operateshixuns(1)}>
删除实训
</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"
onClick={()=>this.operateshixuns(1)}>
删除实训
@ -1510,7 +1510,7 @@ export default class TPMsettings extends Component {
</RadioGroup>
</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>
<RadioGroup onChange={this.SelectOpenpublic} value={use_scope}>
<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)}
// 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>
</li>
)

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

Loading…
Cancel
Save