1
This commit is contained in:
parent
9de4b8d6f9
commit
67303aa596
@ -44,6 +44,10 @@ class FullScreen extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
safetySloganOne: "",
|
||||||
|
animationDuration: 20,
|
||||||
|
sliderColor: '#de4e58',
|
||||||
|
sliderSize: '24px',
|
||||||
screenWidh: window.screen.width > 2000 ? true : false,
|
screenWidh: window.screen.width > 2000 ? true : false,
|
||||||
nowDate: "",
|
nowDate: "",
|
||||||
checkData: [
|
checkData: [
|
||||||
@ -268,7 +272,7 @@ class FullScreen extends React.Component {
|
|||||||
// nowDate:this.getDate()
|
// nowDate:this.getDate()
|
||||||
// })
|
// })
|
||||||
// },1000)
|
// },1000)
|
||||||
|
this.getHomeTitle()
|
||||||
this.completeChart(this.state.completeData);
|
this.completeChart(this.state.completeData);
|
||||||
// this.completeChart(this.state.completeDatatwo);
|
// this.completeChart(this.state.completeDatatwo);
|
||||||
// this.completeChart(this.state.completeDatathree);
|
// this.completeChart(this.state.completeDatathree);
|
||||||
@ -296,6 +300,27 @@ class FullScreen extends React.Component {
|
|||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
}
|
}
|
||||||
|
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 (this._isMounted&&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
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
getDate = () => {
|
getDate = () => {
|
||||||
var myDate = new Date();
|
var myDate = new Date();
|
||||||
var year = myDate.getFullYear(); //获取当前年
|
var year = myDate.getFullYear(); //获取当前年
|
||||||
@ -923,6 +948,7 @@ class FullScreen extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { safetySloganOne, animationDuration, sliderColor, sliderSize } = this.state;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FullScreenContainer>
|
<FullScreenContainer>
|
||||||
@ -958,12 +984,14 @@ class FullScreen extends React.Component {
|
|||||||
></img>
|
></img>
|
||||||
<div
|
<div
|
||||||
className="slide-style"
|
className="slide-style"
|
||||||
style={{ color: "#fff", fontSize: "18px" }}
|
style={{
|
||||||
|
'--animation-duration': `${animationDuration}s`, // 动态设置动画时长
|
||||||
|
'--slider-color': `${sliderColor}`, // 动态设置颜色
|
||||||
|
'--slider-size': `${sliderSize}px`, // 动态设置颜色
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<p className="slide-text-style">
|
<p className="slide-text-style">
|
||||||
安全方针:安全第一、综合治理、控制风险、科学发展
|
{safetySloganOne || '暂无公告'}
|
||||||
|
|
||||||
安全理念:一切风险皆可控,一切事故皆可防!
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -554,8 +554,8 @@ function Header(props) {
|
|||||||
{!props.matchLogin ? (
|
{!props.matchLogin ? (
|
||||||
<div className="header__right">
|
<div className="header__right">
|
||||||
{/* <RiskFourColor/> */}
|
{/* <RiskFourColor/> */}
|
||||||
{/* <FullScreen /> */}
|
<FullScreen />
|
||||||
{window.location.host == "121.41.2.71:8001" ? <FullScreen /> : ""}
|
{/* {window.location.host == "121.41.2.71:8001" ? <FullScreen /> : ""} */}
|
||||||
<GuideCode />
|
<GuideCode />
|
||||||
<HeaderNav />
|
<HeaderNav />
|
||||||
<HeaderDataV />
|
<HeaderDataV />
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
MenuUnfoldOutlined,
|
MenuUnfoldOutlined,
|
||||||
MenuFoldOutlined,
|
MenuFoldOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Divider, Menu, Switch, Icon, Button } from "antd";
|
import { Divider, Menu, Switch, Icon, Button, Modal } from "antd";
|
||||||
import { connect } from "dva";
|
import { connect } from "dva";
|
||||||
import { withRouter, matchPath } from "dva/router";
|
import { withRouter, matchPath } from "dva/router";
|
||||||
import { Scrollbars } from "react-custom-scrollbars";
|
import { Scrollbars } from "react-custom-scrollbars";
|
||||||
@ -17,6 +17,12 @@ import { $consts } from "../plugins";
|
|||||||
import "./sider.less";
|
import "./sider.less";
|
||||||
import MenuItem from "antd/lib/menu/MenuItem";
|
import MenuItem from "antd/lib/menu/MenuItem";
|
||||||
import SubMenu from "antd/lib/menu/SubMenu";
|
import SubMenu from "antd/lib/menu/SubMenu";
|
||||||
|
import FullScreenPage from "./FullScreen";
|
||||||
|
import {
|
||||||
|
requestFullScreenMethod,
|
||||||
|
} from "../utils/common";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Sider = (props) => {
|
const Sider = (props) => {
|
||||||
@ -41,12 +47,56 @@ const Sider = (props) => {
|
|||||||
data[menuId] ? (data[menuId] = "") : (data[menuId] = menuId);
|
data[menuId] ? (data[menuId] = "") : (data[menuId] = menuId);
|
||||||
setMenuShrink(data);
|
setMenuShrink(data);
|
||||||
};
|
};
|
||||||
|
const [showModal, setshowModal] = useState(false);
|
||||||
|
const escFunction = () => {
|
||||||
|
let isFull = !!(
|
||||||
|
document.fullscreen ||
|
||||||
|
document.mozFullScreen ||
|
||||||
|
document.webkitIsFullScreen ||
|
||||||
|
document.webkitFullScreen ||
|
||||||
|
document.msFullScreen
|
||||||
|
);
|
||||||
|
if (isFull) {
|
||||||
|
// /
|
||||||
|
} else {
|
||||||
|
// requestFullScreenMethod(document.body);
|
||||||
|
setshowModal(false);
|
||||||
|
setActiveMenu(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
useEffect(() => {
|
||||||
|
// 监听退出全屏事件 --- chrome 用 esc 退出全屏并不会触发 keyup 事件
|
||||||
|
document.addEventListener(
|
||||||
|
"webkitfullscreenchange",
|
||||||
|
escFunction
|
||||||
|
); /* Chrome, Safari and Opera */
|
||||||
|
document.addEventListener("mozfullscreenchange", escFunction); /* Firefox */
|
||||||
|
document.addEventListener(
|
||||||
|
"fullscreenchange",
|
||||||
|
escFunction
|
||||||
|
); /* Standard syntax */
|
||||||
|
document.addEventListener(
|
||||||
|
"msfullscreenchange",
|
||||||
|
escFunction
|
||||||
|
); /* IE / Edge */
|
||||||
|
return () => {
|
||||||
|
//销毁时清除监听
|
||||||
|
document.removeEventListener("webkitfullscreenchange", escFunction);
|
||||||
|
document.removeEventListener("mozfullscreenchange", escFunction);
|
||||||
|
document.removeEventListener("fullscreenchange", escFunction);
|
||||||
|
document.removeEventListener("MSFullscreenChange", escFunction);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
/** 回到首页 */
|
/** 回到首页 */
|
||||||
const navToHome = () => {
|
const navToHome = () => {
|
||||||
setActiveMenu(null);
|
setActiveMenu(null);
|
||||||
props.history.push({ pathname: "/home" });
|
props.history.push({ pathname: "/home" });
|
||||||
};
|
};
|
||||||
|
const navToLarge = () => {
|
||||||
|
setActiveMenu('largeScreen');
|
||||||
|
setshowModal(true);
|
||||||
|
requestFullScreenMethod(document.body);
|
||||||
|
}
|
||||||
const clickMenu = () => {
|
const clickMenu = () => {
|
||||||
collapsed === true ? setCollapsed(false) : setCollapsed(false)
|
collapsed === true ? setCollapsed(false) : setCollapsed(false)
|
||||||
|
|
||||||
@ -172,6 +222,21 @@ const clickMenu = ()=>{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`sider ${"shortMenuShow"}`}>
|
<div className={`sider ${"shortMenuShow"}`}>
|
||||||
|
<Modal
|
||||||
|
title="功能导航"
|
||||||
|
visible={showModal}
|
||||||
|
width="100%"
|
||||||
|
centered={true}
|
||||||
|
onOk={() => {
|
||||||
|
setshowModal(false);
|
||||||
|
}}
|
||||||
|
onCancel={() => {
|
||||||
|
setshowModal(false);
|
||||||
|
}}
|
||||||
|
className="fullScreen"
|
||||||
|
>
|
||||||
|
<FullScreenPage />
|
||||||
|
</Modal>
|
||||||
<div className={`sider ${"shortMenuShow_overflow"}`}>
|
<div className={`sider ${"shortMenuShow_overflow"}`}>
|
||||||
<Menu
|
<Menu
|
||||||
mode="inline"
|
mode="inline"
|
||||||
@ -185,7 +250,7 @@ const clickMenu = ()=>{
|
|||||||
inlineIndent="16"
|
inlineIndent="16"
|
||||||
onClick={clickMenu}
|
onClick={clickMenu}
|
||||||
>
|
>
|
||||||
<MenuItem key="1" onClick={navToHome} title={'首页'}>
|
<MenuItem key="home" onClick={navToHome} title={'首页'}>
|
||||||
{/* <img
|
{/* <img
|
||||||
src={require("../assets/layout/menu-all.png")}
|
src={require("../assets/layout/menu-all.png")}
|
||||||
alt=""
|
alt=""
|
||||||
@ -194,6 +259,15 @@ const clickMenu = ()=>{
|
|||||||
<Icon type="home"></Icon>
|
<Icon type="home"></Icon>
|
||||||
<span>首页</span>
|
<span>首页</span>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem key="largeScreen" onClick={navToLarge} title={'可视化大屏'} >
|
||||||
|
{/* <img
|
||||||
|
src={require("../assets/layout/menu-all.png")}
|
||||||
|
alt=""
|
||||||
|
className="sider__menuAll-icon"
|
||||||
|
/> */}
|
||||||
|
<Icon type="alert"></Icon>
|
||||||
|
<span>可视化大屏</span>
|
||||||
|
</MenuItem>
|
||||||
<SubMenu
|
<SubMenu
|
||||||
key="sub1"
|
key="sub1"
|
||||||
title={
|
title={
|
||||||
|
|||||||
@ -7,6 +7,10 @@ export default [
|
|||||||
name: 'HOME',
|
name: 'HOME',
|
||||||
value: '/home'
|
value: '/home'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'GROUPHOME',
|
||||||
|
value: '/grouphome'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'MAIN',
|
name: 'MAIN',
|
||||||
value: '/main/:menuId'
|
value: '/main/:menuId'
|
||||||
|
|||||||
@ -88,9 +88,16 @@ const contentStyle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class GroupHome extends React.Component {
|
class GroupHome extends React.Component {
|
||||||
|
_isMounted = false; // 标记组件是否已挂载
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
noticeData: [], // 公告列表数据
|
||||||
|
currentNoticePage: 1, // 当前公告页码
|
||||||
|
noticePageSize: 4, // 每页公告数量(与图片一致,默认显示4条)
|
||||||
|
totalNoticeCount: 0, // 公告总数量
|
||||||
|
activeNoticeTab: "all", // 活跃公告标签(全部/集团发布/公司发布,参考图片)
|
||||||
isNaN: false,
|
isNaN: false,
|
||||||
scoreVisible: false,
|
scoreVisible: false,
|
||||||
scoreTotalVisible: false,
|
scoreTotalVisible: false,
|
||||||
@ -110,8 +117,8 @@ class GroupHome extends React.Component {
|
|||||||
pagination: {},
|
pagination: {},
|
||||||
retData: [],
|
retData: [],
|
||||||
chartData: [],
|
chartData: [],
|
||||||
displayStr: null,
|
displayStr: '',
|
||||||
displayNum: 24,
|
displayNum: 16,
|
||||||
columnData: [],
|
columnData: [],
|
||||||
columnFields: [],
|
columnFields: [],
|
||||||
delayData: [],
|
delayData: [],
|
||||||
@ -210,22 +217,22 @@ class GroupHome extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (localStorage.getItem("webOrgId") !== '00300000-0000-0000-0000-000000000000') {
|
this._isMounted = true; // 组件挂载时设为true
|
||||||
history.replace('/home')
|
const currentPath = this.props.location.pathname;
|
||||||
|
console.log(currentPath, '999')
|
||||||
|
if (localStorage.getItem("webOrgId") !== '00300000-0000-0000-0000-000000000000' && currentPath !== '/home') {
|
||||||
|
this.props.history.replace('/home')
|
||||||
|
return
|
||||||
// props.history.push({ pathname: "/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");
|
||||||
this.state.displayStr = "none";
|
return; // 阻止后续代码执行
|
||||||
this.state.displayNum = 24;
|
|
||||||
//alert('手机');
|
//alert('手机');
|
||||||
} else {
|
|
||||||
this.state.displayStr = "";
|
|
||||||
this.state.displayNum = 16;
|
|
||||||
//alert('PC');
|
|
||||||
}
|
}
|
||||||
this.state.columns = [
|
this.setState({
|
||||||
|
columns: [
|
||||||
{
|
{
|
||||||
width: "450px",
|
width: "450px",
|
||||||
title: "任务名称",
|
title: "任务名称",
|
||||||
@ -264,19 +271,8 @@ class GroupHome extends React.Component {
|
|||||||
key: "NOTICE_TYPE",
|
key: "NOTICE_TYPE",
|
||||||
render: (text, record) => this.ShowState(record),
|
render: (text, record) => this.ShowState(record),
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
this.getTeam();
|
scoreNoneColumns: [{
|
||||||
this.getHomeTitle()
|
|
||||||
//定时器功能,暂时不开启
|
|
||||||
this.timerID = setInterval(
|
|
||||||
() => this.getBaseInfoData(1, this.state.tableKey, 5),
|
|
||||||
120000
|
|
||||||
);
|
|
||||||
this.showModalSign();
|
|
||||||
this.getBaseInfoData(1, 1, 5);
|
|
||||||
this.setMessageData();
|
|
||||||
this.state.scoreNoneColumns = [
|
|
||||||
{
|
|
||||||
width: "80px",
|
width: "80px",
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
dataIndex: "Nav_ProductionUnit.NAME",
|
dataIndex: "Nav_ProductionUnit.NAME",
|
||||||
@ -344,9 +340,8 @@ class GroupHome extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
}],
|
||||||
];
|
scoreColumns: [
|
||||||
this.state.scoreColumns = [
|
|
||||||
{
|
{
|
||||||
width: "80px",
|
width: "80px",
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
@ -450,8 +445,8 @@ class GroupHome extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
this.state.scoreTotalColumns = [
|
scoreTotalColumns: [
|
||||||
{
|
{
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
dataIndex: "Nav_ProductionUnit.NAME",
|
dataIndex: "Nav_ProductionUnit.NAME",
|
||||||
@ -482,11 +477,142 @@ class GroupHome extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
]
|
||||||
|
})
|
||||||
|
this.getTeam();
|
||||||
|
this.getHomeTitle()
|
||||||
|
//定时器功能,暂时不开启
|
||||||
|
this.timerID = setInterval(
|
||||||
|
() => {
|
||||||
|
if (this._isMounted) {
|
||||||
|
this.getBaseInfoData(1, this.state.tableKey, 5)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
120000
|
||||||
|
);
|
||||||
|
this.showModalSign();
|
||||||
|
this.getBaseInfoData(1, 1, 5);
|
||||||
|
this.setMessageData();
|
||||||
|
this.getNoticeData()
|
||||||
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.timerID && clearTimeout(this.timerID);
|
this._isMounted = false; // 组件卸载时设为false
|
||||||
|
if (this.timerID) {
|
||||||
|
clearInterval(this.timerID);
|
||||||
|
this.timerID = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
getNoticeData = () => {
|
||||||
|
const { currentNoticePage, noticePageSize, activeNoticeTab, mineType } = this.state;
|
||||||
|
const orgId = storage("lacal").getItem("webOrgId")?.val;
|
||||||
|
// 构建请求参数(按标签筛选:全部/集团/公司)
|
||||||
|
let json = initFilter(orgId, mineType);
|
||||||
|
extendRule(json, "pageNum", 1, currentNoticePage);
|
||||||
|
extendRule(json, "pageSize", 1, noticePageSize);
|
||||||
|
if (activeNoticeTab === "group") {
|
||||||
|
extendRule(json, "sourceType", 1, 1); // 1=集团发布
|
||||||
|
} else if (activeNoticeTab === "company") {
|
||||||
|
extendRule(json, "sourceType", 1, 2); // 2=公司发布
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
noticeData: [
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
title: "为表彰先进,树立榜样,激励广大员工积极进取,集团决定开展2023年度优秀员工评选工作...",
|
||||||
|
source: "集团发布",
|
||||||
|
date: "08-30",
|
||||||
|
readStatus: "未读", // 可选:未读/已读
|
||||||
|
isImportant: true // 是否重要提醒
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
title: "根据国家法定节假日安排,结合公司实际情况,现将2023年国庆节放假安排通知如下...",
|
||||||
|
source: "公司发布",
|
||||||
|
date: "08-28",
|
||||||
|
readStatus: "已读",
|
||||||
|
isImportant: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "3",
|
||||||
|
title: "根据国家法定节假日安排,结合公司实际情况,现将2023年国庆节放假安排通知如下...",
|
||||||
|
source: "公司发布",
|
||||||
|
date: "08-28",
|
||||||
|
readStatus: "已读",
|
||||||
|
isImportant: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "4",
|
||||||
|
title: "根据国家法定节假日安排,结合公司实际情况,现将2023年国庆节放假安排通知如下...",
|
||||||
|
source: "公司发布",
|
||||||
|
date: "08-28",
|
||||||
|
readStatus: "已读",
|
||||||
|
isImportant: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "5",
|
||||||
|
title: "根据国家法定节假日安排,结合公司实际情况,现将2023年国庆节放假安排通知如下...",
|
||||||
|
source: "公司发布",
|
||||||
|
date: "08-28",
|
||||||
|
readStatus: "已读",
|
||||||
|
isImportant: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "6",
|
||||||
|
title: "根据国家法定节假日安排,结合公司实际情况,现将2023年国庆节放假安排通知如下...",
|
||||||
|
source: "公司发布",
|
||||||
|
date: "08-28",
|
||||||
|
readStatus: "已读",
|
||||||
|
isImportant: false
|
||||||
|
}
|
||||||
|
// 更多公告...
|
||||||
|
],
|
||||||
|
totalNoticeCount: 10 // 公告总数
|
||||||
|
})
|
||||||
|
|
||||||
|
// this.props.dispatch({
|
||||||
|
// type: "app/getDataByPost",
|
||||||
|
// url: "PF/Notice/GetNoticeList", // 假设的公告列表接口,需替换为实际接口
|
||||||
|
// payload: json,
|
||||||
|
// onlyData: false,
|
||||||
|
// onComplete: (data) => {
|
||||||
|
// if (data && data.IsSuccessful) {
|
||||||
|
// this.setState({
|
||||||
|
// noticeData: data.Data.list, // 公告列表
|
||||||
|
// totalNoticeCount: data.Data.total, // 公告总数
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
// 公告页码切换
|
||||||
|
changeNoticePage = (page) => {
|
||||||
|
const { totalNoticeCount, noticePageSize } = this.state;
|
||||||
|
// 边界判断:页码不能小于1,不能大于总页数
|
||||||
|
if (page < 1 || page > Math.ceil(totalNoticeCount / noticePageSize)) return;
|
||||||
|
this.setState({ currentNoticePage: page }, () => {
|
||||||
|
this.getNoticeData(); // 切换页码后重新请求数据
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 公告标签切换(全部/集团发布/公司发布)
|
||||||
|
switchNoticeTab = (tabType) => {
|
||||||
|
this.setState({
|
||||||
|
activeNoticeTab: tabType,
|
||||||
|
currentNoticePage: 1, // 切换标签时重置为第1页
|
||||||
|
}, () => {
|
||||||
|
this.getNoticeData(); // 切换标签后重新请求数据
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查看更多公告(跳转至公告详情页或展开全部)
|
||||||
|
viewMoreNotice = () => {
|
||||||
|
// 逻辑1:跳转至独立公告页面(推荐)
|
||||||
|
this.props.history.push({ pathname: "/noticeList", state: { tab: this.state.activeNoticeTab } });
|
||||||
|
// 逻辑2:在当前页展开全部公告(备选)
|
||||||
|
// this.setState({ noticePageSize: this.state.totalNoticeCount });
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
showModalSign = () => {
|
showModalSign = () => {
|
||||||
var userId = storage("lacal").getItem("userid")?.val; //登录后有存储登录信息
|
var userId = storage("lacal").getItem("userid")?.val; //登录后有存储登录信息
|
||||||
@ -499,7 +625,7 @@ class GroupHome extends React.Component {
|
|||||||
url: "FM/User/UserSign", //验证是否有签名照
|
url: "FM/User/UserSign", //验证是否有签名照
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
//返回查询结果ret
|
//返回查询结果ret
|
||||||
if (ret) {
|
if (this._isMounted && ret) {
|
||||||
//判断是否有记录
|
//判断是否有记录
|
||||||
openNotification("topRight");
|
openNotification("topRight");
|
||||||
}
|
}
|
||||||
@ -514,7 +640,7 @@ class GroupHome extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
url: "PF/HomeTitle/OrderPaged",
|
url: "PF/HomeTitle/OrderPaged",
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (this._isMounted && ret) {
|
||||||
this.setState({
|
this.setState({
|
||||||
safetySloganOne: ret[0].TITLE,
|
safetySloganOne: ret[0].TITLE,
|
||||||
// safetySloganOne: "1.安全方针:以人为本、关注健康、依法治企、安全发展。 2.安全理念:一切风险皆可控,一切事故皆可防!3.安全方针:以人为本、关注健康、依法治企、安全发展。4.安全方针:以人为本、关注健康、依法治企、安全发展。5.安全方针:以人为本、关注健康、依法治企、安全发展。 6.安全理念:一切风险皆可控,一切事故皆可防!7.安全方针:以人为本、关注健康、依法治企、安全发展。8.安全方针:以人为本、关注健康、依法治企、安全发展。",
|
// safetySloganOne: "1.安全方针:以人为本、关注健康、依法治企、安全发展。 2.安全理念:一切风险皆可控,一切事故皆可防!3.安全方针:以人为本、关注健康、依法治企、安全发展。4.安全方针:以人为本、关注健康、依法治企、安全发展。5.安全方针:以人为本、关注健康、依法治企、安全发展。 6.安全理念:一切风险皆可控,一切事故皆可防!7.安全方针:以人为本、关注健康、依法治企、安全发展。8.安全方针:以人为本、关注健康、依法治企、安全发展。",
|
||||||
@ -539,7 +665,7 @@ class GroupHome extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
url: "FM/User/Get",
|
url: "FM/User/Get",
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret && ret.Nav_Department) {
|
if (this._isMounted && ret && ret.Nav_Department) {
|
||||||
this.setState({
|
this.setState({
|
||||||
departmentName: ret.Nav_Department.NAME,
|
departmentName: ret.Nav_Department.NAME,
|
||||||
deparmentType: ret.Nav_Department.DEPARTMENT_TYPE,
|
deparmentType: ret.Nav_Department.DEPARTMENT_TYPE,
|
||||||
@ -723,7 +849,7 @@ class GroupHome extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
onlyData: false,
|
onlyData: false,
|
||||||
onComplete: (re) => {
|
onComplete: (re) => {
|
||||||
if (re && re.IsSuccessful && re.Data.newData) {
|
if (this._isMounted && re && re.IsSuccessful && re.Data.newData) {
|
||||||
this.state.tableData[0].total = re.Data.todoCount;
|
this.state.tableData[0].total = re.Data.todoCount;
|
||||||
this.state.tableData[1].total = re.Data.timeOverCount;
|
this.state.tableData[1].total = re.Data.timeOverCount;
|
||||||
this.state.tableData[2].total = re.Data.doneCount;
|
this.state.tableData[2].total = re.Data.doneCount;
|
||||||
@ -1953,47 +2079,82 @@ class GroupHome extends React.Component {
|
|||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="statistical-title-style">
|
|
||||||
<div className="badge-style">
|
|
||||||
<Icon
|
|
||||||
type="bar-chart"
|
|
||||||
style={{ color: "#5f6ac2", marginRight: "4px" }}
|
|
||||||
></Icon>
|
|
||||||
班组活动完成率
|
|
||||||
</div>
|
|
||||||
{this.state.departmentCompletionData.length > 0 ? (
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
fontSize: "14px",
|
|
||||||
float: "right",
|
|
||||||
marginRight: "16px",
|
|
||||||
marginTop: "4px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
onClick={() => this.showDetailModal("BI001_HOMEDETAIL")}
|
|
||||||
>
|
|
||||||
<IconFont
|
|
||||||
type="icon-24gl-expand2"
|
|
||||||
style={{
|
|
||||||
fontSize: "18px",
|
|
||||||
color: "#333333",
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
></IconFont>
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div style={{ width: "100%", height: "100%" }}>
|
<div style={{ width: "100%", height: "100%" }}>
|
||||||
{this.state.departmentCompletionData.length > 0 ? (
|
|
||||||
<ClassCompletion
|
<div className="notice-board-container">
|
||||||
departmentCompletionData={
|
{/* 公告栏标题栏:标题 + 标签 + 查看更多 */}
|
||||||
this.state.departmentCompletionData
|
<div className="notice-board-header">
|
||||||
}
|
<div className="notice-board-title">
|
||||||
/>
|
公告栏
|
||||||
) : null}
|
{/* 重要提醒标签(参考图片,有重要提醒时显示) */}
|
||||||
|
{this.state.noticeData.some(item => item.isImportant) && (
|
||||||
|
<span className="notice-important-tag">包含{this.state.noticeData.filter(item => item.isImportant).length}个重要提醒</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div style={{whiteSpace: "nowrap"}}>
|
||||||
|
<Button
|
||||||
|
type={this.state.activeNoticeTab === "all" ? "primary" : "default"}
|
||||||
|
size="small"
|
||||||
|
onClick={() => this.switchNoticeTab("all")}
|
||||||
|
style={{ marginRight: 8 }}
|
||||||
|
>
|
||||||
|
全部
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type={this.state.activeNoticeTab === "group" ? "primary" : "default"}
|
||||||
|
size="small"
|
||||||
|
onClick={() => this.switchNoticeTab("group")}
|
||||||
|
style={{ marginRight: 8 }}
|
||||||
|
>
|
||||||
|
集团
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type={this.state.activeNoticeTab === "company" ? "primary" : "default"}
|
||||||
|
size="small"
|
||||||
|
onClick={() => this.switchNoticeTab("company")}
|
||||||
|
>
|
||||||
|
公司
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 公告标签切换(全部/集团发布/公司发布,参考图片) */}
|
||||||
|
|
||||||
|
|
||||||
|
{/* 公告列表 */}
|
||||||
|
<ul className="notice-list">
|
||||||
|
{this.state.noticeData.length > 0 ? (
|
||||||
|
this.state.noticeData.map(notice => (
|
||||||
|
<li
|
||||||
|
key={notice.id}
|
||||||
|
className={`notice-item ${notice.readStatus === "未读" ? "unread" : ""}`}
|
||||||
|
onClick={() => this.viewNoticeDetail(notice.id)} // 点击查看公告详情
|
||||||
|
>
|
||||||
|
<div className="notice-item-content">
|
||||||
|
<span className="notice-item-title">{notice.title}</span>
|
||||||
|
<span className="notice-item-date">{notice.date}</span>
|
||||||
|
</div>
|
||||||
|
<div className="notice-item-source">
|
||||||
|
{notice.source === 1 ? "集团发布" : "公司发布"}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<li style={{ textAlign: "center", padding: "20px 0", color: "#999" }}>
|
||||||
|
暂无公告数据
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div className="notice-pagination">
|
||||||
|
<Button onClick={this.viewMoreNotice} block>查看更多公告</Button>
|
||||||
|
{/* <a className="notice-view-more" onClick={this.viewMoreNotice}> */}
|
||||||
|
{/* 查看更多公告 */}
|
||||||
|
{/* </a> */}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* <Toggle getNum={this.getChildCount}></Toggle> */}
|
{/* <Toggle getNum={this.getChildCount}></Toggle> */}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -88,6 +88,8 @@ const contentStyle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Home extends React.Component {
|
class Home extends React.Component {
|
||||||
|
_isMounted = false; // 标记组件是否已挂载
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -110,8 +112,8 @@ class Home extends React.Component {
|
|||||||
pagination: {},
|
pagination: {},
|
||||||
retData: [],
|
retData: [],
|
||||||
chartData: [],
|
chartData: [],
|
||||||
displayStr: null,
|
displayStr: '',
|
||||||
displayNum: 24,
|
displayNum: 16,
|
||||||
columnData: [],
|
columnData: [],
|
||||||
columnFields: [],
|
columnFields: [],
|
||||||
delayData: [],
|
delayData: [],
|
||||||
@ -210,22 +212,21 @@ class Home extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000') {
|
this._isMounted = true; // 组件挂载时设为true
|
||||||
|
const currentPath = this.props.location.pathname;
|
||||||
|
if (localStorage.getItem("webOrgId") == '00300000-0000-0000-0000-000000000000' && currentPath !== '/grouphome') {
|
||||||
this.props.history.replace('/grouphome')
|
this.props.history.replace('/grouphome')
|
||||||
|
return
|
||||||
// props.history.push({ pathname: "/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");
|
||||||
this.state.displayStr = "none";
|
return; // 阻止后续代码执行
|
||||||
this.state.displayNum = 24;
|
|
||||||
//alert('手机');
|
//alert('手机');
|
||||||
} else {
|
|
||||||
this.state.displayStr = "";
|
|
||||||
this.state.displayNum = 16;
|
|
||||||
//alert('PC');
|
|
||||||
}
|
}
|
||||||
this.state.columns = [
|
this.setState({
|
||||||
|
columns: [
|
||||||
{
|
{
|
||||||
width: "450px",
|
width: "450px",
|
||||||
title: "任务名称",
|
title: "任务名称",
|
||||||
@ -264,19 +265,8 @@ class Home extends React.Component {
|
|||||||
key: "NOTICE_TYPE",
|
key: "NOTICE_TYPE",
|
||||||
render: (text, record) => this.ShowState(record),
|
render: (text, record) => this.ShowState(record),
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
this.getTeam();
|
scoreNoneColumns: [{
|
||||||
this.getHomeTitle()
|
|
||||||
//定时器功能,暂时不开启
|
|
||||||
this.timerID = setInterval(
|
|
||||||
() => this.getBaseInfoData(1, this.state.tableKey, 5),
|
|
||||||
120000
|
|
||||||
);
|
|
||||||
this.showModalSign();
|
|
||||||
this.getBaseInfoData(1, 1, 5);
|
|
||||||
this.setMessageData();
|
|
||||||
this.state.scoreNoneColumns = [
|
|
||||||
{
|
|
||||||
width: "80px",
|
width: "80px",
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
dataIndex: "Nav_ProductionUnit.NAME",
|
dataIndex: "Nav_ProductionUnit.NAME",
|
||||||
@ -344,9 +334,8 @@ class Home extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
}],
|
||||||
];
|
scoreColumns: [
|
||||||
this.state.scoreColumns = [
|
|
||||||
{
|
{
|
||||||
width: "80px",
|
width: "80px",
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
@ -450,8 +439,8 @@ class Home extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
this.state.scoreTotalColumns = [
|
scoreTotalColumns: [
|
||||||
{
|
{
|
||||||
title: "生产单元",
|
title: "生产单元",
|
||||||
dataIndex: "Nav_ProductionUnit.NAME",
|
dataIndex: "Nav_ProductionUnit.NAME",
|
||||||
@ -482,10 +471,29 @@ class Home extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
]
|
||||||
|
})
|
||||||
|
this.getTeam();
|
||||||
|
this.getHomeTitle()
|
||||||
|
//定时器功能,暂时不开启
|
||||||
|
this.timerID = setInterval(
|
||||||
|
() => {
|
||||||
|
if (this._isMounted) {
|
||||||
|
this.getBaseInfoData(1, this.state.tableKey, 5)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
120000
|
||||||
|
);
|
||||||
|
this.showModalSign();
|
||||||
|
this.getBaseInfoData(1, 1, 5);
|
||||||
|
this.setMessageData();
|
||||||
}
|
}
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.timerID && clearTimeout(this.timerID);
|
this._isMounted = false; // 组件卸载时设为false
|
||||||
|
if (this.timerID) {
|
||||||
|
clearInterval(this.timerID);
|
||||||
|
this.timerID = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showModalSign = () => {
|
showModalSign = () => {
|
||||||
@ -499,7 +507,7 @@ class Home extends React.Component {
|
|||||||
url: "FM/User/UserSign", //验证是否有签名照
|
url: "FM/User/UserSign", //验证是否有签名照
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
//返回查询结果ret
|
//返回查询结果ret
|
||||||
if (ret) {
|
if (this._isMounted&&ret) {
|
||||||
//判断是否有记录
|
//判断是否有记录
|
||||||
openNotification("topRight");
|
openNotification("topRight");
|
||||||
}
|
}
|
||||||
@ -514,7 +522,7 @@ class Home extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
url: "PF/HomeTitle/OrderPaged",
|
url: "PF/HomeTitle/OrderPaged",
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (this._isMounted&&ret) {
|
||||||
this.setState({
|
this.setState({
|
||||||
safetySloganOne: ret[0].TITLE,
|
safetySloganOne: ret[0].TITLE,
|
||||||
// safetySloganOne: "1.安全方针:以人为本、关注健康、依法治企、安全发展。 2.安全理念:一切风险皆可控,一切事故皆可防!3.安全方针:以人为本、关注健康、依法治企、安全发展。4.安全方针:以人为本、关注健康、依法治企、安全发展。5.安全方针:以人为本、关注健康、依法治企、安全发展。 6.安全理念:一切风险皆可控,一切事故皆可防!7.安全方针:以人为本、关注健康、依法治企、安全发展。8.安全方针:以人为本、关注健康、依法治企、安全发展。",
|
// safetySloganOne: "1.安全方针:以人为本、关注健康、依法治企、安全发展。 2.安全理念:一切风险皆可控,一切事故皆可防!3.安全方针:以人为本、关注健康、依法治企、安全发展。4.安全方针:以人为本、关注健康、依法治企、安全发展。5.安全方针:以人为本、关注健康、依法治企、安全发展。 6.安全理念:一切风险皆可控,一切事故皆可防!7.安全方针:以人为本、关注健康、依法治企、安全发展。8.安全方针:以人为本、关注健康、依法治企、安全发展。",
|
||||||
@ -539,7 +547,7 @@ class Home extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
url: "FM/User/Get",
|
url: "FM/User/Get",
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret && ret.Nav_Department) {
|
if (this._isMounted&&ret && ret.Nav_Department) {
|
||||||
this.setState({
|
this.setState({
|
||||||
departmentName: ret.Nav_Department.NAME,
|
departmentName: ret.Nav_Department.NAME,
|
||||||
deparmentType: ret.Nav_Department.DEPARTMENT_TYPE,
|
deparmentType: ret.Nav_Department.DEPARTMENT_TYPE,
|
||||||
@ -723,7 +731,7 @@ class Home extends React.Component {
|
|||||||
payload: json,
|
payload: json,
|
||||||
onlyData: false,
|
onlyData: false,
|
||||||
onComplete: (re) => {
|
onComplete: (re) => {
|
||||||
if (re && re.IsSuccessful && re.Data.newData) {
|
if (this._isMounted&&re && re.IsSuccessful && re.Data.newData) {
|
||||||
this.state.tableData[0].total = re.Data.todoCount;
|
this.state.tableData[0].total = re.Data.todoCount;
|
||||||
this.state.tableData[1].total = re.Data.timeOverCount;
|
this.state.tableData[1].total = re.Data.timeOverCount;
|
||||||
this.state.tableData[2].total = re.Data.doneCount;
|
this.state.tableData[2].total = re.Data.doneCount;
|
||||||
|
|||||||
@ -563,3 +563,142 @@
|
|||||||
:global(.ant-select-combobox .ant-select-search__field) {
|
:global(.ant-select-combobox .ant-select-search__field) {
|
||||||
z-index: auto !important;
|
z-index: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 公告栏容器样式 */
|
||||||
|
:global(.notice-board-container) {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 公告栏标题栏 */
|
||||||
|
:global(.notice-board-header) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-board-title) {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 重要提醒标签 */
|
||||||
|
:global(.notice-important-tag) {
|
||||||
|
background-color: #ff4d4f;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 查看更多链接 */
|
||||||
|
:global(.notice-view-more) {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1890ff;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-view-more:hover) {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 公告列表样式 */
|
||||||
|
:global(.notice-list) {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
max-height: calc(100% - 60px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-item) {
|
||||||
|
padding: 10px 0;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-item:hover) {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 公告内容行 */
|
||||||
|
:global(.notice-item-content) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-item-title) {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 未读公告标题样式 */
|
||||||
|
:global(.notice-item.unread .notice-item-title) {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-item-date) {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 公告来源样式 */
|
||||||
|
:global(.notice-item-source) {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分页控件样式 */
|
||||||
|
:global(.notice-pagination) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-page-btn) {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
line-height: 28px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 0 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-page-btn.active) {
|
||||||
|
background-color: #1890ff;
|
||||||
|
color: #fff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.notice-page-btn:disabled) {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user