杨树林 6 years ago
commit ce6a255c60

@ -42,8 +42,6 @@
"immutability-helper": "^2.6.6", "immutability-helper": "^2.6.6",
"install": "^0.12.2", "install": "^0.12.2",
"jest": "20.0.4", "jest": "20.0.4",
"js-base64": "^2.5.1",
"js-file-download": "^0.4.7",
"lodash": "^4.17.5", "lodash": "^4.17.5",
"loglevel": "^1.6.1", "loglevel": "^1.6.1",
"material-ui": "^1.0.0-beta.40", "material-ui": "^1.0.0-beta.40",
@ -165,7 +163,6 @@
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"concat": "^1.0.3", "concat": "^1.0.3",
"happypack": "^5.0.1", "happypack": "^5.0.1",
"videojs-for-react": "^0.0.3",
"webpack-bundle-analyzer": "^3.0.3", "webpack-bundle-analyzer": "^3.0.3",
"webpack-parallel-uglify-plugin": "^1.1.0" "webpack-parallel-uglify-plugin": "^1.1.0"
} }

@ -5,6 +5,7 @@ import locale from 'antd/lib/date-picker/locale/zh_CN';
import { WordsBtn,getUrl ,handleDateString} from 'educoder'; import { WordsBtn,getUrl ,handleDateString} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessage from '../../../modals/DownloadMessage';
import CoursesListType from '../../coursesPublic/CoursesListType'; import CoursesListType from '../../coursesPublic/CoursesListType';
import PublishModals from "../../coursesPublic/PublishModals"; import PublishModals from "../../coursesPublic/PublishModals";
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
@ -894,7 +895,40 @@ class GraduationTaskssettingapp extends Component{
} }
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const dateFormat = 'YYYY-MM-DD HH:mm'; const dateFormat = 'YYYY-MM-DD HH:mm';
@ -969,7 +1003,12 @@ class GraduationTaskssettingapp extends Component{
{/*course_groups={course_groups}*/} {/*course_groups={course_groups}*/}
{/*skipTop={this.skipTop}*/} {/*skipTop={this.skipTop}*/}
{/*/>*/} {/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal <HomeworkModal
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
@ -1070,8 +1109,8 @@ class GraduationTaskssettingapp extends Component{
{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"} className="color-dark">导出成绩</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -6,7 +6,7 @@ import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessage from '../../../modals/DownloadMessage';
import CoursesListType from '../../coursesPublic/CoursesListType'; import CoursesListType from '../../coursesPublic/CoursesListType';
import ModulationModal from "../../coursesPublic/ModulationModal"; import ModulationModal from "../../coursesPublic/ModulationModal";
@ -612,7 +612,51 @@ class GraduationTaskssettinglist extends Component{
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber); this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber);
} }
/// 确认是否下载
confirmysl(url){
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
axios.get(url,{
teacher_comment:teacher_comment,
task_status:task_status,
course_group:course_group,
cross_comment:cross_comment,
order:order,
b_order:b_order,
search:search,
}).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render(){ render(){
let {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate, let {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate,
@ -959,7 +1003,17 @@ class GraduationTaskssettinglist extends Component{
Cancel={this.Cancelvisible} Cancel={this.Cancelvisible}
categoryid={taskslistdata.work_id} categoryid={taskslistdata.work_id}
setupdate={this.setupdate} setupdate={this.setupdate}
/>:""} {taskslistdata&&taskslistdata? />:""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{taskslistdata&&taskslistdata?
// 教师列表 // 教师列表
this.props.isAdmin()?<div className="newMain clearfix"> this.props.isAdmin()?<div className="newMain clearfix">
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
@ -1025,8 +1079,8 @@ class GraduationTaskssettinglist extends Component{
{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"} className="color-dark">学生成绩</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">学生成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">作品附件</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -4,6 +4,7 @@ import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML} from 'educoder'; import { WordsBtn,markdownToHTML} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessage from '../../../modals/DownloadMessage';
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
import CoursesListType from '../../coursesPublic/CoursesListType'; import CoursesListType from '../../coursesPublic/CoursesListType';
import moment from 'moment'; import moment from 'moment';
@ -187,6 +188,41 @@ class GraduationTasksquestions extends Component{
course_groupslist:id course_groupslist:id
}) })
} }
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render(){ render(){
let { Modalstype,Modalstopval,ModalCancel,ModalSave,questionslist} =this.state; let { Modalstype,Modalstopval,ModalCancel,ModalSave,questionslist} =this.state;
@ -218,7 +254,12 @@ class GraduationTasksquestions extends Component{
{/*modalSave={ModalSave}*/} {/*modalSave={ModalSave}*/}
{/*loadtype={Loadtype}*/} {/*loadtype={Loadtype}*/}
{/*/>*/} {/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal <HomeworkModal
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
@ -311,8 +352,8 @@ class GraduationTasksquestions extends Component{
{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"} className="color-dark">导出成绩</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li> <li><a onClick={()=>this.confirmysl("/api/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Input,Checkbox,Table, Divider, Tooltip,Spin } from "antd"; import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent' import CourseLayoutcomponent from '../common/CourseLayoutComponent'
@ -27,18 +27,22 @@ const ROLE_ADMIN = "管理员"
const ROLE_TEACHER = "教师" const ROLE_TEACHER = "教师"
const ROLE_TEACHER_ASSISTANT = "助教" const ROLE_TEACHER_ASSISTANT = "助教"
const pageSize = 20; const pageSize = 20;
function buildColumns(that) { function buildColumns(that) {
let sortedInfo = that.state.sortedInfo || {}
const isAdmin = that.props.isAdmin() const isAdmin = that.props.isAdmin()
const isAdminOrCreator = that.props.isAdminOrCreator(); const isAdminOrCreator = that.props.isAdminOrCreator();
const isAdminOrTeacher = that.props.isAdminOrTeacher() const isAdminOrTeacher = that.props.isAdminOrTeacher()
const { course_groups } = that.state const { course_groups, filterKey } = that.state
const showSorter = filterKey == '1'
const columns = [{ const columns = [{
title: '序号', title: '序号',
dataIndex: 'name', dataIndex: 'name',
key: 'index', key: 'index',
render: (content, item, index) => { render: (content, item, index) => {
return item.isApply == true ? '' : <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1 return index + 1
- (that.state.application_list ? that.state.application_list.length : 0)} </a> // return item.isApply == true ? '' : <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1
// - (that.state.application_list ? that.state.application_list.length : 0)} </a>
} }
} }
// ,{ // ,{
@ -55,6 +59,8 @@ function buildColumns(that) {
dataIndex: 'name', dataIndex: 'name',
width: 120, width: 120,
key: 'name', key: 'name',
sorter: showSorter,
sortOrder: sortedInfo.columnKey === 'name' && sortedInfo.order,
render: (name, record) => { render: (name, record) => {
return <a href={`/login/${record.login}`} target="_blank" className="overflowHidden1" style={{ maxWidth: '110px'}} return <a href={`/login/${record.login}`} target="_blank" className="overflowHidden1" style={{ maxWidth: '110px'}}
title={`${name.length > 4 ? name : ''}`}>{name}</a> title={`${name.length > 4 ? name : ''}`}>{name}</a>
@ -63,6 +69,11 @@ function buildColumns(that) {
title: '角色', title: '角色',
dataIndex: 'role', dataIndex: 'role',
key: 'role', key: 'role',
sorter: showSorter,
// 'ascend' | 'descend'
defaultSortOrder: 'ascend',
sortOrder: sortedInfo.columnKey === 'role' && sortedInfo.order,
}] }]
that.state.course_groups && that.state.course_groups.length && columns.push({ that.state.course_groups && that.state.course_groups.length && columns.push({
title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>, title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>,
@ -138,8 +149,11 @@ function buildColumns(that) {
columns.push({ columns.push({
title: '答辩组', title: '答辩组',
// width: 90, // width: 90,
sorter: showSorter,
key: 'graduation_group', key: 'graduation_group',
dataIndex: 'graduation_group', dataIndex: 'graduation_group',
sortOrder: sortedInfo.columnKey === 'graduation_group' && sortedInfo.order,
render: text => ( render: text => (
<span> <span>
{text} {text}
@ -200,6 +214,7 @@ class studentsList extends Component{
this.state={ this.state={
headIndex:"1", headIndex:"1",
page:1, page:1,
sortedInfo: { columnKey: 'role', order: 'ascend'},
totalPage:undefined, totalPage:undefined,
searchValue:"", searchValue:"",
order: ORDER_BY_DATE, order: ORDER_BY_DATE,
@ -209,7 +224,8 @@ class studentsList extends Component{
checkBoxValues: [], checkBoxValues: [],
isSpin:false, isSpin:false,
application_list: [], application_list: [],
checkAllArray: [] checkAllArray: [],
filterKey: 1, // 1 已审批 2 待审批
} }
} }
onCheckAllChange = (e, item, index) => { onCheckAllChange = (e, item, index) => {
@ -339,7 +355,7 @@ class studentsList extends Component{
console.log(error); console.log(error);
}); });
} }
fetchAll=(argPage)=>{ fetchAll = async (argPage) => {
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
@ -347,28 +363,57 @@ class studentsList extends Component{
if (argPage) { if (argPage) {
this.setState({ page: argPage }) this.setState({ page: argPage })
} }
const sortedInfo = this.state.sortedInfo;
let page = argPage || this.state.page let page = argPage || this.state.page
let { order, searchValue }=this.state let { searchValue, filterKey }=this.state
let url=`/courses/${id}/teachers.json?order=${order}&page=${page}`; let order = 1;
if (sortedInfo.columnKey == 'role') {
order = 1;
} else if (sortedInfo.columnKey == 'name') {
order = 2;
} else if (sortedInfo.columnKey == 'graduation_group') {
order = 3;
}
let sort = 'desc'
if (sortedInfo.order == 'ascend') {
sort = 'asc'
}
let url=`/courses/${id}/teachers.json?order=${order}&page=${page}&sort=${sort}`;
if (filterKey == '1') {
} else if (filterKey == '2') {
url = `/courses/${id}/apply_teachers.json?_a=1`
}
if(searchValue!=""){ if(searchValue!=""){
url+='&search='+searchValue; url+='&search='+searchValue;
} }
axios.get((url)).then((result)=>{ const result = await axios.get(url)
// axios.get((url)).then((result)=>{
if (result.data.teacher_list) { if (result.data.teacher_list) {
this.setState({ this.setState({
teachers: result.data.teacher_list, teachers: result.data.teacher_list,
total_count: result.data.teacher_list_size, total_count: result.data.teacher_list_size,
application_list: result.data.application_list, application_list: result.data.application_list || [],
is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false
})
} else if (result.data.application_list) {
this.setState({
total_count: result.data.teacher_list_size,
application_list: result.data.application_list || [],
is_admin: result.data.is_admin, is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false isSpin:false
}) })
} }
}).catch((error)=>{ // }).catch((error)=>{
console.log(error); // console.log(error);
this.setState({ // this.setState({
isSpin:false // isSpin:false
}) // })
}) // })
} }
getGroupList(){ getGroupList(){
let id = this.props.match.params.coursesId let id = this.props.match.params.coursesId
@ -529,13 +574,33 @@ class studentsList extends Component{
}) })
return result && result.length > 0 return result && result.length > 0
} }
onTableChange = (pagination, filters, sorter) => {
console.log('Various parameters', pagination, filters, sorter);
this.setState({
sortedInfo: sorter,
}, () => {
this.fetchAll()
});
};
clearSelection = () => {
this.setState({ checkBoxValues: [] })
}
selectedStatus=(e)=>{
this.clearSelection()
this.setState({
filterKey: e.key,
page:1,
isSpin:true
}, () => {
this.fetchAll();
})
}
render(){ render(){
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const columns = buildColumns(this) const columns = buildColumns(this)
let { let {
searchValue, checkBoxValues, checkAllValue, searchValue, checkBoxValues, checkAllValue,
groupList, total_count, teachers, order, page groupList, total_count, teachers, order, page, apply_size, filterKey
}=this.state }=this.state
let currentOrderName = '加入时间排序' let currentOrderName = '加入时间排序'
@ -544,12 +609,13 @@ class studentsList extends Component{
} else if (order == ORDER_BY_GRADUATION_GROUP) { } else if (order == ORDER_BY_GRADUATION_GROUP) {
currentOrderName = '答辩组排序' currentOrderName = '答辩组排序'
} }
const combineArray = teachers.slice(0) let combineArray = teachers.slice(0)
if (page == 1) { if (page == 1 && filterKey == '2') {
this.state.application_list && this.state.application_list.slice(0).reverse().forEach(item => { // this.state.application_list && this.state.application_list.slice(0).reverse().forEach(item => {
item.isApply = true // item.isApply = true
combineArray.unshift(item) // combineArray.unshift(item)
}) // })
combineArray = this.state.application_list
} }
const isAdminOrTeacher = this.props.isAdminOrTeacher() const isAdminOrTeacher = this.props.isAdminOrTeacher()
const hasGraduationModule = this.hasGraduationModule() const hasGraduationModule = this.hasGraduationModule()
@ -585,12 +651,25 @@ class studentsList extends Component{
</React.Fragment> </React.Fragment>
} }
secondRowLeft={ secondRowLeft={
total_count ? <ColorCountText count={total_count} name="个教师"></ColorCountText> : '' isAdminOrTeacher ? <div className="fl mt6 task_menu_ul ">
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.selectedStatus}>
<Menu.Item key="1">已审批({total_count})</Menu.Item>
<Menu.Item key="2">待审批({apply_size})</Menu.Item>
</Menu>
</div> :
(total_count ? <ColorCountText count={total_count} name="个教师"></ColorCountText> : '')
} }
onPressEnter={this.onPressEnter} onPressEnter={this.onPressEnter}
></Titlesearchsection> ></Titlesearchsection>
<style>{` <style>{`
.task_menu_ul .ant-menu-item, .task_menu_ul .ant-menu-submenu-title{
padding:0px;
margin-right: 30px;
line-height: 68px;
font-size: 16px;
}
.teacherList .ant-table-pagination.ant-pagination { .teacherList .ant-table-pagination.ant-pagination {
float: none; float: none;
text-align: center; text-align: center;
@ -599,7 +678,7 @@ class studentsList extends Component{
<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'}}>
{ isAdminOrTeacher && 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"> { filterKey == '1' && <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>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset", minWidth: '222px'}}> <ul className="drop_down_menu" style={{"right":"0px","left":"unset", minWidth: '222px'}}>
@ -627,14 +706,14 @@ class studentsList extends Component{
</p> </p>
</ul> </ul>
</li> } </li> }
<li className="drop_down"> {/* <li className="drop_down">
{currentOrderName} <i className="iconfont icon-xiajiantou font-12 ml2"></i> {currentOrderName} <i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_normal"> <ul className="drop_down_normal">
<li onClick={() => this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序</li> <li onClick={() => this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序</li> <li onClick={() => this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序</li>
{this.hasGraduationModule() && <li onClick={() => this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序</li>} {this.hasGraduationModule() && <li onClick={() => this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序</li>}
</ul> </ul>
</li> </li> */}
</div> } </div> }
</div> </div>
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
@ -642,7 +721,8 @@ class studentsList extends Component{
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */} {/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */}
<Table columns={columns} dataSource={combineArray} <Table columns={columns} dataSource={combineArray}
pagination={total_count > 20 ? { //分页 onChange={this.onTableChange}
pagination={total_count > 20 && filterKey == '1' ? { //分页
total: page == 1 && this.state.application_list.length ? total_count + total_count / Math.floor(this.state.application_list.length + 20) : total_count , //数据总数量 total: page == 1 && this.state.application_list.length ? total_count + total_count / Math.floor(this.state.application_list.length + 20) : total_count , //数据总数量
pageSize: page == 1 && this.state.application_list.length ? this.state.application_list.length + 20 : 20, //显示几条一页 pageSize: page == 1 && this.state.application_list.length ? this.state.application_list.length + 20 : 20, //显示几条一页
current: page, current: page,

@ -556,7 +556,7 @@ class Workquestionandanswer extends Component {
description={jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : jobsettingsdata.data.explanation === undefined ? "" : jobsettingsdata.data.explanation === null ? "" : jobsettingsdata.data.explanation}></Homeworddescription> description={jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : jobsettingsdata.data.explanation === undefined ? "" : jobsettingsdata.data.explanation === null ? "" : jobsettingsdata.data.explanation}></Homeworddescription>
</div> </div>
: :
<div className="pl20 " style={{"padding": "10px 10px 10px 20px"}}> <div className="pl20 markdown-body" style={{"padding": "10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" : {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" : jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" :
<div <div

@ -18,7 +18,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href') const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片 // 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim() const fileName = event.target.innerHTML.trim()
if (isImageExtension(imageSrc.trim()) || isImageExtension(fileName)) { if (isImageExtension(imageSrc.trim()) || isImageExtension(fileName) || event.target.tagName == 'IMG') {
// 非回复里的头像图片; 非emoticons // 非回复里的头像图片; 非emoticons
if (imageSrc.indexOf('/images/avatars/User') === -1 && if (imageSrc.indexOf('/images/avatars/User') === -1 &&
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) { imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {

@ -41,9 +41,10 @@
align-items: center; align-items: center;
display: -webkit-flex; display: -webkit-flex;
height: 100%; height: 100%;
text-align: center;
} }
.passImg{ .passImg{
max-width: 100%; max-width: 86%;
max-height: 100%; max-height: 100%;
} }
/* ImageLayer ----------------- End */ /* ImageLayer ----------------- End */

@ -159,7 +159,7 @@ class CodeEvaluateView extends Component {
let headIconClass = ''; let headIconClass = '';
let _headLockIconClass = ''; let _headLockIconClass = '';
if (item.is_public === 0) { if (item.is_public == 0) {
if (game.test_sets_view === true || power === 1){ if (game.test_sets_view === true || power === 1){
_headLockIconClass = 'fas fa-unlock-alt' _headLockIconClass = 'fas fa-unlock-alt'
} else { } else {
@ -175,7 +175,7 @@ class CodeEvaluateView extends Component {
testSetsComponentArray.push( testSetsComponentArray.push(
<div className="-task-ces-top clearfix" onClick={ this.onTestSetHeaderClick.bind(this, index) } <div className="-task-ces-top clearfix" onClick={ this.onTestSetHeaderClick.bind(this, index) }
style={{cursor:'pointer'}} key={index+'-0'}> style={{cursor:'pointer', 'margin-top':index == 0 ? '4px' : ''}} key={index+'-0'}>
<p className="clearfix"> <p className="clearfix">
<i className={`fa ${ 'fa-caret-right'} mr8 font-16`} <i className={`fa ${ 'fa-caret-right'} mr8 font-16`}
style={isExpanded ? {transform: 'rotate(90deg)'} : {}}></i> style={isExpanded ? {transform: 'rotate(90deg)'} : {}}></i>

@ -283,6 +283,9 @@ class LeftView extends Component {
color: #CDCDCD; color: #CDCDCD;
flex: 0 0 45px; flex: 0 0 45px;
} }
.markdown-body ol, .markdown-body ul {
padding-left: 2.5em;
}
`}</style> `}</style>
<div className="multiLevelAnswer"> <div className="multiLevelAnswer">
@ -293,7 +296,7 @@ class LeftView extends Component {
<div className="name">{item.name}</div> <div className="name">{item.name}</div>
<div className="status">已解锁</div> <div className="status">已解锁</div>
</div> </div>
<div className="contents" dangerouslySetInnerHTML={{__html: markdownToHTML(item.contents)}}> <div className="contents markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(item.contents)}}>
</div> </div>
</div> </div>
})} })}

@ -195,10 +195,10 @@ export default class TPManswer extends Component {
this.setState({ answers: newAnswers}) this.setState({ answers: newAnswers})
} }
answerOnChange = (val, index) => { answerOnChange = (val, index) => {
// if (!this.state.answers[index]) { if (!this.state.answers[index]) {
// // 1、2、3删除2会走到这里 // 1、2、3删除2会走到这里
// return; return;
// } }
const newAnswer = Object.assign({}, this.state.answers[index]) const newAnswer = Object.assign({}, this.state.answers[index])
newAnswer.contents = val newAnswer.contents = val
const newAnswers = this.state.answers.slice(0) const newAnswers = this.state.answers.slice(0)
@ -314,7 +314,7 @@ export default class TPManswer extends Component {
{ {
answers.map((answer, index) => { answers.map((answer, index) => {
return <div className="levelSection" id={`levelSection${index}`}> return <div className="levelSection" id={`levelSection${index}`} style={{ clear: 'both' }}>
<span className="mr4 color-orange pt10">*</span> <span className="mr4 color-orange pt10">*</span>
<p className="color-grey-6 font-16 mb30 mt10" style={{ display: "inline" }}>级别{index + 1}</p> <p className="color-grey-6 font-16 mb30 mt10" style={{ display: "inline" }}>级别{index + 1}</p>
<a className="fr sample_icon_remove mr30 mt8" onClick={()=>this.delanswers(index)}> <a className="fr sample_icon_remove mr30 mt8" onClick={()=>this.delanswers(index)}>

Loading…
Cancel
Save