Compare commits
2 Commits
53a1d9ddf6
...
f638f50b15
| Author | SHA1 | Date | |
|---|---|---|---|
| f638f50b15 | |||
| 3ece07fc4f |
BIN
src/assets/layout/header-logo-new.jpg
Normal file
BIN
src/assets/layout/header-logo-new.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
BIN
src/assets/layout/headerno-logo-new.png
Normal file
BIN
src/assets/layout/headerno-logo-new.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 195 KiB |
@ -532,7 +532,7 @@ function Header(props) {
|
||||
<PictureThumb
|
||||
thumbCodes={thumbCode ? [thumbCode] : []}
|
||||
thumbConfigs={[{ target: thumbCode }]}
|
||||
defaultThumb={require("../assets/layout/header-logo.png")}
|
||||
defaultThumb={require("../assets/layout/headerno-logo-new.png")}
|
||||
className="header__left-logo"
|
||||
/>
|
||||
{isMobile ? (
|
||||
|
||||
2168
src/routes/GroupHome.js
Normal file
2168
src/routes/GroupHome.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -100,6 +100,9 @@ class Home extends React.Component {
|
||||
standardScoreNaN: [],
|
||||
visible: false,
|
||||
safetySloganOne: "",
|
||||
animationDuration: 20,
|
||||
sliderColor:'#de4e58',
|
||||
sliderSize:'24px',
|
||||
safetySloganTwo: "",
|
||||
noticeTitle: "",
|
||||
tmpData: {},
|
||||
@ -207,6 +210,10 @@ class Home extends React.Component {
|
||||
}
|
||||
|
||||
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) {
|
||||
window.location.replace(config.guideH5Host);
|
||||
openNotificationMobile("bottomRight");
|
||||
@ -259,6 +266,7 @@ class Home extends React.Component {
|
||||
},
|
||||
];
|
||||
this.getTeam();
|
||||
this.getHomeTitle()
|
||||
//定时器功能,暂时不开启
|
||||
this.timerID = setInterval(
|
||||
() => this.getBaseInfoData(1, this.state.tableKey, 5),
|
||||
@ -498,46 +506,31 @@ 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 = () => {
|
||||
var userId = storage("lacal").getItem("userid")?.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);
|
||||
extendRule(json, "ID", 1, userId);
|
||||
extendInclude(json, "Nav_Department");
|
||||
@ -1447,6 +1440,9 @@ class Home extends React.Component {
|
||||
className: styles.slideHeight,
|
||||
fade: true,
|
||||
};
|
||||
// 在render方法中添加动态样式计算
|
||||
const { safetySloganOne, animationDuration,sliderColor,sliderSize } = this.state;
|
||||
|
||||
const rowSelection = {
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
this.state.taskSelects = selectedRows;
|
||||
@ -1605,11 +1601,16 @@ class Home extends React.Component {
|
||||
<div className="slide-icon-style">
|
||||
<Icon type="sound" style={{ fontSize: "28px" }}></Icon>
|
||||
</div>
|
||||
<div className="slide-style">
|
||||
<div
|
||||
className="slide-style"
|
||||
style={{
|
||||
'--animation-duration': `${animationDuration}s`, // 动态设置动画时长
|
||||
'--slider-color': `${sliderColor}`, // 动态设置颜色
|
||||
'--slider-size': `${sliderSize}px`, // 动态设置颜色
|
||||
}}
|
||||
>
|
||||
<p className="slide-text-style">
|
||||
{this.state.safetySloganOne}
|
||||
|
||||
{this.state.safetySloganTwo}
|
||||
{safetySloganOne || '暂无公告'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user