diff --git a/src/components/CustomPages/BI/BI009FormRunAnalysis.js b/src/components/CustomPages/BI/BI009FormRunAnalysis.js index ea771ac..15c90f2 100644 --- a/src/components/CustomPages/BI/BI009FormRunAnalysis.js +++ b/src/components/CustomPages/BI/BI009FormRunAnalysis.js @@ -1411,7 +1411,7 @@ class BI009FormRunAnalysis extends React.Component { if (riskLevels) { let myChart = echarts.init(riskLevels); myChart.setOption({ - color: ["#c92a2a", "#ffa94d", "#ffe066", "#4285F4", "#fa8a89"], + color: ["#c92a2a", "#ffa94d", "#ffe066", "#4285F4", "#fa8a89","#8FBC8F","#778899"], title: [ { text: numAll, diff --git a/src/components/CustomPages/FO/FO055ShowPrint.js b/src/components/CustomPages/FO/FO055ShowPrint.js new file mode 100644 index 0000000..0393743 --- /dev/null +++ b/src/components/CustomPages/FO/FO055ShowPrint.js @@ -0,0 +1,137 @@ +import { message } from "antd/lib/index"; +import { Button, Descriptions, Popconfirm, Row, Col, Form, Input, Select,Modal, Table } from 'antd'; +import React from 'react'; +import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter, showFiles, GetFileModel, showUserSign, approveView } from "../../../utils/common"; +import ReactToPrint from "react-to-print"; +import styles from '../HI/StepForm.css'; +import config from "../../../config"; +import XLSX from 'xlsx'; +import { connect } from 'dva'; +import moment from 'moment'; +import FormPage from '../../../components/FormPage' +class FO055ShowPrint extends React.Component { + constructor(props) { + super(props); + this.state = { + data: null, + enumData: null, + BtnAgreeDisplay: 'none', + 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); + } + } + + + + BtnClose = () => { + 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({ + type: 'app/getDataByPost', + payload: json, + url: 'FO/FOEnterpriseInformationRegistration/GetEdit', + onComplete: (ret) => { + if (ret) { + 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) { + this.setState({ BtnAgreeDisplay: 'none' }) + } else { + this.setState({ BtnAgreeDisplay: 'inline' }) + } + approveView(this, 'inline', false); + } + + } + }); + } + onTableBtnExport() { + 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") + } + + render() { + const { data } = this.state; + const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; + return