提交 8fc4d7bb authored 作者: 徐立's avatar 徐立
...@@ -77,7 +77,7 @@ export default class Index extends React.Component { ...@@ -77,7 +77,7 @@ export default class Index extends React.Component {
objId: this.props.objId, objId: this.props.objId,
}, },
callback: (infos) => { callback: (infos) => {
const mockData = []; const mockData = [];
const qs = []; const qs = [];
const gs = []; const gs = [];
...@@ -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}
...@@ -368,7 +368,7 @@ export default class Index extends React.Component { ...@@ -368,7 +368,7 @@ export default class Index extends React.Component {
title="自定义查询、排序、导出" title="自定义查询、排序、导出"
style={{ textAlign: 'center' }} style={{ textAlign: 'center' }}
visible={visiable} visible={visiable}
onOk={this.export} onOk={this.export}
onCancel={this.onCancle} onCancel={this.onCancle}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
...@@ -376,7 +376,7 @@ export default class Index extends React.Component { ...@@ -376,7 +376,7 @@ export default class Index extends React.Component {
<div style={{ overflowY: 'auto', maxHeight: '500px', height: '500px' }}> <div style={{ overflowY: 'auto', maxHeight: '500px', height: '500px' }}>
<div style={{ textAlign: 'left' }}> <div style={{ textAlign: 'left' }}>
<Button type="primary">新增查询条件</Button> <Button type="primary">新增查询条件</Button>
<Select style={{ width: 200, paddingRight: '10px' }} <Select style={{ width: 200, paddingRight: '10px' }}
value={currentQueryKey} value={currentQueryKey}
...@@ -446,7 +446,7 @@ export default class Index extends React.Component { ...@@ -446,7 +446,7 @@ export default class Index extends React.Component {
{currentOrderKey ? {currentOrderKey ?
<span style={{ paddingLeft: '0' }}> <span style={{ paddingLeft: '0' }}>
<Button type="primary" onClick={this.okOrder}>确定</Button> <Button type="primary" onClick={this.okOrder}>确定</Button>
</span> </span>
: ''} : ''}
<div style={{ height: '12px' }}> <div style={{ height: '12px' }}>
...@@ -469,7 +469,7 @@ export default class Index extends React.Component { ...@@ -469,7 +469,7 @@ export default class Index extends React.Component {
<span style={{ paddingRight: '10px' }}>聚合条件:</span> <span style={{ paddingRight: '10px' }}>聚合条件:</span>
{!groupVisiable ? {!groupVisiable ?
<Button type="primary" onClick={this.addGroup}>新增</Button> <Button type="primary" onClick={this.addGroup}>新增</Button>
: :
<span> <span>
<Select style={{ width: 100 }} <Select style={{ width: 100 }}
...@@ -489,11 +489,11 @@ export default class Index extends React.Component { ...@@ -489,11 +489,11 @@ export default class Index extends React.Component {
</Select> </Select>
{currentGroupKey ? {currentGroupKey ?
<Button type="primary" onClick={this.okGroup}>确定</Button> <Button type="primary" onClick={this.okGroup}>确定</Button>
: ''} : ''}
<Button type="primary" onClick={this.cancelGroup}>取消</Button> <Button type="primary" onClick={this.cancelGroup}>取消</Button>
</span>} </span>}
{groups.map((r, i) => {groups.map((r, i) =>
<FormItem key={i + r.name} <FormItem key={i + r.name}
...@@ -504,7 +504,7 @@ export default class Index extends React.Component { ...@@ -504,7 +504,7 @@ export default class Index extends React.Component {
<Input style={{ display: 'none' }} <Input style={{ display: 'none' }}
value=""/>)} value=""/>)}
<Button type="danger" onClick={this.deleteGroup.bind(this, i)}>删除</Button> <Button type="danger" onClick={this.deleteGroup.bind(this, i)}>删除</Button>
</FormItem>)} </FormItem>)}
</div> : ''} </div> : ''}
......
...@@ -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(
......
...@@ -1366,7 +1366,7 @@ export default class tableCom extends Component { ...@@ -1366,7 +1366,7 @@ export default class tableCom extends Component {
} else { } else {
uid= this.props.uuid uid= this.props.uuid
} }
if (!isEdit) { if (!isEdit) {
return obj[this.props.uuid] || json.initialValue || "" return obj[this.props.uuid] || json.initialValue || ""
} else { } else {
...@@ -1375,7 +1375,7 @@ export default class tableCom extends Component { ...@@ -1375,7 +1375,7 @@ export default class tableCom extends Component {
return <>{this.props.form.getFieldDecorator(uid, { return <>{this.props.form.getFieldDecorator(uid, {
initialValue: obj[this.props.uuid]||json.initialValue initialValue: obj[this.props.uuid]||json.initialValue
})(<Input type="hidden" />)}<span style={{ fontWeight: get == 'mobile' ? 'bold' : '', marginRight: get == 'mobile' ? 12 : '' }} {...json.props}>{obj[this.props.uuid]}</span></> })(<Input type="hidden" />)}<span style={{ fontWeight: get == 'mobile' ? 'bold' : '', marginRight: get == 'mobile' ? 12 : '' }} {...json.props}>{obj[this.props.uuid]||json.initialValue}</span></>
}else{ }else{
return <>{this.props.form.getFieldDecorator(uid, { return <>{this.props.form.getFieldDecorator(uid, {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论