This commit is contained in:
wyw 2025-12-25 10:46:36 +08:00
commit f5fbcac08c
52 changed files with 3842 additions and 3762 deletions

View File

@ -1,5 +1,5 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Popconfirm, Row, Col, Form, Input, Select, Table, Modal} from 'antd'; import { Button, Popconfirm, Row, Col, Form, Input, Select, Table, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, showFiles, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, showFiles, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
@ -66,6 +66,7 @@ class FO003ShowPrint extends React.Component {
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Team'); extendInclude(json, 'Nav_Team');
extendInclude(json, 'Nav_Class'); extendInclude(json, 'Nav_Class');

View File

@ -53,6 +53,7 @@ class FO005ShowPrint extends React.Component {
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Users.Nav_User'); extendInclude(json, 'Nav_Users.Nav_User');
extendInclude(json, 'Nav_Team'); extendInclude(json, 'Nav_Team');

View File

@ -60,6 +60,7 @@ class FO008ShowPrint extends React.Component {
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_User'); extendInclude(json, 'Nav_User');
extendInclude(json, 'Nav_Department'); extendInclude(json, 'Nav_Department');

View File

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

View File

@ -58,6 +58,7 @@ class FO017ShowPrint extends React.Component {
loadData = () => { loadData = () => {
let that = this; let that = this;
let json = initFilter(that.props.login.OrgId); let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, that.props.data.id); extendRule(json, 'ID', 1, that.props.data.id);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
// extendInclude(json, 'Nav_CrucialLicensePerson'); // extendInclude(json, 'Nav_CrucialLicensePerson');

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions, Modal,Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Modal, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid,showFiles,GetFileModel, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -54,12 +54,13 @@ class FO019ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
// extendRule(json, 'ID', 1, dataId); // extendRule(json, 'ID', 1, dataId);
@ -79,14 +80,13 @@ class FO019ShowPrint extends React.Component {
url: 'FO/FOTechDisclosureFrom/GetEdit', url: 'FO/FOTechDisclosureFrom/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
} }
@ -106,11 +106,11 @@ class FO019ShowPrint extends React.Component {
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
</div> </div>
@ -127,17 +127,17 @@ class FO019ShowPrint extends React.Component {
<td colSpan={2} rowSpan={1} className={styles.fontBold}>编号</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>编号</td>
<td colSpan={3} rowSpan={1}>{data.CODE}</td> <td colSpan={3} rowSpan={1}>{data.CODE}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>作业名称</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>作业名称</td>
<td colSpan={3} rowSpan={1}>{data.Nav_OperationStep?data.Nav_OperationStep?.NAME:''}</td> <td colSpan={3} rowSpan={1}>{data.Nav_OperationStep ? data.Nav_OperationStep?.NAME : ''}</td>
</tr> </tr>
<tr> <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>作业地点</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>作业地点</td>
<td colSpan={3} rowSpan={1}>{data.JOB_LOCATION}</td> <td colSpan={3} rowSpan={1}>{data.JOB_LOCATION}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>交底时间</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>交底时间</td>
<td colSpan={3} rowSpan={1}>{data.DISCLOSURE_DATE?data.DISCLOSURE_DATE:null}</td> <td colSpan={3} rowSpan={1}>{data.DISCLOSURE_DATE ? data.DISCLOSURE_DATE : null}</td>
</tr> </tr>
<tr> <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>交底人</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>交底人</td>
<td colSpan={3} rowSpan={1}>{data.Nav_DisclosurePerson?data.Nav_DisclosurePerson?.NAME:''}</td> <td colSpan={3} rowSpan={1}>{data.Nav_DisclosurePerson ? data.Nav_DisclosurePerson?.NAME : ''}</td>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>被交底人</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>被交底人</td>
<td colSpan={3} rowSpan={1}>{ <td colSpan={3} rowSpan={1}>{
data.IS_OUTSOURCE == false && data.Nav_Person && data.Nav_Person.map((item, i) => { data.IS_OUTSOURCE == false && data.Nav_Person && data.Nav_Person.map((item, i) => {
@ -182,9 +182,9 @@ class FO019ShowPrint extends React.Component {
<tr> <tr>
<td colSpan={2} rowSpan={1} className={styles.fontBold}>交底人签字</td> <td colSpan={2} rowSpan={1} className={styles.fontBold}>交底人签字</td>
<td colSpan={8} rowSpan={1}>{ <td colSpan={8} rowSpan={1}>{
(data.Nav_DisclosurePerson && data.Nav_DisclosurePerson.FILE_PATH)? (data.Nav_DisclosurePerson && data.Nav_DisclosurePerson.FILE_PATH) ?
<img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_DisclosurePerson?.NAME} src={config.picServerHost + data.Nav_DisclosurePerson.FILE_PATH} /> <img style={{ margin: "0 0 0 15px", width: '150px' }} alt={data.Nav_DisclosurePerson?.NAME} src={config.picServerHost + data.Nav_DisclosurePerson.FILE_PATH} />
:data.Nav_DisclosurePerson?.NAME : data.Nav_DisclosurePerson?.NAME
// data.Nav_DisclosurePerson && data.Nav_DisclosurePerson.map((item, i) => { // data.Nav_DisclosurePerson && data.Nav_DisclosurePerson.map((item, i) => {
// if (item.FORM_STATUS >= 1) { // if (item.FORM_STATUS >= 1) {
// if (item.Nav_User != null && item.Nav_User.FILE_PATH!= null) // if (item.Nav_User != null && item.Nav_User.FILE_PATH!= null)
@ -201,9 +201,9 @@ class FO019ShowPrint extends React.Component {
data.IS_OUTSOURCE == false && data.Nav_Person && data.Nav_Person.map((item, i) => { data.IS_OUTSOURCE == false && data.Nav_Person && data.Nav_Person.map((item, i) => {
if (item.DEAL_STATUS == 1) { if (item.DEAL_STATUS == 1) {
if (item.Nav_User != null && item.Nav_User.FILE_PATH != null) if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} />
else else
return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_User?.NAME} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} title={item.Nav_User?.NAME} />
} }
}) })
} }
@ -211,16 +211,16 @@ class FO019ShowPrint extends React.Component {
data.IS_OUTSOURCE == true && data.Nav_Person && data.Nav_Person.map((item, i) => { data.IS_OUTSOURCE == true && data.Nav_Person && data.Nav_Person.map((item, i) => {
if (item.DEAL_STATUS == 1) { if (item.DEAL_STATUS == 1) {
if (item.Nav_RelatedUser != null && item.Nav_RelatedUser.Nav_Signs[0] != null) if (item.Nav_RelatedUser != null && item.Nav_RelatedUser.Nav_Signs[0] != null)
return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_RelatedUser?.NAME} src={config.picServerHost + item.Nav_RelatedUser.Nav_Signs[0].Nav_ImgFile.FILE_PATH} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} alt={item.Nav_RelatedUser?.NAME} src={config.picServerHost + item.Nav_RelatedUser.Nav_Signs[0].Nav_ImgFile.FILE_PATH} />
else else
return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_RelatedUser?.NAME} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} title={item.Nav_RelatedUser?.NAME} />
} }
}) })
} }
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table>:null </table> : null
} }
</div> </div>
{ {

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule , setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -60,6 +60,7 @@ class FO021ShowPrint extends React.Component {
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_JobName.Nav_MonitorUser'); // extendInclude(json, 'Nav_JobName.Nav_MonitorUser');
// extendInclude(json, 'Nav_JobNameOut.Nav_MonitorUser'); // extendInclude(json, 'Nav_JobNameOut.Nav_MonitorUser');
@ -355,8 +356,7 @@ class FO021ShowPrint extends React.Component {
else else
return <img style={{ margin: "0 0 0 8px", width: '150px' }} title={item.Nav_User.NAME} /> return <img style={{ margin: "0 0 0 8px", width: '150px' }} title={item.Nav_User.NAME} />
} }
else if (item.DEAL_STATUS == 0) else if (item.DEAL_STATUS == 0) {
{
if (item.Nav_User != null && item.Nav_User.FILE_PATH != null) if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User.NAME}</label> return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User.NAME}</label>
else else

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule , setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -76,6 +76,7 @@ class FO022ShowPrint extends React.Component {
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_JobName.Nav_MonitorUser'); // extendInclude(json, 'Nav_JobName.Nav_MonitorUser');
// extendInclude(json, 'Nav_JobNameOut.Nav_MonitorUser'); // extendInclude(json, 'Nav_JobNameOut.Nav_MonitorUser');
@ -127,7 +128,7 @@ class FO022ShowPrint extends React.Component {
/> />
<Button style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >验收</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >验收</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay,color:'orange' }} onClick={() => this.onTableBtnAgree()} icon="check" >驳回</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay, color: 'orange' }} onClick={() => this.onTableBtnAgree()} icon="check" >驳回</Button>
</div> </div>

View File

@ -58,6 +58,7 @@ class FO025ShowPrint extends React.Component {
loadData = () => { loadData = () => {
let that = this; let that = this;
let json = initFilter(that.props.login.OrgId); let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, that.props.data.id); extendRule(json, 'ID', 1, that.props.data.id);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
// extendInclude(json, 'Nav_CrucialLicensePerson'); // extendInclude(json, 'Nav_CrucialLicensePerson');

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions, Modal,Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Modal, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, showFiles,GetFileModel,initQueryFilter,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, initQueryFilter, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -54,12 +54,13 @@ class FO035ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
this.props.dispatch({ this.props.dispatch({
@ -68,14 +69,13 @@ class FO035ShowPrint extends React.Component {
url: 'FO/FOTechDisclosureFromTech/GetEdit', url: 'FO/FOTechDisclosureFromTech/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
} }
@ -95,11 +95,11 @@ class FO035ShowPrint extends React.Component {
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
</div> </div>
@ -135,8 +135,8 @@ class FO035ShowPrint extends React.Component {
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item> <Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
<Descriptions.Item label="交底人签字">{ <Descriptions.Item label="交底人签字">{
(data.Nav_User && data.Nav_User.FILE_PATH)? (data.Nav_User && data.Nav_User.FILE_PATH) ?
showUserSign(data.Nav_User, config.picServerHost):null showUserSign(data.Nav_User, config.picServerHost) : null
// <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} /> // <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} />
// :data.Nav_User?.NAME // :data.Nav_User?.NAME
}</Descriptions.Item> }</Descriptions.Item>
@ -145,9 +145,9 @@ class FO035ShowPrint extends React.Component {
if (item.DEAL_STATUS == 1) { if (item.DEAL_STATUS == 1) {
// showUserSign(item.Nav_User, config.picServerHost) // showUserSign(item.Nav_User, config.picServerHost)
if (item.Nav_User != null && item.Nav_User.FILE_PATH != null) if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} />
else else
return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_User?.NAME} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} title={item.Nav_User?.NAME} />
} }
}) })
}</Descriptions.Item> }</Descriptions.Item>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions,Modal, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Modal, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, showFiles,GetFileModel,setDataFieldValue, guid, initQueryFilter,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, showFiles, GetFileModel, setDataFieldValue, guid, initQueryFilter, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -54,12 +54,13 @@ class FO037ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
this.props.dispatch({ this.props.dispatch({
@ -68,14 +69,13 @@ class FO037ShowPrint extends React.Component {
url: 'FO/FOTechDisclosureFromSafe/GetEdit', url: 'FO/FOTechDisclosureFromSafe/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
} }
@ -96,11 +96,11 @@ class FO037ShowPrint extends React.Component {
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.FORM_STATUS === 2 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
</div> </div>
@ -136,8 +136,8 @@ class FO037ShowPrint extends React.Component {
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item> <Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
<Descriptions.Item label="交底人签字">{ <Descriptions.Item label="交底人签字">{
(data.Nav_User && data.Nav_User.FILE_PATH)? (data.Nav_User && data.Nav_User.FILE_PATH) ?
showUserSign(data.Nav_User, config.picServerHost):null showUserSign(data.Nav_User, config.picServerHost) : null
// <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} /> // <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} />
// :data.Nav_User?.NAME // :data.Nav_User?.NAME
}</Descriptions.Item> }</Descriptions.Item>
@ -146,9 +146,9 @@ class FO037ShowPrint extends React.Component {
if (item.DEAL_STATUS == 1) { if (item.DEAL_STATUS == 1) {
// showUserSign(item.Nav_User, config.picServerHost) // showUserSign(item.Nav_User, config.picServerHost)
if (item.Nav_User != null && item.Nav_User.FILE_PATH != null) if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} />
else else
return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_User?.NAME} /> return <img style={{ margin: "0 0 0 15px", width: '150px' }} title={item.Nav_User?.NAME} />
} }
}) })
}</Descriptions.Item> }</Descriptions.Item>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -53,12 +53,13 @@ class FO041ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
this.props.dispatch({ this.props.dispatch({
@ -67,14 +68,13 @@ class FO041ShowPrint extends React.Component {
url: 'FO/FOLeaderWellRecord/GetEdit', url: 'FO/FOLeaderWellRecord/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
} }
@ -95,11 +95,11 @@ class FO041ShowPrint extends React.Component {
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.STATUS === 15?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.STATUS === 15 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.STATUS === 15?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.STATUS === 15 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
</div> </div>
@ -109,7 +109,7 @@ class FO041ShowPrint extends React.Component {
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
{ {
data? data ?
<div> <div>
<Descriptions size="middle" bordered className={styles.description}> <Descriptions size="middle" bordered className={styles.description}>
<Descriptions.Item label="公司">{data.Nav_Company?.NAME}</Descriptions.Item> <Descriptions.Item label="公司">{data.Nav_Company?.NAME}</Descriptions.Item>
@ -144,7 +144,7 @@ class FO041ShowPrint extends React.Component {
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
<Descriptions size="middle" bordered className={styles.description}> <Descriptions size="middle" bordered className={styles.description}>
<Descriptions.Item label="交班人签字">{ <Descriptions.Item label="交班人签字">{
data.Nav_Users && data.Nav_Users.map((item, i) => { data.Nav_Users && data.Nav_Users.map((item, i) => {
if (item.DEAL_STATUS == 1) { if (item.DEAL_STATUS == 1) {
@ -164,7 +164,7 @@ class FO041ShowPrint extends React.Component {
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
</Descriptions> </Descriptions>
{ {
data && data.Nav_Details? data && data.Nav_Details ?
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}> <table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody> <tbody>
@ -196,7 +196,7 @@ class FO041ShowPrint extends React.Component {
<td> <td>
{ {
item?.Nav_DetailAreas && item?.Nav_DetailAreas.map((item2, i) => { item?.Nav_DetailAreas && item?.Nav_DetailAreas.map((item2, i) => {
return item2?.Nav_Area?.NAME +';' return item2?.Nav_Area?.NAME + ';'
}) })
} }
</td> </td>
@ -216,7 +216,7 @@ class FO041ShowPrint extends React.Component {
{item.Nav_User?.NAME} {item.Nav_User?.NAME}
</td> </td>
<td> <td>
{item.USER_DEAL_STATUS == 1?showUserSign(item.Nav_User, config.picServerHost):null} {item.USER_DEAL_STATUS == 1 ? showUserSign(item.Nav_User, config.picServerHost) : null}
</td> </td>
<td> <td>
{item.ITEM} {item.ITEM}
@ -228,7 +228,7 @@ class FO041ShowPrint extends React.Component {
</table> : null </table> : null
} }
</div>:null </div> : null
} }
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -54,12 +54,13 @@ class FO043ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
this.props.dispatch({ this.props.dispatch({
@ -68,14 +69,13 @@ class FO043ShowPrint extends React.Component {
url: 'FO/FOFireJob/GetEdit', url: 'FO/FOFireJob/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -107,11 +107,11 @@ class FO043ShowPrint extends React.Component {
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button> <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.STATUS === 30?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.STATUS === 30?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button>
</div> </div>
@ -144,7 +144,7 @@ class FO043ShowPrint extends React.Component {
{/* <Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item> */} {/* <Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item> */}
<Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item> <Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item>
<Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item> <Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item>
<Descriptions.Item label="存在的风险">{ data.Nav_Risks && data.Nav_Risks.map((item, i) => { <Descriptions.Item label="存在的风险">{data.Nav_Risks && data.Nav_Risks.map((item, i) => {
return item.RISK_NAME + ' ' return item.RISK_NAME + ' '
})}</Descriptions.Item> })}</Descriptions.Item>
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
@ -152,7 +152,7 @@ class FO043ShowPrint extends React.Component {
{ {
data && data.Nav_Users? data && data.Nav_Users ?
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}> <table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody> <tbody>
@ -194,7 +194,7 @@ class FO043ShowPrint extends React.Component {
</table> : null </table> : null
} }
{ {
data && data.Nav_Details? data && data.Nav_Details ?
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}> <table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody> <tbody>
@ -202,8 +202,8 @@ class FO043ShowPrint extends React.Component {
<td width="100px" className={styles.fontBold}>序号</td> <td width="100px" className={styles.fontBold}>序号</td>
<td className={styles.fontBold}>作业阶段</td> <td className={styles.fontBold}>作业阶段</td>
<td className={styles.fontBold}>作业流程及安全措施</td> <td className={styles.fontBold}>作业流程及安全措施</td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}className={styles.fontBold}>是否确认</td> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }} className={styles.fontBold}>是否确认</td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}className={styles.fontBold}>附件</td> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }} className={styles.fontBold}>附件</td>
</tr> </tr>
{ {
data.Nav_Details && data.Nav_Details.map((item, i) => { data.Nav_Details && data.Nav_Details.map((item, i) => {
@ -217,11 +217,11 @@ class FO043ShowPrint extends React.Component {
<td> <td>
{item.CONTENT} {item.CONTENT}
</td> </td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }}>
{item.IS_CONFIRM_NEW ? "是" : "否"} {item.IS_CONFIRM_NEW ? "是" : "否"}
{/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */} {/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */}
</td> </td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }}>
{showFiles(item.Nav_DetailFiles, config.picServerHost, this)} {showFiles(item.Nav_DetailFiles, config.picServerHost, this)}
</td> </td>
@ -231,7 +231,7 @@ class FO043ShowPrint extends React.Component {
</tbody> </tbody>
</table> : null </table> : null
} }
<Descriptions size="middle" bordered className={styles.description} style={{display:data.STATUS == 30?'block':'none'}}> <Descriptions size="middle" bordered className={styles.description} style={{ display: data.STATUS == 30 ? 'block' : 'none' }}>
<Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item> <Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item>
<Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item> <Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item>
<Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item> <Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item>
@ -239,27 +239,27 @@ class FO043ShowPrint extends React.Component {
<Descriptions.Item label="矿调度室人员">{data.Nav_DispatchUser?.NAME}</Descriptions.Item> <Descriptions.Item label="矿调度室人员">{data.Nav_DispatchUser?.NAME}</Descriptions.Item>
<Descriptions.Item label="动火部门负责人签名">{ <Descriptions.Item label="动火部门负责人签名">{
data.USER_DEAL_STATUS == 1? data.USER_DEAL_STATUS == 1 ?
showUserSign(data.Nav_FireUser, config.picServerHost) showUserSign(data.Nav_FireUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="安全管理人员签名">{ <Descriptions.Item label="安全管理人员签名">{
data.SAFE_DEAL_STATUS == 1? data.SAFE_DEAL_STATUS == 1 ?
showUserSign(data.Nav_SafeUser, config.picServerHost) showUserSign(data.Nav_SafeUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="矿调度人员签名">{ <Descriptions.Item label="矿调度人员签名">{
data.DISPATCH_DEAL_STATUS == 1? data.DISPATCH_DEAL_STATUS == 1 ?
showUserSign(data.Nav_DispatchUser, config.picServerHost) showUserSign(data.Nav_DispatchUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
<Descriptions size="middle" bordered className={styles.description} style={{display:data.FIRE_STATUS > 15?'block':'none'}}> <Descriptions size="middle" bordered className={styles.description} style={{ display: data.FIRE_STATUS > 15 ? 'block' : 'none' }}>
<Descriptions.Item label="动火作业完工验收情况">{ <Descriptions.Item label="动火作业完工验收情况">{
data.COMPLETED_CONTENT data.COMPLETED_CONTENT
}</Descriptions.Item> }</Descriptions.Item>
@ -276,14 +276,14 @@ class FO043ShowPrint extends React.Component {
showFiles(data.Nav_MonitorFiles, config.picServerHost, this) showFiles(data.Nav_MonitorFiles, config.picServerHost, this)
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="动火部门负责人签字">{ <Descriptions.Item label="动火部门负责人签字">{
data.USER_DEAL_FINISH_STATUS == 1? data.USER_DEAL_FINISH_STATUS == 1 ?
showUserSign(data.Nav_FireUser, config.picServerHost) showUserSign(data.Nav_FireUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="安全生产管理人员签字">{ <Descriptions.Item label="安全生产管理人员签字">{
data.SAFE_DEAL_FINISH_STATUS == 1? data.SAFE_DEAL_FINISH_STATUS == 1 ?
showUserSign(data.Nav_SafeUser, config.picServerHost) showUserSign(data.Nav_SafeUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
@ -296,4 +296,4 @@ class FO043ShowPrint extends React.Component {
} }
} }
export default connect(({ login,app }) => ({ login,app }))(FO043ShowPrint) export default connect(({ login, app }) => ({ login, app }))(FO043ShowPrint)

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import styles from '../HI/StepForm.css'; import styles from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -54,12 +54,13 @@ class FO045ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
this.props.dispatch({ this.props.dispatch({
@ -68,14 +69,13 @@ class FO045ShowPrint extends React.Component {
url: 'FO/FOFireJobWb/GetEdit', url: 'FO/FOFireJobWb/GetEdit',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(this.props.data && this.props.data.loadDataDeal) if (this.props.data && this.props.data.loadDataDeal) {
{
this.props.data.loadDataDeal(1); this.props.data.loadDataDeal(1);
} }
this.setState({ data: ret }) this.setState({ data: ret })
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) { if (this.props.data.tableKey == "2" || this.props.data.tableKey == undefined) {
this.setState({ BtnAgreeDisplay: 'none' }) this.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
this.setState({ BtnAgreeDisplay: 'inline' }) this.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -107,11 +107,11 @@ class FO045ShowPrint extends React.Component {
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button> <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px' }} icon="export">审批详情</Button>
<ReactToPrint <ReactToPrint
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.STATUS === 30?"inline":"none" }}>打印</Button>} trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
pageStyle=".printDIV { padding:0 40px;} img{width :120px}" pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
/> />
<Button style={{ marginLeft: '8px',display: data && data.STATUS === 30?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button> <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button> <Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >审阅</Button>
</div> </div>
@ -146,7 +146,7 @@ class FO045ShowPrint extends React.Component {
<Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item> <Descriptions.Item label="作业监护人">{data.Nav_MonitorUser?.NAME}</Descriptions.Item>
<Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item> <Descriptions.Item label="动火计划开始时间">{data.JOB_DATE}</Descriptions.Item>
<Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item> <Descriptions.Item label="动火计划结束时间">{data.JOB_END_DATE}</Descriptions.Item>
<Descriptions.Item label="存在的风险">{ data.Nav_Risks && data.Nav_Risks.map((item, i) => { <Descriptions.Item label="存在的风险">{data.Nav_Risks && data.Nav_Risks.map((item, i) => {
return item.RISK_NAME + ' ' return item.RISK_NAME + ' '
})}</Descriptions.Item> })}</Descriptions.Item>
<Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="附件">{showFiles(data.Nav_Files, config.picServerHost, this)}</Descriptions.Item>
@ -154,7 +154,7 @@ class FO045ShowPrint extends React.Component {
{ {
data && data.Nav_Users? data && data.Nav_Users ?
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}> <table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody> <tbody>
@ -196,7 +196,7 @@ class FO045ShowPrint extends React.Component {
</table> : null </table> : null
} }
{ {
data && data.Nav_Details? data && data.Nav_Details ?
<table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}> <table style={{ width: '100%', textAlign: 'center', marginTop: '10px', borderTop: '1px solid #333', borderLeft: '1px solid #333' }} className={styles.PrintForm}>
<tbody> <tbody>
@ -204,8 +204,8 @@ class FO045ShowPrint extends React.Component {
<td width="100px" className={styles.fontBold}>序号</td> <td width="100px" className={styles.fontBold}>序号</td>
<td className={styles.fontBold}>作业阶段</td> <td className={styles.fontBold}>作业阶段</td>
<td className={styles.fontBold}>作业流程及安全措施</td> <td className={styles.fontBold}>作业流程及安全措施</td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}className={styles.fontBold}>是否确认</td> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }} className={styles.fontBold}>是否确认</td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}className={styles.fontBold}>附件</td> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }} className={styles.fontBold}>附件</td>
</tr> </tr>
{ {
data.Nav_Details && data.Nav_Details.map((item, i) => { data.Nav_Details && data.Nav_Details.map((item, i) => {
@ -219,11 +219,11 @@ class FO045ShowPrint extends React.Component {
<td> <td>
{item.CONTENT} {item.CONTENT}
</td> </td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }}>
{item.IS_CONFIRM_NEW ? "是" : "否"} {item.IS_CONFIRM_NEW ? "是" : "否"}
{/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */} {/* {enums.FOYesOrNoEnum.enums[item.IS_CONFIRM]} */}
</td> </td>
<td style={{display:data.STATUS == 30?'table-cell':'none'}}> <td style={{ display: data.STATUS == 30 ? 'table-cell' : 'none' }}>
{showFiles(item.Nav_DetailFiles, config.picServerHost, this)} {showFiles(item.Nav_DetailFiles, config.picServerHost, this)}
</td> </td>
@ -233,33 +233,33 @@ class FO045ShowPrint extends React.Component {
</tbody> </tbody>
</table> : null </table> : null
} }
<Descriptions size="middle" bordered className={styles.description}style={{display:data.STATUS == 30?'block':'none'}}> <Descriptions size="middle" bordered className={styles.description} style={{ display: data.STATUS == 30 ? 'block' : 'none' }}>
<Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item> <Descriptions.Item label="动火作业现场条件验收情况">{data.COMPLETED_CONDITION}</Descriptions.Item>
<Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item> <Descriptions.Item label="是否可以动火">{enums.FOYesOrNoEnum.enums[data.IS_FIRE]}</Descriptions.Item>
<Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item> <Descriptions.Item label="动火实际开始时间">{data.ACT_DATE}</Descriptions.Item>
<Descriptions.Item label="现场条件验收附件"> {showFiles(data.Nav_FireFiles, config.picServerHost, this)}</Descriptions.Item> <Descriptions.Item label="现场条件验收附件"> {showFiles(data.Nav_FireFiles, config.picServerHost, this)}</Descriptions.Item>
<Descriptions.Item label="矿调度室人员">{data.Nav_DispatchUser?.NAME}</Descriptions.Item> <Descriptions.Item label="矿调度室人员">{data.Nav_DispatchUser?.NAME}</Descriptions.Item>
<Descriptions.Item label="动火部门负责人签名">{ <Descriptions.Item label="动火部门负责人签名">{
data.USER_DEAL_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile? data.USER_DEAL_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile ?
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} /> <img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} />
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="安全管理人员签名">{ <Descriptions.Item label="安全管理人员签名">{
data.SAFE_DEAL_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile? data.SAFE_DEAL_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile ?
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} /> <img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} />
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="矿调度人员签名">{ <Descriptions.Item label="矿调度人员签名">{
data.DISPATCH_DEAL_STATUS == 1? data.DISPATCH_DEAL_STATUS == 1 ?
showUserSign(data.Nav_DispatchUser, config.picServerHost) showUserSign(data.Nav_DispatchUser, config.picServerHost)
:null : null
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
<Descriptions size="middle" bordered className={styles.description} style={{display:data.FIRE_STATUS >= 10?'block':'none'}}> <Descriptions size="middle" bordered className={styles.description} style={{ display: data.FIRE_STATUS >= 10 ? 'block' : 'none' }}>
<Descriptions.Item label="动火作业完工验收情况">{ <Descriptions.Item label="动火作业完工验收情况">{
data.COMPLETED_CONTENT data.COMPLETED_CONTENT
}</Descriptions.Item> }</Descriptions.Item>
@ -276,14 +276,14 @@ class FO045ShowPrint extends React.Component {
showFiles(data.Nav_MonitorFiles, config.picServerHost, this) showFiles(data.Nav_MonitorFiles, config.picServerHost, this)
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="动火部门负责人签字">{ <Descriptions.Item label="动火部门负责人签字">{
data.USER_DEAL_FINISH_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile? data.USER_DEAL_FINISH_STATUS == 1 && data.Nav_FireUser[0] && data.Nav_FireUser[0].Nav_ImgFile ?
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} /> <img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_FireUser[0].Nav_ImgFile.FILE_PATH} />
:null : null
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="安全生产管理人员签字">{ <Descriptions.Item label="安全生产管理人员签字">{
data.SAFE_DEAL_FINISH_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile? data.SAFE_DEAL_FINISH_STATUS == 1 && data.Nav_SafeUser[0] && data.Nav_SafeUser[0].Nav_ImgFile ?
<img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} /> <img style={{ margin: "0 0 0 15px", width: '150px' }} src={config.picServerHost + data.Nav_SafeUser[0].Nav_ImgFile.FILE_PATH} />
:null : null
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
@ -295,4 +295,4 @@ class FO045ShowPrint extends React.Component {
} }
} }
export default connect(({ login,app }) => ({ login,app }))(FO045ShowPrint) export default connect(({ login, app }) => ({ login, app }))(FO045ShowPrint)

View File

@ -63,6 +63,7 @@ class FOChangeShfitRecord extends React.Component {
loadData = (dataId) => { loadData = (dataId) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Class'); extendInclude(json, 'Nav_Class');
extendInclude(json, 'Nav_Team'); extendInclude(json, 'Nav_Team');

View File

@ -99,6 +99,7 @@ class FoTeamActivityShowPrint extends React.Component {
var orgId = this.props.login ? this.props.login.OrgId : ''; //登录后有存储登录信息 var orgId = this.props.login ? this.props.login.OrgId : ''; //登录后有存储登录信息
let json = initFilter(orgId); let json = initFilter(orgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, id); //ID=‘’,字段,等于,条件值, 1代表=2代表不等于3小于4小于等于5大于6大于等于7以开始的Like,8以结束的Like9包含 extendRule(json, 'ID', 1, id); //ID=‘’,字段,等于,条件值, 1代表=2代表不等于3小于4小于等于5大于6大于等于7以开始的Like,8以结束的Like9包含
extendInclude(json, 'Nav_Taem'); extendInclude(json, 'Nav_Taem');
extendInclude(json, 'Nav_User'); extendInclude(json, 'Nav_User');

View File

@ -36,6 +36,7 @@ class HM040ShowPrint extends React.Component {
loadData = (id) => { loadData = (id) => {
var orgId = this.props.login ? this.props.login.OrgId : ''; //登录后有存储登录信息 var orgId = this.props.login ? this.props.login.OrgId : ''; //登录后有存储登录信息
let json = initFilter(orgId); let json = initFilter(orgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, id); //ID=‘’,字段,等于,条件值, 1代表=2代表不等于3小于4小于等于5大于6大于等于7以开始的Like,8以结束的Like9包含 extendRule(json, 'ID', 1, id); //ID=‘’,字段,等于,条件值, 1代表=2代表不等于3小于4小于等于5大于6大于等于7以开始的Like,8以结束的Like9包含
// extendInclude(json, 'Nav_OperationStep'); // extendInclude(json, 'Nav_OperationStep');
// extendInclude(json, 'Nav_EvaluateRisk.Nav_EvaluateRiskWorkduty.Nav_Post'); // extendInclude(json, 'Nav_EvaluateRisk.Nav_EvaluateRiskWorkduty.Nav_Post');
@ -56,7 +57,7 @@ class HM040ShowPrint extends React.Component {
//渲染页面 //渲染页面
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.app.enums; const enums = this.props.app.enums;
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
<table> <table>
@ -69,7 +70,7 @@ class HM040ShowPrint extends React.Component {
<div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.id}> <div ref={el => (this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>作业任务库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>作业任务库</h1>
{ {
data ? <div style={{ width: '95%'}}> data ? <div style={{ width: '95%' }}>
{/* <table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }}> {/* <table style={{ width: '100%', textAlign: 'center', borderTop: '1px solid #333', borderLeft: '1px solid #333' }}>
<tr> <tr>
<td colSpan={5} rowSpan={1}>通知名称</td> <td colSpan={5} rowSpan={1}>通知名称</td>
@ -79,7 +80,7 @@ class HM040ShowPrint extends React.Component {
<Descriptions title="" size="middle" bordered> <Descriptions title="" size="middle" bordered>
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item> <Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
{/* <Descriptions.Item label="名称">{data.NAME}</Descriptions.Item> */} {/* <Descriptions.Item label="名称">{data.NAME}</Descriptions.Item> */}
<Descriptions.Item label="作业环节">{data.Nav_OperationStep ?data.Nav_OperationStep.NAME: ''}</Descriptions.Item> <Descriptions.Item label="作业环节">{data.Nav_OperationStep ? data.Nav_OperationStep.NAME : ''}</Descriptions.Item>
{/* <Descriptions.Item label="/"> {/* <Descriptions.Item label="/">
{ {
data.Nav_OperationLinkEvaluateRisk && data.Nav_OperationLinkEvaluateRisk.map((item, i) => { data.Nav_OperationLinkEvaluateRisk && data.Nav_OperationLinkEvaluateRisk.map((item, i) => {
@ -107,18 +108,18 @@ class HM040ShowPrint extends React.Component {
<Descriptions.Item label="作业前安全确认"> <Descriptions.Item label="作业前安全确认">
{ {
data.Nav_SafeConfirms && data.Nav_SafeConfirms.map((item, i) => { data.Nav_SafeConfirms && data.Nav_SafeConfirms.map((item, i) => {
return <tr><label> {(i+1)+"."+item.NAME}</label></tr> return <tr><label> {(i + 1) + "." + item.NAME}</label></tr>
}) })
} }
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="作业流程及安全措施">{ <Descriptions.Item label="作业流程及安全措施">{
data.Nav_SafeMeasures && data.Nav_SafeMeasures.map((item, i) => { data.Nav_SafeMeasures && data.Nav_SafeMeasures.map((item, i) => {
return <tr><label> {(i+1)+"."+item.NAME}</label></tr> return <tr><label> {(i + 1) + "." + item.NAME}</label></tr>
}) })
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="作业后处理措施">{ <Descriptions.Item label="作业后处理措施">{
data.Nav_DealMeasures && data.Nav_DealMeasures.map((item, i) => { data.Nav_DealMeasures && data.Nav_DealMeasures.map((item, i) => {
return <tr><label> {(i+1)+"."+item.NAME}</label></tr> return <tr><label> {(i + 1) + "." + item.NAME}</label></tr>
}) })
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="添加时间">{data.CREATE_TIME}</Descriptions.Item> <Descriptions.Item label="添加时间">{data.CREATE_TIME}</Descriptions.Item>
@ -131,4 +132,4 @@ class HM040ShowPrint extends React.Component {
</div> </div>
} }
} }
export default connect(({ login,app }) => ({ login,app }))(HM040ShowPrint) export default connect(({ login, app }) => ({ login, app }))(HM040ShowPrint)

View File

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

View File

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

View File

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

View File

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

View File

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

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -23,12 +23,13 @@ class SK002ShowSummary extends React.Component {
this.loadData(); this.loadData();
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = () => { loadData = () => {
let json = initFilter(this.props.login.OrgId,"","",1,1); let json = initFilter(this.props.login.OrgId, "", "", 1, 1);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendInclude(json, 'Nav_Type'); extendInclude(json, 'Nav_Type');
extendInclude(json, 'Nav_Area'); extendInclude(json, 'Nav_Area');
extendInclude(json, 'Nav_Details'); extendInclude(json, 'Nav_Details');
@ -45,7 +46,7 @@ class SK002ShowSummary extends React.Component {
onComplete: (ret) => { onComplete: (ret) => {
if (ret && ret.Data) { if (ret && ret.Data) {
this.setState({ this.setState({
data : ret.Data data: ret.Data
}); });
} }
}, },
@ -53,7 +54,7 @@ class SK002ShowSummary extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
@ -62,13 +63,13 @@ class SK002ShowSummary extends React.Component {
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: "inline"}} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: "inline" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
@ -77,7 +78,7 @@ class SK002ShowSummary extends React.Component {
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制基础库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制基础库</h1>
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>生产单元</td> <td className={stylesStep.fontBold}>生产单元</td>
@ -101,10 +102,10 @@ class SK002ShowSummary extends React.Component {
<td className={stylesStep.fontBold}>整改措施</td> <td className={stylesStep.fontBold}>整改措施</td>
</tr> </tr>
{ {
data && data.map((item,i)=>{ data && data.map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{item.Nav_ProductionUnit?.NAME} {item.Nav_ProductionUnit?.NAME}
@ -140,14 +141,14 @@ class SK002ShowSummary extends React.Component {
{item.EMERGENCY} {item.EMERGENCY}
</td> </td>
<td> <td>
{ item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => { {item.DEPARTMENT_TYPE && item.DEPARTMENT_TYPE.split("_").map((item2, i) => {
if (item2) { if (item2) {
return <label> {enums.SKDepartmentTypeEnum.enums[item2]}</label> return <label> {enums.SKDepartmentTypeEnum.enums[item2]}</label>
} }
})} })}
</td> </td>
<td> <td>
{ item.MEASURE} {item.MEASURE}
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => { {/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
if (item2) { if (item2) {
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label> return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
@ -155,7 +156,7 @@ class SK002ShowSummary extends React.Component {
})} */} })} */}
</td> </td>
<td> <td>
{ item.CHECKCONTENTS} {item.CHECKCONTENTS}
</td> </td>
{/* <td> {/* <td>
{item.CHECKBASICS } {item.CHECKBASICS }
@ -164,18 +165,18 @@ class SK002ShowSummary extends React.Component {
{ item.CHECKSTANDARDS } { item.CHECKSTANDARDS }
</td> */} </td> */}
<td> <td>
{ item.HIDDENSCRIPTION } {item.HIDDENSCRIPTION}
</td> </td>
<td> <td>
{ item.HIDDENLEVEL } {item.HIDDENLEVEL}
</td> </td>
<td> <td>
{item.RECIFYMEASURE } {item.RECIFYMEASURE}
</td> </td>
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{/* <FormPage {...this.state.tmpData} /> */} {/* <FormPage {...this.state.tmpData} /> */}
</div> </div>
@ -184,4 +185,4 @@ class SK002ShowSummary extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK002ShowSummary) export default connect(({ login, app }) => ({ login, app }))(SK002ShowSummary)

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

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

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

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -16,14 +16,14 @@ class SK004ShowPrint extends React.Component {
data: null, data: null,
BtnAgreeDisplay: 'none', BtnAgreeDisplay: 'none',
tmpData: {}, tmpData: {},
showDetail:false, showDetail: false,
showDetailContent: false, showDetailContent: false,
Details:{}, Details: {},
columns:[], columns: [],
DetailContents:{}, DetailContents: {},
columnContents:[], columnContents: [],
DetailPosts:{}, DetailPosts: {},
columnPosts:[] columnPosts: []
}; };
}; };
@ -78,8 +78,7 @@ class SK004ShowPrint extends React.Component {
title: "检查层级", title: "检查层级",
dataIndex: "CHECK_TYPE", dataIndex: "CHECK_TYPE",
key: "CHECK_TYPE", key: "CHECK_TYPE",
render: (text, record) => render: (text, record) => {
{
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label> return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
} }
}, },
@ -92,11 +91,10 @@ class SK004ShowPrint extends React.Component {
title: "检查岗位", title: "检查岗位",
dataIndex: "Nav_DetailPosts", dataIndex: "Nav_DetailPosts",
key: "Nav_DetailPosts", key: "Nav_DetailPosts",
render: (text, record) => render: (text, record) => {
{
return <label>{ return <label>{
record.Nav_DetailPosts && record.Nav_DetailPosts.map((item, i) => { record.Nav_DetailPosts && record.Nav_DetailPosts.map((item, i) => {
return item.Nav_Post.NAME+' ' return item.Nav_Post.NAME + ' '
}) })
}</label> }</label>
} }
@ -110,8 +108,7 @@ class SK004ShowPrint extends React.Component {
title: "检查周期", title: "检查周期",
dataIndex: "CHECK_CYCLE", dataIndex: "CHECK_CYCLE",
key: "CHECK_CYCLE", key: "CHECK_CYCLE",
render: (text, record) => render: (text, record) => {
{
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label> return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
} }
}, },
@ -154,13 +151,14 @@ class SK004ShowPrint extends React.Component {
} }
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let that=this; let that = this;
let json = initFilter(that.props.login.OrgId); let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_Type'); // extendInclude(json, 'Nav_Type');
// extendInclude(json, 'Nav_Area'); // extendInclude(json, 'Nav_Area');
@ -187,14 +185,13 @@ class SK004ShowPrint extends React.Component {
url: 'SK/SKEnterpriseLibrary/SKGet', url: 'SK/SKEnterpriseLibrary/SKGet',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(that.props.data && that.props.data.loadDataDeal) if (that.props.data && that.props.data.loadDataDeal) {
{
that.props.data.loadDataDeal(1); that.props.data.loadDataDeal(1);
} }
that.setState({ data: ret }); that.setState({ data: ret });
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
that.setState({ BtnAgreeDisplay: 'none' }) that.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
that.setState({ BtnAgreeDisplay: 'inline' }) that.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -208,16 +205,16 @@ class SK004ShowPrint extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx") XLSX.writeFile(wb, "双控企业库.xlsx")
} }
onClickApprove=(appVisible)=>{ onClickApprove = (appVisible) => {
const newtmpData = { const newtmpData = {
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'}, data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123", formCode: "PF123",
} }
this.setState({ this.setState({
@ -227,19 +224,19 @@ class SK004ShowPrint extends React.Component {
showModalContent = (item) => { showModalContent = (item) => {
this.setState({ this.setState({
showDetailContent: true, showDetailContent: true,
},()=>{ }, () => {
this.setState({ this.setState({
DetailContents:item.Nav_DetailContents DetailContents: item.Nav_DetailContents
}); });
}); });
}; };
showModal = (item) => { showModal = (item) => {
this.setState({ this.setState({
showDetail: true, showDetail: true,
},()=>{ }, () => {
this.setState({ this.setState({
Details:item.Nav_DetailHiddens, Details: item.Nav_DetailHiddens,
DetailPosts:item.Nav_DetailDeparts DetailPosts: item.Nav_DetailDeparts
}); });
}); });
}; };
@ -265,7 +262,7 @@ class SK004ShowPrint extends React.Component {
}; };
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<Modal <Modal
@ -316,10 +313,10 @@ class SK004ShowPrint extends React.Component {
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
</div> </div>
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> <div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -328,22 +325,22 @@ class SK004ShowPrint extends React.Component {
<div> <div>
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item> <Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item> <Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险评价L"> {data.Nav_SCOREL? data.Nav_SCOREL?.SCORE : 0}</Descriptions.Item> <Descriptions.Item label="风险评价L"> {data.Nav_SCOREL ? data.Nav_SCOREL?.SCORE : 0}</Descriptions.Item>
<Descriptions.Item label="风险评价E"> {data.Nav_SCOREE? data.Nav_SCOREE?.SCORE : 0}</Descriptions.Item> <Descriptions.Item label="风险评价E"> {data.Nav_SCOREE ? data.Nav_SCOREE?.SCORE : 0}</Descriptions.Item>
<Descriptions.Item label="风险评价C"> {data.Nav_SCOREC? data.Nav_SCOREC?.SCORE : 0}</Descriptions.Item> <Descriptions.Item label="风险评价C"> {data.Nav_SCOREC ? data.Nav_SCOREC?.SCORE : 0}</Descriptions.Item>
<Descriptions.Item label="分值D">{data.EVALUATE_SCORE}</Descriptions.Item> <Descriptions.Item label="分值D">{data.EVALUATE_SCORE}</Descriptions.Item>
<Descriptions.Item label="风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item> <Descriptions.Item label="风险等级">{enums.SKEvaluateLevelEnum.enums[data.EVALUATE_LEVEL]}</Descriptions.Item>
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item> <Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item> <Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
</Descriptions> </Descriptions>
</div>:null </div> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控层级</td> <td className={stylesStep.fontBold}>管控层级</td>
@ -351,10 +348,10 @@ class SK004ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>管控责任人</td> <td className={stylesStep.fontBold}>管控责任人</td>
</tr> </tr>
{ {
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item,i)=>{ data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]} {enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
@ -368,10 +365,10 @@ class SK004ShowPrint extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控措施</td> <td className={stylesStep.fontBold}>管控措施</td>
@ -379,7 +376,7 @@ class SK004ShowPrint extends React.Component {
<td className={stylesStep.fontBold}>查看</td> <td className={stylesStep.fontBold}>查看</td>
</tr> </tr>
{ {
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item,i)=>{ data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item, i) => {
return <tr> return <tr>
<td> <td>
{item.NUM} {item.NUM}
@ -394,20 +391,20 @@ class SK004ShowPrint extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>辨识部门</td> <td className={stylesStep.fontBold}>辨识部门</td>
<td className={stylesStep.fontBold}>辨识岗位</td> <td className={stylesStep.fontBold}>辨识岗位</td>
</tr> </tr>
{ {
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{ data.Nav_Posts && data.Nav_Posts.map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{item.Nav_Department?.NAME} {item.Nav_Department?.NAME}
@ -423,7 +420,7 @@ class SK004ShowPrint extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
<FormPage {...this.state.tmpData} /> <FormPage {...this.state.tmpData} />
</div> </div>
@ -432,4 +429,4 @@ class SK004ShowPrint extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK004ShowPrint) export default connect(({ login, app }) => ({ login, app }))(SK004ShowPrint)

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -23,12 +23,13 @@ class SK004ShowSummary extends React.Component {
this.loadData(); this.loadData();
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = () => { loadData = () => {
let json = initFilter(this.props.login.OrgId,"","",1,1); let json = initFilter(this.props.login.OrgId, "", "", 1, 1);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendInclude(json, 'Nav_Type'); extendInclude(json, 'Nav_Type');
extendInclude(json, 'Nav_Area'); extendInclude(json, 'Nav_Area');
extendInclude(json, 'Nav_Details'); extendInclude(json, 'Nav_Details');
@ -50,7 +51,7 @@ class SK004ShowSummary extends React.Component {
onComplete: (ret) => { onComplete: (ret) => {
if (ret && ret.Data) { if (ret && ret.Data) {
this.setState({ this.setState({
data : ret.Data data: ret.Data
}); });
} }
}, },
@ -58,7 +59,7 @@ class SK004ShowSummary extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
@ -67,13 +68,13 @@ class SK004ShowSummary extends React.Component {
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: "inline"}} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: "inline" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: "inline" }}>导出</Button>
@ -82,7 +83,7 @@ class SK004ShowSummary extends React.Component {
<h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制企业库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双重预防机制企业库</h1>
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='60px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>生产单元</td> <td className={stylesStep.fontBold}>生产单元</td>
@ -113,10 +114,10 @@ class SK004ShowSummary extends React.Component {
</tr> </tr>
{ {
data && data.map((item,i)=>{ data && data.map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{item.Nav_ProductionUnit?.NAME} {item.Nav_ProductionUnit?.NAME}
@ -159,7 +160,7 @@ class SK004ShowSummary extends React.Component {
{item.CONTROLUSER} {item.CONTROLUSER}
</td> </td>
<td> <td>
{ item.MEASURE} {item.MEASURE}
{/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => { {/* { item.Nav_Details && item.Nav_Details?.map((item2, i) => {
if (item2) { if (item2) {
return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label> return <label> {(i+1)+"、"+item2.MEASURES_NAME}<br></br></label>
@ -170,16 +171,16 @@ class SK004ShowSummary extends React.Component {
{item.EMERGENCY} {item.EMERGENCY}
</td> </td>
<td> <td>
{ item.CHECKCONTENTS} {item.CHECKCONTENTS}
</td> </td>
<td> <td>
{ item.HIDDENSCRIPTION } {item.HIDDENSCRIPTION}
</td> </td>
{/* <td> {/* <td>
{ item.HIDDENLEVEL } { item.HIDDENLEVEL }
</td> */} </td> */}
<td> <td>
{item.RECIFYMEASURE } {item.RECIFYMEASURE}
</td> </td>
{/* <td> {/* <td>
{item.CHECKBASICS } {item.CHECKBASICS }
@ -188,7 +189,7 @@ class SK004ShowSummary extends React.Component {
{ item.CHECKSTANDARDS } { item.CHECKSTANDARDS }
</td> */} </td> */}
<td> <td>
{ item.CHECKLEVEL } {item.CHECKLEVEL}
</td> </td>
{/* <td> {/* <td>
{ item.CHECKDEPT } { item.CHECKDEPT }
@ -197,12 +198,12 @@ class SK004ShowSummary extends React.Component {
{item.CHECKPOST } {item.CHECKPOST }
</td> */} </td> */}
<td> <td>
{ item.CHECKTYPE } {item.CHECKTYPE}
</td> </td>
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{/* <FormPage {...this.state.tmpData} /> */} {/* <FormPage {...this.state.tmpData} /> */}
</div> </div>
@ -211,4 +212,4 @@ class SK004ShowSummary extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK004ShowSummary) export default connect(({ login, app }) => ({ login, app }))(SK004ShowSummary)

View File

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

View File

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

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel,showUserSign } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel, showUserSign } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import config from "../../../config"; import config from "../../../config";
import XLSX from 'xlsx'; import XLSX from 'xlsx';
@ -60,6 +60,7 @@ class SK014ShowPrint extends React.Component {
loadData = (dataId, taskID) => { loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID); extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
@ -203,7 +204,7 @@ class SK014ShowPrint extends React.Component {
</td> </td>
<td> <td>
{ {
item.ISCHECK? <a style={{ color: "rgba(0, 0, 0, 0.65)" }}>{item.Nav_RecitifyUser?.NAME}</a>: item.ISCHECK ? <a style={{ color: "rgba(0, 0, 0, 0.65)" }}>{item.Nav_RecitifyUser?.NAME}</a> :
<a style={{ color: "red" }}>{item.Nav_RecitifyUser?.NAME}</a> <a style={{ color: "red" }}>{item.Nav_RecitifyUser?.NAME}</a>
} }
{/* { {/* {
@ -230,13 +231,13 @@ class SK014ShowPrint extends React.Component {
<Descriptions size="middle" bordered> <Descriptions size="middle" bordered>
<Descriptions.Item label="整改责任人签名">{ <Descriptions.Item label="整改责任人签名">{
data.Nav_ReportDetails?.map((item, i) => { data.Nav_ReportDetails?.map((item, i) => {
if (item && item.ISCHECK ) { if (item && item.ISCHECK) {
showUserSign(item.Nav_RecitifyUser, config.picServerHost) showUserSign(item.Nav_RecitifyUser, config.picServerHost)
} }
}) })
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
</div>:null </div> : null
} }
<FormPage {...this.state.tmpData} /> <FormPage {...this.state.tmpData} />
</div> </div>

View File

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

View File

@ -57,6 +57,7 @@ class SK018ShowPrint extends React.Component {
} }
loadData = (dataId, taskID) => { loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID); // extendRule(json, 'TASK_ID', 1, taskID);
extendInclude(json, 'Nav_Report'); extendInclude(json, 'Nav_Report');
@ -176,7 +177,7 @@ class SK018ShowPrint extends React.Component {
{/* <Descriptions.Item label="">{enums.FMDepartmentType.enums[data.DEPARTMENT_TYPE]}</Descriptions.Item> {/* <Descriptions.Item label="">{enums.FMDepartmentType.enums[data.DEPARTMENT_TYPE]}</Descriptions.Item>
<Descriptions.Item label="检查类型">{data.Nav_CheckType ? data.Nav_CheckType.NAME : ''}</Descriptions.Item> <Descriptions.Item label="检查类型">{data.Nav_CheckType ? data.Nav_CheckType.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="检查周期">{enums.BSPLANCHECKFREQUENCYEnum.enums[data.PLANCHECKFREQUENCY]}</Descriptions.Item> */} <Descriptions.Item label="检查周期">{enums.BSPLANCHECKFREQUENCYEnum.enums[data.PLANCHECKFREQUENCY]}</Descriptions.Item> */}
<Descriptions.Item label="整改责任人">{ data.STATUS == 30 && data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ? <Descriptions.Item label="整改责任人">{data.STATUS == 30 && data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
showUserSign(data.Nav_RecitifyUser, config.picServerHost) showUserSign(data.Nav_RecitifyUser, config.picServerHost)
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''}</Descriptions.Item> : data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item> <Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>

View File

@ -60,6 +60,7 @@ class SK020ShowPrint extends React.Component {
loadData = (dataId, taskID) => { loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendRule(json, 'TASK_ID', 1, taskID); extendRule(json, 'TASK_ID', 1, taskID);
extendIgnoreDataRule(json) extendIgnoreDataRule(json)
@ -179,7 +180,7 @@ class SK020ShowPrint extends React.Component {
</td> */} </td> */}
<td> <td>
{ {
item.Nav_Question?.DESCREPTION?item.Nav_Question.DESCREPTION:item.HIDDEN_DESCRIPTION item.Nav_Question?.DESCREPTION ? item.Nav_Question.DESCREPTION : item.HIDDEN_DESCRIPTION
} }
</td> </td>
<td> <td>

View File

@ -1,7 +1,7 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles,showUserSign,showFileImg, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, showUserSign, showFileImg, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import config from "../../../config"; import config from "../../../config";
import XLSX from 'xlsx'; import XLSX from 'xlsx';
@ -57,6 +57,7 @@ class SK022ShowPrint extends React.Component {
} }
loadData = (dataId, taskID) => { loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID); // extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser'); // extendInclude(json, 'Nav_ApplyUser');
@ -147,7 +148,7 @@ class SK022ShowPrint extends React.Component {
// return <tr><label> {item2.Nav_User?.NAME}</label></tr> // return <tr><label> {item2.Nav_User?.NAME}</label></tr>
}) })
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="隐患描述">{data.Nav_Question?.DESCREPTION?data.Nav_Question.DESCREPTION:data.HIDDEN_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="隐患描述">{data.Nav_Question?.DESCREPTION ? data.Nav_Question.DESCREPTION : data.HIDDEN_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="隐患等级">{enums.SKHiddenLevel.enums[data.HIDDEN_LEVEL]}</Descriptions.Item> <Descriptions.Item label="隐患等级">{enums.SKHiddenLevel.enums[data.HIDDEN_LEVEL]}</Descriptions.Item>
<Descriptions.Item label="整改措施">{data.RECTIFICATION_MEASURES}</Descriptions.Item> <Descriptions.Item label="整改措施">{data.RECTIFICATION_MEASURES}</Descriptions.Item>
<Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item> <Descriptions.Item label="整改期限">{moment(data.RECITIFY_TIME).format('YYYY-MM-DD')}</Descriptions.Item>
@ -161,7 +162,7 @@ class SK022ShowPrint extends React.Component {
<Descriptions.Item label="整改验收人">{data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''}</Descriptions.Item> <Descriptions.Item label="整改验收人">{data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="整改情况描述">{data.RECTIFICATION_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="整改情况描述">{data.RECTIFICATION_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="整改资金(元)">{data.RECTIFICATION_MONEY}</Descriptions.Item> <Descriptions.Item label="整改资金(元)">{data.RECTIFICATION_MONEY}</Descriptions.Item>
<Descriptions.Item label="整改完成时间">{data.COMPLETE_DATE?moment(data.COMPLETE_DATE).format('YYYY-MM-DD'):null}</Descriptions.Item> <Descriptions.Item label="整改完成时间">{data.COMPLETE_DATE ? moment(data.COMPLETE_DATE).format('YYYY-MM-DD') : null}</Descriptions.Item>
<Descriptions.Item label="整改前照片">{ <Descriptions.Item label="整改前照片">{
showFileImg(data?.Nav_RectifyPhotoas, config.picServerHost, this) showFileImg(data?.Nav_RectifyPhotoas, config.picServerHost, this)
}</Descriptions.Item> }</Descriptions.Item>
@ -171,16 +172,16 @@ class SK022ShowPrint extends React.Component {
<Descriptions.Item label="预案或方案">{ <Descriptions.Item label="预案或方案">{
showFiles(data?.Nav_RectifyFiles, config.picServerHost, this) showFiles(data?.Nav_RectifyFiles, config.picServerHost, this)
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收时间">{data.ACCEPT_DATE?moment(data.ACCEPT_DATE).format('YYYY-MM-DD'):null}</Descriptions.Item> <Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收时间">{data.ACCEPT_DATE ? moment(data.ACCEPT_DATE).format('YYYY-MM-DD') : null}</Descriptions.Item>
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收结论">{enums.SKAcceptResultEnum.enums[data.ACCEPT_RESULTE]}</Descriptions.Item> <Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收结论">{enums.SKAcceptResultEnum.enums[data.ACCEPT_RESULTE]}</Descriptions.Item>
<Descriptions.Item style={{display:(data.STATUS ==20 ||data.STATUS==30)?"inline":"none"}} label="验收意见">{data.ACCEPT_OPINION}</Descriptions.Item> <Descriptions.Item style={{ display: (data.STATUS == 20 || data.STATUS == 30) ? "inline" : "none" }} label="验收意见">{data.ACCEPT_OPINION}</Descriptions.Item>
<Descriptions.Item label="整改责任人签名">{ <Descriptions.Item label="整改责任人签名">{
data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ? data.Nav_RecitifyUser && data.Nav_RecitifyUser.FILE_PATH ?
showUserSign(data.Nav_RecitifyUser, config.picServerHost) showUserSign(data.Nav_RecitifyUser, config.picServerHost)
: data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : '' : data.Nav_RecitifyUser ? data.Nav_RecitifyUser.NAME : ''
}</Descriptions.Item> }</Descriptions.Item>
<Descriptions.Item label="验收人签名">{ <Descriptions.Item label="验收人签名">{
(data.STATUS == 20 ||data.STATUS == 30)&& data.Nav_AcceptUser && data.Nav_AcceptUser.FILE_PATH ? (data.STATUS == 20 || data.STATUS == 30) && data.Nav_AcceptUser && data.Nav_AcceptUser.FILE_PATH ?
showUserSign(data.Nav_RecitifyUser, config.picServerHost) showUserSign(data.Nav_RecitifyUser, config.picServerHost)
: data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : '' : data.Nav_AcceptUser ? data.Nav_AcceptUser.NAME : ''
}</Descriptions.Item> }</Descriptions.Item>

View File

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

View File

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

View File

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

View File

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

View File

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

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -16,14 +16,14 @@ class SK035CheckLibrary extends React.Component {
data: null, data: null,
BtnAgreeDisplay: 'none', BtnAgreeDisplay: 'none',
tmpData: {}, tmpData: {},
showDetail:false, showDetail: false,
showDetailContent: false, showDetailContent: false,
Details:{}, Details: {},
columns:[], columns: [],
DetailContents:{}, DetailContents: {},
columnContents:[], columnContents: [],
DetailPosts:{}, DetailPosts: {},
columnPosts:[] columnPosts: []
}; };
}; };
@ -70,8 +70,7 @@ class SK035CheckLibrary extends React.Component {
title: "检查层级", title: "检查层级",
dataIndex: "CHECK_TYPE", dataIndex: "CHECK_TYPE",
key: "CHECK_TYPE", key: "CHECK_TYPE",
render: (text, record) => render: (text, record) => {
{
return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label> return <label>{this.props.app.enums.SKDepartmentTypeEnum.enums[record.CHECK_TYPE]}</label>
} }
}, },
@ -102,8 +101,7 @@ class SK035CheckLibrary extends React.Component {
title: "检查周期", title: "检查周期",
dataIndex: "CHECK_CYCLE", dataIndex: "CHECK_CYCLE",
key: "CHECK_CYCLE", key: "CHECK_CYCLE",
render: (text, record) => render: (text, record) => {
{
return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label> return <label>{this.props.app.enums.SKPLANCHECKFREQUENCYEnum.enums[record.CHECK_CYCLE]}</label>
} }
}, },
@ -146,13 +144,14 @@ class SK035CheckLibrary extends React.Component {
} }
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let that=this; let that = this;
let jsonTemp = initFilter(that.props.login.OrgId); let jsonTemp = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(jsonTemp, 'ID', 1, dataId); extendRule(jsonTemp, 'ID', 1, dataId);
that.props.dispatch({ that.props.dispatch({
type: 'app/getDataByPost', type: 'app/getDataByPost',
@ -189,14 +188,13 @@ class SK035CheckLibrary extends React.Component {
url: 'SK/SKEnterpriseLibrary/SKGet', url: 'SK/SKEnterpriseLibrary/SKGet',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(that.props.data && that.props.data.loadDataDeal) if (that.props.data && that.props.data.loadDataDeal) {
{
that.props.data.loadDataDeal(1); that.props.data.loadDataDeal(1);
} }
that.setState({ data: ret }); that.setState({ data: ret });
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
that.setState({ BtnAgreeDisplay: 'none' }) that.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
that.setState({ BtnAgreeDisplay: 'inline' }) that.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -205,8 +203,7 @@ class SK035CheckLibrary extends React.Component {
// this.setState({ isFinished: 'inline' }) // this.setState({ isFinished: 'inline' })
// } // }
} }
else else { message.error('企业库无对应风险!'); }
{ message.error('企业库无对应风险!');}
} }
}); });
} }
@ -216,16 +213,16 @@ class SK035CheckLibrary extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx") XLSX.writeFile(wb, "双控企业库.xlsx")
} }
onClickApprove=(appVisible)=>{ onClickApprove = (appVisible) => {
const newtmpData = { const newtmpData = {
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'}, data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123", formCode: "PF123",
} }
this.setState({ this.setState({
@ -235,19 +232,19 @@ class SK035CheckLibrary extends React.Component {
showModalContent = (item) => { showModalContent = (item) => {
this.setState({ this.setState({
showDetailContent: true, showDetailContent: true,
},()=>{ }, () => {
this.setState({ this.setState({
DetailContents:item.Nav_DetailContents DetailContents: item.Nav_DetailContents
}); });
}); });
}; };
showModal = (item) => { showModal = (item) => {
this.setState({ this.setState({
showDetail: true, showDetail: true,
},()=>{ }, () => {
this.setState({ this.setState({
Details:item.Nav_DetailHiddens, Details: item.Nav_DetailHiddens,
DetailPosts:item.Nav_DetailDeparts DetailPosts: item.Nav_DetailDeparts
}); });
}); });
}; };
@ -273,7 +270,7 @@ class SK035CheckLibrary extends React.Component {
}; };
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<Modal <Modal
@ -324,10 +321,10 @@ class SK035CheckLibrary extends React.Component {
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
</div> </div>
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> <div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -336,10 +333,10 @@ class SK035CheckLibrary extends React.Component {
<div> <div>
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item> <Descriptions.Item label="生产单元">{data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item> <Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item> <Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item> <Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item> <Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
@ -348,10 +345,10 @@ class SK035CheckLibrary extends React.Component {
<Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item> <Descriptions.Item label="应急处置">{data.EMERGENCY}</Descriptions.Item>
<Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item> <Descriptions.Item label="是否有效">{enums.FMEnableStatusEnum.enums[data.ENABLE_STATUS]}</Descriptions.Item>
</Descriptions> </Descriptions>
</div>:null </div> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控层级</td> <td className={stylesStep.fontBold}>管控层级</td>
@ -359,10 +356,10 @@ class SK035CheckLibrary extends React.Component {
<td className={stylesStep.fontBold}>管控责任人</td> <td className={stylesStep.fontBold}>管控责任人</td>
</tr> </tr>
{ {
data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item,i)=>{ data.Nav_Departs && data.Nav_Departs.sort((x, y) => x.DEPARTMENT_TYPE - y.DEPARTMENT_TYPE).map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]} {enums.SKDepartmentTypeEnum.enums[item.DEPARTMENT_TYPE]}
@ -376,10 +373,10 @@ class SK035CheckLibrary extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>管控措施</td> <td className={stylesStep.fontBold}>管控措施</td>
@ -387,7 +384,7 @@ class SK035CheckLibrary extends React.Component {
<td className={stylesStep.fontBold}>查看</td> <td className={stylesStep.fontBold}>查看</td>
</tr> </tr>
{ {
data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item,i)=>{ data.Nav_Details && data.Nav_Details.sort((x, y) => x.NUM - y.NUM).map((item, i) => {
return <tr> return <tr>
<td> <td>
{item.NUM} {item.NUM}
@ -402,20 +399,20 @@ class SK035CheckLibrary extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
{ {
data ? <table style={{ width: '100%', textAlign: 'left'}} className={stylesStep.PrintForm1}> data ? <table style={{ width: '100%', textAlign: 'left' }} className={stylesStep.PrintForm1}>
<tr> <tr>
<td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td> <td width='150px' textAlign='center' className={stylesStep.fontBold}>序号</td>
<td className={stylesStep.fontBold}>辨识部门</td> <td className={stylesStep.fontBold}>辨识部门</td>
<td className={stylesStep.fontBold}>辨识岗位</td> <td className={stylesStep.fontBold}>辨识岗位</td>
</tr> </tr>
{ {
data.Nav_Posts && data.Nav_Posts.map((item,i)=>{ data.Nav_Posts && data.Nav_Posts.map((item, i) => {
return <tr> return <tr>
<td> <td>
{i+1} {i + 1}
</td> </td>
<td> <td>
{item.Nav_Department?.NAME} {item.Nav_Department?.NAME}
@ -431,7 +428,7 @@ class SK035CheckLibrary extends React.Component {
</tr> </tr>
}) })
} }
</table>:null </table> : null
} }
<FormPage {...this.state.tmpData} /> <FormPage {...this.state.tmpData} />
</div> </div>
@ -440,4 +437,4 @@ class SK035CheckLibrary extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK035CheckLibrary) export default connect(({ login, app }) => ({ login, app }))(SK035CheckLibrary)

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table ,Modal} from 'antd'; import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table, Modal } from 'antd';
import React from 'react'; import React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, showFiles, GetFileModel } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
@ -41,6 +41,7 @@ class SK041ShowPrint extends React.Component {
loadData = (dataId, taskID) => { loadData = (dataId, taskID) => {
let json = initFilter(this.props.login.OrgId); let json = initFilter(this.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendRule(json, 'TASK_ID', 1, taskID); // extendRule(json, 'TASK_ID', 1, taskID);
// extendInclude(json, 'Nav_ApplyUser'); // extendInclude(json, 'Nav_ApplyUser');
@ -170,13 +171,13 @@ class SK041ShowPrint extends React.Component {
{enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]} {enums.SKEvaluateLevelEnum.enums[item.EVALUATE_LEVEL]}
</td> </td>
<td> <td>
{item.Nav_SCOREL? item.Nav_SCOREL?.SCORE : 0} {item.Nav_SCOREL ? item.Nav_SCOREL?.SCORE : 0}
</td> </td>
<td> <td>
{item.Nav_SCOREE? item.Nav_SCOREE?.SCORE : 0} {item.Nav_SCOREE ? item.Nav_SCOREE?.SCORE : 0}
</td> </td>
<td> <td>
{item.Nav_SCOREC? item.Nav_SCOREC?.SCORE : 0} {item.Nav_SCOREC ? item.Nav_SCOREC?.SCORE : 0}
</td> </td>
<td> <td>
{item.EVALUATE_SCORE} {item.EVALUATE_SCORE}
@ -185,7 +186,7 @@ class SK041ShowPrint extends React.Component {
{ {
//item.MEASURE //item.MEASURE
item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => { item?.Nav_DetailMeasures && item?.Nav_DetailMeasures.map((item2, i) => {
return <tr> {item2?.NUM +"、"+item2?.MEASURES_NAME}</tr> return <tr> {item2?.NUM + "、" + item2?.MEASURES_NAME}</tr>
}) })
} }
</td> </td>

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -31,13 +31,14 @@ class SK043ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let that=this; let that = this;
let json = initFilter(that.props.login.OrgId); let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
extendInclude(json, 'Nav_Type'); extendInclude(json, 'Nav_Type');
extendInclude(json, 'Nav_Area'); extendInclude(json, 'Nav_Area');
@ -51,14 +52,13 @@ class SK043ShowPrint extends React.Component {
url: 'SK/BasicLibraryTemp/Get', url: 'SK/BasicLibraryTemp/Get',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(that.props.data && that.props.data.loadDataDeal) if (that.props.data && that.props.data.loadDataDeal) {
{
that.props.data.loadDataDeal(1); that.props.data.loadDataDeal(1);
} }
that.setState({ data: ret }); that.setState({ data: ret });
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
that.setState({ BtnAgreeDisplay: 'none' }) that.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
that.setState({ BtnAgreeDisplay: 'inline' }) that.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -73,16 +73,16 @@ class SK043ShowPrint extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控基础库.xlsx") XLSX.writeFile(wb, "双控基础库.xlsx")
} }
onClickApprove=(appVisible)=>{ onClickApprove = (appVisible) => {
const newtmpData = { const newtmpData = {
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'}, data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123", formCode: "PF123",
} }
this.setState({ this.setState({
@ -91,17 +91,17 @@ class SK043ShowPrint extends React.Component {
} }
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
</div> </div>
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> <div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控基础库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双控基础库</h1>
@ -110,10 +110,10 @@ class SK043ShowPrint extends React.Component {
<div> <div>
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item> <Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item> <Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item> <Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item> <Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item> <Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
@ -127,7 +127,7 @@ class SK043ShowPrint extends React.Component {
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => { data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
return <tr> return <tr>
<td> <td>
{(i+1)+"."+item?.MEASURES_NAME} {(i + 1) + "." + item?.MEASURES_NAME}
</td> </td>
<td> <td>
{item?.EMERGENCY} {item?.EMERGENCY}
@ -147,7 +147,7 @@ class SK043ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="检查内容">{ <Descriptions.Item label="检查内容">{
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => { data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
return <tr><td> {(i+1)+"."+item?.CHECK_CONTENT}</td> return <tr><td> {(i + 1) + "." + item?.CHECK_CONTENT}</td>
<td> {item?.CHECK_BASIC}</td> <td> {item?.CHECK_BASIC}</td>
<td> {item?.CHECK_STANDARD}</td> <td> {item?.CHECK_STANDARD}</td>
</tr> </tr>
@ -157,13 +157,13 @@ class SK043ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="隐患描述">{ <Descriptions.Item label="隐患描述">{
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => { data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
return <tr><td> {(i+1)+"."+item?.HIDDEN_DESCRIPTION}</td> return <tr><td> {(i + 1) + "." + item?.HIDDEN_DESCRIPTION}</td>
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td> <td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
<td> {item?.RECTIFICATION_MEASURES}</td></tr> <td> {item?.RECTIFICATION_MEASURES}</td></tr>
}) })
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
</div>:null </div> : null
} }
<FormPage {...this.state.tmpData} /> <FormPage {...this.state.tmpData} />
@ -173,4 +173,4 @@ class SK043ShowPrint extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK043ShowPrint) export default connect(({ login, app }) => ({ login, app }))(SK043ShowPrint)

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 React from 'react';
import { initFilter, extendRule, extendInclude, extendIgnoreDataRule,setDataFieldValue, guid, initQueryFilter } from "../../../utils/common"; import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter } from "../../../utils/common";
import ReactToPrint from "react-to-print"; import ReactToPrint from "react-to-print";
import stylesStep from '../HI/StepForm.css'; import stylesStep from '../HI/StepForm.css';
import config from "../../../config"; import config from "../../../config";
@ -31,13 +31,14 @@ class SK045ShowPrint extends React.Component {
} }
BtnClose = () => { BtnClose = () => {
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function') if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
this.props.data.onCancel(); this.props.data.onCancel();
} }
loadData = (dataId) => { loadData = (dataId) => {
let that=this; let that = this;
let json = initFilter(that.props.login.OrgId); let json = initFilter(that.props.login.OrgId);
json.Parameter22 = this.props.data.ORG_ID_HV;
extendRule(json, 'ID', 1, dataId); extendRule(json, 'ID', 1, dataId);
// extendInclude(json, 'Nav_Type'); // extendInclude(json, 'Nav_Type');
// extendInclude(json, 'Nav_Area'); // extendInclude(json, 'Nav_Area');
@ -55,14 +56,13 @@ class SK045ShowPrint extends React.Component {
url: 'SK/SKEnterpriseLibraryTemp/FullGet', url: 'SK/SKEnterpriseLibraryTemp/FullGet',
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
if(that.props.data && that.props.data.loadDataDeal) if (that.props.data && that.props.data.loadDataDeal) {
{
that.props.data.loadDataDeal(1); that.props.data.loadDataDeal(1);
} }
that.setState({ data: ret }); that.setState({ data: ret });
if (that.props.data.tableKey==="2" ||that.props.data.tableKey===undefined) { if (that.props.data.tableKey === "2" || that.props.data.tableKey === undefined) {
that.setState({ BtnAgreeDisplay: 'none' }) that.setState({ BtnAgreeDisplay: 'none' })
}else{ } else {
that.setState({ BtnAgreeDisplay: 'inline' }) that.setState({ BtnAgreeDisplay: 'inline' })
} }
this.onClickApprove(false); this.onClickApprove(false);
@ -77,16 +77,16 @@ class SK045ShowPrint extends React.Component {
} }
onTableBtnExport() { onTableBtnExport() {
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
let TableWrap = document.getElementById('tableId' + this.props.data.id); let TableWrap = document.getElementById('tableId' + this.props.data.id);
let Table = TableWrap.getElementsByTagName('table')[0]; let Table = TableWrap.getElementsByTagName('table')[0];
const wb = XLSX.utils.table_to_book(Table); const wb = XLSX.utils.table_to_book(Table);
XLSX.writeFile(wb, "双控企业库.xlsx") XLSX.writeFile(wb, "双控企业库.xlsx")
} }
onClickApprove=(appVisible)=>{ onClickApprove = (appVisible) => {
const newtmpData = { const newtmpData = {
data: { id: this.props.data.id, isShow: true,key:guid(),param:this.props.data.param,appVisible:appVisible,BtnAgreeDisplay:'inline'}, data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'inline' },
formCode: "PF123", formCode: "PF123",
} }
this.setState({ this.setState({
@ -95,17 +95,17 @@ class SK045ShowPrint extends React.Component {
} }
render() { render() {
const { data } = this.state; const { data } = this.state;
const enums=this.props.data.enums ? this.props.data.enums :this.props.app.enums ; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
// let aaa = Math.random(); // let aaa = Math.random();
return <div> return <div>
<div style={{ padding: '10px' }}> <div style={{ padding: '10px' }}>
{/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */} {/* <Button onClick={() => this.onClickApprove(true)} style={{ marginRight: '8px'}} icon="export">审批详情</Button> */}
<ReactToPrint <ReactToPrint
trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }} type={'default'} icon={'printer'} >打印</Button>} trigger={() => <Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} type={'default'} icon={'printer'} >打印</Button>}
content={() => this.componentRef} content={() => this.componentRef}
/> />
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30?"inline":"none" }}>导出</Button> <Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }}>导出</Button>
</div> </div>
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}> <div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
<h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1> <h1 style={{ textAlign: 'center', margin: '15px' }}>双控企业库</h1>
@ -114,10 +114,10 @@ class SK045ShowPrint extends React.Component {
<div> <div>
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item> <Descriptions.Item label="生产单元"> {data.Nav_ProductionUnit?.NAME}</Descriptions.Item>
<Descriptions.Item label="辨识区域">{data.Nav_Area? data.Nav_Area?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="辨识区域">{data.Nav_Area ? data.Nav_Area?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item> <Descriptions.Item label="风险名称">{data.RISK_NAME}</Descriptions.Item>
<Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item> <Descriptions.Item label="风险描述">{data.RISK_DESCRIPTION}</Descriptions.Item>
<Descriptions.Item label="风险类别">{data.Nav_Type? data.Nav_Type?.NAME : ''}</Descriptions.Item> <Descriptions.Item label="风险类别">{data.Nav_Type ? data.Nav_Type?.NAME : ''}</Descriptions.Item>
<Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item> <Descriptions.Item label="风险评价L">{data.EVALUATE_L}</Descriptions.Item>
<Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item> <Descriptions.Item label="风险评价E">{data.EVALUATE_E}</Descriptions.Item>
<Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item> <Descriptions.Item label="风险评价C">{data.EVALUATE_C}</Descriptions.Item>
@ -132,7 +132,7 @@ class SK045ShowPrint extends React.Component {
data?.Nav_Measures && data?.Nav_Measures.map((item, i) => { data?.Nav_Measures && data?.Nav_Measures.map((item, i) => {
return <tr> return <tr>
<td> <td>
{(i+1)+"."+item?.MEASURES_NAME} {(i + 1) + "." + item?.MEASURES_NAME}
</td> </td>
<td> <td>
{item?.EMERGENCY} {item?.EMERGENCY}
@ -157,7 +157,7 @@ class SK045ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="检查内容">{ <Descriptions.Item label="检查内容">{
data?.Nav_Contents && data?.Nav_Contents.map((item, i) => { data?.Nav_Contents && data?.Nav_Contents.map((item, i) => {
return <tr><td> {(i+1)+"."+item?.CHECK_CONTENT}</td> return <tr><td> {(i + 1) + "." + item?.CHECK_CONTENT}</td>
<td> {item?.CHECK_BASIC}</td> <td> {item?.CHECK_BASIC}</td>
<td> {item?.CHECK_STANDARD}</td> <td> {item?.CHECK_STANDARD}</td>
<td> <td>
@ -185,13 +185,13 @@ class SK045ShowPrint extends React.Component {
<Descriptions size="middle" bordered className={stylesStep.description}> <Descriptions size="middle" bordered className={stylesStep.description}>
<Descriptions.Item label="隐患描述">{ <Descriptions.Item label="隐患描述">{
data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => { data?.Nav_Hiddens && data?.Nav_Hiddens.map((item, i) => {
return <tr><td> {(i+1)+"."+item?.HIDDEN_DESCRIPTION}</td> return <tr><td> {(i + 1) + "." + item?.HIDDEN_DESCRIPTION}</td>
<td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td> <td> {enums.SKHiddenLevel.enums[item?.HIDDEN_LEVEL]}</td>
<td> {item?.RECTIFICATION_MEASURES}</td></tr> <td> {item?.RECTIFICATION_MEASURES}</td></tr>
}) })
}</Descriptions.Item> }</Descriptions.Item>
</Descriptions> </Descriptions>
</div>:null </div> : null
} }
<FormPage {...this.state.tmpData} /> <FormPage {...this.state.tmpData} />
@ -201,4 +201,4 @@ class SK045ShowPrint extends React.Component {
} }
export default connect(({ login,app }) => ({ login,app }))(SK045ShowPrint) export default connect(({ login, app }) => ({ login, app }))(SK045ShowPrint)

View File

@ -125,6 +125,44 @@ export default {
} }
}, },
onSubChange: ({ row, pageCode, record, colInfo, dispatch, stateData, props, saveRowRecord }) => {
if (colInfo.FIELD_NAME == 'Nav_Train.CERTIFICATE_NAME') {
let trainId = getDataFieldValue(record, 'TRAIN_ID');
if (trainId) {
const json = initFilter();
extendRule(json, 'ID', 1, trainId);
extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File')
dispatch({
type: 'app/getDataByPost',
url: 'SE/RenewalTrain/OrderPaged',
payload: json,
onComplete: (ret) => {
if (ret) {
//record["Nav_Posts"] = [];
let copyRecord={...record};
if (ret && ret.length > 0) {
let identifyings= ret[0].Nav_Files.map(item => {
return {
FIRE_JOB_USER_ID: record.ID,
ID: guid(),
IMG_FILE_ID: item.IMG_FILE_ID,
Nav_ImgFile: item.Nav_ImgFile,
ORG_ID: record.ORG_ID,
};
});
copyRecord["Nav_UserFiles"]=[...identifyings]
}
console.log(copyRecord)
saveRowRecord(copyRecord)
}
}
})
} else {
record.Nav_Posts = [];
saveRowRecord(record)
}
}
},
// handleRenderRowControl(params) { // handleRenderRowControl(params) {
// // setRowFieldVisible('Nav_Details.IS_CONFIRM_NEW', false) // // setRowFieldVisible('Nav_Details.IS_CONFIRM_NEW', false)
// // setRowFieldVisible('Nav_Details.Nav_DetailFiles', false) // // setRowFieldVisible('Nav_Details.Nav_DetailFiles', false)

View File

@ -1,7 +1,8 @@
import { message } from "antd/lib/index"; import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common"; import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
import moment from 'moment'; import moment from 'moment';
import { Button, Row, Col, Form, Input, Select, Upload, Icon, Modal, Spin,Table } from 'antd'; import FormPage from '../../components/FormPage';
import { Button, Row, Col, Form, Input, Select, Upload, Icon, Modal, Spin, Table } from 'antd';
/** /**
* @return {string} * @return {string}
*/ */
@ -12,36 +13,31 @@ export default {
params.record.PUBLISH = params.customParams; params.record.PUBLISH = params.customParams;
// params.record.FORM_CODE = params.data.reloadKey.substring(0,params.data.reloadKey.indexOf("_")); // params.record.FORM_CODE = params.data.reloadKey.substring(0,params.data.reloadKey.indexOf("_"));
}, },
onBeforeEdit(params){ onBeforeEdit(params) {
const { isNew, isCopy, dispatch, login, setFieldValue,data, stateData,setFieldVisible,getFieldValue} = params ? params : {}; const { isNew, isCopy, dispatch, login, setFieldValue, data, stateData, setFieldVisible, getFieldValue } = params ? params : {};
if (isNew) { if (isNew) {
setFieldValue('MineType', login.currentMineType); setFieldValue('MineType', login.currentMineType);
setFieldVisible("CONTEXT", false); setFieldVisible("CONTEXT", false);
} }
else else {
{ if (stateData.STATUS === 40) {
if(stateData.STATUS === 40)
{
setFieldVisible("CONTEXT", true); setFieldVisible("CONTEXT", true);
} }
else else { setFieldVisible("CONTEXT", false); }
{setFieldVisible("CONTEXT", false);}
} }
}, },
onChange: ({ value, colInfo, record, stateData, data, getFieldValue, setFieldVisible, setFieldRequired,setFieldValue }) => { onChange: ({ value, colInfo, record, stateData, data, getFieldValue, setFieldVisible, setFieldRequired, setFieldValue }) => {
if (colInfo != null && colInfo.FIELD_NAME == "IS_STORE") { if (colInfo != null && colInfo.FIELD_NAME == "IS_STORE") {
var isStore = getFieldValue("IS_STORE"); var isStore = getFieldValue("IS_STORE");
if(isStore && isStore === 10 ) if (isStore && isStore === 10) {
{
setFieldVisible("DEPARTMENT_TYPE", true); setFieldVisible("DEPARTMENT_TYPE", true);
setFieldVisible("Nav_CheckType.NAME", true); setFieldVisible("Nav_CheckType.NAME", true);
setFieldVisible("PLANCHECKFREQUENCY", true); setFieldVisible("PLANCHECKFREQUENCY", true);
setFieldRequired("DEPARTMENT_TYPE", true); setFieldRequired("DEPARTMENT_TYPE", true);
setFieldRequired("Nav_CheckType.NAME", true); setFieldRequired("Nav_CheckType.NAME", true);
setFieldRequired("PLANCHECKFREQUENCY", true); setFieldRequired("PLANCHECKFREQUENCY", true);
}else } else {
{
setFieldVisible("DEPARTMENT_TYPE", false); setFieldVisible("DEPARTMENT_TYPE", false);
setFieldVisible("Nav_CheckType.NAME", false); setFieldVisible("Nav_CheckType.NAME", false);
setFieldVisible("PLANCHECKFREQUENCY", false); setFieldVisible("PLANCHECKFREQUENCY", false);
@ -51,4 +47,30 @@ export default {
} }
} }
}, },
btnAddContent: ({ record, close, loadData, custom, login, dispatch, btn }) => {
// const rrecord= {record};
const regClick = async function () {
await dispatch({
type: 'custom/save',
payload: {
['engineeringPlanEditClick' +(record ? record.CHECK_CONTENTS_ID : "") ]: true
},
});
};
const data = {
id: (record ? record.CHECK_CONTENTS_ID : ""),
clickKey: 'engineeringPlanEditClick',
close: () => {
},
onCancel: () => {
},
}
return {
content: <FormPage formCode={'SK059'} data={data} />,
click: regClick
}
},
} }