双控模块添加json.Parameter22 = this.props.data.ORG_ID_HV;
This commit is contained in:
parent
f685435a77
commit
c02396c64d
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -23,12 +23,13 @@ class SK002ShowSummary extends React.Component {
|
|||||||
this.loadData();
|
this.loadData();
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId,"","",1,1);
|
let json = initFilter(this.props.login.OrgId, "", "", 1, 1);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendInclude(json, 'Nav_Type');
|
extendInclude(json, 'Nav_Type');
|
||||||
extendInclude(json, 'Nav_Area');
|
extendInclude(json, 'Nav_Area');
|
||||||
extendInclude(json, 'Nav_Details');
|
extendInclude(json, 'Nav_Details');
|
||||||
@ -45,7 +46,7 @@ class SK002ShowSummary extends React.Component {
|
|||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret && ret.Data) {
|
if (ret && ret.Data) {
|
||||||
this.setState({
|
this.setState({
|
||||||
data : ret.Data
|
data: ret.Data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -53,7 +54,7 @@ class SK002ShowSummary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -62,13 +63,13 @@ class SK002ShowSummary extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: "inline"}} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: "inline" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
|
||||||
@ -77,7 +78,7 @@ class SK002ShowSummary extends React.Component {
|
|||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制基础库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制基础库</h1>
|
||||||
|
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>生产单元</td>
|
<td className={stylesStep.fontBold}>生产单元</td>
|
||||||
@ -101,10 +102,10 @@ class SK002ShowSummary extends React.Component {
|
|||||||
<td className={stylesStep.fontBold}>整改措施</td>
|
<td className={stylesStep.fontBold}>整改措施</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data && data.map((item,i)=>{
|
data && data.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_ProductionUnit?.NAME}
|
{item.Nav_ProductionUnit?.NAME}
|
||||||
@ -140,14 +141,14 @@ class SK002ShowSummary extends React.Component {
|
|||||||
{item.EMERGENCY}
|
{item.EMERGENCY}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => {
|
{item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => {
|
||||||
if (item2) {
|
if (item2) {
|
||||||
return <label> {enums.SKDepartmentTypeEnum.enums[item2]}</label>
|
return <label> {enums.SKDepartmentTypeEnum.enums[item2]}</label>
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.MEASURE}
|
{item.MEASURE}
|
||||||
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
|
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
|
||||||
if (item2) {
|
if (item2) {
|
||||||
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
|
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
|
||||||
@ -155,7 +156,7 @@ class SK002ShowSummary extends React.Component {
|
|||||||
})} */}
|
})} */}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.CHECKCONTENTS}
|
{item.CHECKCONTENTS}
|
||||||
</td>
|
</td>
|
||||||
{/* <td>
|
{/* <td>
|
||||||
{item.CHECKBASICS }
|
{item.CHECKBASICS }
|
||||||
@ -164,18 +165,18 @@ class SK002ShowSummary extends React.Component {
|
|||||||
{ item.CHECKSTANDARDS }
|
{ item.CHECKSTANDARDS }
|
||||||
</td> */}
|
</td> */}
|
||||||
<td>
|
<td>
|
||||||
{ item.HIDDENSCRIPTION }
|
{item.HIDDENSCRIPTION}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.HIDDENLEVEL }
|
{item.HIDDENLEVEL}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.RECIFYMEASURE }
|
{item.RECIFYMEASURE}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{/* <FormPage {...this.state.tmpData} /> */}
|
{/* <FormPage {...this.state.tmpData} /> */}
|
||||||
</div>
|
</div>
|
||||||
@ -184,4 +185,4 @@ class SK002ShowSummary extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK002ShowSummary)
|
export default connect(({ login, app }) => ({ login, app }))(SK002ShowSummary)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React , { useState }from 'react';
|
import React, { useState } from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -14,28 +14,28 @@ class SK004CheckList extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
inputText:"",
|
inputText: "",
|
||||||
inputText2:"",
|
inputText2: "",
|
||||||
inputText3:"",
|
inputText3: "",
|
||||||
checkType:{},
|
checkType: {},
|
||||||
data: {},
|
data: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null,
|
CHECK_CYCLE_ID: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
DetailContents:[],
|
DetailContents: [],
|
||||||
columnContents : [
|
columnContents: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,13 +73,13 @@ class SK004CheckList extends React.Component {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
],
|
],
|
||||||
columns : [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,13 +101,13 @@ class SK004CheckList extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columndatas : [
|
columndatas: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -152,21 +152,20 @@ class SK004CheckList extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.props.data?.btnConfig?.id)
|
if (this.props.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(NextProps) {
|
componentWillReceiveProps(NextProps) {
|
||||||
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
|
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -174,16 +173,14 @@ class SK004CheckList extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetCheckList',
|
url: 'SK/SKEnterpriseLibrary/GetCheckList',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({data:ret, dataList: ret });
|
this.setState({ data: ret, dataList: ret });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadData2()
|
loadData2() {
|
||||||
{
|
let temp = this.state.data
|
||||||
let temp=this.state.data
|
if (this.state.inputText) {
|
||||||
if(this.state.inputText)
|
|
||||||
{
|
|
||||||
// let minetype=0
|
// let minetype=0
|
||||||
// if(this.state.inputText.includes("露天"))
|
// if(this.state.inputText.includes("露天"))
|
||||||
// {
|
// {
|
||||||
@ -209,10 +206,9 @@ class SK004CheckList extends React.Component {
|
|||||||
// {
|
// {
|
||||||
// minetype=40
|
// minetype=40
|
||||||
// }
|
// }
|
||||||
temp=temp.filter(t=>t.MineType ==this.state.inputText);
|
temp = temp.filter(t => t.MineType == this.state.inputText);
|
||||||
}
|
}
|
||||||
if(this.state.inputText2)
|
if (this.state.inputText2) {
|
||||||
{
|
|
||||||
// let checktype=3
|
// let checktype=3
|
||||||
// if(this.state.inputText2.includes("部门"))
|
// if(this.state.inputText2.includes("部门"))
|
||||||
// {
|
// {
|
||||||
@ -230,16 +226,15 @@ class SK004CheckList extends React.Component {
|
|||||||
// {
|
// {
|
||||||
// checktype=4
|
// checktype=4
|
||||||
// }
|
// }
|
||||||
temp=temp.filter(t=>t.CHECK_TYPE==this.state.inputText2);
|
temp = temp.filter(t => t.CHECK_TYPE == this.state.inputText2);
|
||||||
}
|
}
|
||||||
if(this.state.inputText3)
|
if (this.state.inputText3) {
|
||||||
{
|
temp = temp.filter(t => t.Nav_CheckType?.NAME.includes(this.state.inputText3));
|
||||||
temp=temp.filter(t=>t.Nav_CheckType?.NAME.includes(this.state.inputText3));
|
|
||||||
}
|
}
|
||||||
this.setState({dataList :temp})
|
this.setState({ dataList: temp })
|
||||||
}
|
}
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -249,9 +244,9 @@ class SK004CheckList extends React.Component {
|
|||||||
showModalContent = (item) => {
|
showModalContent = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: true,
|
showDetailContent: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
DetailContents:item.Nav_ContentDatas,
|
DetailContents: item.Nav_ContentDatas,
|
||||||
});
|
});
|
||||||
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
||||||
// extendIgnoreDataRule(json)
|
// extendIgnoreDataRule(json)
|
||||||
@ -270,8 +265,8 @@ class SK004CheckList extends React.Component {
|
|||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
let json = initFilter(this.props.login.OrgId,item.MineType,'','','',item.CHECK_TYPE_ID,item.CHECK_CYCLE,item.CHECK_TYPE);
|
let json = initFilter(this.props.login.OrgId, item.MineType, '', '', '', item.CHECK_TYPE_ID, item.CHECK_CYCLE, item.CHECK_TYPE);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -279,11 +274,13 @@ class SK004CheckList extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({ Details: ret,
|
this.setState({
|
||||||
MineType:item.MineType,
|
Details: ret,
|
||||||
CHECK_CYCLE:item.CHECK_CYCLE,
|
MineType: item.MineType,
|
||||||
CHECK_TYPE:item.CHECK_TYPE,
|
CHECK_CYCLE: item.CHECK_CYCLE,
|
||||||
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
|
CHECK_TYPE: item.CHECK_TYPE,
|
||||||
|
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -292,40 +289,40 @@ class SK004CheckList extends React.Component {
|
|||||||
handleCancel = () => {
|
handleCancel = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null
|
CHECK_CYCLE_ID: null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModal = () => {
|
closeModal = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null
|
CHECK_CYCLE_ID: null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleCancelContent = () => {
|
handleCancelContent = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
DetailContents:[]
|
DetailContents: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModalContent = () => {
|
closeModalContent = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
DetailContents:[]
|
DetailContents: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// handleSearch = (evt) => {
|
// handleSearch = (evt) => {
|
||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText: value ? value : "" });
|
// this.setState({ inputText: value ? value : "" });
|
||||||
// };
|
// };
|
||||||
handleSearch=(value)=>{
|
handleSearch = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText: value
|
inputText: value
|
||||||
})
|
})
|
||||||
@ -334,19 +331,19 @@ class SK004CheckList extends React.Component {
|
|||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText2: value ? value : "" });
|
// this.setState({ inputText2: value ? value : "" });
|
||||||
// };
|
// };
|
||||||
handleSearch2=(value)=>{
|
handleSearch2 = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText2: value
|
inputText2: value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handleSearch3 = ({data, record}) => {
|
handleSearch3 = ({ data, record }) => {
|
||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText3: value ? value : "" });
|
// this.setState({ inputText3: value ? value : "" });
|
||||||
this.setState({
|
this.setState({
|
||||||
checkType: {
|
checkType: {
|
||||||
...this.state.checkType,
|
...this.state.checkType,
|
||||||
ID: data[0],
|
ID: data[0],
|
||||||
NAME: record?.NAME ,
|
NAME: record?.NAME,
|
||||||
},
|
},
|
||||||
inputText3: record?.NAME
|
inputText3: record?.NAME
|
||||||
})
|
})
|
||||||
@ -356,7 +353,7 @@ class SK004CheckList extends React.Component {
|
|||||||
labelCol: { span: 8 },
|
labelCol: { span: 8 },
|
||||||
wrapperCol: { span: 16 },
|
wrapperCol: { span: 16 },
|
||||||
}
|
}
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<Modal
|
<Modal
|
||||||
@ -407,7 +404,7 @@ class SK004CheckList extends React.Component {
|
|||||||
{/* <Row>
|
{/* <Row>
|
||||||
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
|
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
|
||||||
</Row> */}
|
</Row> */}
|
||||||
<Row style={{width:"1250px",margin:"auto"}}>
|
<Row style={{ width: "1250px", margin: "auto" }}>
|
||||||
<Col span={5} style={{ marginLeft: "10px" }}>
|
<Col span={5} style={{ marginLeft: "10px" }}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={'生产单元'}
|
label={'生产单元'}
|
||||||
@ -415,7 +412,7 @@ class SK004CheckList extends React.Component {
|
|||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
// defaultValue="风险管理"
|
// defaultValue="风险管理"
|
||||||
style={{width:'180px'}}
|
style={{ width: '180px' }}
|
||||||
allowClear
|
allowClear
|
||||||
onChange={this.handleSearch}
|
onChange={this.handleSearch}
|
||||||
>
|
>
|
||||||
@ -443,7 +440,7 @@ class SK004CheckList extends React.Component {
|
|||||||
<Select
|
<Select
|
||||||
// defaultValue="风险管理"
|
// defaultValue="风险管理"
|
||||||
allowClear
|
allowClear
|
||||||
style={{width:'180px'}}
|
style={{ width: '180px' }}
|
||||||
onChange={this.handleSearch2}
|
onChange={this.handleSearch2}
|
||||||
>
|
>
|
||||||
<Option value="2">班组级</Option>
|
<Option value="2">班组级</Option>
|
||||||
@ -479,8 +476,8 @@ class SK004CheckList extends React.Component {
|
|||||||
</Row>
|
</Row>
|
||||||
<div>
|
<div>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
||||||
{this.state.dataList?
|
{this.state.dataList ?
|
||||||
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
|
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
|
||||||
dataSource={this.state.dataList}
|
dataSource={this.state.dataList}
|
||||||
columns={this.state.columndatas}
|
columns={this.state.columndatas}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
@ -488,11 +485,11 @@ class SK004CheckList extends React.Component {
|
|||||||
loading={false}
|
loading={false}
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
:[]}
|
: []}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK004CheckList)
|
export default connect(({ login, app }) => ({ login, app }))(SK004CheckList)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React , { useState }from 'react';
|
import React, { useState } from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -14,34 +14,34 @@ class SK004CheckListNew extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
inputText:"",
|
inputText: "",
|
||||||
inputText2:"",
|
inputText2: "",
|
||||||
inputText3:"",
|
inputText3: "",
|
||||||
inputText4:"",
|
inputText4: "",
|
||||||
inputText5:"",
|
inputText5: "",
|
||||||
inputText6:"",
|
inputText6: "",
|
||||||
depart: {},
|
depart: {},
|
||||||
production: {},
|
production: {},
|
||||||
productionId:null,
|
productionId: null,
|
||||||
checkType:{},
|
checkType: {},
|
||||||
data: {},
|
data: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null,
|
CHECK_CYCLE_ID: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
DetailContents:[],
|
DetailContents: [],
|
||||||
columnContents : [
|
columnContents: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -72,13 +72,13 @@ class SK004CheckListNew extends React.Component {
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
columndatas : [
|
columndatas: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -125,21 +125,20 @@ class SK004CheckListNew extends React.Component {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.props.data?.btnConfig?.id)
|
if (this.props.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(NextProps) {
|
componentWillReceiveProps(NextProps) {
|
||||||
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
|
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -147,16 +146,14 @@ class SK004CheckListNew extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetCheckListNew',
|
url: 'SK/SKEnterpriseLibrary/GetCheckListNew',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({data:ret, dataList: ret });
|
this.setState({ data: ret, dataList: ret });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadData2()
|
loadData2() {
|
||||||
{
|
let temp = this.state.data
|
||||||
let temp=this.state.data
|
if (this.state.productionId) {
|
||||||
if(this.state.productionId)
|
|
||||||
{
|
|
||||||
// let minetype="全公司"
|
// let minetype="全公司"
|
||||||
// if(this.state.inputText === "10")
|
// if(this.state.inputText === "10")
|
||||||
// {
|
// {
|
||||||
@ -183,10 +180,9 @@ class SK004CheckListNew extends React.Component {
|
|||||||
// minetype="地下矿"
|
// minetype="地下矿"
|
||||||
// }
|
// }
|
||||||
|
|
||||||
temp=temp.filter(t=>t.PRODUCTION_UNIT_ID ==this.state.productionId);
|
temp = temp.filter(t => t.PRODUCTION_UNIT_ID == this.state.productionId);
|
||||||
}
|
}
|
||||||
if(this.state.inputText2)
|
if (this.state.inputText2) {
|
||||||
{
|
|
||||||
// let checktype=3
|
// let checktype=3
|
||||||
// if(this.state.inputText2.includes("部门"))
|
// if(this.state.inputText2.includes("部门"))
|
||||||
// {
|
// {
|
||||||
@ -204,28 +200,24 @@ class SK004CheckListNew extends React.Component {
|
|||||||
// {
|
// {
|
||||||
// checktype=4
|
// checktype=4
|
||||||
// }
|
// }
|
||||||
temp=temp.filter(t=>t.CheckLevel==this.state.inputText2);
|
temp = temp.filter(t => t.CheckLevel == this.state.inputText2);
|
||||||
}
|
}
|
||||||
if(this.state.inputText6)
|
if (this.state.inputText6) {
|
||||||
{
|
temp = temp.filter(t => t.CheckCycle == this.state.inputText6);
|
||||||
temp=temp.filter(t=>t.CheckCycle==this.state.inputText6);
|
|
||||||
}
|
}
|
||||||
if(this.state.inputText3)
|
if (this.state.inputText3) {
|
||||||
{
|
temp = temp.filter(t => t.CheckType == this.state.inputText3);
|
||||||
temp=temp.filter(t=>t.CheckType == this.state.inputText3);
|
|
||||||
}
|
}
|
||||||
if(this.state.inputText4)
|
if (this.state.inputText4) {
|
||||||
{
|
temp = temp.filter(t => t.CheckDepart.includes(this.state.inputText4));
|
||||||
temp=temp.filter(t=>t.CheckDepart.includes(this.state.inputText4));
|
|
||||||
}
|
}
|
||||||
if(this.state.inputText5)
|
if (this.state.inputText5) {
|
||||||
{
|
temp = temp.filter(t => t.CheckPost != null && t.CheckPost.includes(this.state.inputText5));
|
||||||
temp=temp.filter(t=>t.CheckPost!=null &&t.CheckPost.includes(this.state.inputText5));
|
|
||||||
}
|
}
|
||||||
this.setState({dataList :temp})
|
this.setState({ dataList: temp })
|
||||||
}
|
}
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -235,9 +227,9 @@ class SK004CheckListNew extends React.Component {
|
|||||||
showModalContent = (item) => {
|
showModalContent = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: true,
|
showDetailContent: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
DetailContents:item.details,
|
DetailContents: item.details,
|
||||||
});
|
});
|
||||||
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
||||||
// extendIgnoreDataRule(json)
|
// extendIgnoreDataRule(json)
|
||||||
@ -256,8 +248,8 @@ class SK004CheckListNew extends React.Component {
|
|||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
let json = initFilter(this.props.login.OrgId,item.MineType,'','','',item.CHECK_TYPE_ID,item.CHECK_CYCLE,item.CHECK_TYPE);
|
let json = initFilter(this.props.login.OrgId, item.MineType, '', '', '', item.CHECK_TYPE_ID, item.CHECK_CYCLE, item.CHECK_TYPE);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -265,11 +257,13 @@ class SK004CheckListNew extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({ Details: ret,
|
this.setState({
|
||||||
MineType:item.MineType,
|
Details: ret,
|
||||||
CHECK_CYCLE:item.CHECK_CYCLE,
|
MineType: item.MineType,
|
||||||
CHECK_TYPE:item.CHECK_TYPE,
|
CHECK_CYCLE: item.CHECK_CYCLE,
|
||||||
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
|
CHECK_TYPE: item.CHECK_TYPE,
|
||||||
|
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -278,36 +272,36 @@ class SK004CheckListNew extends React.Component {
|
|||||||
handleCancel = () => {
|
handleCancel = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null
|
CHECK_CYCLE_ID: null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModal = () => {
|
closeModal = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null
|
CHECK_CYCLE_ID: null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleCancelContent = () => {
|
handleCancelContent = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
DetailContents:[]
|
DetailContents: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModalContent = () => {
|
closeModalContent = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
DetailContents:[]
|
DetailContents: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleSearch = ({data, record}) => {
|
handleSearch = ({ data, record }) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
production: {
|
production: {
|
||||||
...this.state.production,
|
...this.state.production,
|
||||||
@ -327,34 +321,34 @@ class SK004CheckListNew extends React.Component {
|
|||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText2: value ? value : "" });
|
// this.setState({ inputText2: value ? value : "" });
|
||||||
// };
|
// };
|
||||||
handleSearch2=(value)=>{
|
handleSearch2 = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText2: value
|
inputText2: value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handleSearch6=(value)=>{
|
handleSearch6 = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText6: value
|
inputText6: value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handleSearch3 = ({data, record}) => {
|
handleSearch3 = ({ data, record }) => {
|
||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText3: value ? value : "" });
|
// this.setState({ inputText3: value ? value : "" });
|
||||||
this.setState({
|
this.setState({
|
||||||
checkType: {
|
checkType: {
|
||||||
...this.state.checkType,
|
...this.state.checkType,
|
||||||
ID: data[0],
|
ID: data[0],
|
||||||
NAME: record?.NAME ,
|
NAME: record?.NAME,
|
||||||
},
|
},
|
||||||
inputText3: record?.NAME
|
inputText3: record?.NAME
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
handleSearch4=(e)=>{
|
handleSearch4 = (e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText4: e.target.value
|
inputText4: e.target.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handleSearch5=(e)=>{
|
handleSearch5 = (e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText5: e.target.value
|
inputText5: e.target.value
|
||||||
})
|
})
|
||||||
@ -375,7 +369,7 @@ class SK004CheckListNew extends React.Component {
|
|||||||
labelCol: { span: 8 },
|
labelCol: { span: 8 },
|
||||||
wrapperCol: { span: 16 },
|
wrapperCol: { span: 16 },
|
||||||
}
|
}
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<Modal
|
<Modal
|
||||||
@ -409,7 +403,7 @@ class SK004CheckListNew extends React.Component {
|
|||||||
{/* <Row>
|
{/* <Row>
|
||||||
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
|
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
|
||||||
</Row> */}
|
</Row> */}
|
||||||
<Row style={{width:"1250px",margin:"auto"}}>
|
<Row style={{ width: "1250px", margin: "auto" }}>
|
||||||
<Col span={5} style={{ marginLeft: "10px" }}>
|
<Col span={5} style={{ marginLeft: "10px" }}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={'生产单元'}
|
label={'生产单元'}
|
||||||
@ -446,7 +440,7 @@ class SK004CheckListNew extends React.Component {
|
|||||||
<Select
|
<Select
|
||||||
// defaultValue="风险管理"
|
// defaultValue="风险管理"
|
||||||
allowClear
|
allowClear
|
||||||
style={{width:'180px'}}
|
style={{ width: '180px' }}
|
||||||
onChange={this.handleSearch2}
|
onChange={this.handleSearch2}
|
||||||
>
|
>
|
||||||
<Option value="班组级">班组级</Option>
|
<Option value="班组级">班组级</Option>
|
||||||
@ -486,7 +480,7 @@ class SK004CheckListNew extends React.Component {
|
|||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
allowClear
|
allowClear
|
||||||
style={{width:'180px'}}
|
style={{ width: '180px' }}
|
||||||
onChange={this.handleSearch6}
|
onChange={this.handleSearch6}
|
||||||
>
|
>
|
||||||
<Option value="每天">每天</Option>
|
<Option value="每天">每天</Option>
|
||||||
@ -531,8 +525,8 @@ class SK004CheckListNew extends React.Component {
|
|||||||
</Row>
|
</Row>
|
||||||
<div>
|
<div>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
||||||
{this.state.dataList?
|
{this.state.dataList ?
|
||||||
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
|
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
|
||||||
dataSource={this.state.dataList}
|
dataSource={this.state.dataList}
|
||||||
columns={this.state.columndatas}
|
columns={this.state.columndatas}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
@ -540,11 +534,11 @@ class SK004CheckListNew extends React.Component {
|
|||||||
loading={false}
|
loading={false}
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
:[]}
|
: []}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK004CheckListNew)
|
export default connect(({ login, app }) => ({ login, app }))(SK004CheckListNew)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React , { useState }from 'react';
|
import React, { useState } from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue,GetFileModel, guid, initQueryFilter,showFiles } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, GetFileModel, guid, initQueryFilter, showFiles } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -18,32 +18,32 @@ class SK004CheckPost extends React.Component {
|
|||||||
title: "",
|
title: "",
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
inputText:"",
|
inputText: "",
|
||||||
inputText2:"",
|
inputText2: "",
|
||||||
inputText3:"",
|
inputText3: "",
|
||||||
departId:null,
|
departId: null,
|
||||||
data: {},
|
data: {},
|
||||||
depart: {},
|
depart: {},
|
||||||
departName:'',
|
departName: '',
|
||||||
postName:'',
|
postName: '',
|
||||||
phone:'',
|
phone: '',
|
||||||
post: {},
|
post: {},
|
||||||
cards: {},
|
cards: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
MineType:0,
|
MineType: 0,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null,
|
CHECK_CYCLE_ID: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
columns : [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -111,13 +111,13 @@ class SK004CheckPost extends React.Component {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
columndatas : [
|
columndatas: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -151,21 +151,20 @@ class SK004CheckPost extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.props.data?.btnConfig?.id)
|
if (this.props.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(NextProps) {
|
componentWillReceiveProps(NextProps) {
|
||||||
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
|
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -173,30 +172,26 @@ class SK004CheckPost extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetPostRiskList',
|
url: 'SK/SKEnterpriseLibrary/GetPostRiskList',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({ data:ret,dataList: ret });
|
this.setState({ data: ret, dataList: ret });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadData2()
|
loadData2() {
|
||||||
{
|
let temp = this.state.data
|
||||||
let temp=this.state.data
|
if (this.state.inputText) {
|
||||||
if(this.state.inputText)
|
temp = temp.filter(t => t.Nav_Department?.NAME.includes(this.state.inputText));
|
||||||
{
|
|
||||||
temp=temp.filter(t=>t.Nav_Department?.NAME.includes(this.state.inputText));
|
|
||||||
}
|
}
|
||||||
if(this.state.inputText2)
|
if (this.state.inputText2) {
|
||||||
{
|
temp = temp.filter(t => t.POST_NAME.includes(this.state.inputText2));
|
||||||
temp=temp.filter(t=>t.POST_NAME.includes(this.state.inputText2));
|
|
||||||
}
|
}
|
||||||
if(this.state.inputText3)
|
if (this.state.inputText3) {
|
||||||
{
|
temp = temp.filter(t => t.Nav_Library?.Nav_ProductionUnit?.NAME.includes(this.state.inputText3));
|
||||||
temp=temp.filter(t=>t.Nav_Library?.Nav_ProductionUnit?.NAME.includes(this.state.inputText3));
|
|
||||||
}
|
}
|
||||||
this.setState({dataList :temp})
|
this.setState({ dataList: temp })
|
||||||
}
|
}
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -207,67 +202,65 @@ class SK004CheckPost extends React.Component {
|
|||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
Details:item.Nav_Librarys,
|
Details: item.Nav_Librarys,
|
||||||
departName:item.Nav_Department?.NAME,
|
departName: item.Nav_Department?.NAME,
|
||||||
postName:item.POST_NAME,
|
postName: item.POST_NAME,
|
||||||
phone:item.PHONE,
|
phone: item.PHONE,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleCancel = () => {
|
handleCancel = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[]
|
Details: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModal = () => {
|
closeModal = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
Details:[]
|
Details: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleCancelCard = () => {
|
handleCancelCard = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showCard: false,
|
showCard: false,
|
||||||
cards:{}
|
cards: {}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
showModalCard = (record) => {
|
showModalCard = (record) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showCard: true,
|
showCard: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
let tmpData = [];
|
let tmpData = [];
|
||||||
if(record.Nav_Details)
|
if (record.Nav_Details) {
|
||||||
{
|
for (var i = 0; i < record.Nav_Details.length; i++) {
|
||||||
for(var i = 0; i <record.Nav_Details.length ; i++)
|
tmpData = tmpData + "\r\n" + (i + 1) + "、" + record.Nav_Details[i].MEASURES_NAME
|
||||||
{
|
|
||||||
tmpData = tmpData+ "\r\n"+ (i+1)+"、" +record.Nav_Details[i].MEASURES_NAME
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let temps={
|
let temps = {
|
||||||
RISK_NAME:record.RISK_NAME,
|
RISK_NAME: record.RISK_NAME,
|
||||||
RISK_CODE:"01",
|
RISK_CODE: "01",
|
||||||
EVALUATE_LEVEL:this.props.app.enums.SKEvaluateLevelEnum.enums[record.EVALUATE_LEVEL],
|
EVALUATE_LEVEL: this.props.app.enums.SKEvaluateLevelEnum.enums[record.EVALUATE_LEVEL],
|
||||||
RISK_DESCRIPTION:record.RISK_DESCRIPTION,
|
RISK_DESCRIPTION: record.RISK_DESCRIPTION,
|
||||||
MEASURES_NAME:tmpData,
|
MEASURES_NAME: tmpData,
|
||||||
RISK_TYPE:record.Nav_Type.NAME,
|
RISK_TYPE: record.Nav_Type.NAME,
|
||||||
EMERGENCY:record.EMERGENCY,
|
EMERGENCY: record.EMERGENCY,
|
||||||
photo:record.Nav_Photo[0]
|
photo: record.Nav_Photo[0]
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
cards:temps,
|
cards: temps,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
closeModalCard = () => {
|
closeModalCard = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showCard: false,
|
showCard: false,
|
||||||
cards:{}
|
cards: {}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
handleSearch = ({data, record}) => {
|
handleSearch = ({ data, record }) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
depart: {
|
depart: {
|
||||||
...this.state.depart,
|
...this.state.depart,
|
||||||
@ -278,7 +271,7 @@ class SK004CheckPost extends React.Component {
|
|||||||
departId: record?.ID
|
departId: record?.ID
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
handleSearch2 = ({data, record}) => {
|
handleSearch2 = ({ data, record }) => {
|
||||||
// const { value } = evt.target;
|
// const { value } = evt.target;
|
||||||
// this.setState({ inputText2: value ? value : "" });
|
// this.setState({ inputText2: value ? value : "" });
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -290,7 +283,7 @@ class SK004CheckPost extends React.Component {
|
|||||||
inputText2: record?.NAME
|
inputText2: record?.NAME
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
handleSearch3=(value)=>{
|
handleSearch3 = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inputText3: value
|
inputText3: value
|
||||||
})
|
})
|
||||||
@ -300,7 +293,7 @@ class SK004CheckPost extends React.Component {
|
|||||||
labelCol: { span: 8 },
|
labelCol: { span: 8 },
|
||||||
wrapperCol: { span: 16 },
|
wrapperCol: { span: 16 },
|
||||||
}
|
}
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<div>
|
<div>
|
||||||
@ -314,17 +307,17 @@ class SK004CheckPost extends React.Component {
|
|||||||
closeModal={this.closeModalCard}
|
closeModal={this.closeModalCard}
|
||||||
>
|
>
|
||||||
<br></br>
|
<br></br>
|
||||||
<h2 style={{textAlign:'center',fontWeight:'bold',margin:"auto",color:"red"}}> {this.state.postName}岗位风险点告知卡</h2>
|
<h2 style={{ textAlign: 'center', fontWeight: 'bold', margin: "auto", color: "red" }}> {this.state.postName}岗位风险点告知卡</h2>
|
||||||
<br></br>
|
<br></br>
|
||||||
<table style={{margin:"auto",alignContent:"center",width:"1000px"}} className={stylesStep.PrintForm} >
|
<table style={{ margin: "auto", alignContent: "center", width: "1000px" }} className={stylesStep.PrintForm} >
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>
|
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>
|
||||||
风险点名称
|
风险点名称
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{this.state.cards?.RISK_NAME}
|
{this.state.cards?.RISK_NAME}
|
||||||
</td>
|
</td>
|
||||||
<td style={{backgroundColor:"red",color:"white",width:"150px",textAlign:'center'}} rowSpan={3}>
|
<td style={{ backgroundColor: "red", color: "white", width: "150px", textAlign: 'center' }} rowSpan={3}>
|
||||||
主要危险因素描述
|
主要危险因素描述
|
||||||
</td>
|
</td>
|
||||||
<td rowSpan={3}>
|
<td rowSpan={3}>
|
||||||
@ -332,32 +325,32 @@ class SK004CheckPost extends React.Component {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>风险点编号</td>
|
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>风险点编号</td>
|
||||||
<td> {this.state.cards?.RISK_CODE}</td>
|
<td> {this.state.cards?.RISK_CODE}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>风险等级</td>
|
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>风险等级</td>
|
||||||
<td> {this.state.cards?.EVALUATE_LEVEL}</td>
|
<td> {this.state.cards?.EVALUATE_LEVEL}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>安全标志</td>
|
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>安全标志</td>
|
||||||
<td> {this.state.cards?.photo?showFiles(this.state.cards?.photo, config.picServerHost, this)
|
<td> {this.state.cards?.photo ? showFiles(this.state.cards?.photo, config.picServerHost, this)
|
||||||
:<img title={"安全标志"} src={require("../../../../src/assets/aqbz.png")} />
|
: <img title={"安全标志"} src={require("../../../../src/assets/aqbz.png")} />
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td style={{backgroundColor:"red",color:"white",width:"150px",textAlign:'center'}}>主要风险控制措施</td>
|
<td style={{ backgroundColor: "red", color: "white", width: "150px", textAlign: 'center' }}>主要风险控制措施</td>
|
||||||
<td> {this.state.cards?.MEASURES_NAME}</td>
|
<td> {this.state.cards?.MEASURES_NAME}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"rgba(1,203,253)",color:"white",width:"120px",textAlign:'center'}}>责任单位</td>
|
<td style={{ backgroundColor: "rgba(1,203,253)", color: "white", width: "120px", textAlign: 'center' }}>责任单位</td>
|
||||||
<td> {this.state?.departName}</td>
|
<td> {this.state?.departName}</td>
|
||||||
<td style={{backgroundColor:"red",color:"white",width:"150px",textAlign:'center'}}>主要事故类型</td>
|
<td style={{ backgroundColor: "red", color: "white", width: "150px", textAlign: 'center' }}>主要事故类型</td>
|
||||||
<td> {this.state.cards?.RISK_TYPE}</td>
|
<td> {this.state.cards?.RISK_TYPE}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style={{backgroundColor:"rgba(1,203,253)",color:"white",width:"120px",textAlign:'center'}}>责任人联系电话</td>
|
<td style={{ backgroundColor: "rgba(1,203,253)", color: "white", width: "120px", textAlign: 'center' }}>责任人联系电话</td>
|
||||||
<td> {this.state?.phone}</td>
|
<td> {this.state?.phone}</td>
|
||||||
<td style={{backgroundColor:"red",color:"white",width:"150px",textAlign:'center'}}>应急处置措施</td>
|
<td style={{ backgroundColor: "red", color: "white", width: "150px", textAlign: 'center' }}>应急处置措施</td>
|
||||||
<td> {this.state.cards?.EMERGENCY}</td>
|
<td> {this.state.cards?.EMERGENCY}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -384,14 +377,14 @@ class SK004CheckPost extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
<br></br>
|
<br></br>
|
||||||
<Row style={{width:"1250px",margin:"auto"}}>
|
<Row style={{ width: "1250px", margin: "auto" }}>
|
||||||
<Col span={5}>
|
<Col span={5}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={'生产单元'}
|
label={'生产单元'}
|
||||||
{...formItemLayout}
|
{...formItemLayout}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
style={{width:'180px'}}
|
style={{ width: '180px' }}
|
||||||
allowClear
|
allowClear
|
||||||
onChange={this.handleSearch3}
|
onChange={this.handleSearch3}
|
||||||
>
|
>
|
||||||
@ -448,8 +441,8 @@ class SK004CheckPost extends React.Component {
|
|||||||
</Row>
|
</Row>
|
||||||
<div>
|
<div>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>岗位风险清单</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>岗位风险清单</h1>
|
||||||
{this.state.dataList?
|
{this.state.dataList ?
|
||||||
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
|
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
|
||||||
dataSource={this.state.dataList}
|
dataSource={this.state.dataList}
|
||||||
columns={this.state.columndatas}
|
columns={this.state.columndatas}
|
||||||
pagination={true}
|
pagination={true}
|
||||||
@ -457,7 +450,7 @@ class SK004CheckPost extends React.Component {
|
|||||||
loading={false}
|
loading={false}
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
:[]}
|
: []}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
@ -468,4 +461,4 @@ class SK004CheckPost extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK004CheckPost)
|
export default connect(({ login, app }) => ({ login, app }))(SK004CheckPost)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -16,14 +16,14 @@ class SK004ShowPrint extends React.Component {
|
|||||||
data: null,
|
data: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
tmpData: {},
|
tmpData: {},
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
Details:{},
|
Details: {},
|
||||||
columns:[],
|
columns: [],
|
||||||
DetailContents:{},
|
DetailContents: {},
|
||||||
columnContents:[],
|
columnContents: [],
|
||||||
DetailPosts:{},
|
DetailPosts: {},
|
||||||
columnPosts:[]
|
columnPosts: []
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,8 +78,7 @@ class SK004ShowPrint extends React.Component {
|
|||||||
title: "检查层级",
|
title: "检查层级",
|
||||||
dataIndex: "CHECK_TYPE",
|
dataIndex: "CHECK_TYPE",
|
||||||
key: "CHECK_TYPE",
|
key: "CHECK_TYPE",
|
||||||
render: (text, record) =>
|
render: (text, record) => {
|
||||||
{
|
|
||||||
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
|
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -92,11 +91,10 @@ class SK004ShowPrint extends React.Component {
|
|||||||
title: "检查岗位",
|
title: "检查岗位",
|
||||||
dataIndex: "Nav_DetailPosts",
|
dataIndex: "Nav_DetailPosts",
|
||||||
key: "Nav_DetailPosts",
|
key: "Nav_DetailPosts",
|
||||||
render: (text, record) =>
|
render: (text, record) => {
|
||||||
{
|
|
||||||
return <label>{
|
return <label>{
|
||||||
record.Nav_DetailPosts && record.Nav_DetailPosts.map((item, i) => {
|
record.Nav_DetailPosts && record.Nav_DetailPosts.map((item, i) => {
|
||||||
return item.Nav_Post.NAME+' '
|
return item.Nav_Post.NAME + ' '
|
||||||
})
|
})
|
||||||
}</label>
|
}</label>
|
||||||
}
|
}
|
||||||
@ -110,8 +108,7 @@ class SK004ShowPrint extends React.Component {
|
|||||||
title: "检查周期",
|
title: "检查周期",
|
||||||
dataIndex: "CHECK_CYCLE",
|
dataIndex: "CHECK_CYCLE",
|
||||||
key: "CHECK_CYCLE",
|
key: "CHECK_CYCLE",
|
||||||
render: (text, record) =>
|
render: (text, record) => {
|
||||||
{
|
|
||||||
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
|
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -154,13 +151,14 @@ class SK004ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let that=this;
|
let that = this;
|
||||||
let json = initFilter(that.props.login.OrgId);
|
let json = initFilter(that.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendInclude(json, 'Nav_Type');
|
// extendInclude(json, 'Nav_Type');
|
||||||
// extendInclude(json, 'Nav_Area');
|
// extendInclude(json, 'Nav_Area');
|
||||||
@ -187,14 +185,13 @@ class SK004ShowPrint extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/SKGet',
|
url: 'SK/SKEnterpriseLibrary/SKGet',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if(that.props.data && that.props.data.loadDataDeal)
|
if (that.props.data && that.props.data.loadDataDeal) {
|
||||||
{
|
|
||||||
that.props.data.loadDataDeal(1);
|
that.props.data.loadDataDeal(1);
|
||||||
}
|
}
|
||||||
that.setState({ data: ret });
|
that.setState({ data: ret });
|
||||||
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) {
|
if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
|
||||||
that.setState({ BtnAgreeDisplay: 'none' })
|
that.setState({ BtnAgreeDisplay: 'none' })
|
||||||
}else{
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
that.setState({ BtnAgreeDisplay: 'inline' })
|
||||||
}
|
}
|
||||||
this.onClickApprove(false);
|
this.onClickApprove(false);
|
||||||
@ -208,16 +205,16 @@ class SK004ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
XLSX.writeFile(wb, "双控企业库.xlsx")
|
XLSX.writeFile(wb, "双控企业库.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickApprove=(appVisible)=>{
|
onClickApprove = (appVisible) => {
|
||||||
const newtmpData = {
|
const newtmpData = {
|
||||||
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'},
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
|
||||||
formCode: "PF123",
|
formCode: "PF123",
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -227,19 +224,19 @@ class SK004ShowPrint extends React.Component {
|
|||||||
showModalContent = (item) => {
|
showModalContent = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: true,
|
showDetailContent: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
DetailContents:item.Nav_DetailContents
|
DetailContents: item.Nav_DetailContents
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
Details:item.Nav_DetailHiddens,
|
Details: item.Nav_DetailHiddens,
|
||||||
DetailPosts:item.Nav_DetailDeparts
|
DetailPosts: item.Nav_DetailDeparts
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -265,7 +262,7 @@ class SK004ShowPrint extends React.Component {
|
|||||||
};
|
};
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<Modal
|
<Modal
|
||||||
@ -316,10 +313,10 @@ class SK004ShowPrint extends React.Component {
|
|||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
|
||||||
</div>
|
</div>
|
||||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
||||||
@ -328,22 +325,22 @@ class SK004ShowPrint extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价L"> {data.Nav_SCOREL? data.Nav_SCOREL?.SCORE : 0}</Descriptions.Item>
|
<Descriptions.Item label="风险评价L"> {data.Nav_SCOREL ? data.Nav_SCOREL?.SCORE : 0}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价E"> {data.Nav_SCOREE? data.Nav_SCOREE?.SCORE : 0}</Descriptions.Item>
|
<Descriptions.Item label="风险评价E"> {data.Nav_SCOREE ? data.Nav_SCOREE?.SCORE : 0}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价C"> {data.Nav_SCOREC? data.Nav_SCOREC?.SCORE : 0}</Descriptions.Item>
|
<Descriptions.Item label="风险评价C"> {data.Nav_SCOREC ? data.Nav_SCOREC?.SCORE : 0}</Descriptions.Item>
|
||||||
<Descriptions.Item label="分值D">{data.EVALUATE_SCORE}</Descriptions.Item>
|
<Descriptions.Item label="分值D">{data.EVALUATE_SCORE}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
|
<Descriptions.Item label="风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
|
||||||
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
|
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
|
||||||
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
|
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>管控层级</td>
|
<td className={stylesStep.fontBold}>管控层级</td>
|
||||||
@ -351,10 +348,10 @@ class SK004ShowPrint extends React.Component {
|
|||||||
<td className={stylesStep.fontBold}>管控责任人</td>
|
<td className={stylesStep.fontBold}>管控责任人</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item,i)=>{
|
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
|
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
|
||||||
@ -368,10 +365,10 @@ class SK004ShowPrint extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>管控措施</td>
|
<td className={stylesStep.fontBold}>管控措施</td>
|
||||||
@ -379,7 +376,7 @@ class SK004ShowPrint extends React.Component {
|
|||||||
<td className={stylesStep.fontBold}>查看</td>
|
<td className={stylesStep.fontBold}>查看</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item,i)=>{
|
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{item.NUM}
|
{item.NUM}
|
||||||
@ -394,20 +391,20 @@ class SK004ShowPrint extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>辨识部门</td>
|
<td className={stylesStep.fontBold}>辨识部门</td>
|
||||||
<td className={stylesStep.fontBold}>辨识岗位</td>
|
<td className={stylesStep.fontBold}>辨识岗位</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{
|
data.Nav_Posts && data.Nav_Posts.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_Department?.NAME}
|
{item.Nav_Department?.NAME}
|
||||||
@ -423,7 +420,7 @@ class SK004ShowPrint extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
</div>
|
</div>
|
||||||
@ -432,4 +429,4 @@ class SK004ShowPrint extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK004ShowPrint)
|
export default connect(({ login, app }) => ({ login, app }))(SK004ShowPrint)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -23,12 +23,13 @@ class SK004ShowSummary extends React.Component {
|
|||||||
this.loadData();
|
this.loadData();
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId,"","",1,1);
|
let json = initFilter(this.props.login.OrgId, "", "", 1, 1);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendInclude(json, 'Nav_Type');
|
extendInclude(json, 'Nav_Type');
|
||||||
extendInclude(json, 'Nav_Area');
|
extendInclude(json, 'Nav_Area');
|
||||||
extendInclude(json, 'Nav_Details');
|
extendInclude(json, 'Nav_Details');
|
||||||
@ -50,7 +51,7 @@ class SK004ShowSummary extends React.Component {
|
|||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret && ret.Data) {
|
if (ret && ret.Data) {
|
||||||
this.setState({
|
this.setState({
|
||||||
data : ret.Data
|
data: ret.Data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -58,7 +59,7 @@ class SK004ShowSummary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -67,13 +68,13 @@ class SK004ShowSummary extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: "inline"}} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: "inline" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
|
||||||
@ -82,7 +83,7 @@ class SK004ShowSummary extends React.Component {
|
|||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制企业库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制企业库</h1>
|
||||||
|
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>生产单元</td>
|
<td className={stylesStep.fontBold}>生产单元</td>
|
||||||
@ -113,10 +114,10 @@ class SK004ShowSummary extends React.Component {
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data && data.map((item,i)=>{
|
data && data.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_ProductionUnit?.NAME}
|
{item.Nav_ProductionUnit?.NAME}
|
||||||
@ -159,7 +160,7 @@ class SK004ShowSummary extends React.Component {
|
|||||||
{item.CONTROLUSER}
|
{item.CONTROLUSER}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.MEASURE}
|
{item.MEASURE}
|
||||||
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
|
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
|
||||||
if (item2) {
|
if (item2) {
|
||||||
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
|
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
|
||||||
@ -170,16 +171,16 @@ class SK004ShowSummary extends React.Component {
|
|||||||
{item.EMERGENCY}
|
{item.EMERGENCY}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.CHECKCONTENTS}
|
{item.CHECKCONTENTS}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{ item.HIDDENSCRIPTION }
|
{item.HIDDENSCRIPTION}
|
||||||
</td>
|
</td>
|
||||||
{/* <td>
|
{/* <td>
|
||||||
{ item.HIDDENLEVEL }
|
{ item.HIDDENLEVEL }
|
||||||
</td> */}
|
</td> */}
|
||||||
<td>
|
<td>
|
||||||
{item.RECIFYMEASURE }
|
{item.RECIFYMEASURE}
|
||||||
</td>
|
</td>
|
||||||
{/* <td>
|
{/* <td>
|
||||||
{item.CHECKBASICS }
|
{item.CHECKBASICS }
|
||||||
@ -188,7 +189,7 @@ class SK004ShowSummary extends React.Component {
|
|||||||
{ item.CHECKSTANDARDS }
|
{ item.CHECKSTANDARDS }
|
||||||
</td> */}
|
</td> */}
|
||||||
<td>
|
<td>
|
||||||
{ item.CHECKLEVEL }
|
{item.CHECKLEVEL}
|
||||||
</td>
|
</td>
|
||||||
{/* <td>
|
{/* <td>
|
||||||
{ item.CHECKDEPT }
|
{ item.CHECKDEPT }
|
||||||
@ -197,12 +198,12 @@ class SK004ShowSummary extends React.Component {
|
|||||||
{item.CHECKPOST }
|
{item.CHECKPOST }
|
||||||
</td> */}
|
</td> */}
|
||||||
<td>
|
<td>
|
||||||
{ item.CHECKTYPE }
|
{item.CHECKTYPE}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{/* <FormPage {...this.state.tmpData} /> */}
|
{/* <FormPage {...this.state.tmpData} /> */}
|
||||||
</div>
|
</div>
|
||||||
@ -211,4 +212,4 @@ class SK004ShowSummary extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK004ShowSummary)
|
export default connect(({ login, app }) => ({ login, app }))(SK004ShowSummary)
|
||||||
@ -63,6 +63,7 @@ class SK006ShowOperateLog extends React.Component {
|
|||||||
loadData = (id) => {
|
loadData = (id) => {
|
||||||
var orgId = this.props.login ? this.props.login.OrgId : '';
|
var orgId = this.props.login ? this.props.login.OrgId : '';
|
||||||
let json = initFilter(orgId, id);
|
let json = initFilter(orgId, id);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
payload: json,
|
payload: json,
|
||||||
|
|||||||
@ -85,6 +85,7 @@ class SK006ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
loadDataTask = (dataId) => {
|
loadDataTask = (dataId) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
// extendRule(json, 'ID', 1, dataId);
|
// extendRule(json, 'ID', 1, dataId);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React , { useState }from 'react';
|
import React, { useState } from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter,ShowPrintClose } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, ShowPrintClose } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -13,25 +13,25 @@ class SK010CheckList extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedRowKeys:[],
|
selectedRowKeys: [],
|
||||||
taskSelects: [],
|
taskSelects: [],
|
||||||
dataList: [],
|
dataList: [],
|
||||||
PRODUCTION_UNIT_ID:null,
|
PRODUCTION_UNIT_ID: null,
|
||||||
CHECK_CYCLE:0,
|
CHECK_CYCLE: 0,
|
||||||
CHECK_TYPE:0,
|
CHECK_TYPE: 0,
|
||||||
CHECK_CYCLE_ID:null,
|
CHECK_CYCLE_ID: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
Details:[],
|
Details: [],
|
||||||
DetailContents:[],
|
DetailContents: [],
|
||||||
columnContents : [
|
columnContents: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -64,13 +64,13 @@ class SK010CheckList extends React.Component {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
],
|
],
|
||||||
columns : [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -92,13 +92,13 @@ class SK010CheckList extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columndatas : [
|
columndatas: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'NUM',
|
dataIndex: 'NUM',
|
||||||
key: "NUM",
|
key: "NUM",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return <label>{index+1}</label>
|
return <label>{index + 1}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -143,21 +143,20 @@ class SK010CheckList extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.props.data?.clickKey)
|
if (this.props.data?.clickKey) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(NextProps) {
|
componentWillReceiveProps(NextProps) {
|
||||||
if (NextProps.data?.clickKey && this.props.data?.clickKey != NextProps.data?.clickKey)
|
if (NextProps.data?.clickKey && this.props.data?.clickKey != NextProps.data?.clickKey) { this.loadData(); }
|
||||||
{this.loadData();}
|
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -172,7 +171,7 @@ class SK010CheckList extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
@ -182,9 +181,9 @@ class SK010CheckList extends React.Component {
|
|||||||
showModalContent = (item) => {
|
showModalContent = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: true,
|
showDetailContent: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
DetailContents:item.Nav_ContentDatas,
|
DetailContents: item.Nav_ContentDatas,
|
||||||
});
|
});
|
||||||
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
// let json = initFilter(this.props.login.OrgId,'','','','',this.state.MineType,this.state.CHECK_CYCLE,this.state.CHECK_TYPE,this.state.CHECK_TYPE_ID,item.DEPARTMENT_ID,item.POST_ID);
|
||||||
// extendIgnoreDataRule(json)
|
// extendIgnoreDataRule(json)
|
||||||
@ -203,8 +202,8 @@ class SK010CheckList extends React.Component {
|
|||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
let json = initFilter(this.props.login.OrgId,item.PRODUCTION_UNIT_ID,'','','',item.CHECK_TYPE_ID,item.CHECK_CYCLE,item.CHECK_TYPE);
|
let json = initFilter(this.props.login.OrgId, item.PRODUCTION_UNIT_ID, '', '', '', item.CHECK_TYPE_ID, item.CHECK_CYCLE, item.CHECK_TYPE);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -212,11 +211,13 @@ class SK010CheckList extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
this.setState({ Details: ret,
|
this.setState({
|
||||||
PRODUCTION_UNIT_ID :item.PRODUCTION_UNIT_ID,
|
Details: ret,
|
||||||
CHECK_CYCLE:item.CHECK_CYCLE,
|
PRODUCTION_UNIT_ID: item.PRODUCTION_UNIT_ID,
|
||||||
CHECK_TYPE:item.CHECK_TYPE,
|
CHECK_CYCLE: item.CHECK_CYCLE,
|
||||||
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
|
CHECK_TYPE: item.CHECK_TYPE,
|
||||||
|
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -255,11 +256,10 @@ class SK010CheckList extends React.Component {
|
|||||||
}
|
}
|
||||||
temps.push(tmpData);
|
temps.push(tmpData);
|
||||||
});
|
});
|
||||||
if(!temps||temps.length==0){
|
if (!temps || temps.length == 0) {
|
||||||
message.error('请选择要导入的内容');
|
message.error('请选择要导入的内容');
|
||||||
}else
|
} else {
|
||||||
{
|
this.props.login.tempDatas = temps
|
||||||
this.props.login.tempDatas=temps
|
|
||||||
this.state.taskSelects = [];
|
this.state.taskSelects = [];
|
||||||
this.state.selectedRowKeys = [];
|
this.state.selectedRowKeys = [];
|
||||||
this.closeModalContent()
|
this.closeModalContent()
|
||||||
@ -268,21 +268,22 @@ class SK010CheckList extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onSelectChange = (selectedRowKeys,selectedRows) => { // 选择菜单行
|
onSelectChange = (selectedRowKeys, selectedRows) => { // 选择菜单行
|
||||||
this.setState({selectedRowKeys:selectedRowKeys,
|
this.setState({
|
||||||
taskSelects:selectedRows
|
selectedRowKeys: selectedRowKeys,
|
||||||
|
taskSelects: selectedRows
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
render() {
|
render() {
|
||||||
const {selectedRowKeys} =this.state;
|
const { selectedRowKeys } = this.state;
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
selectedRowKeys:selectedRowKeys,
|
selectedRowKeys: selectedRowKeys,
|
||||||
fixed: false,
|
fixed: false,
|
||||||
columnWidth: 20,
|
columnWidth: 20,
|
||||||
hideDefaultSelections:false,
|
hideDefaultSelections: false,
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
};
|
};
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<Modal
|
<Modal
|
||||||
@ -335,8 +336,8 @@ class SK010CheckList extends React.Component {
|
|||||||
</div> */}
|
</div> */}
|
||||||
<div>
|
<div>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
|
||||||
{this.state.dataList?
|
{this.state.dataList ?
|
||||||
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
|
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
|
||||||
dataSource={this.state.dataList}
|
dataSource={this.state.dataList}
|
||||||
columns={this.state.columndatas}
|
columns={this.state.columndatas}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
@ -344,11 +345,11 @@ class SK010CheckList extends React.Component {
|
|||||||
loading={false}
|
loading={false}
|
||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
:[]}
|
: []}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK010CheckList)
|
export default connect(({ login, app }) => ({ login, app }))(SK010CheckList)
|
||||||
@ -60,6 +60,7 @@ class SK010ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendRule(json, 'TASK_ID', 1, taskID);
|
extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
@ -207,7 +208,7 @@ class SK010ShowPrint extends React.Component {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{
|
{
|
||||||
item.CHECK_RESULT == null? "无隐患" :enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
|
item.CHECK_RESULT == null ? "无隐患" : enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
@ -15,7 +15,7 @@ class SK012ShowPrint extends React.Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
data: null,
|
data: null,
|
||||||
enumData: null,
|
enumData: null,
|
||||||
detailUsers:[],
|
detailUsers: [],
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
fileForm: {
|
fileForm: {
|
||||||
title: "",
|
title: "",
|
||||||
@ -61,6 +61,7 @@ class SK012ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendRule(json, 'TASK_ID', 1, taskID);
|
extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
@ -84,19 +85,17 @@ class SK012ShowPrint extends React.Component {
|
|||||||
if (this.props.data && this.props.data.loadDataDeal) {
|
if (this.props.data && this.props.data.loadDataDeal) {
|
||||||
this.props.data.loadDataDeal(1);
|
this.props.data.loadDataDeal(1);
|
||||||
}
|
}
|
||||||
let users=[]
|
let users = []
|
||||||
let uniqueUsers =[]
|
let uniqueUsers = []
|
||||||
if(ret.Nav_CheckRecordDetails)
|
if (ret.Nav_CheckRecordDetails) {
|
||||||
{
|
|
||||||
ret.Nav_CheckRecordDetails.forEach(item => {
|
ret.Nav_CheckRecordDetails.forEach(item => {
|
||||||
item.Nav_CheckRecordDetailUsers.forEach(item2=>{
|
item.Nav_CheckRecordDetailUsers.forEach(item2 => {
|
||||||
users.push(item2)
|
users.push(item2)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(users)
|
if (users) {
|
||||||
{
|
uniqueUsers = users.reduce((acc, user) => {
|
||||||
uniqueUsers= users.reduce((acc, user) => {
|
|
||||||
// 如果累积数组中还没有这个 user_id,则添加
|
// 如果累积数组中还没有这个 user_id,则添加
|
||||||
if (!acc.some(item => item.USER_ID === user.USER_ID)) {
|
if (!acc.some(item => item.USER_ID === user.USER_ID)) {
|
||||||
acc.push(user);
|
acc.push(user);
|
||||||
@ -104,7 +103,7 @@ class SK012ShowPrint extends React.Component {
|
|||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
}
|
}
|
||||||
this.setState({ data: ret,detailUsers:uniqueUsers })
|
this.setState({ data: ret, detailUsers: uniqueUsers })
|
||||||
if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
|
if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
|
||||||
this.setState({ BtnAgreeDisplay: 'none' })
|
this.setState({ BtnAgreeDisplay: 'none' })
|
||||||
} else {
|
} else {
|
||||||
@ -228,7 +227,7 @@ class SK012ShowPrint extends React.Component {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{
|
{
|
||||||
item.CHECK_RESULT == null? "无隐患" :enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
|
item.CHECK_RESULT == null ? "无隐患" : enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -275,7 +274,7 @@ class SK012ShowPrint extends React.Component {
|
|||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
@ -60,6 +60,7 @@ class SK014ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendRule(json, 'TASK_ID', 1, taskID);
|
extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
@ -203,7 +204,7 @@ class SK014ShowPrint extends React.Component {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{
|
{
|
||||||
item.ISCHECK? <a style={{ color: "rgba(0, 0, 0, 0.65)" }}>{item.Nav_RecitifyUser?.NAME}</a>:
|
item.ISCHECK ? <a style={{ color: "rgba(0, 0, 0, 0.65)" }}>{item.Nav_RecitifyUser?.NAME}</a> :
|
||||||
<a style={{ color: "red" }}>{item.Nav_RecitifyUser?.NAME}</a>
|
<a style={{ color: "red" }}>{item.Nav_RecitifyUser?.NAME}</a>
|
||||||
}
|
}
|
||||||
{/* {
|
{/* {
|
||||||
@ -230,13 +231,13 @@ class SK014ShowPrint extends React.Component {
|
|||||||
<Descriptions size="middle" bordered>
|
<Descriptions size="middle" bordered>
|
||||||
<Descriptions.Item label="整改责任人签名">{
|
<Descriptions.Item label="整改责任人签名">{
|
||||||
data.Nav_ReportDetails?.map((item, i) => {
|
data.Nav_ReportDetails?.map((item, i) => {
|
||||||
if (item && item.ISCHECK ) {
|
if (item && item.ISCHECK) {
|
||||||
showUserSign(item.Nav_RecitifyUser, config.picServerHost)
|
showUserSign(item.Nav_RecitifyUser, config.picServerHost)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class SK016ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendInclude(json, 'Nav_ApplyUser');
|
extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class SK018ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendInclude(json, 'Nav_Report');
|
extendInclude(json, 'Nav_Report');
|
||||||
@ -176,7 +177,7 @@ class SK018ShowPrint extends React.Component {
|
|||||||
{/* <Descriptions.Item label="检查层级">{enums.FMDepartmentType.enums[data.DEPARTMENT_TYPE]}</Descriptions.Item>
|
{/* <Descriptions.Item label="检查层级">{enums.FMDepartmentType.enums[data.DEPARTMENT_TYPE]}</Descriptions.Item>
|
||||||
<Descriptions.Item label="检查类型">{data.Nav_CheckType ? data.Nav_CheckType.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="检查类型">{data.Nav_CheckType ? data.Nav_CheckType.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="检查周期">{enums.BSPLANCHECKFREQUENCYEnum.enums[data.PLANCHECKFREQUENCY]}</Descriptions.Item> */}
|
<Descriptions.Item label="检查周期">{enums.BSPLANCHECKFREQUENCYEnum.enums[data.PLANCHECKFREQUENCY]}</Descriptions.Item> */}
|
||||||
<Descriptions.Item label="整改责任人">{ data.STATUS == 30 && data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
|
<Descriptions.Item label="整改责任人">{data.STATUS == 30 && data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
|
||||||
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
||||||
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''}</Descriptions.Item>
|
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>
|
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>
|
||||||
|
|||||||
@ -60,6 +60,7 @@ class SK020ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendRule(json, 'TASK_ID', 1, taskID);
|
extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
@ -179,7 +180,7 @@ class SK020ShowPrint extends React.Component {
|
|||||||
</td> */}
|
</td> */}
|
||||||
<td>
|
<td>
|
||||||
{
|
{
|
||||||
item.Nav_Question?.DESCREPTION?item.Nav_Question.DESCREPTION:item.HIDDEN_DESCRIPTION
|
item.Nav_Question?.DESCREPTION ? item.Nav_Question.DESCREPTION : item.HIDDEN_DESCRIPTION
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles,showUserSign,showFileImg, GetFileModel } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, showUserSign, showFileImg, GetFileModel } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
@ -57,6 +57,7 @@ class SK022ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
@ -147,7 +148,7 @@ class SK022ShowPrint extends React.Component {
|
|||||||
// return <tr><label> {item2.Nav_User?.NAME}</label></tr>
|
// return <tr><label> {item2.Nav_User?.NAME}</label></tr>
|
||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
<Descriptions.Item label="隐患描述">{data.Nav_Question?.DESCREPTION?data.Nav_Question.DESCREPTION:data.HIDDEN_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="隐患描述">{data.Nav_Question?.DESCREPTION ? data.Nav_Question.DESCREPTION : data.HIDDEN_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="隐患等级">{enums.SKHiddenLevel.enums[data.HIDDEN_LEVEL]}</Descriptions.Item>
|
<Descriptions.Item label="隐患等级">{enums.SKHiddenLevel.enums[data.HIDDEN_LEVEL]}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改措施">{data.RECTIFICATION_MEASURES}</Descriptions.Item>
|
<Descriptions.Item label="整改措施">{data.RECTIFICATION_MEASURES}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>
|
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>
|
||||||
@ -161,7 +162,7 @@ class SK022ShowPrint extends React.Component {
|
|||||||
<Descriptions.Item label="整改验收人">{data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="整改验收人">{data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改情况描述">{data.RECTIFICATION_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="整改情况描述">{data.RECTIFICATION_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改资金(元)">{data.RECTIFICATION_MONEY}</Descriptions.Item>
|
<Descriptions.Item label="整改资金(元)">{data.RECTIFICATION_MONEY}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改完成时间">{data.COMPLETE_DATE?moment(data.COMPLETE_DATE).format('YYYY-MM-DD'):null}</Descriptions.Item>
|
<Descriptions.Item label="整改完成时间">{data.COMPLETE_DATE ? moment(data.COMPLETE_DATE).format('YYYY-MM-DD') : null}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改前照片">{
|
<Descriptions.Item label="整改前照片">{
|
||||||
showFileImg(data?.Nav_RectifyPhotoas, config.picServerHost, this)
|
showFileImg(data?.Nav_RectifyPhotoas, config.picServerHost, this)
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
@ -171,16 +172,16 @@ class SK022ShowPrint extends React.Component {
|
|||||||
<Descriptions.Item label="预案或方案">{
|
<Descriptions.Item label="预案或方案">{
|
||||||
showFiles(data?.Nav_RectifyFiles, config.picServerHost, this)
|
showFiles(data?.Nav_RectifyFiles, config.picServerHost, this)
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收时间">{data.ACCEPT_DATE?moment(data.ACCEPT_DATE).format('YYYY-MM-DD'):null}</Descriptions.Item>
|
<Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收时间">{data.ACCEPT_DATE ? moment(data.ACCEPT_DATE).format('YYYY-MM-DD') : null}</Descriptions.Item>
|
||||||
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收结论">{enums.SKAcceptResultEnum.enums[data.ACCEPT_RESULTE]}</Descriptions.Item>
|
<Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收结论">{enums.SKAcceptResultEnum.enums[data.ACCEPT_RESULTE]}</Descriptions.Item>
|
||||||
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收意见">{data.ACCEPT_OPINION}</Descriptions.Item>
|
<Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收意见">{data.ACCEPT_OPINION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="整改责任人签名">{
|
<Descriptions.Item label="整改责任人签名">{
|
||||||
data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
|
data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
|
||||||
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
||||||
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''
|
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
<Descriptions.Item label="验收人签名">{
|
<Descriptions.Item label="验收人签名">{
|
||||||
(data.STATUS == 20 ||data.STATUS == 30)&& data.Nav_AcceptUser && data.Nav_AcceptUser.FILE_PATH ?
|
(data.STATUS == 20 || data.STATUS == 30) && data.Nav_AcceptUser && data.Nav_AcceptUser.FILE_PATH ?
|
||||||
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
|
||||||
: data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''
|
: data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class SK024ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
extendInclude(json, 'Nav_ApplyUser');
|
extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -228,6 +228,7 @@ class SK026ShowPrint extends React.Component {
|
|||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let that = this;
|
let that = this;
|
||||||
let json = initFilter(that.props.login.OrgId);
|
let json = initFilter(that.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
// extendInclude(json, 'Nav_ApplyDepartment');
|
// extendInclude(json, 'Nav_ApplyDepartment');
|
||||||
@ -511,13 +512,13 @@ class SK026ShowPrint extends React.Component {
|
|||||||
{item.Nav_Type ? item.Nav_Type?.NAME : ''}
|
{item.Nav_Type ? item.Nav_Type?.NAME : ''}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
|
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
|
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
|
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.EVALUATE_SCORE}
|
{item.EVALUATE_SCORE}
|
||||||
|
|||||||
@ -47,6 +47,7 @@ class SK027ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendIgnoreDataRule(json)
|
extendIgnoreDataRule(json)
|
||||||
// extendRule(json, 'ID', 1, dataId);
|
// extendRule(json, 'ID', 1, dataId);
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class SK031ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -42,7 +42,15 @@ class SK033ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
if (this.props.data.ORG_ID_HV) {
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
|
}
|
||||||
|
else if (this.props.data?.TASK_ORGID) {
|
||||||
json.Parameter22 = this.props.data?.TASK_ORGID
|
json.Parameter22 = this.props.data?.TASK_ORGID
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
|
}
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -16,14 +16,14 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
data: null,
|
data: null,
|
||||||
BtnAgreeDisplay: 'none',
|
BtnAgreeDisplay: 'none',
|
||||||
tmpData: {},
|
tmpData: {},
|
||||||
showDetail:false,
|
showDetail: false,
|
||||||
showDetailContent: false,
|
showDetailContent: false,
|
||||||
Details:{},
|
Details: {},
|
||||||
columns:[],
|
columns: [],
|
||||||
DetailContents:{},
|
DetailContents: {},
|
||||||
columnContents:[],
|
columnContents: [],
|
||||||
DetailPosts:{},
|
DetailPosts: {},
|
||||||
columnPosts:[]
|
columnPosts: []
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -70,8 +70,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
title: "检查层级",
|
title: "检查层级",
|
||||||
dataIndex: "CHECK_TYPE",
|
dataIndex: "CHECK_TYPE",
|
||||||
key: "CHECK_TYPE",
|
key: "CHECK_TYPE",
|
||||||
render: (text, record) =>
|
render: (text, record) => {
|
||||||
{
|
|
||||||
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
|
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -102,8 +101,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
title: "检查周期",
|
title: "检查周期",
|
||||||
dataIndex: "CHECK_CYCLE",
|
dataIndex: "CHECK_CYCLE",
|
||||||
key: "CHECK_CYCLE",
|
key: "CHECK_CYCLE",
|
||||||
render: (text, record) =>
|
render: (text, record) => {
|
||||||
{
|
|
||||||
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
|
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -146,13 +144,14 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let that=this;
|
let that = this;
|
||||||
let jsonTemp = initFilter(that.props.login.OrgId);
|
let jsonTemp = initFilter(that.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(jsonTemp, 'ID', 1, dataId);
|
extendRule(jsonTemp, 'ID', 1, dataId);
|
||||||
that.props.dispatch({
|
that.props.dispatch({
|
||||||
type: 'app/getDataByPost',
|
type: 'app/getDataByPost',
|
||||||
@ -189,14 +188,13 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibrary/SKGet',
|
url: 'SK/SKEnterpriseLibrary/SKGet',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if(that.props.data && that.props.data.loadDataDeal)
|
if (that.props.data && that.props.data.loadDataDeal) {
|
||||||
{
|
|
||||||
that.props.data.loadDataDeal(1);
|
that.props.data.loadDataDeal(1);
|
||||||
}
|
}
|
||||||
that.setState({ data: ret });
|
that.setState({ data: ret });
|
||||||
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) {
|
if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
|
||||||
that.setState({ BtnAgreeDisplay: 'none' })
|
that.setState({ BtnAgreeDisplay: 'none' })
|
||||||
}else{
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
that.setState({ BtnAgreeDisplay: 'inline' })
|
||||||
}
|
}
|
||||||
this.onClickApprove(false);
|
this.onClickApprove(false);
|
||||||
@ -205,8 +203,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
// this.setState({ isFinished: 'inline' })
|
// this.setState({ isFinished: 'inline' })
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
else
|
else { message.error('企业库无对应风险!'); }
|
||||||
{ message.error('企业库无对应风险!');}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -216,16 +213,16 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
XLSX.writeFile(wb, "双控企业库.xlsx")
|
XLSX.writeFile(wb, "双控企业库.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickApprove=(appVisible)=>{
|
onClickApprove = (appVisible) => {
|
||||||
const newtmpData = {
|
const newtmpData = {
|
||||||
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'},
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
|
||||||
formCode: "PF123",
|
formCode: "PF123",
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -235,19 +232,19 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
showModalContent = (item) => {
|
showModalContent = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetailContent: true,
|
showDetailContent: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
DetailContents:item.Nav_DetailContents
|
DetailContents: item.Nav_DetailContents
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
showModal = (item) => {
|
showModal = (item) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showDetail: true,
|
showDetail: true,
|
||||||
},()=>{
|
}, () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
Details:item.Nav_DetailHiddens,
|
Details: item.Nav_DetailHiddens,
|
||||||
DetailPosts:item.Nav_DetailDeparts
|
DetailPosts: item.Nav_DetailDeparts
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -273,7 +270,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
};
|
};
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
<Modal
|
<Modal
|
||||||
@ -324,10 +321,10 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
|
||||||
</div>
|
</div>
|
||||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
||||||
@ -336,10 +333,10 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
||||||
@ -348,10 +345,10 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
|
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
|
||||||
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
|
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>管控层级</td>
|
<td className={stylesStep.fontBold}>管控层级</td>
|
||||||
@ -359,10 +356,10 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
<td className={stylesStep.fontBold}>管控责任人</td>
|
<td className={stylesStep.fontBold}>管控责任人</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item,i)=>{
|
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
|
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
|
||||||
@ -376,10 +373,10 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>管控措施</td>
|
<td className={stylesStep.fontBold}>管控措施</td>
|
||||||
@ -387,7 +384,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
<td className={stylesStep.fontBold}>查看</td>
|
<td className={stylesStep.fontBold}>查看</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item,i)=>{
|
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{item.NUM}
|
{item.NUM}
|
||||||
@ -402,20 +399,20 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
|
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
|
||||||
<td className={stylesStep.fontBold}>辨识部门</td>
|
<td className={stylesStep.fontBold}>辨识部门</td>
|
||||||
<td className={stylesStep.fontBold}>辨识岗位</td>
|
<td className={stylesStep.fontBold}>辨识岗位</td>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{
|
data.Nav_Posts && data.Nav_Posts.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{i+1}
|
{i + 1}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_Department?.NAME}
|
{item.Nav_Department?.NAME}
|
||||||
@ -431,7 +428,7 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</table>:null
|
</table> : null
|
||||||
}
|
}
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
</div>
|
</div>
|
||||||
@ -440,4 +437,4 @@ class SK035CheckLibrary extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK035CheckLibrary)
|
export default connect(({ login, app }) => ({ login, app }))(SK035CheckLibrary)
|
||||||
@ -41,6 +41,7 @@ class SK035ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -42,6 +42,7 @@ class SK037ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class SK039ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
@ -170,13 +171,13 @@ class SK039ShowPrint extends React.Component {
|
|||||||
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
|
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
|
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
|
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
|
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.EVALUATE_SCORE}
|
{item.EVALUATE_SCORE}
|
||||||
@ -185,7 +186,7 @@ class SK039ShowPrint extends React.Component {
|
|||||||
{
|
{
|
||||||
//item.MEASURE
|
//item.MEASURE
|
||||||
item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => {
|
item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => {
|
||||||
return <tr> {item2?.NUM+"、" + item2?.MEASURES_NAME}</tr>
|
return <tr> {item2?.NUM + "、" + item2?.MEASURES_NAME}</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { message } from "antd/lib/index";
|
import { message } from "antd/lib/index";
|
||||||
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table ,Modal} from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table, Modal } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
@ -41,6 +41,7 @@ class SK041ShowPrint extends React.Component {
|
|||||||
|
|
||||||
loadData = (dataId, taskID) => {
|
loadData = (dataId, taskID) => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendRule(json, 'TASK_ID', 1, taskID);
|
// extendRule(json, 'TASK_ID', 1, taskID);
|
||||||
// extendInclude(json, 'Nav_ApplyUser');
|
// extendInclude(json, 'Nav_ApplyUser');
|
||||||
@ -170,13 +171,13 @@ class SK041ShowPrint extends React.Component {
|
|||||||
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
|
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
|
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
|
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
|
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.EVALUATE_SCORE}
|
{item.EVALUATE_SCORE}
|
||||||
@ -185,7 +186,7 @@ class SK041ShowPrint extends React.Component {
|
|||||||
{
|
{
|
||||||
//item.MEASURE
|
//item.MEASURE
|
||||||
item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => {
|
item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => {
|
||||||
return <tr> {item2?.NUM +"、"+item2?.MEASURES_NAME}</tr>
|
return <tr> {item2?.NUM + "、" + item2?.MEASURES_NAME}</tr>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -31,13 +31,14 @@ class SK043ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let that=this;
|
let that = this;
|
||||||
let json = initFilter(that.props.login.OrgId);
|
let json = initFilter(that.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
extendInclude(json, 'Nav_Type');
|
extendInclude(json, 'Nav_Type');
|
||||||
extendInclude(json, 'Nav_Area');
|
extendInclude(json, 'Nav_Area');
|
||||||
@ -51,14 +52,13 @@ class SK043ShowPrint extends React.Component {
|
|||||||
url: 'SK/BasicLibraryTemp/Get',
|
url: 'SK/BasicLibraryTemp/Get',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if(that.props.data && that.props.data.loadDataDeal)
|
if (that.props.data && that.props.data.loadDataDeal) {
|
||||||
{
|
|
||||||
that.props.data.loadDataDeal(1);
|
that.props.data.loadDataDeal(1);
|
||||||
}
|
}
|
||||||
that.setState({ data: ret });
|
that.setState({ data: ret });
|
||||||
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) {
|
if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
|
||||||
that.setState({ BtnAgreeDisplay: 'none' })
|
that.setState({ BtnAgreeDisplay: 'none' })
|
||||||
}else{
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
that.setState({ BtnAgreeDisplay: 'inline' })
|
||||||
}
|
}
|
||||||
this.onClickApprove(false);
|
this.onClickApprove(false);
|
||||||
@ -73,16 +73,16 @@ class SK043ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
XLSX.writeFile(wb, "双控基础库.xlsx")
|
XLSX.writeFile(wb, "双控基础库.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickApprove=(appVisible)=>{
|
onClickApprove = (appVisible) => {
|
||||||
const newtmpData = {
|
const newtmpData = {
|
||||||
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'},
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
|
||||||
formCode: "PF123",
|
formCode: "PF123",
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -91,17 +91,17 @@ class SK043ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
|
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
|
||||||
</div>
|
</div>
|
||||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控基础库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控基础库</h1>
|
||||||
@ -110,10 +110,10 @@ class SK043ShowPrint extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
||||||
@ -127,7 +127,7 @@ class SK043ShowPrint extends React.Component {
|
|||||||
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
|
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{(i+1)+"."+item?.MEASURES_NAME}
|
{(i + 1) + "." + item?.MEASURES_NAME}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item?.EMERGENCY}
|
{item?.EMERGENCY}
|
||||||
@ -147,7 +147,7 @@ class SK043ShowPrint extends React.Component {
|
|||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="检查内容">{
|
<Descriptions.Item label="检查内容">{
|
||||||
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
|
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
|
||||||
return <tr><td> {(i+1)+"."+item?.CHECK_CONTENT}</td>
|
return <tr><td> {(i + 1) + "." + item?.CHECK_CONTENT}</td>
|
||||||
<td> {item?.CHECK_BASIC}</td>
|
<td> {item?.CHECK_BASIC}</td>
|
||||||
<td> {item?.CHECK_STANDARD}</td>
|
<td> {item?.CHECK_STANDARD}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -157,13 +157,13 @@ class SK043ShowPrint extends React.Component {
|
|||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="隐患描述">{
|
<Descriptions.Item label="隐患描述">{
|
||||||
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
|
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
|
||||||
return <tr><td> {(i+1)+"."+item?.HIDDEN_DESCRIPTION}</td>
|
return <tr><td> {(i + 1) + "." + item?.HIDDEN_DESCRIPTION}</td>
|
||||||
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
|
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
|
||||||
<td> {item?.RECTIFICATION_MEASURES}</td></tr>
|
<td> {item?.RECTIFICATION_MEASURES}</td></tr>
|
||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
|
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
@ -173,4 +173,4 @@ class SK043ShowPrint extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK043ShowPrint)
|
export default connect(({ login, app }) => ({ login, app }))(SK043ShowPrint)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
|
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
|
||||||
import ReactToPrint from "react-to-print";
|
import ReactToPrint from "react-to-print";
|
||||||
import stylesStep from '../HI/StepForm.css';
|
import stylesStep from '../HI/StepForm.css';
|
||||||
import config from "../../../config";
|
import config from "../../../config";
|
||||||
@ -31,13 +31,14 @@ class SK045ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||||
this.props.data.onCancel();
|
this.props.data.onCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData = (dataId) => {
|
loadData = (dataId) => {
|
||||||
let that=this;
|
let that = this;
|
||||||
let json = initFilter(that.props.login.OrgId);
|
let json = initFilter(that.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
extendRule(json, 'ID', 1, dataId);
|
extendRule(json, 'ID', 1, dataId);
|
||||||
// extendInclude(json, 'Nav_Type');
|
// extendInclude(json, 'Nav_Type');
|
||||||
// extendInclude(json, 'Nav_Area');
|
// extendInclude(json, 'Nav_Area');
|
||||||
@ -55,14 +56,13 @@ class SK045ShowPrint extends React.Component {
|
|||||||
url: 'SK/SKEnterpriseLibraryTemp/FullGet',
|
url: 'SK/SKEnterpriseLibraryTemp/FullGet',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if(that.props.data && that.props.data.loadDataDeal)
|
if (that.props.data && that.props.data.loadDataDeal) {
|
||||||
{
|
|
||||||
that.props.data.loadDataDeal(1);
|
that.props.data.loadDataDeal(1);
|
||||||
}
|
}
|
||||||
that.setState({ data: ret });
|
that.setState({ data: ret });
|
||||||
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) {
|
if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
|
||||||
that.setState({ BtnAgreeDisplay: 'none' })
|
that.setState({ BtnAgreeDisplay: 'none' })
|
||||||
}else{
|
} else {
|
||||||
that.setState({ BtnAgreeDisplay: 'inline' })
|
that.setState({ BtnAgreeDisplay: 'inline' })
|
||||||
}
|
}
|
||||||
this.onClickApprove(false);
|
this.onClickApprove(false);
|
||||||
@ -77,16 +77,16 @@ class SK045ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTableBtnExport() {
|
onTableBtnExport() {
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
let TableWrap = document.getElementById('tableId' + this.props.data.id);
|
||||||
let Table = TableWrap.getElementsByTagName('table')[0];
|
let Table = TableWrap.getElementsByTagName('table')[0];
|
||||||
const wb = XLSX.utils.table_to_book(Table);
|
const wb = XLSX.utils.table_to_book(Table);
|
||||||
XLSX.writeFile(wb, "双控企业库.xlsx")
|
XLSX.writeFile(wb, "双控企业库.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickApprove=(appVisible)=>{
|
onClickApprove = (appVisible) => {
|
||||||
const newtmpData = {
|
const newtmpData = {
|
||||||
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'},
|
data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
|
||||||
formCode: "PF123",
|
formCode: "PF123",
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -95,17 +95,17 @@ class SK045ShowPrint extends React.Component {
|
|||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ;
|
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||||
// let aaa = Math.random();
|
// let aaa = Math.random();
|
||||||
return <div>
|
return <div>
|
||||||
|
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
|
||||||
<ReactToPrint
|
<ReactToPrint
|
||||||
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>}
|
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
|
||||||
content={() => this.componentRef}
|
content={() => this.componentRef}
|
||||||
/>
|
/>
|
||||||
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button>
|
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
|
||||||
</div>
|
</div>
|
||||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
||||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
|
||||||
@ -114,10 +114,10 @@ class SK045ShowPrint extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
<Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
|
||||||
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
|
||||||
@ -132,7 +132,7 @@ class SK045ShowPrint extends React.Component {
|
|||||||
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
|
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
|
||||||
return <tr>
|
return <tr>
|
||||||
<td>
|
<td>
|
||||||
{(i+1)+"."+item?.MEASURES_NAME}
|
{(i + 1) + "." + item?.MEASURES_NAME}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item?.EMERGENCY}
|
{item?.EMERGENCY}
|
||||||
@ -157,7 +157,7 @@ class SK045ShowPrint extends React.Component {
|
|||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="检查内容">{
|
<Descriptions.Item label="检查内容">{
|
||||||
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
|
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
|
||||||
return <tr><td> {(i+1)+"."+item?.CHECK_CONTENT}</td>
|
return <tr><td> {(i + 1) + "." + item?.CHECK_CONTENT}</td>
|
||||||
<td> {item?.CHECK_BASIC}</td>
|
<td> {item?.CHECK_BASIC}</td>
|
||||||
<td> {item?.CHECK_STANDARD}</td>
|
<td> {item?.CHECK_STANDARD}</td>
|
||||||
<td>
|
<td>
|
||||||
@ -185,13 +185,13 @@ class SK045ShowPrint extends React.Component {
|
|||||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||||
<Descriptions.Item label="隐患描述">{
|
<Descriptions.Item label="隐患描述">{
|
||||||
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
|
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
|
||||||
return <tr><td> {(i+1)+"."+item?.HIDDEN_DESCRIPTION}</td>
|
return <tr><td> {(i + 1) + "." + item?.HIDDEN_DESCRIPTION}</td>
|
||||||
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
|
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
|
||||||
<td> {item?.RECTIFICATION_MEASURES}</td></tr>
|
<td> {item?.RECTIFICATION_MEASURES}</td></tr>
|
||||||
})
|
})
|
||||||
}</Descriptions.Item>
|
}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>:null
|
</div> : null
|
||||||
}
|
}
|
||||||
|
|
||||||
<FormPage {...this.state.tmpData} />
|
<FormPage {...this.state.tmpData} />
|
||||||
@ -201,4 +201,4 @@ class SK045ShowPrint extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(({ login,app }) => ({ login,app }))(SK045ShowPrint)
|
export default connect(({ login, app }) => ({ login, app }))(SK045ShowPrint)
|
||||||
Loading…
Reference in New Issue
Block a user