提交 7ca410cf authored 作者: 钟是志's avatar 钟是志

宿舍维修增加打印按钮

上级 ddc54f22
/***
* 审核详情 带打印按钮
* 2020年5月7日 09:53:12
* 钟是志
*
* */
import React, { Component } from 'react';
import AuditPage from './index';
export default class BatchAudit extends Component {
constructor(props) {
super(props);
}
render() {
return <AuditPage {...this.props} showPrint={true} />;
}
}
......@@ -62,6 +62,7 @@ export default class Index extends React.Component {
giveDetailColumns = () => {
const { columns, workId, dataBaseId, addFields, tableInfo } = this.state;
const { showPrint } = this.props;
const process_status = columns.find((x) => {
return x.name === 'process_status';
});
......@@ -85,6 +86,7 @@ export default class Index extends React.Component {
record,
addFields,
tableInfo,
showPrint,
},
}}>
详情
......@@ -151,7 +153,7 @@ export default class Index extends React.Component {
allConfigSetInfo,
tableInfo,
} = this.state;
const { hasBatchAudit, batchAuditButtonName } = this.props;
const { hasBatchAudit, batchAuditButtonName, showPrint } = this.props;
if (!workId) {
return null;
}
......@@ -166,6 +168,7 @@ export default class Index extends React.Component {
allConfigSetInfo={allConfigSetInfo}
searchCondition={searchCondition}
batchAuditButtonName={batchAuditButtonName}
showPrint={showPrint}
/>
);
}
......
......@@ -61,7 +61,11 @@ export default class Detail extends Component {
render() {
const { id, showAll } = this.state;
const url = config.onestopPC.split('/#/');
const iframeUrl = `${url[0]}/#/IframeForDetail?id=${id}&token=${getToken()}`;
let showPrint = this.props.location?.state?.showPrint;
let iframeUrl = `${url[0]}/#/IframeForDetail?id=${id}&token=${getToken()}`;
if(showPrint){
iframeUrl = iframeUrl + '&showPrint=true';
}
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
return (
<PageHeaderWrapper title="">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论