Commit 332294b5 by zhaochengxiang

模型列表排序

parent a07a7037
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@ant-design/pro-table": "^2.45.0",
"@antv/g2": "^4.1.12", "@antv/g2": "^4.1.12",
"@antv/g6": "^4.2.1", "@antv/g6": "^4.2.1",
"@craco/craco": "^6.1.2", "@craco/craco": "^6.1.2",
......
...@@ -93,6 +93,16 @@ div[id^='__qiankun_microapp_wrapper_'] { ...@@ -93,6 +93,16 @@ div[id^='__qiankun_microapp_wrapper_'] {
// border-color: #333333 !important; // border-color: #333333 !important;
// } // }
.yy-pro-table-column-setting-list {
.yy-tree .yy-tree-treenode {
align-items: center !important;
}
.yy-tree .yy-tree-node-content-wrapper:hover {
background: transparent !important;
}
}
.yy-table-cell{ .yy-table-cell{
word-break: break-all; word-break: break-all;
} }
......
import { PostFile, GetJSON, PostJSON, Get } from "../util/axios" import { PostFile, GetJSON, PostJSON } from "../util/axios"
export function loadDataModelCatalog() { export function loadDataModelCatalog() {
return GetJSON("/datamodeler/easyDataModelerCURD/loadDataModelCatalog"); return GetJSON("/datamodeler/easyDataModelerCURD/loadDataModelCatalog");
......
...@@ -289,7 +289,7 @@ const ImportAction = (props) => { ...@@ -289,7 +289,7 @@ const ImportAction = (props) => {
return newEasyDataModelerIndices.filter(item => (item.indexedEasyDataModelAttributes||[]).length > 0); return newEasyDataModelerIndices.filter(item => (item.indexedEasyDataModelAttributes||[]).length > 0);
} }
const container = (<> const container = (<React.Fragment>
<ImportActionHeader <ImportActionHeader
form={form} form={form}
editable={action!=='detail'} editable={action!=='detail'}
...@@ -321,7 +321,7 @@ const ImportAction = (props) => { ...@@ -321,7 +321,7 @@ const ImportAction = (props) => {
editable={action!=='detail'} editable={action!=='detail'}
terms={terms} terms={terms}
/> />
</>); </React.Fragment>);
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
......
import React, { useState, useEffect, useRef } from "react"; import React, { useState, useEffect, useRef } from "react";
import { Table, Space, Button, Tooltip, Modal } from 'antd'; import { Space, Button, Tooltip, Modal } from 'antd';
import { EditOutlined, ReconciliationOutlined, DeleteOutlined } from '@ant-design/icons'; import { EditOutlined, ReconciliationOutlined, DeleteOutlined } from '@ant-design/icons';
import SmoothScroll from 'smooth-scroll'; import SmoothScroll from 'smooth-scroll';
import ProTable from "@ant-design/pro-table";
import { dispatchLatest } from '../../../../model'; import { dispatchLatest } from '../../../../model';
import { showMessage, getQueryParam } from '../../../../util'; import { showMessage, getQueryParam } from '../../../../util';
...@@ -11,7 +12,7 @@ import './ModelTable.less'; ...@@ -11,7 +12,7 @@ import './ModelTable.less';
const ModelTable = (props) => { const ModelTable = (props) => {
const { data, onChange, loading, onItemAction, onSelect, catalogId } = props; const { data, onChange, onItemAction, onSelect, catalogId } = props;
const [ selectedRowKeys, setSelectedRowKeys ] = useState([]); const [ selectedRowKeys, setSelectedRowKeys ] = useState([]);
const [modal, contextHolder] = Modal.useModal(); const [modal, contextHolder] = Modal.useModal();
...@@ -56,7 +57,6 @@ const ModelTable = (props) => { ...@@ -56,7 +57,6 @@ const ModelTable = (props) => {
{ {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
editable: false,
render: (text, record, index) => { render: (text, record, index) => {
return (index+1).toString(); return (index+1).toString();
}, },
...@@ -83,7 +83,6 @@ const ModelTable = (props) => { ...@@ -83,7 +83,6 @@ const ModelTable = (props) => {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 120, width: 120,
render: (text,record) => { render: (text,record) => {
return ( return (
<Space size='small'> <Space size='small'>
...@@ -164,8 +163,7 @@ const ModelTable = (props) => { ...@@ -164,8 +163,7 @@ const ModelTable = (props) => {
return ( return (
<div className='model-table'> <div className='model-table'>
<Table <ProTable
loading={loading}
components={{ components={{
body: { body: {
row: AnchorRow row: AnchorRow
...@@ -176,6 +174,13 @@ const ModelTable = (props) => { ...@@ -176,6 +174,13 @@ const ModelTable = (props) => {
rowKey={'id'} rowKey={'id'}
dataSource={data} dataSource={data}
pagination={false} pagination={false}
options={{
density: true,
setting: true,
reload: false,
}}
search={false}
tableAlertRender={false}
sticky sticky
/> />
{ contextHolder } { contextHolder }
......
@import '../../../../variables.less'; @import '../../../../variables.less';
.model-table { .model-table {
.yy-table { .yy-table {
height: calc(100vh - @header-height - @pm-4 - @pm-3 - @pm-3 - 37px - 37px - @pm-3) !important; height: calc(100vh - @header-height - @pm-4 - @pm-3 - @pm-3 - 37px - 37px - 48px - @pm-3) !important;
overflow: auto !important; overflow: auto !important;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment