提交 2aa1043b authored 作者: 王绍森's avatar 王绍森

9393 批量审核加一个文本框, 增加批量审核按钮判断

上级 c04ec977
...@@ -166,9 +166,12 @@ export default class AffairPage extends React.Component { ...@@ -166,9 +166,12 @@ export default class AffairPage extends React.Component {
if (event.data === 'returnList') { if (event.data === 'returnList') {
this.returnList(true); this.returnList(true);
} }
if (event.data.indexOf('iframeHeight') > -1) { if (event && event.data && event.data.indexOf && event.data.indexOf('iframeHeight') > -1) {
let height = Number(event.data.split('-')[1]); let height = Number(event.data.split('-')[1]);
document.getElementById('applyIframeId').height = height; const iframe = document.getElementById('applyIframeId');
if (iframe) {
iframe.height = height;
}
} }
}, false); }, false);
......
...@@ -18,10 +18,10 @@ export default class AuditPage extends Component { ...@@ -18,10 +18,10 @@ export default class AuditPage extends Component {
componentDidMount() {} componentDidMount() {}
handleButtonSet = () => { handleButtonSet = () => {
const { addFields, workId } = this.props; const { addFields, workId, hasBatchAudit } = this.props;
return { return {
tab1: [ tab1: [
{ hasBatchAudit ? {
type: 'audit', type: 'audit',
component: 'RenderComponent', component: 'RenderComponent',
render: ({ selectRows, getPage }) => { render: ({ selectRows, getPage }) => {
...@@ -52,8 +52,8 @@ export default class AuditPage extends Component { ...@@ -52,8 +52,8 @@ export default class AuditPage extends Component {
</AuditModal> </AuditModal>
); );
}, },
}, }: false,
], ].filter(i => i),
tab2: [], tab2: [],
}; };
}; };
......
...@@ -12,6 +12,11 @@ import * as destructionFunc from '../destruction'; ...@@ -12,6 +12,11 @@ import * as destructionFunc from '../destruction';
import { Link } from 'dva/router'; import { Link } from 'dva/router';
export default class Index extends React.Component { export default class Index extends React.Component {
static defaultProps = {
hasBatchAudit: true, // 是否有批量审核按钮
}
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -112,11 +117,13 @@ export default class Index extends React.Component { ...@@ -112,11 +117,13 @@ export default class Index extends React.Component {
render() { render() {
const { workId, dataBaseId, columns, searchCondition, addFields, allConfigSetInfo, tableInfo } = this.state; const { workId, dataBaseId, columns, searchCondition, addFields, allConfigSetInfo, tableInfo } = this.state;
const { hasBatchAudit } = this.props;
if(!workId){ if(!workId){
return null; return null;
} }
return ( return (
<AuditPage <AuditPage
hasBatchAudit={hasBatchAudit}
workId={workId} workId={workId}
dataBaseId={dataBaseId} dataBaseId={dataBaseId}
columns={columns} columns={columns}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论