|
|
@@ -11,8 +11,8 @@ import DataPreview from '../common/dataPreview/dataPreview'
|
|
|
import ListFilter from '../common/listFilter/index'
|
|
|
import EllipsisTooltip from '../common/ellipsisTooltip/index'
|
|
|
import Loading from '../common/loading/index'
|
|
|
+import CusIcon from '../common/cusIcon'
|
|
|
import './list.less'
|
|
|
-import CusIcon from '../common/cusIcon';
|
|
|
const { Content } = Layout
|
|
|
const { Option } = Select
|
|
|
|
|
|
@@ -148,6 +148,11 @@ class DataSource extends React.Component {
|
|
|
{ pGroups.map(g => (
|
|
|
<Breadcrumb.Item key={g.code}>
|
|
|
<Tag color={'blue'} >
|
|
|
+ {g.code === '-1' && <Icon title="分组维护" type="bars" onClick={() => {
|
|
|
+ this.setState({
|
|
|
+ visibleGroupManageMentBox: true
|
|
|
+ });
|
|
|
+ }}/>}
|
|
|
<span onClick={() => {
|
|
|
let group = dataSource.groupList.find(group => group.code === g.code);
|
|
|
dispatch({ type: 'dataSource/setCurrentGroup', group: group });
|
|
|
@@ -168,7 +173,7 @@ class DataSource extends React.Component {
|
|
|
dispatch({ type: 'dataSource/setCurrentGroup', group });
|
|
|
}}
|
|
|
>
|
|
|
- <Icon style={{ marginLeft: '2px', fontSize: '12px' }} type="down" />
|
|
|
+ <Icon style={{ marginLeft: '4px', fontSize: '12px' }} type="caret-down" />
|
|
|
</GroupSelector>
|
|
|
</Tag>
|
|
|
</Breadcrumb.Item>
|
|
|
@@ -251,6 +256,36 @@ class DataSource extends React.Component {
|
|
|
visibleDataPreviewBox: true
|
|
|
});
|
|
|
}}><Icon type="search" />预览数据</Menu.Item>
|
|
|
+ {/* <Menu.Item onClick={() => {
|
|
|
+ dispatch({ type: 'dataSource/remoteDataList', code: selectedRecord.code, page: 1, pageSize: 999999999 }).then(res => {
|
|
|
+ if(res) {
|
|
|
+ let tcolumns = []; // 时间类型列
|
|
|
+ tableToExcel({
|
|
|
+ fileName: selectedRecord.name,
|
|
|
+ sheets: [{
|
|
|
+ columns: res.columns.map(c => {
|
|
|
+ if(c.type === 'time') {
|
|
|
+ tcolumns.push(c.name);
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ name: c.label,
|
|
|
+ dataIndex: c.name,
|
|
|
+ width: 80,
|
|
|
+ type: ExcelType[c.type]
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ data: tcolumns.length > 0 ? res.dataSource.map(d => {
|
|
|
+ let obj = { ...d };
|
|
|
+ tcolumns.forEach(c => {
|
|
|
+ obj[c] = new Date(obj[c]).getTime();
|
|
|
+ });
|
|
|
+ return obj;
|
|
|
+ }) : res.dataSource
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }}><Icon type="export" />导出</Menu.Item> */}
|
|
|
<Menu.Divider />
|
|
|
{ selectedRecord && (currentUser.code === selectedRecord.creatorCode || currentUser.role === 'superAdmin') && <Menu.SubMenu className='setgroupmenu' title={<div><Icon style={{ marginRight: '6px' }} type='profile' />移动到</div>}>
|
|
|
{[<Menu.Item key='-1' onClick={() => {
|
|
|
@@ -387,15 +422,10 @@ class DataSource extends React.Component {
|
|
|
<Content>
|
|
|
<Card bordered={false} className='datasource-body' title={
|
|
|
<Row className='datasource-tools' type='flex' justify='space-between'>
|
|
|
- <Col style={{ display: 'flex', width: 'calc(100% - 324px)', overflow: 'hidden' }}>
|
|
|
+ <Col className="groups" style={{ display: 'flex', width: 'calc(100% - 324px)', overflow: 'hidden' }}>
|
|
|
<Checkbox style={{ marginTop: '4px' }} checked={noGroup} onChange={(e) => {
|
|
|
this.setState({noGroup: e.target.checked})
|
|
|
}}>未分组</Checkbox>
|
|
|
- <Icon type="bars" onClick={() => {
|
|
|
- this.setState({
|
|
|
- visibleGroupManageMentBox: true
|
|
|
- });
|
|
|
- }}/>
|
|
|
{ this.generateGroupTags() }
|
|
|
</Col>
|
|
|
<Col className='search'>
|