仅供测试 请勿提交

This commit is contained in:
yunkexin 2026-04-24 11:14:41 +08:00
parent c7bf20269d
commit e343a37c1d
3 changed files with 26 additions and 16 deletions

View File

@ -517,10 +517,10 @@ class TrainingContent extends React.Component {
const chineseCharWidth = 14; // 中文字符宽度(px) const chineseCharWidth = 14; // 中文字符宽度(px)
const paddingWidth = 32; // 单元格内边距 const paddingWidth = 32; // 单元格内边距
const minWidth = 100; // 最小宽度 const minWidth = 100; // 最小宽度
const maxWidth = 200; // 最大宽度 const maxWidth = 300; // 最大宽度
const textLength = header.length; const textLength = header.length;
const calculatedWidth = textLength * chineseCharWidth + paddingWidth; const calculatedWidth = textLength * chineseCharWidth + paddingWidth;
return Math.min(Math.max(calculatedWidth, minWidth), maxWidth); return Math.max(calculatedWidth, minWidth);
}; };
// 生成表格列配置 // 生成表格列配置

View File

@ -85,7 +85,7 @@ class FullScreen extends React.Component {
componentDidMount() { componentDidMount() {
this.isUnmounted = false; this.isUnmounted = false;
window.addEventListener('resize', this.setScale); window.addEventListener('resize', this.setScale);
// this.getHomeDataArray(); this.getHomeDataArray();
this.getYearPXData(); this.getYearPXData();
this.loadMediaFiles(); this.loadMediaFiles();
this.getAnnouncementData(); this.getAnnouncementData();
@ -138,7 +138,7 @@ class FullScreen extends React.Component {
this.getHomeSESubYearData(); this.getHomeSESubYearData();
this.getHomeSESubYearMonthData(); this.getHomeSESubYearMonthData();
this.getHomeSESubIDCardData(); this.getHomeSESubIDCardData();
this.getBSTypeMonthData(); // this.getBSTypeMonthData();
this.getCompanyData(); this.getCompanyData();
} }
}; };
@ -343,9 +343,18 @@ class FullScreen extends React.Component {
url: 'FM/Organization/OrderPaged', url: 'FM/Organization/OrderPaged',
onComplete: (ret) => { onComplete: (ret) => {
if (ret && !this.isUnmounted) { if (ret && !this.isUnmounted) {
//加载页面默认为绑泰
const defaultCompany = ret.find((company) => company.ID === '00500000-0000-0000-0000-000000000000');
this.setState({ this.setState({
companyData: ret, companyData: ret,
}); });
// 如果找到了默认公司,设置 selectedCompany
if (defaultCompany && !this.state.selectedCompany) {
this.setState({
selectedCompany: defaultCompany.ID,
});
}
this.getBSTypeMonthData();
} }
}, },
}); });

View File

@ -674,6 +674,7 @@
} }
} }
// 证书表格样式 // 证书表格样式
// 证书表格样式
.certificateTable { .certificateTable {
margin-bottom: 20px; margin-bottom: 20px;
:global { :global {
@ -681,28 +682,28 @@
font-size: 12px; font-size: 12px;
} }
// 表头样式
.ant-table-thead > tr > th { .ant-table-thead > tr > th {
background-color: #f5f5f5; background-color: #4285f4 !important;
color: #ffffff !important;
font-weight: bold; font-weight: bold;
padding: 8px; padding: 8px;
white-space: nowrap; 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 { .ant-table-tbody > tr:hover > td {
background-color: #e6f7ff; background-color: #e6f7ff;
} }
} }
} }
.totalRow {
:global {
td {
background-color: #f0f0f0 !important;
font-weight: bold;
}
}
}