caishi 5 years ago
commit e180f1b58d

@ -9,7 +9,6 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter'); const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); // const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const getClientEnvironment = require('./env'); const getClientEnvironment = require('./env');
const paths = require('./paths'); const paths = require('./paths');
@ -250,46 +249,6 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js: // You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new ParallelUglifyPlugin({
// 传递给 UglifyJS的参数如下
uglifyJS: {
output: {
/*
是否输出可读性较强的代码即会保留空格和制表符默认为输出为了达到更好的压缩效果
可以设置为false
*/
beautify: false,
/*
是否保留代码中的注释默认为保留为了达到更好的压缩效果可以设置为false
*/
comments: false
},
compress: {
/*
是否在UglifyJS删除没有用到的代码时输出警告信息默认为输出可以设置为false关闭这些作用
不大的警告
*/
warnings: false,
/*
是否删除代码中所有的console语句默认为不删除开启后会删除所有的console语句
*/
drop_console: false,
/*
是否内嵌虽然已经定义了但是只用到一次的变量比如将 var x = 1; y = x, 转换成 y = 5, 默认为不
转换为了达到更好的压缩效果可以设置为false
*/
collapse_vars: false,
/*
是否提取出现了多次但是没有定义成变量去引用的静态值比如将 x = 'xxx'; y = 'xxx' 转换成
var a = 'xxxx'; x = a; y = a; 默认为不转换为了达到更好的压缩效果可以设置为false
*/
reduce_vars: false
}
}
}),
], ],
// Some libraries import Node modules but don't use them in the browser. // Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works. // Tell Webpack to provide empty mocks for them so importing them works.

@ -122,21 +122,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

@ -93,7 +93,7 @@
"wrap-md-editor": "^0.2.20" "wrap-md-editor": "^0.2.20"
}, },
"scripts": { "scripts": {
"start": "node --max_old_space_size=8072 scripts/start.js", "start": "node --max_old_space_size=15360 scripts/start.js",
"build": "node --max_old_space_size=15360 scripts/build.js", "build": "node --max_old_space_size=15360 scripts/build.js",
"concat": "node scripts/concat.js", "concat": "node scripts/concat.js",
"gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json", "gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json",

@ -37,7 +37,8 @@ class Fileslists extends Component{
course_modules:undefined, course_modules:undefined,
has_course_groups:false, has_course_groups:false,
course_is_public:undefined, course_is_public:undefined,
isSpin:false isSpin:false,
course_second_categories:[]
} }
} }
componentDidMount=()=>{ componentDidMount=()=>{
@ -115,12 +116,22 @@ class Fileslists extends Component{
axios.get(url, { axios.get(url, {
}).then((response) => { }).then((response) => {
if(response!=undefined){ if(response!=undefined){
if(response.data&&response.data){ if(response.data&&response.data){
let list=response.data.course_modules;
let course_second_categoriess;
list.map((item,key)=>{
course_second_categoriess=item.course_second_categories
})
this.setState({ this.setState({
course_modules:response.data, course_modules:response.data,
has_course_groups:response.data.has_course_groups has_course_groups:response.data.has_course_groups,
course_second_categories:course_second_categoriess
}) })
} }
} }
}) })
@ -647,7 +658,8 @@ class Fileslists extends Component{
discussMessageid, discussMessageid,
course_modules, course_modules,
shixunmodal, shixunmodal,
course_is_public course_is_public,
filesId
} = this.state; } = this.state;
let category_id= this.props.match.params.category_id; let category_id= this.props.match.params.category_id;
@ -799,29 +811,35 @@ class Fileslists extends Component{
.drop_down_menu li { .drop_down_menu li {
overflow: visible; overflow: visible;
} }
.courseSecond{
margin-left: 10px;
padding: 10px;
}
`} `}
</style> </style>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset"}}> <ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'150px'}}>
<p className="drop_down_search"> {this.state.course_second_categories.length>10? <p className="drop_down_search">
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/> <Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
</p> </p>:""}
{/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/} {course_modules&&course_modules.course_modules.map((item,key)=>{
{/*return(*/} return(
{/*<li key={key} id={item.id} onClick={() => this.moveTos(0)}>{item.module_name}</li>*/} filesId&&filesId===item.id?"":<li key={key} id={item.id} onClick={() => this.moveTos(0)}>{item.module_name}</li>
{/*)*/} )
{/*})}*/} })}
{ course_modules&&course_modules.course_modules.map( (item,key) => { { course_modules&&course_modules.course_modules.map( (item,key) => {
return item.course_second_categories.filter((item)=> { return item.course_second_categories.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1) return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{ }).map((itm,k)=>{
return( return(
<li key={k} id={itm.id} onClick={() => this.moveTos(itm.id )}>{itm.name}</li> filesId&&filesId===itm.id?"":<li key={k} id={itm.id} onClick={() => this.moveTos(itm.id )}>{itm.name}</li>
) )
}) })
})} })}
{this.state.course_second_categories.length===0?
<div className={"courseSecond"}>暂无数据</div>:""}
{/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/} {/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}
@ -832,9 +850,9 @@ class Fileslists extends Component{
{/*})*/} {/*})*/}
{/*)*/} {/*)*/}
{/*})}*/} {/*})}*/}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)? {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p className="drop_down_btn"> <p className="drop_down_btn">
<a className="color-grey-6" onClick={()=>this.addDir()}>添加目录...</a> <a className="color-grey-6" onClick={()=>this.addDir()}>添加目录</a>
</p> </p>
:"":""} :"":""}
</ul> </ul>

@ -178,6 +178,7 @@ class CommonWorkItem extends Component{
item.status_time!="" && item.status_time!="" &&
<Tooltip title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' : <Tooltip title={ item.status.indexOf('提交中') != -1 ? '提交剩余时间' :
item.status.indexOf('补交中') != -1 ? '补交剩余时间' : item.status.indexOf('补交中') != -1 ? '补交剩余时间' :
item.status.indexOf('申诉中') != -1 ? '申诉剩余时间' :
item.status.indexOf('匿评中') != -1 ? '匿评剩余时间' : item.status.indexOf('匿评中') != -1 ? '匿评剩余时间' :
item.status.indexOf('匿评申诉中') != -1 ? '匿评申诉剩余时间' : ''}> item.status.indexOf('匿评申诉中') != -1 ? '匿评申诉剩余时间' : ''}>
<span className="mr20 fl">{item.status_time}</span> <span className="mr20 fl">{item.status_time}</span>

@ -664,7 +664,7 @@ render(){
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
required: true, message: '请输入帖子内容', required: true, message: '请输入作品内容',
}, { }, {
max: 5000, message: '最大限制为5000个字符', max: 5000, message: '最大限制为5000个字符',
}], }],

@ -49,6 +49,8 @@ class CommonWorkSetting extends Component{
super(props) super(props)
this.publishModal = React.createRef(); this.publishModal = React.createRef();
this.endModal = React.createRef(); this.endModal = React.createRef();
this.fetchMoment = moment()
this.state={ this.state={
unified_setting: true, unified_setting: true,
rules: [], rules: [],
@ -123,6 +125,7 @@ class CommonWorkSetting extends Component{
} else if (result.data.publish_time && moment(result.data.publish_time) < moment()) { } else if (result.data.publish_time && moment(result.data.publish_time) < moment()) {
disable_unified_setting = true disable_unified_setting = true
} }
this.fetchMoment = moment()
this.setState({ this.setState({
// starttimetype:starttype, // starttimetype:starttype,
// endtimetype:endtype, // endtimetype:endtype,
@ -231,7 +234,7 @@ class CommonWorkSetting extends Component{
end_time: endTime.format(dateFormat) end_time: endTime.format(dateFormat)
}) })
} }
if (!this.state.late_time && endTime) { if (this.state.allow_late && !this.state.late_time && endTime) {
this.setState({ this.setState({
late_time: endTime.add(1, 'months').format(dateFormat) late_time: endTime.add(1, 'months').format(dateFormat)
}) })
@ -265,9 +268,12 @@ class CommonWorkSetting extends Component{
const currentEndTime = this._getCurrentEndTime() const currentEndTime = this._getCurrentEndTime()
let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0; let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0;
if (checked) { if (checked) {
if (currentEndTime) { if (this.state.allow_late && this.state.late_time) {
evaluation_start = moment(currentEndTime).add(7, 'days').format(dateFormat) evaluation_start = moment(this.state.late_time).add(14, 'days').format(dateFormat)
evaluation_end = moment(currentEndTime).add(21, 'days').format(dateFormat) evaluation_end = moment(this.state.late_time).add(28, 'days').format(dateFormat)
} else if (currentEndTime) {
evaluation_start = moment(currentEndTime).add(14, 'days').format(dateFormat)
evaluation_end = moment(currentEndTime).add(28, 'days').format(dateFormat)
} }
if (!this.state.evaluation_num) { if (!this.state.evaluation_num) {
evaluation_num = 3 evaluation_num = 3
@ -320,10 +326,14 @@ class CommonWorkSetting extends Component{
const { evaluation_end } = this.state; const { evaluation_end } = this.state;
const anonymous_appeal = e.target.checked const anonymous_appeal = e.target.checked
let appeal_time, appeal_penalty = this.state.appeal_penalty let appeal_time, appeal_penalty = this.state.appeal_penalty
const currentEndTime = this._getCurrentEndTime()
if (anonymous_appeal) { if (anonymous_appeal) {
appeal_penalty = 2 appeal_penalty = 2
if (evaluation_end) { if (this.state.allow_late && this.state.late_time) {
appeal_time = moment(evaluation_end).add(7, 'days').format(dateFormat) appeal_time = moment(this.state.late_time).add(5 * 7, 'days').format(dateFormat)
} else if (currentEndTime) {
appeal_time = moment(currentEndTime).add(5 * 7, 'days').format(dateFormat)
} }
} else { } else {
appeal_time = null; appeal_time = null;
@ -386,7 +396,7 @@ class CommonWorkSetting extends Component{
answer_public: e.target.checked answer_public: e.target.checked
}) })
} }
// 补交设置 允许补交
allow_late_change=(e)=>{ allow_late_change=(e)=>{
this.setState({ this.setState({
allow_late: e.target.value allow_late: e.target.value
@ -401,6 +411,10 @@ class CommonWorkSetting extends Component{
late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat) late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat)
}) })
} }
} else {
this.setState({
late_time: null
})
} }
} }
@ -1031,7 +1045,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}>
</Tooltip> */} </Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(this.state.init_publish_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
@ -1063,7 +1077,7 @@ class CommonWorkSetting extends Component{
<span>截止时间</span> <span>截止时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}>
</Tooltip> */} </Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(this.state.init_end_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -1122,7 +1136,7 @@ class CommonWorkSetting extends Component{
<RadioGroup onChange={this.allow_late_change} value={allow_late}> <RadioGroup onChange={this.allow_late_change} value={allow_late}>
<Radio style={radioStyle} value={true} disabled={noAuth}>允许补交</Radio> <Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>
<div className={"h21 mb10 ml30 mt20"}> <div className={"h21 mb10 ml30 mt20"}>
<span>迟交扣分</span> <span>迟交扣分</span>
@ -1135,7 +1149,7 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}> <div className={" mb10 ml30"}>
<span>结束时间</span> <span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(init_late_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -1164,7 +1178,7 @@ class CommonWorkSetting extends Component{
</div> </div>
<Radio style={radioStyle} value={false} disabled={noAuth}>禁止补交</Radio> <Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>
</RadioGroup> </RadioGroup>
@ -1183,7 +1197,7 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>开启时间</span> <span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(init_evaluation_start) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -1216,7 +1230,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */} </Tooltip> */}
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(init_evaluation_end) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -1313,7 +1327,7 @@ class CommonWorkSetting extends Component{
<span>结束时间</span> <span>结束时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */} </Tooltip> */}
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(init_appeal_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span> <span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"

@ -18,11 +18,15 @@ export function RouteHOC(options = {}) {
} }
} }
toCreateProject = () => { toCreateProject = () => {
let url = '/projects/new'
if (window.location.port == 3007) { if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new' // window.location.href
} else { url = '/testbdweb.educoder.net/projects/new'
window.location.href = '/projects/new'
} }
window.open(
url,
'_blank' // <- This is what makes it open in a new window.
);
} }
// common_homework group_homework // common_homework group_homework
// 是否是分组作业 // 是否是分组作业

@ -410,7 +410,9 @@ class commonWork extends Component{
searchPlaceholder={"请输入名称进行搜索"} searchPlaceholder={"请输入名称进行搜索"}
showSearchInput={true} showSearchInput={true}
></Titlesearchsection> ></Titlesearchsection>
<PublishRightnow ref="publishModalRef" showActionButton={true} {...this.props} checkBoxValues={checkBoxValues}
showActionButton={false}
isPublish={true} doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
{ {
mainList && mainList.course_identity < 5 && mainList.homeworks.length>0 && mainList && mainList.course_identity < 5 && mainList.homeworks.length>0 &&
<div className="mt20 edu-back-white padding20-30"> <div className="mt20 edu-back-white padding20-30">
@ -422,8 +424,7 @@ class commonWork extends Component{
onClick={this.onWorkDelete}>删除</a> onClick={this.onWorkDelete}>删除</a>
</li> </li>
<li className="li_line"> <li className="li_line">
<PublishRightnow ref="publishModalRef" showActionButton={true} {...this.props} checkBoxValues={checkBoxValues} <a href="javascript:void(0)" className="color-grey-9" onClick={() => this.refs['publishModalRef'].homeworkstart()}>{ "立即发布" }</a>
isPublish={true} doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
</li> </li>
<li className="li_line"> <li className="li_line">
<PublishRightnow showActionButton={true} {...this.props} checkBoxValues={checkBoxValues} <PublishRightnow showActionButton={true} {...this.props} checkBoxValues={checkBoxValues}

@ -277,7 +277,7 @@ class CommonWorkAppraiseReply extends Component{
showModulationtype={this.showModulationtype} showModulationtype={this.showModulationtype}
addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length} addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length}
onReply={this.onReply} placeholder={"请在此输入对本作品的评语最大限制2000个字符"} onReply={this.onReply} placeholder={"请在此输入对本作品的评语最大限制2000个字符"}
showSameScore={isGroup} showSameScore={isGroup && isAdmin}
></GraduationTasksappraiseMainEditor> } ></GraduationTasksappraiseMainEditor> }
</div> </div>
{/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */} {/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */}

@ -236,7 +236,7 @@ class Associationmodel extends Component{
}}> }}>
<div className={"font-16"} style={{ <div className={"font-16"} style={{
margin:'0px 20%' margin:'0px 17%'
}}> }}>
你当前尚未管理任何项目请先 <span><a className={"font-16"} style={{color:'#1890ff'}} href={"/projects/new"} target="_blank">创建项目</a> </span> 你当前尚未管理任何项目请先 <span><a className={"font-16"} style={{color:'#1890ff'}} href={"/projects/new"} target="_blank">创建项目</a> </span>
</div> </div>

@ -102,7 +102,7 @@ class Exercisestatisticalresult extends Component {
} }
`} `}
</style> </style>
<div className={"educontent mb20" } style={{width: "1250px"}}> <div className={"educontent mb20" } >
{data&&data.course_groups.length===0?"":<div className="stud-class-set"> {data&&data.course_groups.length===0?"":<div className="stud-class-set">
<div className="clearfix edu-back-white"> <div className="clearfix edu-back-white">

@ -760,6 +760,8 @@ class Studentshavecompletedthelist extends Component {
<span> <span>
{record.operating==="--"? {record.operating==="--"?
<span style={{"text-align": "center","color": '#999999',}}>{record.operating}</span> <span style={{"text-align": "center","color": '#999999',}}>{record.operating}</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999',}}>--</span>
: :
<a style={{"text-align": "center"}} className="color-blue" <a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a> href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a>
@ -954,6 +956,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"? {record.finalscore==="--"?
<span style={{"text-align": "center","color": '#999999'}} <span style={{"text-align": "center","color": '#999999'}}
>--</span> >--</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
: :
<a style={{"text-align": "center"}} className="color-blue" <a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a> href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
@ -1141,6 +1146,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"? {record.finalscore==="--"?
<span style={{"text-align": "center","color": '#999999'}} <span style={{"text-align": "center","color": '#999999'}}
>--</span> >--</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
: :
<a style={{"text-align": "center"}} className="color-blue" <a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a> href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>

@ -338,7 +338,7 @@ class GraduateTaskItem extends Component{
{item==="创建项目"? {item==="创建项目"?
<WordsBtn className="colorblue font-16 ml20 fr mt12"> <WordsBtn className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={'https://testbdweb.educoder.net/projects/new'}>创建项目</a> <a className="btn colorblue" href={'/projects/new'} target="_blank">创建项目</a>
</WordsBtn> </WordsBtn>
:""} :""}

@ -467,6 +467,7 @@ class GraduationTasksSubmitedit extends Component{
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let work_Id=this.props.match.params.work_Id
const uploadProps = { const uploadProps = {
width: 600, width: 600,
fileList, fileList,
@ -487,12 +488,7 @@ class GraduationTasksSubmitedit extends Component{
}, },
}; };
// console.log(workslist&&workslist)
// console.log(selectmemberslist&&selectmemberslist)
let graduation_id=workslist===undefined?"":workslist.graduation_id;
let task_id=workslist===undefined?"":workslist.task_id;
return( return(
<React.Fragment> <React.Fragment>
@ -530,9 +526,9 @@ class GraduationTasksSubmitedit extends Component{
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+work_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -466,6 +466,7 @@ render(){
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let task_Id=this.props.match.params.task_Id
const uploadProps = { const uploadProps = {
width: 600, width: 600,
fileList, fileList,
@ -488,10 +489,6 @@ render(){
// console.log(this.props) // console.log(this.props)
// console.log(selectmemberslist&&selectmemberslist)、、
let graduation_id=workslist===undefined?"":workslist.graduation_id;
let task_id=workslist===undefined?"":workslist.task_id;
return( return(
@ -531,9 +528,9 @@ render(){
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -164,7 +164,7 @@ class GraduationTasksappraise extends Component{
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
<Link to={"/courses/"+courseId} className="color-grey-9 fl">{datalist&&datalist.course_name}</Link> <Link to={"/courses/"+courseId+"/students"} className="color-grey-9 fl">{datalist&&datalist.course_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -81,7 +81,7 @@ class GraduationTasksappraiseReplyChild extends Component{
></GraduationTasksappraiseMainEditor> } ></GraduationTasksappraiseMainEditor> }
</div> </div>
<div className={"stud-class-set edu-back-white mb10"} style={{height:"100%"}}> {!!comment_scores.length && <div className={"stud-class-set edu-back-white mb10"} style={{height:"100%"}}>
<div className="padding20 memoReplies commentsDelegateParent course-message" <div className="padding20 memoReplies commentsDelegateParent course-message"
style={{ paddingTop: '0px', paddingBottom: '0px' }} style={{ paddingTop: '0px', paddingBottom: '0px' }}
@ -96,7 +96,7 @@ class GraduationTasksappraiseReplyChild extends Component{
}) } }) }
</div> </div>
</div> </div>
</div> </div> }
</React.Fragment> </React.Fragment>
) )
} }

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl ,bytesToSize} from 'educoder'; import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -105,7 +105,9 @@ class GraduationTasksedit extends Component{
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(fileList) // console.log(fileList)
// } // }
this.setState({ fileList }); this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
} }
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
@ -143,10 +145,10 @@ class GraduationTasksedit extends Component{
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
debugger
this.cancelAttachment(); this.cancelAttachment();
// const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json` // const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -281,7 +283,7 @@ class GraduationTasksedit extends Component{
width: 600, width: 600,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
showUploadList: false, // showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -414,12 +416,7 @@ class GraduationTasksedit extends Component{
)} )}
</Form.Item> </Form.Item>
<input type="hidden" id='descriptiontypes' /> <input type="hidden" id='descriptiontypes' />
<Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5">
<Button className="uploadBtn">
<Icon type="upload" /> 上传附件
</Button>
(单个文件150M以内)
</Upload>
{attachments&&attachments.map((item,key)=>{ {attachments&&attachments.map((item,key)=>{
return( return(
@ -448,37 +445,43 @@ class GraduationTasksedit extends Component{
</div> </div>
) )
})} })}
<style> <Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5">
{ <Button className="uploadBtn">
` <Icon type="upload" /> 上传附件
.maxwidth500{ </Button>
max-width:500px; (单个文件150M以内)
overflow: hidden; </Upload>
text-overflow: ellipsis; {/*<style>*/}
white-space: nowrap; {/*{*/}
color: #05101a; {/*`*/}
} {/*.maxwidth500{*/}
` {/*max-width:500px;*/}
} {/*overflow: hidden;*/}
</style> {/*text-overflow: ellipsis;*/}
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ {/*white-space: nowrap;*/}
return( {/*color: #05101a;*/}
<p className="color-grey mt10" key={key} > {/*}*/}
<a className="color-grey fl"> {/*`*/}
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> {/*}*/}
</a> {/*</style>*/}
<span className="mr12 color9B9B maxwidth500 fl" length="58"> {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/}
{item.name} {/*return(*/}
</span> {/*<p className="color-grey mt10" key={key} >*/}
<span className="color656565 mt2 color-grey-6 font-12 mr8"> {/*<a className="color-grey fl">*/}
{item.response===undefined?"":bytesToSize(item.size)} {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
</span> {/*</a>*/}
<i className="font-14 iconfont icon-guanbi " {/*<span className="mr12 color9B9B maxwidth500 fl" length="58">*/}
id={item.response===undefined?"":item.response.id} {/*{item.name}*/}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i> {/*</span>*/}
</p> {/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
) {/*{item.response===undefined?"":bytesToSize(item.size)}*/}
})} {/*</span>*/}
{/*<i className="font-14 iconfont icon-guanbi "*/}
{/*id={item.response===undefined?"":item.response.id}*/}
{/*aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>*/}
{/*</p>*/}
{/*)*/}
{/*})}*/}
{/*{attachments&&attachments.map((item,key)=>{*/} {/*{attachments&&attachments.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}

@ -2,7 +2,7 @@ import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import {WordsBtn, getUrl,bytesToSize} from 'educoder'; import {WordsBtn, getUrl,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -130,7 +130,9 @@ class GraduationTasksnew extends Component {
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(list) // console.log(list)
// } // }
this.setState({fileList}); this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
} }
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
@ -167,8 +169,8 @@ class GraduationTasksnew extends Component {
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
// const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json` // const url = `/attachments/${file}.json`
axios.delete(url, {}) axios.delete(url, {})
.then((response) => { .then((response) => {
if (response.data) { if (response.data) {
@ -257,7 +259,7 @@ class GraduationTasksnew extends Component {
multiple: true, multiple: true,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
showUploadList: false, // showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -423,44 +425,41 @@ class GraduationTasksnew extends Component {
)} )}
</Form.Item> </Form.Item>
<input type="hidden" id='descriptiontypes'/> <input type="hidden" id='descriptiontypes'/>
<Upload {...uploadProps} className="upload_1 ml5">
<Button className="uploadBtn">
<Icon type="upload"/> 上传附件
</Button>
(单个文件150M以内)
</Upload>
<style> <style>
{ {
` `
.maxwidth500{ .upload_1 .ant-upload-list{
max-width:500px; width: 560px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
} }
` `
} }
</style> </style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ <Upload {...uploadProps} className="upload_1 ml5">
return( <Button className="uploadBtn">
<p className="color-grey mt10" key={key} > <Icon type="upload"/> 上传附件
<a className="color-grey fl"> </Button>
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> (单个文件150M以内)
</a> </Upload>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span> {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/}
<span className="color656565 mt2 color-grey-6 font-12 mr8"> {/*return(*/}
{item.response===undefined?"":bytesToSize(item.size)} {/*<p className="color-grey mt10" key={key} >*/}
</span> {/*<a className="color-grey fl">*/}
<i className="font-14 iconfont icon-guanbi " {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
id={item.response===undefined?"":item.response.id} {/*</a>*/}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i> {/*<span className="mr12 color9B9B maxwidth500 fl" length="58">*/}
</p> {/*{item.name}*/}
) {/*</span>*/}
})} {/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
{/*{item.response===undefined?"":bytesToSize(item.size)}*/}
{/*</span>*/}
{/*<i className="font-14 iconfont icon-guanbi "*/}
{/*id={item.response===undefined?"":item.response.id}*/}
{/*aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>*/}
{/*</p>*/}
{/*)*/}
{/*})}*/}
</div> </div>

@ -1293,7 +1293,7 @@ class GraduationTaskssettinglist extends Component{
{item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""} {item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>修改作品</a>:""} {item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>查看作品</a> :""} {item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'}>创建项目</a>:""} {item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'} target="_blank">创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""} {item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""} {item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
{item==="补交附件"?<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>:""} {item==="补交附件"?<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>:""}

@ -32,6 +32,7 @@ const dataSource = [{
}]; }];
const buildColumns = (that) => { const buildColumns = (that) => {
const { course_groups } = that.state
const columns=[{ const columns=[{
title: '序号', title: '序号',
dataIndex: 'id', dataIndex: 'id',
@ -72,14 +73,17 @@ const buildColumns = (that) => {
return <span className="color-dark overflowHidden1" return <span className="color-dark overflowHidden1"
style={{maxWidth: '110px'}} >{student_id}</span> style={{maxWidth: '110px'}} >{student_id}</span>
} }
}, { }];
if (course_groups && course_groups.length) {
columns.push({
title: '分班', title: '分班',
dataIndex: 'course_group_name', dataIndex: 'course_group_name',
key: 'course_group_name', key: 'course_group_name',
align:'center', align:'center',
width:"50%", width:"50%",
className:"color-grey-6" className:"color-grey-6"
}]; })
}
const isAdminOrStudent = that.props.isAdminOrStudent() const isAdminOrStudent = that.props.isAdminOrStudent()
if (!isAdminOrStudent) { if (!isAdminOrStudent) {
columns.some((item,key)=> { columns.some((item,key)=> {
@ -458,9 +462,9 @@ class studentsList extends Component{
checkBoxValues, checkBoxValues,
checkAllValue checkAllValue
}=this.state; }=this.state;
let currentOrderName = '学生学号' let currentOrderName = '学生学号排序'
if (order == ORDER_BY_GROUP) { if (order == ORDER_BY_GROUP) {
currentOrderName = '分班名称' currentOrderName = '分班名称排序'
} }
const { coursesids } = this.props const { coursesids } = this.props
const course_group_id = this.props.match.params.course_group_id const course_group_id = this.props.match.params.course_group_id
@ -621,12 +625,18 @@ class studentsList extends Component{
} }
</ul> </ul>
</li>} </li>}
<li className="drop_down"> <li className="drop_down">
{currentOrderName}<i className="iconfont icon-xiajiantou font-12 ml2"></i> {currentOrderName}
<ul className="drop_down_normal"> { course_groups && !!course_groups.length &&
<li onClick={() => this.onSortTypeChange(ORDER_BY_NUM)} >学生学号</li> <React.Fragment>
<li onClick={() => this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称</li> <i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_normal" style={{width: '124px'}}>
<li onClick={() => this.onSortTypeChange(ORDER_BY_NUM)} >学生学号排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称排序</li>
</ul> </ul>
</React.Fragment>
}
</li> </li>
</div> </div>
</div> </div>

@ -39,15 +39,17 @@ function buildColumns(that) {
render: (content, item, 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: 120,
dataIndex: 'login',
key: 'login',
render: (login, record) => {
return <span className="overflowHidden1" style={{ maxWidth: '110px'}} title={`${login.length > 8 ? login : ''}`}>{login}</span>
} }
}, { // ,{
// title: '用户ID',
// width: 120,
// dataIndex: 'login',
// key: 'login',
// render: (login, record) => {
// return <span className="overflowHidden1" style={{ maxWidth: '110px'}} title={`${login.length > 8 ? login : ''}`}>{login}</span>
// }
// }
, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
width: 120, width: 120,
@ -174,7 +176,7 @@ function buildColumns(that) {
}, },
}) })
} }
if(isAdmin && hasGraduationModule) { if(isAdminOrTeacher && hasGraduationModule) {
columns.unshift({ columns.unshift({
title: '', title: '',
dataIndex: 'course_member_id', dataIndex: 'course_member_id',
@ -594,7 +596,7 @@ class studentsList extends Component{
`}</style> `}</style>
<div className="mt20 edu-back-white padding20 teacherList"> <div className="mt20 edu-back-white padding20 teacherList">
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}> <div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
{ isAdmin && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> } { isAdminOrTeacher && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> }
{ <div className="studentList_operation_ul"> { <div className="studentList_operation_ul">
{ hasGraduationModule && isAdminOrTeacher && <li className="li_line drop_down"> { hasGraduationModule && isAdminOrTeacher && <li className="li_line drop_down">
加入答辩组<i className="iconfont icon-xiajiantou font-12 ml2"></i> 加入答辩组<i className="iconfont icon-xiajiantou font-12 ml2"></i>

@ -1336,68 +1336,79 @@ class Listofworks extends Component {
} }
// 导出实习报告批量 // 导出实习报告批量
internshipreport = ()=>{ internshipreport = (url)=>{
console.log("internshipreport"); console.log("internshipreport");
let url = "/zip/shixun_report"; // params: {
let homeworkid = this.props.match.params.homeworkid; // homework_common_id: homeworkid,
axios.get((url),{ // work_status: this.state.course_groupyslstwo,
params: { // course_group: this.state.checkedValuesineinfo,
homework_common_id: homeworkid, // search: this.state.searchtext,
work_status: this.state.course_groupyslstwo, // }
course_group: this.state.checkedValuesineinfo, // let url = "/zip/shixun_report";
search: this.state.searchtext, // let homeworkid = this.props.match.params.homeworkid;
} axios.get((url),{responseType: 'blob'}).then((response) => {
},{responseType: 'blob'}).then((response) => { console.log("1350");
console.log("1342");
console.log(response); console.log(response);
if (response.status == 200) { if(response.data.status&&response.data.status===-1){
var blob = new Blob([response.data])
var downloadElement = document.createElement('a'); }else if(response.data.status&&response.data.status===-2){
var href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = response.headers.get('Content-Disposition'); }else{
if (filename) { // window.location.href("/api"+url);
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 console.log("开始下载zip文件")
downloadElement.href = href; const type='application/zip'//ZIP文件
downloadElement.download = filename; //下载后文件名 const blob = new Blob([response.data], { type: type })
document.body.appendChild(downloadElement); const downloadElement = document.createElement('a')
downloadElement.click(); //点击下载 const href = window.URL.createObjectURL(blob)
document.body.removeChild(downloadElement); //下载完成移除元素 //后台再header中传文件名
} const name = decodeURI(response.headers['content-disposition'].split('=')[1])
window.URL.revokeObjectURL(href); //释放掉blob对象 downloadElement.href = href
downloadElement.download = name
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
} }
// 课堂学生成绩的导出下载 // 课堂学生成绩的导出下载
Classstudentachievement=()=>{ Classstudentachievement=(url)=>{
console.log("Classstudentachievement"); console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId; // const course_id = this.props.match.params.coursesId;
let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx"; // let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
axios.get((url),{ // ,{
params: { // params: {
group_id: this.state.checkedValuesineinfo, // group_id: this.state.checkedValuesineinfo,
search: this.state.searchtext, // search: this.state.searchtext,
} // }
},{responseType: 'blob'}).then((response) => { // },{responseType: 'blob'})
console.log("1306"); axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1374");
console.log(response); console.log(response);
if (response.status == 200) { if(response.data.status&&response.data.status===-1){
var blob = new Blob([response.data])
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接 }else if(response.data.status&&response.data.status===-2){
let filename = response.headers.get('Content-Disposition');
if (filename) { }else{
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
downloadElement.href = href; const blob = new Blob([response.data], { type: type })
downloadElement.download = filename; //下载后文件名 const downloadElement = document.createElement('a')
document.body.appendChild(downloadElement); const href = window.URL.createObjectURL(blob)
downloadElement.click(); //点击下载 //后台再header中传文件名
document.body.removeChild(downloadElement); //下载完成移除元素 const name = decodeURI(response.headers['content-disposition'].split('=')[1])
} console.log(response.headers['content-disposition'].split('=')[1]);
window.URL.revokeObjectURL(href); //释放掉blob对象 console.log(name);
downloadElement.href = href
downloadElement.download = name
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -1552,8 +1563,8 @@ class Listofworks extends Component {
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {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> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.internshipreport()}>实训报告</a></li> <li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li> <li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul> </ul>
</li>:""} </li>:""}
{this.props.isAdmin() ? {this.props.isAdmin() ?

@ -750,7 +750,7 @@ class Listofworksstudentone extends Component {
}) })
this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit); this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
} }
//计算成绩
setComputeTime=()=>{ setComputeTime=()=>{
let {teacherdata}=this.state; let {teacherdata}=this.state;
this.setState({ this.setState({
@ -761,6 +761,8 @@ class Listofworksstudentone extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
this.props.showNotification(`${response.data.message}`); this.props.showNotification(`${response.data.message}`);
var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });

@ -645,8 +645,12 @@ class ShixunStudentWork extends Component {
<span className={"startfont"}> <span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异 正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span> </span>
<NoneData></NoneData>
</li> </li>
<div className="justify break_full_word new_li edu-back-white" style={{minHeight: '480px',display:duplicatechecking===true?"":"none"}}>
<NoneData></NoneData>
</div>
<style> <style>
{` {`
.newbutton{ .newbutton{

@ -86,12 +86,16 @@ class ShixunWorkDetails extends Component {
</p> </p>
</div> </div>
<div className="padding10-30 clearfix"> <div className="padding10-30 clearfix" style={{
padding: '10px 2px'
}}>
<span className="fl font-18">{data&&data.homework_common_name}</span> <span className="fl font-18">{data&&data.homework_common_name}</span>
<a className="fr color-grey-9 mt4" onClick={this.goback}>返回</a> <a className="fr color-grey-9 mt4" onClick={this.goback}>返回</a>
</div> </div>
<div className="padding10-30 edu-back-white clearfix"> <div className="padding10-30 edu-back-white clearfix" style={{
padding: '10px 2px'
}}>
<span className="fl color-orange font-14">非编程类型任务不参与查重</span> <span className="fl color-orange font-14">非编程类型任务不参与查重</span>
<span className="fr mt4"> <span className="fr mt4">
<span className={"color656565"}>被查作品</span> <span className={"color656565"}>被查作品</span>

@ -42,6 +42,7 @@ class ShixunCustomsPass extends Component {
title: '关卡', title: '关卡',
dataIndex: 'customs', dataIndex: 'customs',
key: 'customs', key: 'customs',
className:"customsPass",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<style> <style>
@ -166,6 +167,9 @@ class ShixunCustomsPass extends Component {
.ant-table-tbody> tr > td{ .ant-table-tbody> tr > td{
text-align: center; text-align: center;
} }
.customsPass{
text-align: left !important;
}
`} `}
</style> </style>
{datas===undefined?"":<Table {datas===undefined?"":<Table
@ -174,9 +178,9 @@ class ShixunCustomsPass extends Component {
pagination={false} pagination={false}
/>} />}
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set bor-bottom-greyE mt20">
<div className="clearfix edu-back-white poll_list pad40px"> <div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20">实训详情</div> <div className="font-16 color-dark-21 shixunreporttitle mb20">实训详情</div>
<style> <style>
{` {`
.poll_list a{ .poll_list a{
@ -212,7 +216,7 @@ class ShixunCustomsPass extends Component {
return( return(
<div className="font-16 color-dark-21 ml20 mr20" key={k}> <div className="font-16 color-dark-21 ml20 mr20" key={k}>
<div className=" mt15"> <div className=" mt15">
<p className="clearfix pt5 pb5 pl15 pr15 codebox"> <p className="clearfix pt5 pb5 codebox">
<span className="fl"> <span className="fl">
<span className={"colorC8161D"}>{item.username}</span> <span className={"colorC8161D"}>{item.username}</span>
的代码文件 的代码文件

@ -1608,30 +1608,21 @@ class Trainingjobsetting extends Component {
}) })
} }
// 导出实习报告批量 // 导出实习报告批量
internshipreport = () => { internshipreport = (url) => {
console.log("internshipreport"); console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid; // var homeworkid = this.props.match.params.homeworkid;
let url = "/zip/shixun_report"; // let url = "/zip/shixun_report";
axios.get((url),{ axios.get(url).then((response) => {
params: {
homework_common_id: homeworkid,
}
},{responseType: 'blob'}).then((response) => {
console.log("326"); console.log("326");
console.log(response); console.log(response);
var blob = new Blob([response.data]) if(response.data.status&&response.data.status===-1){
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = response.headers.get('Content-Disposition'); }else if(response.data.status&&response.data.status===-2){
if (filename) {
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 }else{
downloadElement.href = href; window.open("/api"+url, '_blank');
downloadElement.download = filename; //下载后文件名 }
document.body.appendChild(downloadElement);
downloadElement.click(); //点击下载
document.body.removeChild(downloadElement); //下载完成移除元素
}
window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -1639,27 +1630,22 @@ class Trainingjobsetting extends Component {
} }
// 课堂学生成绩的导出下载 // 课堂学生成绩的导出下载
Classstudentachievement = () => { Classstudentachievement = (url) => {
console.log("Classstudentachievement"); console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId; // const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
axios.get((url),{responseType: 'blob'}).then((response) => { axios.get(url).then((response) => {
console.log("339"); console.log("1374");
console.log(response); console.log(response);
var blob = new Blob([response.data]) if(response.data.status&&response.data.status===-1){
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = response.headers.get('Content-Disposition'); }else if(response.data.status&&response.data.status===-2){
if (filename) {
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
downloadElement.href = href;
downloadElement.download = filename; //下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); //点击下载
document.body.removeChild(downloadElement); //下载完成移除元素
}
window.URL.revokeObjectURL(href); //释放掉blob对象
}else{
window.open("/api"+url, '_blank');
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
@ -1805,9 +1791,9 @@ class Trainingjobsetting extends Component {
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}> {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> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.internshipreport()}>实训报告</a> <li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li> </li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a> <li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li> </li>
</ul> </ul>
</li>: ""} </li>: ""}

@ -319,30 +319,21 @@ class Workquestionandanswer extends Component {
// 导出实习报告批量 // 导出实习报告批量
internshipreport = () => { internshipreport = (url) => {
console.log("internshipreport"); console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid; // var homeworkid = this.props.match.params.homeworkid;
let url = "/zip/shixun_report"; // let url = "/zip/shixun_report";
axios.get((url),{ axios.get(url).then((response) => {
params: {
homework_common_id: homeworkid,
}
},{responseType: 'blob'}).then((response) => {
console.log("326"); console.log("326");
console.log(response); console.log(response);
var blob = new Blob([response.data]) if(response.data.status&&response.data.status===-1){
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = response.headers.get('Content-Disposition'); }else if(response.data.status&&response.data.status===-2){
if (filename) {
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名 }else{
downloadElement.href = href; window.open("/api"+url, '_blank');
downloadElement.download = filename; //下载后文件名 }
document.body.appendChild(downloadElement);
downloadElement.click(); //点击下载
document.body.removeChild(downloadElement); //下载完成移除元素
}
window.URL.revokeObjectURL(href); //释放掉blob对象
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -350,27 +341,22 @@ class Workquestionandanswer extends Component {
} }
// 课堂学生成绩的导出下载 // 课堂学生成绩的导出下载
Classstudentachievement = () => { Classstudentachievement = (url) => {
console.log("Classstudentachievement"); console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId; // const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
axios.get((url),{responseType: 'blob'}).then((response) => { axios.get(url).then((response) => {
console.log("339"); console.log("1374");
console.log(response); console.log(response);
var blob = new Blob([response.data]) if(response.data.status&&response.data.status===-1){
var downloadElement = document.createElement('a');
var href = window.URL.createObjectURL(blob); //创建下载的链接
let filename = response.headers.get('Content-Disposition');
if (filename) {
filename = filename.match(/\"(.*)\"/)[1]; //提取文件名
downloadElement.href = href;
downloadElement.download = filename; //下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); //点击下载
document.body.removeChild(downloadElement); //下载完成移除元素
}
window.URL.revokeObjectURL(href); //释放掉blob对象
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
@ -501,9 +487,9 @@ class Workquestionandanswer extends Component {
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}> <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> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.internshipreport()}>实训报告</a> <li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li> </li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a> <li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li> </li>
</ul> </ul>
</li> : ""} </li> : ""}

@ -878,6 +878,7 @@ class ShixunHomework extends Component{
if(response.data&&response.data){ if(response.data&&response.data){
this.setState({ this.setState({
course_modules:response.data, course_modules:response.data,
homework_categorys:response.data.homework_category
}) })
} }
} }
@ -975,7 +976,8 @@ class ShixunHomework extends Component{
order, order,
}=this.state; }=this.state;
let main_id=this.props.match.params.main_id;
let category_id=this.props.match.params.category_id;
return( return(
<React.Fragment > <React.Fragment >
<div> <div>
@ -1128,20 +1130,36 @@ class ShixunHomework extends Component{
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/> <Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
</p> } </p> }
{/*{course_modules&&course_modules.main_category.map((item,key)=>{*/} {course_modules&&course_modules.main_category.map((item,key)=>{
{/*return(*/} return(
{/*<li key={key} id={item.main_category_id} onClick={() => this.moveTos(item.main_category_id)}>{item.main_category_name}</li>*/} datas&&datas.category_id===null?"":<li key={key} id={item.main_category_id} onClick={() => this.moveTos(item.main_category_id)}>{item.main_category_name}</li>:""
{/*)*/} )
{/*})}*/} })}
{ course_modules&&course_modules.homework_category.filter((item)=> { { course_modules&&course_modules.homework_category.filter((item,key)=> {
return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1) return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1)
}).map( (item,key) => { }).map( (item,key) => {
if(datas&&datas.category_id!=null&&datas&&datas.category_id===item.category_id===false){
return <li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>
}
if(datas&&datas.category_id===null){
return <li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li> return <li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>
}
})} })}
<style>
{`
.courseSecond{
margin-left: 10px;
padding: 10px;
}
`}
</style>
{course_modules&&course_modules.homework_category.length===0&&datas&&datas.category_id===null?
<div className={"courseSecond"}>暂无数据</div>:""}
{/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/} {/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}
{/*<li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>*/} {/*<li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>*/}

@ -1297,23 +1297,26 @@ export default class TPMsettings extends Component {
<p id="e_tips_shixundescriptionQuestion" className="edu-txt-right color-grey-cd font-12"></p> <p id="e_tips_shixundescriptionQuestion" className="edu-txt-right color-grey-cd font-12"></p>
</div> </div>
<div className="edu-back-white mb10 padding40-20 clearfix"> <div className="edu-back-white mb10 padding40-20 clearfix" >
<div className="clearfix"> <div className="clearfix">
<p className="color-grey-6 font-16 mb30">技术平台</p> <p className="color-grey-6 font-16 mb30">技术平台</p>
<div className="clearfix mb20"> <div className="clearfix mb20">
<span className="color-orange fl mr20">*</span> <span className="color-orange fl mr20">*</span>
<div className="width15 fl mr20" onMouseLeave={operateauthority?this.bigopens:""}> <div className="width15 fl mr20"
// onMouseLeave={operateauthority?this.bigopens:""}
>
<Select placeholder="请更新主类别" value={choice_main_type === "" ? undefined : choice_main_type} <Select placeholder="请更新主类别" value={choice_main_type === "" ? undefined : choice_main_type}
style={{width: 180}} style={{width: 180}}
onChange={operateauthority?this.bigClass:""} onChange={operateauthority?this.bigClass:""}
// onMouseEnter={this.bigopen} // onMouseEnter={this.bigopen}
// onMouseLeave={this.bigopens} // onMouseLeave={this.bigopens}
disabled={operateauthority?false:true} disabled={operateauthority?false:true}
onMouseEnter={operateauthority?this.bigopen:""} // onMouseEnter={operateauthority?this.bigopen:""}
onSelect={operateauthority?this.bigopens:""} onSelect={operateauthority?this.bigopens:""}
open={opers}> // open={opers}
>
{ {
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => { settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
@ -1379,17 +1382,19 @@ export default class TPMsettings extends Component {
</Modal> </Modal>
</div> </div>
<div className="width15 fl pr mr20" onMouseLeave={operateauthority?this.bigopens:""}> <div className="width15 fl pr mr20"
// onMouseLeave={operateauthority?this.bigopens:""}
>
<Select mode="multiple" placeholder="请选择小类别" <Select mode="multiple" placeholder="请选择小类别"
value={choice_small_type.length===0||choice_small_type[0]===""||choice_small_type===[]?undefined:choice_small_type} value={choice_small_type.length===0||choice_small_type[0]===""||choice_small_type===[]?undefined:choice_small_type}
style={{width: 180,height:30}} style={{width: 180,height:30}}
disabled={operateauthority?false:true} disabled={operateauthority?false:true}
// onChange={operateauthority?this.littleClass:""} // onChange={operateauthority?this.littleClass:""}
onDeselect={operateauthority?this.Deselectlittle:""} onDeselect={operateauthority?this.Deselectlittle:""}
onMouseEnter={operateauthority?this.bigopensmal:""} // onMouseEnter={operateauthority?this.bigopensmal:""}
onSelect={operateauthority?this.littleClass:""} onSelect={operateauthority?this.littleClass:""}
defaultOpen={false} defaultOpen={false}
open={opensmail} // open={opensmail}
> >
{ {
settingsData === undefined ? "" : settingsData.shixun.small_type.map((item, key) => { settingsData === undefined ? "" : settingsData.shixun.small_type.map((item, key) => {
@ -1409,18 +1414,20 @@ export default class TPMsettings extends Component {
</div> </div>
</div> </div>
</div> {/*</div>*/}
<div className="edu-back-white mb10 padding40-20 clearfix" onMouseLeave={operateauthority?this.bigopens:""}> {/*<div className="edu-back-white mb10 padding40-20 clearfix" >*/}
<div className="clearfix"> <div className="clearfix"
// onMouseLeave={operateauthority?this.bigopens:""}
>
<p className="color-grey-6 font-16 mb30">评测脚本</p> <p className="color-grey-6 font-16 mb30">评测脚本</p>
<div className="pl35"> <div className="pl35">
<Select placeholder="请选择选择脚本" <Select placeholder="请选择选择脚本"
style={{width: 180}} style={{width: 180}}
className="fl" className="fl"
disabled={operateauthority?false:true} disabled={operateauthority?false:true}
onMouseEnter={operateauthority?this.sbigopen:""} // onMouseEnter={operateauthority?this.sbigopen:""}
onSelect={operateauthority?this.bigopens:""} onSelect={operateauthority?this.bigopens:""}
open={operss} // open={operss}
value={choice_standard_scripts === undefined||choice_standard_scripts === null ? undefined :choice_standard_scripts.id===undefined?choice_standard_scripts:choice_standard_scripts.id} value={choice_standard_scripts === undefined||choice_standard_scripts === null ? undefined :choice_standard_scripts.id===undefined?choice_standard_scripts:choice_standard_scripts.id}
onChange={operateauthority?this.SelectScput:""}> onChange={operateauthority?this.SelectScput:""}>
{ {
@ -1474,7 +1481,7 @@ export default class TPMsettings extends Component {
<a onClick={()=>this.testscripttip(0)}><img <a onClick={()=>this.testscripttip(0)}><img
src={getImageUrl("images/educoder/problem.png") }/></a> src={getImageUrl("images/educoder/problem.png") }/></a>
<div className="invite-tip clearfix none " id="test_script_tip" <div className="invite-tip clearfix none " id="test_script_tip"
style={{top: '33px', right: '-6px',width: '271px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}> style={{top: '33px', right: '-6px',width: '322px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>
<span className="top-black-trangle"></span> <span className="top-black-trangle"></span>
<div className="padding20 invitecontent clearfix"> <div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left"> <p className="font-12 edu-txt-left">
@ -1725,7 +1732,9 @@ export default class TPMsettings extends Component {
<div className="edu-back-white mb10 padding40-20 clearfix"> <div className="edu-back-white mb10 padding40-20 clearfix">
<p className="color-grey-6 font-16 mb30">发布信息</p> <p className="color-grey-6 font-16 mb30">发布信息</p>
<div className="clearfix" onMouseLeave={this.bigopens}> <div className="clearfix"
// onMouseLeave={this.bigopens}
>
<span className="color-orange fl mr20">*</span> <span className="color-orange fl mr20">*</span>
<span className="color-grey-6 fl" style={{minWidth: '95px'}}>面向学员</span> <span className="color-grey-6 fl" style={{minWidth: '95px'}}>面向学员</span>
@ -1734,9 +1743,9 @@ export default class TPMsettings extends Component {
style={{width: 180}} style={{width: 180}}
value={trainee} value={trainee}
onChange={this.Selecttrainee} onChange={this.Selecttrainee}
onMouseEnter={this.sbigopenss} // onMouseEnter={this.sbigopenss}
onSelect={this.sbigopensss} onSelect={this.sbigopensss}
open={opersss} // open={opersss}
> >
<Option value={1}>初级学员</Option> <Option value={1}>初级学员</Option>
<Option value={2}>中级学员</Option> <Option value={2}>中级学员</Option>

@ -655,7 +655,9 @@ export default class TPMchallengesnew extends Component {
</div> </div>
<p className="color-grey-6 font-16 mb30">奖励经验值</p> <p className="color-grey-6 font-16 mb30">奖励经验值</p>
<div className="clearfix" onMouseLeave={this.props.status===2?"":this.onshixunsmarkss}> <div className="clearfix"
// onMouseLeave={this.props.status===2?"":this.onshixunsmarkss}
>
<span className="fl mr30 color-orange pt10">*</span> <span className="fl mr30 color-orange pt10">*</span>
<style> <style>
@ -668,9 +670,9 @@ export default class TPMchallengesnew extends Component {
<Select style={{width: 120}} className="winput-240-40 fl" <Select style={{width: 120}} className="winput-240-40 fl"
id="challenge_score" id="challenge_score"
onChange={this.props.status===2?"":this.onshixunsmark} onChange={this.props.status===2?"":this.onshixunsmark}
onMouseEnter={this.props.status===2?"":this.onshixunsmarks} // onMouseEnter={this.props.status===2?"":this.onshixunsmarks}
disabled={this.props.status===2?true:false} disabled={this.props.status===2?true:false}
open={marktype} // open={marktype}
value={onshixunsmarkvalue} value={onshixunsmarkvalue}
getPopupContainer={triggerNode => triggerNode.parentNode} getPopupContainer={triggerNode => triggerNode.parentNode}
> >

@ -1473,7 +1473,9 @@ editanswersMD=(initValue, id)=> {
</div> </div>
<p className="color-grey-6 font-16 mb30">奖励经验值</p> <p className="color-grey-6 font-16 mb30">奖励经验值</p>
<div className="clearfix" onMouseLeave={this.onshixunsmarkss}> <div className="clearfix"
// onMouseLeave={this.onshixunsmarkss}
>
<span className="fl mr30 color-orange pt10">*</span> <span className="fl mr30 color-orange pt10">*</span>
<style> <style>
{` {`
@ -1485,8 +1487,8 @@ editanswersMD=(initValue, id)=> {
<Select style={{width: 120}} className="winput-240-40 fl" <Select style={{width: 120}} className="winput-240-40 fl"
id="challenge_score" id="challenge_score"
onChange={this.onshixunsansweSelect} onChange={this.onshixunsansweSelect}
onMouseEnter={this.onshixunsmarks} // onMouseEnter={this.onshixunsmarks}
open={marktype} // open={marktype}
value={answeonshixunsmark} value={answeonshixunsmark}
> >
{options} {options}
@ -1662,7 +1664,9 @@ editanswersMD=(initValue, id)=> {
</div> </div>
<p className="color-grey-6 font-16 mb30">奖励经验值</p> <p className="color-grey-6 font-16 mb30">奖励经验值</p>
<div className="clearfix" onMouseLeave={this.onshixunsmarkss}> <div className="clearfix"
// onMouseLeave={this.onshixunsmarkss}
>
<span className="fl mr30 color-orange pt10">*</span> <span className="fl mr30 color-orange pt10">*</span>
<style> <style>
{` {`
@ -1675,9 +1679,9 @@ editanswersMD=(initValue, id)=> {
id="challenge_score" id="challenge_score"
disabled={this.props.status===2?true:false} disabled={this.props.status===2?true:false}
onChange={this.props.status===2?"":this.onshixunsansweSelect} onChange={this.props.status===2?"":this.onshixunsansweSelect}
onMouseEnter={this.onshixunsmarks} // onMouseEnter={this.onshixunsmarks}
value={answeonshixunsmark} value={answeonshixunsmark}
open={marktype} // open={marktype}
> >
{options} {options}

@ -60,7 +60,7 @@ a{
#exercisememoMD .CodeMirror { #exercisememoMD .CodeMirror {
margin-top: 31px !important; margin-top: 31px !important;
height: 374px !important; height: 658px !important;
/*width: 579px !important;*/ /*width: 579px !important;*/
} }

@ -889,14 +889,16 @@ class Newshixuns extends Component {
<p className="color-grey-6 font-16 mb15">技术平台</p> <p className="color-grey-6 font-16 mb15">技术平台</p>
<div className="clearfix mb20"> <div className="clearfix mb20">
<span className="mr30 color-orange pt5 fl">*</span> <span className="mr30 color-orange pt5 fl">*</span>
<div className="width15 fl mr20" onMouseLeave={this.bigopens}> <div className="width15 fl mr20"
// onMouseLeave={this.bigopens}
>
<Select placeholder="请更新主类别" <Select placeholder="请更新主类别"
style={{width: 180}} style={{width: 180}}
onChange={this.bigClass} onChange={this.bigClass}
onMouseEnter={this.bigopen} // onMouseEnter={this.bigopen}
onSelect={this.bigopens} onSelect={this.bigopens}
defaultOpen={false} defaultOpen={false}
open={opers} // open={opers}
> >
{ {
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => { newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => {
@ -1026,14 +1028,16 @@ class Newshixuns extends Component {
</div> </div>
</Modal> </Modal>
</div> </div>
<div className=" fl pr mr20" onMouseLeave={this.bigopens}> <div className=" fl pr mr20"
// onMouseLeave={this.bigopens}
>
<Select mode="multiple" placeholder="请选择小类别" <Select mode="multiple" placeholder="请选择小类别"
style={{minWidth: 180}} style={{minWidth: 180}}
onChange={this.littleClass} onChange={this.littleClass}
onMouseEnter={this.bigopensmal} // onMouseEnter={this.bigopensmal}
onSelect={this.bigopens} onSelect={this.bigopens}
defaultOpen={false} defaultOpen={false}
open={opensmail} // open={opensmail}
> >
{ {
newshixunlist === undefined ? "" : newshixunlist.small_type.map((item, key) => { newshixunlist === undefined ? "" : newshixunlist.small_type.map((item, key) => {
@ -1156,7 +1160,9 @@ class Newshixuns extends Component {
<div className="mb10 edu-back-white padding30-20"> <div className="mb10 edu-back-white padding30-20">
<p className="color-grey-6 font-16 mb20">发布信息</p> <p className="color-grey-6 font-16 mb20">发布信息</p>
<div className="clearfix" onMouseLeave={this.bigopens}> <div className="clearfix"
// onMouseLeave={this.bigopens}
>
<div className="clearfix mb20 pl25"> <div className="clearfix mb20 pl25">
<span className="fl color-grey-6 lineh-30 mr20"><span <span className="fl color-grey-6 lineh-30 mr20"><span
className="mr10 color-orange mt2 fl">*</span></span> className="mr10 color-orange mt2 fl">*</span></span>
@ -1164,9 +1170,9 @@ class Newshixuns extends Component {
<Select placeholder="请选择学员类别" <Select placeholder="请选择学员类别"
style={{width: 180}} style={{width: 180}}
onChange={this.Selectthestudent} onChange={this.Selectthestudent}
onMouseEnter={this.sbigopen} // onMouseEnter={this.sbigopen}
onSelect={this.bigopens} onSelect={this.bigopens}
open={operss} // open={operss}
> >
<Option value={1}>初级学员</Option> <Option value={1}>初级学员</Option>
<Option value={2}>中级学员</Option> <Option value={2}>中级学员</Option>

@ -402,7 +402,7 @@ class LoginRegisterComponent extends Component {
: <div style={{height: "25px"}}></div> : <div style={{height: "25px"}}></div>
} }
<DragValidator <DragValidator
height={38} successGreenColor="#b0e811" height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}} style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

@ -344,9 +344,8 @@ class LoginRegisterComponent extends Component {
passwords: "", passwords: "",
Agreetotheterms: "", Agreetotheterms: "",
}) })
// this.props.history.push(result.data.redirect_uri) this.props.history.push(result.data.redirect_uri);
this.props.Setshowbool(2); //this.props.Setshowbool(2);
} catch (e) { } catch (e) {
} }
@ -713,7 +712,7 @@ class LoginRegisterComponent extends Component {
} }
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#b0e811" height={38} className="loginInput" successGreenColor="#29bd8b"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

Loading…
Cancel
Save