|
@@ -1,5 +1,5 @@
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
-import { Spin,Form, Input, Button, Table, Select, Space, Modal, message, Row, Col } from 'antd';
|
|
|
+import { Empty,ConfigProvider,Spin,Form, Input, Button, Table, Select, Space, Modal, message, Row, Col } from 'antd';
|
|
|
import { PlusOutlined } from '@ant-design/icons';
|
|
|
import AddDiag from './addDiag'
|
|
|
import { getCookie } from '@utils/index'
|
|
@@ -153,6 +153,15 @@ function DiagManager() {
|
|
|
message.warning(error.message || "接口出错,请重试",);
|
|
|
})
|
|
|
}
|
|
|
+ const renderEmpty = () => (
|
|
|
+ <Empty
|
|
|
+ imageStyle={{
|
|
|
+ height: 0,
|
|
|
+ }}
|
|
|
+ description={<span></span>}
|
|
|
+ >
|
|
|
+ </Empty>
|
|
|
+ )
|
|
|
const columns = [
|
|
|
{ title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
|
|
|
{ title: '操作时间', dataIndex: 'gmtModified', },
|
|
@@ -249,6 +258,7 @@ function DiagManager() {
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|
|
|
+ <ConfigProvider renderEmpty={renderEmpty}>
|
|
|
<Spin tip="加载中..." spinning={loading}>
|
|
|
<Table
|
|
|
/*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
|
|
@@ -256,6 +266,7 @@ function DiagManager() {
|
|
|
scroll={{ y: 'calc(100vh - 400px)' }}
|
|
|
dataSource={DiagList}
|
|
|
rowKey={record => record.id}
|
|
|
+
|
|
|
pagination={{
|
|
|
current: current,
|
|
|
pageSize: size,
|
|
@@ -268,6 +279,7 @@ function DiagManager() {
|
|
|
total: total
|
|
|
}} />
|
|
|
</Spin>
|
|
|
+ </ConfigProvider>
|
|
|
</div>
|
|
|
{/*<DiagContext.Provider value={{ formData }}>*/}
|
|
|
<AddDiag formData={formData} termSType={100} termType={4} onOk={saveMatching} title={title} visible={visible} cancel={cancel} flag={flag}/>
|