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

Merge remote-tracking branch 'origin/master'

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