莫凡 3 лет назад
Родитель
Сommit
6b8dcb3ebf

+ 13 - 1
src/components/DiagManager/index.js

@@ -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}/>

+ 12 - 1
src/components/DrugManager/index.js

@@ -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 { getCookie } from '@utils/index'
 import AddTerm from '../DiagManager/addDiag'
@@ -155,6 +155,15 @@ function DrugManager() {
 	  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 },
@@ -268,6 +277,7 @@ function DrugManager() {
 			  </Col>
 			</Row>
 		  </div>
+		  <ConfigProvider renderEmpty={renderEmpty}>
 		<Spin tip="加载中..." spinning={loading}>
 		  <Table
               /*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
@@ -287,6 +297,7 @@ function DrugManager() {
 				total: total
 			  }} />
 			  </Spin>
+			  </ConfigProvider>
 		</div>
 		  <AddTerm formData={formData}  termSType={101} termType={5} onOk={saveMatching} title={title} visible={visible} cancel={cancel} flag={flag}/>
 		<Modal

+ 12 - 1
src/components/SurgeryManager/index.js

@@ -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 AddTerm from '../DiagManager/addDiag'
 import { getCookie } from '@utils/index'
@@ -153,6 +153,15 @@ function SurgManager() {
 	  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 },
@@ -250,6 +259,7 @@ function SurgManager() {
 			  </Col>
 			</Row>
 		  </div>
+		  <ConfigProvider renderEmpty={renderEmpty}>
 		<Spin tip="加载中..." spinning={loading}>
 		  <Table
               /*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
@@ -269,6 +279,7 @@ function SurgManager() {
 				total: total
 			  }} />
 			  </Spin>
+			  </ConfigProvider>
 		</div>
 		  <AddTerm formData={formData}  termSType={106} termType={6} onOk={saveMatching} title={title} visible={visible} cancel={cancel}  flag={flag}/>
 		<Modal