1439 lines
47 KiB
JavaScript
1439 lines
47 KiB
JavaScript
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, Form, DatePicker, Icon ,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 BI006FormRunAnalysisNew extends React.Component {
|
||
constructor(props) {
|
||
super(props);
|
||
this.state = {
|
||
visible: false,
|
||
noticeTitle: "",
|
||
tmpData: {},
|
||
tableKey: "1",
|
||
selectStartTime: moment(this.getStartDate(), "YYYY-MM-DD 00:00:00"),
|
||
selectEndTime: moment(this.getEndDate(), "YYYY-MM-DD 23:59:59"),
|
||
startTime: this.getDate(),
|
||
endTime: moment(new Date()).format("YYYYMMDD"),
|
||
timeType: 5,
|
||
totalCount: 0,
|
||
finishCount: 0,
|
||
overtimeCount: 0,
|
||
unfinishCount: 0,
|
||
dtotalCount: 0,
|
||
dfinishCount: 0,
|
||
dovertimeCount: 0,
|
||
dunfinishCount: 0,
|
||
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: "100px",
|
||
title: "部门",
|
||
dataIndex: "DEPARTMENT_NAME",
|
||
key: "DEPARTMENT_NAME",
|
||
// render: (text, record) => (
|
||
// <span>
|
||
// <a onClick={() => this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME}</a>
|
||
// </span>
|
||
// ),
|
||
},
|
||
{
|
||
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",
|
||
},
|
||
],
|
||
detailColumns: [
|
||
// {
|
||
// width: "55px",
|
||
// title: '序号',
|
||
// dataIndex: 'NUM',
|
||
// key: 'NUM',
|
||
// },
|
||
{
|
||
width: "100px",
|
||
title: "模块名称",
|
||
dataIndex: "MOUDLE_NAME",
|
||
key: "MOUDLE_NAME",
|
||
// render: (text, record) => (
|
||
// <span>
|
||
// <a onClick={() => this.showFormModal(record.MOUDLE_NAME)}>{record.MOUDLE_NAME}</a>
|
||
// </span>
|
||
// ),
|
||
},
|
||
{
|
||
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",
|
||
},
|
||
],
|
||
};
|
||
this.keyWord="";
|
||
this.keyWord2="";
|
||
}
|
||
getStartDate = () => {
|
||
let date = new Date();
|
||
let y = date.getFullYear();
|
||
let m = date.getMonth() + 1;
|
||
let d = date.getDate();
|
||
// 当前日期
|
||
let nowDate =
|
||
y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
|
||
let pastDate = moment(nowDate)
|
||
.add(-1, "month")
|
||
.format("YYYY-MM-DD 00:00:00");
|
||
return pastDate;
|
||
};
|
||
|
||
getEndDate = () => {
|
||
let date = new Date();
|
||
let y = date.getFullYear();
|
||
let m = date.getMonth() + 1;
|
||
let d = date.getDate();
|
||
// 当前日期
|
||
let nowDate =
|
||
y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
|
||
let pastDate = moment(nowDate).format("YYYY-MM-DD 23:59:59");
|
||
return pastDate;
|
||
};
|
||
componentDidMount() {
|
||
this.loadData();
|
||
}
|
||
showEditModal = (departmentId, departmentName) => {
|
||
const newtmpData = {
|
||
data: {
|
||
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) => {
|
||
const newtmpData = {
|
||
data: {
|
||
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,
|
||
})
|
||
);
|
||
};
|
||
// showEditModal = (dataId, formCode, TaskID, title, taskCode) => {
|
||
|
||
// const newtmpData = {
|
||
// data: {
|
||
// id: dataId, TaskID: TaskID, onCancel: this.handleCancel, taskCode: taskCode, tableKey: this.state.tableKey,
|
||
// homeReload: true
|
||
// },
|
||
// formCode: formCode,
|
||
// }
|
||
// this.setState({
|
||
// noticeTitle: title,
|
||
// taskCode: taskCode,
|
||
// tmpData: newtmpData,
|
||
// currActivatedMenu: ''
|
||
// }, () => this.setState({
|
||
// visible: true
|
||
// }));
|
||
// }
|
||
|
||
getDate = (type) => {
|
||
let date = new Date();
|
||
let y = date.getFullYear();
|
||
let m = date.getMonth() + 1;
|
||
let d = date.getDate();
|
||
// 当前日期
|
||
let nowDate =
|
||
y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
|
||
let pastDate = moment(nowDate).add(-1, "month").format("YYYYMMDD");
|
||
let weekColor = "black";
|
||
let monthColor = "orange";
|
||
let threeMonthColor = "black";
|
||
let sixMonthColor = "black";
|
||
let yearColor = "black";
|
||
let timeType = 5;
|
||
if (type === "Week") {
|
||
pastDate = moment(nowDate).add(-7, "d").format("YYYYMMDD");
|
||
weekColor = "orange";
|
||
monthColor = "black";
|
||
threeMonthColor = "black";
|
||
sixMonthColor = "black";
|
||
yearColor = "black";
|
||
timeType = 1;
|
||
}
|
||
if (type === "ThreeMonth") {
|
||
pastDate = moment(nowDate).add(-3, "month").format("YYYYMMDD");
|
||
weekColor = "black";
|
||
monthColor = "black";
|
||
threeMonthColor = "orange";
|
||
sixMonthColor = "black";
|
||
yearColor = "black";
|
||
timeType = 10;
|
||
}
|
||
if (type === "SixMonth") {
|
||
pastDate = moment(nowDate).add(-6, "month").format("YYYYMMDD");
|
||
weekColor = "black";
|
||
monthColor = "black";
|
||
threeMonthColor = "black";
|
||
sixMonthColor = "orange";
|
||
yearColor = "black";
|
||
timeType = 15;
|
||
}
|
||
if (type === "Year") {
|
||
pastDate = moment(nowDate).add(-1, "year").format("YYYYMMDD");
|
||
weekColor = "black";
|
||
monthColor = "black";
|
||
threeMonthColor = "black";
|
||
sixMonthColor = "black";
|
||
yearColor = "orange";
|
||
timeType = 20;
|
||
}
|
||
this.setState(
|
||
{
|
||
startTime: pastDate,
|
||
timeType: timeType,
|
||
weekColor: weekColor,
|
||
monthColor: monthColor,
|
||
threeMonthColor: threeMonthColor,
|
||
sixMonthColor: sixMonthColor,
|
||
yearColor: yearColor,
|
||
},
|
||
() => {
|
||
if (type) {
|
||
this.loadData();
|
||
}
|
||
}
|
||
);
|
||
return pastDate;
|
||
};
|
||
//加载数据赋值
|
||
loadData = () => {
|
||
this.ksRun();
|
||
this.xkRun();
|
||
this.getMould();
|
||
// this.getDepartment();
|
||
};
|
||
//矿山
|
||
ksRun = () => {
|
||
var orgId = this.props.login ? this.props.login.OrgId : "";
|
||
// let startTime=this.state.selectStartTime.format('YYYY-MM-01 00:00:00');
|
||
// let endTime=this.state.selectEndTime.format('YYYY-MM-01 00:00:00');
|
||
//默认最近一年
|
||
let startTime = moment(new Date())
|
||
.add(-11, "month")
|
||
.format("YYYY-MM-01 00:00:00");
|
||
let endTime = moment(new Date())
|
||
.add(1, "month")
|
||
.format("YYYY-MM-01 00:00:00");
|
||
this.keyWord="矿山部";
|
||
if(orgId === "d9871ba8-0eec-9e4a-bb87-7d5a540d8913")
|
||
{
|
||
this.keyWord="选矿一部"
|
||
}
|
||
let json = initFilter(orgId,this.keyWord, "", "", "", startTime, endTime);
|
||
// extendRule(json, 'DEPARTMENT_NAME', 1, );
|
||
// 1代表=,2代表不等于,3小于,4小于等于,5大于,6大于等于,7以开始的Like,8以结束的Like,9包含
|
||
// if(this.state.timeType ===1)//最近一周(显示最近一月的,最小单位为月)
|
||
// {
|
||
// let start=moment(new Date()).add(0, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===5)//最近一月
|
||
// {
|
||
// let start=moment(new Date()).add(0, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===10)//最近三月
|
||
// {
|
||
// let start=moment(new Date()).add(-2, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===15)//最近半年
|
||
// {
|
||
// let start=moment(new Date()).add(-5, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===20)//最近一年
|
||
// {
|
||
// let start=moment(new Date()).add(-11, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
extendOrder(json, "MONTH", 0);
|
||
this.props.dispatch({
|
||
type: "app/getDataByPost",
|
||
url: "BI/BIStatiscialAnalysisController/GetEntities",
|
||
payload: json,
|
||
onlyData: false,
|
||
onComplete: (data) => {
|
||
// let data = {
|
||
// "IsSuccessful": true, "Data": [{ "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-08-01 00:00:00", "MONTHStr": "2023年1月", "C_COUNT": 90, "D_COUNT":80},
|
||
// {"DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-09-01 00:00:00", "MONTHStr": "2023年2月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-10-01 00:00:00", "MONTHStr": "2023年3月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年4月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年5月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// {"DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-09-01 00:00:00", "MONTHStr": "2023年6月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-10-01 00:00:00", "MONTHStr": "2023年7月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年8月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年9月","C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年10月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年11月", "C_COUNT": 70, "D_COUNT": 60 },
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2022-01-01 00:00:00", "MONTHStr": "2023年12月", "C_COUNT": 70, "D_COUNT": 60 }], "TotalCount": 0, "ErrorMessage": null
|
||
// }
|
||
if (data && data.IsSuccessful) {
|
||
let month = [];
|
||
let company = [];
|
||
let department = [];
|
||
data.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"));
|
||
myChart.setOption({
|
||
// title: {
|
||
// text: "矿山部-安全生产标准化运行走势图",
|
||
// left: 'center'
|
||
// },
|
||
tooltip: {
|
||
trigger: "axis",
|
||
// formatter: function (params) {
|
||
// let temp=''
|
||
// params.forEach(t=>{
|
||
// temp=temp+t.seriesName +":"+t.value+"%"+'<br />';
|
||
|
||
// })
|
||
// return temp;
|
||
// }
|
||
},
|
||
legend: {
|
||
// data: ['部门'],
|
||
data: ["完成率", "及时完成率"],
|
||
top: "3%",
|
||
},
|
||
grid: {
|
||
left: "3%",
|
||
right: "4%",
|
||
top: "15%",
|
||
bottom: "5%",
|
||
containLabel: true,
|
||
},
|
||
toolbox: {
|
||
feature: {
|
||
// saveAsImage: {}
|
||
},
|
||
},
|
||
xAxis: {
|
||
type: "category",
|
||
boundaryGap: false, //坐标轴两边留白
|
||
data: month,
|
||
axisLabel: {
|
||
//坐标轴刻度标签的相关设置。
|
||
interval: 0, //设置为 1,表示『隔一个标签显示一个标签』
|
||
// margin:15,
|
||
textStyle: {
|
||
color: "#1B253A",
|
||
fontStyle: "normal",
|
||
fontFamily: "微软雅黑",
|
||
fontSize: 12,
|
||
},
|
||
|
||
//rotate:50,
|
||
},
|
||
axisTick: {
|
||
//坐标轴刻度相关设置。
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
//坐标轴轴线相关设置
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.2
|
||
},
|
||
},
|
||
splitLine: {
|
||
//坐标轴在 grid 区域中的分隔线。
|
||
show: true,
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.1
|
||
},
|
||
},
|
||
},
|
||
yAxis: [
|
||
{
|
||
type: "value",
|
||
splitNumber: 5,
|
||
axisLabel: {
|
||
textStyle: {
|
||
color: "#a8aab0",
|
||
fontStyle: "normal",
|
||
fontFamily: "微软雅黑",
|
||
fontSize: 12,
|
||
},
|
||
formatter: function (val) {
|
||
return val + "%";
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
splitLine: {
|
||
show: true,
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.1
|
||
},
|
||
},
|
||
},
|
||
],
|
||
series: [
|
||
{
|
||
name: "完成率",
|
||
type: "line",
|
||
// color: "#4b9bf3",
|
||
data: company,
|
||
smooth: true,
|
||
itemStyle: {
|
||
normal: {
|
||
color: "#3A84FF",
|
||
lineStyle: {
|
||
color: "#3A84FF",
|
||
width: 1,
|
||
},
|
||
areaStyle: {
|
||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||
{
|
||
offset: 0,
|
||
color: "rgba(58,132,255,0)",
|
||
},
|
||
{
|
||
offset: 1,
|
||
color: "rgba(58,132,255,0.35)",
|
||
},
|
||
]),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
{
|
||
name: "及时完成率",
|
||
type: "line",
|
||
// color: "#FCD149",
|
||
data: department,
|
||
smooth: true,
|
||
itemStyle: {
|
||
normal: {
|
||
color: "#ff99ad",
|
||
lineStyle: {
|
||
color: "#ff99ad",
|
||
width: 1,
|
||
},
|
||
areaStyle: {
|
||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||
{
|
||
offset: 0,
|
||
color: "rgba(250,80,113,0)",
|
||
},
|
||
{
|
||
offset: 1,
|
||
color: "rgba(250,80,113,0.35)",
|
||
},
|
||
]),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
],
|
||
});
|
||
}
|
||
},
|
||
});
|
||
};
|
||
//选矿
|
||
xkRun = () => {
|
||
var orgId = this.props.login ? this.props.login.OrgId : "";
|
||
// let startTime=this.state.selectStartTime.format('YYYY-MM-01 00:00:00');
|
||
// let endTime=this.state.selectEndTime.format('YYYY-MM-01 00:00:00');
|
||
//默认最近一年
|
||
let startTime = moment(new Date())
|
||
.add(-11, "month")
|
||
.format("YYYY-MM-01 00:00:00");
|
||
let endTime = moment(new Date())
|
||
.add(1, "month")
|
||
.format("YYYY-MM-01 00:00:00");
|
||
this.keyWord2="选矿部";
|
||
if(orgId === "d9871ba8-0eec-9e4a-bb87-7d5a540d8913")
|
||
{
|
||
this.keyWord2="选矿二部"
|
||
}
|
||
let json = initFilter(orgId, this.keyWord2, "", "", "", startTime, endTime);
|
||
// extendRule(json, 'DEPARTMENT_NAME', 1, "选矿部");
|
||
// 1代表=,2代表不等于,3小于,4小于等于,5大于,6大于等于,7以开始的Like,8以结束的Like,9包含
|
||
// if(this.state.timeType ===1)//最近一周(显示最近一月的,最小单位为月)
|
||
// {
|
||
// let start=moment(new Date()).add(0, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===5)//最近一月
|
||
// {
|
||
// let start=moment(new Date()).add(0, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===10)//最近三月
|
||
// {
|
||
// let start=moment(new Date()).add(-2, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===15)//最近半年
|
||
// {
|
||
// let start=moment(new Date()).add(-5, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
// else if(this.state.timeType ===20)//最近一年
|
||
// {
|
||
// let start=moment(new Date()).add(-11, "month").format('YYYY-MM-01 00:00:00')
|
||
// let end=moment(new Date()).add(1, "month").format('YYYY-MM-01 00:00:00')
|
||
// extendRule(json, 'MONTH', 6, start);
|
||
// extendRule(json, 'MONTH', 3, end);
|
||
// }
|
||
extendOrder(json, "MONTH", 0);
|
||
this.props.dispatch({
|
||
type: "app/getDataByPost",
|
||
url: "BI/BIStatiscialAnalysisController/GetEntities",
|
||
payload: json,
|
||
onlyData: false,
|
||
onComplete: (data) => {
|
||
// let data = {
|
||
// "IsSuccessful": true, "Data": [{ "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-08-01 00:00:00", "MONTHStr": "2023年1月", "C_COUNT": 90, "D_COUNT":80},
|
||
// {"DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-09-01 00:00:00", "MONTHStr": "2023年2月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-10-01 00:00:00", "MONTHStr": "2023年3月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年4月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年5月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// {"DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-09-01 00:00:00", "MONTHStr": "2023年6月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-10-01 00:00:00", "MONTHStr": "2023年7月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年8月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年9月","C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-11-01 00:00:00", "MONTHStr": "2023年10月", "C_COUNT": 70, "D_COUNT": 60},
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2021-12-01 00:00:00", "MONTHStr": "2023年11月", "C_COUNT": 70, "D_COUNT": 60 },
|
||
// { "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MONTH": "2022-01-01 00:00:00", "MONTHStr": "2023年12月", "C_COUNT": 70, "D_COUNT": 60 }], "TotalCount": 0, "ErrorMessage": null
|
||
// }
|
||
if (data && data.IsSuccessful) {
|
||
let month = [];
|
||
let company = [];
|
||
let department = [];
|
||
data.Data.forEach((item) => {
|
||
month.push(item.MONTHStr);
|
||
company.push(item.FINISH_RATE);
|
||
department.push(item.NORMAL_FINISH_RATE);
|
||
});
|
||
let myChart = echarts.init(document.getElementById("xkRun"));
|
||
myChart.setOption({
|
||
// title: {
|
||
// text: "选矿部-安全生产标准化运行走势图",
|
||
// padding: [0,100,100,100],
|
||
// left: 'center'
|
||
// },
|
||
tooltip: {
|
||
trigger: "axis",
|
||
// formatter: function (params) {
|
||
// let temp=''
|
||
// params.forEach(t=>{
|
||
// temp=temp+t.seriesName +":"+t.value+"%"+'<br />';
|
||
|
||
// })
|
||
// return temp;
|
||
// }
|
||
},
|
||
legend: {
|
||
// data: ['部门'],
|
||
data: ["完成率", "及时完成率"],
|
||
top: "3%",
|
||
},
|
||
grid: {
|
||
left: "3%",
|
||
right: "4%",
|
||
top: "15%",
|
||
bottom: "5%",
|
||
containLabel: true,
|
||
},
|
||
toolbox: {
|
||
feature: {
|
||
// saveAsImage: {}
|
||
},
|
||
},
|
||
xAxis: {
|
||
type: "category",
|
||
boundaryGap: false, //坐标轴两边留白
|
||
data: month,
|
||
axisLabel: {
|
||
//坐标轴刻度标签的相关设置。
|
||
interval: 0, //设置为 1,表示『隔一个标签显示一个标签』
|
||
// margin:15,
|
||
textStyle: {
|
||
color: "#1B253A",
|
||
fontStyle: "normal",
|
||
fontFamily: "微软雅黑",
|
||
fontSize: 12,
|
||
},
|
||
|
||
//rotate:50,
|
||
},
|
||
axisTick: {
|
||
//坐标轴刻度相关设置。
|
||
show: false,
|
||
},
|
||
axisLine: {
|
||
//坐标轴轴线相关设置
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.2
|
||
},
|
||
},
|
||
splitLine: {
|
||
//坐标轴在 grid 区域中的分隔线。
|
||
show: true,
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.1
|
||
},
|
||
},
|
||
},
|
||
yAxis: [
|
||
{
|
||
type: "value",
|
||
splitNumber: 5,
|
||
axisLabel: {
|
||
textStyle: {
|
||
color: "#a8aab0",
|
||
fontStyle: "normal",
|
||
fontFamily: "微软雅黑",
|
||
fontSize: 12,
|
||
},
|
||
formatter: function (val) {
|
||
return val + "%";
|
||
},
|
||
},
|
||
axisLine: {
|
||
show: false,
|
||
},
|
||
axisTick: {
|
||
show: false,
|
||
},
|
||
splitLine: {
|
||
show: true,
|
||
lineStyle: {
|
||
color: "#E5E9ED",
|
||
// opacity:0.1
|
||
},
|
||
},
|
||
},
|
||
],
|
||
series: [
|
||
{
|
||
name: "完成率",
|
||
type: "line",
|
||
// color: "#4b9bf3",
|
||
data: company,
|
||
smooth: true,
|
||
itemStyle: {
|
||
normal: {
|
||
color: "#3A84FF",
|
||
lineStyle: {
|
||
color: "#3A84FF",
|
||
width: 1,
|
||
},
|
||
areaStyle: {
|
||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||
{
|
||
offset: 0,
|
||
color: "rgba(58,132,255,0)",
|
||
},
|
||
{
|
||
offset: 1,
|
||
color: "rgba(58,132,255,0.35)",
|
||
},
|
||
]),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
{
|
||
name: "及时完成率",
|
||
type: "line",
|
||
// color: "#FCD149",
|
||
data: department,
|
||
smooth: true,
|
||
itemStyle: {
|
||
normal: {
|
||
color: "#ff99ad",
|
||
lineStyle: {
|
||
color: "#ff99ad",
|
||
width: 1,
|
||
},
|
||
areaStyle: {
|
||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||
{
|
||
offset: 0,
|
||
color: "rgba(250,80,113,0)",
|
||
},
|
||
{
|
||
offset: 1,
|
||
color: "rgba(250,80,113,0.35)",
|
||
},
|
||
]),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
],
|
||
});
|
||
}
|
||
},
|
||
});
|
||
};
|
||
getMould = () => {
|
||
let allData = [
|
||
{
|
||
MOUDLE_NAME: "风险管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "安全检查",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "作业现场管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "法律法规与其他要求",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "安全教育培训",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "方针与目标管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "绩效测量与评价",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "生产工艺管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "事故事件",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "安全生产组织保障",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "安全投入、科技与工伤",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "职业卫生",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "应急管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "机电安全管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "会议管理",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
{
|
||
MOUDLE_NAME: "标准化创建",
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: 0 + "%",
|
||
NORMAL_FINISH_RATE: 0 + "%",
|
||
},
|
||
];
|
||
var orgId = this.props.login ? this.props.login.OrgId : "";
|
||
let startTime = this.state.selectStartTime.format("YYYY-MM-DD 00:00:00");
|
||
let endTime = this.state.selectEndTime.format("YYYY-MM-DD 23:59:59");
|
||
let json = initFilter(orgId, "", "", "", "", startTime, endTime);
|
||
extendOrder(json, "NUM", 0);
|
||
this.props.dispatch({
|
||
type: "app/getDataByPost",
|
||
payload: json,
|
||
url: "BI/BIStatiscialAnalysisController/GetDepartMouldInfos",
|
||
onComplete: (ret) => {
|
||
if (ret) {
|
||
if (ret.mouldData) {
|
||
let temp = [];
|
||
allData.forEach((t) => {
|
||
let group = ret.mouldData.filter(
|
||
(m) => m.MOUDLE_NAME === t.MOUDLE_NAME
|
||
);
|
||
if (group.length > 0) {
|
||
t.TOTAL_QTY = group[0].TOTAL_QTY;
|
||
t.FINISH_QTY = group[0].FINISH_QTY;
|
||
t.OVER_FINISH_QTY = group[0].OVER_FINISH_QTY;
|
||
t.UNFINISH_QTY = group[0].UNFINISH_QTY;
|
||
t.FINISH_RATE = group[0].FINISH_RATE + "%";
|
||
t.NORMAL_FINISH_RATE = group[0].NORMAL_FINISH_RATE + "%";
|
||
}
|
||
temp.push(t);
|
||
});
|
||
this.setState({
|
||
detailData: temp,
|
||
});
|
||
}
|
||
if (ret.departData) {
|
||
this.getDepartment(ret.departData);
|
||
}
|
||
}
|
||
},
|
||
});
|
||
};
|
||
getDepartment = (departData) => {
|
||
var orgId = this.props.login ? this.props.login.OrgId : "";
|
||
const jsonTemp = initFilter(orgId);
|
||
extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 0);
|
||
this.props.dispatch({
|
||
type: "app/getDataByPost",
|
||
payload: jsonTemp,
|
||
url: "FM/Department/OrderEntities",
|
||
onComplete: (retDepart) => {
|
||
if (retDepart) {
|
||
let tempDepart = [];
|
||
retDepart.forEach((t) => {
|
||
let tempNow = {
|
||
DEPARTMENT_ID: t.ID,
|
||
DEPARTMENT_NAME: t.NAME,
|
||
TOTAL_QTY: 0,
|
||
FINISH_QTY: 0,
|
||
OVER_FINISH_QTY: 0,
|
||
UNFINISH_QTY: 0,
|
||
FINISH_RATE: "0%",
|
||
NORMAL_FINISH_RATE: "0%",
|
||
};
|
||
tempDepart.push(tempNow);
|
||
});
|
||
if (departData) {
|
||
let temp = [];
|
||
let t1 = 0;
|
||
let t2 = 0;
|
||
let t3 = 0;
|
||
let t4 = 0;
|
||
tempDepart.forEach((t) => {
|
||
let group = departData.filter(
|
||
(m) => m.DEPARTMENT_ID === t.DEPARTMENT_ID
|
||
);
|
||
if (group.length > 0) {
|
||
t.TOTAL_QTY = group[0].TOTAL_QTY;
|
||
t.FINISH_QTY = group[0].FINISH_QTY;
|
||
t.OVER_FINISH_QTY = group[0].OVER_FINISH_QTY;
|
||
t.UNFINISH_QTY = group[0].UNFINISH_QTY;
|
||
t.FINISH_RATE = group[0].FINISH_RATE + "%";
|
||
t.NORMAL_FINISH_RATE = group[0].NORMAL_FINISH_RATE + "%";
|
||
t1 = t1 + group[0].TOTAL_QTY;
|
||
t2 = t2 + group[0].FINISH_QTY;
|
||
t3 = t3 + group[0].OVER_FINISH_QTY;
|
||
t4 = t4 + group[0].UNFINISH_QTY;
|
||
}
|
||
temp.push(t);
|
||
});
|
||
let t5 = t1 === 0 ? "100%" : (((t2 + t3) / t1) * 100).toFixed(2) + "%";
|
||
let t6 = t1 === 0 ? "100%" : ((t2 / t1) * 100).toFixed(2) + "%";
|
||
this.setState({
|
||
retData: temp,
|
||
totalCount: t1,
|
||
finishCount: t2,
|
||
overtimeCount: t3,
|
||
unfinishCount: t4,
|
||
rate: t5,
|
||
normalRate: t6,
|
||
});
|
||
}
|
||
}
|
||
},
|
||
});
|
||
};
|
||
startChange = (value) => {
|
||
this.setState({
|
||
selectStartTime: value,
|
||
startTime: value.format("YYYYMMDD"),
|
||
});
|
||
};
|
||
endChange = (value) => {
|
||
this.setState({
|
||
selectEndTime: value,
|
||
endTime: value.format("YYYYMMDD"),
|
||
});
|
||
};
|
||
closeModal = () => {
|
||
// 退出弹窗
|
||
this.clearData();
|
||
};
|
||
clearData = () => {
|
||
let newtmpData = { ...this.state.tmpData };
|
||
newtmpData["data"].id = "";
|
||
newtmpData["data"].homeReload = false;
|
||
newtmpData.formCode = "";
|
||
this.setState({
|
||
visible: false,
|
||
tmpData: newtmpData,
|
||
});
|
||
};
|
||
handleCancel = () => {
|
||
// 退出弹窗
|
||
this.clearData();
|
||
};
|
||
render() {
|
||
const {
|
||
startTime,
|
||
endTime,
|
||
finishCount,
|
||
overtimeCount,
|
||
totalCount,
|
||
unfinishCount,
|
||
weekColor,
|
||
monthColor,
|
||
threeMonthColor,
|
||
sixMonthColor,
|
||
yearColor,
|
||
} = this.state;
|
||
const formItemLayout = {
|
||
labelCol: { span: 10 },
|
||
wrapperCol: { span: 14 },
|
||
};
|
||
let allFinishRate =
|
||
totalCount === 0 ? 100 : (((finishCount + overtimeCount) / totalCount) * 100).toFixed(2);
|
||
let finishRate =
|
||
totalCount === 0 ? 100 : ((finishCount / totalCount) * 100).toFixed(2);
|
||
return (
|
||
<div>
|
||
{/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */}
|
||
<div
|
||
style={{
|
||
backgroundColor: "white",
|
||
width: "1200px",
|
||
top: "0",
|
||
bottom: "0",
|
||
left: "0",
|
||
right: "0",
|
||
margin: "auto",
|
||
borderStyle: "solid",
|
||
borderColor: "#ccc",
|
||
borderWidth: "1px",
|
||
}}
|
||
>
|
||
<Modal
|
||
visible={this.state.visible}
|
||
title={this.state.noticeTitle}
|
||
maskClosable={false}
|
||
onCancel={this.handleCancel}
|
||
footer={null}
|
||
className="antd-modal-fullscreen"
|
||
closeModal={this.closeModal}
|
||
// forceRender={true}
|
||
>
|
||
<FormPage {...this.state.tmpData} />
|
||
</Modal>
|
||
<h1
|
||
style={{
|
||
textAlign: "center",
|
||
marginTop: "30px",
|
||
fontWeight: "bold",
|
||
}}
|
||
>
|
||
安全生产标准化系统运行情况
|
||
</h1>
|
||
<Row style={{ textAlign: "center", fontSize: "15px" }}>
|
||
{" "}
|
||
<span>
|
||
({startTime}-{endTime})
|
||
</span>
|
||
</Row>
|
||
<br></br>
|
||
<div
|
||
style={{
|
||
display: "flex",
|
||
alignItems: "center",
|
||
flexDirection: "row",
|
||
justifyContent: "center",
|
||
}}
|
||
>
|
||
<div
|
||
style={{
|
||
display: "felx",
|
||
alignItems: "center",
|
||
flexDirection: "row",
|
||
fontSize: "14px",
|
||
marginRight: "20px",
|
||
}}
|
||
>
|
||
{/* <Form.Item label={"查询时间"}> */}
|
||
查询时间:
|
||
<DatePicker
|
||
style={{ width: "120px" }}
|
||
// defaultValue={moment(this.state.startTime, 'YYYY-MM-DD 00:00:00')}
|
||
value={this.state.selectStartTime}
|
||
format="YYYY-MM-DD"
|
||
onChange={this.startChange}
|
||
/>
|
||
{/* </Form.Item> */}
|
||
</div>
|
||
|
||
<div
|
||
style={{
|
||
display: "felx",
|
||
alignItems: "center",
|
||
flexDirection: "row",
|
||
fontSize: "14px",
|
||
marginRight: "20px",
|
||
}}
|
||
>
|
||
{/* <Form.Item label={"至"} > */}
|
||
至:
|
||
<DatePicker
|
||
style={{ width: "120px" }}
|
||
// defaultValue={moment(this.state.endTime, 'YYYY-MM-DD 23:59:59')}
|
||
value={this.state.selectEndTime}
|
||
format="YYYY-MM-DD"
|
||
onChange={this.endChange}
|
||
/>
|
||
{/* </Form.Item> */}
|
||
</div>
|
||
<div>
|
||
<Button
|
||
type="primary"
|
||
loading={this.state.searchLoading}
|
||
onClick={() => this.loadData()}
|
||
>
|
||
查询
|
||
</Button>
|
||
</div>
|
||
</div>
|
||
<div
|
||
style={{
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
marginTop: "20px",
|
||
// marginBottom: "20px",
|
||
}}
|
||
>
|
||
<div className={styles.menuPie}>
|
||
<li>
|
||
总任务数
|
||
<br />
|
||
<div className={styles.dataStyle}>{totalCount}</div>
|
||
</li>
|
||
<Divider
|
||
type="vertical"
|
||
style={{ width: "1px", height: "70px", margin: "9px 0px" }}
|
||
/>
|
||
<li>
|
||
正常已办
|
||
<br />
|
||
<div className={styles.dataStyle1}>{finishCount}</div>
|
||
</li>
|
||
<Divider
|
||
type="vertical"
|
||
style={{ width: "1px", height: "70px", margin: "9px 0px" }}
|
||
/>
|
||
<li>
|
||
超时已办
|
||
<br />
|
||
<div className={styles.dataStyle2}>{overtimeCount}</div>
|
||
</li>
|
||
<Divider
|
||
type="vertical"
|
||
style={{ width: "1px", height: "70px", margin: "9px 0px" }}
|
||
/>
|
||
<li>
|
||
未完成数
|
||
<br />
|
||
<div className={styles.dataStyle3}>{unfinishCount}</div>
|
||
{/* <a href="#" style={{ color: "red" }}> */}
|
||
{/* </a> */}
|
||
</li>
|
||
<Divider
|
||
type="vertical"
|
||
style={{ width: "1px", height: "70px", margin: "9px 0px" }}
|
||
/>
|
||
<li>
|
||
完成率
|
||
<br />
|
||
<div className={styles.dataStyle4}>{allFinishRate}%</div>
|
||
{/* <a href="#" style={{ color: "red" }}> */}
|
||
{/* </a> */}
|
||
</li>
|
||
<Divider
|
||
type="vertical"
|
||
style={{ width: "1px", height: "70px", margin: "9px 0px" }}
|
||
/>
|
||
<li>
|
||
及时完成率
|
||
<br />
|
||
<div className={styles.dataStyle5}>{finishRate}%</div>
|
||
</li>
|
||
</div>
|
||
</div>
|
||
{/* <Col span={4}> <Button type='link' style= {{color:weekColor,marginRight:"5px"}} onClick={() => this.getDate("Week")}>最近1周</Button></Col> */}
|
||
{/* <Col span={4}> <Button type='link' style= {{color:monthColor,marginRight:"5px"}} onClick={() => this.getDate("Month")}>最近1月</Button></Col> */}
|
||
{/* <Col span={4}> <Button type='link' style= {{color:threeMonthColor,marginRight:"5px"}} onClick={() => this.getDate("ThreeMonth")}>最近3月</Button></Col> */}
|
||
{/* <Col span={4}> <Button type='link' style= {{color:sixMonthColor,marginRight:"5px"}} onClick={() => this.getDate("SixMonth")}>最近半年</Button></Col> */}
|
||
{/* <Col span={4}> <Button type='link' style= {{color:yearColor,marginRight:"5px"}} onClick={() => this.getDate("Year")}>最近1年</Button></Col> */}
|
||
{/* <Col span={4}> <Button type='link' style= {{color:yearColor,marginRight:"5px"}} onClick={() => this.getDate("All")}>全部</Button></Col> */}
|
||
|
||
<hr
|
||
style={{
|
||
border: "1px dashed #ccc",
|
||
marginBottom: "20px",
|
||
marginTop: "20px",
|
||
}}
|
||
></hr>
|
||
<Row style={{ margin: "20px 50px 0px 50px" }}>
|
||
<Col span={24}>
|
||
<h2
|
||
style={{
|
||
textAlign: "center",
|
||
fontWeight: "bold",
|
||
// marginLeft: "30px",
|
||
marginBottom: "20px",
|
||
}}
|
||
>
|
||
{/* <Icon type="appstore" /> */}
|
||
部门统计分析
|
||
</h2>
|
||
<Table
|
||
style={{
|
||
width: "1100px",
|
||
// marginLeft: "30px",
|
||
textAlign: "center",
|
||
}}
|
||
// scroll={{ y: 400 }}
|
||
dataSource={this.state.retData}
|
||
columns={this.state.columns}
|
||
pagination={false}
|
||
loading={false}
|
||
size="small"
|
||
/>
|
||
</Col>
|
||
</Row>
|
||
<Row style={{ margin: "20px 50px 50px 50px" }}>
|
||
<Col span={24}>
|
||
<h2
|
||
style={{
|
||
textAlign: "center",
|
||
fontWeight: "bold",
|
||
// marginLeft: "30px",
|
||
marginBottom: "20px",
|
||
}}
|
||
>
|
||
{/* <Icon type="appstore" /> */}
|
||
模块统计分析
|
||
</h2>
|
||
<Table
|
||
style={{
|
||
width: "1100px",
|
||
// marginLeft: "30px",
|
||
textAlign: "center",
|
||
}}
|
||
// scroll={{ y: 400 }}
|
||
dataSource={this.state.detailData}
|
||
columns={this.state.detailColumns}
|
||
pagination={false}
|
||
loading={false}
|
||
size="small"
|
||
/>
|
||
</Col>
|
||
</Row>
|
||
<hr
|
||
style={{
|
||
border: "1px dashed #ccc",
|
||
marginBottom: "20px",
|
||
marginTop: "20px",
|
||
}}
|
||
></hr>
|
||
<Row style={{ margin: "10px 50px 0px 50px" }}>
|
||
<Col
|
||
span={24}
|
||
style={{
|
||
borderStyle: "solid",
|
||
borderColor: "#E8E8E8",
|
||
borderWidth: "1px",
|
||
}}
|
||
>
|
||
<h2
|
||
style={{
|
||
textAlign: "center",
|
||
fontWeight: "bold",
|
||
marginTop: "20px",
|
||
}}
|
||
>
|
||
{this.keyWord}安全生产标准化运行走势图
|
||
</h2>
|
||
<div
|
||
id="ksRun"
|
||
style={{
|
||
height: "350px",
|
||
// marginLeft: "50px",
|
||
// marginRight: "30px",
|
||
backgroundColor: "white",
|
||
}}
|
||
></div>
|
||
</Col>
|
||
</Row>
|
||
<Row style={{ margin: "10px 50px 0px 50px" }}>
|
||
<Col
|
||
span={24}
|
||
style={{
|
||
borderStyle: "solid",
|
||
borderColor: "#E8E8E8",
|
||
borderWidth: "1px",
|
||
}}
|
||
>
|
||
<h2
|
||
style={{
|
||
textAlign: "center",
|
||
fontWeight: "bold",
|
||
marginTop: "20px",
|
||
}}
|
||
>
|
||
{this.keyWord2}安全生产标准化运行走势图
|
||
</h2>
|
||
<div
|
||
id="xkRun"
|
||
style={{
|
||
height: "350px",
|
||
// marginLeft: "50px",
|
||
// marginRight: "30px",
|
||
backgroundColor: "white",
|
||
}}
|
||
></div>
|
||
</Col>
|
||
</Row>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|
||
}
|
||
export default connect(({ login, app }) => ({ login, app }))(
|
||
BI006FormRunAnalysisNew
|
||
);
|