菜单交互

This commit is contained in:
yunkexin 2024-03-26 11:37:05 +08:00
parent 860a3d4c6e
commit b559401911
6 changed files with 154 additions and 23 deletions

View File

@ -207,17 +207,12 @@ class BI001HomeDetail extends React.Component {
}
loadData = () => {
this.state.showLoading = true;
let mineType = this.props.data.mineType;
let param = this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS;
if (param) {
mineType = param === "选矿厂" ? "10" : param === "尾矿库" ? "20" : "30";
this.props.data.mineType = mineType;
}
this.chart1(mineType);
this.chart1();
};
//矿山
chart1 = (mineType) => {
let json = initFilter(this.props.login.OrgId, mineType);
chart1 = () => {
let json = initFilter(this.props.login.OrgId);
// extendRule(json, 'DEPARTMENT_NAME', 1, "矿山部");
// extendOrder(json, "MONTH", 0);
this.props.dispatch({

View File

@ -56,7 +56,7 @@ class BI054HomeDetail extends React.Component {
loadData = () => {
this.state.showLoading = true;
// let json = initFilter(this.props.login.OrgId, this.props.data.mineType, "NUM");
let json = initFilter(this.props.login.OrgId, (this.props.data.mineType == null ? this.props.formParam.mineType : this.props.data.mineType), "NUM");
let json = initFilter(this.props.login.OrgId,'', "NUM");
this.props.dispatch({
type: 'app/getDataByPost',

View File

@ -55,8 +55,8 @@ class BI055HomeDetail extends React.Component {
// } else {
// mineType = this.props.formParam.mineType;
// }
debugger
let json = initFilter(this.props.login.OrgId, (this.props.data.mineType == null ? this.props.formParam.mineType : this.props.data.mineType));
let json = initFilter(this.props.login.OrgId);
this.props.dispatch({
type: "app/getDataByPost",
url: "BI/BIHome/GetHomeDetailMonthRisk",

View File

@ -163,8 +163,8 @@ const Sider = (props) => {
setCollapsed(!collapsed);
};
useEffect(() => {
if (collapsed == false) {
setCollapsed(true);
if (MenuShow == true) {
setMenuShow(false);
}
}, [props.repost]);
const menuCUR = topMenus.menus[mainSilder - 2];

View File

@ -53,7 +53,7 @@ const AllTech = (props) => {
span={6}
className="home-tech-col"
onClick={() => {
props.techClick()
props.techClick();
}}
>
<div className="home-tech-back">
@ -189,6 +189,15 @@ class Home extends React.Component {
currentpageIndex: "1",
visibleStartTime: [],
visibleEndTime: [],
mineType:
localStorage.getItem("currentMineType") === "20"
? "10"
: localStorage.getItem("currentMineType"),
detailForm: {
isShow: false,
formCode: "",
title: "",
},
completeName: [
{
name: "张森友",
@ -1206,6 +1215,47 @@ class Home extends React.Component {
visible: false,
});
};
ExpandCancel = () => {};
showDetailModal = (formCode) => {
console.log(this.state.mineType,'this.state.mineType')
var titleTemp =
this.state.mineType == 20
? "尾矿库"
: this.state.mineType == 10
? "选矿厂"
: "露天矿";
if (formCode == "BI054_HOMEDETAIL") {
titleTemp += "安全检查次数统计近12月";
} else if (formCode == "BI055_HOMEDETAIL") {
titleTemp += "月度隐患整改情况近12月";
} else if (formCode == "BI001_HOMEDETAIL") {
titleTemp += "班组活动任务完成详情近12月";
} else if (formCode == "BI002_HOMEDETAIL") {
titleTemp += "工作票完成详情近12月";
} else if (formCode == "BI013_RISKANALYSISMODEL") {
titleTemp += "风险管理统计分析";
}
const newtmpData = {
data: {
id: guid(),
mineType: this.state.mineType,
onCancel: this.ExpandCancel,
homeReload: true,
},
formCode: formCode,
};
this.setState({ tmpData: newtmpData }, () => {
var detailForm = {
isShow: true,
formCode: formCode,
title: titleTemp,
};
this.setState({
detailForm: detailForm,
});
});
};
doubleClear = () => {
if (this.state.searchVisible === true) {
this.setState({ searchVisible: false });
@ -1296,6 +1346,16 @@ class Home extends React.Component {
);
this.setState({ querySearch });
};
detailFormClose = () => {
var detailForm = {
isShow: false,
formCode: "",
title: "",
};
this.setState({
detailForm: detailForm,
});
};
render() {
const rowSelection = {
@ -1326,6 +1386,17 @@ class Home extends React.Component {
>
<FormPage {...this.state.tmpData} />
</Modal>
<Modal
visible={this.state.detailForm.isShow}
title={this.state.detailForm.title}
maskClosable={false}
closeModal={this.detailFormClose}
onCancel={this.detailFormClose}
footer={null}
width="1300px"
>
<FormPage {...this.state.tmpData} />
</Modal>
<Modal
visible={this.state.searchVisible}
zIndex={999}
@ -1791,44 +1862,60 @@ class Home extends React.Component {
<AllTech
icon={"icon-a-zu291"}
title={"排班明细"}
techClick={()=>{this.navToMenu("6dc35aee-dd5e-4b31-b7ca-5f62d337d0c1")}}
techClick={() => {
this.navToMenu("6dc35aee-dd5e-4b31-b7ca-5f62d337d0c1");
}}
/>
<AllTech
icon={"icon-a-zu196"}
title={"作业票"}
techClick={()=>{this.navToMenu("b3767117-f0aa-4122-97c1-2fc58fbaf934")}}
techClick={() => {
this.navToMenu("b3767117-f0aa-4122-97c1-2fc58fbaf934");
}}
/>
<AllTech
icon={"icon-a-zu185"}
title={"外包作业票"}
techClick={()=>{this.navToMenu("7a9b51b1-3d56-4199-b450-f9f5f9cc3235")}}
techClick={() => {
this.navToMenu("7a9b51b1-3d56-4199-b450-f9f5f9cc3235");
}}
/>
<AllTech
icon={"icon-a-zu65"}
title={"作业任务识别"}
techClick={()=>{this.navToMenu("2beef9b3-e4b9-4b0b-9e82-238c4bf3be5d")}}
techClick={() => {
this.navToMenu("2beef9b3-e4b9-4b0b-9e82-238c4bf3be5d");
}}
/>
</Row>
<Row style={{ height: "50%" }}>
<AllTech
<AllTech
icon={"icon-a-zu203"}
title={"检查任务制定"}
techClick={()=>{this.navToMenu("21b685c9-d298-4a14-9700-c9ab1bb8a918")}}
techClick={() => {
this.navToMenu("21b685c9-d298-4a14-9700-c9ab1bb8a918");
}}
/>
<AllTech
icon={"icon-a-zu181"}
title={"手动隐患上报"}
techClick={()=>{this.navToMenu("2e7835ef-0e5a-41b5-8bb7-ad9c64a6b2f4")}}
techClick={() => {
this.navToMenu("2e7835ef-0e5a-41b5-8bb7-ad9c64a6b2f4");
}}
/>
<AllTech
icon={"icon-a-zu198"}
title={"培训通知发起"}
techClick={()=>{this.navToMenu("818ab476-b29f-4db5-9393-fd13e1d2a565")}}
techClick={() => {
this.navToMenu("818ab476-b29f-4db5-9393-fd13e1d2a565");
}}
/>
<AllTech
icon={"icon-a-zu196"}
title={"普通会议通知"}
techClick={()=>{this.navToMenu("800abe55-a2cf-4e23-a2b6-1caf2dca816c")}}
techClick={() => {
this.navToMenu("800abe55-a2cf-4e23-a2b6-1caf2dca816c");
}}
/>
</Row>
</div>
@ -2020,6 +2107,17 @@ class Home extends React.Component {
</div>
{/* <Icon type="edit" className="home-always-icon"></Icon> */}
<div onClick={() => this.showDetailModal("BI001_HOMEDETAIL")}>
<IconFont
type="icon-24gl-expand2"
// style={{
// fontSize: "18px",
// color: "#333333",
// cursor: "pointer",
// }}
className="home-always-icon"
></IconFont>
</div>
</div>
<div
style={{
@ -2091,6 +2189,17 @@ class Home extends React.Component {
<div className="home-always-badge"></div>
<div className="home-always-name">安全检查次数统计</div>
</div>
<div onClick={() => this.showDetailModal("BI054_HOMEDETAIL")}>
<IconFont
type="icon-24gl-expand2"
// style={{
// fontSize: "18px",
// color: "#333333",
// cursor: "pointer",
// }}
className="home-always-icon"
></IconFont>
</div>
</div>
<div style={{ flex: 1, height: "100%", padding: "0px" }}>
<div
@ -2110,6 +2219,17 @@ class Home extends React.Component {
<div className="home-always-badge"></div>
<div className="home-always-name">月度隐患整改情况</div>
</div>
<div onClick={() => this.showDetailModal("BI055_HOMEDETAIL")}>
<IconFont
type="icon-24gl-expand2"
// style={{
// fontSize: "18px",
// color: "#333333",
// cursor: "pointer",
// }}
className="home-always-icon"
></IconFont>
</div>
</div>
<div style={{ flex: 1, height: "100%", padding: "0px" }}>
<div
@ -2142,6 +2262,21 @@ class Home extends React.Component {
<div className="home-always-badge"></div>
<div className="home-always-name">风险等级占比</div>
</div>
<div
onClick={() =>
this.showDetailModal("BI013_RISKANALYSISMODEL")
}
>
<IconFont
type="icon-24gl-expand2"
// style={{
// fontSize: "18px",
// color: "#333333",
// cursor: "pointer",
// }}
className="home-always-icon"
></IconFont>
</div>
</div>
<div style={{ flex: 1, height: "100%", padding: "0px" }}>
<div

View File

@ -85,6 +85,7 @@
:global(.home-always-icon) {
color: #909399;
font-size: 14px;
cursor: pointer;
}
:global(.badge-style) {