diff --git a/src/layout/FullOther/TrainingContent.js b/src/layout/FullOther/TrainingContent.js index 3195a60..e115a23 100644 --- a/src/layout/FullOther/TrainingContent.js +++ b/src/layout/FullOther/TrainingContent.js @@ -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); }; // 生成表格列配置 diff --git a/src/layout/FullScreenInter.js b/src/layout/FullScreenInter.js index 95a6afe..a7964a5 100644 --- a/src/layout/FullScreenInter.js +++ b/src/layout/FullScreenInter.js @@ -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(); } }, }); diff --git a/src/layout/fullinter.less b/src/layout/fullinter.less index 0262ab6..b9bccfe 100644 --- a/src/layout/fullinter.less +++ b/src/layout/fullinter.less @@ -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; - } - } -}