diff --git a/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js b/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js index ea67874..9a4c5f3 100644 --- a/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js +++ b/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js @@ -159,6 +159,13 @@ class BI007FormRunAnalysisNew extends React.Component { title: "未完成", dataIndex: "UNFINISH_QTY", key: "UNFINISH_QTY", + render: (text, record) => ( + + this.showUnfinishModal(record)}> + {record.UNFINISH_QTY} + + + ), }, { width: "100px", @@ -258,7 +265,7 @@ class BI007FormRunAnalysisNew extends React.Component { extendRule(json, "CREATE_DATE", 6, startTime); extendRule(json, "CREATE_DATE", 4, endTime); extendRule(json, "NOTICE_STATUS", 1, 0); - extendRule(json, "SHOP_DEPARTMENT_ID", 1, record.DEPARTMENT_ID); + extendRule(json, "CLASS_DEPARTMENT_ID", 1, record.DEPARTMENT_ID); this.props.dispatch({ type: "app/getDataByPost", payload: json, @@ -294,7 +301,7 @@ class BI007FormRunAnalysisNew extends React.Component { { id: departmentId, name: departmentName, - noticeTitle: departmentName + "安全生产标准化运行情况", + noticeTitle: "安全生产标准化运行情况", tmpData: newtmpData, currActivatedMenu: "", }, @@ -441,33 +448,31 @@ class BI007FormRunAnalysisNew extends React.Component { getDepartId = () => {}; //加载数据赋值 loadData = () => { - // this.ksRun(); - // this.xkRun(); - var orgId = this.props.login ? this.props.login.OrgId : ""; - const jsonTemp = initFilter(orgId); - extendRule( - jsonTemp, - "NAME", - 1, - this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS - ); - this.props.dispatch({ - type: "app/getDataByPost", - payload: jsonTemp, - url: "FM/Department/OrderEntities", - onComplete: (retDepart) => { - if (retDepart) { - // this.getClassDepartment(retDepart[0].ID); - this.getShopDepartment(retDepart[0].ID); - } else { - message.error( - "未找到部门" + - this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + - ",请先维护" - ); - } - }, - }); + this.getShopDepartment(); + // var orgId = this.props.login ? this.props.login.OrgId : ""; + // const jsonTemp = initFilter(orgId); + // extendRule( + // jsonTemp, + // "NAME", + // 1, + // this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + // ); + // this.props.dispatch({ + // type: "app/getDataByPost", + // payload: jsonTemp, + // url: "FM/Department/OrderEntities", + // onComplete: (retDepart) => { + // if (retDepart) { + // this.getShopDepartment(retDepart[0].ID); + // } else { + // message.error( + // "未找到部门" + + // this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + + // ",请先维护" + // ); + // } + // }, + // }); }; // workTicket = () => { @@ -863,13 +868,14 @@ class BI007FormRunAnalysisNew extends React.Component { var orgId = this.props.login ? this.props.login.OrgId : ""; const jsonTemp = initFilter(orgId); extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 2); + extendRule(jsonTemp, "ENABLE_STATUS", 1, 0); // extendRule(jsonTemp, 'Nav_Parent.PARENT_ID', 1, this.props.data.id); - extendRule( - jsonTemp, - "Nav_Parent.Nav_Parent.NAME", - 1, - this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS - ); + // extendRule( + // jsonTemp, + // "Nav_Parent.Nav_Parent.NAME", + // 1, + // this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + // ); extendOrder(jsonTemp, "PARENT_ID", 0); extendOrder(jsonTemp, "NAME", 0); this.props.dispatch({ @@ -942,17 +948,18 @@ class BI007FormRunAnalysisNew extends React.Component { }); }; - getShopDepartment = (departId) => { + getShopDepartment = () => { var orgId = this.props.login ? this.props.login.OrgId : ""; const jsonTemp = initFilter(orgId); - extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 1); + extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 2); + extendRule(jsonTemp, "ENABLE_STATUS", 1, 0); // extendRule(jsonTemp, 'PARENT_ID', 1, this.props.data.id); - extendRule( - jsonTemp, - "Nav_Parent.NAME", - 1, - this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS - ); + // extendRule( + // jsonTemp, + // "Nav_Parent.NAME", + // 1, + // this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + // ); this.props.dispatch({ type: "app/getDataByPost", payload: jsonTemp, @@ -977,7 +984,7 @@ class BI007FormRunAnalysisNew extends React.Component { "YYYY-MM-DD 00:00:00" ); let endTime = this.state.selectEndTime.format("YYYY-MM-DD 23:59:59"); - let json = initFilter(orgId, departId, "", 1, "", startTime, endTime); + let json = initFilter(orgId, null, "", 1, "", startTime, endTime); // extendRule(json, 'TYPE', 1, this.state.timeType); // extendRule(json, 'DEPARTMENT_TYPE', 1, 1); // extendRule(json, 'PARENT_DEPARTMENT_ID', 1, this.props.data.id); @@ -1160,7 +1167,6 @@ class BI007FormRunAnalysisNew extends React.Component { fontWeight: "bold", }} > - {this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS}{" "} 安全生产标准化运行情况 @@ -1330,7 +1336,7 @@ class BI007FormRunAnalysisNew extends React.Component { - - - {/* -

{this.props.data.name}安全任务完成情况

-
- */}

+ > */} { return ( @@ -39,12 +41,19 @@ const stud = (eve) => { ); }; +const getScale = () => { + const width = 1920, + height = 1080; // 此处可以根据实际设计稿尺寸修改 + 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 = { - screenWidh: window.screen.width > 2000 ? true : false, + // screenWidh: window.screen.width > 2000 ? true : false, nowDate: "", checkData: [ { name: "公司检查", value: 103 }, @@ -234,6 +243,7 @@ class FullScreen extends React.Component { value: 132, }, ], + scale: getScale(), }; // this.scrollConfig = { // header: ["检查类型", "检查次数", "完成率"], @@ -251,7 +261,15 @@ class FullScreen extends React.Component { // }; } + setScale = debounce(() => { + // debounce节流 + // 获取到缩放比,设置它 + let scale = getScale(); + this.setState({ scale }); + }, 500); + componentDidMount() { + window.addEventListener("resize", this.setScale); // 得到呈现的屏幕宽高比 this.riskLevel(); this.safedanger(); const eve = () => { @@ -294,6 +312,7 @@ class FullScreen extends React.Component { // }); } componentWillUnmount() { + window.removeEventListener("resize", this.setScale); clearInterval(this.timer); } getDate = () => { @@ -310,9 +329,9 @@ class FullScreen extends React.Component { hours = myDate.getHours(); //获取当前小时 } if (myDate.getMinutes() < 10) { - var minutes = "0" + myDate.getMinutes(); + var minutes = "0" + myDate.getMinutes(); } else { - minutes = myDate.getMinutes(); //获取当前分钟 + minutes = myDate.getMinutes(); //获取当前分钟 } if (myDate.getSeconds() < 10) { var seconds = "0" + myDate.getSeconds(); @@ -923,333 +942,365 @@ class FullScreen extends React.Component { }; render() { + const width = 1920, + height = 1080; + // 固定好16:9的宽高比,计算出最合适的缩放比,宽高比可根据需要自行更改 + const { scale } = this.state; return ( -
-
-
- - -
+
+
+
+ + - logo
-

- 安全方针:安全第一、综合治理、控制风险、科学发展 -                    - 安全理念:一切风险皆可控,一切事故皆可防! -

-
-
- - -
- 宁化行洛坑安全生产标准化运营平台 -
- - -
- {this.state.nowDate} -
- - -
-
- - -
- {/* */} -
-
-
风险等级基本信息
-
- -
- {/*
*/} -
- -
-
- {/* */} -
-
-
隐患检查基本信息
-
-
+ logo
+

+ 安全方针:安全第一、综合治理、控制风险、科学发展 +                    + 安全理念:一切风险皆可控,一切事故皆可防! +

+
+
+ + +
+ 宁化行洛坑安全生产标准化运营平台 +
+ + +
+ {this.state.nowDate} +
+ + +
+
+ + +
+ {/* */} +
+
+
+ 风险等级基本信息 +
+
+ +
- {this.state.checkData.map((item, index) => { - return ( -
- -
-
-
- {item.name} -
- -
- /次 -
-
-
- {item.value} -
-
-
-
- ); - })} -
-
- -
+ >
+ {/* */}
- {/* */} -
- - -
- {this.state.screenWidh ? ( -
-
- {/*
矿山
*/} -
-
标准化得分
-
83
-
-
-
-
-
标准化得分
-
88
-
-
-
-
-
标准化得分
-
93
-
+ +
+
+ {/* */} +
+
+
+ 隐患检查基本信息
- ) : ( -
-
-
矿山
-
标准化得分
-
83
-
-
-
选矿
-
标准化得分
-
88
-
-
-
尾矿
-
标准化得分
-
93
-
-
- )} -
-
-
- 1
- {this.state.roaData.map((item, index) => { + {this.state.checkData.map((item, index) => { return ( -
  • -
    -
    - {item.name}:{item.value} +
    + +
    +
    +
    + {item.name} +
    + +
    + /次 +
    +
    +
    + {item.value} +
    -
    -
  • + +
    ); })}
    +
    + +
    + {/* */}
    -
    - - -
    - {/* */} -
    -
    -
    基本会议完成情况
    + + +
    +
    +
    + {/*
    矿山
    */} +
    +
    + 标准化得分 +
    +
    83
    +
    +
    +
    +
    +
    + 标准化得分 +
    +
    88
    +
    +
    +
    +
    +
    + 标准化得分 +
    +
    93
    +
    +
    +
    + {/* {this.state.screenWidh ? ( + + ) : ( +
    +
    +
    矿山
    +
    + 标准化得分 +
    +
    83
    +
    +
    +
    选矿
    +
    + 标准化得分 +
    +
    88
    +
    +
    +
    尾矿
    +
    + 标准化得分 +
    +
    93
    +
    +
    + )} */}
    +
    + 1 +
    +
    + {this.state.roaData.map((item, index) => { + return ( +
  • +
    +
    + {item.name}:{item.value} +
    +
    +
  • + ); + })} +
    +
    +
    +
    + + +
    + {/* */} +
    +
    +
    + 基本会议完成情况 +
    +
    - {/*
    +
    + {/*
    @@ -1257,7 +1308,7 @@ class FullScreen extends React.Component { id="completethree" style={{ width: "100%", height: "100%" }} >
    */} - {/* @@ -1269,208 +1320,216 @@ class FullScreen extends React.Component { config={this.state.WaterLevelPondconfig3} style={{ width: "20%", height: "100%" }} /> */} +
    +
    + + {this.state.meetingData.map((item, index) => ( + +
    +
    +
    +
    + {item.value} +
    +
    + {item.name} +
    +
    +
    +
    + + ))} +
    +
    +
    +
    + +
    +
    + {/* */} +
    +
    +
    + 安全任务完成情况 +
    +
    +
    +
    + +
    +
    + {/*
    */} +
    + + +
    +
    + + +
    + {/* */} +
    +
    +
    隐患整改数据
    - - {this.state.meetingData.map((item, index) => ( - -
    -
    -
    -
    - {item.value} -
    -
    - {item.name} -
    -
    +
    +
    +
    +
    +
    83
    +
    + 隐患数
    - - ))} - -
    -
    -
    - -
    -
    - {/* */} -
    -
    -
    安全任务完成情况
    -
    -
    -
    - -
    -
    - {/*
    */} -
    - - -
    -
    - - -
    - {/* */} -
    -
    -
    隐患整改数据
    -
    -
    -
    -
    -
    -
    -
    83
    -
    - 隐患数 +
    +
    +
    +
    +
    +
    23
    +
    + 延期整改数 +
    +
    +
    +
    +
    +
    +
    +
    56
    +
    + 按期整改数 +
    -
    -
    -
    -
    23
    -
    - 延期整改数 -
    -
    -
    -
    -
    -
    -
    -
    56
    -
    - 按期整改数 -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - 83% -
    -
    - 整改率 +
    +
    +
    +
    +
    + 83% +
    +
    + 整改率 +
    + {/* */}
    - {/* */} -
    - - - {/* */} -
    -
    -
    -
    - 安全生产标准化运行走势图 -
    -
    -
    -
    - {/*
    */} - - -
    + + + {/* */}
    -
    班组完成率TOP5
    +
    + 安全生产标准化运行走势图 +
    -
    - +
    +
    + {/* */} + + +
    +
    +
    +
    +
    + 班组完成率TOP5 +
    +
    +
    + +
    -
    - - + + +