Browse Source

Merge branch 'dev' into test

莫凡 3 years ago
parent
commit
53bfd588e6

+ 7 - 4
src/components/DiagManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Space, Modal, message, Row, Col } from 'antd';
+import { 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'
@@ -19,6 +19,7 @@ function DiagManager() {
   const [visible, setVisible] = useState(false);//新增修改 弹窗
   const [flag, setFlag] = useState(false);//新增1或修改3
   const [delvisible, setDelvisible] = useState(false);//删除 弹窗
+  const [loading, setloading] = useState(true);//是否显示加载中
   const [formData, setFormData] = useState({});//当前行数据
   const [size, setSize] = useState(15);//每页显示条数
   const [total, setTotal] = useState(0);
@@ -52,11 +53,13 @@ function DiagManager() {
   //表格数据
   function getDiseasePage(param) {  //type(必填): 类型:1-化验、3-辅检、4-诊断、5-药品、6-手术和操作
   const hospitalId = getCookie('hospitalId')
+  setloading(true)
     post(api.getTermPage, {...(param || params),type:4,hospitalId:hospitalId}).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setDiagList(data.records);
         setTotal(data.total)
+		setloading(false)
       }
     })
   }
@@ -140,7 +143,6 @@ function DiagManager() {
       message.warning(error.message || "接口出错,请重试",);
     })
   }
-
   const columns = [
     { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
 	{ title: '操作时间', dataIndex: 'gmtModified', },
@@ -148,7 +150,7 @@ function DiagManager() {
     { title: 'ICD-10编码', dataIndex: 'code', },
     { title: '标准诊断名称', dataIndex: 'uniqueName', },
 	{ title: '标准术语状态', dataIndex: 'status',render: (text, record) => {
-      return record.status===1?'启用':'禁用';
+      return record.status===1?'启用':record.status?'禁用':'';
     }},
     { title: '是否匹配', dataIndex: 'isMatch',render: (text, record) => {
         return record.isMatch===1?'已匹配':'未匹配';
@@ -237,7 +239,7 @@ function DiagManager() {
             </Col>
           </Row>
         </div>
-
+	  <Spin tip="加载中..." spinning={loading}>
         <Table
           /*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
           columns={columns}
@@ -255,6 +257,7 @@ function DiagManager() {
             onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
             total: total
           }} />
+		  </Spin>
       </div>
       {/*<DiagContext.Provider value={{ formData }}>*/}
         <AddDiag formData={formData}  termSType={100} termType={4} onOk={saveMatching} title={title} visible={visible} cancel={cancel}  flag={flag}/>

+ 8 - 4
src/components/DrugManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Space, Modal, message, Row, Col } from 'antd';
+import { 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'
@@ -18,6 +18,7 @@ function DrugManager() {
   const [title, setTitle] = useState("");//新增/修改的弹窗标题
   const [visible, setVisible] = useState(false);//新增修改 弹窗
   const [delvisible, setDelvisible] = useState(false);//删除 弹窗
+  const [loading, setloading] = useState(true);//是否显示加载中
   const [flag, setFlag] = useState(false);//新增1或修改3
   const [formData, setFormData] = useState({});//当前行数据
   const [size, setSize] = useState(15);//每页显示条数
@@ -52,11 +53,13 @@ function DrugManager() {
   //表格数据
   function getDrugeryPage(param) {  //type(必填): 类型:1-化验、3-辅检、4-诊断、5-药品、6-手术和操作
 	const hospitalId = getCookie('hospitalId')
+	setloading(true)
 	post(api.getTermPage, {...(param || params),type:5,hospitalId:hospitalId}).then((res) => {
 	  if (res.data.code === 200) {
 		const data = res.data.data;
 		setDrugList(data.records);
 		setTotal(data.total)
+		setloading(false)
 	  }
 	})
   }
@@ -149,10 +152,10 @@ function DrugManager() {
 	{ title: '标准药品名称', dataIndex: 'uniqueName', },
 	{ title: '药品剂型', dataIndex: 'form', },
 	{ title: '标准术语状态', dataIndex: 'status',render: (text, record) => {
-		return record.status===1?'启用':'禁用';
+		return record.status===1?'启用':record.status?'禁用':'';
 	  }},
 	{ title: '剂型术语状态', dataIndex: 'formStatus',render: (text, record) => {
-		return record.status===1?'启用':'禁用';
+		return record.formStatus===1?'启用':record.formStatus?'禁用':'';
 	  }},
 	{ title: '是否匹配', dataIndex: 'isMatch',render: (text, record) => {
 		return record.isMatch===1?'已匹配':'未匹配';
@@ -254,7 +257,7 @@ function DrugManager() {
 			  </Col>
 			</Row>
 		  </div>
-
+		<Spin tip="加载中..." spinning={loading}>
 		  <Table
               /*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
 			  columns={columns}
@@ -272,6 +275,7 @@ function DrugManager() {
 				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
 				total: total
 			  }} />
+			  </Spin>
 		</div>
 		  <AddTerm formData={formData}  termSType={101} termType={5} onOk={saveMatching} title={title} visible={visible} cancel={cancel} flag={flag}/>
 		<Modal

+ 1 - 1
src/components/DutyRecord/index.js

@@ -264,7 +264,7 @@ function DutyRecord() {
 			<Modal
 				title="删除职务职称变更记录"
 				okText='确定'
-				cancelText='取消'
+				cancelText='关闭'
 				width={400}
 				visible={visible}
 				onOk={delRecord}

+ 7 - 3
src/components/SurgeryManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Space, Modal, message, Row, Col } from 'antd';
+import { 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'
@@ -17,6 +17,7 @@ function SurgManager() {
   const [Surgid, setSurgid] = useState([]);//当前操作行id
   const [title, setTitle] = useState("");//新增/修改的弹窗标题
   const [visible, setVisible] = useState(false);//新增修改 弹窗
+  const [loading, setloading] = useState(true);//是否显示加载中
   const [flag, setFlag] = useState(false);//新增1或修改3
   const [delvisible, setDelvisible] = useState(false);//删除 弹窗
   const [formData, setFormData] = useState({});//当前行数据
@@ -52,11 +53,13 @@ function SurgManager() {
   //表格数据
   function getSurgeryPage(param) {  //type(必填): 类型:1-化验、3-辅检、4-诊断、5-药品、6-手术和操作
   const hospitalId = getCookie('hospitalId')
+  setloading(true)
 	post(api.getTermPage, {...(param || params),type:6,hospitalId:hospitalId}).then((res) => {
 	  if (res.data.code === 200) {
 		const data = res.data.data;
 		setSurgList(data.records);
 		setTotal(data.total)
+		setloading(false)
 	  }
 	})
   }
@@ -148,7 +151,7 @@ function SurgManager() {
 	{ title: 'ICD-10编码', dataIndex: 'code', },
 	{ title: '标准手术/操作名称', dataIndex: 'uniqueName', },
 	{ title: '标准术语状态', dataIndex: 'status',render: (text, record) => {
-		return record.status===1?'启用':'禁用';
+		return record.status===1?'启用':record.status?'禁用':'';
 	  }},
 	{ title: '是否匹配', dataIndex: 'isMatch',render: (text, record) => {
 		return record.isMatch===1?'已匹配':'未匹配';
@@ -237,7 +240,7 @@ function SurgManager() {
 			  </Col>
 			</Row>
 		  </div>
-
+		<Spin tip="加载中..." spinning={loading}>
 		  <Table
               /*rowSelection={{ type: 'checkbox', ...rowSelection, }}*/
 			  columns={columns}
@@ -255,6 +258,7 @@ function SurgManager() {
 				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
 				total: total
 			  }} />
+			  </Spin>
 		</div>
 		  <AddTerm formData={formData}  termSType={106} termType={6} onOk={saveMatching} title={title} visible={visible} cancel={cancel}  flag={flag}/>
 		<Modal