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

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

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

Loading…
Cancel
Save