仅供测试 请勿提交
This commit is contained in:
parent
c7bf20269d
commit
e343a37c1d
@ -517,10 +517,10 @@ class TrainingContent extends React.Component {
|
||||
const chineseCharWidth = 14; // 中文字符宽度(px)
|
||||
const paddingWidth = 32; // 单元格内边距
|
||||
const minWidth = 100; // 最小宽度
|
||||
const maxWidth = 200; // 最大宽度
|
||||
const maxWidth = 300; // 最大宽度
|
||||
const textLength = header.length;
|
||||
const calculatedWidth = textLength * chineseCharWidth + paddingWidth;
|
||||
return Math.min(Math.max(calculatedWidth, minWidth), maxWidth);
|
||||
return Math.max(calculatedWidth, minWidth);
|
||||
};
|
||||
|
||||
// 生成表格列配置
|
||||
|
||||
@ -85,7 +85,7 @@ class FullScreen extends React.Component {
|
||||
componentDidMount() {
|
||||
this.isUnmounted = false;
|
||||
window.addEventListener('resize', this.setScale);
|
||||
// this.getHomeDataArray();
|
||||
this.getHomeDataArray();
|
||||
this.getYearPXData();
|
||||
this.loadMediaFiles();
|
||||
this.getAnnouncementData();
|
||||
@ -138,7 +138,7 @@ class FullScreen extends React.Component {
|
||||
this.getHomeSESubYearData();
|
||||
this.getHomeSESubYearMonthData();
|
||||
this.getHomeSESubIDCardData();
|
||||
this.getBSTypeMonthData();
|
||||
// this.getBSTypeMonthData();
|
||||
this.getCompanyData();
|
||||
}
|
||||
};
|
||||
@ -343,9 +343,18 @@ class FullScreen extends React.Component {
|
||||
url: 'FM/Organization/OrderPaged',
|
||||
onComplete: (ret) => {
|
||||
if (ret && !this.isUnmounted) {
|
||||
//加载页面默认为绑泰
|
||||
const defaultCompany = ret.find((company) => company.ID === '00500000-0000-0000-0000-000000000000');
|
||||
this.setState({
|
||||
companyData: ret,
|
||||
});
|
||||
// 如果找到了默认公司,设置 selectedCompany
|
||||
if (defaultCompany && !this.state.selectedCompany) {
|
||||
this.setState({
|
||||
selectedCompany: defaultCompany.ID,
|
||||
});
|
||||
}
|
||||
this.getBSTypeMonthData();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@ -674,6 +674,7 @@
|
||||
}
|
||||
}
|
||||
// 证书表格样式
|
||||
// 证书表格样式
|
||||
.certificateTable {
|
||||
margin-bottom: 20px;
|
||||
:global {
|
||||
@ -681,28 +682,28 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
// 表头样式
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: #f5f5f5;
|
||||
background-color: #4285f4 !important;
|
||||
color: #ffffff !important;
|
||||
font-weight: bold;
|
||||
padding: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ant-table-tbody > tr > td {
|
||||
padding: 6px 8px;
|
||||
// 奇数行背景色
|
||||
.ant-table-tbody > tr:nth-child(odd) > td {
|
||||
background-color: #d4d5e3;
|
||||
}
|
||||
|
||||
// 偶数行背景色
|
||||
.ant-table-tbody > tr:nth-child(even) > td {
|
||||
background-color: #d0cedc;
|
||||
}
|
||||
|
||||
// hover 效果
|
||||
.ant-table-tbody > tr:hover > td {
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.totalRow {
|
||||
:global {
|
||||
td {
|
||||
background-color: #f0f0f0 !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user