Merge branches 'dev_aliyun' and 'master' of https://bdgit.educoder.net/Hjqreturn/educoder

dev_forum
杨树明 5 years ago
commit 818952c56f

@ -1482,6 +1482,7 @@ class Listofworksstudentone extends Component {
} }
//计算成绩 //计算成绩
setComputeTime=()=>{ setComputeTime=()=>{
let matchurl = this.props.match.url;
let {teacherdata}=this.state; let {teacherdata}=this.state;
this.setState({ this.setState({
computeTimetype:false computeTimetype:false
@ -1494,6 +1495,7 @@ class Listofworksstudentone extends Component {
this.props.showNotification(`${response.data.message}`); this.props.showNotification(`${response.data.message}`);
// var homeworkid = this.props.match.params.homeworkid; // var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid); this.Getalistofworks(homeworkid);
this.props.history.replace( matchurl );
// this.Getalistofworkstwo("", "", "", "", 1, 20); // this.Getalistofworkstwo("", "", "", "", 1, 20);
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -2147,6 +2149,9 @@ class Listofworksstudentone extends Component {
} }
setComputeTimet=()=>{ setComputeTimet=()=>{
let matchurl = this.props.match.url;
this.setState({ this.setState({
computeTimetype:false computeTimetype:false
}) })
@ -2163,6 +2168,7 @@ class Listofworksstudentone extends Component {
}) })
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.props.showNotification(`${response.data.message}`); this.props.showNotification(`${response.data.message}`);
this.props.history.replace( matchurl );
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -123,9 +123,9 @@ class ShixunHomeworkPage extends Component {
let {tab, teacherdatapage, jobsettingsdatapage} = this.state; let {tab, teacherdatapage, jobsettingsdatapage} = this.state;
const isAdmin = this.props.isAdmin(); const isAdmin = this.props.isAdmin();
console.log(119) // console.log(119)
console.log(jobsettingsdatapage); // console.log(jobsettingsdatapage);
console.log(teacherdatapage); // console.log(teacherdatapage);
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}> <div className={"educontent mb20"} style={{width: "1200px"}}>

@ -1,5 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { Tooltip } from 'antd';
import '../../paths/ShixunPaths.css'; import '../../paths/ShixunPaths.css';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd'; import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import axios from 'axios'; import axios from 'axios';
@ -85,16 +86,26 @@ class DetailCards extends Component{
<a className="fl ring-blue mr10 mt2"> <a className="fl ring-blue mr10 mt2">
<img src={getImageUrl("images/educoder/icon/charpter-white.svg")} className="fl ml3 mt3"/> <img src={getImageUrl("images/educoder/icon/charpter-white.svg")} className="fl ml3 mt3"/>
</a> </a>
<span className="font-18 font-bd">{item.stage_name}</span> <span className="font-18 font-bd">{item.stage_name}</span>
<a className="fr mtf3">
<i className="iconfont icon-bianjidaibeijing font-22 color-green" data-tip-down="编辑"></i> <Tooltip placement="bottom" title={"编辑"}>
</a> <a className="fr mtf3">
<a href="" className="fr ring-op-green mr20"> <i className="iconfont icon-bianjidaibeijing font-22 color-green"></i>
<img src={getImageUrl("images/educoder/icon/movedown.svg")} data-tip-down="向下移动" className="fl mt2 ml4"/> </a>
</a> </Tooltip>
<Tooltip placement="bottom" title={"向下移动"}>
<a href="" className="fr ring-op-green mr20"> <a href="" className="fr ring-op-green mr20">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} data-tip-down="向上移动" className="fl mt2 ml4"/> <img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4"/>
</a> </a>
</Tooltip>
<Tooltip placement="bottom" title={"向上移动"}>
<a href="" className="fr ring-op-green mr20">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} className="fl mt2 ml4"/>
</a>
</Tooltip>
</p> </p>
<div className="detail_for_paragraph clearfix" id={"detail_for_paragraph_"+key}> <div className="detail_for_paragraph clearfix" id={"detail_for_paragraph_"+key}>
<p className="color-dark-grey mt20 mb25 ml20 mr20 pl28 justify font-15">{item.stage_description}</p> <p className="color-dark-grey mt20 mb25 ml20 mr20 pl28 justify font-15">{item.stage_description}</p>

@ -1,238 +1,241 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Radio,Input,Tooltip } from "antd"; import { Modal,Radio,Input,Tooltip } from "antd";
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import SendPanel from "./sendPanel.js"; import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder'; import { getImageUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import './DetailTop.css'; import './DetailTop.css';
const Search = Input.Search; const Search = Input.Search;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
class DetailTop extends Component{ class DetailTop extends Component{
constructor(props){ constructor(props){
super(props) super(props)
this.state={ this.state={
cardsModalcancel:this.cardsModalcancel, cardsModalcancel:this.cardsModalcancel,
cardsModalsave:this.cardsModalsave, cardsModalsave:this.cardsModalsave,
Modalstype:false, Modalstype:false,
Modalstopval:"", Modalstopval:"",
Modalsbottomval:'', Modalsbottomval:'',
loadtype:false, loadtype:false,
deletepathtype:false, deletepathtype:false,
cardsModalsavetype:false cardsModalsavetype:false
} }
} }
allow_deletepath=()=>{ allow_deletepath=()=>{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"是否删除路径?", Modalstopval:"是否删除路径?",
deletepathtype:true deletepathtype:true
}) })
} }
applyissuePath=()=>{ applyissuePath=()=>{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"发布申请已提交,请等待管理员的审核", Modalstopval:"发布申请已提交,请等待管理员的审核",
Modalsbottomval:"• 我们将在1-2个工作日内完成审核", Modalsbottomval:"• 我们将在1-2个工作日内完成审核",
loadtype:true loadtype:true
}) })
} }
cancelissuePath=()=>{ cancelissuePath=()=>{
let pathId=this.props.match.params.pathId; let pathId=this.props.match.params.pathId;
let url ="/paths/"+pathId+"/cancel_publish.json"; let url ="/paths/"+pathId+"/cancel_publish.json";
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
}else if(result.data.status===1){ }else if(result.data.status===1){
window.location.href = "/paths/" + result.data.subject_id window.location.href = "/paths/" + result.data.subject_id
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
reovkissuePath=()=>{ reovkissuePath=()=>{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"是否确认撤销发布", Modalstopval:"是否确认撤销发布",
Modalsbottomval:"确认后,回退到编辑状态", Modalsbottomval:"确认后,回退到编辑状态",
cardsModalsavetype:true, cardsModalsavetype:true,
}) })
} }
reovkissuePaths=()=>{ reovkissuePaths=()=>{
let pathId=this.props.match.params.pathId; let pathId=this.props.match.params.pathId;
let url ="/paths/"+pathId+"/cancel_has_publish.json"; let url ="/paths/"+pathId+"/cancel_has_publish.json";
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
}else if(result.data.status===1){ }else if(result.data.status===1){
this.setState({ this.setState({
cardsModalsavetype:false, cardsModalsavetype:false,
loadtype:false, loadtype:false,
deletepathtype:false deletepathtype:false
}) })
window.location.href = "/paths/" + result.data.subject_id window.location.href = "/paths/" + result.data.subject_id
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
cardsModalcancel=()=>{ cardsModalcancel=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
Modalsbottomval:'', Modalsbottomval:'',
loadtype:false, loadtype:false,
deletepathtype:false deletepathtype:false
}) })
} }
cardsModalsave=()=>{ cardsModalsave=()=>{
let {loadtype,deletepathtype}=this.state; let {loadtype,deletepathtype}=this.state;
//删除路径 //删除路径
if(deletepathtype===true){ if(deletepathtype===true){
let pathid=this.props.match.params.pathId; let pathid=this.props.match.params.pathId;
const deleteUrl = `/paths/`+pathid+`.json`; const deleteUrl = `/paths/`+pathid+`.json`;
axios.delete(deleteUrl).then((response) => { axios.delete(deleteUrl).then((response) => {
const status = response.data.status const status = response.data.status
if (status === 1) { if (status === 1) {
window.location.href = "/paths"; window.location.href = "/paths";
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
} }
//申请发布 //申请发布
if(loadtype===true){ if(loadtype===true){
let pathid=this.props.match.params.pathId; let pathid=this.props.match.params.pathId;
let url ="/paths/"+pathid+"/publish.json"; let url ="/paths/"+pathid+"/publish.json";
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval: result.data.message, Modalstopval: result.data.message,
}) })
}else if(result.data.status===1){ }else if(result.data.status===1){
window.location.reload(); window.location.reload();
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
Modalsbottomval:'' Modalsbottomval:''
}) })
} }
render(){ render(){
let{detailInfoList}=this.props; let{detailInfoList}=this.props;
let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state; let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state;
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
}; };
return( return(
<div className="subhead"> <div className="subhead">
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval} modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel} modalCancel={cardsModalcancel}
modalSave={cardsModalsavetype===true?this.reovkissuePaths:this.cardsModalsave} modalSave={cardsModalsavetype===true?this.reovkissuePaths:this.cardsModalsave}
loadtype={loadtype} loadtype={loadtype}
> >
</Modals> </Modals>
{ {
detailInfoList && detailInfoList &&
<div className="subhead_content"> <div className="subhead_content">
<div className="font-28 color-white clearfix"> <div className="font-28 color-white clearfix">
<span className="fl lineh-40"> <span className="fl lineh-40">
{detailInfoList.name} {detailInfoList.name}
</span> </span>
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true? {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
<Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="ml10 ring-green fl mt10" data-tip-down="编辑"> <Tooltip placement="bottom" title={"编辑"}>
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /> <Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="ml10 ring-green fl mt10" >
</Link>:"" <img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
} </Link>
</Tooltip>
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true? :""
<Link to={"/paths/"+this.props.match.params.pathId+"/statistics"} className="user_default_btn edu-greenback-btn fr font-18" }
>
学习统计 {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
</Link>:"" <Link to={"/paths/"+this.props.match.params.pathId+"/statistics"} className="user_default_btn edu-greenback-btn fr font-18"
} >
学习统计
{ detailInfoList.allow_send === true && </Link>:""
<SendPanel {...this.props} {...this.state}></SendPanel> }
}
{ detailInfoList.allow_send === true &&
</div> <SendPanel {...this.props} {...this.state}></SendPanel>
<div className="clearfix mt20"> }
{
detailInfoList && </div>
<ul className="fl color-grey-eb pathInfo"> <div className="clearfix mt20">
{ detailInfoList.stages_count!=0 ? <li><span>章节</span><span className="ml5">{detailInfoList.stages_count}</span></li> : ""} {
{ detailInfoList.stage_shixuns_count!=0 ? <li><span>实训</span><span className="ml5">{ detailInfoList.stage_shixuns_count}</span></li> : ""} detailInfoList &&
{ detailInfoList.challenge_choose_count!=0 ? <li><span>选择题任务</span><span>{detailInfoList.challenge_choose_count}</span></li> : ""} <ul className="fl color-grey-eb pathInfo">
{ detailInfoList.challenges_count!=0 ? <li><span>实践任务</span><span>{detailInfoList.challenges_count}</span></li> : ""} { detailInfoList.stages_count!=0 ? <li><span>章节</span><span className="ml5">{detailInfoList.stages_count}</span></li> : ""}
{ detailInfoList.subject_score!=0 ? <li><span>经验值</span><span>{detailInfoList.subject_score}</span></li> : ""} { detailInfoList.stage_shixuns_count!=0 ? <li><span>实训</span><span className="ml5">{ detailInfoList.stage_shixuns_count}</span></li> : ""}
{ detailInfoList.member_count!=0 ? <li><span>学习人数</span><span>{detailInfoList.member_count}</span></li> : ""} { detailInfoList.challenge_choose_count!=0 ? <li><span>选择题任务</span><span>{detailInfoList.challenge_choose_count}</span></li> : ""}
</ul> { detailInfoList.challenges_count!=0 ? <li><span>实践任务</span><span>{detailInfoList.challenges_count}</span></li> : ""}
} { detailInfoList.subject_score!=0 ? <li><span>经验值</span><span>{detailInfoList.subject_score}</span></li> : ""}
<div className="fr pr"> { detailInfoList.member_count!=0 ? <li><span>学习人数</span><span>{detailInfoList.member_count}</span></li> : ""}
{detailInfoList===undefined?"":detailInfoList.allow_delete===true?<a </ul>
className={detailInfoList.publish_status===-1?"fl font-18 color-white mt5 mr20":"fl font-18 color-white mt5"} }
style={{opacity: '0.6'}} onClick={this.allow_deletepath} <div className="fr pr">
>删除路径</a>:""} {detailInfoList===undefined?"":detailInfoList.allow_delete===true?<a
className={detailInfoList.publish_status===-1?"fl font-18 color-white mt5 mr20":"fl font-18 color-white mt5"}
{ style={{opacity: '0.6'}} onClick={this.allow_deletepath}
detailInfoList.publish_status===0&&detailInfoList.allow_statistics===true? >删除路径</a>:""}
<a className="user_default_btn user_bluebg_btn font-18 fl ml40 userbluebgfont"
onClick={this.applyissuePath} {
>申请发布</a>:"" detailInfoList.publish_status===0&&detailInfoList.allow_statistics===true?
} <a className="user_default_btn user_bluebg_btn font-18 fl ml40 userbluebgfont"
onClick={this.applyissuePath}
>申请发布</a>:""
{ }
detailInfoList.publish_status===1 && detailInfoList.allow_statistics===true?
<a className="user_default_btn user_grey_btn font-18 fl pointer ml40"
onClick={this.cancelissuePath} {
>撤销申请</a>:"" detailInfoList.publish_status===1 && detailInfoList.allow_statistics===true?
} <a className="user_default_btn user_grey_btn font-18 fl pointer ml40"
onClick={this.cancelissuePath}
{ >撤销申请</a>:""
detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true? }
<a className="user_default_btn user_grey_btn font-18 fl pointer ml40"
onClick={this.reovkissuePath} {
>撤销发布</a>:"" detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true?
} <a className="user_default_btn user_grey_btn font-18 fl pointer ml40"
</div> onClick={this.reovkissuePath}
</div> >撤销发布</a>:""
</div> }
} </div>
</div>
</div> </div>
) }
}
} </div>
)
}
}
export default DetailTop; export default DetailTop;

@ -369,9 +369,11 @@ class PathDetailIndex extends Component{
<p className="clearfix mb30"> <p className="clearfix mb30">
<span className="font-16">课程须知</span> <span className="font-16">课程须知</span>
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true? {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title={"编辑"}>
<Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="fr mtf5"> <Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="fr mtf5">
<i className="iconfont icon-bianjidaibeijing font-20 color-green" data-tip-down="编辑"></i> <i className="iconfont icon-bianjidaibeijing font-20 color-green"></i>
</Link> </Link>
</Tooltip>
:"" :""
} }
</p> </p>
@ -397,16 +399,18 @@ class PathDetailIndex extends Component{
</div> </div>
</div> </div>
<Tooltip placement="bottom" title={"显示全部"}>
<div className={detailInfoList.tags.length>15&&clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 fr":"newsubscript mb9 color-grey-9 none"} <div className={detailInfoList.tags.length>15&&clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 fr":"newsubscript mb9 color-grey-9 none"}
data-tip-down="显示全部"
onClick={()=>this.clickNewsubscript(0)} onClick={()=>this.clickNewsubscript(0)}
><span className="mr8">...</span><Icon type="caret-down" /> ><span className="mr8">...</span><Icon type="caret-down" />
</div> </div>
</Tooltip>
<Tooltip placement="bottom" title={"收起"}>
<div className={clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9 fr"} <div className={clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9 fr"}
data-tip-down="收起"
onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" /> onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" />
</div> </div>
</Tooltip>
</div> </div>
} }

@ -31,6 +31,30 @@ const Option = Select.Option;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
if (!dateString) return dateString;
const ar = dateString.split(':')
if (ar[1] == '00' || ar[1] == '30') {
return dateString
}
const miniute = parseInt(ar[1]);
if (miniute < 30 || miniute == 60) {
return [ar[0], '30'].join(':')
}
if (miniute < 60) {
// 加一个小时
const tempStr = [ar[0], '00'].join(':');
const format = "YYYY-MM-DD HH:mm";
const _moment = moment(tempStr, format)
_moment.add(1, 'hours')
return _moment.format(format)
}
return dateString
}
// 恢复数据 // 恢复数据
function md_rec_data(k,mdu,id, editor){ function md_rec_data(k,mdu,id, editor){
if(window.sessionStorage.getItem(k+mdu) !== null){ if(window.sessionStorage.getItem(k+mdu) !== null){
@ -1120,7 +1144,7 @@ export default class TPMsettings extends Component {
} }
onChangeTimePicker =(value, dateString)=> { onChangeTimePicker =(value, dateString)=> {
this.setState({ this.setState({
opening_time:dateString opening_time:moment(handleDateStrings(dateString))
}) })
} }

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC'; import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC,handleDateString} from 'educoder'; import {SnackbarHOC} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd'; import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -16,6 +16,7 @@ import './css/Newshixuns.css';
import {getUrl} from 'educoder' import {getUrl} from 'educoder'
let path = getUrl("/editormd/lib/") let path = getUrl("/editormd/lib/")
const $ = window.$; const $ = window.$;
@ -28,6 +29,34 @@ const Option = Select.Option;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const confirm = Modal.confirm; const confirm = Modal.confirm;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
if (!dateString) return dateString;
const ar = dateString.split(':')
if (ar[1] == '00' || ar[1] == '30') {
return dateString
}
const miniute = parseInt(ar[1]);
if (miniute < 30 || miniute == 60) {
return [ar[0], '30'].join(':')
}
if (miniute < 60) {
// 加一个小时
const tempStr = [ar[0], '00'].join(':');
const format = "YYYY-MM-DD HH:mm";
const _moment = moment(tempStr, format)
_moment.add(1, 'hours')
return _moment.format(format)
}
return dateString
}
// 恢复数据 // 恢复数据
function md_rec_data(k, mdu, id, editor) { function md_rec_data(k, mdu, id, editor) {
if (window.sessionStorage.getItem(k + mdu) !== null) { if (window.sessionStorage.getItem(k + mdu) !== null) {
@ -713,7 +742,7 @@ class Newshixuns extends Component {
onChangeTimePicker = (value, dateString) => { onChangeTimePicker = (value, dateString) => {
this.setState({ this.setState({
TimePickervalue: handleDateString(dateString) TimePickervalue: handleDateStrings(dateString)
}) })
} }
// 附件相关 START // 附件相关 START

@ -293,11 +293,12 @@ class Challenges extends Component {
<p className="clearfix mb30"> <p className="clearfix mb30">
<span className="font-16 fl">简介</span> <span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}>
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} <a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr" href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr">
data-tip-down="编辑">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /> <img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</a> </a>
</Tooltip>
</p> </p>
<div className="justify break_full_word new_li markdown-body" <div className="justify break_full_word new_li markdown-body"
@ -378,11 +379,13 @@ class Challenges extends Component {
<div className="clearfix mb20"> <div className="clearfix mb20">
<span className="fl ring-blue mr10 mt8"> <span className="fl ring-blue mr10 mt8">
{item.st === 0 ? {item.st === 0 ?
<img src={getImageUrl("images/educoder/icon/code.svg")} data-tip-down="实训任务" <Tooltip placement="bottom" title={"实训任务"}>
className="fl mt2 ml2" /> <img src={getImageUrl("images/educoder/icon/code.svg")} className="fl mt2 ml2" />
</Tooltip>
: :
<img src={getImageUrl("images/educoder/icon/choose.svg")} data-tip-down="选择题任务" <Tooltip placement="bottom" title={"选择题任务"}>
className="fl mt2 ml3" /> <img src={getImageUrl("images/educoder/icon/choose.svg")} className="fl mt2 ml3" />
</Tooltip>
} }
</span> </span>
<span className="mr15 font-16 fl">{key+1}</span> <span className="mr15 font-16 fl">{key+1}</span>

@ -10,6 +10,8 @@ import classNames from 'classnames';
import { getImageUrl, toPath } from 'educoder'; import { getImageUrl, toPath } from 'educoder';
import { Tooltip } from 'antd';
import axios from 'axios'; import axios from 'axios';
import { CircularProgress } from 'material-ui/Progress'; import { CircularProgress } from 'material-ui/Progress';
@ -76,8 +78,10 @@ class Propaedeutics extends Component {
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} > <p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} >
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics" <Tooltip placement="bottom" title={"编辑"}>
data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a> <a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
</Tooltip>
</p> </p>
{ {
loadingContent ? loadingContent ?

Loading…
Cancel
Save