This commit is contained in:
30404 2024-07-10 20:18:31 +08:00
parent 84061751f1
commit bd8e4ca861
2 changed files with 22 additions and 33 deletions

View File

@ -117,29 +117,23 @@
height: 400px; height: 400px;
margin-left: 350px; margin-left: 350px;
margin-top: 180px; margin-top: 180px;
position: absolute;
z-index: 2; z-index: 2;
border: 1px solid #ceedf5; border: 1px solid #ceedf5;
background-color: #d4f6f6; background-color: #d4f6f6;
} }
.TrainBox table{ .TrainBox table{
margin-top: 60px; margin-top: 60px;
margin-left: -2px; text-align: center;
width: 650px; width: 650px;
} }
.TrainBox th{
font-size: 18px;
padding: 10px 20px 0 55px;
}
.xx{ .xx{
padding: 20px 0; position: absolute;
} margin-top: -17px;
.TrainBox td{
font-size: 18px;
padding: 10px 0;
} }
.close-icon{ .close-icon{
text-align: center;
width: 30px; width: 30px;
height: 25px; height: 25px;
background-color: #a0d4e0; background-color: #a0d4e0;
@ -149,7 +143,7 @@
top: -20px; top: -20px;
cursor: pointer; cursor: pointer;
} }
.close-icon:hover{ /* .close-icon:hover{
background-color: #c4e6ed; background-color: #c4e6ed;
} }
@ -167,4 +161,4 @@
} }
.box-blue{ .box-blue{
margin-top: 15px; margin-top: 15px;
} } */

View File

@ -76,34 +76,29 @@ function TrainManage(){
</div>} </div>}
{showModal && ( {showModal && (
<div className='TrainBox'> <div className='TrainBox'>
<p className='splitter1'>实训ID{testID}<span className='close-icon' onClick={closeModal}>X</span></p> <p className='splitter1'><span style={{marginLeft:'285px'}}>实训ID{testID}</span><span className='close-icon' onClick={closeModal}>X</span></p>
<table> <table>
<thead style={{display:'flex'}}> <thead>
<tr> <tr>
<th style={{ flex: 1 }}>姓名</th> <th >姓名</th>
<th style={{ flex: 1 }}>ID</th> <th >ID</th>
<th style={{ flex: 1 }}>基础成绩</th> <th >基础成绩</th>
<th style={{ flex: 1 }}>实训成绩</th> <th >实训成绩</th>
<th style={{ flex: 1 }}>总成绩</th> <th >总成绩</th>
</tr> </tr>
<p className='xx'>---------------------------------------------------------------------------</p>
</thead> </thead>
<p className='xx'>---------------------------------------------------------------------------</p>
{TrainData&&<tbody> {TrainData&&<tbody>
<div className='box-blue'>
{Object.keys(TrainData).map((key,index)=>( {Object.keys(TrainData).map((key,index)=>(
<tr style={{ <tr>
display: 'flex', <td >{key}</td>
backgroundColor: index % 2 === 0 ? '#d4f6f6':'#fdecf5' // <td >{TrainData[key][0]}</td>
}} <td >{TrainData[key][4]}</td>
id='detailed_box_tr1'> <td >{TrainData[key][5]}</td>
<td style={{ flex: 1 }}>{key}</td> <td >{parseInt(TrainData[key][4])+parseInt(TrainData[key][5])}</td>
<td style={{ flex: 1 }}>{TrainData[key][0]}</td>
<td style={{ flex: 1 }}>{TrainData[key][4]}</td>
<td style={{ flex: 1 }}>{TrainData[key][5]}</td>
<td style={{ flex: 1 }}>{parseInt(TrainData[key][4])+parseInt(TrainData[key][5])}</td>
</tr> </tr>
))} ))}
</div>
</tbody>} </tbody>}
</table> </table>
</div> </div>