Compare commits

..

No commits in common. "f638f50b154bbb85e3fd39a23573889bc209a745" and "53a1d9ddf6343aa980925d2afcb2b94d23301350" have entirely different histories.

6 changed files with 524 additions and 2756 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

View File

@ -532,7 +532,7 @@ function Header(props) {
<PictureThumb <PictureThumb
thumbCodes={thumbCode ? [thumbCode] : []} thumbCodes={thumbCode ? [thumbCode] : []}
thumbConfigs={[{ target: thumbCode }]} thumbConfigs={[{ target: thumbCode }]}
defaultThumb={require("../assets/layout/headerno-logo-new.png")} defaultThumb={require("../assets/layout/header-logo.png")}
className="header__left-logo" className="header__left-logo"
/> />
{isMobile ? ( {isMobile ? (

File diff suppressed because it is too large Load Diff

View File

@ -100,9 +100,6 @@ class Home extends React.Component {
standardScoreNaN: [], standardScoreNaN: [],
visible: false, visible: false,
safetySloganOne: "", safetySloganOne: "",
animationDuration: 20,
sliderColor:'#de4e58',
sliderSize:'24px',
safetySloganTwo: "", safetySloganTwo: "",
noticeTitle: "", noticeTitle: "",
tmpData: {}, tmpData: {},
@ -210,10 +207,6 @@ class Home extends React.Component {
} }
componentDidMount() { componentDidMount() {
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
this.props.history.replace('/grouphome')
// props.history.push({ pathname: "/grouphome" });
}
if (window.navigator.userAgent.indexOf("Windows") < 1) { if (window.navigator.userAgent.indexOf("Windows") < 1) {
window.location.replace(config.guideH5Host); window.location.replace(config.guideH5Host);
openNotificationMobile("bottomRight"); openNotificationMobile("bottomRight");
@ -266,7 +259,6 @@ class Home extends React.Component {
}, },
]; ];
this.getTeam(); this.getTeam();
this.getHomeTitle()
//定时器功能,暂时不开启 //定时器功能,暂时不开启
this.timerID = setInterval( this.timerID = setInterval(
() => this.getBaseInfoData(1, this.state.tableKey, 5), () => this.getBaseInfoData(1, this.state.tableKey, 5),
@ -506,31 +498,46 @@ class Home extends React.Component {
}, },
}); });
}; };
getHomeTitle = () => {
var orgId = storage("lacal").getItem("webOrgId")?.val; //登录后有存储登录信息
let json = initFilter(orgId);
this.props.dispatch({
type: "app/getDataByPost",
payload: json,
url: "PF/HomeTitle/OrderPaged",
onComplete: (ret) => {
if (ret) {
this.setState({
safetySloganOne: ret[0].TITLE,
// safetySloganOne: "1.安全方针:以人为本、关注健康、依法治企、安全发展。 2.安全理念一切风险皆可控一切事故皆可防3.安全方针以人为本、关注健康、依法治企、安全发展。4.安全方针以人为本、关注健康、依法治企、安全发展。5.安全方针:以人为本、关注健康、依法治企、安全发展。 6.安全理念一切风险皆可控一切事故皆可防7.安全方针以人为本、关注健康、依法治企、安全发展。8.安全方针:以人为本、关注健康、依法治企、安全发展。",
animationDuration: ret[0].SECOND,
sliderColor:ret[0].COCOR,
sliderSize:ret[0].FONTSIZE
});
}
},
});
}
getTeam = () => { getTeam = () => {
var userId = storage("lacal").getItem("userid")?.val; //登录后有存储登录信息 var userId = storage("lacal").getItem("userid")?.val; //登录后有存储登录信息
var orgId = storage("lacal").getItem("webOrgId")?.val; //登录后有存储登录信息 var orgId = storage("lacal").getItem("webOrgId")?.val; //登录后有存储登录信息
// 龙岩稀土
if (orgId == "8f1cf418-8bf3-ea3f-7a6d-fc5d61247008") {
this.setState({
safetySloganOne: "安全方针:以人为本、关注健康、依法治企、安全发展。",
});
}
// 都昌金鼎
else if (orgId == "8b3c41aa-51b1-7ce9-1879-248a038c1b5c") {
this.setState({
safetySloganOne: "安全方针:安全第一,预防为主,科学管理,持续改进。",
mineType: localStorage.getItem("currentMineType")
});
}
//洛阳豫璐
else if (orgId == "d9871ba8-0eec-9e4a-bb87-7d5a540d8913") {
this.setState({
safetySloganOne: "安全方针:科技、安全、环保、效益。",
});
}
//博柏
else if (orgId == "3efd5276-632b-e379-9ff3-7a7546591fca") {
this.setState({
safetySloganOne: "安全方针:安全第一、综合治理、控制风险、科学发展",
mineType: localStorage.getItem("currentMineType")
});
}
//行洛坑
else {
this.setState({
safetySloganOne: "安全方针:安全第一、综合治理、控制风险、科学发展",
mineType: localStorage.getItem("currentMineType")
});
}
this.setState({
safetySloganTwo: "安全理念:一切风险皆可控,一切事故皆可防!",
});
let json = initFilter(orgId); let json = initFilter(orgId);
extendRule(json, "ID", 1, userId); extendRule(json, "ID", 1, userId);
extendInclude(json, "Nav_Department"); extendInclude(json, "Nav_Department");
@ -1440,9 +1447,6 @@ class Home extends React.Component {
className: styles.slideHeight, className: styles.slideHeight,
fade: true, fade: true,
}; };
// 在render方法中添加动态样式计算
const { safetySloganOne, animationDuration,sliderColor,sliderSize } = this.state;
const rowSelection = { const rowSelection = {
onChange: (selectedRowKeys, selectedRows) => { onChange: (selectedRowKeys, selectedRows) => {
this.state.taskSelects = selectedRows; this.state.taskSelects = selectedRows;
@ -1601,16 +1605,11 @@ class Home extends React.Component {
<div className="slide-icon-style"> <div className="slide-icon-style">
<Icon type="sound" style={{ fontSize: "28px" }}></Icon> <Icon type="sound" style={{ fontSize: "28px" }}></Icon>
</div> </div>
<div <div className="slide-style">
className="slide-style"
style={{
'--animation-duration': `${animationDuration}s`, // 动态设置动画时长
'--slider-color': `${sliderColor}`, // 动态设置颜色
'--slider-size': `${sliderSize}px`, // 动态设置颜色
}}
>
<p className="slide-text-style"> <p className="slide-text-style">
{safetySloganOne || '暂无公告'} {this.state.safetySloganOne}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{this.state.safetySloganTwo}
</p> </p>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff