courseware
杨树林 5 years ago
parent 588d64f557
commit 66b299e404

@ -1751,7 +1751,6 @@ class Listofworksstudentone extends Component {
Updatetimedropdon=()=>{
debugger
let ooders=""
if(this.state.orders!=="update_time"){
ooders="desc";
@ -3565,6 +3564,30 @@ class Listofworksstudentone extends Component {
}
}
}
let Teachercolumns=columns;
if(this.state.orders&&this.state.orders==="update_time"){
if(Teachercolumns){
if(Teachercolumns.length>0){
Teachercolumns.map((item,key)=>{
if(item.key){
if(item.key==="work_score"){
//去掉成绩默认排序
item.defaultSortOrder="";
}
}
})
}
}
}
console.log("老师的数组");
console.log("columns");
console.log(Teachercolumns);
return (
this.props.isAdmin() === true ?
@ -3903,13 +3926,26 @@ class Listofworksstudentone extends Component {
`}</style>
<div className="edu-table edu-back-white ant-tables ysltableo table1">
<Spin tip="正在加载..." spinning={loadingstate}>
{datajs === undefined ? "" : <Table
{datajs === undefined ? "" :
(
this.state.orders&&this.state.orders==="update_time"?
<Table
dataSource={datajs}
columns={columns}
columns={Teachercolumns}
pagination={false}
onChange={this.table1handleChange}
loading={false}
/>}
/>
:
<Table
dataSource={datajs}
columns={Teachercolumns}
pagination={false}
onChange={this.table1handleChange}
loading={false}
/>
)
}
</Spin>
</div>

Loading…
Cancel
Save