From 2a46ec821ef7f5bdbb540cebe1437cbb004e5a5d Mon Sep 17 00:00:00 2001 From: yunkexin <760754045@qq.com> Date: Thu, 23 Apr 2026 09:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=85=E4=BE=9B=E6=B5=8B=E8=AF=95=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/FullScreenInter.js | 50 +++++++++++++++++++++++++++++++++++ src/layout/fullinter.less | 4 +-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/layout/FullScreenInter.js b/src/layout/FullScreenInter.js index 123da73..0dd7ba4 100644 --- a/src/layout/FullScreenInter.js +++ b/src/layout/FullScreenInter.js @@ -59,6 +59,8 @@ class FullScreen extends React.Component { MonthRecordCount: [], MonthPersonCount: [], }, + trainingSubIDCard: {}, + trainingSubBSType: {}, // 新增:当前选择的月份 selectedMonth: new Date().getMonth() + 1, // 默认当前月份,1-12 }; @@ -128,6 +130,8 @@ class FullScreen extends React.Component { if (name === '安全培训') { this.getHomeSESubYearData(); this.getHomeSESubYearMonthData(); + this.getHomeSESubIDCardData(); + this.getBSTypeMonthData(); } }; @@ -266,6 +270,52 @@ class FullScreen extends React.Component { }, }); }; + getHomeSESubIDCardData = () => { + const orgId = storage('lacal').getItem('webOrgId')?.val; + const json = initFilter(orgId); + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); + const day = String(currentDate.getDate()).padStart(2, '0'); + const currentDateStr = `${year}-${month}-${day}`; // 例如:2024-06-15 + + json.Parameter1 = currentDateStr; // 设置为当前日期 + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BI/BIHeadSE/SubCertificateType', + onComplete: (ret) => { + if (ret && !this.isUnmounted) { + this.setState({ + trainingSubIDCard: ret, + }); + } + }, + }); + }; + getBSTypeMonthData = () => { + const orgId = storage('lacal').getItem('webOrgId')?.val; + const json = initFilter(orgId); + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); + const day = String(currentDate.getDate()).padStart(2, '0'); + const currentDateStr = `${year}-${month}-${day}`; // 例如:2024-06-15 + + json.Parameter1 = currentDateStr; // 设置为当前日期 + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BI/BIHeadSE/SubTypeMonth', + onComplete: (ret) => { + if (ret && !this.isUnmounted) { + this.setState({ + trainingSubBSType: ret, + }); + } + }, + }); + }; renderOtherTabContent = () => { const { activeTab, trainingData, trainingSubData, trainingSubDataMonth, selectedMonth } = this.state; diff --git a/src/layout/fullinter.less b/src/layout/fullinter.less index 7905938..529d8b3 100644 --- a/src/layout/fullinter.less +++ b/src/layout/fullinter.less @@ -652,8 +652,8 @@ align-items: center; background: rgba(255, 255, 255, 0.9); padding: 4px 12px; - border-radius: 20px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + // border-radius: 20px; + // box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .monthSelectorLabel {