#set($upperEntityPath=$table.entityPath.toUpperCase()) import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Button, Col, Form, Input, Row } from 'antd'; import Panel from '../../../components/Panel'; import { $!{upperEntityPath}_LIST } from '../../../actions/$!{table.entityPath}'; import Grid from '../../../components/Sword/Grid'; const FormItem = Form.Item; @connect(({ $!{table.entityPath}, loading }) => ({ $!{table.entityPath}, loading: loading.models.$!{table.entityPath}, })) @Form.create() class $!{entity} extends PureComponent { // ============ 查询 =============== handleSearch = params => { const { dispatch } = this.props; dispatch($!{upperEntityPath}_LIST(params)); }; // ============ 查询表单 =============== renderSearchForm = onReset => { const { form } = this.props; const { getFieldDecorator } = form; return ( {getFieldDecorator('name')()}
); }; render() { const code = '$!{table.entityPath}'; const { form, loading, $!{table.entityPath}: { data }, } = this.props; const columns = [ #foreach($field in $!{table.fields}) #if($!{field.name}!=$!{tenantColumn}) { title: '$!{field.comment}', dataIndex: '$!{field.propertyName}', }, #end #end ]; return ( ); } } export default $!{entity};