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