Conflicts:
	public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
dev_forum
caishi 6 years ago
commit 4088ebcdc0

@ -114,21 +114,21 @@ module.exports = {
// First, run the linter.
// It's important to do this before Babel processes the JS.
// 上线然后要注释回来
// {
// test: /\.(js|jsx|mjs)$/,
// enforce: 'pre',
// use: [
// {
// options: {
// formatter: eslintFormatter,
// eslintPath: require.resolve('eslint'),
//
// },
// loader: require.resolve('eslint-loader'),
// },
// ],
// include: paths.appSrc,
// },
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall

@ -55,7 +55,7 @@
<!-- <link href="/react/build/css/iconfont.css" rel="stylesheet" type="text/css"> -->
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
<link href="/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
<!--<link href="https://pandao.github.io/editor.md/examples/css/style.css" rel="stylesheet" type="text/css">-->
@ -148,12 +148,12 @@
(function() { // Scoping function to avoid globals
var href = location.href;
if (href.indexOf('/tasks/') != -1) {
document.write('<script type="text/javascript" src="https://testeduplus2.educoder.net/assets/kindeditor/kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>');
// build.js中会将这个url附加一个前缀 react/build
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>');
document.write('<script type="text/javascript" src="https://testeduplus2.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
} else if (href.indexOf('/paths/') != -1) {
document.write('<script type="text/javascript" src="https://testeduplus2.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
}
})();

@ -38,7 +38,7 @@
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
<link href="/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_653600_qa9lwwv74z.css">

@ -1,51 +1,52 @@
const isDev = window.location.port == 3007;
export function getImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'https://testeduplus2.educoder.net'
if (isDev) {
return `${local}/${path}`
}
return `/${path}`;
}
export function setImagesUrl(path){
const local = 'http://47.96.87.25:48080'
let firstStr=path.substr(0,1);
console.log(firstStr);
if(firstStr=="/"){
return isDev?`${local}${path}`:`${path}`;
}else{
return isDev?`${local}/${path}`:`/${path}`;
}
}
export function getUrl(path, goTest) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// 如果想所有url定位到测试版可以反注释掉下面这行
//goTest = true
// testbdweb.educoder.net testbdweb.trustie.net
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
const local = 'https://testeduplus2.educoder.net'
if (isDev) {
return `${local}${path?path:''}`
}
return `${path ? path: ''}`;
}
export function getUploadActionUrl(path, goTest) {
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function test(path) {
return `${path}`;
}
export function toPath(path) {
window.open(path, '_blank');
}
const isDev = window.location.port == 3007;
export function getImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'https://testeduplus2.educoder.net'
if (isDev) {
return `${local}/${path}`
}
return `/${path}`;
}
export function setImagesUrl(path){
const local = 'http://47.96.87.25:48080'
let firstStr=path.substr(0,1);
console.log(firstStr);
if(firstStr=="/"){
return isDev?`${local}${path}`:`${path}`;
}else{
return isDev?`${local}/${path}`:`/${path}`;
}
}
export function getUrl(path, goTest) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// 如果想所有url定位到测试版可以反注释掉下面这行
//goTest = true
// testbdweb.educoder.net testbdweb.trustie.net
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
// const local = 'https://testeduplus2.educoder.net'
const local = 'http://47.96.87.25:48080'
if (isDev) {
return `${local}${path?path:''}`
}
return `${path ? path: ''}`;
}
export function getUploadActionUrl(path, goTest) {
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function test(path) {
return `${path}`;
}
export function toPath(path) {
window.open(path, '_blank');
}
// export default queryString

@ -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,
})

@ -48,8 +48,9 @@ class BoardsListItem extends Component{
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<h6>
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter') }}
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`}
>{discussMessage.subject}</a>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{

@ -446,7 +446,9 @@ class Boards extends Component{
</Tooltip>
</a>
</p> } */}
{pagination.total_count > 15 && <Pagination className="coursePagination" showQuickJumper pageSize={15} total={pagination.total_count} onChange={this.onPageChange} />}
{pagination.total_count > 15 && <Pagination className="coursePagination"
current={pagination.page}
showQuickJumper pageSize={15} total={pagination.total_count} onChange={this.onPageChange} />}
</React.Fragment>
)

@ -86,7 +86,7 @@ class CommonWorkAnswer extends Component{
{/* 内容区 */}
<div className="padding40 memoContent new_li">
{reference_answer ? <MarkdownToHtml content={reference_answer || "还未设置答案。"}></MarkdownToHtml> :
reference_answer === undefined ? '' : <NoneData></NoneData>}
reference_answer === undefined ? '' : ((!attachments || attachments.length == 0) && <NoneData></NoneData>)}
{ attachments && attachments.map((item) => {
return ( <div className="color-grey">

@ -190,28 +190,28 @@ class CommonWorkAppraise extends Component{
<div className={"color-grey-6 mb15 font-16"}>
内容
</div>
<div className="pl20">
<div className={"ml20"} className="markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(description)}}>
</div>
{attachments.map((item,key)=>{
return(
<div className="color-grey" key={key}>
<a className="color-grey">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{/*{item.delete===true?<i className="font-14 iconfont icon-guanbi " id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}*/}
{item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</div>
)
})}
</div>
<div className="markdown-body ml20" dangerouslySetInnerHTML={{__html: markdownToHTML(description)}}>
</div>
<div className={"color-grey-6 clearfix lineh-25 ml20"}>
{attachments.map((item,key)=>{
return(
<div className="color-grey" key={key}>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B" length="58" title={`${item.title && item.title.length > 40 ? item.title : ''}`}>
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{/*{item.delete===true?<i className="font-14 iconfont icon-guanbi " id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}*/}
{item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</div>
)
})}
<div className={"color-grey-6 h20 ml20"}>
{ update_time &&
<React.Fragment>
<span className={"color9B9B fr"}>更新</span>

@ -150,7 +150,7 @@ class CommonWorkDetailIndex extends Component{
]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname">
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}>
{homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span>

@ -1,5 +1,5 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd";
import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN';
import { WordsBtn, ConditionToolTip, queryString,getImageUrl, on, off} from 'educoder';
@ -64,7 +64,9 @@ function buildColumns(that, student_works) {
key: 'id',
render: (text, record, index) => {
return (
<span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >{(that.state.page - 1) * PAGE_SIZE + index + 1}</span>
<span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >
{record.isMine == true ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1}
</span>
)},
}, {
title: '姓名',
@ -77,7 +79,8 @@ function buildColumns(that, student_works) {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
whiteSpace: 'nowrap',
width: '98px'
}} title={text}>
{/* <Tooltip placement="bottom" title={text}>
</Tooltip> */}
@ -94,7 +97,10 @@ function buildColumns(that, student_works) {
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
<a href="javascript:;"
title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden'}}
>{record.student_id}</a>
</span>
),
})
@ -228,7 +234,7 @@ function buildColumns(that, student_works) {
<span>
<Tooltip title={
getScoreTip(student_score,
<div>
isNiPing ? `你的评阅分数:${record.student_score}` : <div>
{record.student_comment_count && <div>{`${record.student_comment_count}名学生进行了匿评`}</div>}
<div>有效平均分{record.student_score}</div>
</div>
@ -256,7 +262,7 @@ function buildColumns(that, student_works) {
{`${record.appeal_deal_count}/${appeal_all_count}`}
</span>
</Tooltip> }
{ !appeal_all_count && '-/-'}
{ !appeal_all_count && <span style={{ color: '#747A7F' }}>-/-</span>}
</span>
),
})
@ -299,7 +305,7 @@ function buildColumns(that, student_works) {
key: 'operation',
dataIndex: 'operation',
render: (operation, record) => (
record.work_status === 0 ? '--':
record.work_status === 0 && !isAdmin ? <span style={{ color: '#747A7F' }}>--</span>:
<div>
{/* 0 未提交 */}
{/*<React.Fragment>*/}
@ -330,7 +336,7 @@ const orderMap = {
}
const PAGE_SIZE = 50
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkSetting extends Component{
class CommonWorkList extends Component{
constructor(props){
super(props)
@ -355,8 +361,8 @@ class CommonWorkSetting extends Component{
category: {},
}
}
onTablePagination = (pageInfo) => {
this.setState({ page: pageInfo.current }, () => {
onTablePagination = (page) => {
this.setState({ page: page }, () => {
this.fetchList()
})
@ -543,7 +549,7 @@ class CommonWorkSetting extends Component{
StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score,
ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count,
late_penalty, absence_penalty, appeal_penalty,
work_group: '' }] : []
work_group: '', isMine: true }] : []
}
let params = this._getRequestParams()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`;
@ -706,7 +712,7 @@ class CommonWorkSetting extends Component{
}
<div className={"justify break_full_word new_li edu-back-white course_table_wrap"} style={{minHeight:"480px"}}>
<div className={"justify break_full_word new_li edu-back-white course_table_wrap"} style={{minHeight:"480px", marginBottom: '30px'}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
@ -730,31 +736,35 @@ class CommonWorkSetting extends Component{
</div>
</div>
</Spin>
:<Table
dataSource={student_works}
columns={columns}
showQuickJumper
pagination={work_count > PAGE_SIZE ? { //分页
:
<React.Fragment>
{/* pagination={work_count > PAGE_SIZE ? { //分页
total: work_count, //数据总数量
pageSize: PAGE_SIZE, //显示几条一页
current: page,
} : false}
loading={loadingstate}
} : false}
onChange={this.onTablePagination}
/>}
</div>
{/* <div className={"justify break_full_word new_li edu-back-white singleLine"} style={{minHeight:"480px"}}>
{data2===undefined?"":<Table
showHeader={false}
dataSource={data2}
*/}
<Table
className="stageTable"
dataSource={student_works}
columns={columns}
showQuickJumper
pagination={false}
loading={loadingstate}
/>}
</div> */}
/>
</React.Fragment>
}
</div>
</div>
{work_count > PAGE_SIZE && <Pagination
style={{ textAlign: 'center', marginBottom: '20px' }}
showQuickJumper pageSize={PAGE_SIZE} onChange={this.onTablePagination} current={page} total={work_count} />}
</React.Fragment>
@ -762,5 +772,5 @@ class CommonWorkSetting extends Component{
}
}
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
export default CommonWorkSettingForm;
const CommonWorkListForm = Form.create({ name: 'commonworkListForm' })(CommonWorkList);
export default CommonWorkListForm;

@ -633,7 +633,7 @@ render(){
</p>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{homework_name}</p>
<p className=" fl color-black mt25 summaryname" title={homework_name}>{homework_name}</p>
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div>

@ -982,6 +982,9 @@ class CommonWorkSetting extends Component{
.settingForm .ant-radio-group, .settingForm.ant-form {
color: #666;
}
.settingForm.ant-form {
margin-bottom: 30px;
}
.settingForm input.ant-input {
height: 40px

@ -88,6 +88,7 @@ class TabRightComponents extends Component{
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
color: #333;
}
.drop_down_menu {
width: 121px;

@ -103,7 +103,7 @@ class WorkDetailPageHeader extends Component{
/>
{category && <a className="color-grey-6 fr font-16 ml30 mt5 mr20" onClick={this.goback} style={{ marginRight: '26px'}}>返回</a>}
{category && <a className="color-grey-6 fr font-16 ml30 mt7 mr20" onClick={this.goback} style={{ marginRight: '26px'}}>返回</a>}
{this.props.update_atta &&
<React.Fragment>

@ -219,7 +219,10 @@ class commonWork extends Component{
return;
}
this.props.confirm({
content: `是否确认公开?`,
content: <div>
<div>设为公开后非课堂成员也可以访问查看</div>
<div>是否确认设为公开</div>
</div>,
onOk: () => {
let coursesId=this.props.match.params.coursesId;
const url = `/courses/${coursesId}/homework_commons/set_public.json`
@ -395,8 +398,9 @@ class commonWork extends Component{
secondRowLeft={
<div style={{"display":"inline-block", "marginTop": "22px"}}>
<span> {mainList&&mainList.all_count} 个作业</span>
<span style={{"marginLeft":"16px"}}>已发布作业{published_count}</span>
{this.props.isAdmin()?<span style={{"marginLeft":"16px"}}>未发布作业{unpublished_count}</span>:""}
<span style={{"marginLeft":"16px"}}>已发布{published_count}</span>
{/* {this.props.isAdmin()?:""} */}
<span style={{"marginLeft":"16px"}}>未发布{unpublished_count}</span>
</div>
}
searchPlaceholder={"请输入名称进行搜索"}

@ -209,7 +209,9 @@ class CommonWorkAppraiseReply extends Component{
isAdmin || 评阅入口超级管理员老师和助教显示 - 改成admin也不显示
匿评人匿评期间显示
*/
const needNiPingEditor = (allow_score && isNiPing);
// && isNiPing
const needNiPingEditor = (allow_score );
if (!needNiPingEditor && comment_scores.length == 0) {
return ''
}
@ -257,7 +259,7 @@ class CommonWorkAppraiseReply extends Component{
<span className="labal">全部评阅</span>
<span className="count">{comment_scores.length}</span>
</div>)} */}
<div className="padding10-20 bor-bottom-greyE">
<div className={`padding10-20 ${comment_scores.length ? 'bor-bottom-greyE' : ''}`}>
{!!comment_scores.length && <div className={"color-grey-6 font-16"}>
全部评阅<span className="count">{comment_scores.length===0?"":`(${comment_scores.length})`}</span>

@ -51,7 +51,7 @@ class CCommentItem extends Component{
})
.then((response) => {
if (response.data.status == 0) {
this.showNotification('撤销成功')
this.props.showNotification('撤销成功')
this.props.replySuccess()
}
})
@ -67,7 +67,7 @@ class CCommentItem extends Component{
let { item, commentIndex }=this.props;
if (!this.state.secondReplyContent || !this.state.secondReplyContent.trim()) {
this.showNotification('内容不能为空')
this.props.showNotification('内容不能为空')
return;
}
if (this.state.show_reply) {
@ -313,7 +313,7 @@ class CCommentItem extends Component{
{ item.is_invalid ? <span className="validate_area fr">失效</span> :
<React.Fragment>
<WordsBtn style="blue" className="fr" onClick={this.state.show_reply ? this.cancelReply : this.showReply}>回复</WordsBtn>
{(isAppealing || isAnonymous) && item.can_appeal && item.appeal_status == 0 && <WordsBtn style="blue" className="fr mr5" onClick={this.state.show_appeal ? this.cancelAppeal : this.showAppeal}>申诉</WordsBtn>}
{(isAppealing || isAnonymous) && item.can_appeal && item.appeal_status == 0 && <WordsBtn style="blue" className="fr mr20" onClick={this.state.show_appeal ? this.cancelAppeal : this.showAppeal}>申诉</WordsBtn>}
</React.Fragment>

@ -33,9 +33,14 @@
.course-message .panel-comment_item .editor__resize {
left: 47%;
}
.course-message .childrenCommentsView .comment_item_cont:first-child {
border-top: 1px solid #e3e3e3;
margin-top: 8px;
}
.course-message .comment_item_cont:last-child {
/* 作品评阅需要 */
border-bottom: none;
padding-bottom: 0px;
}
.course-message .memoMore {

@ -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>

@ -46,7 +46,8 @@ class Startshixuntask extends Component{
}else{
if(response.data.status!=401&&response.data.status!=403){
window.location.href = "/tasks/"+response.data.game_identifier;
const w=window.open('about:blank');
w.location.href= "/tasks/"+response.data.game_identifier
}
}

@ -1,6 +1,12 @@
i.iconfont {
cursor: pointer;
}
.overflowHidden1{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
/* BASICS */
.editormd-preview ol li {
@ -837,6 +843,14 @@ a.white-btn.use_scope-btn:hover{
font-weight: 400;
margin-left: 28px;
}
.commitcontentsysl{
width: 43px;
height: 15px;
font-size: 16px;
font-family: MicrosoftYaHei;
font-weight: 400;
margin-left: -4px;
}
/*列表状态*/

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl ,bytesToSize} from 'educoder';
import { WordsBtn,getUrl ,bytesToSize,getImageUrl} from 'educoder';
import axios from 'axios';
import Modals from '../../../modals/Modals';
const Search = Input.Search;

@ -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, {

@ -46,24 +46,30 @@ const buildColumns = (that) => {
key: 'login',
align:'center',
className:"color-grey-6",
// render: (name, record) => {
// return <a className="color-dark" target="_blank" href={`/users/${record.login}`}>{name}</a>
// }
render: (name, record) => {
return <span className="color-dark overflowHidden1" style={{maxWidth: '110px'}}>{name}</span>
}
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
align:'center',
width:"10%",
className:"color-grey-6",
render: (name, record) => {
return <a className="color-dark" target="_blank" href={`/users/${record.login}`}>{name}</a>
return <a className="color-dark overflowHidden1" target="_blank"
style={{maxWidth: '120px'}} href={`/users/${record.login}`}>{name}</a>
}
}, {
title: '学号',
dataIndex: 'student_id',
key: 'student_id',
align:'center',
className:"color-grey-6"
className:"color-grey-6",
render: (student_id, record) => {
return <span className="color-dark overflowHidden1"
style={{maxWidth: '110px'}} >{student_id}</span>
}
}, {
title: '分班',
dataIndex: 'course_group_name',

@ -7,7 +7,8 @@ import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText'
import update from 'immutability-helper'
import { WordsBtn, ConditionToolTip, on, off } from 'educoder'
import { WordsBtn, ConditionToolTip, on, off ,trigger} from 'educoder'
import axios from 'axios'
import _ from 'lodash'
@ -33,24 +34,27 @@ function buildColumns(that) {
const { course_groups } = that.state
const columns = [{
title: '序号',
width: 28,
// dataIndex: 'name',
dataIndex: 'name',
key: 'index',
render: (content, item, index) => {
return <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1}</a>
return <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1} </a>
}
},{
title: '用户ID',
width: 82,
width: 120,
dataIndex: 'login',
key: 'login'
key: 'login',
render: (login, record) => {
return <span className="overflowHidden1" style={{ maxWidth: '110px'}} title={`${login.length > 8 ? login : ''}`}>{login}</span>
}
}, {
title: '姓名',
dataIndex: 'name',
width: 140,
width: 120,
key: 'name',
render: (name, record) => {
return <a href={`/login/${record.login}`} target="_blank">{name}</a>
return <a href={`/login/${record.login}`} target="_blank" className="overflowHidden1" style={{ maxWidth: '110px'}}
title={`${name.length > 4 ? name : ''}`}>{name}</a>
}
}, {
title: '角色',

File diff suppressed because it is too large Load Diff

@ -119,10 +119,10 @@ class CommitSummary extends Component{
<div className={"educontent mb20"}>
<div style={{
width:'100%',
height:'100px'
height:'20px'
}} >
<div className="educontent mb30">
<p className="clearfix mb20 mt10">
<p className="clearfix mb20 mt10 ml29">
<WordsBtn className="btn colorgrey fl hovercolorblue "
style="grey">{data === undefined ? "" :data.course_name===undefined?"": data.course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -135,23 +135,23 @@ class CommitSummary extends Component{
</div>
<div>
<p className="ml15 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`} className="color-grey-6 fr font-16 ml30 mt10 mr20">返回</a>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
</div>
{/*educontentbox*/}
<div className="stud-class-set pt40 pb40">
<div className={"ml30 mr30 mt10"}>
<div className={"mt10"}>
<div style={{ "background": "#fff", "padding": "15px"}}>
<span className="commitcontents ">
<span className="color-red mt20">*</span>
<span className="commitcontentsysl">
<span className="color-red">*</span>
内容</span>
</div>
<div className="new-wrap">
<Form labelCol={{span: 5}}layout='vertical' onSubmit={this.handleSubmit} wrapperCol={{span: 12}}>
<Form.Item
>
<div style={{ "background": "#fff","padding-bottom":"10px","padding-left":"10px","padding-right":"10px"}}>
<div style={{ "background": "#fff","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}>
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',

@ -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,
@ -93,6 +93,7 @@ class Listofworks extends Component {
code_review: false,
boolgalist:true,
challenges_count:0,
experience:0,
columns: [
{
title: '序号',
@ -384,7 +385,7 @@ class Listofworks extends Component {
// course_group:分班情况 [232, 231] []:不限(空数组)
var data = {
search: "",
order: "",
order: "desc",
b_order: "asc",
work_status: "",
course_group: "",
@ -457,6 +458,11 @@ class Listofworks extends Component {
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
@ -1164,7 +1170,7 @@ class Listofworks extends Component {
// console.log(checkedValues);
this.setState({
unlimited: 0,
course_groupyslstwo: undefined,
course_groupyslstwo: [],
loadingstate: true,
})
@ -1172,7 +1178,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 +1204,7 @@ class Listofworks extends Component {
this.setState({
unlimitedtwo: 1,
course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true,
})
@ -1206,6 +1213,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);
@ -1359,6 +1367,7 @@ class Listofworks extends Component {
let datalist = [];
var game_list = result.data.game_list
var boolgalist=true;
var experience=0;
for (var i = 0; i < game_list.length; i++) {
datalist.push({
@ -1368,6 +1377,7 @@ class Listofworks extends Component {
classroom: game_list[i].score,
complete_status: game_list[i].complete_status,
})
experience=game_list[i].score+experience;
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false;
@ -1381,6 +1391,7 @@ class Listofworks extends Component {
viewtrainingdata: result.data,
visibles: true,
game_list: datalist,
experience:experience,
boolgalist:boolgalist,
})
}
@ -1485,22 +1496,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 = () => {
@ -1586,7 +1597,7 @@ class Listofworks extends Component {
render() {
// console.log("Listofworks.js000")
let {columns, page, boolgalist,limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
let {columns, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
//
// console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info)
@ -1630,6 +1641,7 @@ class Listofworks extends Component {
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
@ -1702,10 +1714,34 @@ class Listofworks extends Component {
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""}
{/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 121px;
}
.drop_down_menu li {
overflow: visible;
width: 121px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} calssName="color-dark">实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} calssName="color-dark">学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : ""

@ -90,7 +90,7 @@ class Listofworksstudentone extends Component {
var data = {
search: "",
order: "",
b_order: "asc",
b_order: "desc",
page: 1,
limit: 20,
work_status: "",
@ -107,6 +107,9 @@ class Listofworksstudentone extends Component {
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata();
@ -154,6 +157,13 @@ class Listofworksstudentone extends Component {
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata();
@ -214,11 +224,15 @@ class Listofworksstudentone extends Component {
// updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0,
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count,
levelscore: this.state.teacherdata.final_score,
efficiencyscore: this.state.teacherdata.eff_score,
finalscore: this.state.teacherdata.work_score,
operating: "查看",
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
ultimate_score:this.state.teacherdata.ultimate_score,
user_name: this.state.teacherdata.user_name,
user_login: this.state.teacherdata.user_login,
})
// }
@ -253,11 +267,15 @@ class Listofworksstudentone extends Component {
// updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.student_works[i].complete_count === 4 ? "4/4" : this.state.student_works[i].complete_count === 3 ? "3/4" : this.state.student_works[i].complete_count === 2 ? "2/4" : this.state.student_works[i].complete_count === 1 ? "1/4" : this.state.student_works[i].complete_count === 0 ? "0" : 0,
completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count,
levelscore: this.state.student_works[i].final_score,
efficiencyscore: this.state.student_works[i].eff_score,
finalscore: this.state.student_works[i].work_score,
operating: "查看",
late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty,
ultimate_score:this.state.teacherdata.student_works[i].ultimate_score,
user_name: this.state.teacherdata.student_works[i].user_name,
user_login: this.state.teacherdata.student_works[i].user_login,
})
}
@ -310,11 +328,15 @@ class Listofworksstudentone extends Component {
// updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0,
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count,
levelscore: this.state.teacherdata.final_score,
efficiencyscore: this.state.teacherdata.eff_score,
finalscore: this.state.teacherdata.work_score,
operating: "查看",
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
ultimate_score:this.state.teacherdata.ultimate_score,
user_name: this.state.teacherdata.user_name,
user_login: this.state.teacherdata.user_login,
})
// }
@ -333,8 +355,8 @@ class Listofworksstudentone extends Component {
var teacherlist = undefined;
}
console.log("datalistdatalist文件");
console.log(datalist);
// console.log("datalistdatalist文件");
// console.log(datalist);
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -361,7 +383,8 @@ class Listofworksstudentone extends Component {
// console.log(JSON.stringify(result))
let datalist = [];
var game_list = result.data.game_list
var boolgalist=true;
var experience=0;
for (var i = 0; i < game_list.length; i++) {
datalist.push({
@ -371,7 +394,11 @@ class Listofworksstudentone extends Component {
classroom: game_list[i].score,
complete_status: game_list[i].complete_status,
})
experience=game_list[i].score+experience;
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false;
}
}
// console.log("viewtraining");
// console.log(datalist);
@ -379,7 +406,9 @@ class Listofworksstudentone extends Component {
this.setState({
viewtrainingdata: result.data,
visibles: true,
game_list: datalist
game_list: datalist,
experience:experience,
boolgalist:boolgalist,
})
}
}).catch((error) => {
@ -458,7 +487,13 @@ class Listofworksstudentone extends Component {
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
loadingstate: false
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.seacthdata();
}
@ -495,7 +530,7 @@ class Listofworksstudentone extends Component {
}
render() {
let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
let columns = [
{
title: '序号',
@ -639,10 +674,7 @@ class Listofworksstudentone extends Component {
align: "center",
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.completion === undefined ? "--" : record.completion === "" ? "--" : record.completion}</a>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</span>
),
},
@ -719,6 +751,8 @@ class Listofworksstudentone extends Component {
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
@ -851,6 +885,8 @@ class Listofworksstudentone extends Component {
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/> : ""
}
@ -925,7 +961,6 @@ class Listofworksstudentone extends Component {
pagination={false}
loading={false}
showHeader={false}
scroll={{y: 240}}
/>}
</div>
{JSON.stringify(datas) !== "[]" ?

@ -304,7 +304,7 @@ class ShixunhomeWorkItem extends Component{
}
{
this.props.isNotMember?this.props.discussMessage.private_icon===false?
this.props.isNotMember?this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span>
:
<Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
@ -313,7 +313,7 @@ class ShixunhomeWorkItem extends Component{
{
this.props.discussMessage.private_icon===false?
this.props.discussMessage.private_icon===true?
<Tooltip title={ this.props.isNotMember?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip>
@ -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>:""}

@ -37,6 +37,7 @@ class TraineetraininginformationModal extends Component {
userids: this.props.userids,
game_list:this.props.game_list,
boolgalist:this.props.boolgalist,
experience:this.props.experience,
})
// console.log("TraineetraininginformationModal")
@ -51,6 +52,26 @@ class TraineetraininginformationModal extends Component {
// this.seacthdata();
}
componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
// console.log(this.props);
if (nextProps.boolgalist != this.props.boolgalist) {
// console.log("50");
// console.log(nextProps.user);
if (nextProps.boolgalist !== undefined) {
// console.log("53");
// console.log(nextProps.user);
this.setState({
boolgalist: nextProps.boolgalist,
})
}
}
}
LimitNumber=(txt)=> {
var str = txt;
if(str.length>25){
@ -60,7 +81,7 @@ class TraineetraininginformationModal extends Component {
}
render() {
var columns;
if(this.props.boolgalist === true) {
if(this.state.boolgalist&&this.state.boolgalist === true) {
columns = [
{
title: '关卡',
@ -195,7 +216,7 @@ class TraineetraininginformationModal extends Component {
<div style={{"width": "100%","text-align": "left","clear": "both"}}>
<div className="mt5 fl" >
<span style={{"text-align": "left"}}>{this.props.viewtrainingdata === undefined ? "" : this.LimitNumber(this.props.viewtrainingdata.shixun_name)}</span>
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/}
<Button type="primary" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>

@ -750,12 +750,42 @@ class Trainingjobsetting extends Component {
srorelength++
}
}
//算下面值是否是奇数
var srbool=false;
if( srorelength%2 ==0 ){
// 偶数
srbool=false;
}else{
// 奇数
srbool=true;
}
//计算平均值
Proportion= Proportion/srorelength;
var intkk=0;
if(srbool==true){
var exams = Math.round(Proportion)
var intk = srorelength*exams;
intkk=100 - intk;
}
var mact=0;
//给每到题目赋平均值
for (var i=0;i<challenge_settingsdata.length;i++){
if(challenge_settingsdata[i].checked === true) {
challenge_settingsdata[i].challenge_score = Proportion.toFixed(2);
if(srbool===false){
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
}else{
mact=mact+1;
if(mact===srorelength){
challenge_settingsdata[i].challenge_score = Math.round(Proportion)+intkk;
}else {
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
}
}
}else{
challenge_settingsdata[i].challenge_score = 0;
}
@ -1919,7 +1949,7 @@ class Trainingjobsetting extends Component {
<p className="ml95 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-9 font-10 ml30s" style={{"color":"#999999"}}>(选中的关卡将计入评分计算范围暂时不支持跳关选择)</span><span
className="color-grey-9 ml90" style={{"color":"#666666"}}>分值</span></p>
<div>
<div className="ml95 mt15">
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return (
<li>

@ -23,6 +23,7 @@ import {
notification
} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import moment from 'moment'
import axios from 'axios';
import '../css/members.css'
import "../common/formCommon.css"
@ -429,27 +430,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}

@ -10,6 +10,9 @@ function startechart(data){
var effChart = echarts.init(document.getElementById('shixun_skill_chart'));
var option = {
title: {
text: '工作效率',
},
grid:{
left: '3%',
right: '9%',
@ -42,7 +45,7 @@ function startechart(data){
xAxis: [
{
type : 'value',
name: '学生序号',
name: '学生排名',
scale:true,
axisLabel : {
formatter: ' ',
@ -57,11 +60,16 @@ function startechart(data){
],
yAxis: [
{
type : 'value',
name : '工作效率 = log(实训总得分/实训总耗时)',
type : "value",
name : " 实训总得分/实训总耗时",
nameGap: 20,
nameTextStyle: {
color: '#000',
fontSize:12
},
scale:true,
axisLabel : {
formatter: '{value} '
formatter: '{value}'
},
splitLine: {
show: false
@ -100,6 +108,7 @@ function startechart(data){
name: data.username,
xAxis:data.echart_data.myself_eff[0],
yAxis:data.echart_data.myself_eff[1],
value:data.echart_data.myself_eff[1],
}
],
itemStyle: {
@ -158,6 +167,9 @@ function startechart(data){
var option1 = {
title: {
text: '能力值',
},
backgroundColor: '#fff',
color: [
'#dd4444', '#fec42c', '#80F1BE'
@ -200,7 +212,7 @@ function startechart(data){
},
yAxis: {
type: 'value',
name: '能力值(实训获得经验值/实训评测次数)',
name: " 实训获得经验值/实训评测次数",
nameLocation: 'end',
nameGap: 20,
nameTextStyle: {
@ -230,7 +242,8 @@ function startechart(data){
{
name: data.username,
xAxis: data.echart_data.myself_object[0],
yAxis:data.echart_data.myself_object[1]
yAxis:data.echart_data.myself_object[1],
value:data.echart_data.myself_object[1]
}
],
itemStyle: {

@ -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>

File diff suppressed because it is too large Load Diff

@ -1,74 +1,75 @@
import React, { Component } from 'react';
export function loadSshScript(callback) {
let _url_origin = ``;
let prefix = 'react/build'
if (window.location.port == 3007) {
prefix = ''
} else {
_url_origin = `https://testeduplus2.educoder.net/`;
}
const $ = window.$;
// 未加载过
if (!window['Terminal']) {
// /js/js_min_all.
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}${prefix}/js/xterm/xterm.css`));
// $.getScript(
// `${_url_origin}${prefix}/js/xterm/xterm.js`,
// (data, textStatus, jqxhr) => {
// });
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/base64.js`,
// (data, textStatus, jqxhr) => {
// });
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/ws.js`,
// (data, textStatus, jqxhr) => {
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/main.js`,
// (data, textStatus, jqxhr) => {
// callback && callback()
// });
// });
$.when(
$.getScript( `${_url_origin}${prefix}/js/xterm/xterm.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/base64.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/ws.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/main.js` ),
$.Deferred(function( deferred ){
$( deferred.resolve );
})
).done(function(){
//place your code here, the scripts are all loaded
callback && callback()
});
} else {
callback && callback()
}
}
export function openTerminal(props, parentDomId) {
const { game_id, host, password, port, username, webssh_url, ws_url,
rows, cols, width, height} = props;
var options = {
host: host,
port: port,
username: username,
secret: password,
gameid: game_id,
rows: rows,
columns: cols,
width,
height,
parentDomId,
// tab: $("#terminalTab").val(),
}
window.g_websocket_url = ws_url;
// TODO 加一个parentDomId 来做多ssh tab
window.openTerminal(options)
}
import React, { Component } from 'react';
export function loadSshScript(callback) {
let _url_origin = ``;
let prefix = 'react/build'
if (window.location.port == 3007) {
prefix = ''
} else {
// _url_origin = `https://testeduplus2.educoder.net/`;
_url_origin = 'http://47.96.87.25:48080';
}
const $ = window.$;
// 未加载过
if (!window['Terminal']) {
// /js/js_min_all.
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}${prefix}/js/xterm/xterm.css`));
// $.getScript(
// `${_url_origin}${prefix}/js/xterm/xterm.js`,
// (data, textStatus, jqxhr) => {
// });
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/base64.js`,
// (data, textStatus, jqxhr) => {
// });
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/ws.js`,
// (data, textStatus, jqxhr) => {
// $.getScript(
// `${_url_origin}${prefix}/js/jsFromMiddleLayer/main.js`,
// (data, textStatus, jqxhr) => {
// callback && callback()
// });
// });
$.when(
$.getScript( `${_url_origin}${prefix}/js/xterm/xterm.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/base64.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/ws.js` ),
$.getScript( `${_url_origin}${prefix}/js/jsFromMiddleLayer/main.js` ),
$.Deferred(function( deferred ){
$( deferred.resolve );
})
).done(function(){
//place your code here, the scripts are all loaded
callback && callback()
});
} else {
callback && callback()
}
}
export function openTerminal(props, parentDomId) {
const { game_id, host, password, port, username, webssh_url, ws_url,
rows, cols, width, height} = props;
var options = {
host: host,
port: port,
username: username,
secret: password,
gameid: game_id,
rows: rows,
columns: cols,
width,
height,
parentDomId,
// tab: $("#terminalTab").val(),
}
window.g_websocket_url = ws_url;
// TODO 加一个parentDomId 来做多ssh tab
window.openTerminal(options)
}

@ -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;

@ -1,129 +1,129 @@
.paragraph:hover .status_li a{
display: block;
}
.newedu-filter-btn{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #F5F5F5;
color: #666;
margin-right: 10px;
margin-bottom: 9px;
}
.edu-filter-btn29BD8B{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #29BD8B;
color: #FFF;
margin-right: 10px;
margin-bottom: 9px;
}
.lesson-saved-list-item{
border-bottom: none!important;
margin-bottom: 10px;
background-color: #fff;
}
.click_add{
border-top: none!important;
}
.white-panel li{border:1px solid #fafafa!important;}
.white-panel li.active{border:1px solid #4CACFF!important;}
/* 选择实训列表 */
.greybackHead{height: 40px;line-height: 40px;padding: 0px 20px;box-sizing: border-box;color: #676767;background-color: #eaeaea;}
.mtf3{
margin-top:-3px;
}
.mtf5{
margin-top: -5px;
}
.color204{
color:rgba(204,204,204,1);
}
.lesson-saved-list-itemdrop{
height: 93px;
overflow: hidden;
}
.lesson-saved-list{
position: relative;
}
.itempositionleft{
position: absolute;
}
.itempositionright{
position: absolute;
}
.ant-input{
background-color: #fafafa!important;
}
.ant-input:focus{
background-color:#ffffff!important;
}
.pathNavLine{bottom: -11px;}
#shixun_operation:hover{
color:#fff !important;
}
.cursor{
cursor: pointer;
}
.paragraph_nameid:hover{
color:#4cacff !important;
}
/* 学习统计 */
.statisticsNav{height: 100px;}
.statisticsNav ul{margin-top: 35px;}
.statisticsNav ul li{float: left;font-size: 18px;color: #4D4D4D;height: 64px;line-height: 64px;margin:0px 30px;cursor: pointer;}
.statisticsNav ul li a{color: #4D4D4D!important;}
.statisticsNav ul li.active{color: #05101A;border-bottom: 2px solid #05101A;}
.statisticsNav ul li.active a{color: #05101A!important; text-decoration: none !important;}
.next-loading{
width:100%;
}
.paddingleft22{
text-align: left;
padding-left: 22px;
}
.paddingl5{
padding-left: 5px;
}
.paddingl10{
padding-left: 10px;
}
.red{
color:red;
}
.pl38{
padding-left: 38px;
}
.ml37{
margin-left: 37px;
.paragraph:hover .status_li a{
display: block;
}
.newedu-filter-btn{
display: block;
float: left;
padding: 0 9px;
/*height: 28px;*/
line-height: 28px;
border-radius: 14px;
background-color: #F5F5F5;
color: #666;
margin-right: 10px;
margin-bottom: 9px;
}
.edu-filter-btn29BD8B{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #29BD8B;
color: #FFF;
margin-right: 10px;
margin-bottom: 9px;
}
.lesson-saved-list-item{
border-bottom: none!important;
margin-bottom: 10px;
background-color: #fff;
}
.click_add{
border-top: none!important;
}
.white-panel li{border:1px solid #fafafa!important;}
.white-panel li.active{border:1px solid #4CACFF!important;}
/* 选择实训列表 */
.greybackHead{height: 40px;line-height: 40px;padding: 0px 20px;box-sizing: border-box;color: #676767;background-color: #eaeaea;}
.mtf3{
margin-top:-3px;
}
.mtf5{
margin-top: -5px;
}
.color204{
color:rgba(204,204,204,1);
}
.lesson-saved-list-itemdrop{
height: 93px;
overflow: hidden;
}
.lesson-saved-list{
position: relative;
}
.itempositionleft{
position: absolute;
}
.itempositionright{
position: absolute;
}
.ant-input{
background-color: #fafafa!important;
}
.ant-input:focus{
background-color:#ffffff!important;
}
.pathNavLine{bottom: -11px;}
#shixun_operation:hover{
color:#fff !important;
}
.cursor{
cursor: pointer;
}
.paragraph_nameid:hover{
color:#4cacff !important;
}
/* 学习统计 */
.statisticsNav{height: 100px;}
.statisticsNav ul{margin-top: 35px;}
.statisticsNav ul li{float: left;font-size: 18px;color: #4D4D4D;height: 64px;line-height: 64px;margin:0px 30px;cursor: pointer;}
.statisticsNav ul li a{color: #4D4D4D!important;}
.statisticsNav ul li.active{color: #05101A;border-bottom: 2px solid #05101A;}
.statisticsNav ul li.active a{color: #05101A!important; text-decoration: none !important;}
.next-loading{
width:100%;
}
.paddingleft22{
text-align: left;
padding-left: 22px;
}
.paddingl5{
padding-left: 5px;
}
.paddingl10{
padding-left: 10px;
}
.red{
color:red;
}
.pl38{
padding-left: 38px;
}
.ml37{
margin-left: 37px;
}

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

@ -10,7 +10,9 @@ import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd';
import 'antd/lib/pagination/style/index.css';
import axios from 'axios';
import axios from 'axios'
import Modals from '../modals/Modals';
// import { Rating,Progress } from '@icedesign/base';
@ -264,16 +266,29 @@ class TPMBanner extends Component {
/*
* 撤销发布按钮
* */
cancel_publish=()=>{
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/cancel_publish.json";
axios.get(url).then((response) => {
this.props.showSnackbar(response.data.message);
window.location.reload()
}).catch((error) => {
console.log(error)
});
ModalCancel=()=>{
this.setState({
Modalstype:false
})
}
ModalSave=()=>{
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/cancel_publish.json";
axios.get(url).then((response) => {
this.props.showSnackbar(response.data.message);
window.location.reload()
}).catch((error) => {
console.log(error)
});
}
cancel_publish=()=>{
this.setState({
Modalstype:true,
Modalstopval:"是否确认撤销发布?",
ModalCancel:this.ModalCancel,
ModalSave:this.ModalSave,
})
}
@ -523,6 +538,15 @@ class TPMBanner extends Component {
<div>
<div className="shixunDetail_top">
{this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype}
modalsTopval={this.state.Modalstopval}
modalCancel={this.state.ModalCancel}
modalSave={this.state.ModalSave}
modalsBottomval={this.state.ModalsBottomval}
loadtype={this.state.Loadtype}
/>:""}
<div className="educontent clearfix">
<p className="clearfix">
<a href={"/shixuns/" + shixunsDetails.identifier + "/challenges"}

@ -18,7 +18,7 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
// let _url_origin = getUrl()
let _url_origin=`https://testeduplus2.educoder.net`;
let _url_origin=``;
// let _url_origin=`https://www.educoder.net`;
if (!window['indexHOCLoaded']) {
@ -28,16 +28,13 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?1525440977`));
.attr('href', `/stylesheets/css/edu-common.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`));
.attr('href', `/stylesheets/educoder/edu-main.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
.attr('href', `/stylesheets/educoder/edu-all.css?1525440977`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`));
@ -183,7 +180,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 +281,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,78 +1,78 @@
/*bæ°æ ‡ç­¾*/
.newedu-filter-btn{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #F5F5F5;
color: #666;
margin-right: 10px;
margin-bottom: 9px;
}
.newedbox{
/*flex-wrap: wrap;*/
/*display: -webkit-flex; !* Safari *!*/
/*display: flex;*/
width: 340px;
position:relative;
overflow: hidden;
}
.newsubscript{
position: absolute;
right: 23px;
bottom: 38px;
cursor: pointer;
}
.newsubscript:hover{
color:deepskyblue;
}
.edu-filter-btn29BD8B{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #29BD8B;
color: #FFF;
margin-right: 10px;
margin-bottom: 9px;
}
.relative{
position:relative;
}
.newedboxheight{
max-height:181px;
}
.newminheight{
/*max-height: 670px;*/
max-height: 300px;
overflow: auto;
}
.delSubentry{
font-size:7px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(76,172,255,1);
line-height:9px;
cursor: pointer;
}
.operationalter .delSubentry{
font-size:15px !important;
line-height: 25px;
}
/*临时的tpi关闭按é®æ ·å¼*/
.headerRight a {
color: #1a3f5f;
}
/*实训做成弹窗a标签样式调整*/
.-task-list-title a:link, .-task-list-title a:visited {color: #bcc6cd;}
.-task-list-title a:hover{
color: #459be5;
}
.headerLeft .-header-right{
height: 32px;
/*bæ°æ ‡ç­¾*/
.newedu-filter-btn{
display: block;
float: left;
padding: 0 9px;
/*height: 28px;*/
line-height: 28px;
border-radius: 14px;
background-color: #F5F5F5;
color: #666;
margin-right: 10px;
margin-bottom: 9px;
}
.newedbox{
/*flex-wrap: wrap;*/
/*display: -webkit-flex; !* Safari *!*/
/*display: flex;*/
width: 340px;
position:relative;
overflow: hidden;
}
.newsubscript{
position: absolute;
right: 23px;
bottom: 38px;
cursor: pointer;
}
.newsubscript:hover{
color:deepskyblue;
}
.edu-filter-btn29BD8B{
display: block;
float: left;
padding: 0 9px;
height: 28px;
line-height: 28px;
border-radius: 14px;
background-color: #29BD8B;
color: #FFF;
margin-right: 10px;
margin-bottom: 9px;
}
.relative{
position:relative;
}
.newedboxheight{
max-height:181px;
}
.newminheight{
/*max-height: 670px;*/
max-height: 300px;
overflow: auto;
}
.delSubentry{
font-size:7px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(76,172,255,1);
line-height:9px;
cursor: pointer;
}
.operationalter .delSubentry{
font-size:15px !important;
line-height: 25px;
}
/*临时的tpi关闭按é®æ ·å¼*/
.headerRight a {
color: #1a3f5f;
}
/*实训做成弹窗a标签样式调整*/
.-task-list-title a:link, .-task-list-title a:visited {color: #bcc6cd;}
.-task-list-title a:hover{
color: #459be5;
}
.headerLeft .-header-right{
height: 32px;
}

File diff suppressed because it is too large Load Diff

@ -336,12 +336,12 @@ class Challenges extends Component {
{this.props.identity<4?
item.st === 1 ?
<a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")}
className="font-16 color05101a">{item.name+1}</a>
className="font-16 color05101a">{item.name}</a>
:
<a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
className="font-16 color05101a">{item.name+2}</a>:<span
className="font-16 color05101a">{item.name}</a>:<span
// onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
className="font-16 color05101a">{item.name+2}</span>
className="font-16 color05101a">{item.name}</span>
}
<Modal

@ -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;

@ -101,7 +101,7 @@ a.decoration{text-decoration: underline}
/*通用内外边距*/
.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;}
.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;}
.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;}
.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml29{margin-left: 29px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;}
.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;}
.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;}

Loading…
Cancel
Save