|
|
@@ -62,28 +62,25 @@ class DataSourceColumnConfig extends React.Component {
|
|
|
key: 'name',
|
|
|
width: 80
|
|
|
}, {
|
|
|
- title: '别名',
|
|
|
- dataIndex: 'alias',
|
|
|
- key: 'alias',
|
|
|
- width: 100,
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'description',
|
|
|
+ key: 'description',
|
|
|
+ width: 150,
|
|
|
render: (text, record) => {
|
|
|
- return(
|
|
|
- <Input
|
|
|
- value={text}
|
|
|
- onChange={(e) => {
|
|
|
- const value = e.target.value;
|
|
|
- let columns = dataSource.newOne.columns.map(c => {
|
|
|
- if(c.key === record.key) {
|
|
|
- c['alias'] = value;
|
|
|
- }
|
|
|
- return c;
|
|
|
- });
|
|
|
-
|
|
|
- dispatch({ type: 'dataSource/setNewModelField', name: 'columns', value: columns });
|
|
|
- }}
|
|
|
- >
|
|
|
- </Input>
|
|
|
- )
|
|
|
+ return <Input
|
|
|
+ value={text}
|
|
|
+ onChange={(e) => {
|
|
|
+ let columns = dataSource.newOne.columns.map(c => {
|
|
|
+ if(c.key === record.key) {
|
|
|
+ c['description'] = e.target.value;
|
|
|
+ }
|
|
|
+ return c;
|
|
|
+ });
|
|
|
+
|
|
|
+ dispatch({ type: 'dataSource/setNewModelField', name: 'columns', value: columns });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ </Input>
|
|
|
}
|
|
|
}, {
|
|
|
title: '数据类型',
|
|
|
@@ -162,25 +159,28 @@ class DataSourceColumnConfig extends React.Component {
|
|
|
}}
|
|
|
/>
|
|
|
}, {
|
|
|
- title: '备注',
|
|
|
- dataIndex: 'description',
|
|
|
- key: 'description',
|
|
|
- width: 200,
|
|
|
+ title: '别名',
|
|
|
+ dataIndex: 'alias',
|
|
|
+ key: 'alias',
|
|
|
+ width: 150,
|
|
|
render: (text, record) => {
|
|
|
- return <Input
|
|
|
- value={text}
|
|
|
- onChange={(e) => {
|
|
|
- let columns = dataSource.newOne.columns.map(c => {
|
|
|
- if(c.key === record.key) {
|
|
|
- c['description'] = e.target.value;
|
|
|
- }
|
|
|
- return c;
|
|
|
- });
|
|
|
-
|
|
|
- dispatch({ type: 'dataSource/setNewModelField', name: 'columns', value: columns });
|
|
|
- }}
|
|
|
- >
|
|
|
- </Input>
|
|
|
+ return(
|
|
|
+ <Input
|
|
|
+ value={text}
|
|
|
+ onChange={(e) => {
|
|
|
+ const value = e.target.value;
|
|
|
+ let columns = dataSource.newOne.columns.map(c => {
|
|
|
+ if(c.key === record.key) {
|
|
|
+ c['alias'] = value;
|
|
|
+ }
|
|
|
+ return c;
|
|
|
+ });
|
|
|
+
|
|
|
+ dispatch({ type: 'dataSource/setNewModelField', name: 'columns', value: columns });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ </Input>
|
|
|
+ )
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
@@ -207,7 +207,7 @@ class DataSourceColumnConfig extends React.Component {
|
|
|
<div className='errormessage' style={{ cursor: dataSource.newOne.invalidSQL ? 'text' : 'default', opacity: dataSource.newOne.invalidSQL ? '1' : '0' }}>未查询到列数据,请检查SQL是否正确</div>
|
|
|
<Button disabled={!dataSource.newOne.address} onClick={() => {
|
|
|
dispatch({ type: 'dataSource/importNewModelColumns' })
|
|
|
- }}>刷新</Button>
|
|
|
+ }}>获取列数据</Button>
|
|
|
</div>
|
|
|
</Form>
|
|
|
<Divider orientation="left">数据列</Divider>
|