学生实现作品列表样式调整

dev_cs
杨树林 5 years ago
parent 98a55971b1
commit 67e9fa5e23

@ -458,84 +458,64 @@ class Listofworksstudentone extends Component {
},
],
columnsstu2: [
// {
// title: '序号',
// dataIndex: 'number',
// key: 'number',
// align: "center",
// className:'font-14',
// width:'100px',
// render: (text, record) => (
// <span style={{width:'100px'}}>
// {record.number === undefined ?
// <span style={{
// color: '#9A9A9A',
// textAlign: "center",
// width:'100px'
// }}> --</span>
// : record.number === "" ?
// <span style={{
// color: '#9A9A9A',
// textAlign: "center",
// width:'100px'
// }}>--</span>
// : record.number === "--" ?
// <span style={{
// color: '#9A9A9A',
// textAlign: "center",
// width:'100px'
// }}>--</span>
// :
// <span style={{
// color: '#07111B',
// textAlign: "center",
// width:'100px'
// }}> {record.number}</span>
// }
// </span>
// ),
// },
{
title: '序号',
dataIndex: 'number',
key: 'number',
align: "center",
className:'font-14',
width:'100px',
render: (text, record) => (
<span style={{width:'100px'}}>
<span style={{
color: '#07111B',
textAlign: "center",
width:'100px'
}}> </span>
</span>
),
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: "center",
className:'font-14 maxnamewidth200',
width:'200px',
className:'font-14 maxnamewidth110',
width:'100px',
render: (text, record) => (
<span className="maxnamewidth200">
<span className="maxnamewidth110">
{record.name === undefined ?
<span style={{
color: '#9A9A9A',
textAlign: "center",
width:'200px'
width:'100px'
}}>--</span>
:
record.name === "" ?
<span style={{
color: '#9A9A9A',
textAlign: "center",
width:'200px'
width:'100px'
}}>--</span>
:
record.name === null ?
<span style={{
color: '#9A9A9A',
textAlign: "center",
width:'200px'
width:'100px'
}}>--</span>
:
record.name === "--" ?
<span style={{
color: '#9A9A9A',
textAlign: "center",
width:'200px'
width:'100px'
}}>--</span>
:
<a className="maxnamewidth200" title={record.name} style={{
<a className="maxnamewidth110" title={record.name} style={{
color: '#07111B',
textAlign: "center",
width:'200px'
width:'100px'
}}>{record.name}</a>
}
@ -1673,6 +1653,7 @@ class Listofworksstudentone extends Component {
let datalists = [];
var styletable = {"display": "none"}
var arr =[];
var arr2=[];
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
if(this.props.isNotMember()===true){
@ -1709,7 +1690,48 @@ class Listofworksstudentone extends Component {
}
}
try {
for(var i=0;i<this.state.columnsstu2.length;i++){
var item = this.state.columnsstu2[i];
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}
else{
arr2.push(item);
}
}
else{
if (work_efficiency === false) {
if(item.title==="关卡得分"){
continue
}
else if(item.title==="效率分"){
continue
}else{
arr2.push(item);
}
}else{
arr2.push(item);
}
}
}
}catch (e) {
arr2=this.state.columnsstu2;
}
let columns2= arr;
let columns3= arr2;
var teacherlists = undefined;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据")
@ -1803,6 +1825,8 @@ class Listofworksstudentone extends Component {
loadingstate: false,
styletable: styletable,
columnsstu:columns2,
columnsstu2:columns3,
})
}
// 设置数据
@ -1813,6 +1837,7 @@ class Listofworksstudentone extends Component {
var arr =[];
var arr2 =[];
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
@ -1847,8 +1872,47 @@ class Listofworksstudentone extends Component {
}
}
let columns2= arr;
try {
for(var i=0;i<this.state.columnsstu2.length;i++){
var item = this.state.columnsstu2[i];
if(this.props.isNotMember()===true){
if(item.title==="关卡得分") {
continue
}
if(item.title==="效率分") {
continue
}
if(item.title==="最终成绩") {
continue
}
if(item.title==="学号") {
continue
}else{
arr.push(item);
}
}else{
if (this.state.work_efficiency === false) {
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
continue
}else{
arr.push(item);
}
}else{
arr.push(item);
}
}
}
}catch (e) {
arr2=this.state.columnsstu2;
}
let columns2= arr;
let columns3= arr2;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据")
// console.log(this.state.teacherdata.id )
@ -1912,6 +1976,7 @@ class Listofworksstudentone extends Component {
teacherlist: teacherlist,
loadingstate: false,
columnsstu:columns2,
columnsstu2:columns3,
})
}
// 查看学员实训信息

Loading…
Cancel
Save