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

List组件修改

上级 27568f67
...@@ -359,7 +359,7 @@ export default class Index extends React.Component { ...@@ -359,7 +359,7 @@ export default class Index extends React.Component {
} = this.state; } = this.state;
return ( return (
<span> <span>
<Button onClick={this.open}>自定义导出</Button> <Button shape='round' onClick={this.open}>自定义导出</Button>
<div id='downloadDiv' style={{ display: 'none' }}></div> <div id='downloadDiv' style={{ display: 'none' }}></div>
<Modal <Modal
width={670} width={670}
......
...@@ -183,7 +183,7 @@ class FormList extends React.Component { ...@@ -183,7 +183,7 @@ class FormList extends React.Component {
} }
params = { params = {
...params, ...params,
...formValues, query: JSON.stringify(formValues),
}; };
fetchData({ ...params, dataObjId: objId }, res => { fetchData({ ...params, dataObjId: objId }, res => {
if (!res.rows) { if (!res.rows) {
...@@ -306,6 +306,7 @@ class FormList extends React.Component { ...@@ -306,6 +306,7 @@ class FormList extends React.Component {
formValues, formValues,
searchConfig, searchConfig,
} = this.state; } = this.state;
const { hasExport, hasImport } = this.props;
const parentMethods = { const parentMethods = {
handleAdd: this.handleAdd, handleAdd: this.handleAdd,
...@@ -343,18 +344,9 @@ class FormList extends React.Component { ...@@ -343,18 +344,9 @@ class FormList extends React.Component {
<Shell> <Shell>
<div style={{ paddingLeft: '10px', marginTop: '20px' }}> <div style={{ paddingLeft: '10px', marginTop: '20px' }}>
<ButtonDiy icon="plus" className="primaryBlue" handleClick={this.add} name="新建" /> <ButtonDiy icon="plus" className="primaryBlue" handleClick={this.add} name="新建" />
<ImportUtil objId={objId} /> {hasImport && <ImportUtil objId={objId} />}
<span>&nbsp;&nbsp;</span> {hasExport && <ExportInfo objId={objId} />}
<ButtonDiy handleClick={this.batchDelete} name="批量删除" />
<ExportInfo objId={objId} />
<span>&nbsp;&nbsp;</span>
{selectedRows.length > 0 && (
<ButtonDiy
handleClick={this.batchDelete}
name="批量删除"
className="primaryRed"
/>
)}
</div> </div>
<StandardTable <StandardTable
rowKey="row_id" rowKey="row_id"
......
...@@ -61,7 +61,7 @@ const transLateTimeTOUnix = (value, dataType) => { ...@@ -61,7 +61,7 @@ const transLateTimeTOUnix = (value, dataType) => {
const getFormArrayConfig = header => { const getFormArrayConfig = header => {
let config = []; let config = [];
for (let item of header) { for (let item of header) {
if (item.isPrimaryKey) { if (item.isPrimaryKey || item.isHidden) {
// 主键 // 主键
continue; continue;
/* config.push( /* config.push(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论