Sfoglia il codice sorgente

诊断信息维护

zhouna 3 anni fa
parent
commit
03a57f1d49

+ 2 - 0
src/api/request.js

@@ -89,6 +89,8 @@ const request = {
 	delDiseaseById:'/daqe-center/diseaseManage/delDiseaseById',//通过id删除诊断
 	matchingDisease:'/daqe-center/diseaseManage/matchingDisease',//匹配诊断
 	upDiseaseById:'/daqe-center/diseaseManage/upDiseaseById',//修改诊断
+    getMatchingDiseasePage:'/daqe-center/diseaseManage/getMatchingDiseasePage',//待匹配诊断列表
+    importDisease:'/daqe-center/diseaseManage/importDisease',//诊断信息导入
 	
 	//药品管理
 	getDrugPage:'/daqe-center/drugManage/getDrugPage',//获取药品分页列表

+ 46 - 52
src/components/DiagManager/index.js

@@ -29,15 +29,20 @@ function DiagManager() {
   const [size, setSize] = useState(15);//每页显示条数
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
+  const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
+  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
   const [params, setParams] = useState({
     pages: 1,
 	current: 1,
     size: 15
   });
   const [form] = Form.useForm();
+  const tipMap={
+    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  };
 
-
-  let list = []
   let data = {
     pages: 1,
     current: 1,
@@ -68,38 +73,20 @@ function DiagManager() {
       }
     })
   }
-  
-  //模糊查询
-  // function getCodeCategory(val){
-  // 	  xPost(api.getCodeCategory,{groupType:val}).then((res) => {
-  // 	    if (res.data.code === 200) {
-  // 	      const data = res.data.data;
-  // 	      setgroupTypeList(data)
-  // 	    }
-  // 	  })
-  // }
-   // function onSearch(value) {
-	  // getCodeCategory(value)
-   // }
-   // function onFocus() {
-   // 	  getCodeCategory("")
-   // }
-   
-  
-  
+
   //删除
   function delDiseaseById() {
-	  console.log(Diagid)
-    xPost(api.delDiseaseById,{id:Diagid}).then((res) => {
+    post(api.delDiseaseById,{ids:Diagid}).then((res) => {
+	  setMsvisible(false);
       if (res.data.code === 200) {
         getDiseasePage();
-        setMsvisible(false);
-		setDiagid(null)
+		setDiagid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
+	  setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -143,12 +130,12 @@ function DiagManager() {
   //导入弹窗取消或关闭
   function handleCancel1() {
       setvisible1(false);
+		setUploadStatus(0);
   }
   //打开匹配弹窗
   function match(row){
     setvisible2(true)
 	setFormData(row)
-	console.log(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
@@ -197,7 +184,6 @@ function DiagManager() {
     setVisible(false)
 	getDiseasePage();
   }
-  const DataType =[]
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
@@ -207,25 +193,33 @@ function DiagManager() {
   //导入模板
   const props = {
     name: 'file',
-    action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
+	accept:".xls",
+	showUploadList:false,
+    action: api.importDisease,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-		console.log(info);
-      if (info.file.status !== 'uploading') {
-        console.log(info);
-      }
-      if (info.file.status === 'done') {
-        message.success(`${info.file.name} file uploaded successfully`);
-      } else if (info.file.status === 'error') {
-        message.error(`${info.file.name} file upload failed.`);
-      }
+	  const {response,status} = info.file;
+    if(status === 'done'){
+	  if (response.code === 200) {
+		getDiseasePage();		//刷新列表
+		//setvisible1(false);			//关闭导入弹窗
+		//message.success(`${info.file.name} 导入成功`);
+		setUploadStatus(1);
+		setUploadTip(response.data);
+	  } else{
+		//message.error(`${info.file.name} 导入失败.`);
+		setUploadStatus(2);
+	  }
+	}else if(status === 'error'){
+	  setUploadStatus(3);
+	}
     },
   };
   
   const columns = [
-    { title: '序号', dataIndex: 'id',},
+    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
     { title: '医院诊断名称', dataIndex: 'name',},
     { title: 'ICD-10编码', dataIndex: 'icd10',},
     { title: '标准诊断名称', dataIndex: 'standard',},
@@ -249,17 +243,17 @@ function DiagManager() {
           initialValues={{ status: '' }}
         >
           <Row gutter={24}>
-		  <Col span={4} key={0}>
+		  <Col span={5} key={0}>
 		    <Form.Item label="医院诊断名称" name="name">
 		      <Input placeholder="医院诊断名称" autoComplete='off'/>
 		    </Form.Item>
 		  </Col>
-		  <Col span={4} key={1}>
+		  <Col span={5} key={1}>
 		    <Form.Item label="ICD-10编码" name="icd10">
 		      <Input placeholder="ICD-10编码" autoComplete='off'/>
 		    </Form.Item>
 		  </Col>
-		  <Col span={4} key={2}>
+		  <Col span={5} key={2}>
 		    <Form.Item label="标准诊断名称" name="standard">
 		      <Input placeholder="标准诊断名称" autoComplete='off'/>
 		    </Form.Item>
@@ -273,14 +267,13 @@ function DiagManager() {
 					  // onFocus={onFocus}
 					  placeholder="全部"
                 >
+				  	<Option value={-1} key={-1}>全部</Option>
                     <Option value={0} key={0}>未匹配</Option>
 					<Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
-            
-            
-            <Col span={8} key={4}>
+            <Col span={5} key={4}>
               <Form.Item>
                 <Button type="primary" htmlType="submit">
                   查询
@@ -332,7 +325,7 @@ function DiagManager() {
         <Modal
           title={title}
           okText='确定'
-          cancelText='取消'
+          cancelText='关闭'
           width={'45%'}
           visible={visible}
           onCancel={cancel}
@@ -345,7 +338,7 @@ function DiagManager() {
 				<Modal
 				title="提示"
 				okText='确定'
-				cancelText='取消'
+				cancelText='关闭'
 				width={400}
 				visible={unsaved}
 				onOk={addCancel}
@@ -358,7 +351,7 @@ function DiagManager() {
       <Modal
         title="提示"
         okText='确定'
-        cancelText='取消'
+        cancelText='关闭'
         width={400}
         visible={msvisible}
         onOk={delDiseaseById}
@@ -367,17 +360,18 @@ function DiagManager() {
         <p>诊断信息删除后将无法恢复,确认删除这{Diagid.length}条信息。</p>
       </Modal>
 	  <Modal
+		destroyOnClose={true}
 	    title="提示"
-	    cancelText='关闭'
 	    width={400}
 	    visible={visible1}
 	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>取消</Button>}
+		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
 	  >
 	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>诊断信息导入:</span><Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+			<span>诊断信息导入:</span>
+		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
 		</div>
-		<span style={{color: 'red'}}>提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。</span>
+		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
 	  </Modal>
 	  <Modal
 	    title="提示"
@@ -385,7 +379,7 @@ function DiagManager() {
 	    width={800}
 	    visible={visible2}
 	    onCancel={handleCancel2}
-	  	footer={[<Button key="back" onClick={handleCancel2}>取消</Button>,<Button key="1" onClick={handleCancel2}>保存</Button>]}
+	  	footer={[<Button key="back" onClick={handleCancel2}>关闭</Button>,<Button key="1" onClick={handleCancel2}>保存</Button>]}
 	  >
 	    <MatchDiag row={formData}></MatchDiag>	
 	  </Modal>

+ 24 - 24
src/components/MedicalTeam/index.js

@@ -1,14 +1,15 @@
-import React, { useState, useEffect, useRef } from 'react';
-import { Form, Input, Button, Table, Pagination, Row, Col, Tooltip, DatePicker } from 'antd';
+import React, { useState, useEffect } from 'react';
+import { Form, Input, Button, Table, Row, Col, DatePicker } from 'antd';
 import '@common/common.less';
 import apiObj from '@api/index';
 import moment from "moment";
 import "moment/locale/zh-cn"
-const { post, api, xPost } = apiObj;
+import "./index.less"
+const { post, api, } = apiObj;
 const { RangePicker } = DatePicker;
 function MedicalTeam() {
   useEffect(() => {
-	getOperationLog();
+	getMedicalTeam();
   }, []);
   const [logList, setLogList] = useState([]);
   const [total, setTotal] = useState(0);
@@ -29,8 +30,8 @@ function MedicalTeam() {
 	size: size
   }
   //表格数据
-  function getOperationLog(param) {
-	post(api.getOperationLog, param || params).then((res) => {
+  function getMedicalTeam(param) {
+	post(api.getOfficialCapacityPage, param || params).then((res) => {
 	  if (res.data.code === 200) {
 		const data = res.data.data;
 		setLogList(data.records);
@@ -44,14 +45,14 @@ function MedicalTeam() {
 	setSize(pageSize)
 	setCurrent(current)
 	setParams(params)
-	getOperationLog()
+	getMedicalTeam()
   }
   function changePage(page, pageSize) {
 	params.current = page
 	params.size = pageSize
-	setParams(params)
-	setCurrent(page)
-	getOperationLog()
+	setParams(params);
+	setCurrent(page);
+	getMedicalTeam()
   }
 
   function onSelectChange(selectedRowKeys){
@@ -71,8 +72,8 @@ function MedicalTeam() {
 
   const onFinish = (value) => {
 	if (value.time){
-	  value.startDate = moment(value.time[0]).format('YYYY-MM-DD')
-	  value.endDate = moment(value.time[1]).format('YYYY-MM-DD')
+	  value.startDate = moment(value.time[0]).format('YYYY-MM-DD 00:00:00');
+	  value.endDate = moment(value.time[1]).format('YYYY-MM-DD 23:23:59');
 	}
 	const param = {
 	  ...data,
@@ -80,27 +81,26 @@ function MedicalTeam() {
 	}
 	setCurrent(1)
 	setParams(param)
-	getOperationLog(param);
+	getMedicalTeam(param);
   };
   const onReset = () => {
 	setCurrent(1)
 	setParams(data)
 	form.resetFields();
-	getOperationLog(data);
+	getMedicalTeam(data);
   };
   const columns = [
-	{ title: '医疗组ID', dataIndex: 'operationId', key: 'index' },
-	{ title: '医疗组名称', dataIndex: 'operationName', key: 'index' },
-	{ title: '上级科室', dataIndex: 'operationDate', key: 'index' },
-	{ title: '上级病区', dataIndex: 'operationIp', key: 'index' },
-	{ title: '关联医生', dataIndex: 'operationDate', key: 'index' },
+	{ title: '医疗组ID', dataIndex: 'operationId', key: 'index'},
+	{ title: '医疗组名称', dataIndex: 'operationName', key: 'index'},
+	{ title: '上级科室', dataIndex: 'operationDate', key: 'index'},
+	{ title: '上级病区', dataIndex: 'operationIp', key: 'index'},
+	{ title: '关联医生', dataIndex: 'operationDate', key: 'index'},
 	{ title: '状态', dataIndex: 'operationIp', key: 'index' },
 	{title: '操作', dataIndex: 'operation', key: 'operation', render: (text, record) =>{
-		console.log(22,text,record)
-		return <div className='operation'>
-		  			<a className="showDetail" onClick={onEdit}>修改</a>
-				  <a className="showDetail" onClick={onForbidden}>禁用</a>
-				  <a className="showDetail" onClick={onDelete}>删除</a>
+		return <div className="medical-team-operation">
+		  			<a onClick={onEdit}>修改</a>
+				  <a onClick={onForbidden}>禁用</a>
+				  <a onClick={onDelete}>删除</a>
 				</div>
 	  }},
   ];

+ 18 - 1
src/components/UserManager/addUser.js

@@ -301,10 +301,27 @@ function AddUser(props) {
             maxTagCount={1}
             treeCheckable
             showCheckedStrategy={SHOW_PARENT}
-            placeholder="请选择组织"
+            placeholder="请选择"
             style={{ width: '100%' }}
           />
         </Form.Item>
+		<Form.Item
+			name="titleId"
+			label="医疗组"
+		>
+		  {type == 3 ?
+			  <span>{initialValues.idcard}</span>
+			  :
+			  <Select placeholder="请选择">
+				{titleList.map((item) => {
+				  return (
+					  <Option value={item.name} key={item.name}>{item.val}</Option>
+				  )
+				})}
+			  </Select>
+		  }
+
+		</Form.Item>
         <Form.Item
           name="titleId"
           label="职称"