hjm 5 years ago
commit 8e5bab17d0

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

@ -30,8 +30,8 @@ export function initAxiosInterceptors(props) {
var proxy = "http://localhost:3000" var proxy = "http://localhost:3000"
// proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net" // proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080" proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -41,13 +41,20 @@ class CheckAllGroup extends Component{
const { checkAll, checkedValues } = this.state; const { checkAll, checkedValues } = this.state;
return ( return (
<li className="clearfix"> <li className="clearfix">
<style>{`
.groupList .ant-checkbox-group-item{
margin-bottom:5px;
}
`}</style>
<span className="fl mr10 color-grey-8">{label}</span> <span className="fl mr10 color-grey-8">{label}</span>
<span className="fl mr25"> <span className="fl mr25">
<a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a> <a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a>
</span> </span>
<div className="fl groupList" style={{maxWidth:"990px"}}>
{ {
options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/> options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/>
} }
</div>
</li> </li>
) )
} }

@ -101,7 +101,7 @@ class GraduationTaskssettinglist extends Component{
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,
submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "", submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "",
turnovertime:worklists[i].update_time, turnovertime:worklists[i].update_time,
associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id}, associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info===undefined?"":worklists[i].project_info.id},
teacherrating: worklists[i].teacher_comment_score, teacherrating: worklists[i].teacher_comment_score,
crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num}, crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num},
finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score, finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
@ -754,6 +754,7 @@ class GraduationTaskssettinglist extends Component{
}, { }, {
title: '操作', title: '操作',
key: 'operation', key: 'operation',
width:'100px',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center', className:'edu-txt-center',
render: operation => ( render: operation => (

@ -209,12 +209,14 @@ class GraduationTasks extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
// {"status":1,"message":"删除成功"} // {"status":1,"message":"删除成功"}
this.fetchAll(search,page,order) this.fetchAll(search,page,order)
this.props.showNotification(response.data.message);
this.cancelmodel()
this.setState({ this.setState({
Modalstype:true, Modalstype:false,
Modalstopval:response.data.message, Modalstopval:response.data.message,
ModalsBottomval:"", ModalsBottomval:"",
ModalSave:this.cancelmodel, ModalSave:this.cancelmodel,
Loadtype:true, Loadtype:false,
checkBoxValues:[], checkBoxValues:[],
checkAllValue:false checkAllValue:false
}) })

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd"; import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd";
import { handleDateString } from 'educoder'; import { handleDateString,ConditionToolTip } from 'educoder';
import PollDetailTabForthRules from './PollDetailTabForthRules' import PollDetailTabForthRules from './PollDetailTabForthRules'
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
@ -586,6 +586,8 @@ class PollDetailTabForth extends Component{
<div className="clearfix mb5"> <div className="clearfix mb5">
<span className="font-16 mr15 fl mt6">发布时间</span> <span className="font-16 mr15 fl mt6">发布时间</span>
<div className="fl"> <div className="fl">
<Tooltip placement="bottom" title={un_change_unified ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -600,6 +602,8 @@ class PollDetailTabForth extends Component{
value={publish_time && moment(publish_time,dataformat)} value={publish_time && moment(publish_time,dataformat)}
disabled={un_change_unified == true ? true : !flagPageEdit } disabled={un_change_unified == true ? true : !flagPageEdit }
></DatePicker> ></DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:"" unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:""
@ -611,6 +615,8 @@ class PollDetailTabForth extends Component{
<div className="clearfix"> <div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span> <span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl"> <div className="fl">
<Tooltip placement="bottom" title={un_change_end ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -627,6 +633,8 @@ class PollDetailTabForth extends Component{
disabled={un_change_end == true ? true : !flagPageEdit } disabled={un_change_end == true ? true : !flagPageEdit }
> >
</DatePicker> </DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:"" unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -390,6 +390,8 @@ class PollDetailTabForthRules extends Component{
</div> </div>
</div> </div>
<div className="fl pr20 with25"> <div className="fl pr20 with25">
<Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -404,6 +406,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit} disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px",width:'100%'}} style={{"height":"42px",width:'100%'}}
></DatePicker> ></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}> <p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{ {
rule.publish_flag && rule.publish_flag!=""?<span className="fl color-red mt10">{rule.publish_flag}</span>:"" rule.publish_flag && rule.publish_flag!=""?<span className="fl color-red mt10">{rule.publish_flag}</span>:""
@ -411,6 +415,8 @@ class PollDetailTabForthRules extends Component{
</p> </p>
</div> </div>
<div className="fl mr20"> <div className="fl mr20">
<Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -425,6 +431,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit} disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}} style={{"height":"42px"}}
></DatePicker> ></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}> <p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{ {
rule.end_flag && rule.end_flag!=""?<span className="fl color-red mt10">{rule.end_flag}</span>:"" rule.end_flag && rule.end_flag!=""?<span className="fl color-red mt10">{rule.end_flag}</span>:""

@ -70,9 +70,9 @@ class PollDetailTabThird extends Component{
<div className="previewList"> <div className="previewList">
<p className="pl30 pr30 pt30 pb15 font-16 clearfix"> <p className="pl30 pr30 pt30 pb15 font-16 clearfix">
<span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:"" } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:<span className="mustAnswer fl ml10 mr10"></span> }
{ item.question.question_type == 2 ? { item.question.question_type == 2 ?
<span className="color-grey-9"> <span className="color-grey-9 font-14 fl mt2">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项" "可选"+item.question.min_choices+"-"+item.question.max_choices+"项"

@ -185,10 +185,12 @@ class PollInfo extends Component{
flag=answers.indexOf(a_id) > -1?true:false; flag=answers.indexOf(a_id) > -1?true:false;
answers= type == 1 ? answers[0] : answers; answers= type == 1 ? answers[0] : answers;
}else{ }else{
flag=answers==a_id?true:false; flag = answers==a_id?true:false;
} }
if(answers && (answers.length>0 || answers !="")){
this.postAnswer(q_id,answers,flag ? inputs.text : "",key); this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
} }
}
//提交主观题 //提交主观题
commitText=(key,q_id)=>{ commitText=(key,q_id)=>{
@ -379,13 +381,21 @@ class PollInfo extends Component{
<div className="previewList" id={'Anchor_'+`${key}`}> <div className="previewList" id={'Anchor_'+`${key}`}>
<div className="pl30 pr30 mt30 mb10 clearfix"> <div className="pl30 pr30 mt30 mb10 clearfix">
<span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mt5">必答</span>:"" } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> }
{ item.question.question_type == 2 ?
<span className="color-grey-9 font-14 fl mt2">
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项"
}
</span>:""
}
</div> </div>
<li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li> <li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li>
{ {
//单选 //单选
item.question.question_type==1 && item.question.question_type==1 &&
<Radio.Group disabled={isAdmin?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}> <Radio.Group disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
@ -422,7 +432,12 @@ class PollInfo extends Component{
{ {
//多选 //多选
item.question.question_type==2 && item.question.question_type==2 &&
<Checkbox.Group onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)} disabled={isAdmin?true:false} defaultValue={item.question.poll_answer_ids} className="answerList" name={key}> <Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids}
className="answerList"
name={key}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
@ -466,14 +481,13 @@ class PollInfo extends Component{
<React.Fragment> <React.Fragment>
{ {
j.id == item.question.id ? j.id == item.question.id ?
<textarea placeholder="在此填入答案" disabled={isAdmin?true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea> <textarea placeholder="在此填入答案" disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1) ? true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea>
: "" : ""
} }
</React.Fragment> </React.Fragment>
) )
}) })
} }
</div> </div>
} }

@ -45,6 +45,10 @@ class PollListItem extends Component{
item.lock_status === 0 ? <Tooltip title="私有属性,非课堂成员不能访问"><i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i></Tooltip>:"" item.lock_status === 0 ? <Tooltip title="私有属性,非课堂成员不能访问"><i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i></Tooltip>:""
} }
<CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType> <CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType>
{
isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ?
<span className="edu-filter-btn edu-filter-btn-84B6EB ml15 fl typestyle">未提交</span>:""
}
</p> </p>
<p className="color-grey-9 clearfix"> <p className="color-grey-9 clearfix">
{ {

@ -80,6 +80,8 @@ class TraineetraininginformationModal extends Component {
} }
render() { render() {
var columns; var columns;
console.log(83);
console.log(this.props.boolgalist);
if(this.props.boolgalist&&this.props.boolgalist === true) { if(this.props.boolgalist&&this.props.boolgalist === true) {
columns = [ columns = [
{ {

@ -625,7 +625,7 @@ submittojoinclass=(value)=>{
{/* />*/} {/* />*/}
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
<Trialapplication {...this.state} ></Trialapplication> <Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()} ></Trialapplication>
<div className="educontent clearfix"> <div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/"> <a href="/">

@ -731,7 +731,7 @@ class TPMBanner extends Component {
{/*>{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}</a>:""*/} {/*>{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}</a>:""*/}
{/*}*/} {/*}*/}
{shixunsDetails.shixun_status === 0 && this.props.identity < 4 ? {shixunsDetails.shixun_status === 0 && this.props.identity < 5 ?
<a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39" <a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
id="challenge_begin">申请发布</a> : "" id="challenge_begin">申请发布</a> : ""
} }
@ -796,7 +796,7 @@ class TPMBanner extends Component {
</Modal> </Modal>
{shixunsDetails.shixun_status === 1 && this.props.identity < 4 ? {shixunsDetails.shixun_status === 1 && this.props.identity < 5 ?
<a onClick={this.cancel_publish} className="fr user_default_btn user_blue_btn mr20 font-18 height39" <a onClick={this.cancel_publish} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
id="challenge_begin">撤销发布</a> : "" id="challenge_begin">撤销发布</a> : ""
} }
@ -877,14 +877,14 @@ class TPMBanner extends Component {
<div className="fr user_default_btn user_blue_btn mr20" <div className="fr user_default_btn user_blue_btn mr20"
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}> style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}>
<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}> {this.props.identity < 8?<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}>
<span className="flex1 edu-txt-center fl font-18" <span className="flex1 edu-txt-center fl font-18"
onClick={this.copyForkvisible} onClick={this.copyForkvisible}
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "inline-block"}} style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "inline-block"}}
> >
Fork Fork
</span> </span>
</Tooltip> </Tooltip>:""}
<Modal <Modal
keyboard={false} keyboard={false}

@ -598,7 +598,7 @@ export default class TPMsettings extends Component {
evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
opening_time, pod_exist_time,shixunmemoMDvalue opening_time, pod_exist_time,shixunmemoMDvalue
} = this.state; } = this.state;
let operateauthority=this.props.identity<4&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1; let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
const description_editormd = this.description_editormd.getValue(); const description_editormd = this.description_editormd.getValue();
@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component {
} }
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.state.status==0?true:false; let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
return ( return (
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}> <div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}>
@ -1099,7 +1099,7 @@ export default class TPMsettings extends Component {
</a>:"" </a>:""
} }
{ {
this.props.identity < 4 && this.state.status==0? this.props.identity < 5 && this.state.status==0?
<a className="edu-default-btn edu-blueline-btn ml20 fr" <a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}> onClick={()=>this.operateshixuns(1)}>
删除实训 删除实训
@ -1332,7 +1332,7 @@ export default class TPMsettings extends Component {
</Modal> </Modal>
{ {
this.props.identity<4||this.props.power==true? this.props.identity<5||this.props.power==true?
<a onClick={this.showModal} id="define_template" <a onClick={this.showModal} id="define_template"
className="color-orange-tip ml20 mt5 fl">使用自定义脚本</a> : "" className="color-orange-tip ml20 mt5 fl">使用自定义脚本</a> : ""
} }

@ -44,7 +44,8 @@
position:relative; position:relative;
} }
.newedboxheight{ .newedboxheight{
max-height:181px; max-height:204px;
overflow-y: auto;
} }
.newminheight{ .newminheight{
/*max-height: 670px;*/ /*max-height: 670px;*/

@ -181,6 +181,7 @@ class Newshixuns extends Component {
systemenvironment:undefined, systemenvironment:undefined,
testcoderunmode:undefined, testcoderunmode:undefined,
file:undefined, file:undefined,
deleteisnot:true,
} }
} }
@ -547,7 +548,7 @@ class Newshixuns extends Component {
// if (id) { // if (id) {
if(this.state.file !== undefined){ if(this.state.file !== undefined){
console.log("549"); console.log("549");
this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
languagewrite:"", languagewrite:"",
@ -579,7 +580,7 @@ class Newshixuns extends Component {
}) })
if(this.state.file !== undefined){ if(this.state.file !== undefined){
console.log("580"); console.log("580");
this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
languagewrite:"", languagewrite:"",
@ -655,7 +656,8 @@ class Newshixuns extends Component {
handleChange = (info) => { handleChange = (info) => {
console.log("handleChange1"); console.log("handleChange1");
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList }); this.setState({ fileList:fileList,
deleteisnot:false});
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
confirm({ confirm({
@ -686,11 +688,13 @@ class Newshixuns extends Component {
// console.log('--- success') // console.log('--- success')
this.setState((state) => { this.setState((state) => {
const index = state.fileList.indexOf(file); const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice(); const newFileList = state.fileList.slice();
newFileList.splice(index, 1); newFileList.splice(index, 1);
return { return {
fileList: newFileList, fileList: newFileList,
deleteisnot:true
}; };
}); });
} }
@ -736,7 +740,7 @@ class Newshixuns extends Component {
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const thiss=this; const thiss=this;
let {testcoderunmode ,systemenvironment,languagewrite, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state; let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state;
let options let options
if (departmentslist != undefined) { if (departmentslist != undefined) {
options = this.state.departmentslist.map((d, k) => { options = this.state.departmentslist.map((d, k) => {
@ -764,7 +768,7 @@ class Newshixuns extends Component {
} }
if(thiss.state.file !== undefined){ if(thiss.state.file !== undefined){
console.log("763") console.log("763")
thiss.deleteAttachment(thiss.state.file); // thiss.deleteAttachment(thiss.state.file);
thiss.setState({ thiss.setState({
file:file file:file
}) })
@ -797,6 +801,7 @@ class Newshixuns extends Component {
// return isLt50M; // return isLt50M;
// }, // },
// }; // };
return ( return (
<div className="newMain clearfix" onClick={this.bigopens}> <div className="newMain clearfix" onClick={this.bigopens}>
@ -934,12 +939,23 @@ class Newshixuns extends Component {
{/* rules:[{*/} {/* rules:[{*/}
{/* }]*/} {/* }]*/}
{/* })(*/} {/* })(*/}
{
deleteisnot=== true?
<Upload {...uploadProps} > <Upload {...uploadProps} >
<Icon type="upload" className="fl mt5" > </Icon> <Icon type="upload" className="fl mt5" > </Icon>
<span className="color-blue fl">上传附件</span> <span className="color-blue fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span> <span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload> </Upload>
:
<Upload disabled={true} >
<Icon type="upload" className="fl mt5" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
{/* )*/} {/* )*/}
{/* }*/} {/* }*/}
{/*</Form.Item>*/} {/*</Form.Item>*/}

@ -239,7 +239,7 @@ class Challenges extends Component {
<p className="clearfix mb30"> <p className="clearfix mb30">
<span className="font-16 fl">简介</span> <span className="font-16 fl">简介</span>
<a style={{ display: this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} <a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr" href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr"
data-tip-down="编辑"> data-tip-down="编辑">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /> <img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
@ -262,7 +262,7 @@ class Challenges extends Component {
<p className="clearfix mb10"> <p className="clearfix mb10">
<span className="font-16 fl">全部任务</span> <span className="font-16 fl">全部任务</span>
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"} <Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr" className="white-btn edu-greenline-btn fr"
// data-tip-down="新增代码编辑类型任务" // data-tip-down="新增代码编辑类型任务"
@ -275,7 +275,7 @@ class Challenges extends Component {
</Link> : "" </Link> : ""
} }
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"} <Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20" className="white-btn edu-greenline-btn fr mr20"
// data-tip-down="新增选择题类型任务" // data-tip-down="新增选择题类型任务"
@ -333,7 +333,7 @@ class Challenges extends Component {
</span> </span>
<span className="mr15 font-16 fl">{key+1}</span> <span className="mr15 font-16 fl">{key+1}</span>
{this.props.identity<4? {this.props.identity<5?
item.st === 1 ? item.st === 1 ?
<a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")} <a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")}
className="font-16 color05101a">{item.name}</a> className="font-16 color05101a">{item.name}</a>
@ -359,7 +359,7 @@ class Challenges extends Component {
{item.delete_url != undefined && {item.delete_url != undefined &&
<Tooltip placement="bottom" title={"删除"}> <Tooltip placement="bottom" title={"删除"}>
<a onClick={() => this.delOperations(item.challenge_id)} <a onClick={() => this.delOperations(item.challenge_id)}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/close.svg")} <img src={getImageUrl("images/educoder/icon/close.svg")}
className="fl mt5 ml5" /> className="fl mt5 ml5" />
@ -371,7 +371,7 @@ class Challenges extends Component {
{item.up_url != undefined && {item.up_url != undefined &&
<Tooltip placement="bottom" title={"向上移动"}> <Tooltip placement="bottom" title={"向上移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")} <a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} <img src={getImageUrl("images/educoder/icon/moveup.svg")}
className="fl mt2 ml4" /> className="fl mt2 ml4" />
@ -381,7 +381,7 @@ class Challenges extends Component {
{item.down_url != undefined && {item.down_url != undefined &&
<Tooltip placement="bottom" title={"向下移动"}> <Tooltip placement="bottom" title={"向下移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")} <a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")}
style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }} style={{ display: this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" /> <img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />
</a> </a>
@ -393,7 +393,7 @@ class Challenges extends Component {
item.st === 1 ? item.st === 1 ?
<Tooltip placement="bottom" title={"编辑"}> <Tooltip placement="bottom" title={"编辑"}>
<a <a
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"} href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
className="fl ring-green"> className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")} <img src={getImageUrl("images/educoder/icon/edit.svg")}
@ -403,7 +403,7 @@ class Challenges extends Component {
: :
<Tooltip placement="bottom" title={"编辑"}> <Tooltip placement="bottom" title={"编辑"}>
<a <a
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"} href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
className="fl ring-green"> className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")} <img src={getImageUrl("images/educoder/icon/edit.svg")}
@ -451,9 +451,9 @@ class Challenges extends Component {
</Tooltip> </Tooltip>
: item.status === 1 && newstatus === 1 ? : item.status === 1 && newstatus === 1 ?
<Tooltip placement="bottom" title={this.props.identity<4?"直接挑战":"请先完成前序关卡"}> <Tooltip placement="bottom" title={this.props.identity<5?"直接挑战":"请先完成前序关卡"}>
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"} <a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""} onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
style={{marginTop: '-2px'}}>直接挑战</a> style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip> : "" : "" </Tooltip> : "" : ""
@ -462,9 +462,9 @@ class Challenges extends Component {
{ {
item.status === 0 ? item.status === 0 ?
<Tooltip placement="bottom" title={this.props.identity<4&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}> <Tooltip placement="bottom" title={this.props.identity<5&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}>
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"} <a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""} onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
style={{marginTop: '-2px'}}>直接挑战</a> style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip>: "" </Tooltip>: ""
} }

@ -354,7 +354,7 @@ class Collaborators extends Component {
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mt30" <p className="clearfix mt30"
style={{display:this.props.identity<4?"block":"none"}} style={{display:this.props.identity<5?"block":"none"}}
> >
<a onClick={() => this.showCollaboratorsvisible("cooperation")} <a onClick={() => this.showCollaboratorsvisible("cooperation")}
className="edu-default-btn edu-greenback-btn fr mr20 height40" className="edu-default-btn edu-greenback-btn fr mr20 height40"

@ -75,7 +75,7 @@ class Propaedeutics extends Component {
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<4&&this.props.status<3?"block":'none'}} > <p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} >
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics" <a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics"
data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a> data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
</p> </p>

@ -106,7 +106,14 @@ class Repository extends Component {
} }
a.guideBtn:hover { a.guideBtn:hover {
text-decoration: underline; text-decoration: underline;
}`} }
#repository_url_tip {
top: 30px !important;
left:132px !important;
width: 292px !important;
}
`}
</style> </style>
{/* <a href="https://www.educoder.net/forums/2784" target="_blank" {/* <a href="https://www.educoder.net/forums/2784" target="_blank"
className="fr edu-default-btn edu-greenback-btn">Git使用指南</a> */} className="fr edu-default-btn edu-greenback-btn">Git使用指南</a> */}
@ -118,7 +125,6 @@ class Repository extends Component {
: $('#repository_url_tip').hide() }} : $('#repository_url_tip').hide() }}
className="fl ml6 mt1"> className="fl ml6 mt1">
<img src={getImageUrl("images/educoder/problem.png")}/> <img src={getImageUrl("images/educoder/problem.png")}/>
</a>
<div className="invite-tip clearfix none" id="repository_url_tip" <div className="invite-tip clearfix none" id="repository_url_tip"
style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}> style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}>
<span className="top-black-trangle" style={{"right":"9px"}}></span> <span className="top-black-trangle" style={{"right":"9px"}}></span>
@ -138,6 +144,8 @@ class Repository extends Component {
<p className="inviteTipbtn with100"><a <p className="inviteTipbtn with100"><a
onClick={() => { $('#repository_url_tip').hide(); }}>知道了</a></p> onClick={() => { $('#repository_url_tip').hide(); }}>知道了</a></p>
</div> </div>
</a>
</div> </div>
</div> </div>

Loading…
Cancel
Save