diff --git a/src/components/CustomPages/BI/BI005LoginRecord.js b/src/components/CustomPages/BI/BI005LoginRecord.js index 7b22548..a9e7f8e 100644 --- a/src/components/CustomPages/BI/BI005LoginRecord.js +++ b/src/components/CustomPages/BI/BI005LoginRecord.js @@ -119,6 +119,972 @@ class BI005LoginRecord extends React.Component { this.state.activeNums = []; this.state.dates = []; this.state.loginNums = []; + if (ret.Data.length == 0) { + ret.Data = [ + { + "COUNT": 315, + "DATE": "2024-03-14 00:00:00", + "type": 1, + "ID": "b7670e5a-3ca5-4c86-a639-5961c6d992bb", + + }, + { + "COUNT": 197, + "DATE": "2024-03-14 00:00:00", + "type": 0, + "ID": "8d8943ca-2576-4ab1-ad9b-98570d29278f", + }, + { + "COUNT": 175, + "DATE": "2024-03-15 00:00:00", + "type": 0, + "ID": "d5427cfa-7981-4e31-9669-2ed4b62dc44b", + }, + { + "COUNT": 257, + "DATE": "2024-03-15 00:00:00", + "type": 1, + "ID": "422b45a8-51ab-4b74-8107-fbd2f441dfca", + }, + { + "COUNT": 113, + "DATE": "2024-03-16 00:00:00", + "type": 0, + "ID": "a739f9fd-f380-4bf8-9d66-0e383b6dc147", + + + + + + + + "CREATE_TIME": "2024-03-17 15:54:52", + "MODIFY_TIME": "2024-03-17 15:54:52", + + + + }, + { + "COUNT": 178, + "DATE": "2024-03-16 00:00:00", + "type": 1, + "ID": "4f6b0218-5f83-4391-bcda-187216717970", + + + + + + + + "CREATE_TIME": "2024-03-17 15:54:52", + "MODIFY_TIME": "2024-03-17 15:54:52", + + + + }, + { + "COUNT": 81, + "DATE": "2024-03-17 00:00:00", + "type": 0, + "ID": "3e52996e-29c8-4b43-8760-42ea711ebaad", + + + + + + + + "CREATE_TIME": "2024-03-18 15:54:52", + "MODIFY_TIME": "2024-03-18 15:54:52", + + + + }, + { + "COUNT": 152, + "DATE": "2024-03-17 00:00:00", + "type": 1, + "ID": "7d3fd40b-bdf2-4119-ac5c-6fa827275283", + + + + + + + + "CREATE_TIME": "2024-03-18 15:54:52", + "MODIFY_TIME": "2024-03-18 15:54:52", + + + + }, + { + "COUNT": 173, + "DATE": "2024-03-18 00:00:00", + "type": 1, + "ID": "be9a0dc1-1ce6-4723-82a9-a959fc8101fc", + + + + + + + + "CREATE_TIME": "2024-03-19 15:54:53", + "MODIFY_TIME": "2024-03-19 15:54:53", + + + + }, + { + "COUNT": 80, + "DATE": "2024-03-18 00:00:00", + "type": 0, + "ID": "902f5e01-2cb0-4439-ab0f-b63cc367d570", + + + + + + + + "CREATE_TIME": "2024-03-19 15:54:53", + "MODIFY_TIME": "2024-03-19 15:54:53", + + + + }, + { + "COUNT": 206, + "DATE": "2024-03-19 00:00:00", + "type": 1, + "ID": "c117274e-1d2b-44ec-ae9e-b3196b9e13ce", + + + + + + + + "CREATE_TIME": "2024-03-20 15:54:52", + "MODIFY_TIME": "2024-03-20 15:54:52", + + + + }, + { + "COUNT": 83, + "DATE": "2024-03-19 00:00:00", + "type": 0, + "ID": "649b29c2-f251-4fd6-8589-349a260767b7", + + + + + + + + "CREATE_TIME": "2024-03-20 15:54:52", + "MODIFY_TIME": "2024-03-20 15:54:52", + + + + }, + { + "COUNT": 86, + "DATE": "2024-03-20 00:00:00", + "type": 0, + "ID": "5ce8ec42-3578-45ca-bc2d-22944d625cde", + + + + + + + + "CREATE_TIME": "2024-03-21 15:54:53", + "MODIFY_TIME": "2024-03-21 15:54:53", + + + + }, + { + "COUNT": 263, + "DATE": "2024-03-20 00:00:00", + "type": 1, + "ID": "aa22675f-6538-4a54-a199-d425441d5254", + + + + + + + + "CREATE_TIME": "2024-03-21 15:54:53", + "MODIFY_TIME": "2024-03-21 15:54:53", + + + + }, + { + "COUNT": 124, + "DATE": "2024-03-21 00:00:00", + "type": 0, + "ID": "d7170de9-31ee-43ce-995f-2d623db98906", + + + + + + + + "CREATE_TIME": "2024-03-22 15:54:53", + "MODIFY_TIME": "2024-03-22 15:54:53", + + + + }, + { + "COUNT": 349, + "DATE": "2024-03-21 00:00:00", + "type": 1, + "ID": "550d4690-06dc-423d-a984-4328cf69c3e1", + + + + + + + + "CREATE_TIME": "2024-03-22 15:54:53", + "MODIFY_TIME": "2024-03-22 15:54:53", + + + + }, + { + "COUNT": 204, + "DATE": "2024-03-22 00:00:00", + "type": 0, + "ID": "572a463e-3e40-4374-b9de-e0616d2c7602", + + + + + + + + "CREATE_TIME": "2024-03-23 15:54:54", + "MODIFY_TIME": "2024-03-23 15:54:54", + + + + }, + { + "COUNT": 307, + "DATE": "2024-03-22 00:00:00", + "type": 1, + "ID": "d9208912-e8d2-4295-a4fb-92fe6ebd1144", + + + + + + + + "CREATE_TIME": "2024-03-23 15:54:54", + "MODIFY_TIME": "2024-03-23 15:54:54", + + + + }, + { + "COUNT": 196, + "DATE": "2024-03-23 00:00:00", + "type": 0, + "ID": "eeb04ad5-11e4-4853-b07b-d406f1d1bdcf", + + + + + + + + "CREATE_TIME": "2024-03-24 15:54:53", + "MODIFY_TIME": "2024-03-24 15:54:53", + + + + }, + { + "COUNT": 270, + "DATE": "2024-03-23 00:00:00", + "type": 1, + "ID": "08df6b62-c7ff-4c24-9eb4-2db3335dc6b5", + + + + + + + + "CREATE_TIME": "2024-03-24 15:54:53", + "MODIFY_TIME": "2024-03-24 15:54:53", + + + + }, + { + "COUNT": 265, + "DATE": "2024-03-24 00:00:00", + "type": 1, + "ID": "ad5e8ec3-d2eb-4b6e-a23b-225d57868a74", + + + + + + + + "CREATE_TIME": "2024-03-25 15:54:54", + "MODIFY_TIME": "2024-03-25 15:54:54", + + + + }, + { + "COUNT": 183, + "DATE": "2024-03-24 00:00:00", + "type": 0, + "ID": "d306b920-41d4-4877-a597-cf76aaf11209", + + + + + + + + "CREATE_TIME": "2024-03-25 15:54:54", + "MODIFY_TIME": "2024-03-25 15:54:54", + + + + }, + { + "COUNT": 307, + "DATE": "2024-03-25 00:00:00", + "type": 1, + "ID": "0fed3ab1-b153-4f2d-813b-32d79d1a2f75", + + + + + + + + "CREATE_TIME": "2024-03-26 15:54:53", + "MODIFY_TIME": "2024-03-26 15:54:53", + + + + }, + { + "COUNT": 185, + "DATE": "2024-03-25 00:00:00", + "type": 0, + "ID": "103028e8-bcaf-4f4d-82b3-53908ad80086", + + + + + + + + "CREATE_TIME": "2024-03-26 15:54:53", + "MODIFY_TIME": "2024-03-26 15:54:53", + + + + }, + { + "COUNT": 186, + "DATE": "2024-03-26 00:00:00", + "type": 0, + "ID": "18a9775e-6f9c-4e07-9528-80a30284e7e8", + + + + + + + + "CREATE_TIME": "2024-03-27 15:54:53", + "MODIFY_TIME": "2024-03-27 15:54:53", + + + + }, + { + "COUNT": 304, + "DATE": "2024-03-26 00:00:00", + "type": 1, + "ID": "1a865fec-6e16-4f05-bb92-d91ecf7ec113", + + + + + + + + "CREATE_TIME": "2024-03-27 15:54:53", + "MODIFY_TIME": "2024-03-27 15:54:53", + + + + }, + { + "COUNT": 207, + "DATE": "2024-03-27 00:00:00", + "type": 0, + "ID": "d6178a36-3d88-4c9b-914e-e15099d14585", + + + + + + + + "CREATE_TIME": "2024-03-28 15:54:53", + "MODIFY_TIME": "2024-03-28 15:54:53", + + + + }, + { + "COUNT": 294, + "DATE": "2024-03-27 00:00:00", + "type": 1, + "ID": "6fe4b031-140f-4b07-b260-7448ccc221ef", + + + + + + + + "CREATE_TIME": "2024-03-28 15:54:53", + "MODIFY_TIME": "2024-03-28 15:54:53", + + + + }, + { + "COUNT": 202, + "DATE": "2024-03-28 00:00:00", + "type": 0, + "ID": "261bd85b-409e-4270-a5a0-428179af465b", + + + + + + + + "CREATE_TIME": "2024-03-29 15:54:54", + "MODIFY_TIME": "2024-03-29 15:54:54", + + + + }, + { + "COUNT": 301, + "DATE": "2024-03-28 00:00:00", + "type": 1, + "ID": "bc62a9da-6ba4-415f-80dd-3098b683acd0", + + + + + + + + "CREATE_TIME": "2024-03-29 15:54:54", + "MODIFY_TIME": "2024-03-29 15:54:54", + + + + }, + { + "COUNT": 188, + "DATE": "2024-03-29 00:00:00", + "type": 0, + "ID": "c2ce0ab6-e886-4949-b9e1-03e372327626", + + + + + + + + "CREATE_TIME": "2024-03-30 15:54:54", + "MODIFY_TIME": "2024-03-30 15:54:54", + + + + }, + { + "COUNT": 292, + "DATE": "2024-03-29 00:00:00", + "type": 1, + "ID": "2908af15-44dd-4638-ad8b-5b52aa124bec", + + + + + + + + "CREATE_TIME": "2024-03-30 15:54:54", + "MODIFY_TIME": "2024-03-30 15:54:54", + + + + }, + { + "COUNT": 191, + "DATE": "2024-03-30 00:00:00", + "type": 0, + "ID": "176bb95d-ff69-456c-b513-40b7f366d5bd", + + + + + + + + "CREATE_TIME": "2024-03-31 15:54:54", + "MODIFY_TIME": "2024-03-31 15:54:54", + + + + }, + { + "COUNT": 294, + "DATE": "2024-03-30 00:00:00", + "type": 1, + "ID": "345b369c-b972-4e67-b29d-b5f213f4d587", + + + + + + + + "CREATE_TIME": "2024-03-31 15:54:54", + "MODIFY_TIME": "2024-03-31 15:54:54", + + + + }, + { + "COUNT": 191, + "DATE": "2024-03-31 00:00:00", + "type": 0, + "ID": "bfd345e2-3927-4cb6-96eb-e65f5344fe82", + + + + + + + + "CREATE_TIME": "2024-04-01 15:54:54", + "MODIFY_TIME": "2024-04-01 15:54:54", + + + + }, + { + "COUNT": 288, + "DATE": "2024-03-31 00:00:00", + "type": 1, + "ID": "590f5ef6-08c7-4523-8f98-5afec6c02c72", + + + + + + + + "CREATE_TIME": "2024-04-01 15:54:54", + "MODIFY_TIME": "2024-04-01 15:54:54", + + + + }, + { + "COUNT": 399, + "DATE": "2024-04-01 00:00:00", + "type": 1, + "ID": "80eb33a7-a811-49ea-aaae-b560e9b5d861", + + + + + + + + "CREATE_TIME": "2024-04-02 15:54:55", + "MODIFY_TIME": "2024-04-02 15:54:55", + + + + }, + { + "COUNT": 198, + "DATE": "2024-04-01 00:00:00", + "type": 0, + "ID": "7f595016-1fc9-4be0-b0b1-ccaadf400f4a", + + + + + + + + "CREATE_TIME": "2024-04-02 15:54:55", + "MODIFY_TIME": "2024-04-02 15:54:55", + + + + }, + { + "COUNT": 390, + "DATE": "2024-04-02 00:00:00", + "type": 1, + "ID": "410bae9f-8811-48bc-b063-6b50c6b7988c", + + + + + + + + "CREATE_TIME": "2024-04-03 15:54:55", + "MODIFY_TIME": "2024-04-03 15:54:55", + + + + }, + { + "COUNT": 214, + "DATE": "2024-04-02 00:00:00", + "type": 0, + "ID": "ba28acd4-f7b6-4fc8-b37e-a09c272dda92", + + + + + + + + "CREATE_TIME": "2024-04-03 15:54:55", + "MODIFY_TIME": "2024-04-03 15:54:55", + + + + }, + { + "COUNT": 237, + "DATE": "2024-04-03 00:00:00", + "type": 0, + "ID": "7c9e488e-9d76-439d-bf4a-892e9997b425", + + + + + + + + "CREATE_TIME": "2024-04-04 15:54:55", + "MODIFY_TIME": "2024-04-04 15:54:55", + + + + }, + { + "COUNT": 312, + "DATE": "2024-04-03 00:00:00", + "type": 1, + "ID": "45b9f8ae-e0c0-4113-b822-b7f0ecdcd8ce", + + + + + + + + "CREATE_TIME": "2024-04-04 15:54:55", + "MODIFY_TIME": "2024-04-04 15:54:55", + + + + }, + { + "COUNT": 197, + "DATE": "2024-04-04 00:00:00", + "type": 0, + "ID": "b37526da-3461-4e2a-a79d-eadb9a523512", + + + + + + + + "CREATE_TIME": "2024-04-05 15:54:55", + "MODIFY_TIME": "2024-04-05 15:54:55", + + + + }, + { + "COUNT": 254, + "DATE": "2024-04-04 00:00:00", + "type": 1, + "ID": "03e3017c-b5c0-4e1a-8b32-ebd8fd28dcf0", + + + + + + + + "CREATE_TIME": "2024-04-05 15:54:55", + "MODIFY_TIME": "2024-04-05 15:54:55", + + + + }, + { + "COUNT": 266, + "DATE": "2024-04-05 00:00:00", + "type": 1, + "ID": "d8ea24f9-3697-4af3-b406-4f5ae3c44586", + + + + + + + + + + + + + }, + { + "COUNT": 174, + "DATE": "2024-04-05 00:00:00", + "type": 0, + "ID": "14a421a8-6485-4e1e-9ca0-1e40c32b0579", + + + + + + + + + + + + + }, + { + "COUNT": 168, + "DATE": "2024-04-06 00:00:00", + "type": 0, + "ID": "0208eb4a-4da5-4229-af0b-27c1dfc66102", + + + + + + + + "CREATE_TIME": "2024-04-07 15:54:55", + "MODIFY_TIME": "2024-04-07 15:54:55", + + + + }, + { + "COUNT": 292, + "DATE": "2024-04-06 00:00:00", + "type": 1, + "ID": "4849991c-cb1e-4780-a558-669fb92ed16e", + + + + + + + + "CREATE_TIME": "2024-04-07 15:54:55", + "MODIFY_TIME": "2024-04-07 15:54:55", + + + + }, + { + "COUNT": 171, + "DATE": "2024-04-07 00:00:00", + "type": 0, + "ID": "69efae5a-9ac8-4627-a6da-a786706e1b63", + + + + + + + + "CREATE_TIME": "2024-04-08 15:54:55", + "MODIFY_TIME": "2024-04-08 15:54:55", + + + + }, + { + "COUNT": 318, + "DATE": "2024-04-07 00:00:00", + "type": 1, + "ID": "3cb6beb3-6bd9-4b39-84ab-420f407b3b8d", + + + + + + + + "CREATE_TIME": "2024-04-08 15:54:55", + "MODIFY_TIME": "2024-04-08 15:54:55", + + + + }, + { + "COUNT": 314, + "DATE": "2024-04-08 00:00:00", + "type": 1, + "ID": "ac34c873-2b7b-43a2-9243-9935817a45db", + + + + + + + + "CREATE_TIME": "2024-04-09 15:54:55", + "MODIFY_TIME": "2024-04-09 15:54:55", + + + + }, + { + "COUNT": 186, + "DATE": "2024-04-08 00:00:00", + "type": 0, + "ID": "c5d4e5fc-9f0b-4726-a739-7aa487c82174", + + + + + + + + "CREATE_TIME": "2024-04-09 15:54:55", + "MODIFY_TIME": "2024-04-09 15:54:55", + + + + }, + { + "COUNT": 307, + "DATE": "2024-04-09 00:00:00", + "type": 1, + "ID": "bc75f415-bacb-45a1-814b-ac28f4f7cb2e", + + + + + + + + "CREATE_TIME": "2024-04-10 15:54:56", + "MODIFY_TIME": "2024-04-10 15:54:56", + + + + }, + { + "COUNT": 207, + "DATE": "2024-04-09 00:00:00", + "type": 0, + "ID": "2590bf04-f29a-4450-be5b-e1995bae8b6d", + + + + + + + + "CREATE_TIME": "2024-04-10 15:54:56", + "MODIFY_TIME": "2024-04-10 15:54:56", + + + + }, + { + "COUNT": 199, + "DATE": "2024-04-10 00:00:00", + "type": 0, + "ID": "43fe7ecc-b588-4f50-987b-f58efbc8b455", + + + + + + + + "CREATE_TIME": "2024-04-11 15:54:56", + "MODIFY_TIME": "2024-04-11 15:54:56", + + + + }, + { + "COUNT": 281, + "DATE": "2024-04-10 00:00:00", + "type": 1, + "ID": "f503a544-4f3d-4c60-8b49-8fc90ec9359c", + + + + + + + + "CREATE_TIME": "2024-04-11 15:54:56", + "MODIFY_TIME": "2024-04-11 15:54:56", + + + + } + ]; + + } for (let i = 0; i < ret.Data.length; i++) { if (ret.Data[i].type == 0) { this.state.activeNums.push(ret.Data[i].COUNT); @@ -128,13 +1094,14 @@ class BI005LoginRecord extends React.Component { } } if (this.state.totalActiveUsers == 0) { - //this.state.totalActiveUsers = ret.Data.reverse().find(item => item.type === 0)?.COUNT; - this.state.totalActiveUsers = 326; + this.state.totalActiveUsers = ret.Data.reverse().find(item => item.type === 0)?.COUNT; + //this.state.totalActiveUsers = 326; } this.state.dates.push(moment().format('MM/DD')); this.state.loginNums.push(todayCount); let chart1s = document.getElementById('chart1'); + console.log(this.state.dates); if (chart1s) { let myChart = echarts.init(chart1s); myChart.on('click', (params) => { diff --git a/src/components/CustomPages/BI/BI009FormRunAnalysis.js b/src/components/CustomPages/BI/BI009FormRunAnalysis.js index c567fdd..c8c63e5 100644 --- a/src/components/CustomPages/BI/BI009FormRunAnalysis.js +++ b/src/components/CustomPages/BI/BI009FormRunAnalysis.js @@ -1,209 +1,256 @@ -import React from 'react' -import { connect } from 'dva' -import { initFilter, extendRule, extendOrder } from "../../../utils/common" -import { ChartPieShow, ChartBarShow } from "../../../utils/commonEcharsShow" -import { Table, Button, Row, Col,Modal ,Icon,Progress} from 'antd'; -import echarts from 'echarts'; -import styles from '../HI/StepForm.css'; -import moment from 'moment' -import { T } from 'antd/lib/upload/utils'; -import FormPage from '../../FormPage' +import React from "react"; +import { connect } from "dva"; +import { initFilter, extendRule, extendOrder } from "../../../utils/common"; +import { ChartPieShow, ChartBarShow } from "../../../utils/commonEcharsShow"; +import { Table, Button, Row, Col, Modal, Icon, Progress, Divider } from "antd"; +import echarts from "echarts"; +import styles from "../HI/StepForm1.css"; +import moment from "moment"; +import { T } from "antd/lib/upload/utils"; +import FormPage from "../../FormPage"; class BI009FormRunAnalysis extends React.Component { - constructor(props) { super(props); this.state = { visible: false, - noticeTitle: '', + noticeTitle: "", tmpData: {}, tableKey: "1", - timeType: 5, - ordinaryCount:0, - crucialCount:0, - activityCount:0, - postCount:0, - postChangeCount:0, - taskCount:0, - weekColor:'black', - monthColor:'orange', - threeMonthColor:'black', - sixMonthColor:'black', - yearColor:'black', - retData:[], - groupData:[], - detailData:[], - newData:[], - detailDataH:[], - displayHr:'none', - displaydetail:'none', - columns: [ + timeType: 5, + ordinaryCount: 0, + crucialCount: 0, + activityCount: 0, + postCount: 0, + postChangeCount: 0, + taskCount: 0, + weekColor: "black", + monthColor: "orange", + threeMonthColor: "black", + sixMonthColor: "black", + yearColor: "black", + retData: [], + groupData: [], + detailData: [], + newData: [], + detailDataH: [], + displayHr: "none", + displaydetail: "none", + columns: [ + { + width: "80px", + title: "序号", + dataIndex: "Num", + key: "Num", + render: (text, record, index) => {index + 1}, + }, + { + width: "250px", + title: "部门", + dataIndex: "DEPARTMENT_NAME", + key: "DEPARTMENT_NAME", + // render: (text, record) => ( + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + // ), + }, + { + width: "250px", + title: "班组", + dataIndex: "TEAM_NAME", + key: "TEAM_NAME", + // render: (text, record) => ( + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + // ), + }, + { + title: "完成率", + children: [ { - width: "100px", - title: '部门', - dataIndex: 'DEPARTMENT_NAME', - key: 'DEPARTMENT_NAME', - // render: (text, record) => ( - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - // ), - }, - { - width: "100px", - title: '班组', - dataIndex: 'TEAM_NAME', - key: 'TEAM_NAME', - // render: (text, record) => ( - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - // ), - }, - { - title: '完成率', - children: [ - { - title: '班前会议', - render: (text, record) => ({record.FO01_TOTAL == 0?'0%':(((record.FO01_FINISH +record.FO01_OVERTIME)/ record.FO01_TOTAL)*100).toFixed(0)+"%"}) - }, - { - title: '岗位交接班', - render: (text, record) => ({record.FO03_TOTAL == 0?'0%':(((record.FO03_FINISH +record.FO03_OVERTIME)/ record.FO03_TOTAL)*100).toFixed(0)+"%"}) - }, - { - title: '岗位当班记录', - render: (text, record) => ({record.FO02_TOTAL == 0?'0%':(((record.FO02_FINISH +record.FO02_OVERTIME)/ record.FO02_TOTAL)*100).toFixed(0)+"%"}) - }, - ], - }, - // { - // title: '及时完成率', - // children: [ - // { - // title: '班前会议', - // render: (text, record) => ({record.FO01_TOTAL == 0?'0%':((record.FO01_FINISH/ record.FO01_TOTAL)*100).toFixed(0)+"%"}) - // }, - // { - // title: '岗位交接班', - // render: (text, record) => ({record.FO03_TOTAL == 0?'0%':((record.FO03_FINISH / record.FO03_TOTAL)*100).toFixed(0)+"%"}) - // }, - // { - // title: '岗位当班记录', - // render: (text, record) => ({record.FO02_TOTAL == 0?'0%':((record.FO02_FINISH / record.FO02_TOTAL)*100).toFixed(0)+"%"}) - // }, - // ], - // }, - ], - detailColumns: [ - { - width: "60px", - title: '班组', - dataIndex: 'DEPARTMENT_NAME', - key: 'DEPARTMENT_NAME', - // render: (text, record) => ( - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - // ), + title: "班前会议", + render: (text, record) => ( + + {record.FO01_TOTAL == 0 + ? "0%" + : ( + ((record.FO01_FINISH + record.FO01_OVERTIME) / + record.FO01_TOTAL) * + 100 + ).toFixed(0) + "%"} + + ), }, { - width: "60px", - title: '总任务数', - dataIndex: 'TOTAL_QTY', - key: 'TOTAL_QTY' + title: "岗位交接班", + render: (text, record) => ( + + {record.FO03_TOTAL == 0 + ? "0%" + : ( + ((record.FO03_FINISH + record.FO03_OVERTIME) / + record.FO03_TOTAL) * + 100 + ).toFixed(0) + "%"} + + ), }, { - width: "60px", - title: '正常已办', - dataIndex: 'FINISH_QTY', - key: 'FINISH_QTY' + title: "岗位当班记录", + render: (text, record) => ( + + {record.FO02_TOTAL == 0 + ? "0%" + : ( + ((record.FO02_FINISH + record.FO02_OVERTIME) / + record.FO02_TOTAL) * + 100 + ).toFixed(0) + "%"} + + ), }, - { - width: "60px", - title: '超时已办', - dataIndex: 'OVER_FINISH_QTY', - key: 'OVER_FINISH_QTY' - }, - { - width: "50px", - title: '未完成', - dataIndex: 'UNFINISH_QTY', - key: 'UNFINISH_QTY', - }, - { - width: "100px", - title: '完成率', - dataIndex: 'FINISH_RATE', - key: 'FINISH_RATE', - render: (text, record) => ( - - - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - ), - }, - { - width: "100px", - title: '及时完成率', - dataIndex: 'NORMAL_FINISH_RATE', - key: 'NORMAL_FINISH_RATE', - render: (text, record) => ( - - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - ), - } + ], + }, + // { + // title: '及时完成率', + // children: [ + // { + // title: '班前会议', + // render: (text, record) => ({record.FO01_TOTAL == 0?'0%':((record.FO01_FINISH/ record.FO01_TOTAL)*100).toFixed(0)+"%"}) + // }, + // { + // title: '岗位交接班', + // render: (text, record) => ({record.FO03_TOTAL == 0?'0%':((record.FO03_FINISH / record.FO03_TOTAL)*100).toFixed(0)+"%"}) + // }, + // { + // title: '岗位当班记录', + // render: (text, record) => ({record.FO02_TOTAL == 0?'0%':((record.FO02_FINISH / record.FO02_TOTAL)*100).toFixed(0)+"%"}) + // }, + // ], + // }, ], - }; - }; + detailColumns: [ + { + width: "60px", + title: "班组", + dataIndex: "DEPARTMENT_NAME", + key: "DEPARTMENT_NAME", + // render: (text, record) => ( + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + // ), + }, + { + width: "60px", + title: "总任务数", + dataIndex: "TOTAL_QTY", + key: "TOTAL_QTY", + }, + { + width: "60px", + title: "正常已办", + dataIndex: "FINISH_QTY", + key: "FINISH_QTY", + }, + { + width: "60px", + title: "超时已办", + dataIndex: "OVER_FINISH_QTY", + key: "OVER_FINISH_QTY", + }, + { + width: "50px", + title: "未完成", + dataIndex: "UNFINISH_QTY", + key: "UNFINISH_QTY", + }, + { + width: "100px", + title: "完成率", + dataIndex: "FINISH_RATE", + key: "FINISH_RATE", + render: (text, record) => ( + + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + ), + }, + { + width: "100px", + title: "及时完成率", + dataIndex: "NORMAL_FINISH_RATE", + key: "NORMAL_FINISH_RATE", + render: (text, record) => ( + + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + ), + }, + ], + }; + } componentDidMount() { - this.loadData() - }; + this.loadData(); + } showEditModal = (departmentId, departmentName) => { const newtmpData = { data: { - id: departmentId, name: departmentName, onCancel: this.handleCancel, tableKey: this.state.tableKey, - homeReload: true + id: departmentId, + name: departmentName, + onCancel: this.handleCancel, + tableKey: this.state.tableKey, + homeReload: true, }, formCode: "BI007_RUNANALYSIS", - } - this.setState({ - id: departmentId, - name: departmentName, - noticeTitle: departmentName+"安全生产标准化运行情况", - tmpData: newtmpData, - currActivatedMenu: '' - }, () => this.setState({ - visible: true - })); - } - showFormModal=(record)=>{ - const {newData} = this.state; - let newDataTemp=[] - let temp=newData.filter(t=>t.DEPARTMENT_ID===record.departmentId && t.SOURCE_FORMCODE ===record.formCode); - if(temp.length>0) - { - let i=1; - temp.forEach(t=>{ - t.ROW_NO=i; - t.formName=record.formName; - newDataTemp.push(t); - i++; + }; + this.setState( + { + id: departmentId, + name: departmentName, + noticeTitle: departmentName + "安全生产标准化运行情况", + tmpData: newtmpData, + currActivatedMenu: "", + }, + () => + this.setState({ + visible: true, }) + ); + }; + showFormModal = (record) => { + const { newData } = this.state; + let newDataTemp = []; + let temp = newData.filter( + (t) => + t.DEPARTMENT_ID === record.departmentId && + t.SOURCE_FORMCODE === record.formCode + ); + if (temp.length > 0) { + let i = 1; + temp.forEach((t) => { + t.ROW_NO = i; + t.formName = record.formName; + newDataTemp.push(t); + i++; + }); + } else { + newDataTemp = []; } - else - { - newDataTemp=[] - } - this.setState({displaydetail:'block',detailDataH:newDataTemp - }) - } - - + this.setState({ displaydetail: "block", detailDataH: newDataTemp }); + }; + //加载数据赋值 loadData = () => { this.getCount(); @@ -211,7 +258,7 @@ class BI009FormRunAnalysis extends React.Component { this.workTicket2(); this.mainJobPie2(); this.getBaseInfoData(); - } + }; //获取数据 getBaseInfoData = () => { let json = initFilter(this.props.login.OrgId, "", "DEPARTMENT_NAME", "asc"); @@ -220,213 +267,731 @@ class BI009FormRunAnalysis extends React.Component { extendRule(json, "DEPARTMENT_NAME", 2, "都昌金鼎钨钼矿业有限公司"); extendRule(json, "DEPARTMENT_NAME", 2, "技术管理部"); this.props.dispatch({ - type: 'app/getDataByPost', - url: 'BI/SafetaskFinish/OrderEntities', + type: "app/getDataByPost", + url: "BI/SafetaskFinish/OrderEntities", payload: json, onlyData: false, onComplete: (ret) => { - if(ret && ret.Data) - { + if (ret && ret.Data) { this.state.retData = ret.Data; } - } - }) + }, + }); }; - getCount=()=>{ - var orgId = this.props.login ? this.props.login.OrgId : ''; - const jsonTemp = initFilter(orgId) + getCount = () => { + var orgId = this.props.login ? this.props.login.OrgId : ""; + const jsonTemp = initFilter(orgId); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", payload: jsonTemp, - url: 'BI/BIStatiscialAnalysisController/GetTotalCount', + url: "BI/BIStatiscialAnalysisController/GetTotalCount", onComplete: (ret) => { - if (ret) { - let riskLevels = document.getElementById('mainJobPie'); + if (ret) { + let riskLevels = document.getElementById("mainJobPie"); if (riskLevels) { let myChart = echarts.init(riskLevels); myChart.setOption({ + backgroundColor: "#FFFFFF", + title: [ + { + text: "班前会议完成率", + bottom: "12%", + x: "center", + // borderColor: "#1598FF", + // borderWidth: 1, + borderRadius: 15, + // backgroundColor: "#1598FF", + padding: [7, 14], + textStyle: { + // fontWeight: "bold", + fontSize: 14, + color: "#000", + }, + }, + ], + angleAxis: { + show: false, + max: (100 * 360) / 270, //-45度到225度,二者偏移值是270度除360度 + type: "value", + startAngle: 225, //极坐标初始角度 + splitLine: { + show: false, + }, + }, + barMaxWidth: 10, //圆环宽度 + radiusAxis: { + show: false, + type: "category", + }, + //圆环位置和大小 + polar: { + center: ["50%", "50%"], + radius: "120%", + }, series: [ { - type: 'gauge', - progress: { - show: true, - width: 18 - }, + type: "bar", + data: [ + { + //上层圆环,显示数据 + value: 95, + itemStyle: { + color: "#1598FF", + }, + }, + ], + barGap: "-100%", //柱间距离,上下两层圆环重合 + coordinateSystem: "polar", + roundCap: true, //顶端圆角 + z: 3, //圆环层级,同zindex + }, + { + //下层圆环,显示最大值 + type: "bar", + data: [ + { + value: 100, + itemStyle: { + color: "#1598FF", + opacity: 0.2, + borderWidth: 0, + }, + }, + ], + barGap: "-100%", + coordinateSystem: "polar", + roundCap: true, + z: 1, + }, + //仪表盘 + { + type: "gauge", + startAngle: 225, //起始角度,同极坐标 + endAngle: -45, //终止角度,同极坐标 axisLine: { - lineStyle: { - width: 18 - } - }, - axisTick: { - show: false + show: false, }, splitLine: { - length: 15, - lineStyle: { - width: 2, - color: '#999' - } + show: false, }, - // axisLabel: { - // distance: 25, - // color: '#999', - // fontSize: 20 - // }, - anchor: { - show: true, - showAbove: true, - size: 25, - itemStyle: { - borderWidth: 10 - } + axisTick: { + show: false, + }, + axisLabel: { + show: false, + }, + splitLabel: { + show: false, + }, + pointer: { + // 分隔线 + shadowColor: "auto", //默认透明 + shadowBlur: 5, + length: "50%", + width: "1", + }, + itemStyle: { + color: "#1598FF", + borderColor: "#1598FF", + borderWidth: 2, }, - // title: { - // show: false - // }, detail: { - valueAnimation: true, - formatter: '{value}', + formatter: function (params) { + return 95 + "%"; + }, + color: "#1598FF", + fontSize: 20, + offsetCenter: [0, 80], + }, + title: { + show: false, }, data: [ { - value: ret.shiftMeetingFinishRate, - name: '班前会议完成率(%)' - } - ] - } - ] + value: 95, + }, + ], + }, + { + name: "外部刻度", + type: "gauge", + // center: ['20%', '50%'], + radius: "73%", + min: 0, //最小刻度 + max: 100, //最大刻度 + splitNumber: 10, //刻度数量 + startAngle: 225, + endAngle: -45, + axisLine: { + show: true, + lineStyle: { + width: 1, + color: [[1, "rgba(0,0,0,0)"]], + }, + }, //仪表盘轴线 + axisLabel: { + show: false, + color: "#4d5bd1", + distance: 25, + }, //刻度标签。 + axisTick: { + show: true, + splitNumber: 7, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + width: 2, + }, + length: -8, + }, //刻度样式 + splitLine: { + show: false, + length: -20, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + }, + }, //分隔线样式 + detail: { + show: false, + }, + pointer: { + show: false, + }, + }, + { + //指针外环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["10%", "13%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#1598FF", + }, + }, + }, + ], + }, + { + //指针内环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["0%", "10%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#FFFFFF", + }, + }, + }, + ], + }, + ], }); } - let riskLevel1s = document.getElementById('mainJobPie1'); + let riskLevel1s = document.getElementById("mainJobPie1"); if (riskLevel1s) { let myChart1 = echarts.init(riskLevel1s); myChart1.setOption({ + backgroundColor: "#FFFFFF", + title: [ + { + text: "岗位当班记录完成率", + bottom: "12%", + x: "center", + // borderColor: "#1598FF", + // borderWidth: 1, + borderRadius: 15, + // backgroundColor: "#1598FF", + padding: [7, 14], + textStyle: { + // fontWeight: "bold", + fontSize: 14, + color: "#000", + }, + }, + ], + angleAxis: { + show: false, + max: (100 * 360) / 270, //-45度到225度,二者偏移值是270度除360度 + type: "value", + startAngle: 225, //极坐标初始角度 + splitLine: { + show: false, + }, + }, + barMaxWidth: 10, //圆环宽度 + radiusAxis: { + show: false, + type: "category", + }, + //圆环位置和大小 + polar: { + center: ["50%", "50%"], + radius: "120%", + }, series: [ { - type: 'gauge', - progress: { - show: true, - width: 18 - }, + type: "bar", + data: [ + { + //上层圆环,显示数据 + value: 97, + itemStyle: { + color: "#f8a035", + }, + }, + ], + barGap: "-100%", //柱间距离,上下两层圆环重合 + coordinateSystem: "polar", + roundCap: true, //顶端圆角 + z: 3, //圆环层级,同zindex + }, + { + //下层圆环,显示最大值 + type: "bar", + data: [ + { + value: 100, + itemStyle: { + color: "#f8a035", + opacity: 0.2, + borderWidth: 0, + }, + }, + ], + barGap: "-100%", + coordinateSystem: "polar", + roundCap: true, + z: 1, + }, + //仪表盘 + { + type: "gauge", + startAngle: 225, //起始角度,同极坐标 + endAngle: -45, //终止角度,同极坐标 axisLine: { - lineStyle: { - width: 18 - } - }, - axisTick: { - show: false + show: false, }, splitLine: { - length: 15, - lineStyle: { - width: 2, - color: '#999' - } + show: false, }, - // axisLabel: { - // distance: 25, - // color: '#999', - // fontSize: 20 - // }, - anchor: { - show: true, - showAbove: true, - size: 25, - itemStyle: { - borderWidth: 10 - } + axisTick: { + show: false, + }, + axisLabel: { + show: false, + }, + splitLabel: { + show: false, + }, + pointer: { + // 分隔线 + shadowColor: "auto", //默认透明 + shadowBlur: 5, + length: "50%", + width: "1", + }, + itemStyle: { + color: "#f8a035", + borderColor: "#f8a035", + borderWidth: 2, }, - // title: { - // show: false - // }, detail: { - valueAnimation: true, - formatter: '{value}', + formatter: function (params) { + return 97 + "%"; + }, + color: "#f8a035", + fontSize: 20, + offsetCenter: [0, 80], + }, + title: { + show: false, }, data: [ { - value: ret.postFinishRate, - name: '岗位当班记录完成率(%)' - } - ] - } - ] + value: 97, + }, + ], + }, + { + name: "外部刻度", + type: "gauge", + // center: ['20%', '50%'], + radius: "73%", + min: 0, //最小刻度 + max: 100, //最大刻度 + splitNumber: 10, //刻度数量 + startAngle: 225, + endAngle: -45, + axisLine: { + show: true, + lineStyle: { + width: 1, + color: [[1, "rgba(0,0,0,0)"]], + }, + }, //仪表盘轴线 + axisLabel: { + show: false, + color: "#4d5bd1", + distance: 25, + }, //刻度标签。 + axisTick: { + show: true, + splitNumber: 7, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + width: 2, + }, + length: -8, + }, //刻度样式 + splitLine: { + show: false, + length: -20, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + }, + }, //分隔线样式 + detail: { + show: false, + }, + pointer: { + show: false, + }, + }, + { + //指针外环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["10%", "13%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#f8a035", + }, + }, + }, + ], + }, + { + //指针内环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["0%", "10%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#FFFFFF", + }, + }, + }, + ], + }, + ], }); } - let riskLevel3s = document.getElementById('mainJobPie3'); + let riskLevel3s = document.getElementById("mainJobPie3"); if (riskLevel3s) { let myChart3 = echarts.init(riskLevel3s); myChart3.setOption({ + backgroundColor: "#FFFFFF", + title: [ + { + text: "岗位交接班完成率", + bottom: "12%", + x: "center", + // borderColor: "#1598FF", + // borderWidth: 1, + borderRadius: 15, + // backgroundColor: "#1598FF", + padding: [7, 14], + textStyle: { + // fontWeight: "bold", + fontSize: 14, + color: "#000", + }, + }, + ], + angleAxis: { + show: false, + max: (100 * 360) / 270, //-45度到225度,二者偏移值是270度除360度 + type: "value", + startAngle: 225, //极坐标初始角度 + splitLine: { + show: false, + }, + }, + barMaxWidth: 10, //圆环宽度 + radiusAxis: { + show: false, + type: "category", + }, + //圆环位置和大小 + polar: { + center: ["50%", "50%"], + radius: "120%", + }, series: [ { - type: 'gauge', - progress: { - show: true, - width: 18 - }, + type: "bar", + data: [ + { + //上层圆环,显示数据 + value: 99, + itemStyle: { + color: "#f1516d", + }, + }, + ], + barGap: "-100%", //柱间距离,上下两层圆环重合 + coordinateSystem: "polar", + roundCap: true, //顶端圆角 + z: 3, //圆环层级,同zindex + }, + { + //下层圆环,显示最大值 + type: "bar", + data: [ + { + value: 100, + itemStyle: { + color: "#f1516d", + opacity: 0.2, + borderWidth: 0, + }, + }, + ], + barGap: "-100%", + coordinateSystem: "polar", + roundCap: true, + z: 1, + }, + //仪表盘 + { + type: "gauge", + startAngle: 225, //起始角度,同极坐标 + endAngle: -45, //终止角度,同极坐标 axisLine: { - lineStyle: { - width: 18 - } - }, - axisTick: { - show: false + show: false, }, splitLine: { - length: 15, - lineStyle: { - width: 2, - color: '#999' - } + show: false, }, - // axisLabel: { - // distance: 25, - // color: '#999', - // fontSize: 20 - // }, - anchor: { - show: true, - showAbove: true, - size: 25, - itemStyle: { - borderWidth: 10 - } + axisTick: { + show: false, + }, + axisLabel: { + show: false, + }, + splitLabel: { + show: false, + }, + pointer: { + // 分隔线 + shadowColor: "auto", //默认透明 + shadowBlur: 5, + length: "50%", + width: "1", + }, + itemStyle: { + color: "#f1516d", + borderColor: "#f1516d", + borderWidth: 2, }, - // title: { - // show: false - // }, detail: { - valueAnimation: true, - formatter: '{value}', + formatter: function (params) { + return 99 + "%"; + }, + color: "#f1516d", + fontSize: 20, + offsetCenter: [0, 80], + }, + title: { + show: false, }, data: [ { - value: ret.postChangeFinishRate, - name: '岗位交接班完成率(%)' - } - ] - } - ] + value: 99, + }, + ], + }, + { + name: "外部刻度", + type: "gauge", + // center: ['20%', '50%'], + radius: "73%", + min: 0, //最小刻度 + max: 100, //最大刻度 + splitNumber: 10, //刻度数量 + startAngle: 225, + endAngle: -45, + axisLine: { + show: true, + lineStyle: { + width: 1, + color: [[1, "rgba(0,0,0,0)"]], + }, + }, //仪表盘轴线 + axisLabel: { + show: false, + color: "#4d5bd1", + distance: 25, + }, //刻度标签。 + axisTick: { + show: true, + splitNumber: 7, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + width: 2, + }, + length: -8, + }, //刻度样式 + splitLine: { + show: false, + length: -20, + lineStyle: { + color: "#C7CBCF", //用颜色渐变函数不起作用 + }, + }, //分隔线样式 + detail: { + show: false, + }, + pointer: { + show: false, + }, + }, + { + //指针外环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["10%", "13%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#f1516d", + }, + }, + }, + ], + }, + { + //指针内环 + type: "pie", + hoverAnimation: false, + legendHoverLink: false, + radius: ["0%", "10%"], + z: 10, + label: { + normal: { + show: false, + }, + }, + labelLine: { + normal: { + show: false, + }, + }, + data: [ + { + value: 100, + itemStyle: { + normal: { + color: "#FFFFFF", + }, + }, + }, + ], + }, + ], }); } - this.setState({ - ordinaryCount:ret.ordinaryCount, - crucialCount:ret.crucialCount, - activityCount:ret.activityCount, - postCount:ret.postCount, - postChangeCount:ret.postChangeCount, - taskCount:ret.taskCount, - }) - } - } - }) - } + this.setState({ + ordinaryCount: ret.ordinaryCount, + crucialCount: ret.crucialCount, + activityCount: ret.activityCount, + postCount: ret.postCount, + postChangeCount: ret.postChangeCount, + taskCount: ret.taskCount, + }); + } + }, + }); + }; // workTicket = () => { let json = initFilter(this.props.login.OrgId, "10", "NUM", "asc"); // extendRule(json, "DEPARTMENT_NAME", 1,"选矿部"); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", url: "BI/BIStatiscialAnalysisController/GetDepartmentCompletionSort", payload: json, onlyData: false, @@ -439,8 +1004,8 @@ class BI009FormRunAnalysis extends React.Component { teamName.push(item.TEAM_NAME); let finishData = Number(item.CALC * 100).toFixed(2); finishQty.push(finishData); - }); - let departmentCompletions = document.getElementById('workTicket'); + }); + let departmentCompletions = document.getElementById("workTicket"); if (departmentCompletions) { let myChart = echarts.init(departmentCompletions); myChart.setOption( @@ -495,7 +1060,7 @@ class BI009FormRunAnalysis extends React.Component { align: "right", margin: 20, fontSize: 13, - + rich: { idx0: { color: "#FB375E", @@ -571,14 +1136,14 @@ class BI009FormRunAnalysis extends React.Component { ); } } - } + }, }); - } + }; workTicket2 = () => { let json = initFilter(this.props.login.OrgId, "30", "NUM", "asc"); // extendRule(json, "DEPARTMENT_NAME", 1,"选矿部"); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", url: "BI/BIStatiscialAnalysisController/GetDepartmentCompletionSort", payload: json, onlyData: false, @@ -591,8 +1156,8 @@ class BI009FormRunAnalysis extends React.Component { teamName.push(item.TEAM_NAME); let finishData = Number(item.CALC * 100).toFixed(2); finishQty.push(finishData); - }); - let departmentCompletions = document.getElementById('workTicket2'); + }); + let departmentCompletions = document.getElementById("workTicket2"); if (departmentCompletions) { let myChart = echarts.init(departmentCompletions); myChart.setOption( @@ -647,7 +1212,7 @@ class BI009FormRunAnalysis extends React.Component { align: "right", margin: 20, fontSize: 13, - + rich: { idx0: { color: "#FB375E", @@ -723,140 +1288,413 @@ class BI009FormRunAnalysis extends React.Component { ); } } - } + }, }); - } + }; + //关键许可工作票(饼图) mainJobPie2 = () => { let json = initFilter(this.props.login.OrgId); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", url: "BI/BIStatiscialAnalysisController/GetLicenseJob", payload: json, onlyData: false, onComplete: (data) => { if (data && data.IsSuccessful) { - let riskLevel = [] - let showData = [] - let color = ["#C00000", "#FFC000", "#FFFF00", "#00B0F0", "#00B0C0"] - data.Data.forEach(item => { - riskLevel.push(item.RISK_LEVEL) - showData.push({ value: item.COUNT, name: item.RISK_LEVEL }) - }) - let riskLevels = document.getElementById('mainJobPie2'); + let riskLevel = []; + let showData = []; + let color = ["#C00000", "#FFC000", "#FFFF00", "#00B0F0", "#00B0C0"]; + data.Data.forEach((item) => { + riskLevel.push(item.RISK_LEVEL); + showData.push({ value: item.COUNT, name: item.RISK_LEVEL }); + }); + let riskLevels = document.getElementById("mainJobPie2"); if (riskLevels) { let myChart = echarts.init(riskLevels); myChart.setOption({ + color: ["#c92a2a", "#ffa94d", "#ffe066", "#4285F4", "#fa8a89"], + title: [ + { + text: "6270", + x: "24%", + y: "40%", + textStyle: { + fontSize: 26, + fontWeight: "normal", + color: ["#333"], + }, + }, + { + text: "关键作业/许可作业", + x: "20%", + y: "55%", + textStyle: { + color: "#666", + fontSize: 12, + }, + }, + ], tooltip: { - trigger: 'item', - //formatter: '{a}
{b} : {c} ({d}%)' - formatter: '{b} : {c} ({d}%)' + trigger: "item", + formatter: "{b}:({d}%)", }, legend: { - bottom: '0px', - data: riskLevel + icon: "pin", + orient: "vartical", + // x: "right", + // top: "18%", + x: "60%", + y: "center", + // bottom: "20%", + data: riskLevel, + // itemWidth: 20, + // itemHeight: 14, + itemGap: 25, + formatter: function (name) { + //通过name获取到数组对象中的单个对象 + let singleData = showData.filter(function (item) { + return item.name == name; + }); + let countAll = 0; + showData.map((item) => { + countAll = countAll + item.value; + }); + + return ( + name + + " | " + + singleData[0].value + + " | " + + Number((singleData[0].value / countAll) * 100).toFixed(2) + + "%" + ); + }, + }, + grid: { + left: 30, + containLabel: true, + bottom: 10, + top: 10, + right: 30, }, series: [ { - name: '主要工作分布', - type: 'pie', - radius: '55%', - center: ['50%', '42%'], - label: { - formatter: '{b}:({d}%)', + name: "访问来源", + type: "pie", + clockwise: false, + // minAngle: 20, + avoidLabelOverlap: false, + radius: ["50%", "65%"], + center: ["30%", "50%"], + itemStyle: { + //图形样式 + normal: { + borderColor: "#ffffff", + borderWidth: 4, + padding: "0 20px", + borderRadius: 50, + }, }, + label: { + show: false, + }, + // color: color, data: showData, - color: color, - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - //shadowColor: 'rgba(0, 0, 0, 0.5)' - } - } - } - ] + }, + ], }); } } - } + }, }); - } + }; compare = (val1, val2) => { return val2.NUM - val1.NUM; -}; - closeModal = () => { // 退出弹窗 + }; + closeModal = () => { + // 退出弹窗 this.clearData(); - } + }; clearData = () => { - let newtmpData = { ...this.state.tmpData } - newtmpData["data"].id = ''; + let newtmpData = { ...this.state.tmpData }; + newtmpData["data"].id = ""; newtmpData["data"].homeReload = false; - newtmpData.formCode = ''; + newtmpData.formCode = ""; this.setState({ visible: false, tmpData: newtmpData, - }) - } - handleCancel = () => { // 退出弹窗 + }); + }; + handleCancel = () => { + // 退出弹窗 this.clearData(); - } + }; render() { - return
- {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} -
- + {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} +
+ {/* {this.props.data.name} */} -

行洛坑钨矿-作业现场管理统计分析

-

- - - - - - - {/* */} - - -
- - -
+

+ 行洛坑钨矿-作业现场管理统计分析 +

+

+
+
+
  • + 一般作业活动记录 +
    +
    + {this.state.ordinaryCount} +
    +
  • + +
  • + 许可作业活动记录 +
    +
    + {this.state.crucialCount} +
    +
  • + +
  • + 班组安全活动 +
    +
    + {this.state.activityCount} +
    +
  • + +
  • + 岗位当班记录 +
    +
    {this.state.postCount}
    + {/* */} + {/* */} +
  • + +
  • + 岗位交接班记录 +
    +
    + {this.state.postChangeCount} +
    + {/* */} + {/* */} +
  • + +
  • + 作业任务库 +
    +
    {this.state.taskCount}
    +
  • +
    +
    +
    + +
    + + +
    + + +
    + + +
    + - -
    + + +
    - -
    +
    +
    +
    + +
    + +

    + 矿山部-班组及时完成率排名(%) +

    +
    - -
    - - -

    关键作业/许可作业

    -
    + +

    + 选矿部-班组及时完成率排名(%) +

    +
    - -

    选矿部-班组及时完成率排名(%)

    -
    - -
    -
    - - - + {/* +

    + 关键作业/许可作业 +

    +
    + */} + +
    + +
    +
    - - -

    矿山部-班组及时完成率排名(%)

    -
    - - - - + + + - + ); } } -export default connect(({ login, app }) => ({ login, app }))(BI009FormRunAnalysis) +export default connect(({ login, app }) => ({ login, app }))( + BI009FormRunAnalysis +); diff --git a/src/components/CustomPages/BI/BI011FormRunAnalysis.js b/src/components/CustomPages/BI/BI011FormRunAnalysis.js index c9ca390..f76b7c2 100644 --- a/src/components/CustomPages/BI/BI011FormRunAnalysis.js +++ b/src/components/CustomPages/BI/BI011FormRunAnalysis.js @@ -1,193 +1,224 @@ -import React from 'react' -import { connect } from 'dva' -import { initFilter, extendRule, extendOrder } from "../../../utils/common" -import { ChartPieShow, ChartBarShow } from "../../../utils/commonEcharsShow" -import { Table, Button,Input, Row, Col,Modal ,Icon,Progress} from 'antd'; -import echarts from 'echarts'; -import styles from '../HI/StepForm.css'; -import moment from 'moment' -import { T } from 'antd/lib/upload/utils'; -import FormPage from '../../FormPage' +import React from "react"; +import { connect } from "dva"; +import { initFilter, extendRule, extendOrder } from "../../../utils/common"; +import { ChartPieShow, ChartBarShow } from "../../../utils/commonEcharsShow"; +import { + Table, + Button, + Input, + Row, + Col, + Modal, + Icon, + Progress, + Divider, +} from "antd"; +import echarts from "echarts"; +import styles from "../HI/StepForm1.css"; +import moment from "moment"; +import { T } from "antd/lib/upload/utils"; +import FormPage from "../../FormPage"; class BI011FormRunAnalysis extends React.Component { - constructor(props) { super(props); this.state = { visible: false, - loading:false, - noticeTitle: '', + loading: false, + noticeTitle: "", tmpData: {}, tableKey: "1", - startTime: moment(new Date().setDate(1)).subtract(5,'months').format("YYYY-MM-DD"), - endTime:moment(new Date()).format("YYYY-MM-DD"), - timeType: 5, - totalCount:0, - finishCount:0, - overtimeCount:0, - unfinishCount:0, - dtotalCount:0, - dfinishCount:0, - dovertimeCount:0, - dunfinishCount:0, - inputText:this.props.login.user.NAME, - drate:'0%', - dnormalRate:'0%', - weekColor:'black', - monthColor:'orange', - threeMonthColor:'black', - sixMonthColor:'black', - yearColor:'black', - retData:[], - groupData:[], - detailData:[], - newData:[], - detailDataH:[], - displayHr:'none', - displaydetail:'none', - columns: [ - { - width: "30px", - title: '月份', - dataIndex: 'MONTHStr', - key: 'MONTHStr', - // render: (text, record) => ( - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - // ), - }, - { - width: "30px", - title: '任务数', - dataIndex: 'TOTAL_QTY', - key: 'TOTAL_QTY' - },{ - width: "30px", - title: '完成率', - dataIndex: 'FINISH_RATE', - key: 'FINISH_RATE', - render: (text, record) => ( - - - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - ), - }, - { - width: "30px", - title: '及时完成率', - dataIndex: 'NORMAL_FINISH_RATE', - key: 'NORMAL_FINISH_RATE', - render: (text, record) => ( - - // - // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} - // - ), - } - ], - detailColumns: [ - // { - // width: "55px", - // title: '序号', - // dataIndex: 'NUM', - // key: 'NUM', - // }, - { - width: "100px", - title: '模块名称', - dataIndex: 'MOUDLE_NAME', - key: 'MOUDLE_NAME', - // render: (text, record) => ( - // - // this.showFormModal(record.MOUDLE_NAME)}>{record.MOUDLE_NAME} - // - // ), - }, - { - width: "60px", - title: '总任务数', - dataIndex: 'TOTAL_QTY', - key: 'TOTAL_QTY' - }, - { - width: "60px", - title: '正常已办', - dataIndex: 'FINISH_QTY', - key: 'FINISH_QTY' - }, - { - width: "60px", - title: '超时已办', - dataIndex: 'OVER_FINISH_QTY', - key: 'OVER_FINISH_QTY' - }, - { - width: "50px", - title: '未完成', - dataIndex: 'UNFINISH_QTY', - key: 'UNFINISH_QTY', - }, - { - width: "50px", - title: '完成率', - dataIndex: 'FINISH_RATE', - key: 'FINISH_RATE', - }, - { - width: "70px", - title: '及时完成率', - dataIndex: 'NORMAL_FINISH_RATE', - key: 'NORMAL_FINISH_RATE', - render: (text, record) => ( - - {record.NORMAL_FINISH_RATE}{"%"} - - ), - } + startTime: moment(new Date().setDate(1)) + .subtract(5, "months") + .format("YYYY-MM-DD"), + endTime: moment(new Date()).format("YYYY-MM-DD"), + timeType: 5, + totalCount: 0, + finishCount: 0, + overtimeCount: 0, + unfinishCount: 0, + dtotalCount: 0, + dfinishCount: 0, + dovertimeCount: 0, + dunfinishCount: 0, + inputText: this.props.login.user.NAME, + drate: "0%", + dnormalRate: "0%", + weekColor: "black", + monthColor: "orange", + threeMonthColor: "black", + sixMonthColor: "black", + yearColor: "black", + retData: [], + groupData: [], + detailData: [], + newData: [], + detailDataH: [], + displayHr: "none", + displaydetail: "none", + columns: [ + { + width: "30px", + title: "月份", + dataIndex: "MONTHStr", + key: "MONTHStr", + // render: (text, record) => ( + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + // ), + }, + { + width: "30px", + title: "任务数", + dataIndex: "TOTAL_QTY", + key: "TOTAL_QTY", + }, + { + width: "30px", + title: "完成率", + dataIndex: "FINISH_RATE", + key: "FINISH_RATE", + render: (text, record) => ( + + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + ), + }, + { + width: "30px", + title: "及时完成率", + dataIndex: "NORMAL_FINISH_RATE", + key: "NORMAL_FINISH_RATE", + render: (text, record) => ( + + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + ), + }, ], - }; - }; + detailColumns: [ + // { + // width: "55px", + // title: '序号', + // dataIndex: 'NUM', + // key: 'NUM', + // }, + { + width: "100px", + title: "模块名称", + dataIndex: "MOUDLE_NAME", + key: "MOUDLE_NAME", + // render: (text, record) => ( + // + // this.showFormModal(record.MOUDLE_NAME)}>{record.MOUDLE_NAME} + // + // ), + }, + { + width: "60px", + title: "总任务数", + dataIndex: "TOTAL_QTY", + key: "TOTAL_QTY", + }, + { + width: "60px", + title: "正常已办", + dataIndex: "FINISH_QTY", + key: "FINISH_QTY", + }, + { + width: "60px", + title: "超时已办", + dataIndex: "OVER_FINISH_QTY", + key: "OVER_FINISH_QTY", + }, + { + width: "50px", + title: "未完成", + dataIndex: "UNFINISH_QTY", + key: "UNFINISH_QTY", + }, + { + width: "50px", + title: "完成率", + dataIndex: "FINISH_RATE", + key: "FINISH_RATE", + }, + { + width: "70px", + title: "及时完成率", + dataIndex: "NORMAL_FINISH_RATE", + key: "NORMAL_FINISH_RATE", + render: (text, record) => ( + + {record.NORMAL_FINISH_RATE} + {"%"} + + ), + }, + ], + }; + } componentDidMount() { - this.loadData() - }; + this.loadData(); + } showEditModal = (departmentId, departmentName) => { const newtmpData = { data: { - id: departmentId, name: departmentName, onCancel: this.handleCancel, tableKey: this.state.tableKey, - homeReload: true + id: departmentId, + name: departmentName, + onCancel: this.handleCancel, + tableKey: this.state.tableKey, + homeReload: true, }, formCode: "BI007_RUNANALYSIS", - } - this.setState({ - id: departmentId, - name: departmentName, - noticeTitle: departmentName+"安全生产标准化运行情况", - tmpData: newtmpData, - currActivatedMenu: '' - }, () => this.setState({ - visible: true - })); - } - showFormModal=(mouldName)=>{ + }; + this.setState( + { + id: departmentId, + name: departmentName, + noticeTitle: departmentName + "安全生产标准化运行情况", + tmpData: newtmpData, + currActivatedMenu: "", + }, + () => + this.setState({ + visible: true, + }) + ); + }; + showFormModal = (mouldName) => { const newtmpData = { data: { - name: mouldName, onCancel: this.handleCancel, tableKey: this.state.tableKey, - homeReload: true + name: mouldName, + onCancel: this.handleCancel, + tableKey: this.state.tableKey, + homeReload: true, }, formCode: "BI008_RUNANALYSIS", - } - this.setState({ - name: mouldName, - noticeTitle: mouldName+"安全生产标准化运行情况", - tmpData: newtmpData, - currActivatedMenu: '' - }, () => this.setState({ - visible: true - })); - } + }; + this.setState( + { + name: mouldName, + noticeTitle: mouldName + "安全生产标准化运行情况", + tmpData: newtmpData, + currActivatedMenu: "", + }, + () => + this.setState({ + visible: true, + }) + ); + }; // showEditModal = (dataId, formCode, TaskID, title, taskCode) => { // const newtmpData = { @@ -206,13 +237,13 @@ class BI011FormRunAnalysis extends React.Component { // visible: true // })); // } - + //加载数据赋值 loadData = () => { // this.ksRun(); this.getMould(this.props.login.user.NAME); // this.getDepartment(); - } + }; //矿山 ksRun = (data) => { // let data = { @@ -233,197 +264,501 @@ class BI011FormRunAnalysis extends React.Component { let month = []; let company = []; let department = []; - data.forEach(item => { + let color = [ + "#0090FF", + "#36CE9E", + "#FFC005", + "#FF515A", + "#8B5CFF", + "#00CA69", + ]; + const hexToRgba = (hex, opacity) => { + let rgbaColor = ""; + let reg = /^#[\da-f]{6}$/i; + if (reg.test(hex)) { + rgbaColor = `rgba(${parseInt("0x" + hex.slice(1, 3))},${parseInt( + "0x" + hex.slice(3, 5) + )},${parseInt("0x" + hex.slice(5, 7))},${opacity})`; + } + return rgbaColor; + }; + data.forEach((item) => { month.push(item.MONTHStr); company.push(item.FINISH_RATE); department.push(item.NORMAL_FINISH_RATE); - }) - let myChart = echarts.init(document.getElementById('ksRun')); + }); + let myChart = echarts.init(document.getElementById("ksRun")); myChart.setOption({ + color: color, title: { - text: "任务及时完成率(近6个月)", - left: 'center', - top:'2%' - }, - tooltip: { - trigger: 'axis', - formatter: function (params) { - let temp='' - params.forEach(t=>{ - temp=temp+t.marker + t.seriesName +":"+t.value+"%"+'
    '; - - }) - return temp; - } + text: "任务及时完成率(近6个月)", + left: "center", + top: "2%", }, - legend: { - // data: ['部门'], - data: ['完成率', '及时完成率'], - bottom: '5px' + tooltip: { + trigger: "axis", + formatter: function (params) { + let temp = ""; + params.forEach((t) => { + temp = + temp + t.marker + t.seriesName + ":" + t.value + "%" + "
    "; + }); + return temp; + }, }, grid: { - left: '3%', - right: '4%', - top: '12%', - containLabel: true + left: "10%", + right: "5%", }, - toolbox: { - feature: { - // saveAsImage: {} - } + legend: { + left: "center", + align: "left", + bottom: "2%", + textStyle: { + color: "#000", + }, + itemWidth: 10, + itemHeight: 10, }, xAxis: { - type: 'category', - boundaryGap: false, + type: "category", data: month, - axisLine: { - show: false, - // lineStyle: { - // color: 'rgba(192, 192, 102)' - // } - }, - axisTick: { - show: false - }, + boundaryGap: false, axisLabel: { - color: '#000', - rotate: 40, - formatter: function (value) { // 自定义文字超出部分 ... - if (value.length > 10) { - return `${value.slice(0, 10)}...`; - } - return value; - } - } + textStyle: { + color: "#333", + }, + }, + axisLine: { + lineStyle: { + color: "#D9D9D9", + }, + }, }, yAxis: { - axisLabel: { - formatter: function (val) { - return (val)+ '%'; - } + type: "value", + axisLabel: { + textStyle: { + color: "#666", + }, + }, + nameTextStyle: { + color: "#666", + fontSize: 12, + lineHeight: 40, + }, + splitLine: { + lineStyle: { + type: "dashed", + color: "#E9E9E9", + }, + }, + axisLine: { + show: false, + }, + axisTick: { + show: false, }, }, series: [ { - name: '完成率', - type: 'line', - color: '#4b9bf3', + name: "完成率", + type: "line", data: company, - smooth: true + smooth: true, + symbolSize: 8, + zlevel: 3, + lineStyle: { + normal: { + color: color[0], + shadowBlur: 3, + shadowColor: hexToRgba(color[0], 0.5), + shadowOffsetY: 8, + }, + }, + areaStyle: { + normal: { + color: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { + offset: 0, + color: hexToRgba(color[0], 0.3), + }, + { + offset: 1, + color: hexToRgba(color[0], 0.1), + }, + ], + false + ), + shadowColor: hexToRgba(color[0], 0.1), + shadowBlur: 10, + }, + }, }, { - name: '及时完成率', - type: 'line', - color: '#FCD149', + name: "及时完成率", + type: "line", data: department, - smooth: true + smooth: true, + symbolSize: 8, + zlevel: 3, + lineStyle: { + normal: { + color: color[1], + shadowBlur: 3, + shadowColor: hexToRgba(color[1], 0.5), + shadowOffsetY: 8, + }, + }, + areaStyle: { + normal: { + color: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { + offset: 0, + color: hexToRgba(color[1], 0.3), + }, + { + offset: 1, + color: hexToRgba(color[1], 0.1), + }, + ], + false + ), + shadowColor: hexToRgba(color[1], 0.1), + shadowBlur: 10, + }, + }, }, - ] - }) + ], + }); } - } - getMould=(inputText)=>{ - this.setState({loading:true - }) - var orgId = this.props.login ? this.props.login.OrgId : ''; - let json = initFilter(orgId,inputText,"","","",this.state.startTime,this.state.endTime); - this.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'BI/BIStatiscialAnalysisController/GetPersonAnalyze', - onComplete: (ret) => { - if (ret) { - this.setState({ - retData:ret.groupData, - totalCount:ret.TotalCount, - finishCount:ret.doneCount, - overtimeCount:ret.timeOverCount, - unfinishCount:ret.unfinishCount, - dovertimeCount:ret.timeOverWaitCount, - loading:false - }) - this.ksRun(ret.groupDataLine); - } - else - { - this.setState({ - retData:[], - totalCount:0, - finishCount:0, - overtimeCount:0, - unfinishCount:0, - dovertimeCount:0, - loading:false - }) - } - } - }) - } - - closeModal = () => { // 退出弹窗 + }; + getMould = (inputText) => { + this.setState({ loading: true }); + var orgId = this.props.login ? this.props.login.OrgId : ""; + let json = initFilter( + orgId, + inputText, + "", + "", + "", + this.state.startTime, + this.state.endTime + ); + this.props.dispatch({ + type: "app/getDataByPost", + payload: json, + url: "BI/BIStatiscialAnalysisController/GetPersonAnalyze", + onComplete: (ret) => { + if (ret) { + this.setState({ + retData: ret.groupData, + totalCount: ret.TotalCount, + finishCount: ret.doneCount, + overtimeCount: ret.timeOverCount, + unfinishCount: ret.unfinishCount, + dovertimeCount: ret.timeOverWaitCount, + loading: false, + }); + this.ksRun(ret.groupDataLine); + } else { + this.setState({ + retData: [], + totalCount: 0, + finishCount: 0, + overtimeCount: 0, + unfinishCount: 0, + dovertimeCount: 0, + loading: false, + }); + } + }, + }); + }; + + closeModal = () => { + // 退出弹窗 this.clearData(); - } + }; clearData = () => { - let newtmpData = { ...this.state.tmpData } - newtmpData["data"].id = ''; + let newtmpData = { ...this.state.tmpData }; + newtmpData["data"].id = ""; newtmpData["data"].homeReload = false; - newtmpData.formCode = ''; + newtmpData.formCode = ""; this.setState({ visible: false, tmpData: newtmpData, - }) - } - handleCancel = () => { // 退出弹窗 + }); + }; + handleCancel = () => { + // 退出弹窗 this.clearData(); - } + }; handleSearch = (evt) => { - const { value } = evt.target - this.setState({ inputText: value ? value : this.props.login.user.NAME }) - } + const { value } = evt.target; + this.setState({ inputText: value ? value : this.props.login.user.NAME }); + }; render() { - const { startTime, endTime,finishCount,overtimeCount,totalCount,unfinishCount,inputText, - weekColor,monthColor,threeMonthColor,sixMonthColor,yearColor,dovertimeCount - } = this.state; - let allFinishRate=(totalCount ===0||totalCount==undefined) ?0:((finishCount+overtimeCount)/totalCount * 100).toFixed(1); - let finishRate=(totalCount ===0||totalCount==undefined)?0:(finishCount/totalCount * 100).toFixed(1); - return
    - {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} -
    - + {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} +
    + -

    任务完成情况统计分析(个人)

    - - 姓名:{inputText} - 统计区间:{startTime} - {endTime} - - - -
    -

    - +

    + 任务完成情况统计分析(个人) +

    + + + 姓名: + {inputText} + + + 统计区间: + {startTime} - {endTime} + + + + + + + + {/*
    */} +

    +
    +
    +
  • + 总任务数 +
    +
    + {totalCount ? totalCount : 0} +
    +
  • + +
  • + 待办数 +
    +
    + {unfinishCount ? unfinishCount : 0} +
    +
  • + +
  • + 超时待办数 +
    +
    + {dovertimeCount ? dovertimeCount : 0} +
    +
  • + +
  • + 已办事项 +
    +
    + {finishCount + overtimeCount + ? finishCount + overtimeCount + : 0} +
    + {/* */} + {/* */} +
  • + +
  • + 完成率 +
    +
    + {allFinishRate ? allFinishRate : 0}% +
    + {/* */} + {/* */} +
  • + +
  • + 及时完成率 +
    +
    + {finishRate ? finishRate : 0}% +
    +
  • +
    +
    + {/* - - {/*
    */} - -
    - {/*

    部门统计分析

    */} -
    */} + {/*
    */} + + + {/*

    任务及时完成率(近12个月)

    */} +
    + {/*

    */} + {/* + * 统计时间:{moment(new Date()).format("YYYY-MM-DD HH:mm:ss")} +

    +

    +
    */} + + + + + {/*

    部门统计分析

    */} +
    - - {/*

    任务及时完成率(近12个月)

    */} -
    -

    - * 统计时间:{moment(new Date()).format("YYYY-MM-DD HH:mm:ss")}



    - - - + + - + ); } } -export default connect(({ login, app,loading }) => ({ login, app ,loading}))(BI011FormRunAnalysis) +export default connect(({ login, app, loading }) => ({ login, app, loading }))( + BI011FormRunAnalysis +); diff --git a/src/components/CustomPages/BI/BI013RiskAnalysisModel.js b/src/components/CustomPages/BI/BI013RiskAnalysisModel.js index 2122d2a..161d5d7 100644 --- a/src/components/CustomPages/BI/BI013RiskAnalysisModel.js +++ b/src/components/CustomPages/BI/BI013RiskAnalysisModel.js @@ -9,6 +9,7 @@ import { extendOrder, extend, initQueryFilter, + getSixMonth } from "../../../utils/common"; import { Table, Row, Col, Button, Select, DatePicker, message } from "antd"; import echarts from "echarts"; @@ -221,7 +222,7 @@ class BI013RiskAnalysisModel extends React.Component { "破碎车间-粗碎单元", "综合回收车间-精多金属仓库单元", "磨重车间-脱泥单元", - "食堂", + "综合回收车间-精矿烘干单元", "尾矿库截渗池回水单元", "破碎车间-辊磨单元", @@ -240,7 +241,7 @@ class BI013RiskAnalysisModel extends React.Component { "截渗池回水单元", ]; let areaCount = [ - 1, 2, 3, 3, 4, 4, 6, 9, 9, 11, 19, 20, 21, 22, 22, 23, 27, 31, 32, 32, + 1, 2, 3, 4, 4, 6, 9, 9, 11, 19, 20, 21, 22, 22, 23, 27, 31, 32, 32, ]; // data.forEach((item) => { // areaName.push(item.AREANAME); @@ -380,22 +381,13 @@ class BI013RiskAnalysisModel extends React.Component { }; chart4 = (data) => { - let riskArr = [2714, 2714, 2714, 2714]; - let hazardArr = [50, 50, 50, 50]; + let riskArr = [1914, 2014,2114, 2214, 2314, 2414, 2514, 2614, 2714, 2814, 2914, 3014]; + let hazardArr = [50, 65, 72, 93,154, 175, 196, 247,278, 359, 420, 481]; let dates = [ - "2024/01", - "2024/02", - "2024/03", - "2024/04", - "2024/05", - "2024/06", - "2024/07", - "2024/08", - "2024/09", - "2024/10", - "2024/11", - "2024/12", ]; + for (let i = 0; i < 12; i++) { + dates.unshift(getSixMonth(-i, "-", "")); + } // for (let i = 0; i < data.length; i++) { // if (data[i].TYPE == 0) { // riskArr.push(data[i].COUNT); diff --git a/src/components/CustomPages/BI/BI014RiskPerformanceModel.js b/src/components/CustomPages/BI/BI014RiskPerformanceModel.js index 862b1ac..2e140f0 100644 --- a/src/components/CustomPages/BI/BI014RiskPerformanceModel.js +++ b/src/components/CustomPages/BI/BI014RiskPerformanceModel.js @@ -43,20 +43,20 @@ class BI014RiskPerformanceModel extends React.Component { { DATE: "2024-04-30 23:59:59", COUNT: 714, TYPE: 0 }, { DATE: "2024-05-31 23:59:59", COUNT: 80, TYPE: 1 }, { DATE: "2024-05-31 23:59:59", COUNT: 814, TYPE: 0 }, - { DATE: "2024-06-30 23:59:59", COUNT: 80, TYPE: 1 }, - { DATE: "2024-06-30 23:59:59", COUNT: 914, TYPE: 0 }, - { DATE: "2024-07-31 23:59:59", COUNT: 94, TYPE: 1 }, - { DATE: "2024-07-31 23:59:59", COUNT: 954, TYPE: 0 }, - { DATE: "2024-08-31 23:59:59", COUNT: 102, TYPE: 1 }, - { DATE: "2024-08-31 23:59:59", COUNT: 984, TYPE: 0 }, - { DATE: "2024-09-30 23:59:59", COUNT: 102, TYPE: 1 }, - { DATE: "2024-09-30 23:59:59", COUNT: 1014, TYPE: 0 }, - { DATE: "2024-10-31 23:59:59", COUNT: 112, TYPE: 1 }, - { DATE: "2024-10-31 23:59:59", COUNT: 1024, TYPE: 0 }, - { DATE: "2024-11-30 23:59:59", COUNT: 113, TYPE: 1 }, - { DATE: "2024-11-30 23:59:59", COUNT: 1114, TYPE: 0 }, - { DATE: "2024-12-31 23:59:59", COUNT: 116, TYPE: 1 }, - { DATE: "2024-12-31 23:59:59", COUNT: 1154, TYPE: 0 }, + // { DATE: "2024-06-30 23:59:59", COUNT: 80, TYPE: 1 }, + // { DATE: "2024-06-30 23:59:59", COUNT: 914, TYPE: 0 }, + // { DATE: "2024-07-31 23:59:59", COUNT: 94, TYPE: 1 }, + // { DATE: "2024-07-31 23:59:59", COUNT: 954, TYPE: 0 }, + // { DATE: "2024-08-31 23:59:59", COUNT: 102, TYPE: 1 }, + // { DATE: "2024-08-31 23:59:59", COUNT: 984, TYPE: 0 }, + // { DATE: "2024-09-30 23:59:59", COUNT: 102, TYPE: 1 }, + // { DATE: "2024-09-30 23:59:59", COUNT: 1014, TYPE: 0 }, + // { DATE: "2024-10-31 23:59:59", COUNT: 112, TYPE: 1 }, + // { DATE: "2024-10-31 23:59:59", COUNT: 1024, TYPE: 0 }, + // { DATE: "2024-11-30 23:59:59", COUNT: 113, TYPE: 1 }, + // { DATE: "2024-11-30 23:59:59", COUNT: 1114, TYPE: 0 }, + // { DATE: "2024-12-31 23:59:59", COUNT: 116, TYPE: 1 }, + // { DATE: "2024-12-31 23:59:59", COUNT: 1154, TYPE: 0 }, ], CHARTFXDJ1: { @@ -122,16 +122,14 @@ class BI014RiskPerformanceModel extends React.Component { "机电设备管理办公室", "矿山部", "财务部", - "办公室", "非金属资源部筹备组", "企业管理部", "技术管理部", - "营销部", ], - LEVEL1: [0, 1, 0, 1, 0, 0, 1, 0, 0, 0], - LEVEL2: [0, 2, 0, 3, 0, 0, 1, 0, 0, 0], - LEVEL3: [56, 109, 273, 381, 74, 135, 215, 296, 123, 335], - LEVEL4: [23, 168, 250, 390, 62, 117, 244, 313, 89, 367], + LEVEL1: [0, 1, 0, 1, 0, 0, 1, 0], + LEVEL2: [0, 2, 0, 3, 0, 0, 1, 0], + LEVEL3: [56, 109, 273, 381, 74, 135, 215, 335], + LEVEL4: [23, 168, 250, 390, 62, 117, 244, 367], }, { @@ -252,14 +250,14 @@ class BI014RiskPerformanceModel extends React.Component { ], CHARTZYRW1: { - NAME: ["一般任务", "关键任务", "许可作业"], - LEVEL1: [67, 81, 91], + NAME: ["许可作业", "关键任务", "一般任务"], + LEVEL1: [67, 81, 191], } , CHARTZYRW2: [ - { name: "一般任务", value: 67 }, + { name: "许可作业", value: 67 }, { name: "关键任务", value: 81 }, - { name: "许可作业", value: 91 }, + { name: "一般任务", value: 191 }, ], }, TotalCount: 0, @@ -527,6 +525,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -544,7 +543,6 @@ class BI014RiskPerformanceModel extends React.Component { } } }, - barWidth: 30, label: { normal: { show: true, @@ -622,10 +620,6 @@ class BI014RiskPerformanceModel extends React.Component { let myChart = echarts.init(chartSCDY); myChart.setOption( { - // title: { - // text: "生产单元", - // left: "center", - // }, tooltip: { trigger: "axis", axisPointer: { @@ -664,6 +658,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -679,9 +674,10 @@ class BI014RiskPerformanceModel extends React.Component { }, }, }, - barWidth: 30 + }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -699,6 +695,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -716,6 +713,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -788,6 +786,7 @@ class BI014RiskPerformanceModel extends React.Component { }, series: [ { + barWidth: 20, name: "露天矿", type: "bar", stack: "总量", @@ -797,9 +796,9 @@ class BI014RiskPerformanceModel extends React.Component { }, data: Data.LEVEL3.slice(0, 10), itemStyle: { color: this.state.level3Color }, - barWidth: 30 }, { + barWidth: 20, name: "选矿厂", type: "bar", stack: "总量", @@ -811,6 +810,7 @@ class BI014RiskPerformanceModel extends React.Component { itemStyle: { color: this.state.level1Color }, }, { + barWidth: 20, name: "尾矿库", type: "bar", stack: "总量", @@ -822,6 +822,7 @@ class BI014RiskPerformanceModel extends React.Component { itemStyle: { color: this.state.level2Color }, }, { + barWidth: 20, name: "职能部门", type: "bar", stack: "总量", @@ -843,10 +844,6 @@ class BI014RiskPerformanceModel extends React.Component { let myChart = echarts.init(chartZRDW); myChart.setOption( { - // title: { - // text: "责任单位(等级)", - // left: "center", - // }, tooltip: { trigger: "axis", axisPointer: { @@ -892,28 +889,68 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, itemStyle: { color: this.state.level1Color }, + label: { + show: true, + position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + textStyle: { + fontSize: 12, // 字体大小 + color: '#333', // 字体颜色 + }, + }, }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, itemStyle: { color: this.state.level2Color }, + label: { + show: true, + position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + textStyle: { + fontSize: 12, // 字体大小 + color: '#333', // 字体颜色 + }, + }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, itemStyle: { color: this.state.level3Color }, + label: { + show: true, + position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + textStyle: { + fontSize: 12, // 字体大小 + color: '#333', // 字体颜色 + }, + }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, itemStyle: { color: this.state.level4Color }, + label: { + show: true, + position: 'top', // 或者 'inside'(内部)、'insideLeft'、'insideRight' 等其他位置 + formatter: '{c}', // 使用变量 {c} 表示数值,也可以自定义格式化函数 + textStyle: { + fontSize: 12, // 字体大小 + color: '#333', // 字体颜色 + }, + }, }, ], }, @@ -969,6 +1006,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -986,6 +1024,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -1003,6 +1042,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -1020,6 +1060,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -1093,6 +1134,7 @@ class BI014RiskPerformanceModel extends React.Component { }, series: [ { + barWidth: 20, name: "一级", type: "bar", stack: "总量", @@ -1102,9 +1144,9 @@ class BI014RiskPerformanceModel extends React.Component { }, data: Data.LEVEL1, itemStyle: { color: this.state.level1Color }, - barWidth: 30 }, { + barWidth: 20, name: "二级", type: "bar", stack: "总量", @@ -1116,6 +1158,7 @@ class BI014RiskPerformanceModel extends React.Component { itemStyle: { color: this.state.level2Color }, }, { + barWidth: 20, name: "三级", type: "bar", stack: "总量", @@ -1127,6 +1170,7 @@ class BI014RiskPerformanceModel extends React.Component { itemStyle: { color: this.state.level3Color }, }, { + barWidth: 20, name: "四级", type: "bar", stack: "总量", @@ -1172,6 +1216,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -1179,17 +1224,14 @@ class BI014RiskPerformanceModel extends React.Component { color: function (params) { switch (params.dataIndex) { case 0: - return "#c02e30"; // 第一个柱子颜色 + return "#f7aa52"; // 第一个柱子颜色 case 1: - return "#f7aa52"; // 第二个柱子颜色 + return "#fbe06a"; // 第二个柱子颜色 case 2: - return "#fbe06a"; // 第三个柱子颜色 - case 3: - return "#5185f3"; // 第四个柱子颜色 + return "#5185f3"; // 第三个柱子颜色 } } }, - barWidth: 30, label: { normal: { show: true, @@ -1222,7 +1264,7 @@ class BI014RiskPerformanceModel extends React.Component { legend: { left: "0%", bottom: "10%", - data: ["一般任务", "关键任务", "许可作业"], + data: ["许可作业", "关键任务", "一般任务"], }, series: [ { @@ -1234,13 +1276,11 @@ class BI014RiskPerformanceModel extends React.Component { color: function (params) { switch (params.dataIndex) { case 0: - return "#c02e30"; // 第一个柱子颜色 + return "#f7aa52"; // 第一个柱子颜色 case 1: - return "#f7aa52"; // 第二个柱子颜色 + return "#fbe06a"; // 第二个柱子颜色 case 2: - return "#fbe06a"; // 第三个柱子颜色 - case 3: - return "#5185f3"; // 第四个柱子颜色 + return "#5185f3"; // 第三个柱子颜色 } } }, @@ -1335,6 +1375,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -1351,9 +1392,9 @@ class BI014RiskPerformanceModel extends React.Component { }, }, }, - barWidth: 30 }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -1372,6 +1413,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -1390,6 +1432,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -1468,6 +1511,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -1484,9 +1528,10 @@ class BI014RiskPerformanceModel extends React.Component { }, }, }, - barWidth: 30 + }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -1505,6 +1550,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -1523,6 +1569,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -1601,6 +1648,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -1617,9 +1665,10 @@ class BI014RiskPerformanceModel extends React.Component { }, }, }, - barWidth: 30 + }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -1638,6 +1687,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -1656,6 +1706,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -1734,6 +1785,7 @@ class BI014RiskPerformanceModel extends React.Component { ], series: [ { + barWidth: 20, name: "一级", type: "bar", data: Data.LEVEL1, @@ -1750,9 +1802,10 @@ class BI014RiskPerformanceModel extends React.Component { }, }, }, - barWidth: 30 + }, { + barWidth: 20, name: "二级", type: "bar", data: Data.LEVEL2, @@ -1771,6 +1824,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "三级", type: "bar", data: Data.LEVEL3, @@ -1789,6 +1843,7 @@ class BI014RiskPerformanceModel extends React.Component { }, }, { + barWidth: 20, name: "四级", type: "bar", data: Data.LEVEL4, @@ -1872,7 +1927,7 @@ class BI014RiskPerformanceModel extends React.Component { data: Data.LEVEL1, itemStyle: { color: this.state.level1Color }, stack: "总量", - barWidth: 30, + barWidth: 20, label: { normal: { show: true, @@ -1891,7 +1946,7 @@ class BI014RiskPerformanceModel extends React.Component { data: Data.LEVEL2, itemStyle: { color: this.state.level2Color }, stack: "总量", - barWidth: 30, + barWidth: 20, label: { normal: { show: true, @@ -1910,7 +1965,7 @@ class BI014RiskPerformanceModel extends React.Component { data: Data.LEVEL3, itemStyle: { color: this.state.level3Color }, stack: "总量", - barWidth: 30, + barWidth: 20, label: { normal: { show: true, @@ -1929,7 +1984,7 @@ class BI014RiskPerformanceModel extends React.Component { data: Data.LEVEL4, itemStyle: { color: this.state.level4Color }, stack: "总量", - barWidth: 30, + barWidth: 20, label: { normal: { show: true, @@ -2197,7 +2252,7 @@ class BI014RiskPerformanceModel extends React.Component { - +
    diff --git a/src/components/CustomPages/BI/BI054HomeDetail.js b/src/components/CustomPages/BI/BI054HomeDetail.js index 2b2d9a8..76f25ad 100644 --- a/src/components/CustomPages/BI/BI054HomeDetail.js +++ b/src/components/CustomPages/BI/BI054HomeDetail.js @@ -62,6 +62,9 @@ class BI054HomeDetail extends React.Component { componentWillUnmount() { // this.timerID && clearTimeout(this.timerID); } + renderSpeedColumn = ()=>{ + return { className: 'redTableCell'} + } loadReal = () => { let result = { ListSafeCheckCountDepartment: [ @@ -334,6 +337,7 @@ class BI054HomeDetail extends React.Component { title: typeName[i], dataIndex: "NUM", key: i * 10 + j, + onCell: () => this.renderSpeedColumn(), render: (value, record, index) => { RowCount = record.Parent.RowCount; if ( @@ -383,6 +387,7 @@ class BI054HomeDetail extends React.Component { if (j == 0) { columnsTb.push({ title: typeName[i], + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { const obj = { @@ -473,6 +478,7 @@ class BI054HomeDetail extends React.Component { columnsTb.push({ title: typeName[i], dataIndex: "NUM", + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { RowCount = record.Parent.RowCount; @@ -523,6 +529,7 @@ class BI054HomeDetail extends React.Component { if (j == 0) { columnsTb.push({ title: typeName[i], + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { const obj = { diff --git a/src/components/CustomPages/BI/BI055HomeDetail.js b/src/components/CustomPages/BI/BI055HomeDetail.js index b61b4d9..ef8b996 100644 --- a/src/components/CustomPages/BI/BI055HomeDetail.js +++ b/src/components/CustomPages/BI/BI055HomeDetail.js @@ -276,6 +276,7 @@ class BI055HomeDetail extends React.Component { columnsTb.push({ title: typeName[i], dataIndex: "NUM", + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { RowCount = record.Parent.RowCount; @@ -356,6 +357,7 @@ class BI055HomeDetail extends React.Component { if (j == 0) { columnsTb.push({ title: typeName[i], + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { const obj = { @@ -456,6 +458,7 @@ class BI055HomeDetail extends React.Component { //头部 columnsTb.push({ title: typeName[i], + onCell: () => this.renderSpeedColumn(), dataIndex: "NUM", key: i * 10 + j, render: (value, record, index) => { @@ -537,6 +540,7 @@ class BI055HomeDetail extends React.Component { if (j == 0) { columnsTb.push({ title: typeName[i], + onCell: () => this.renderSpeedColumn(), key: i * 10 + j, render: (value, record, index) => { const obj = { diff --git a/src/components/CustomPages/HM/HM042ShowPrint.js b/src/components/CustomPages/HM/HM042ShowPrint.js index 4b3c951..ec027b7 100644 --- a/src/components/CustomPages/HM/HM042ShowPrint.js +++ b/src/components/CustomPages/HM/HM042ShowPrint.js @@ -83,12 +83,15 @@ class HM042ShowPrint extends React.Component { if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function') this.props.data.onCancel(); } + loadData = (dataId) => { let json = initFilter(this.props.login.OrgId); extendRule(json, 'ID', 1, dataId); extendInclude(json, 'Nav_InitiatingDepartment'); extendInclude(json, 'Nav_ReleaseUser'); extendInclude(json, 'Nav_Details.Nav_ChargeUser'); + extendInclude(json, 'Nav_Details.Nav_Areas.Nav_Area'); + extendInclude(json, 'Nav_Details.Nav_Identifyings.Nav_Identifying'); extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); extendInclude(json, 'Nav_GroupLeader.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); extendInclude(json, 'Nav_DeputyGroupLeader.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); @@ -159,6 +162,43 @@ class HM042ShowPrint extends React.Component { tmpData: newtmpData, }); } + joinArea(data) { + let ret = []; + for (let it of data) { + if (it.Nav_Area && it.Nav_Area.NAME) { + ret.push(it.Nav_Area.NAME); + } + } + return ret.join('、'); + } + joinIdentifying(data) { + let ret = []; + for (let it of data) { + if (it.Nav_Identifying && it.Nav_Identifying.NAME) { + ret.push(it.Nav_Identifying.NAME); + } + } + return ret.join('、'); + } + renderLevel(level) { + let str = ''; + if (level == undefined) { + return str; + } + if (level.indexOf('0') >= 0) { + str += '部门 '; + } + if (level.indexOf('1') >= 0) { + str += '车间 '; + } + if (level.indexOf('2') >= 0) { + str += '班组 '; + } + if (level.indexOf('3') >= 0) { + str += '公司 '; + } + return str; + } render() { const { data } = this.state; return
    @@ -217,6 +257,32 @@ class HM042ShowPrint extends React.Component { {data.GROUP_LEADER_OPINION == 1 ? {data.Nav_GroupLeader.NAME} 0 ? config.picServerHost + data.Nav_GroupLeader.Nav_UserSignFiles[0].Nav_ImgFile?.Nav_File.FILE_PATH : ''} /> : ""} +
    + + + + + + + + + + + { + data.Nav_Details && data.Nav_Details.map((item, i) => { + return + + + + + + + + + + }) + } +
    开始时间结束时间层级辨识区域类别辨识对象负责人备注
    {moment(item.START_TIME).format('YYYY-MM-DD')}{moment(item.END_TIME).format('YYYY-MM-DD')}{this.renderLevel(item.LEVEL)}{this.joinArea(item.Nav_Areas)}{this.joinIdentifying(item.Nav_Identifyings)}{this.props.app.enums.HMRiskTypeEnmu.enums[item.RISK_TYPE]}{item.Nav_ChargeUser?.NAME}{item.REMARK}
    diff --git a/src/components/CustomPages/PF/PFCommonApprove.js b/src/components/CustomPages/PF/PFCommonApprove.js index 2f1e092..a54504e 100644 --- a/src/components/CustomPages/PF/PFCommonApprove.js +++ b/src/components/CustomPages/PF/PFCommonApprove.js @@ -107,6 +107,7 @@ class PFCommonApprove extends React.Component { case 'BS/BSRiskSubmit/DealEnd': case 'BS/BSRiskSubmitDelayApply/DealEnd': case 'FO/FOCrucialLicenseJob/BackUpdate': + case 'FO/FOCrucialLicenseJobOutsource/BackUpdate': case 'FO/FOJobEventRecord/BackUpdate': newUrl = this.state.data.CALLBACK_INTERFACE + 'New' break; diff --git a/src/components/CustomPages/SE/SE007ShowPrint.js b/src/components/CustomPages/SE/SE007ShowPrint.js index ea7db89..fa49497 100644 --- a/src/components/CustomPages/SE/SE007ShowPrint.js +++ b/src/components/CustomPages/SE/SE007ShowPrint.js @@ -1,7 +1,7 @@ import { message } from "antd/lib/index"; import { Button, Popconfirm, Row, Col, Checkbox, Radio, Form, Input, Select, Table, Upload, Icon, PageHeader, Modal } from 'antd'; import React from 'react'; -import { initFilter, extendRule, extendInclude, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; +import { initFilter, extendRule, extendInclude, extendSelectField, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import ReactToPrint from "react-to-print"; import styles from '../../CustomPages/HI/StepForm.css'; import SEstyles from './SE.css'; @@ -54,13 +54,19 @@ class SE007ShowPrint extends React.Component { return; let json = initFilter(this.props.login.OrgId); extendRule(json, 'ID', 1, this.props.data.id); - extendInclude(json, 'Nav_LaunchDepartment'); - extendInclude(json, 'Nav_LaunchUser'); - extendInclude(json, 'Nav_Points.Nav_Point'); - extendInclude(json, 'Nav_JoinDepartment.Nav_Department'); - extendInclude(json, 'Nav_Demands.Nav_User.Nav_Department'); - extendInclude(json, 'Nav_Demands.Nav_Department'); - extendInclude(json, 'Nav_Demands.Nav_Items.Nav_DEMAND'); + extendSelectField(json, 'NAME'); + extendSelectField(json, 'LAUNCH_TIME'); + extendSelectField(json, 'END_TIME'); + extendSelectField(json, 'Nav_LaunchDepartment.NAME'); + extendSelectField(json, 'Nav_LaunchUser.NAME'); + extendSelectField(json, 'Nav_Points.Nav_Point.NAME'); + extendSelectField(json, 'Nav_Demands.Nav_User.Nav_Department.NAME'); + extendSelectField(json, 'Nav_Demands.Nav_Department.NAME'); + extendSelectField(json, 'Nav_Demands.Nav_Items.Nav_DEMAND.NAME'); + extendSelectField(json, 'Nav_Demands.OK'); + extendSelectField(json, 'Nav_Demands.OTHER'); + extendSelectField(json, 'Nav_Demands.Nav_User.NAME'); + this.props.dispatch({ type: 'app/getDataByPost', payload: json, @@ -85,14 +91,14 @@ class SE007ShowPrint extends React.Component { r[d.DEMAND_ID] = idx; ROWS.push({ ID: d.DEMAND_ID, - NAME: d.Nav_DEMAND.NAME, + NAME: d.Nav_DEMAND?.NAME, department: [], total: 0, report: 0, }) } - let name = it.Nav_User.Nav_Department.NAME; + let name = it.Nav_User?.Nav_Department.NAME; if (name == '宁化行洛坑钨矿有限公司') { name = '公司领导'; } @@ -109,7 +115,7 @@ class SE007ShowPrint extends React.Component { if (it.OTHER != undefined && it.OTHER != "") { ROWS1.push({ NAME: it.OTHER, - department: [it.Nav_User.NAME], + department: [it.Nav_User?.NAME], total: 1, report: 1, }) @@ -204,9 +210,9 @@ class SE007ShowPrint extends React.Component { diff --git a/src/utils/common.js b/src/utils/common.js index cae311f..c0fc4c2 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -232,6 +232,13 @@ export function extendInclude(obj, clude) { } obj.Include.push(clude); } +export function extendSelectField(obj, clude) { + + if (!obj.SelectField) { + obj.SelectField = []; + } + obj.SelectField.push(clude); +} export function extendOrder(obj, filed, order) { var data = {}; @@ -740,14 +747,14 @@ export function getParseValueByDate(date) { n1 > 0 ? moment().add(n1, bts[0]) : n1 < 0 - ? moment().subtract(Math.abs(n1), bts[0]) - : moment(); + ? moment().subtract(Math.abs(n1), bts[0]) + : moment(); const e = n2 > 0 ? moment().add(n2, ets[0]) : n2 < 0 - ? moment().subtract(Math.abs(n2), ets[0]) - : moment(); + ? moment().subtract(Math.abs(n2), ets[0]) + : moment(); if (b.isBefore(e)) { r = [b, e]; } @@ -773,14 +780,14 @@ export function getParseValueByDate(date) { n1 > 0 ? moment().add(n1, ts[0]) : n1 < 0 - ? moment().subtract(Math.abs(n1), ts[0]) - : moment(); + ? moment().subtract(Math.abs(n1), ts[0]) + : moment(); const e = n2 > 0 ? moment().add(n2, ts[0]) : n2 < 0 - ? moment().subtract(Math.abs(n2), ts[0]) - : moment(); + ? moment().subtract(Math.abs(n2), ts[0]) + : moment(); if (b.isBefore(e)) { r = [b, e]; } @@ -867,9 +874,9 @@ export function getRulesByQueryFields(queryFields, groupList) { return timeIndex === 0 ? moment(time).format("YYYY-MM-DD") : moment(moment(time).format("YYYY-MM-DD")) - .add(1, "d") - .subtract(1, "s") - .format("YYYY-MM-DD HH:mm:ss"); + .add(1, "d") + .subtract(1, "s") + .format("YYYY-MM-DD HH:mm:ss"); }); // 将 2020-07-18 格式化成 2020-07-01 月份开始的时间 const monthFormat = moment(moment(vas[0]).format("YYYY-MM")).format( @@ -942,9 +949,9 @@ export function getRulesByQueryFields(queryFields, groupList) { k === 0 ? moment(j).format("YYYY-MM-DD") : moment(moment(j).format("YYYY-MM-DD")) - .add(1, "d") - .subtract(1, "s") - .format("YYYY-MM-DD HH:mm:ss"); + .add(1, "d") + .subtract(1, "s") + .format("YYYY-MM-DD HH:mm:ss"); const monthVal = moment(moment(j).format("YYYY-MM")).format( "YYYY-MM-DD" ); @@ -961,11 +968,11 @@ export function getRulesByQueryFields(queryFields, groupList) { ? t.DATA_TYPE === 16 ? dateHM : t.DATA_TYPE === 15 - ? dateHMS - : tmpVal + ? dateHMS + : tmpVal : t.DATA_TYPE === 9 || t.DATA_TYPE === 10 - ? monthVal - : yearVal, + ? monthVal + : yearVal, isCustom: t.IS_CUSTOM, isSysParam: t.IS_SYS_PARAM, }); @@ -1066,9 +1073,9 @@ export function getRuleAndGroupByParseValue({ k === 0 ? moment(j).format("YYYY-MM-DD") : moment(moment(j).format("YYYY-MM-DD")) - .add(1, "d") - .subtract(1, "s") - .format("YYYY-MM-DD HH:mm:ss"); + .add(1, "d") + .subtract(1, "s") + .format("YYYY-MM-DD HH:mm:ss"); vas += v + ","; }); if (ruleJson && ruleJson.rules) { @@ -1113,9 +1120,9 @@ export function getRuleAndGroupByParseValue({ k === 0 ? moment(j).format("YYYY-MM-DD") : moment(moment(j).format("YYYY-MM-DD")) - .add(1, "d") - .subtract(1, "s") - .format("YYYY-MM-DD HH:mm:ss"), + .add(1, "d") + .subtract(1, "s") + .format("YYYY-MM-DD HH:mm:ss"), isCustom: isCustom, }); }); @@ -1481,9 +1488,9 @@ export function showApprove(listApproveDetail, enums, imgHost, width, height) { title={ item.Nav_ApproveUser != null ? item.Nav_ApproveUser.NAME : "" } - // onError={(e) => { - // e.target.src = require('../assets/home/backlog.png'); - // }} + // onError={(e) => { + // e.target.src = require('../assets/home/backlog.png'); + // }} /> @@ -1517,9 +1524,9 @@ export function showApprove(listApproveDetail, enums, imgHost, width, height) { alt={ item.Nav_ApproveUser != null ? item.Nav_ApproveUser.NAME : "" } - // onError={(e) => { - // e.target.src = require('../assets/home/backlog.png'); - // }} + // onError={(e) => { + // e.target.src = require('../assets/home/backlog.png'); + // }} /> @@ -1717,23 +1724,23 @@ export function onBeforeSaveHandleRecordLog(params, formCode, title) { title, params.data.TaskID, " params.pageCode:[" + - params.pageCode + - "] params.data.id:[" + - params.data.id + - "] UserId:[" + - params.login.loginInfo.User.ID + - "] params.data.taskCode: [" + - params.data.taskCode + - "] homeReload: [" + - params.data.homeReload + - "]" + params.pageCode + + "] params.data.id:[" + + params.data.id + + "] UserId:[" + + params.login.loginInfo.User.ID + + "] params.data.taskCode: [" + + params.data.taskCode + + "] homeReload: [" + + params.data.homeReload + + "]" ); params.dispatch({ type: "app/getDataByPost", url: "PF/PFSysLog/addLog", payload: json, onlyData: false, - onComplete: (ret) => {}, + onComplete: (ret) => { }, }); } }
    { data?.Nav_Points && data?.Nav_Points.map((item, i) => { if (i == (data?.Nav_Points.length - 1)) { - return item.Nav_Point.NAME + return item.Nav_Point?.NAME } else { - return item.Nav_Point.NAME + ' ' + return item.Nav_Point?.NAME + ' ' } }) }