import { Button, Descriptions, Modal, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; import React from 'react'; import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter, ShowDateTime, GetFileModel, showFiles } from '../../../utils/common'; import ReactToPrint from 'react-to-print'; import { ExportToExcel } from '@woowalker/feui' import XLSX from 'xlsx'; import { connect } from 'dva'; import moment from 'moment'; import { message } from 'antd/lib/index'; import styles from '../../../components/CustomPages/HI/StepForm.css'; import config from '../../../config.js'; import FormPage from '../../FormPage' class WB027ShowPrint extends React.Component { constructor(props) { super(props); this.state = { data: null, btndisplay: 'none', isCheck: false, //是否待办 审批 isSign: true, fileData: [], fileForm: { title: "", visible: false, }, } } componentDidMount() { if (this.props.data?.id) this.loadData(this.props.data?.id); } componentWillReceiveProps(NextProps) { if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { this.loadData(NextProps.data?.id); } } onTableBtnAgree() { let json = initFilter(this.props.login.OrgId); json.Parameter1 = this.props.data.id; json.Parameter2 = this.props.data.TaskID; json.Parameter3 = this.props.login.userId; this.props.dispatch({ type: 'app/getDataByPost', url: 'WB/WBDangerousJob/recordSign', payload: json, onComplete: (ret) => { if (ret) { message.success('确认成功!'); this.state.isSign = false; this.BtnClose(); } } }) } BtnClose = () => { if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function') this.props.data.onCancel(); } loadData = (id) => { var orgId = this.props.login ? this.props.login.OrgId : ''; let json = initFilter(orgId); extendRule(json, 'ID', 1, id); extendInclude(json, 'Nav_Project') extendInclude(json, 'Nav_Files.Nav_ImgFile') extendInclude(json, 'Nav_Photos.Nav_ImgFile') json.IgnoreDataRule = true; this.props.dispatch({ type: 'app/getDataByPost', payload: json, url: 'WB/SafeCheck/Get', onComplete: (ret) => { if (ret) { this.setState({ data: ret, }) } } }); } render() { const { data } = this.state; const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; const tableKey = this.props.data.tableKey return
{this.state.isSign && (tableKey != null && (tableKey == "1" || tableKey == "4")) && ( <> )}
} content={() => this.componentRef} />
(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}>

外包单位安全检查记录

{ data ?
{data.Nav_Project.NAME} {data.Nav_Project.UNIT_NAME} {enums.WBCHECKCATAGORY.enums[data.CHECK_CATEGORY]} {data.CHECK_TIME} {data.HIDDEN_DANGER_COUNT} {showFiles(data.Nav_Photos, config.picServerHost, this)} {showFiles(data.Nav_Files, config.picServerHost, this)}
: null }
{ GetFileModel(Modal, FormPage, this, this.state.fileForm.visible) }
} } export default connect(({ login, app }) => ({ login, app }))(WB027ShowPrint)