From 3d7c6dfc38f8cc7796b4cca62a09aab27ee3df19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Mon, 22 Apr 2024 11:30:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5SPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomPages/BI/BI007FormRunAnalysisNew.js | 1901 ++++++++++------- 1 file changed, 1093 insertions(+), 808 deletions(-) diff --git a/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js b/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js index c6df6a4..ea67874 100644 --- a/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js +++ b/src/components/CustomPages/BI/BI007FormRunAnalysisNew.js @@ -1,296 +1,330 @@ -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,Form,DatePicker,Progress, message} 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, + Form, + DatePicker, + Progress, + message, + 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 BI007FormRunAnalysisNew extends React.Component { - constructor(props) { super(props); this.state = { - selectStartTime: moment(this.getStartDate(), 'YYYY-MM-DD 00:00:00'), - selectEndTime:moment(this.getEndDate(), 'YYYY-MM-DD 23:59:59'), + selectStartTime: moment(this.getStartDate(), "YYYY-MM-DD 00:00:00"), + selectEndTime: moment(this.getEndDate(), "YYYY-MM-DD 23:59:59"), visible: false, - unfinishVisible:false, - noticeTitle: '', + unfinishVisible: false, + noticeTitle: "", tmpData: {}, tableKey: "1", 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:[], - allData:[], - unFinishData: [], - groupData:[], - detailData:[], - newData:[], - detailDataH:[], - displayHr:'none', - displaydetail:'none', - columns: [ - { - width: "100px", - 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', - render: (text, record) => ( - - this.showUnfinishModal(record)}>{record.UNFINISH_QTY} - - ), - }, - { - width: "50px", - title: '完成率', - dataIndex: 'FINISH_RATE', - key: 'FINISH_RATE', - }, - { - width: "70px", - title: '及时完成率', - dataIndex: 'NORMAL_FINISH_RATE', - key: 'NORMAL_FINISH_RATE', - } - ], - 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} - // - ), - } - ], - unfinishColumns:[ + 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: [], + allData: [], + unFinishData: [], + groupData: [], + detailData: [], + newData: [], + detailDataH: [], + displayHr: "none", + displaydetail: "none", + columns: [ + { + width: "100px", + 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: 'ROW_NO', - key: 'ROW_NO', + title: "未完成", + dataIndex: "UNFINISH_QTY", + key: "UNFINISH_QTY", + render: (text, record) => ( + + this.showUnfinishModal(record)}> + {record.UNFINISH_QTY} + + + ), + }, + { + width: "50px", + title: "完成率", + dataIndex: "FINISH_RATE", + key: "FINISH_RATE", + render: (text, record) => ( + {record.FINISH_RATE}% + ), + }, + { + width: "70px", + title: "及时完成率", + dataIndex: "NORMAL_FINISH_RATE", + key: "NORMAL_FINISH_RATE", + render: (text, record) => ( + {record.NORMAL_FINISH_RATE}% + // + // this.showEditModal(record.DEPARTMENT_ID,record.DEPARTMENT_NAME)}>{record.DEPARTMENT_NAME} + // + ), + }, + ], + 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} + // + ), + }, + ], + unfinishColumns: [ + { + width: "50px", + title: "序号", + dataIndex: "ROW_NO", + key: "ROW_NO", // render:(value,record,index)=>{ - + // }, }, { width: "100px", - title: '车间', - dataIndex: 'DEPARTMENT_NAME', - key: 'DEPARTMENT_NAME', + title: "车间", + dataIndex: "DEPARTMENT_NAME", + key: "DEPARTMENT_NAME", // render:(value,record,index)=>{ - + // }, }, { - width: "100px", - title: '待办名称', - dataIndex: 'NOTICE_TITLE', - key: 'NOTICE_TITLE', - // render:(value,record,index)=>{ - - // }, - }, - { - width: "200px", - title: '待办人', - dataIndex: 'USER_NAME', - key: 'USER_NAME' - }, - { - width: "100px", - title: '开始时间', - dataIndex: 'TASK_STARTDT', - key: 'TASK_STARTDT' - }, - { - width: "100px", - title: '结束时间', - dataIndex: 'TASK_ENDDT', - key: 'TASK_ENDDT' - }, - { - width: "80px", - title: '状态', - dataIndex: 'STATUS_NAME', - key: 'STATUS_NAME' - }, - ] - }; - }; + width: "100px", + title: "待办名称", + dataIndex: "NOTICE_TITLE", + key: "NOTICE_TITLE", + // render:(value,record,index)=>{ + + // }, + }, + { + width: "200px", + title: "待办人", + dataIndex: "USER_NAME", + key: "USER_NAME", + }, + { + width: "100px", + title: "开始时间", + dataIndex: "TASK_STARTDT", + key: "TASK_STARTDT", + }, + { + width: "100px", + title: "结束时间", + dataIndex: "TASK_ENDDT", + key: "TASK_ENDDT", + }, + { + width: "80px", + title: "状态", + dataIndex: "STATUS_NAME", + key: "STATUS_NAME", + }, + ], + }; + } componentDidMount() { - this.loadData() - }; + this.loadData(); + } showUnfinishModal = (record) => { - var orgId = this.props.login ? this.props.login.OrgId : ''; - let json = initFilter(orgId,'','TASK_STARTDT'); - let startTime=this.state.selectStartTime.format('YYYY-MM-DD 00:00:00'); - let endTime=this.state.selectEndTime.format('YYYY-MM-DD 23:59:59'); - extendRule(json, 'CREATE_DATE', 6, startTime); - extendRule(json, 'CREATE_DATE', 4, endTime); - extendRule(json, 'NOTICE_STATUS', 1, 0); - extendRule(json, 'SHOP_DEPARTMENT_ID', 1, record.DEPARTMENT_ID); + var orgId = this.props.login ? this.props.login.OrgId : ""; + let json = initFilter(orgId, "", "TASK_STARTDT"); + let startTime = this.state.selectStartTime.format("YYYY-MM-DD 00:00:00"); + let endTime = this.state.selectEndTime.format("YYYY-MM-DD 23:59:59"); + extendRule(json, "CREATE_DATE", 6, startTime); + extendRule(json, "CREATE_DATE", 4, endTime); + extendRule(json, "NOTICE_STATUS", 1, 0); + extendRule(json, "SHOP_DEPARTMENT_ID", 1, record.DEPARTMENT_ID); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", payload: json, - url: 'BI/NotificationTaskNew/OrderEntities', + url: "BI/NotificationTaskNew/OrderEntities", onComplete: (ret) => { if (ret) { - let newDataTemp=[] - let i=1; - ret.forEach(t=>{ + let newDataTemp = []; + let i = 1; + ret.forEach((t) => { t.ROW_NO = i; - t.DEPARTMENT_NAME=record.DEPARTMENT_NAME; - t.STATUS_NAME='未完成' + t.DEPARTMENT_NAME = record.DEPARTMENT_NAME; + t.STATUS_NAME = "未完成"; newDataTemp.push(t); - i++ - }) - this.setState({unfinishVisible:true,unFinishData:newDataTemp}) + i++; + }); + this.setState({ unfinishVisible: true, unFinishData: newDataTemp }); } - } - }) - } + }, + }); + }; 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 }); + }; // showEditModal = (dataId, formCode, TaskID, title, taskCode) => { // const newtmpData = { @@ -309,307 +343,319 @@ class BI007FormRunAnalysisNew extends React.Component { // visible: true // })); // } - getStartDate=()=>{ - let date = new Date() - let y = date.getFullYear() - let m = date.getMonth() + 1 - let d = date.getDate(); + 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) + .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; - } - - 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; + 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; + }; + + 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; } - getDepartId=()=>{ - + 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; + }; + getDepartId = () => {}; //加载数据赋值 loadData = () => { // this.ksRun(); // this.xkRun(); - var orgId = this.props.login ? this.props.login.OrgId : ''; - const jsonTemp = initFilter(orgId) - extendRule(jsonTemp, "NAME", 1, this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS); + var orgId = this.props.login ? this.props.login.OrgId : ""; + const jsonTemp = initFilter(orgId); + extendRule( + jsonTemp, + "NAME", + 1, + this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + ); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", payload: jsonTemp, - url: 'FM/Department/OrderEntities', + url: "FM/Department/OrderEntities", onComplete: (retDepart) => { - if (retDepart) { - // this.getClassDepartment(retDepart[0].ID); - this.getShopDepartment(retDepart[0].ID); - } - else - { - message.error("未找到部门"+this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS+",请先维护") - } + if (retDepart) { + // this.getClassDepartment(retDepart[0].ID); + this.getShopDepartment(retDepart[0].ID); + } else { + message.error( + "未找到部门" + + this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + + ",请先维护" + ); } - }) - - } + }, + }); + }; // workTicket = () => { - const {retData} = this.state; - let teamName = []; - let wattingQty = []; - let finishQty = []; - let overFinishQty = []; - let totalQty = []; - retData.forEach(item => { - teamName.push(item.DEPARTMENT_NAME); - wattingQty.push(item.UNFINISH_QTY); - finishQty.push(item.FINISH_QTY); - overFinishQty.push(item.OVER_FINISH_QTY); - totalQty.push(item.TOTAL_QTY); - }) - //图标2 - let workTickets = document.getElementById('workTicket'); - if (workTickets) { - let myChart = echarts.init(workTickets); - myChart.setOption({ - // title: { - // text: "部门级-安全事务完成情况", - // left: 'center' - // }, - tooltip: { - trigger: 'axis', - axisPointer: { // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - }, + const { retData } = this.state; + let teamName = []; + let wattingQty = []; + let finishQty = []; + let overFinishQty = []; + let totalQty = []; + retData.forEach((item) => { + teamName.push(item.DEPARTMENT_NAME); + wattingQty.push(item.UNFINISH_QTY); + finishQty.push(item.FINISH_QTY); + overFinishQty.push(item.OVER_FINISH_QTY); + totalQty.push(item.TOTAL_QTY); + }); + //图标2 + let workTickets = document.getElementById("workTicket"); + if (workTickets) { + let myChart = echarts.init(workTickets); + myChart.setOption({ + // title: { + // text: "部门级-安全事务完成情况", + // left: 'center' + // }, + tooltip: { + trigger: "axis", + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: "shadow", // 默认为直线,可选为:'line' | 'shadow' + }, + }, + grid: { + left: "3%", + right: "4%", + top: "10%", + bottom: "10%", + containLabel: true, + }, + xAxis: { + type: "category", + data: teamName, + axisLine: { + show: false, + // lineStyle: { + // color: 'rgba(192, 192, 102)' + // } + }, + axisTick: { + show: false, + }, + axisLabel: { + color: "#000", + rotate: 40, + formatter: function (value) { + // 自定义文字超出部分 ... + if (value.length > 5) { + return `${value.slice(0, 5)}...`; + } + return value; + }, + }, + }, + legend: { + data: ["正常已办", "超时已办", "未完成"], + bottom: "0px", + }, + yAxis: { + type: "value", + splitLine: { + show: false, + lineStyle: { + color: "#172749", + }, + }, + axisLine: { + show: false, + // lineStyle: { + // color: 'rgba(192, 192, 102)' + // } + }, + axisTick: { + show: false, + }, + }, + series: [ + // { + // name: '总数', + // type: 'bar', + // stack: '', + // label: { + // show: true, + // position: 'top', + // color: '#000', + // }, + // data: totalQty, + // barGap: '-100%', + // z: -1, + // itemStyle: { + // normal: { + // color: '#CCCCCC'//rgba(128, 128, 128, 0.3) + // } + // }, + // }, + { + name: "正常已办", + type: "bar", + stack: "总量", + label: { + show: true, + position: "inside", + color: "#000", + }, + emphasis: { + //折线图的高亮状态。 + focus: "series", //聚焦当前高亮的数据所在的系列的所有图形。 + }, + data: finishQty, + barGap: "-100%", + z: -1, + itemStyle: { + // 渐变色 1、指明颜色渐变的方向 2、指明不同百分比之下颜色的值 + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ + { offset: 0, color: "#01AEF6" }, + { offset: 1, color: "rgba(16,36,95,0.6)" }, //rgba(16,36,95,0.6) #9999FF + ]), + // normal: { + // color: '#5B9BD5', + // } + }, + }, + { + name: "超时已办", + type: "bar", + stack: "总量", + label: { + show: true, + position: "inside", + color: "#000", + }, + emphasis: { + //折线图的高亮状态。 + focus: "series", //聚焦当前高亮的数据所在的系列的所有图形。 + }, + data: overFinishQty, + barGap: "-100%", + z: -1, + itemStyle: { + // 渐变色 1、指明颜色渐变的方向 2、指明不同百分比之下颜色的值 + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ + { offset: 0, color: "#ED7D31" }, + { offset: 1, color: "#FFFF33" }, //rgba(255,255,0,0.6) + ]), + // normal: { + // color: '#ED7D31', + // } + }, + }, + { + name: "未完成", + type: "bar", + stack: "总量", + label: { + show: true, + position: "inside", + color: "#000", + }, + emphasis: { + //折线图的高亮状态。 + focus: "series", //聚焦当前高亮的数据所在的系列的所有图形。 + }, + data: wattingQty, + barGap: "-100%", + z: -1, + itemStyle: { + normal: { + color: "#CCCCCC", //rgba(128, 128, 128, 0.3) }, - grid: { - left: '3%', - right: '4%', - top: '10%', - bottom: '10%', - containLabel: true - }, - xAxis: { - type: 'category', - data: teamName, - axisLine: { - show: false, - // lineStyle: { - // color: 'rgba(192, 192, 102)' - // } - }, - axisTick: { - show: false - }, - axisLabel: { - color: '#000', - rotate: 40, - formatter: function (value) { // 自定义文字超出部分 ... - if (value.length > 5) { - return `${value.slice(0, 5)}...`; - } - return value; - } - } - }, - legend: { - data: ['正常已办', '超时已办','未完成'], - bottom: '0px' - }, - yAxis: { - type: 'value', - splitLine: { - show: false, - lineStyle: { - color: '#172749' - } - }, - axisLine: { - show: false, - // lineStyle: { - // color: 'rgba(192, 192, 102)' - // } - }, - axisTick: { - show: false - }, - }, - series: [ - // { - // name: '总数', - // type: 'bar', - // stack: '', - // label: { - // show: true, - // position: 'top', - // color: '#000', - // }, - // data: totalQty, - // barGap: '-100%', - // z: -1, - // itemStyle: { - // normal: { - // color: '#CCCCCC'//rgba(128, 128, 128, 0.3) - // } - // }, - // }, - { - name: '正常已办', - type: 'bar', - stack: '总量', - label: { - show: true, - position: 'inside', - color: '#000', - }, - emphasis: {//折线图的高亮状态。 - focus: "series",//聚焦当前高亮的数据所在的系列的所有图形。 - }, - data: finishQty, - barGap: '-100%', - z: -1, - itemStyle: { - // 渐变色 1、指明颜色渐变的方向 2、指明不同百分比之下颜色的值 - color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ - { offset: 0, color: "#01AEF6" }, - { offset: 1, color: "rgba(16,36,95,0.6)" },//rgba(16,36,95,0.6) #9999FF - ]), - // normal: { - // color: '#5B9BD5', - // } - }, - }, - { - name: '超时已办', - type: 'bar', - stack: '总量', - label: { - show: true, - position: 'inside', - color: '#000', - }, - emphasis: {//折线图的高亮状态。 - focus: "series",//聚焦当前高亮的数据所在的系列的所有图形。 - }, - data: overFinishQty, - barGap: '-100%', - z: -1, - itemStyle: { - // 渐变色 1、指明颜色渐变的方向 2、指明不同百分比之下颜色的值 - color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ - { offset: 0, color: "#ED7D31" }, - { offset: 1, color: "#FFFF33" },//rgba(255,255,0,0.6) - ]), - // normal: { - // color: '#ED7D31', - // } - }, - }, - { - name: '未完成', - type: 'bar', - stack: '总量', - label: { - show: true, - position: 'inside', - color: '#000', - }, - emphasis: {//折线图的高亮状态。 - focus: "series",//聚焦当前高亮的数据所在的系列的所有图形。 - }, - data: wattingQty, - barGap: '-100%', - z: -1, - itemStyle: { - normal: { - color: '#CCCCCC'//rgba(128, 128, 128, 0.3) - } - }, - }, - ], - }); - } - }//主要工作分布图(饼图) + }, + }, + ], + }); + } + }; //主要工作分布图(饼图) // mainJobPie2Old = () => { // const {retData} = this.state; // // let data = { "IsSuccessful": true, "Data": [{ "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "安全检查", "COUNT": 3, "COLOR": "#CD0505" }, { "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "作业现场", "COUNT": 2, "COLOR": "#FCD149" }, { "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "应急管理", "COUNT": 1, "COLOR": "#60A9F8" }], "TotalCount": 0, "ErrorMessage": null } - + // let moduleData = [] // let showData = [] // let dataColor = ["#FFFF00","#FF3300","#FF9900","#669900","#33FFFF","#CCCC66","#003399","#FFFFCC"] @@ -663,18 +709,21 @@ class BI007FormRunAnalysisNew extends React.Component { // }); // } mainJobPie2 = () => { - const {retData} = this.state; + const { retData } = this.state; // let data = { "IsSuccessful": true, "Data": [{ "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "安全检查", "COUNT": 3, "COLOR": "#CD0505" }, { "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "作业现场", "COUNT": 2, "COLOR": "#FCD149" }, { "USER_ID": "37c527b6-86cf-4549-8b2d-8528af5600d1", "DEPARTMENT_ID": "e3061909-1a7e-b60c-bc71-1845b79c4a11", "MODULE": "应急管理", "COUNT": 1, "COLOR": "#60A9F8" }], "TotalCount": 0, "ErrorMessage": null } - + let month = []; let company = []; let department = []; let totalCount = []; - retData.forEach((item) => { + let retDataTemp = retData.filter( + (m) => m.PARENT_DEPARTMENT_ID !== null + ); + retDataTemp.forEach((item) => { month.push(item.DEPARTMENT_NAME); company.push(item.FINISH_RATE); department.push(item.NORMAL_FINISH_RATE); - totalCount.push(item.FINISH_QTY+item.OVER_FINISH_QTY); + totalCount.push(item.FINISH_QTY + item.OVER_FINISH_QTY); }); let myChart = echarts.init(document.getElementById("mainJobPie2")); myChart.setOption({ @@ -695,12 +744,12 @@ class BI007FormRunAnalysisNew extends React.Component { params[1].marker + params[1].seriesName + " : " + - params[1].value + + params[1].value + "%"+ "
" + params[2].marker + params[2].seriesName + " : " + - params[2].value + params[2].value+ "%" ); }, }, @@ -710,7 +759,7 @@ class BI007FormRunAnalysisNew extends React.Component { top: "5%", }, legend: { - data: ["完成数","完成率", "及时完成率"], + data: ["完成数", "完成率", "及时完成率"], left: "center", align: "left", bottom: "2%", @@ -806,165 +855,182 @@ class BI007FormRunAnalysisNew extends React.Component { }, ], }); - } + }; compare = (val1, val2) => { return val2.NUM - val1.NUM; -}; - getClassDepartment=(dataTemp)=>{ - var orgId = this.props.login ? this.props.login.OrgId : ''; - const jsonTemp = initFilter(orgId) + }; + getClassDepartment = (dataTemp) => { + var orgId = this.props.login ? this.props.login.OrgId : ""; + const jsonTemp = initFilter(orgId); extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 2); // extendRule(jsonTemp, 'Nav_Parent.PARENT_ID', 1, this.props.data.id); - extendRule(jsonTemp, 'Nav_Parent.Nav_Parent.NAME', 1, this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS); + extendRule( + jsonTemp, + "Nav_Parent.Nav_Parent.NAME", + 1, + this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + ); extendOrder(jsonTemp, "PARENT_ID", 0); extendOrder(jsonTemp, "NAME", 0); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", payload: jsonTemp, - url: 'FM/Department/OrderEntities', + url: "FM/Department/OrderEntities", onComplete: (retDepart) => { - if (retDepart) { - let tempDepart=[]; - for(const t of retDepart) - { - 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); - } - // retDepart.forEach(t=>{ - - // }) - - // let json = initFilter(orgId,departId,'',1,'',this.state.selectStartTime,this.state.selectEndTime); - // extendRule(json, 'TYPE', 1, this.state.timeType); - // extendRule(json, 'DEPARTMENT_TYPE', 1, 2); - // extendRule(json, 'PARENT_DEPARTMENT_ID', 1, this.props.data.id); - // extendOrder(json, "PARENT_DEPARTMENT_ID", 0); - // extendOrder(json, "FINISH_RATE", 1); - if(dataTemp) - { - let temp=[] - for(const t of tempDepart) - { - let group=dataTemp.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+"%"; - t.NUM = group[0].TOTAL_QTY === 0 ?0:group[0].FINISH_QTY/group[0].TOTAL_QTY - } - temp.push(t); - } - temp =temp.sort(this.compare); - this.setState({ - detailData:temp - }) - } - // this.props.dispatch({ - // type: 'app/getDataByPost', - // payload: json, - // url: 'BI/BIStatiscialAnalysisController/GetDepartmentAnalyze', - // onComplete: (ret) => { - // if (ret) { - - // } - // } - // }) + if (retDepart) { + let tempDepart = []; + for (const t of retDepart) { + 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); } - } - }) - } + // retDepart.forEach(t=>{ - getShopDepartment=(departId)=>{ - var orgId = this.props.login ? this.props.login.OrgId : ''; - const jsonTemp = initFilter(orgId) + // }) + + // let json = initFilter(orgId,departId,'',1,'',this.state.selectStartTime,this.state.selectEndTime); + // extendRule(json, 'TYPE', 1, this.state.timeType); + // extendRule(json, 'DEPARTMENT_TYPE', 1, 2); + // extendRule(json, 'PARENT_DEPARTMENT_ID', 1, this.props.data.id); + // extendOrder(json, "PARENT_DEPARTMENT_ID", 0); + // extendOrder(json, "FINISH_RATE", 1); + if (dataTemp) { + let temp = []; + for (const t of tempDepart) { + let group = dataTemp.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 + "%"; + t.NUM = + group[0].TOTAL_QTY === 0 + ? 0 + : group[0].FINISH_QTY / group[0].TOTAL_QTY; + } + temp.push(t); + } + temp = temp.sort(this.compare); + this.setState({ + detailData: temp, + }); + } + // this.props.dispatch({ + // type: 'app/getDataByPost', + // payload: json, + // url: 'BI/BIStatiscialAnalysisController/GetDepartmentAnalyze', + // onComplete: (ret) => { + // if (ret) { + + // } + // } + // }) + } + }, + }); + }; + + getShopDepartment = (departId) => { + var orgId = this.props.login ? this.props.login.OrgId : ""; + const jsonTemp = initFilter(orgId); extendRule(jsonTemp, "DEPARTMENT_TYPE", 1, 1); // extendRule(jsonTemp, 'PARENT_ID', 1, this.props.data.id); - extendRule(jsonTemp, 'Nav_Parent.NAME', 1, this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS); + extendRule( + jsonTemp, + "Nav_Parent.NAME", + 1, + this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS + ); this.props.dispatch({ - type: 'app/getDataByPost', + type: "app/getDataByPost", payload: jsonTemp, - url: 'FM/Department/OrderEntities', + url: "FM/Department/OrderEntities", onComplete: (retDepart) => { - if (retDepart) { - let tempDepart=[]; - for(const t of retDepart) - { - 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); - } - 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,departId,'',1,'',startTime,endTime); - // extendRule(json, 'TYPE', 1, this.state.timeType); - // extendRule(json, 'DEPARTMENT_TYPE', 1, 1); - // extendRule(json, 'PARENT_DEPARTMENT_ID', 1, this.props.data.id); - this.props.dispatch({ - type: 'app/getDataByPost', - payload: json, - url: 'BI/BIStatiscialAnalysisController/GetDepartmentAnalyzeNew', - onComplete: (ret) => { + if (retDepart) { + let tempDepart = []; + for (const t of retDepart) { + 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); + } + 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, departId, "", 1, "", startTime, endTime); + // extendRule(json, 'TYPE', 1, this.state.timeType); + // extendRule(json, 'DEPARTMENT_TYPE', 1, 1); + // extendRule(json, 'PARENT_DEPARTMENT_ID', 1, this.props.data.id); + this.props.dispatch({ + type: "app/getDataByPost", + payload: json, + url: "BI/BIStatiscialAnalysisController/GetDepartmentAnalyzeNew", + onComplete: (ret) => { + if (ret) { + let temp = []; if (ret) { - let temp=[]; - if(ret) - { - let t1 = 0; - let t2 = 0; - let t3 = 0; - let t4 = 0; - for(const t of tempDepart) - { - let group=ret.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 t1 = 0; + let t2 = 0; + let t3 = 0; + let t4 = 0; + for (const t of tempDepart) { + let group = ret.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; } - let t5 = t1===0?"0%": ((t2+t3)/t1 *100).toFixed(0)+"%"; - let t6 = t1===0?"0%":(t2/t1 *100).toFixed(0)+"%"; - this.setState({ - retData:temp, - allData:ret, - totalCount:t1, - finishCount:t2, - overtimeCount:t3, - unfinishCount:t4, - rate:t5, - normalRate:t6, - },()=>{ + temp.push(t); + } + let t5 = + t1 === 0 ? "0%" : (((t2 + t3) / t1) * 100).toFixed(0) + "%"; + let t6 = t1 === 0 ? "0%" : ((t2 / t1) * 100).toFixed(0) + "%"; + this.setState( + { + retData: temp, + allData: ret, + totalCount: t1, + finishCount: t2, + overtimeCount: t3, + unfinishCount: t4, + rate: t5, + normalRate: t6, + }, + () => { this.getClassDepartment(ret); // this.workTicket(); this.mainJobPie2(); - }) + } + ); // ret.groupData.forEach(t=>{ // t.unDoneCount = t.TotalCount-t.doneCount -t.timeOverCount; // t.allDoneRate = ((t.doneCount +t.timeOverCount)/t.TotalCount*100).toFixed(0)+"%"; @@ -972,68 +1038,97 @@ class BI007FormRunAnalysisNew extends React.Component { // temp.push(t); // }) } - - } } - }) - } - } - }) - } - 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 = () => { // 退出弹窗 - this.clearData(); - } - startChange=(value)=>{ - this.setState({ - selectStartTime:value, - startTime:value.format("YYYYMMDD") - }) + }); }; - endChange=(value)=>{ + handleCancel = () => { + // 退出弹窗 + this.clearData(); + }; + startChange = (value) => { this.setState({ - selectEndTime:value, - endTime:value.format("YYYYMMDD") - }) + selectStartTime: value, + startTime: value.format("YYYYMMDD"), + }); + }; + endChange = (value) => { + this.setState({ + selectEndTime: value, + endTime: value.format("YYYYMMDD"), + }); }; clearUnfinishData = () => { this.setState({ - unfinishVisible:false, - unFinishData: [],//newtmpData - }) - } + unfinishVisible: false, + unFinishData: [], //newtmpData + }); + }; 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?0:((finishCount+overtimeCount)/totalCount * 100).toFixed(0); - let finishRate=totalCount ===0?0:(finishCount/totalCount * 100).toFixed(0); - return
- {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} -
- + {/* className='route-home' ,boxShadow:'inset 0 0 10px #ccc' */} +
+ - {/* {this.props.data.name} */} -

{this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS} 安全生产标准化运行情况

- ({startTime}-{endTime}) -

- - - - - - - - - - - - - - - - - - - - - - - - -
- - -

车间统计分析

-
+ {this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS}{" "} + 安全生产标准化运行情况 + + + {" "} + + ({startTime}-{endTime}) + + +

+
+
+ {/* */} + 查询时间: + - + {/* */} +
+ +
+ {/* */} + 至: + + {/* */} +
+
+ +
+
+
+
+
  • + 总任务数 +
    +
    {totalCount}
    +
  • + +
  • + 正常已办 +
    +
    {finishCount}
    +
  • + +
  • + 超时已办 +
    +
    {overtimeCount}
    +
  • + +
  • + 未完成数 +
    +
    {unfinishCount}
    + {/* */} + {/* */} +
  • + +
  • + 完成率 +
    +
    {allFinishRate}%
    + {/* */} + {/* */} +
  • + +
  • + 及时完成率 +
    +
    {finishRate}%
    +
  • +
    +
    +
    + +
    +
    + {/*

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

    */} +
    + + + + +
    +
    +

    + 车间统计分析 +

    +
    + + + {/*

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

    */} - - {/*

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

    */} -
    - - -
    - - -

    班组统计分析

    -
    - - - + +
    + +
    +
    +

    + 班组统计分析 +

    +
    + + + + - + ); } } -export default connect(({ login, app }) => ({ login, app }))(BI007FormRunAnalysisNew) +export default connect(({ login, app }) => ({ login, app }))( + BI007FormRunAnalysisNew +); From 6a833fbe551a7f5c3c279d26c2ee771a3040ef5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 24 Apr 2024 08:56:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/files/edit/HM104.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/files/edit/HM104.js b/src/files/edit/HM104.js index 3bb4617..490e121 100644 --- a/src/files/edit/HM104.js +++ b/src/files/edit/HM104.js @@ -16,25 +16,25 @@ export default { onBeforeEdit(params) { const { isNew, dispatch, login, setFieldValueByBatch, setFieldEditable, setFieldVisible,stateData } = params ? params : {}; if (isNew) { - let json = initFilter(login.OrgId); - dispatch({ - type: 'FMProcess/getFullGet', - payload: json, - onComplete: (ret) => { - if (ret) { - let temps = []; + // let json = initFilter(login.OrgId); + // dispatch({ + // type: 'FMProcess/getFullGet', + // payload: json, + // onComplete: (ret) => { + // if (ret) { + // let temps = []; - let detail = ret.Nav_Details.map((item, i) => { - item['ROW_NO'] = i + 1; - return item; - }); - temps.push({ field: 'DEPARTMENT_ID', value: ret.DEPARTMENT_ID }) - temps.push({ field: 'COMPLETE_DATE', value: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') }) - temps.push({ field: 'Nav_Details', value: detail }) - setFieldValueByBatch(temps); - } - } - }); + // let detail = ret.Nav_Details.map((item, i) => { + // item['ROW_NO'] = i + 1; + // return item; + // }); + // temps.push({ field: 'DEPARTMENT_ID', value: ret.DEPARTMENT_ID }) + // temps.push({ field: 'COMPLETE_DATE', value: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') }) + // temps.push({ field: 'Nav_Details', value: detail }) + // setFieldValueByBatch(temps); + // } + // } + // }); setFieldVisible("CONTEXT", false); } else From f700a9e4082a522aebab9fa1ff2a9d554c9d5458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 24 Apr 2024 09:01:11 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/files/edit/HM104.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/files/edit/HM104.js b/src/files/edit/HM104.js index 490e121..3bb4617 100644 --- a/src/files/edit/HM104.js +++ b/src/files/edit/HM104.js @@ -16,25 +16,25 @@ export default { onBeforeEdit(params) { const { isNew, dispatch, login, setFieldValueByBatch, setFieldEditable, setFieldVisible,stateData } = params ? params : {}; if (isNew) { - // let json = initFilter(login.OrgId); - // dispatch({ - // type: 'FMProcess/getFullGet', - // payload: json, - // onComplete: (ret) => { - // if (ret) { - // let temps = []; + let json = initFilter(login.OrgId); + dispatch({ + type: 'FMProcess/getFullGet', + payload: json, + onComplete: (ret) => { + if (ret) { + let temps = []; - // let detail = ret.Nav_Details.map((item, i) => { - // item['ROW_NO'] = i + 1; - // return item; - // }); - // temps.push({ field: 'DEPARTMENT_ID', value: ret.DEPARTMENT_ID }) - // temps.push({ field: 'COMPLETE_DATE', value: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') }) - // temps.push({ field: 'Nav_Details', value: detail }) - // setFieldValueByBatch(temps); - // } - // } - // }); + let detail = ret.Nav_Details.map((item, i) => { + item['ROW_NO'] = i + 1; + return item; + }); + temps.push({ field: 'DEPARTMENT_ID', value: ret.DEPARTMENT_ID }) + temps.push({ field: 'COMPLETE_DATE', value: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') }) + temps.push({ field: 'Nav_Details', value: detail }) + setFieldValueByBatch(temps); + } + } + }); setFieldVisible("CONTEXT", false); } else From f702038fb249ffc61c351cb8d6fde386a9bc9246 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 24 Apr 2024 10:00:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?BS006=E9=9C=80=E8=A6=81=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=20CM=E4=B8=8D=E9=9C=80=E8=A6=81=20SMS=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomPages/BS/BS006View.js | 2 +- src/components/CustomPages/CM/CM002ShowPrint.js | 8 ++++---- src/components/CustomPages/CM/CM034ShowPrint.js | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/CustomPages/BS/BS006View.js b/src/components/CustomPages/BS/BS006View.js index 8b95689..b37b4a8 100644 --- a/src/components/CustomPages/BS/BS006View.js +++ b/src/components/CustomPages/BS/BS006View.js @@ -121,7 +121,7 @@ class BS006View extends React.Component { data ?
    {data.CODE} - {data.NAME} + {data.NAME} {data.Nav_Check != null ? data.Nav_Check.NAME : ""} {data.Nav_CheckType != null ? data.Nav_CheckType.NAME : ""} {data.Nav_CheckTypeLevel != null ? data.Nav_CheckTypeLevel.Nav_Enums.NAME : ""} diff --git a/src/components/CustomPages/CM/CM002ShowPrint.js b/src/components/CustomPages/CM/CM002ShowPrint.js index ef95ddf..aad711d 100644 --- a/src/components/CustomPages/CM/CM002ShowPrint.js +++ b/src/components/CustomPages/CM/CM002ShowPrint.js @@ -56,7 +56,7 @@ class CM002ShowPrint extends React.Component { extendInclude(json, 'Nav_Department') extendInclude(json, 'Nav_listPlanDetail.Nav_Department') extendInclude(json, 'Nav_listPlanDetail.Nav_User') - extendInclude(json, 'Nav_listPlanDetail.Nav_ListStandard.Nav_StandardCreate') + // extendInclude(json, 'Nav_listPlanDetail.Nav_ListStandard.Nav_StandardCreate') extendIgnoreDataRule(json) this.props.dispatch({ type: 'app/getDataByPost', @@ -119,7 +119,7 @@ class CM002ShowPrint extends React.Component {
    - + {/* */} @@ -128,11 +128,11 @@ class CM002ShowPrint extends React.Component { return - + } */} diff --git a/src/components/CustomPages/CM/CM034ShowPrint.js b/src/components/CustomPages/CM/CM034ShowPrint.js index 618b5bf..afdb90c 100644 --- a/src/components/CustomPages/CM/CM034ShowPrint.js +++ b/src/components/CustomPages/CM/CM034ShowPrint.js @@ -61,6 +61,7 @@ class CM034ShowPrint extends React.Component { extendInclude(json, 'Nav_ListDepartment.Nav_Department') extendInclude(json, 'Nav_FilesSummary.Nav_ImgFile.Nav_File') extendInclude(json, 'Nav_FilesRecord.Nav_ImgFile.Nav_File') + extendInclude(json, 'Nav_FilesStander.Nav_ImgFile.Nav_File') extendInclude(json, 'Nav_Approve.Nav_ApproveDetails.Nav_ApproveUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File'); this.props.dispatch({ type: 'app/getDataByPost', @@ -131,6 +132,7 @@ class CM034ShowPrint extends React.Component { })}{showFiles(data.Nav_FilesSummary, config.picServerHost)}{showFiles(data.Nav_FilesRecord, config.picServerHost)} + {showFiles(data.Nav_FilesStander, config.picServerHost)} { data.STATUS >= 10 ? {
    应急演练时间 应急演练名称关联应急预案关联应急预案组织演练部门 责任人 演练方案触发时间
    {item.DRLL_DATE?.substring(0, 7)} {item.NAME} { + {/* { item.Nav_ListStandard?.map((itmc, j) => { return (j > 0 ? "," : "") + itmc.Nav_StandardCreate.NAME }) - } {item.Nav_Department?.NAME} {item.Nav_User?.NAME} {item.TRIGGER_TIME?.split(' ')[0]}