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

Merge remote-tracking branch 'origin/master'

......@@ -23,7 +23,7 @@ export default class Detail extends Component{
componentDidMount(){
window.addEventListener('message', (event) => {
if(event.data.indexOf('iframeDetailHeight') > -1){
if(event.data && event.data.indexOf && event.data.indexOf('iframeDetailHeight') > -1){
let height = Number(event.data.split('-')[1]);
document.getElementById('detailIframeId').height = height;
}
......
import React, { useState } from 'react';
import PageTypeMatching from '@/highOrderComponent/PageTypeMatching';
import getInfoGenerator from '@/webPublic/FormInsertDiy/getInfoGenerator';
import AuditModal from './AuditModal'
import AuditModal from './AuditModal';
import { findValueByKey } from '../../../../pages/zydtw/Cxcy/utils';
import withGoBack from '@/highOrderComponent/withGoBack';
const defaultNameSpan = { big: 9, small: 9 };
const defaultFieldSpan = { big: 4, small: 4 };
......@@ -14,8 +15,7 @@ const defaultPageSetting = {
buttonArea: true,
};
export default function BatchAudit({
export default withGoBack(function BatchAudit({
appId,
flowNode,
getInfo,
......@@ -51,23 +51,22 @@ export default function BatchAudit({
setCode(findValueByKey(res.rows[0], 'code'));
}
return res;
}
},
},
tableRowKey: tableRowKey || 'buzinessId',
columns: columns || [],
};
const defaultPageButton = [
{
type:'create',
name: '批量审核',
component: 'RenderComponent',
render: ({ selectRows, getPage }) => {
return <AuditModal selectRows={selectRows} getPage={getPage} code={code} />;
}
},
];
const defaultPageButton = [
{
type: 'create',
name: '批量审核',
component: 'RenderComponent',
render: ({ selectRows, getPage }) => {
return <AuditModal selectRows={selectRows} getPage={getPage} code={code} />;
},
},
];
return (
<PageTypeMatching
......@@ -77,4 +76,4 @@ const defaultPageButton = [
pageSearch={pageSearch}
/>
);
}
});
......@@ -8,8 +8,7 @@ export const DataType = {
date: 'date',
};
export default function getInfoGenerator(condition) {
return (params, url) => {
export function parseParams(condition, params) {
// 有dataType的查询条件封装到queryInfo里,其他的直接按参数查询
// queryInfo是{key, value, dataType}对象组成的数组
......@@ -35,6 +34,12 @@ export default function getInfoGenerator(condition) {
}, {});
newParams.queryInfo = JSON.stringify(newParams.queryInfo || []);
return newParams;
}
export default function getInfoGenerator(condition) {
return (params, url) => {
const newParams = parseParams(condition, params);
return getInfo(newParams, url, { method: 'GET' });
};
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论