Merge branch 'main' of http://47.122.43.22:3000/wjn/mh-sms-web
This commit is contained in:
commit
f186f1a127
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ 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} from 'antd';
|
||||
import { Table, Button, Row, Col,Modal,Form ,DatePicker,Icon} from 'antd';
|
||||
import echarts from 'echarts';
|
||||
import styles from '../HI/StepForm.css';
|
||||
import moment from 'moment'
|
||||
@ -22,6 +22,8 @@ class BI008FormRunAnalysis 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'),
|
||||
visible: false,
|
||||
noticeTitle: '',
|
||||
tmpData: {},
|
||||
@ -300,7 +302,27 @@ class BI008FormRunAnalysis extends React.Component {
|
||||
// visible: true
|
||||
// }));
|
||||
// }
|
||||
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;
|
||||
}
|
||||
getDate=(type)=>{
|
||||
let date = new Date()
|
||||
let y = date .getFullYear()
|
||||
@ -587,6 +609,18 @@ class BI008FormRunAnalysis extends React.Component {
|
||||
}
|
||||
})
|
||||
}
|
||||
startChange=(value)=>{
|
||||
this.setState({
|
||||
selectStartTime:value,
|
||||
startTime:value.format("YYYYMMDD")
|
||||
})
|
||||
};
|
||||
endChange=(value)=>{
|
||||
this.setState({
|
||||
selectEndTime:value,
|
||||
endTime:value.format("YYYYMMDD")
|
||||
})
|
||||
};
|
||||
closeModal = () => { // 退出弹窗
|
||||
this.clearData();
|
||||
}
|
||||
@ -607,6 +641,10 @@ class BI008FormRunAnalysis extends React.Component {
|
||||
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 <div>
|
||||
@ -615,22 +653,52 @@ class BI008FormRunAnalysis extends React.Component {
|
||||
<h1 style={{ textAlign: "center",marginTop:'30px',fontWeight:'bold'}}>{this.props?.login?.currActivatedMenu?.MENU_FORM_PARAMS}安全生产标准化运行情况</h1>
|
||||
<Row style={{ textAlign: 'center',fontSize:'15px'}}> <span>({startTime}-{endTime})</span></Row>
|
||||
<br></br>
|
||||
<span style={{width:"800px",marginLeft:"30px"}}>
|
||||
<Row>
|
||||
<Col span={14} style={{ marginLeft: "10px" }}>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>总任务数<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'black'}}>{totalCount}</span></Button>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>正常已办<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'green'}}>{finishCount}</span></Button>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>超时已办<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'orange'}}>{overtimeCount}</span></Button>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>未完成数<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'red'}}>{unfinishCount}</span></Button>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>完成率<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'orange'}}>{allFinishRate}%</span></Button>
|
||||
<Button style={{width:"100px",height:"60px",borderRadius: '8px',border:'1px RGB(24, 149, 255) solid',marginRight:"10px"}}>及时完成率<br></br><span style={{fontWeight:"bold",fontSize:"20px",color:'orange'}}>{finishRate}%</span></Button>
|
||||
</span>
|
||||
<span style={{float:"right",marginTop:"20px",width:"400px"}}>
|
||||
<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>
|
||||
<Col span={3} style={{ marginLeft: "10px",marginTop:'20px' }}>
|
||||
<Form.Item
|
||||
label={'查询时间'}
|
||||
{...formItemLayout}
|
||||
>
|
||||
<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>
|
||||
|
||||
</Col>
|
||||
|
||||
<Col span={3} style={{ marginLeft: "10px",marginTop:'20px' }}>
|
||||
<Form.Item
|
||||
label={'至'}
|
||||
{...formItemLayout}
|
||||
>
|
||||
<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>
|
||||
</Col>
|
||||
<Col span={1} style={{ marginLeft: "50px" ,marginTop:'20px' }}><Button type='primary' onClick={() => this.loadData()}>查询</Button></Col>
|
||||
|
||||
</Row>
|
||||
|
||||
{/* <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> */}
|
||||
</span>
|
||||
|
||||
<hr style={{border:'1px dashed #ccc',marginBottom:"20px",marginTop:"20px"}}></hr>
|
||||
<Row style={{marginTop:"10px"}}>
|
||||
<Col span={4}>
|
||||
|
||||
@ -112,7 +112,6 @@ class HM042ShowPrint extends React.Component {
|
||||
this.state.isAudit = "inline";
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
this.state.data.Nav_Details = this.removeDuplicateObj(this.state.data.Nav_Details);
|
||||
if (ret.ID) {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
|
||||
@ -482,7 +482,7 @@ class SE018PaperPage extends React.Component {
|
||||
</tr>
|
||||
}
|
||||
{
|
||||
it.Nav_Test.TYPE !== 0 &&
|
||||
it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_D != "" && it.Nav_Test.OPTION_D != undefined &&
|
||||
<tr style={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? answer : null}>
|
||||
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? styles.answer : null}>
|
||||
{
|
||||
|
||||
@ -88,7 +88,7 @@ class SEConfigPage extends React.Component {
|
||||
}
|
||||
render() {
|
||||
const { data } = this.state;
|
||||
const dateFormat = 'YYYY/MM/DD';
|
||||
const dateFormat = 'MM-DD';
|
||||
return <>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<Button style={{ marginLeft: '8px' }} onClick={() => this.onSave()} icon="save" type="primary" loading={this.state.isLoading}>保存</Button>
|
||||
@ -201,6 +201,7 @@ class SEConfigPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1} >安全意识调查触发时间</td>
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
<DatePicker
|
||||
format={dateFormat}
|
||||
value={data.SAFE_SERVEY_TRIGGER_TIME ? moment(data.SAFE_SERVEY_TRIGGER_TIME) : null}
|
||||
onChange={value => {
|
||||
let data = this.state.data;
|
||||
@ -214,6 +215,7 @@ class SEConfigPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1} >培训需求调查触发时间</td>
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
<DatePicker
|
||||
format={dateFormat}
|
||||
value={data.TRAIN_SURVEY_TRIGGER_TIME ? moment(data.TRAIN_SURVEY_TRIGGER_TIME) : null}
|
||||
onChange={value => {
|
||||
let data = this.state.data;
|
||||
@ -227,6 +229,7 @@ class SEConfigPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1} >部门培训计划发起时间</td>
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
<DatePicker
|
||||
format={dateFormat}
|
||||
value={data.DEP_TRAIN_PLAN_START_TIME ? moment(data.DEP_TRAIN_PLAN_START_TIME) : null}
|
||||
onChange={value => {
|
||||
let data = this.state.data;
|
||||
@ -240,6 +243,7 @@ class SEConfigPage extends React.Component {
|
||||
<td colSpan={4} rowSpan={1} >部门培训计划截至时间</td>
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
<DatePicker
|
||||
format={dateFormat}
|
||||
value={data.DEP_TRAIN_PLAN_END_TIME ? moment(data.DEP_TRAIN_PLAN_END_TIME) : null}
|
||||
onChange={value => {
|
||||
let data = this.state.data;
|
||||
|
||||
@ -128,7 +128,7 @@ class SESafeSurveyTest extends React.Component {
|
||||
NAME = ret.Nav_Papers[0].Nav_Safe.NAME;
|
||||
END_TIME = ret.Nav_Papers[0].Nav_Safe.END_TIME;
|
||||
}
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") > END_TIME) {
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < END_TIME && this.props.data.tableKey != undefined) {
|
||||
message.error('已过答题截止时间!');
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
@ -457,7 +457,7 @@ class SESafeSurveyTest extends React.Component {
|
||||
</tr>
|
||||
}
|
||||
{
|
||||
it.Nav_Test.TYPE !== 0 &&
|
||||
it.Nav_Test.TYPE !== 0 && it.Nav_Test.OPTION_D != "" && it.Nav_Test.OPTION_D != undefined &&
|
||||
<tr style={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? answer : null}>
|
||||
<td colSpan={24} rowSpan={1} className={this.state.readonly && ((it.Nav_Test.ANSWER & 8) != 0) ? styles.answer : null}>
|
||||
{
|
||||
|
||||
@ -257,6 +257,43 @@ class Home extends React.Component {
|
||||
|
||||
// return retrundate;
|
||||
// };
|
||||
showTodayModal = (
|
||||
dataId,
|
||||
formCode,
|
||||
TaskID,
|
||||
title,
|
||||
taskCode,
|
||||
taskStartdt,
|
||||
taskStatus
|
||||
) => {
|
||||
const newtmpData = {
|
||||
data: {
|
||||
id: dataId,
|
||||
TaskID: TaskID,
|
||||
onCancel: this.handleCancel,
|
||||
taskCode: taskCode,
|
||||
tableKey: this.state.tableKey,
|
||||
noticeTitle: title,
|
||||
taskStartdt: taskStartdt,
|
||||
taskStatus: taskStatus,
|
||||
homeReload: true,
|
||||
},
|
||||
formCode: "PF135",
|
||||
};
|
||||
this.setState(
|
||||
{
|
||||
noticeTitle: "今日提醒",
|
||||
taskCode: taskCode,
|
||||
tmpData: newtmpData,
|
||||
currActivatedMenu: "",
|
||||
},
|
||||
() =>
|
||||
this.setState({
|
||||
formVisible: true,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
showAll = (key) => {
|
||||
const { tableData } = this.state;
|
||||
|
||||
@ -508,7 +545,7 @@ class Home extends React.Component {
|
||||
};
|
||||
handleCancel = () => {
|
||||
// 退出弹窗
|
||||
this.getBaseData(1, this.state.tableKey, 5);
|
||||
// this.getBaseData(1, this.state.tableKey, 5);
|
||||
this.clearData();
|
||||
};
|
||||
closeModal = () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user