2026-04-22 13:47:29 +08:00
|
|
|
|
// FullScreenInter.js - 主文件保持简洁
|
|
|
|
|
|
import React from 'react';
|
2026-01-19 08:56:29 +08:00
|
|
|
|
import { connect } from 'dva';
|
2026-04-22 13:47:29 +08:00
|
|
|
|
import { withRouter } from 'dva/router';
|
|
|
|
|
|
import { Icon, Row, Col } from 'antd';
|
2026-01-19 08:56:29 +08:00
|
|
|
|
import styles from './fullinter.less';
|
|
|
|
|
|
import logo from '../assets/layout/headerno-logo-new.png';
|
|
|
|
|
|
import debounce from 'lodash.debounce';
|
|
|
|
|
|
import storage from '../utils/storage';
|
|
|
|
|
|
import { initFilter } from '../utils/common';
|
2026-04-22 13:47:29 +08:00
|
|
|
|
import HomeContent from './FullOther/HomeContent';
|
2026-04-22 16:14:55 +08:00
|
|
|
|
import TrainingContent from './FullOther/TrainingContent'; // 新增导入
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
|
|
|
|
|
const getScale = () => {
|
|
|
|
|
|
const width = 1920,
|
2026-04-22 13:47:29 +08:00
|
|
|
|
height = 1080;
|
2026-01-19 08:56:29 +08:00
|
|
|
|
let ww = window.innerWidth / width;
|
|
|
|
|
|
let wh = window.innerHeight / height;
|
|
|
|
|
|
return ww < wh ? ww : wh;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class FullScreen extends React.Component {
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
|
super(props);
|
|
|
|
|
|
this.state = {
|
|
|
|
|
|
nowDate: '',
|
2026-04-22 13:47:29 +08:00
|
|
|
|
riskTypeRate: [],
|
|
|
|
|
|
riskTotal: [
|
|
|
|
|
|
{ name: '年度重大隐患数', value: 1 },
|
|
|
|
|
|
{ name: '年度一般隐患数量', value: 89 },
|
|
|
|
|
|
{ name: '未整改隐患数量', value: 18 },
|
|
|
|
|
|
],
|
2026-01-21 14:05:35 +08:00
|
|
|
|
linkSum: [],
|
2026-04-22 13:47:29 +08:00
|
|
|
|
jobTodayTop3: [],
|
|
|
|
|
|
taskTop3: [],
|
2026-01-19 08:56:29 +08:00
|
|
|
|
scale: getScale(),
|
2026-04-22 13:47:29 +08:00
|
|
|
|
configBanner: ['首页', '风险管控', '隐患治理', '班组建设', '危险作业', '安全培训'],
|
|
|
|
|
|
mediaList: [],
|
|
|
|
|
|
currentMediaIndex: 0,
|
|
|
|
|
|
announcementList: [],
|
|
|
|
|
|
activeTab: '首页',
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// 新增:培训数据
|
|
|
|
|
|
trainingData: {
|
|
|
|
|
|
listNAME: [],
|
|
|
|
|
|
YearCount: [],
|
|
|
|
|
|
MonthRecordCount: [],
|
|
|
|
|
|
MonthPersonCount: [],
|
|
|
|
|
|
},
|
|
|
|
|
|
// 新增:安全培训页面专用数据
|
|
|
|
|
|
trainingSubData: {
|
|
|
|
|
|
listNAME: [],
|
|
|
|
|
|
YearCount: [],
|
|
|
|
|
|
MonthRecordCount: [],
|
|
|
|
|
|
MonthPersonCount: [],
|
|
|
|
|
|
},
|
|
|
|
|
|
trainingSubDataMonth: {
|
|
|
|
|
|
listNAME: [],
|
|
|
|
|
|
YearCount: [],
|
|
|
|
|
|
MonthRecordCount: [],
|
|
|
|
|
|
MonthPersonCount: [],
|
|
|
|
|
|
},
|
2026-04-23 09:13:20 +08:00
|
|
|
|
trainingSubIDCard: {},
|
|
|
|
|
|
trainingSubBSType: {},
|
2026-04-23 11:29:34 +08:00
|
|
|
|
companyData: [],
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// 新增:当前选择的月份
|
|
|
|
|
|
selectedMonth: new Date().getMonth() + 1, // 默认当前月份,1-12
|
2026-04-23 11:29:34 +08:00
|
|
|
|
selectedCompany: '',
|
2026-01-19 08:56:29 +08:00
|
|
|
|
};
|
2026-04-22 13:47:29 +08:00
|
|
|
|
this.isUnmounted = false;
|
2026-01-19 08:56:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setScale = debounce(() => {
|
2026-04-22 13:47:29 +08:00
|
|
|
|
if (this.isUnmounted) return;
|
|
|
|
|
|
this.setState({ scale: getScale() });
|
2026-01-19 08:56:29 +08:00
|
|
|
|
}, 500);
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
toggleFullscreen = () => {
|
|
|
|
|
|
if (!document.fullscreenElement) {
|
|
|
|
|
|
document.documentElement.requestFullscreen?.();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
document.exitFullscreen?.();
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-01-19 08:56:29 +08:00
|
|
|
|
componentDidMount() {
|
2026-04-22 13:47:29 +08:00
|
|
|
|
this.isUnmounted = false;
|
|
|
|
|
|
window.addEventListener('resize', this.setScale);
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// this.getHomeDataArray();
|
|
|
|
|
|
this.getYearPXData();
|
2026-04-22 13:47:29 +08:00
|
|
|
|
this.loadMediaFiles();
|
|
|
|
|
|
this.getAnnouncementData();
|
2026-01-21 14:05:35 +08:00
|
|
|
|
|
2026-01-19 08:56:29 +08:00
|
|
|
|
this.timer = setInterval(() => {
|
2026-04-22 13:47:29 +08:00
|
|
|
|
if (!this.isUnmounted) this.setState({ nowDate: this.getDate() });
|
2026-01-19 08:56:29 +08:00
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
document.addEventListener('fullscreenchange', this.handleFullscreenChange);
|
2026-01-21 14:05:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
getAnnouncementData = () => {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
announcementList: [
|
|
|
|
|
|
{ id: 1, title: '关于2024年安全生产月活动的通知', publishTime: '2024-06-01', url: '' },
|
|
|
|
|
|
{ id: 2, title: '公司第三季度安全培训安排', publishTime: '2024-05-28', url: '' },
|
|
|
|
|
|
{ id: 3, title: '关于开展安全隐患排查整治工作的通知', publishTime: '2024-05-20', url: '' },
|
|
|
|
|
|
{ id: 4, title: '安全生产标准化建设阶段性总结', publishTime: '2024-05-15', url: '' },
|
|
|
|
|
|
{ id: 5, title: '关于表彰2024年第一季度安全生产先进单位的决定', publishTime: '2024-05-10', url: '' },
|
2026-01-21 14:05:35 +08:00
|
|
|
|
],
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
loadMediaFiles = () => {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
mediaList: [
|
|
|
|
|
|
{ type: 'image', url: 'http://10.2.7.18:28028//WZ_Images/static/smyzw@2x.png' },
|
|
|
|
|
|
{ type: 'video', url: 'http://10.2.7.18:28028/WZ_Images/Img_JFSC/welcom/1.mp4' },
|
2026-01-21 14:05:35 +08:00
|
|
|
|
],
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
handleCarouselChange = (current) => {
|
|
|
|
|
|
this.setState({ currentMediaIndex: current });
|
2026-01-21 14:05:35 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
handleDotClick = (index) => {
|
|
|
|
|
|
this.setState({ currentMediaIndex: index });
|
2026-01-19 08:56:29 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
handleTabClick = (name) => {
|
|
|
|
|
|
this.setState({ activeTab: name });
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// 当点击安全培训tab时,获取对应数据
|
|
|
|
|
|
if (name === '安全培训') {
|
|
|
|
|
|
this.getHomeSESubYearData();
|
|
|
|
|
|
this.getHomeSESubYearMonthData();
|
2026-04-23 09:13:20 +08:00
|
|
|
|
this.getHomeSESubIDCardData();
|
|
|
|
|
|
this.getBSTypeMonthData();
|
2026-04-23 11:29:34 +08:00
|
|
|
|
this.getCompanyData();
|
2026-04-22 16:14:55 +08:00
|
|
|
|
}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
handleFullscreenChange = () => {
|
|
|
|
|
|
this.forceUpdate();
|
|
|
|
|
|
};
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
componentWillUnmount() {
|
|
|
|
|
|
this.isUnmounted = true;
|
|
|
|
|
|
window.removeEventListener('resize', this.setScale);
|
|
|
|
|
|
if (this.timer) clearInterval(this.timer);
|
|
|
|
|
|
document.removeEventListener('fullscreenchange', this.handleFullscreenChange);
|
|
|
|
|
|
}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
getDate = () => {
|
|
|
|
|
|
const myDate = new Date();
|
|
|
|
|
|
const year = myDate.getFullYear();
|
|
|
|
|
|
const mon = myDate.getMonth() + 1;
|
|
|
|
|
|
const date = myDate.getDate();
|
|
|
|
|
|
let hours = myDate.getHours();
|
|
|
|
|
|
let minutes = myDate.getMinutes();
|
|
|
|
|
|
let seconds = myDate.getSeconds();
|
|
|
|
|
|
hours = hours < 10 ? '0' + hours : hours;
|
|
|
|
|
|
minutes = minutes < 10 ? '0' + minutes : minutes;
|
|
|
|
|
|
seconds = seconds < 10 ? '0' + seconds : seconds;
|
|
|
|
|
|
return `${year} 年 ${mon} 月 ${date} 日 \t\t\t${hours} : ${minutes} : ${seconds}`;
|
|
|
|
|
|
};
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
getHomeDataArray = () => {
|
|
|
|
|
|
const orgId = storage('lacal').getItem('webOrgId')?.val;
|
|
|
|
|
|
const json = initFilter(orgId);
|
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'BI/BIKanBanController/ReturnAllData',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
riskTypeRate: ret.riskTypeRate || [],
|
|
|
|
|
|
linkSum: ret.linkSum || [],
|
|
|
|
|
|
jobTodayTop3: ret.jobTodayTop3 || [],
|
|
|
|
|
|
taskTop3: ret.taskTop3 || [],
|
2026-01-19 08:56:29 +08:00
|
|
|
|
});
|
2026-04-22 13:47:29 +08:00
|
|
|
|
}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
},
|
2026-04-22 13:47:29 +08:00
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-22 16:14:55 +08:00
|
|
|
|
getYearPXData = () => {
|
|
|
|
|
|
const orgId = storage('lacal').getItem('webOrgId')?.val;
|
|
|
|
|
|
const json = initFilter(orgId);
|
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'BI/BIHeadSE/SEtrInfo',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
trainingData: {
|
|
|
|
|
|
listNAME: ret.listNAME || [],
|
|
|
|
|
|
YearCount: ret.YearCount || [],
|
|
|
|
|
|
MonthRecordCount: ret.MonthRecordCount || [],
|
|
|
|
|
|
MonthPersonCount: ret.MonthPersonCount || [],
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
// 获取安全培训页面数据
|
|
|
|
|
|
getHomeSESubYearData = () => {
|
|
|
|
|
|
const orgId = storage('lacal').getItem('webOrgId')?.val;
|
|
|
|
|
|
const json = initFilter(orgId);
|
|
|
|
|
|
const currentYear = new Date().getFullYear(); // 获取当前年份
|
|
|
|
|
|
json.Parameter1 = currentYear.toString(); // 设置为当前年份
|
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'BI/BIHeadSE/HomeSESubYear',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
// ret 是数组格式: [{ CName: "邦泰", PCount: 0, RCount: 13 }, ...]
|
|
|
|
|
|
const listNAME = ret.map((item) => item.CName);
|
|
|
|
|
|
const MonthPersonCount = ret.map((item) => item.PCount); // 培训人次
|
|
|
|
|
|
const MonthRecordCount = ret.map((item) => item.RCount); // 培训场次
|
|
|
|
|
|
// YearCount 暂时用 PCount 的总和或保持为空数组
|
|
|
|
|
|
const YearCount = ret.map((item) => item.PCount);
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
trainingSubData: {
|
|
|
|
|
|
listNAME: listNAME,
|
|
|
|
|
|
YearCount: YearCount,
|
|
|
|
|
|
MonthRecordCount: MonthRecordCount,
|
|
|
|
|
|
MonthPersonCount: MonthPersonCount,
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
// 新增:处理月份变化
|
|
|
|
|
|
handleMonthChange = (month) => {
|
|
|
|
|
|
this.setState({ selectedMonth: month }, () => {
|
|
|
|
|
|
// 重新获取月份数据
|
|
|
|
|
|
this.getHomeSESubYearMonthData();
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-23 11:29:34 +08:00
|
|
|
|
handleCompanyChange = (company) => {
|
|
|
|
|
|
console.log(company, '11111');
|
|
|
|
|
|
this.setState({ selectedCompany: company }, () => {
|
|
|
|
|
|
// 重新获取月份数据
|
|
|
|
|
|
this.getBSTypeMonthData();
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// 获取安全培训页面数据
|
|
|
|
|
|
getHomeSESubYearMonthData = () => {
|
|
|
|
|
|
const orgId = storage('lacal').getItem('webOrgId')?.val;
|
|
|
|
|
|
const json = initFilter(orgId);
|
|
|
|
|
|
const currentYear = new Date().getFullYear(); // 获取当前年份
|
|
|
|
|
|
json.Parameter1 = currentYear.toString(); // 设置为当前年份
|
|
|
|
|
|
json.Parameter2 = this.state.selectedMonth.toString(); // 月份
|
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'BI/BIHeadSE/HomeSESubYear',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
// ret 是数组格式: [{ CName: "邦泰", PCount: 0, RCount: 13 }, ...]
|
|
|
|
|
|
const listNAME = ret.map((item) => item.CName);
|
|
|
|
|
|
const MonthPersonCount = ret.map((item) => item.PCount); // 培训人次
|
|
|
|
|
|
const MonthRecordCount = ret.map((item) => item.RCount); // 培训场次
|
|
|
|
|
|
// YearCount 暂时用 PCount 的总和或保持为空数组
|
|
|
|
|
|
const YearCount = ret.map((item) => item.PCount);
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
trainingSubDataMonth: {
|
|
|
|
|
|
listNAME: listNAME,
|
|
|
|
|
|
YearCount: YearCount,
|
|
|
|
|
|
MonthRecordCount: MonthRecordCount,
|
|
|
|
|
|
MonthPersonCount: MonthPersonCount,
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-23 09:13:20 +08:00
|
|
|
|
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; // 设置为当前日期
|
2026-04-23 11:29:34 +08:00
|
|
|
|
json.Parameter2 = this.state.selectedCompany.toString(); // 月份
|
2026-04-23 09:13:20 +08:00
|
|
|
|
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; // 设置为当前日期
|
2026-04-23 11:29:34 +08:00
|
|
|
|
json.Parameter2 = this.state.selectedCompany;
|
2026-04-23 09:13:20 +08:00
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'BI/BIHeadSE/SubTypeMonth',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
trainingSubBSType: ret,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-23 11:29:34 +08:00
|
|
|
|
getCompanyData = () => {
|
|
|
|
|
|
const orgId = storage('lacal').getItem('webOrgId')?.val;
|
|
|
|
|
|
const json = initFilter(orgId);
|
|
|
|
|
|
this.props.dispatch({
|
|
|
|
|
|
type: 'app/getDataByPost',
|
|
|
|
|
|
payload: json,
|
|
|
|
|
|
url: 'FM/Organization/OrderPaged',
|
|
|
|
|
|
onComplete: (ret) => {
|
|
|
|
|
|
if (ret && !this.isUnmounted) {
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
companyData: ret,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
renderOtherTabContent = () => {
|
2026-04-23 11:29:34 +08:00
|
|
|
|
const {
|
|
|
|
|
|
activeTab,
|
|
|
|
|
|
trainingData,
|
|
|
|
|
|
trainingSubData,
|
|
|
|
|
|
trainingSubDataMonth,
|
|
|
|
|
|
selectedMonth,
|
|
|
|
|
|
selectedCompany,
|
|
|
|
|
|
trainingSubBSType,
|
|
|
|
|
|
companyData,
|
|
|
|
|
|
} = this.state;
|
2026-04-22 16:14:55 +08:00
|
|
|
|
// 如果是安全培训,显示专门的培训页面
|
|
|
|
|
|
if (activeTab === '安全培训') {
|
|
|
|
|
|
return (
|
|
|
|
|
|
<TrainingContent
|
|
|
|
|
|
trainingData={trainingData}
|
|
|
|
|
|
trainingSubData={trainingSubData}
|
2026-04-23 11:29:34 +08:00
|
|
|
|
trainingSubBSType={trainingSubBSType}
|
|
|
|
|
|
companyData={companyData}
|
2026-04-22 16:14:55 +08:00
|
|
|
|
trainingSubDataMonth={trainingSubDataMonth}
|
|
|
|
|
|
selectedMonth={selectedMonth}
|
2026-04-23 11:29:34 +08:00
|
|
|
|
selectedCompany={selectedCompany}
|
2026-04-22 16:14:55 +08:00
|
|
|
|
onMonthChange={this.handleMonthChange}
|
2026-04-23 11:29:34 +08:00
|
|
|
|
onCompanyChange={this.handleCompanyChange}
|
2026-04-22 16:14:55 +08:00
|
|
|
|
/>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2026-04-22 13:47:29 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<div className={styles.otherTabContent}>
|
|
|
|
|
|
<div style={{ textAlign: 'center', color: '#fff' }}>
|
|
|
|
|
|
<div style={{ fontSize: '32px', fontWeight: 'bold', marginBottom: '20px' }}>{activeTab} 页面</div>
|
|
|
|
|
|
<div style={{ fontSize: '18px', opacity: 0.8 }}>这里是 {activeTab} 的内容展示区域</div>
|
|
|
|
|
|
<div style={{ marginTop: '30px', fontSize: '16px', opacity: 0.6 }}>请根据实际需求替换此内容</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
2026-01-19 08:56:29 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
const width = 1920,
|
2026-01-26 09:12:04 +08:00
|
|
|
|
height = 1080;
|
2026-04-22 13:47:29 +08:00
|
|
|
|
const {
|
|
|
|
|
|
scale,
|
|
|
|
|
|
activeTab,
|
|
|
|
|
|
riskTypeRate,
|
|
|
|
|
|
riskTotal,
|
|
|
|
|
|
jobTodayTop3,
|
|
|
|
|
|
linkSum,
|
|
|
|
|
|
taskTop3,
|
|
|
|
|
|
mediaList,
|
|
|
|
|
|
announcementList,
|
|
|
|
|
|
currentMediaIndex,
|
2026-04-22 16:14:55 +08:00
|
|
|
|
trainingData,
|
2026-04-22 13:47:29 +08:00
|
|
|
|
} = this.state;
|
2026-01-19 08:56:29 +08:00
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<div className={styles.box} style={{ transform: `scale(${scale}) translate(-50%, -50%)`, width, height }}>
|
|
|
|
|
|
<div className={styles.blackBack}>
|
|
|
|
|
|
<div className={styles.backImage}>
|
|
|
|
|
|
{/* 头部 */}
|
|
|
|
|
|
<div className={styles.header}>
|
|
|
|
|
|
<Row style={{ width: '100%', height: '100%', display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Col span={9} style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<img src={logo} alt="logo" style={{ height: '50px', marginLeft: '50px' }} />
|
|
|
|
|
|
<div style={{ display: 'flex', marginLeft: 'auto' }}>
|
|
|
|
|
|
{this.state.configBanner.slice(0, 3).map((item, index) => (
|
2026-01-19 08:56:29 +08:00
|
|
|
|
<div
|
2026-04-22 13:47:29 +08:00
|
|
|
|
key={index}
|
|
|
|
|
|
className={`${styles.configBanners} ${activeTab === item ? styles.active : ''}`}
|
|
|
|
|
|
onClick={() => this.handleTabClick(item)}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
{item}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
))}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
<Col span={6} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
|
|
|
|
<div className={styles.headerText}>金源公司安全生产管控平台</div>
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</Col>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
<Col span={9} style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end' }}>
|
|
|
|
|
|
<div style={{ display: 'flex' }}>
|
|
|
|
|
|
{this.state.configBanner.slice(3, 6).map((item, index) => (
|
2026-01-19 08:56:29 +08:00
|
|
|
|
<div
|
2026-04-22 13:47:29 +08:00
|
|
|
|
key={index}
|
|
|
|
|
|
className={`${styles.configBanners} ${activeTab === item ? styles.active : ''}`}
|
|
|
|
|
|
onClick={() => this.handleTabClick(item)}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
{item}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
))}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
<Icon
|
|
|
|
|
|
type={document.fullscreenElement ? 'fullscreen-exit' : 'fullscreen'}
|
|
|
|
|
|
style={{ fontSize: '26px', color: '#000', cursor: 'pointer', margin: '0 20px' }}
|
|
|
|
|
|
onClick={this.toggleFullscreen}
|
|
|
|
|
|
/>
|
|
|
|
|
|
<div style={{ color: '#000', fontSize: '14px', marginRight: '20px', fontWeight: 'bold' }}>
|
|
|
|
|
|
{this.state.nowDate}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-04-22 13:47:29 +08:00
|
|
|
|
{/* 内容区域 */}
|
|
|
|
|
|
{activeTab === '首页' ? (
|
|
|
|
|
|
<HomeContent
|
|
|
|
|
|
riskTypeRate={riskTypeRate}
|
|
|
|
|
|
riskTotal={riskTotal}
|
|
|
|
|
|
jobTodayTop3={jobTodayTop3}
|
|
|
|
|
|
linkSum={linkSum}
|
|
|
|
|
|
taskTop3={taskTop3}
|
|
|
|
|
|
mediaList={mediaList}
|
|
|
|
|
|
announcementList={announcementList}
|
|
|
|
|
|
currentMediaIndex={currentMediaIndex}
|
|
|
|
|
|
onCarouselChange={this.handleCarouselChange}
|
|
|
|
|
|
onDotClick={this.handleDotClick}
|
2026-04-22 16:14:55 +08:00
|
|
|
|
trainingData={trainingData} // 新增传递
|
2026-04-22 13:47:29 +08:00
|
|
|
|
/>
|
|
|
|
|
|
) : (
|
|
|
|
|
|
this.renderOtherTabContent()
|
|
|
|
|
|
)}
|
2026-01-19 08:56:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-04-22 13:47:29 +08:00
|
|
|
|
</div>
|
2026-01-19 08:56:29 +08:00
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default withRouter(connect(({ login }) => ({ login }))(FullScreen));
|