杨树林 5 years ago
commit a49ca20bbb

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

@ -226,8 +226,8 @@ class CommonWorkDetailIndex 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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li> <li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li> <li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -105,8 +105,8 @@ class TabRightComponents 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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li> <li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li> <li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -1,5 +1,5 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn,markdownToHTML} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
@ -104,7 +104,7 @@ class Exercisestatisticalresult extends Component {
</style> </style>
<div className={"educontent mb20" } style={{width: "1250px"}}> <div className={"educontent mb20" } style={{width: "1250px"}}>
{data&&data.course_groups.length===0?"":<div className="stud-class-set bor-bottom-greyE"> {data&&data.course_groups.length===0?"":<div className="stud-class-set">
<div className="clearfix edu-back-white"> <div className="clearfix edu-back-white">
<ul className="clearfix" style={{padding:'20px'}}> <ul className="clearfix" style={{padding:'20px'}}>
<li className="clearfix mt10"> <li className="clearfix mt10">
@ -180,13 +180,16 @@ class Exercisestatisticalresult extends Component {
{data&&data.commit_results.map((item,key)=>{ {data&&data.commit_results.map((item,key)=>{
return( return(
<div className="stud-class-set bor-greyE mb20" key={key}> <div className="stud-class-set mb20" key={key}>
<div className="clearfix edu-back-white poll_list" style={{padding: '20px'}}> <div className="clearfix edu-back-white poll_list" style={{padding: '20px'}}>
<div className="font-16 shixunreporttitle fl" > <div className="font-16 shixunreporttitle fl" >
<span className="CACFF">{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span> <span className="CACFF">{item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span>
<span>Q{item.ques_position} <div>
<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span> {/*Q{item.ques_position}*/}
</span> <div dangerouslySetInnerHTML={{__html: markdownToHTML(item.ques_title).replace(/▁/g,"▁▁▁")}}></div>
{/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/}
</div>
</div> </div>
<div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div> <div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
</div> </div>

@ -163,9 +163,14 @@ class OfficialAcademicTranscript extends Component {
text-align: center; text-align: center;
} }
.exerctabel .ant-table-tbody > tr >td{
border:1px solid transparent;
}
`} `}
</style> </style>
{datas===undefined?"":<Table {datas===undefined?"":<Table
className={"exerctabel"}
dataSource={datas} dataSource={datas}
columns={columns} columns={columns}
pagination={false} pagination={false}

@ -66,12 +66,16 @@ class Exercisetablesmubus extends Component {
width:'300px', width:'300px',
render: (text, record) => ( render: (text, record) => (
<span style={{color:'#FF6800'}}> <span style={{color:'#FF6800'}}>
{record.max_score===undefined?"":<Progress {record.max_score===undefined?"":<span>
<div style={{
float: 'left',
width: '220px'
}}><Progress
strokeColor={{ strokeColor={{
'0%': '#29BD8B', '0%': '#29BD8B',
'100%': '#29BD8B', '100%': '#29BD8B',
}} }}
percent={record.max_score*100} showInfo={false} />} percent={record.max_score*100} showInfo={false}/></div><div className={"fr"}>{record.max_score*100}%</div></span>}
</span> </span>
), ),
}]; }];
@ -125,10 +129,14 @@ class Exercisetablesmubus extends Component {
} }
.ant-table-tbody > tr > td:nth-child(1){ .ant-table-tbody > tr > td:nth-child(1){
text-align: left; text-align: left;
}
.Exermubu .ant-table-tbody > tr:nth-last-child(1) > td{
border:1px solid transparent;
} }
`} `}
</style> </style>
{datas===undefined?"":<Table {datas===undefined?"":<Table
className={"Exermubu"}
dataSource={datas} dataSource={datas}
columns={columns} columns={columns}
pagination={false} pagination={false}

@ -258,9 +258,9 @@ class Testpapersettinghomepage extends Component{
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a <li><a
onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)} onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}
calssName="color-dark">学生成绩</a></li> className="color-dark">学生成绩</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} calssName="color-dark">空白试卷</a></li> <li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} className="color-dark">空白试卷</a></li>
<li><a calssName="color-dark" <li><a className="color-dark"
onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)} onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}
>学生答题试卷</a></li> >学生答题试卷</a></li>
</ul> </ul>

@ -215,7 +215,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state; let {search} = this.state;
this.searchList(search,1,10) this.searchList(search,1,20)
} }

@ -240,12 +240,12 @@ class GraduationTasksedit extends Component{
handleSubmit=(e)=>{ handleSubmit=(e)=>{
let {fileList}=this.state; let {fileList}=this.state;
if(fileList.length===0){ // if(fileList.length===0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
return // return
} // }
this.Commoninterface(fileList); this.Commoninterface(fileList);
} }

@ -214,13 +214,13 @@ class GraduationTasksnew extends Component {
// 提交按钮 // 提交按钮
handleSubmit = (e) => { handleSubmit = (e) => {
let {fileList} = this.state; let {fileList} = this.state;
if(fileList.length===0){ // if(fileList.length===0){
this.setState({ // this.setState({
shixunsreplace:true, // shixunsreplace:true,
}) // })
//
return // return
} // }
this.Commoninterface(fileList); this.Commoninterface(fileList);

@ -1056,13 +1056,16 @@ class GraduationTaskssettingapp extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -701,7 +701,7 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#989898'}}> <a style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm')}
</a> </a>
</span> </span>
), ),
@ -741,11 +741,11 @@ class GraduationTaskssettinglist extends Component{
className:'edu-txt-center', className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore.work_score==="--"?"未评阅": <pre> <Tooltip placement="right" title={record.finalscore.work_score==="--"?"未评阅": <pre>
{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/> {record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/> {record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>} {record.finalscore.cross_comment_score===undefined||record.finalscore.cross_comment_score==="未批阅"?"交叉评分:--":"交叉评分:"+record.finalscore.cross_comment_score+"分"}<br/>
{record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"+<br/>} {record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"}<br/>
最终成绩{record.finalscore.work_score}<br/> 最终成绩{record.finalscore.work_score}<br/>
</pre>}> </pre>}>
<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a> <a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
@ -1010,13 +1010,16 @@ class GraduationTaskssettinglist extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1141,17 +1144,28 @@ class GraduationTaskssettinglist extends Component{
</ul> </ul>
<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}> <div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<style>
{
`
.edu-menu-lists li:hover {
background: #f0f0f0 !important;
}
.edu-menu-lists li:hover a{
color: #666 !important;
}
`
}
</style>
<div className="clearfix"> <div className="clearfix">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12"> {this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span> <span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""} 个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel"> {this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p> <p>
<a data-remote="true"> <a data-remote="true" class="color-grey-6 font-12">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a> {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p> <i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list"> <ul className="edu-menu-list edu-menu-lists" style={{width: '87px'}}>
<li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a> <li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a>
</li> </li>
<li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a> <li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a>

@ -303,13 +303,16 @@ class GraduationTasksquestions extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.drop_down_menu li .color-dark{
color: #666 !important;
}
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -63,7 +63,8 @@ class Listofworks extends Component {
page: 1, page: 1,
limit: 20, limit: 20,
loadingstate: true, loadingstate: true,
order: "updated_at", order: "update_time",
b_order:"desc",
search: null, search: null,
task_status: [], task_status: [],
course_group_info: [], course_group_info: [],
@ -678,10 +679,11 @@ class Listofworks extends Component {
//order 排序时间 //order 排序时间
//debug=t 是老师的意思 //debug=t 是老师的意思
// console.log(ordervlue)7009 // console.log(ordervlue)7009
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
let urll = `/homework_commons/${homeworkid}/works_list.json?`; let urll = `/homework_commons/${homeworkid}/works_list.json?`;
var order = "asc"; var order = "asc";
if (ordervlue === "updated_at") { if (ordervlue === "update_time") {
order = "desc"; order = "desc";
} }
var checkedValuesines = checkedValuesine; var checkedValuesines = checkedValuesine;
@ -2031,14 +2033,14 @@ class Listofworks extends Component {
} }
//排序 //排序
funorder = (e) => { funorder = (e) => {
if (e === "updated_at") { if (e === "update_time") {
// 时间 // 时间
// 时间排序是从小到大 // 时间排序是从小到大
this.setState({ this.setState({
order: "updated_at", order: "update_time",
loadingstate: true, loadingstate: true,
}) })
this.Startsorting("updated_at", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
} }
if (e === "work_score") { if (e === "work_score") {
@ -2597,10 +2599,10 @@ class Listofworks extends Component {
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
<a className="font-12 color-grey-6"> <a className="font-12 color-grey-6">
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a> {order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i> <i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
<ul className="edu-position-hide undis mt10"> <ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funorder("updated_at")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li> <li> <a onClick={(e) => this.funorder("update_time")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li> <li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li> <li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul> </ul>

Loading…
Cancel
Save