双控模块添加json.Parameter22 = this.props.data.ORG_ID_HV;

This commit is contained in:
何美荣 2025-12-22 16:57:43 +08:00
parent f685435a77
commit c02396c64d
28 changed files with 3031 additions and 3027 deletions

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -23,12 +23,13 @@ class SK002ShowSummary extends React.Component {
this.loadData();
}
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();
}
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_Area');
extendInclude(json, 'Nav_Details');
@ -45,7 +46,7 @@ class SK002ShowSummary extends React.Component {
onComplete: (ret) => {
if (ret && ret.Data) {
this.setState({
data : ret.Data
data: ret.Data
});
}
},
@ -53,7 +54,7 @@ class SK002ShowSummary extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -62,13 +63,13 @@ class SK002ShowSummary extends React.Component {
render() {
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();
return <div>
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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>
{
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr>
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>生产单元</td>
@ -101,10 +102,10 @@ class SK002ShowSummary extends React.Component {
<td className={stylesStep.fontBold}>整改措施</td>
</tr>
{
data && data.map((item,i)=>{
data && data.map((item, i) => {
return <tr>
<td>
{i+1}
{i + 1}
</td>
<td>
{item.Nav_ProductionUnit?.NAME}
@ -140,14 +141,14 @@ class SK002ShowSummary extends React.Component {
{item.EMERGENCY}
</td>
<td>
{ item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => {
{item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => {
if (item2) {
return <label> {enums.SKDepartmentTypeEnum.enums[item2]}</label>
}
})}
</td>
<td>
{ item.MEASURE}
{item.MEASURE}
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
if (item2) {
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
@ -155,7 +156,7 @@ class SK002ShowSummary extends React.Component {
})} */}
</td>
<td>
{ item.CHECKCONTENTS}
{item.CHECKCONTENTS}
</td>
{/* <td>
{item.CHECKBASICS }
@ -164,18 +165,18 @@ class SK002ShowSummary extends React.Component {
{ item.CHECKSTANDARDS }
</td> */}
<td>
{ item.HIDDENSCRIPTION }
{item.HIDDENSCRIPTION}
</td>
<td>
{ item.HIDDENLEVEL }
{item.HIDDENLEVEL}
</td>
<td>
{item.RECIFYMEASURE }
{item.RECIFYMEASURE}
</td>
</tr>
})
}
</table>:null
</table> : null
}
{/* <FormPage {...this.state.tmpData} /> */}
</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)

View File

@ -1,6 +1,6 @@
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
import React , { useState }from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React, { useState } from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -14,28 +14,28 @@ class SK004CheckList extends React.Component {
constructor(props) {
super(props);
this.state = {
inputText:"",
inputText2:"",
inputText3:"",
checkType:{},
inputText: "",
inputText2: "",
inputText3: "",
checkType: {},
data: {},
dataList: [],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null,
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null,
BtnAgreeDisplay: 'none',
showDetail:false,
showDetail: false,
showDetailContent: false,
Details:[],
DetailContents:[],
columnContents : [
Details: [],
DetailContents: [],
columnContents: [
{
title: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
render: (text, record, index) => {
return <label>{index+1}</label>
return <label>{index + 1}</label>
}
},
{
@ -152,21 +152,20 @@ class SK004CheckList extends React.Component {
};
componentDidMount() {
if (this.props.data?.btnConfig?.id)
{this.loadData();}
if (this.props.data?.btnConfig?.id) { this.loadData(); }
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
{this.loadData();}
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
}
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();
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendIgnoreDataRule(json)
this.props.dispatch({
type: 'app/getDataByPost',
@ -174,16 +173,14 @@ class SK004CheckList extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetCheckList',
onComplete: (ret) => {
if (ret) {
this.setState({data:ret, dataList: ret });
this.setState({ data: ret, dataList: ret });
}
}
});
}
loadData2()
{
let temp=this.state.data
if(this.state.inputText)
{
loadData2() {
let temp = this.state.data
if (this.state.inputText) {
// let minetype=0
// if(this.state.inputText.includes("露天"))
// {
@ -209,10 +206,9 @@ class SK004CheckList extends React.Component {
// {
// 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
// if(this.state.inputText2.includes("部门"))
// {
@ -230,16 +226,15 @@ class SK004CheckList extends React.Component {
// {
// 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)
{
temp=temp.filter(t=>t.Nav_CheckType?.NAME.includes(this.state.inputText3));
if (this.state.inputText3) {
temp = temp.filter(t => t.Nav_CheckType?.NAME.includes(this.state.inputText3));
}
this.setState({dataList :temp})
this.setState({ dataList: temp })
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -249,9 +244,9 @@ class SK004CheckList extends React.Component {
showModalContent = (item) => {
this.setState({
showDetailContent: true,
},()=>{
}, () => {
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);
// extendIgnoreDataRule(json)
@ -270,8 +265,8 @@ class SK004CheckList extends React.Component {
showModal = (item) => {
this.setState({
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)
this.props.dispatch({
type: 'app/getDataByPost',
@ -279,11 +274,13 @@ class SK004CheckList extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
onComplete: (ret) => {
if (ret) {
this.setState({ Details: ret,
MineType:item.MineType,
CHECK_CYCLE:item.CHECK_CYCLE,
CHECK_TYPE:item.CHECK_TYPE,
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
this.setState({
Details: ret,
MineType: item.MineType,
CHECK_CYCLE: item.CHECK_CYCLE,
CHECK_TYPE: item.CHECK_TYPE,
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
});
}
}
});
@ -292,40 +289,40 @@ class SK004CheckList extends React.Component {
handleCancel = () => {
this.setState({
showDetail: false,
Details:[],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null
Details: [],
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null
});
};
closeModal = () => {
this.setState({
showDetail: false,
Details:[],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null
Details: [],
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null
});
};
handleCancelContent = () => {
this.setState({
showDetailContent: false,
DetailContents:[]
DetailContents: []
});
};
closeModalContent = () => {
this.setState({
showDetailContent: false,
DetailContents:[]
DetailContents: []
});
};
// handleSearch = (evt) => {
// const { value } = evt.target;
// this.setState({ inputText: value ? value : "" });
// };
handleSearch=(value)=>{
handleSearch = (value) => {
this.setState({
inputText: value
})
@ -334,19 +331,19 @@ class SK004CheckList extends React.Component {
// const { value } = evt.target;
// this.setState({ inputText2: value ? value : "" });
// };
handleSearch2=(value)=>{
handleSearch2 = (value) => {
this.setState({
inputText2: value
})
}
handleSearch3 = ({data, record}) => {
handleSearch3 = ({ data, record }) => {
// const { value } = evt.target;
// this.setState({ inputText3: value ? value : "" });
this.setState({
checkType: {
...this.state.checkType,
ID: data[0],
NAME: record?.NAME ,
NAME: record?.NAME,
},
inputText3: record?.NAME
})
@ -356,7 +353,7 @@ class SK004CheckList extends React.Component {
labelCol: { span: 8 },
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();
return <div>
<Modal
@ -407,7 +404,7 @@ class SK004CheckList extends React.Component {
{/* <Row>
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
</Row> */}
<Row style={{width:"1250px",margin:"auto"}}>
<Row style={{ width: "1250px", margin: "auto" }}>
<Col span={5} style={{ marginLeft: "10px" }}>
<Form.Item
label={'生产单元'}
@ -415,7 +412,7 @@ class SK004CheckList extends React.Component {
>
<Select
// defaultValue="风险管理"
style={{width:'180px'}}
style={{ width: '180px' }}
allowClear
onChange={this.handleSearch}
>
@ -443,7 +440,7 @@ class SK004CheckList extends React.Component {
<Select
// defaultValue="风险管理"
allowClear
style={{width:'180px'}}
style={{ width: '180px' }}
onChange={this.handleSearch2}
>
<Option value="2">班组级</Option>
@ -479,8 +476,8 @@ class SK004CheckList extends React.Component {
</Row>
<div>
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
{this.state.dataList?
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
{this.state.dataList ?
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
dataSource={this.state.dataList}
columns={this.state.columndatas}
pagination={false}
@ -488,11 +485,11 @@ class SK004CheckList extends React.Component {
loading={false}
size="small"
/>
:[]}
: []}
</div>
</div>
}
}
export default connect(({ login,app }) => ({ login,app }))(SK004CheckList)
export default connect(({ login, app }) => ({ login, app }))(SK004CheckList)

View File

@ -1,6 +1,6 @@
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
import React , { useState }from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React, { useState } from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -14,34 +14,34 @@ class SK004CheckListNew extends React.Component {
constructor(props) {
super(props);
this.state = {
inputText:"",
inputText2:"",
inputText3:"",
inputText4:"",
inputText5:"",
inputText6:"",
inputText: "",
inputText2: "",
inputText3: "",
inputText4: "",
inputText5: "",
inputText6: "",
depart: {},
production: {},
productionId:null,
checkType:{},
productionId: null,
checkType: {},
data: {},
dataList: [],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null,
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null,
BtnAgreeDisplay: 'none',
showDetail:false,
showDetail: false,
showDetailContent: false,
Details:[],
DetailContents:[],
columnContents : [
Details: [],
DetailContents: [],
columnContents: [
{
title: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
render: (text, record, index) => {
return <label>{index+1}</label>
return <label>{index + 1}</label>
}
},
{
@ -125,21 +125,20 @@ class SK004CheckListNew extends React.Component {
};
};
componentDidMount() {
if (this.props.data?.btnConfig?.id)
{this.loadData();}
if (this.props.data?.btnConfig?.id) { this.loadData(); }
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
{this.loadData();}
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
}
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();
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendIgnoreDataRule(json)
this.props.dispatch({
type: 'app/getDataByPost',
@ -147,16 +146,14 @@ class SK004CheckListNew extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetCheckListNew',
onComplete: (ret) => {
if (ret) {
this.setState({data:ret, dataList: ret });
this.setState({ data: ret, dataList: ret });
}
}
});
}
loadData2()
{
let temp=this.state.data
if(this.state.productionId)
{
loadData2() {
let temp = this.state.data
if (this.state.productionId) {
// let minetype="全公司"
// if(this.state.inputText === "10")
// {
@ -183,10 +180,9 @@ class SK004CheckListNew extends React.Component {
// 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
// if(this.state.inputText2.includes("部门"))
// {
@ -204,28 +200,24 @@ class SK004CheckListNew extends React.Component {
// {
// checktype=4
// }
temp=temp.filter(t=>t.CheckLevel==this.state.inputText2);
temp = temp.filter(t => t.CheckLevel == this.state.inputText2);
}
if(this.state.inputText6)
{
temp=temp.filter(t=>t.CheckCycle==this.state.inputText6);
if (this.state.inputText6) {
temp = temp.filter(t => t.CheckCycle == this.state.inputText6);
}
if(this.state.inputText3)
{
temp=temp.filter(t=>t.CheckType == this.state.inputText3);
if (this.state.inputText3) {
temp = temp.filter(t => t.CheckType == this.state.inputText3);
}
if(this.state.inputText4)
{
temp=temp.filter(t=>t.CheckDepart.includes(this.state.inputText4));
if (this.state.inputText4) {
temp = temp.filter(t => t.CheckDepart.includes(this.state.inputText4));
}
if(this.state.inputText5)
{
temp=temp.filter(t=>t.CheckPost!=null &&t.CheckPost.includes(this.state.inputText5));
if (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() {
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -235,9 +227,9 @@ class SK004CheckListNew extends React.Component {
showModalContent = (item) => {
this.setState({
showDetailContent: true,
},()=>{
}, () => {
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);
// extendIgnoreDataRule(json)
@ -256,8 +248,8 @@ class SK004CheckListNew extends React.Component {
showModal = (item) => {
this.setState({
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)
this.props.dispatch({
type: 'app/getDataByPost',
@ -265,11 +257,13 @@ class SK004CheckListNew extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
onComplete: (ret) => {
if (ret) {
this.setState({ Details: ret,
MineType:item.MineType,
CHECK_CYCLE:item.CHECK_CYCLE,
CHECK_TYPE:item.CHECK_TYPE,
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
this.setState({
Details: ret,
MineType: item.MineType,
CHECK_CYCLE: item.CHECK_CYCLE,
CHECK_TYPE: item.CHECK_TYPE,
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
});
}
}
});
@ -278,36 +272,36 @@ class SK004CheckListNew extends React.Component {
handleCancel = () => {
this.setState({
showDetail: false,
Details:[],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null
Details: [],
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null
});
};
closeModal = () => {
this.setState({
showDetail: false,
Details:[],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null
Details: [],
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null
});
};
handleCancelContent = () => {
this.setState({
showDetailContent: false,
DetailContents:[]
DetailContents: []
});
};
closeModalContent = () => {
this.setState({
showDetailContent: false,
DetailContents:[]
DetailContents: []
});
};
handleSearch = ({data, record}) => {
handleSearch = ({ data, record }) => {
this.setState({
production: {
...this.state.production,
@ -327,34 +321,34 @@ class SK004CheckListNew extends React.Component {
// const { value } = evt.target;
// this.setState({ inputText2: value ? value : "" });
// };
handleSearch2=(value)=>{
handleSearch2 = (value) => {
this.setState({
inputText2: value
})
}
handleSearch6=(value)=>{
handleSearch6 = (value) => {
this.setState({
inputText6: value
})
}
handleSearch3 = ({data, record}) => {
handleSearch3 = ({ data, record }) => {
// const { value } = evt.target;
// this.setState({ inputText3: value ? value : "" });
this.setState({
checkType: {
...this.state.checkType,
ID: data[0],
NAME: record?.NAME ,
NAME: record?.NAME,
},
inputText3: record?.NAME
})
};
handleSearch4=(e)=>{
handleSearch4 = (e) => {
this.setState({
inputText4: e.target.value
})
}
handleSearch5=(e)=>{
handleSearch5 = (e) => {
this.setState({
inputText5: e.target.value
})
@ -375,7 +369,7 @@ class SK004CheckListNew extends React.Component {
labelCol: { span: 8 },
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();
return <div>
<Modal
@ -409,7 +403,7 @@ class SK004CheckListNew extends React.Component {
{/* <Row>
<Col span={1} style={{ marginLeft:"20px" }}><Button icon="export" onClick={() => this.onTableBtnExport()}>导出</Button></Col>
</Row> */}
<Row style={{width:"1250px",margin:"auto"}}>
<Row style={{ width: "1250px", margin: "auto" }}>
<Col span={5} style={{ marginLeft: "10px" }}>
<Form.Item
label={'生产单元'}
@ -446,7 +440,7 @@ class SK004CheckListNew extends React.Component {
<Select
// defaultValue="风险管理"
allowClear
style={{width:'180px'}}
style={{ width: '180px' }}
onChange={this.handleSearch2}
>
<Option value="班组级">班组级</Option>
@ -486,7 +480,7 @@ class SK004CheckListNew extends React.Component {
>
<Select
allowClear
style={{width:'180px'}}
style={{ width: '180px' }}
onChange={this.handleSearch6}
>
<Option value="每天">每天</Option>
@ -531,8 +525,8 @@ class SK004CheckListNew extends React.Component {
</Row>
<div>
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
{this.state.dataList?
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
{this.state.dataList ?
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
dataSource={this.state.dataList}
columns={this.state.columndatas}
pagination={false}
@ -540,11 +534,11 @@ class SK004CheckListNew extends React.Component {
loading={false}
size="small"
/>
:[]}
: []}
</div>
</div>
}
}
export default connect(({ login,app }) => ({ login,app }))(SK004CheckListNew)
export default connect(({ login, app }) => ({ login, app }))(SK004CheckListNew)

View File

@ -1,6 +1,6 @@
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
import React , { useState }from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue,GetFileModel, guid, initQueryFilter,showFiles } from "../../../utils/common";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React, { useState } from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, GetFileModel, guid, initQueryFilter, showFiles } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -18,32 +18,32 @@ class SK004CheckPost extends React.Component {
title: "",
visible: false,
},
inputText:"",
inputText2:"",
inputText3:"",
departId:null,
inputText: "",
inputText2: "",
inputText3: "",
departId: null,
data: {},
depart: {},
departName:'',
postName:'',
phone:'',
departName: '',
postName: '',
phone: '',
post: {},
cards: {},
dataList: [],
MineType:0,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null,
MineType: 0,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null,
BtnAgreeDisplay: 'none',
showDetail:false,
Details:[],
columns : [
showDetail: false,
Details: [],
columns: [
{
title: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
render: (text, record, index) => {
return <label>{index+1}</label>
return <label>{index + 1}</label>
}
},
{
@ -151,21 +151,20 @@ class SK004CheckPost extends React.Component {
};
componentDidMount() {
if (this.props.data?.btnConfig?.id)
{this.loadData();}
if (this.props.data?.btnConfig?.id) { this.loadData(); }
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id)
{this.loadData();}
if (NextProps.data?.btnConfig?.id && this.props.data?.btnConfig?.id != NextProps.data?.btnConfig?.id) { this.loadData(); }
}
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();
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendIgnoreDataRule(json)
this.props.dispatch({
type: 'app/getDataByPost',
@ -173,30 +172,26 @@ class SK004CheckPost extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetPostRiskList',
onComplete: (ret) => {
if (ret) {
this.setState({ data:ret,dataList: ret });
this.setState({ data: ret, dataList: ret });
}
}
});
}
loadData2()
{
let temp=this.state.data
if(this.state.inputText)
{
temp=temp.filter(t=>t.Nav_Department?.NAME.includes(this.state.inputText));
loadData2() {
let temp = this.state.data
if (this.state.inputText) {
temp = temp.filter(t => t.Nav_Department?.NAME.includes(this.state.inputText));
}
if(this.state.inputText2)
{
temp=temp.filter(t=>t.POST_NAME.includes(this.state.inputText2));
if (this.state.inputText2) {
temp = temp.filter(t => t.POST_NAME.includes(this.state.inputText2));
}
if(this.state.inputText3)
{
temp=temp.filter(t=>t.Nav_Library?.Nav_ProductionUnit?.NAME.includes(this.state.inputText3));
if (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() {
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -207,67 +202,65 @@ class SK004CheckPost extends React.Component {
showModal = (item) => {
this.setState({
showDetail: true,
},()=>{
}, () => {
this.setState({
Details:item.Nav_Librarys,
departName:item.Nav_Department?.NAME,
postName:item.POST_NAME,
phone:item.PHONE,
Details: item.Nav_Librarys,
departName: item.Nav_Department?.NAME,
postName: item.POST_NAME,
phone: item.PHONE,
});
});
};
handleCancel = () => {
this.setState({
showDetail: false,
Details:[]
Details: []
});
};
closeModal = () => {
this.setState({
showDetail: false,
Details:[]
Details: []
});
};
handleCancelCard = () => {
this.setState({
showCard: false,
cards:{}
cards: {}
});
};
showModalCard = (record) => {
this.setState({
showCard: true,
},()=>{
}, () => {
let tmpData = [];
if(record.Nav_Details)
{
for(var i = 0; i <record.Nav_Details.length ; i++)
{
tmpData = tmpData+ "\r\n"+ (i+1)+"、" +record.Nav_Details[i].MEASURES_NAME
if (record.Nav_Details) {
for (var i = 0; i < record.Nav_Details.length; i++) {
tmpData = tmpData + "\r\n" + (i + 1) + "、" + record.Nav_Details[i].MEASURES_NAME
}
}
let temps={
RISK_NAME:record.RISK_NAME,
RISK_CODE:"01",
EVALUATE_LEVEL:this.props.app.enums.SKEvaluateLevelEnum.enums[record.EVALUATE_LEVEL],
RISK_DESCRIPTION:record.RISK_DESCRIPTION,
MEASURES_NAME:tmpData,
RISK_TYPE:record.Nav_Type.NAME,
EMERGENCY:record.EMERGENCY,
photo:record.Nav_Photo[0]
let temps = {
RISK_NAME: record.RISK_NAME,
RISK_CODE: "01",
EVALUATE_LEVEL: this.props.app.enums.SKEvaluateLevelEnum.enums[record.EVALUATE_LEVEL],
RISK_DESCRIPTION: record.RISK_DESCRIPTION,
MEASURES_NAME: tmpData,
RISK_TYPE: record.Nav_Type.NAME,
EMERGENCY: record.EMERGENCY,
photo: record.Nav_Photo[0]
}
this.setState({
cards:temps,
cards: temps,
});
});
};
closeModalCard = () => {
this.setState({
showCard: false,
cards:{}
cards: {}
});
};
handleSearch = ({data, record}) => {
handleSearch = ({ data, record }) => {
this.setState({
depart: {
...this.state.depart,
@ -278,7 +271,7 @@ class SK004CheckPost extends React.Component {
departId: record?.ID
})
};
handleSearch2 = ({data, record}) => {
handleSearch2 = ({ data, record }) => {
// const { value } = evt.target;
// this.setState({ inputText2: value ? value : "" });
this.setState({
@ -290,7 +283,7 @@ class SK004CheckPost extends React.Component {
inputText2: record?.NAME
})
};
handleSearch3=(value)=>{
handleSearch3 = (value) => {
this.setState({
inputText3: value
})
@ -300,7 +293,7 @@ class SK004CheckPost extends React.Component {
labelCol: { span: 8 },
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();
return <div>
<div>
@ -314,17 +307,17 @@ class SK004CheckPost extends React.Component {
closeModal={this.closeModalCard}
>
<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>
<table style={{margin:"auto",alignContent:"center",width:"1000px"}} className={stylesStep.PrintForm} >
<table style={{ margin: "auto", alignContent: "center", width: "1000px" }} className={stylesStep.PrintForm} >
<tr>
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>
风险点名称
</td>
<td>
{this.state.cards?.RISK_NAME}
</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 rowSpan={3}>
@ -332,32 +325,32 @@ class SK004CheckPost extends React.Component {
</td>
</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>
</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>
</tr>
<tr>
<td style={{backgroundColor:"yellow",width:"120px",textAlign:'center'}}>安全标志</td>
<td> {this.state.cards?.photo?showFiles(this.state.cards?.photo, config.picServerHost, this)
:<img title={"安全标志"} src={require("../../../../src/assets/aqbz.png")} />
<td style={{ backgroundColor: "yellow", width: "120px", textAlign: 'center' }}>安全标志</td>
<td> {this.state.cards?.photo ? showFiles(this.state.cards?.photo, config.picServerHost, this)
: <img title={"安全标志"} src={require("../../../../src/assets/aqbz.png")} />
}
</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>
</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 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>
</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 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>
</tr>
</table>
@ -384,14 +377,14 @@ class SK004CheckPost extends React.Component {
/>
</Modal>
<br></br>
<Row style={{width:"1250px",margin:"auto"}}>
<Row style={{ width: "1250px", margin: "auto" }}>
<Col span={5}>
<Form.Item
label={'生产单元'}
{...formItemLayout}
>
<Select
style={{width:'180px'}}
style={{ width: '180px' }}
allowClear
onChange={this.handleSearch3}
>
@ -448,8 +441,8 @@ class SK004CheckPost extends React.Component {
</Row>
<div>
<h1 style={{ textAlign: 'center', margin: '15px' }}>岗位风险清单</h1>
{this.state.dataList?
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
{this.state.dataList ?
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
dataSource={this.state.dataList}
columns={this.state.columndatas}
pagination={true}
@ -457,7 +450,7 @@ class SK004CheckPost extends React.Component {
loading={false}
size="small"
/>
:[]}
: []}
</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)

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -16,14 +16,14 @@ class SK004ShowPrint extends React.Component {
data: null,
BtnAgreeDisplay: 'none',
tmpData: {},
showDetail:false,
showDetail: false,
showDetailContent: false,
Details:{},
columns:[],
DetailContents:{},
columnContents:[],
DetailPosts:{},
columnPosts:[]
Details: {},
columns: [],
DetailContents: {},
columnContents: [],
DetailPosts: {},
columnPosts: []
};
};
@ -78,8 +78,7 @@ class SK004ShowPrint extends React.Component {
title: "检查层级",
dataIndex: "CHECK_TYPE",
key: "CHECK_TYPE",
render: (text, record) =>
{
render: (text, record) => {
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
}
},
@ -92,11 +91,10 @@ class SK004ShowPrint extends React.Component {
title: "检查岗位",
dataIndex: "Nav_DetailPosts",
key: "Nav_DetailPosts",
render: (text, record) =>
{
render: (text, record) => {
return <label>{
record.Nav_DetailPosts && record.Nav_DetailPosts.map((item, i) => {
return item.Nav_Post.NAME+' '
return item.Nav_Post.NAME + ' '
})
}</label>
}
@ -110,8 +108,7 @@ class SK004ShowPrint extends React.Component {
title: "检查周期",
dataIndex: "CHECK_CYCLE",
key: "CHECK_CYCLE",
render: (text, record) =>
{
render: (text, record) => {
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
}
},
@ -154,13 +151,14 @@ class SK004ShowPrint extends React.Component {
}
}
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();
}
loadData = (dataId) => {
let that=this;
let that = this;
let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_Type');
// extendInclude(json, 'Nav_Area');
@ -187,14 +185,13 @@ class SK004ShowPrint extends React.Component {
url: 'SK/SKEnterpriseLibrary/SKGet',
onComplete: (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.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' })
}else{
} else {
that.setState({ BtnAgreeDisplay: 'inline' })
}
this.onClickApprove(false);
@ -208,16 +205,16 @@ class SK004ShowPrint extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx")
}
onClickApprove=(appVisible)=>{
onClickApprove = (appVisible) => {
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",
}
this.setState({
@ -227,19 +224,19 @@ class SK004ShowPrint extends React.Component {
showModalContent = (item) => {
this.setState({
showDetailContent: true,
},()=>{
}, () => {
this.setState({
DetailContents:item.Nav_DetailContents
DetailContents: item.Nav_DetailContents
});
});
};
showModal = (item) => {
this.setState({
showDetail: true,
},()=>{
}, () => {
this.setState({
Details:item.Nav_DetailHiddens,
DetailPosts:item.Nav_DetailDeparts
Details: item.Nav_DetailHiddens,
DetailPosts: item.Nav_DetailDeparts
});
});
};
@ -265,7 +262,7 @@ class SK004ShowPrint extends React.Component {
};
render() {
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();
return <div>
<Modal
@ -316,10 +313,10 @@ class SK004ShowPrint extends React.Component {
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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 ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -328,22 +325,22 @@ class SK004ShowPrint extends React.Component {
<div>
<Descriptions size="middle" bordered className={stylesStep.description}>
<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_DESCRIPTION}</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="风险评价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="风险类别">{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="风险评价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="分值D">{data.EVALUATE_SCORE}</Descriptions.Item>
<Descriptions.Item label="风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控层级</td>
@ -351,10 +348,10 @@ class SK004ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>管控责任人</td>
</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>
<td>
{i+1}
{i + 1}
</td>
<td>
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
@ -368,10 +365,10 @@ class SK004ShowPrint extends React.Component {
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控措施</td>
@ -379,7 +376,7 @@ class SK004ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>查看</td>
</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>
<td>
{item.NUM}
@ -394,20 +391,20 @@ class SK004ShowPrint extends React.Component {
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>辨识部门</td>
<td className={stylesStep.fontBold}>辨识岗位</td>
</tr>
{
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{
data.Nav_Posts && data.Nav_Posts.map((item, i) => {
return <tr>
<td>
{i+1}
{i + 1}
</td>
<td>
{item.Nav_Department?.NAME}
@ -423,7 +420,7 @@ class SK004ShowPrint extends React.Component {
</tr>
})
}
</table>:null
</table> : null
}
<FormPage {...this.state.tmpData} />
</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)

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -23,12 +23,13 @@ class SK004ShowSummary extends React.Component {
this.loadData();
}
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();
}
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_Area');
extendInclude(json, 'Nav_Details');
@ -50,7 +51,7 @@ class SK004ShowSummary extends React.Component {
onComplete: (ret) => {
if (ret && ret.Data) {
this.setState({
data : ret.Data
data: ret.Data
});
}
},
@ -58,7 +59,7 @@ class SK004ShowSummary extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -67,13 +68,13 @@ class SK004ShowSummary extends React.Component {
render() {
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();
return <div>
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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>
{
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}>
data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr>
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>生产单元</td>
@ -113,10 +114,10 @@ class SK004ShowSummary extends React.Component {
</tr>
{
data && data.map((item,i)=>{
data && data.map((item, i) => {
return <tr>
<td>
{i+1}
{i + 1}
</td>
<td>
{item.Nav_ProductionUnit?.NAME}
@ -159,7 +160,7 @@ class SK004ShowSummary extends React.Component {
{item.CONTROLUSER}
</td>
<td>
{ item.MEASURE}
{item.MEASURE}
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
if (item2) {
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
@ -170,16 +171,16 @@ class SK004ShowSummary extends React.Component {
{item.EMERGENCY}
</td>
<td>
{ item.CHECKCONTENTS}
{item.CHECKCONTENTS}
</td>
<td>
{ item.HIDDENSCRIPTION }
{item.HIDDENSCRIPTION}
</td>
{/* <td>
{ item.HIDDENLEVEL }
</td> */}
<td>
{item.RECIFYMEASURE }
{item.RECIFYMEASURE}
</td>
{/* <td>
{item.CHECKBASICS }
@ -188,7 +189,7 @@ class SK004ShowSummary extends React.Component {
{ item.CHECKSTANDARDS }
</td> */}
<td>
{ item.CHECKLEVEL }
{item.CHECKLEVEL}
</td>
{/* <td>
{ item.CHECKDEPT }
@ -197,12 +198,12 @@ class SK004ShowSummary extends React.Component {
{item.CHECKPOST }
</td> */}
<td>
{ item.CHECKTYPE }
{item.CHECKTYPE}
</td>
</tr>
})
}
</table>:null
</table> : null
}
{/* <FormPage {...this.state.tmpData} /> */}
</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)

View File

@ -63,6 +63,7 @@ class SK006ShowOperateLog extends React.Component {
loadData = (id) => {
var orgId = this.props.login ? this.props.login.OrgId : '';
let json = initFilter(orgId, id);
json.Parameter22 = this.props.data.ORG_ID_HV;
this.props.dispatch({
type: 'app/getDataByPost',
payload: json,

View File

@ -85,6 +85,7 @@ class SK006ShowPrint extends React.Component {
}
loadDataTask = (dataId) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json)
// extendRule(json, 'ID', 1, dataId);

View File

@ -1,6 +1,6 @@
import { Button, Descriptions,Popconfirm, Row, Col, Form,Modal, Input, Select, Table } from 'antd';
import React , { useState }from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter,ShowPrintClose } from "../../../utils/common";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Modal, Input, Select, Table } from 'antd';
import React, { useState } from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, ShowPrintClose } from "../../../utils/common";
import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -13,25 +13,25 @@ class SK010CheckList extends React.Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys:[],
selectedRowKeys: [],
taskSelects: [],
dataList: [],
PRODUCTION_UNIT_ID:null,
CHECK_CYCLE:0,
CHECK_TYPE:0,
CHECK_CYCLE_ID:null,
PRODUCTION_UNIT_ID: null,
CHECK_CYCLE: 0,
CHECK_TYPE: 0,
CHECK_CYCLE_ID: null,
BtnAgreeDisplay: 'none',
showDetail:false,
showDetail: false,
showDetailContent: false,
Details:[],
DetailContents:[],
columnContents : [
Details: [],
DetailContents: [],
columnContents: [
{
title: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
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: '序号',
dataIndex: 'NUM',
key: "NUM",
render: (text, record, index) => {
return <label>{index+1}</label>
return <label>{index + 1}</label>
}
},
{
@ -143,21 +143,20 @@ class SK010CheckList extends React.Component {
};
componentDidMount() {
if (this.props.data?.clickKey)
{this.loadData();}
if (this.props.data?.clickKey) { this.loadData(); }
}
componentWillReceiveProps(NextProps) {
if (NextProps.data?.clickKey && this.props.data?.clickKey != NextProps.data?.clickKey)
{this.loadData();}
if (NextProps.data?.clickKey && this.props.data?.clickKey != NextProps.data?.clickKey) { this.loadData(); }
}
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();
}
loadData = () => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendIgnoreDataRule(json)
this.props.dispatch({
type: 'app/getDataByPost',
@ -172,7 +171,7 @@ class SK010CheckList extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
@ -182,9 +181,9 @@ class SK010CheckList extends React.Component {
showModalContent = (item) => {
this.setState({
showDetailContent: true,
},()=>{
}, () => {
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);
// extendIgnoreDataRule(json)
@ -203,8 +202,8 @@ class SK010CheckList extends React.Component {
showModal = (item) => {
this.setState({
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)
this.props.dispatch({
type: 'app/getDataByPost',
@ -212,11 +211,13 @@ class SK010CheckList extends React.Component {
url: 'SK/SKEnterpriseLibrary/GetCheckDetailList',
onComplete: (ret) => {
if (ret) {
this.setState({ Details: ret,
PRODUCTION_UNIT_ID :item.PRODUCTION_UNIT_ID,
CHECK_CYCLE:item.CHECK_CYCLE,
CHECK_TYPE:item.CHECK_TYPE,
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
this.setState({
Details: ret,
PRODUCTION_UNIT_ID: item.PRODUCTION_UNIT_ID,
CHECK_CYCLE: item.CHECK_CYCLE,
CHECK_TYPE: item.CHECK_TYPE,
CHECK_TYPE_ID: item.CHECK_TYPE_ID,
});
}
}
});
@ -255,11 +256,10 @@ class SK010CheckList extends React.Component {
}
temps.push(tmpData);
});
if(!temps||temps.length==0){
if (!temps || temps.length == 0) {
message.error('请选择要导入的内容');
}else
{
this.props.login.tempDatas=temps
} else {
this.props.login.tempDatas = temps
this.state.taskSelects = [];
this.state.selectedRowKeys = [];
this.closeModalContent()
@ -268,21 +268,22 @@ class SK010CheckList extends React.Component {
}
};
onSelectChange = (selectedRowKeys,selectedRows) => { // 选择菜单行
this.setState({selectedRowKeys:selectedRowKeys,
taskSelects:selectedRows
onSelectChange = (selectedRowKeys, selectedRows) => { // 选择菜单行
this.setState({
selectedRowKeys: selectedRowKeys,
taskSelects: selectedRows
});
};
render() {
const {selectedRowKeys} =this.state;
const { selectedRowKeys } = this.state;
const rowSelection = {
selectedRowKeys:selectedRowKeys,
selectedRowKeys: selectedRowKeys,
fixed: false,
columnWidth: 20,
hideDefaultSelections:false,
hideDefaultSelections: false,
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();
return <div>
<Modal
@ -335,8 +336,8 @@ class SK010CheckList extends React.Component {
</div> */}
<div>
<h1 style={{ textAlign: 'center', margin: '15px' }}>检查清单</h1>
{this.state.dataList?
<Table style={{ width:"1250px",margin:"auto",alignContent:"center",backgroundColor:"white"}}
{this.state.dataList ?
<Table style={{ width: "1250px", margin: "auto", alignContent: "center", backgroundColor: "white" }}
dataSource={this.state.dataList}
columns={this.state.columndatas}
pagination={false}
@ -344,11 +345,11 @@ class SK010CheckList extends React.Component {
loading={false}
size="small"
/>
:[]}
: []}
</div>
</div>
}
}
export default connect(({ login,app }) => ({ login,app }))(SK010CheckList)
export default connect(({ login, app }) => ({ login, app }))(SK010CheckList)

View File

@ -60,6 +60,7 @@ class SK010ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json)
@ -207,7 +208,7 @@ class SK010ShowPrint extends React.Component {
</td>
<td>
{
item.CHECK_RESULT == null? "无隐患" :enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
item.CHECK_RESULT == null ? "无隐患" : enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
}
</td>
<td>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
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 config from "../../../config";
import XLSX from 'xlsx';
@ -15,7 +15,7 @@ class SK012ShowPrint extends React.Component {
this.state = {
data: null,
enumData: null,
detailUsers:[],
detailUsers: [],
BtnAgreeDisplay: 'none',
fileForm: {
title: "",
@ -61,6 +61,7 @@ class SK012ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json)
@ -84,19 +85,17 @@ class SK012ShowPrint extends React.Component {
if (this.props.data && this.props.data.loadDataDeal) {
this.props.data.loadDataDeal(1);
}
let users=[]
let uniqueUsers =[]
if(ret.Nav_CheckRecordDetails)
{
let users = []
let uniqueUsers = []
if (ret.Nav_CheckRecordDetails) {
ret.Nav_CheckRecordDetails.forEach(item => {
item.Nav_CheckRecordDetailUsers.forEach(item2=>{
item.Nav_CheckRecordDetailUsers.forEach(item2 => {
users.push(item2)
})
})
}
if(users)
{
uniqueUsers= users.reduce((acc, user) => {
if (users) {
uniqueUsers = users.reduce((acc, user) => {
// 如果累积数组中还没有这个 user_id则添加
if (!acc.some(item => item.USER_ID === user.USER_ID)) {
acc.push(user);
@ -104,7 +103,7 @@ class SK012ShowPrint extends React.Component {
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) {
this.setState({ BtnAgreeDisplay: 'none' })
} else {
@ -228,7 +227,7 @@ class SK012ShowPrint extends React.Component {
</td>
<td>
{
item.CHECK_RESULT == null? "无隐患" :enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
item.CHECK_RESULT == null ? "无隐患" : enums.SKCheckResultEnum.enums[item.CHECK_RESULT]
}
</td>
<td>
@ -275,7 +274,7 @@ class SK012ShowPrint extends React.Component {
})
}</Descriptions.Item>
</Descriptions>
</div>:null
</div> : null
}
<FormPage {...this.state.tmpData} />
</div>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
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 config from "../../../config";
import XLSX from 'xlsx';
@ -60,6 +60,7 @@ class SK014ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json)
@ -203,7 +204,7 @@ class SK014ShowPrint extends React.Component {
</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>
}
{/* {
@ -230,13 +231,13 @@ class SK014ShowPrint extends React.Component {
<Descriptions size="middle" bordered>
<Descriptions.Item label="整改责任人签名">{
data.Nav_ReportDetails?.map((item, i) => {
if (item && item.ISCHECK ) {
if (item && item.ISCHECK) {
showUserSign(item.Nav_RecitifyUser, config.picServerHost)
}
})
}</Descriptions.Item>
</Descriptions>
</div>:null
</div> : null
}
<FormPage {...this.state.tmpData} />
</div>

View File

@ -41,6 +41,7 @@ class SK016ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
extendInclude(json, 'Nav_ApplyUser');

View File

@ -57,6 +57,7 @@ class SK018ShowPrint extends React.Component {
}
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
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="检查类型">{data.Nav_CheckType ? data.Nav_CheckType.NAME : ''}</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)
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>

View File

@ -60,6 +60,7 @@ class SK020ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json)
@ -179,7 +180,7 @@ class SK020ShowPrint extends React.Component {
</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>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
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 config from "../../../config";
import XLSX from 'xlsx';
@ -57,6 +57,7 @@ class SK022ShowPrint extends React.Component {
}
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');
@ -147,7 +148,7 @@ class SK022ShowPrint extends React.Component {
// return <tr><label> {item2.Nav_User?.NAME}</label></tr>
})
}</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="整改措施">{data.RECTIFICATION_MEASURES}</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.RECTIFICATION_DESCRIPTION}</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="整改前照片">{
showFileImg(data?.Nav_RectifyPhotoas, config.picServerHost, this)
}</Descriptions.Item>
@ -171,16 +172,16 @@ class SK022ShowPrint extends React.Component {
<Descriptions.Item label="预案或方案">{
showFiles(data?.Nav_RectifyFiles, config.picServerHost, this)
}</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="验收意见">{data.ACCEPT_OPINION}</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="验收意见">{data.ACCEPT_OPINION}</Descriptions.Item>
<Descriptions.Item label="整改责任人签名">{
data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
showUserSign(data.Nav_RecitifyUser, config.picServerHost)
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''
}</Descriptions.Item>
<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)
: data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''
}</Descriptions.Item>

View File

@ -57,6 +57,7 @@ class SK024ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
extendInclude(json, 'Nav_ApplyUser');

View File

@ -228,6 +228,7 @@ class SK026ShowPrint extends React.Component {
loadData = (dataId) => {
let that = this;
let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_ApplyUser');
// extendInclude(json, 'Nav_ApplyDepartment');
@ -511,13 +512,13 @@ class SK026ShowPrint extends React.Component {
{item.Nav_Type ? item.Nav_Type?.NAME : ''}
</td>
<td>
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
</td>
<td>
{item.EVALUATE_SCORE}

View File

@ -47,6 +47,7 @@ class SK027ShowPrint extends React.Component {
loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json)
// extendRule(json, 'ID', 1, dataId);

View File

@ -41,6 +41,7 @@ class SK031ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');

View File

@ -42,7 +42,15 @@ class SK033ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
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
}
else {
json.Parameter22 = this.props.data.ORG_ID_HV;
}
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -16,14 +16,14 @@ class SK035CheckLibrary extends React.Component {
data: null,
BtnAgreeDisplay: 'none',
tmpData: {},
showDetail:false,
showDetail: false,
showDetailContent: false,
Details:{},
columns:[],
DetailContents:{},
columnContents:[],
DetailPosts:{},
columnPosts:[]
Details: {},
columns: [],
DetailContents: {},
columnContents: [],
DetailPosts: {},
columnPosts: []
};
};
@ -70,8 +70,7 @@ class SK035CheckLibrary extends React.Component {
title: "检查层级",
dataIndex: "CHECK_TYPE",
key: "CHECK_TYPE",
render: (text, record) =>
{
render: (text, record) => {
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
}
},
@ -102,8 +101,7 @@ class SK035CheckLibrary extends React.Component {
title: "检查周期",
dataIndex: "CHECK_CYCLE",
key: "CHECK_CYCLE",
render: (text, record) =>
{
render: (text, record) => {
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
}
},
@ -146,13 +144,14 @@ class SK035CheckLibrary extends React.Component {
}
}
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();
}
loadData = (dataId) => {
let that=this;
let that = this;
let jsonTemp = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(jsonTemp, 'ID', 1, dataId);
that.props.dispatch({
type: 'app/getDataByPost',
@ -189,14 +188,13 @@ class SK035CheckLibrary extends React.Component {
url: 'SK/SKEnterpriseLibrary/SKGet',
onComplete: (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.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' })
}else{
} else {
that.setState({ BtnAgreeDisplay: 'inline' })
}
this.onClickApprove(false);
@ -205,8 +203,7 @@ class SK035CheckLibrary extends React.Component {
// this.setState({ isFinished: 'inline' })
// }
}
else
{ message.error('企业库无对应风险!');}
else { message.error('企业库无对应风险!'); }
}
});
}
@ -216,16 +213,16 @@ class SK035CheckLibrary extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx")
}
onClickApprove=(appVisible)=>{
onClickApprove = (appVisible) => {
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",
}
this.setState({
@ -235,19 +232,19 @@ class SK035CheckLibrary extends React.Component {
showModalContent = (item) => {
this.setState({
showDetailContent: true,
},()=>{
}, () => {
this.setState({
DetailContents:item.Nav_DetailContents
DetailContents: item.Nav_DetailContents
});
});
};
showModal = (item) => {
this.setState({
showDetail: true,
},()=>{
}, () => {
this.setState({
Details:item.Nav_DetailHiddens,
DetailPosts:item.Nav_DetailDeparts
Details: item.Nav_DetailHiddens,
DetailPosts: item.Nav_DetailDeparts
});
});
};
@ -273,7 +270,7 @@ class SK035CheckLibrary extends React.Component {
};
render() {
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();
return <div>
<Modal
@ -324,10 +321,10 @@ class SK035CheckLibrary extends React.Component {
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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 ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -336,10 +333,10 @@ class SK035CheckLibrary extends React.Component {
<div>
<Descriptions size="middle" bordered className={stylesStep.description}>
<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_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="风险评价E">{data.EVALUATE_E}</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="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控层级</td>
@ -359,10 +356,10 @@ class SK035CheckLibrary extends React.Component {
<td className={stylesStep.fontBold}>管控责任人</td>
</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>
<td>
{i+1}
{i + 1}
</td>
<td>
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
@ -376,10 +373,10 @@ class SK035CheckLibrary extends React.Component {
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控措施</td>
@ -387,7 +384,7 @@ class SK035CheckLibrary extends React.Component {
<td className={stylesStep.fontBold}>查看</td>
</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>
<td>
{item.NUM}
@ -402,20 +399,20 @@ class SK035CheckLibrary extends React.Component {
</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>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>辨识部门</td>
<td className={stylesStep.fontBold}>辨识岗位</td>
</tr>
{
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{
data.Nav_Posts && data.Nav_Posts.map((item, i) => {
return <tr>
<td>
{i+1}
{i + 1}
</td>
<td>
{item.Nav_Department?.NAME}
@ -431,7 +428,7 @@ class SK035CheckLibrary extends React.Component {
</tr>
})
}
</table>:null
</table> : null
}
<FormPage {...this.state.tmpData} />
</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)

View File

@ -41,6 +41,7 @@ class SK035ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');

View File

@ -42,6 +42,7 @@ class SK037ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');

View File

@ -41,6 +41,7 @@ class SK039ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');
@ -170,13 +171,13 @@ class SK039ShowPrint extends React.Component {
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
</td>
<td>
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
</td>
<td>
{item.EVALUATE_SCORE}
@ -185,7 +186,7 @@ class SK039ShowPrint extends React.Component {
{
//item.MEASURE
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>

View File

@ -1,5 +1,5 @@
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 { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print";
@ -41,6 +41,7 @@ class SK041ShowPrint extends React.Component {
loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser');
@ -170,13 +171,13 @@ class SK041ShowPrint extends React.Component {
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
</td>
<td>
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0}
{item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0}
{item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
</td>
<td>
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0}
{item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
</td>
<td>
{item.EVALUATE_SCORE}
@ -185,7 +186,7 @@ class SK041ShowPrint extends React.Component {
{
//item.MEASURE
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>

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -31,13 +31,14 @@ class SK043ShowPrint extends React.Component {
}
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();
}
loadData = (dataId) => {
let that=this;
let that = this;
let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Type');
extendInclude(json, 'Nav_Area');
@ -51,14 +52,13 @@ class SK043ShowPrint extends React.Component {
url: 'SK/BasicLibraryTemp/Get',
onComplete: (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.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' })
}else{
} else {
that.setState({ BtnAgreeDisplay: 'inline' })
}
this.onClickApprove(false);
@ -73,16 +73,16 @@ class SK043ShowPrint extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控基础库.xlsx")
}
onClickApprove=(appVisible)=>{
onClickApprove = (appVisible) => {
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",
}
this.setState({
@ -91,17 +91,17 @@ class SK043ShowPrint extends React.Component {
}
render() {
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();
return <div>
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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 ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控基础库</h1>
@ -110,10 +110,10 @@ class SK043ShowPrint extends React.Component {
<div>
<Descriptions size="middle" bordered className={stylesStep.description}>
<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_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="风险评价E">{data.EVALUATE_E}</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) => {
return <tr>
<td>
{(i+1)+"."+item?.MEASURES_NAME}
{(i + 1) + "." + item?.MEASURES_NAME}
</td>
<td>
{item?.EMERGENCY}
@ -147,7 +147,7 @@ class SK043ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="检查内容">{
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_STANDARD}</td>
</tr>
@ -157,13 +157,13 @@ class SK043ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="隐患描述">{
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> {item?.RECTIFICATION_MEASURES}</td></tr>
})
}</Descriptions.Item>
</Descriptions>
</div>:null
</div> : null
}
<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)

View File

@ -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 { 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 stylesStep from '../HI/StepForm.css';
import config from "../../../config";
@ -31,13 +31,14 @@ class SK045ShowPrint extends React.Component {
}
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();
}
loadData = (dataId) => {
let that=this;
let that = this;
let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_Type');
// extendInclude(json, 'Nav_Area');
@ -55,14 +56,13 @@ class SK045ShowPrint extends React.Component {
url: 'SK/SKEnterpriseLibraryTemp/FullGet',
onComplete: (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.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' })
}else{
} else {
that.setState({ BtnAgreeDisplay: 'inline' })
}
this.onClickApprove(false);
@ -77,16 +77,16 @@ class SK045ShowPrint extends React.Component {
}
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 Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx")
}
onClickApprove=(appVisible)=>{
onClickApprove = (appVisible) => {
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",
}
this.setState({
@ -95,17 +95,17 @@ class SK045ShowPrint extends React.Component {
}
render() {
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();
return <div>
<div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<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}
/>
<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 ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -114,10 +114,10 @@ class SK045ShowPrint extends React.Component {
<div>
<Descriptions size="middle" bordered className={stylesStep.description}>
<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_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="风险评价E">{data.EVALUATE_E}</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) => {
return <tr>
<td>
{(i+1)+"."+item?.MEASURES_NAME}
{(i + 1) + "." + item?.MEASURES_NAME}
</td>
<td>
{item?.EMERGENCY}
@ -157,7 +157,7 @@ class SK045ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="检查内容">{
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_STANDARD}</td>
<td>
@ -185,13 +185,13 @@ class SK045ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="隐患描述">{
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> {item?.RECTIFICATION_MEASURES}</td></tr>
})
}</Descriptions.Item>
</Descriptions>
</div>:null
</div> : null
}
<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)