Преглед изворни кода

Merge remote-tracking branch 'origin/dev' into dev

zhouna пре 3 година
родитељ
комит
780cea41a1

+ 1 - 0
src/App.less

@@ -5,6 +5,7 @@
   background: @primary-color;
   height: @header-height;
   line-height: @header-height;
+  padding: 0 50px 0 29px;
 }
 .page-sider{
   height: calc(100vh - @header-height - 10px );

+ 1 - 0
src/api/request.js

@@ -132,6 +132,7 @@ const request = {
     getBlockLossPage:'/daqe-center/blockLossManage/getBlockLossPage',//病历数据丢失明细列表
     upBlockLossById:'/daqe-center/blockLossManage/upBlockLossById',//病历数据丢失明细修改
     dataCompare:'/daqe-center/blockLossManage/dataCompare',//数据对比
+    dataRepari:'/daqe-center/blockLossManage/dataRepari',//数据补录
     blockLossTypeGather:'/daqe-center/blockLossManage/blockLossTypeGather',//丢失量分类汇总
     
 

+ 91 - 66
src/common/common.less

@@ -1,14 +1,14 @@
-@body-bg:#EBEEF4; /**body背景色***/
-@bg-color:#fff;  /**主题背景色**/
-@header-height:50px;  /***Header高度**/
-@table-th-color:#F2F4F6;  /***表头背景色***/
-@active-bg:#DEF1FF;   /***下拉项选中背景色***/
+@body-bg: #ebeef4; /**body背景色***/
+@bg-color: #fff; /**主题背景色**/
+@header-height: 50px; /***Header高度**/
+@table-th-color: #f2f4f6; /***表头背景色***/
+@active-bg: #def1ff; /***下拉项选中背景色***/
 
-body{
+body {
   background: @body-bg;
   overflow-y: hidden;
 }
-.clearfix:after{
+.clearfix:after {
   content: "";
   display: block;
   height: 0;
@@ -20,132 +20,139 @@ body{
   zoom: 1;
 }
 
-.ant-form-item-label > label{
+.ant-form-item-label > label {
   color: #000;
 }
-.ant-modal-body .ant-table-tbody > tr > td{
+.ant-modal-body .ant-table-tbody > tr > td {
   padding: 6px;
 }
 /*.ant-table-wrapper{
   height: calc(100vh - 240px);
   overflow-y: auto;
 }*/
-.wrapper{
+.wrapper {
   min-width: 1214px;
   padding: 15px 30px;
-  .filter-box{
+  .filter-box {
     border-bottom: 1px @border-color-base solid;
   }
-  .ant-form-item{
+  .ant-form-item {
     margin-bottom: 15px;
   }
-  .basic{
+  .basic {
     background: #fff;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-radius: 4px;
   }
-  .table{
-    .table-header{
+  .table {
+    .table-header {
       display: flex;
       justify-content: space-between;
       padding: 15px 0;
-      .table-title{
+      .table-title {
         font-size: 16px;
         font-weight: bold;
       }
     }
   }
 }
-.ant-table-pagination-right{
+.ant-table-pagination-right {
   justify-content: flex-start;
 }
 //面包屑样式覆盖
-.ant-breadcrumb{
+.ant-breadcrumb {
   margin: 20px 0 30px 30px;
 }
 //步骤条样式覆盖
-.ant-steps-item-icon{
+.ant-steps-item-icon {
   width: 44px;
   height: 44px;
   line-height: 44px;
 }
-.ant-steps-item-tail{
-  top:18px;
+.ant-steps-item-tail {
+  top: 18px;
   left: 4px;
 }
-.ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after,
+.ant-steps-item-process
+  > .ant-steps-item-container
+  > .ant-steps-item-content
+  > .ant-steps-item-title::after,
 .ant-steps-item-title::after,
-.ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after{
-  background-color:#c2c2c2;
-}
-.ant-steps-item-icon, .ant-steps-item-content{
+.ant-steps-item-wait
+  > .ant-steps-item-container
+  > .ant-steps-item-content
+  > .ant-steps-item-title::after {
+  background-color: #c2c2c2;
+}
+.ant-steps-item-icon,
+.ant-steps-item-content {
   vertical-align: unset;
 }
-.ant-tabs-tabpane{
-  overflow-x:auto;
+.ant-tabs-tabpane {
+  overflow-x: auto;
 }
 //启用
-.Enable::before{
+.Enable::before {
   content: "";
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
+  position: relative;
+  left: -10px;
+  top: 14px;
   background: @link-color;
   border-radius: 50%;
 }
 //禁用
-.Disable::before{
+.Disable::before {
   content: "";
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
-  background: #FE9748;
+  position: relative;
+  left: -10px;
+  top: 14px;
+  background: #fe9748;
   border-radius: 50%;
 }
-.Delete::before{
+.Delete::before {
   content: "";
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
-  background: #FF4D4D;
+  position: relative;
+  left: -10px;
+  top: 14px;
+  background: #ff4d4d;
   border-radius: 50%;
 }
-.Adopt::before{
+.Adopt::before {
   content: "";
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
-  background: #FF4D4D;
+  position: relative;
+  left: -10px;
+  top: 14px;
+  background: #ff4d4d;
   border-radius: 50%;
 }
-.disable{
-  color: #FB8537 ;
+.disable {
+  color: #fb8537;
 }
-.delete{
-  color:#FF4D4D
+.delete {
+  color: #ff4d4d;
 }
-.adopt{
-  color:#22AC76
+.adopt {
+  color: #22ac76;
 }
-.menuItem:hover{
+.menuItem:hover {
   color: @primary-color;
-  background: #DBEEFF;
+  background: #dbeeff;
 }
-.record{
+.record {
   width: 150px;
   overflow: hidden;
   white-space: nowrap;
@@ -154,40 +161,58 @@ body{
 }
 
 //指定科室样式
-.treeContent{
+.treeContent {
   height: 408px;
   overflow-y: auto;
-  border: 1px solid #DEE2E9;
+  border: 1px solid #dee2e9;
   padding-bottom: 20px;
   position: relative;
-  .title{
+  .title {
     height: 30px;
     font-size: 14px;
     font-weight: 500;
     color: #333333;
     line-height: 30px;
-    background: #F2F4F6;
+    background: #f2f4f6;
     padding-left: 20px;
   }
-  .tree{
+  .tree {
     min-height: 100px;
     max-height: 342px;
     overflow-y: auto;
   }
-  .goTop{
+  .goTop {
     position: fixed;
     right: 11%;
     top: 67%;
     width: 30px;
     height: 30px;
-    border: 1px solid #D4D4D4;
+    border: 1px solid #d4d4d4;
     border-radius: 4px;
     vertical-align: middle;
     text-align: center;
   }
 }
-.user{
-  .ant-form-item{
+.user {
+  .ant-form-item {
     margin-bottom: 15px;
   }
-}
+}
+.toogle {
+  position: absolute;
+  bottom: 20px;
+  left: 26px;
+  .icon{
+    font-size: 20px;
+    color: #1690FF;
+  }
+}
+.logoT {
+  position: absolute;
+  bottom: 10px;
+  left: 25px;
+  font-size: 12px;
+  font-weight: 400;
+  color: #333333;
+  line-height: 17px;
+}

+ 49 - 8
src/components/BlockLossManage/editBlock.js

@@ -1,24 +1,29 @@
 import React, {
     useState, useEffect, useContext
 } from 'react';
-import { Form, Col, DatePicker, Button, Radio, TreeSelect, message, Space, Input } from 'antd';
+import { Form, Col, DatePicker, Button, Radio, message, Space, Input } from 'antd';
 import apiObj from '@api/index';
 import BlockContext from './block-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
+import { getCookie } from '@utils/index'
 const { RangePicker } = DatePicker;
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
 function EditBlock(props) {
     useEffect(() => {
+        if(type == 2){
+            setLimit(true)
+        }
     }, []);
     const [form] = Form.useForm();
     const [dates, setDates] = useState([]);
+    const [limit, setLimit] = useState(false);
     const { blockDetail, type } = useContext(BlockContext);
     const initialValues = blockDetail;
     const onFinish = values => {
         if (type == 1) {
-
+            dataRepari(values)
         } else if (type == 2) {
             dataCompare(values)
         } else {
@@ -26,6 +31,17 @@ function EditBlock(props) {
         }
 
     };
+    function change(e) {
+        const { value } = e.target;
+        if (type == 1) {
+            if (value) {
+                setLimit(true)
+            } else {
+                setLimit(false)
+            }
+        }
+
+    }
     function editBlock(values) {
         let params = {
             id: blockDetail.id,
@@ -48,8 +64,32 @@ function EditBlock(props) {
         }
         const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
         const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
-        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        if (!limit) {
+            return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        } else {
+            return current && current >= moment().endOf('day');
+        }
     };
+    //数据补录
+    function dataRepari(values) {
+        values.startDate = moment(values.time[0]).format('YYYY-MM-DD 00:00:00');
+        values.endDate = moment(values.time[1]).format('YYYY-MM-DD 23:23:59');
+        let params = {
+            behospitalCode: values.behospitalCode,
+            endDate: values.endDate,
+            startDate: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
+        }
+        post(api.dataRepari, params).then((res) => {
+            if (res.data.code === 200) {
+                props.userChange()
+                message.success(res.data.message);
+                form.resetFields();
+            } else {
+                message.error(res.data.message);
+            }
+        })
+    }
     //数据对比
     function dataCompare(values) {
         values.startDate = moment(values.time[0]).format('YYYY-MM-DD 00:00:00');
@@ -57,7 +97,8 @@ function EditBlock(props) {
         let params = {
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
-            startDate: values.startDate
+            startDate: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataCompare, params).then((res) => {
             if (res.data.code === 200) {
@@ -174,12 +215,12 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
                     </Form.Item>
                 </Col>
                 {
                     type == 1 ?
-                        <div style={{color:'#1690FF'}}>
+                        <div style={{ color: '#1690FF' }}>
                             提示:<br />
                             1、补录时间范围限制为30天,每一天数据量的同步时间约为1分钟。<br />
                             时间范围以患者入院时间为准。<br />
@@ -187,7 +228,7 @@ function EditBlock(props) {
                         </div>
                         :
                         type == 2 ?
-                            <div style={{color:'#1690FF'}}>
+                            <div style={{ color: '#1690FF' }}>
                                 提示:将比对所有【已丢失】状态数据和患者入院在时间范围内的数据。
                             </div>
                             : ''
@@ -198,7 +239,7 @@ function EditBlock(props) {
                             取消
                         </Button>
                         <Button type="primary" htmlType="submit">
-                        {type == 3 ? '保存' : '确定'}
+                            {type == 3 ? '保存' : '确定'}
                         </Button>
                     </Space>
                 </Form.Item>

+ 16 - 5
src/components/BlockLossManage/index.js

@@ -28,7 +28,9 @@ function BlockLossManage() {
     const [params, setParams] = useState({
         pages: 1,
         current: 1,
-        size: 15
+        size: 15,
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     const [form] = Form.useForm();
     let data = {
@@ -108,6 +110,15 @@ function BlockLossManage() {
         form.resetFields();
         getBlockLossPage(data);
     };
+    function getCurrentDataFront() {
+        let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        return time
+    }
+    // 结束时间
+    function getCurrentData() {
+        let time = new Date().toLocaleDateString()
+        return time
+    }
     const columns = [
         { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
         { title: '住院序号', dataIndex: 'behospitalCode', key: 'behospitalCode' },
@@ -151,7 +162,7 @@ function BlockLossManage() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ lossType: '', lossWay: '', isAudited: '', status: '' }}
+                    initialValues={{ lossType: '', lossWay: '', isAudited: '', status: '', time: [moment(getCurrentDataFront()), moment(getCurrentData())] }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>
@@ -164,17 +175,17 @@ function BlockLossManage() {
                         </Col>
                         <Col span={5} key={1}>
                             <Form.Item label="住院序号" name="behospitalCode">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="住院序号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
                             <Form.Item label="文书编号" name="recId">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书编号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
                             <Form.Item label="文书标题" name="recTitle">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书标题" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>

+ 1 - 1
src/components/BlockLossManage/index.less

@@ -1,6 +1,5 @@
 .table-data {
   display: flex;
-  justify-content: space-between;
   margin-bottom: 19px;
   .data-box {
     width: 380px;
@@ -9,6 +8,7 @@
     box-shadow: 0px 2px 4px 0px rgba(208, 208, 208, 0.5);
     border-radius: 2px;
     border: 1px solid #e2e5ef;
+    margin-right: 15px;
     .data-item {
       display: flex;
       flex-flow: column;

+ 156 - 156
src/components/DiagManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Form, Input, Button, Table, Select, Pagination, Space, Modal,  message, Row, Col, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Pagination, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddDiag from './addDiag'
 import MatchDiag from './MatchDiag.js'
@@ -30,18 +30,18 @@ function DiagManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配诊断选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -60,9 +60,9 @@ function DiagManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Diagrow)
-		getDiseasePage()
-		}
+      setFormData(Diagrow)
+      getDiseasePage()
+    }
   }
   //表格数据
   function getDiseasePage(param) {
@@ -77,17 +77,17 @@ function DiagManager() {
 
   //删除
   function delDiseaseById() {
-    post(api.delDiseaseById,{ids:Diagid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delDiseaseById, { ids: Diagid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getDiseasePage();
-		setDiagid([])
+        setDiagid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -130,121 +130,121 @@ function DiagManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Diagid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Diagid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function DiagChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getDiseasePage();
+    getDiseasePage();
   }
-  function saveMatching(){
-	post(api.matchingDisease, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getDiseasePage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingDisease, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getDiseasePage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setDiagid(selectedRowKeys)
+      setDiagid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importDisease,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  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 { 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);
+      }
     },
   };
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院诊断名称', dataIndex: 'name',},
-    { title: 'ICD-10编码', dataIndex: 'icd10',},
-    { title: '标准诊断名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院诊断名称', dataIndex: 'name', },
+    { title: 'ICD-10编码', dataIndex: 'icd10', },
+    { title: '标准诊断名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,36 +256,36 @@ function DiagManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院诊断名称" name="name">
-		      <Input placeholder="医院诊断名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={1}>
-		    <Form.Item label="ICD-10编码" name="icd10">
-		      <Input placeholder="ICD-10编码" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="标准诊断名称" name="standard">
-		      <Input placeholder="标准诊断名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院诊断名称" name="name">
+                <Input placeholder="医院诊断名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="ICD-10编码" name="icd10">
+                <Input placeholder="ICD-10编码" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="标准诊断名称" name="standard">
+                <Input placeholder="标准诊断名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={3}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -306,21 +306,21 @@ function DiagManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">诊断信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} type="primary" danger>删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 320px)' }}
           dataSource={DiagList}
@@ -348,25 +348,25 @@ function DiagManager() {
           footer={null}
           forceRender={true}
         >
-          <DiagContext.Provider value={{type, formData}}>
-            <AddDiag DiagChange={DiagChange} cancel={cancel} isChange={isChange}/>
+          <DiagContext.Provider value={{ type, formData }}>
+            <AddDiag DiagChange={DiagChange} cancel={cancel} isChange={isChange} />
           </DiagContext.Provider>
-				<Modal
-				maskClosable={false}
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            maskClosable={false}
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -377,34 +377,34 @@ function DiagManager() {
       >
         <p>诊断信息删除后将无法恢复,确认删除这{Diagid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>诊断信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    okText='保存'
-		cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchDiag row={formData} onChange={matchChange}></MatchDiag>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>诊断信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchDiag row={formData} onChange={matchChange}></MatchDiag>
+      </Modal>
     </div>
   )
 }

+ 5 - 5
src/components/DocTemplate/index.js

@@ -116,25 +116,25 @@ function DocTemplate() {
 			<Row gutter={24}>
 			  <Col span={5} key={0}>
 				<Form.Item label="医院模板ID" name="code">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院模板ID" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={1}>
 				<Form.Item label="医院模板名称" name="name">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院模板名称" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={2}>
 				<Form.Item label="医院父类模板ID" name="parentCode">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院父类模板ID" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={4}>
 				<Form.Item label="医院父类模板名称" name="parentName">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院父类模板名称" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
-			  <Col span={6} key={5}>
+			  <Col span={4} key={5}>
 				<Form.Item>
 				  <Button type="primary" htmlType="submit">
 					查询

+ 162 - 162
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, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddDrug from './addDrug'
 import MatchDrug from './MatchDrug.js'
@@ -29,18 +29,18 @@ function DrugManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配药品选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -59,9 +59,9 @@ function DrugManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Drugrow)
-		getDrugPage()
-		}
+      setFormData(Drugrow)
+      getDrugPage()
+    }
   }
   //表格数据
   function getDrugPage(param) {
@@ -76,17 +76,17 @@ function DrugManager() {
 
   //删除
   function delDrugById() {
-    post(api.delDrugById,{ids:Drugid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delDrugById, { ids: Drugid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getDrugPage();
-		setDrugid([])
+        setDrugid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -129,122 +129,122 @@ function DrugManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Drugid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Drugid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function DrugChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getDrugPage();
+    getDrugPage();
   }
-  function saveMatching(){
-	post(api.matchingDrug, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getDrugPage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingDrug, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getDrugPage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setDrugid(selectedRowKeys)
+      setDrugid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importDrug,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  const {response,status} = info.file;
-    if(status === 'done'){
-	  if (response.code === 200) {
-		getDrugPage();		//刷新列表
-		//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 { response, status } = info.file;
+      if (status === 'done') {
+        if (response.code === 200) {
+          getDrugPage();		//刷新列表
+          //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);
+      }
     },
   };
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院药品名称', dataIndex: 'name',},
-	{ title: '国药准字', dataIndex: 'approvalNum',},
-    { title: '药品剂型', dataIndex: 'dosageForm',},
-    { title: '标准药品名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院药品名称', dataIndex: 'name', },
+    { title: '国药准字', dataIndex: 'approvalNum', },
+    { title: '药品剂型', dataIndex: 'dosageForm', },
+    { title: '标准药品名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,41 +256,41 @@ function DrugManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院药品名称" name="name">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-			<Col span={5} key={1}>
-			  <Form.Item label="国药准字" name="approvalNum">
-				<Input placeholder="请输入" autoComplete='off'/>
-			  </Form.Item>
-			</Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="药品剂型" name="dosageForm">
-		      <Input placeholder="请选择" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={3}>
-		    <Form.Item label="标准药品名称" name="standard">
-		      <Input placeholder="标准药品名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院药品名称" name="name">
+                <Input placeholder="医院药品名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="国药准字" name="approvalNum">
+                <Input placeholder="国药准字" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="药品剂型" name="dosageForm">
+                <Input placeholder="请选择" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={3}>
+              <Form.Item label="标准药品名称" name="standard">
+                <Input placeholder="标准药品名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={4}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -311,21 +311,21 @@ function DrugManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">药品信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} type="primary" danger>删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 400px)' }}
           dataSource={DrugList}
@@ -353,25 +353,25 @@ function DrugManager() {
           footer={null}
           forceRender={true}
         >
-          <DrugContext.Provider value={{type, formData}}>
-            <AddDrug DrugChange={DrugChange} cancel={cancel} isChange={isChange}/>
+          <DrugContext.Provider value={{ type, formData }}>
+            <AddDrug DrugChange={DrugChange} cancel={cancel} isChange={isChange} />
           </DrugContext.Provider>
-				<Modal
-				maskClosable={false}
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            maskClosable={false}
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -382,34 +382,34 @@ function DrugManager() {
       >
         <p>药品信息删除后将无法恢复,确认删除这{Drugid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>药品信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    okText='保存'
-		cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchDrug row={formData} onChange={matchChange}></MatchDrug>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>药品信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchDrug row={formData} onChange={matchChange}></MatchDrug>
+      </Modal>
     </div>
   )
 }

+ 6 - 5
src/components/DutyRecord/index.js

@@ -129,26 +129,27 @@ function DutyRecord() {
 					form={form}
 					name="normal_login"
 					onFinish={onFinish}
+					initialValues={{ type: '0' }}
 				>
 					<Row gutter={24}>
 						<Col span={5} key={0}>
 							<Form.Item label="医生姓名" name="doctorName">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="医生姓名" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={1}>
 							<Form.Item label="科室" name="deptName">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="科室" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={2}>
 							<Form.Item label="工号" name="doctorCode">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="工号" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={3}>
 							<Form.Item label="职务/职称名称" name="name">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="职务/职称名称" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={4}>
@@ -189,7 +190,7 @@ function DutyRecord() {
 			<div className="table">
 				<div className="table-header">
 					<h2 className="table-title">职务职称变更记录</h2>
-					<Button type="primary" onClick={() => showDelModal(true)}>删除</Button>
+					<Button type="primary" onClick={() => showDelModal(true)} danger>删除</Button>
 				</div>
 
 				<Table

+ 19 - 3
src/components/FieldProblem/editProblem.js

@@ -6,6 +6,7 @@ import apiObj from '@api/index';
 import BlockContext from './problem-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
+import { getCookie } from '@utils/index'
 const { RangePicker } = DatePicker;
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
@@ -14,6 +15,7 @@ function EditBlock(props) {
     }, []);
     const [form] = Form.useForm();
     const [dates, setDates] = useState([]);
+    const [limit, setLimit] = useState(false);
     const { problemDetail, type } = useContext(BlockContext);
     const initialValues = problemDetail;
     const onFinish = values => {
@@ -24,6 +26,14 @@ function EditBlock(props) {
         }
 
     };
+    function change(e) {
+        const { value } = e.target;
+        if (value) {
+            setLimit(true)
+        } else {
+            setLimit(false)
+        }
+    }
     function editProblem(values) {
         let params = {
             id: problemDetail.id,
@@ -46,7 +56,8 @@ function EditBlock(props) {
         let params = {
             behospitalCode: values.behospitalCode,
             dateEnd: values.endDate,
-            dateStart: values.startDate
+            dateStart: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataCheck, params).then((res) => {
             if (res.data.code === 200) {
@@ -64,7 +75,12 @@ function EditBlock(props) {
         }
         const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
         const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
-        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        if(!limit){
+            return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        }else{
+            return current && current >= moment().endOf('day');
+        }
+        
     };
     function cancel() {
         props.userChange()
@@ -201,7 +217,7 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
                     </Form.Item>
                 </Col>
                 {

+ 30 - 7
src/components/FieldProblem/index.js

@@ -15,6 +15,16 @@ function FieldProblem() {
     useEffect(() => {
         getColumnResultPage();
         getColumnResultNumber()
+        console.log(new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString());
+        // getCurrentDataFront() {
+        //     let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        //     return time
+        // },
+        // // 结束时间
+        // getCurrentData() {
+        //     let time = new Date().toLocaleDateString()
+        //     return time
+        // },
     }, []);
     const [logList, setLogList] = useState([]);
     const [total, setTotal] = useState(0);
@@ -28,7 +38,9 @@ function FieldProblem() {
     const [params, setParams] = useState({
         pages: 1,
         current: 1,
-        size: 15
+        size: 15,
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     const [form] = Form.useForm();
     let data = {
@@ -106,6 +118,15 @@ function FieldProblem() {
         form.resetFields();
         getColumnResultPage(data);
     };
+    function getCurrentDataFront() {
+        let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        return time
+    }
+    // 结束时间
+    function getCurrentData() {
+        let time = new Date().toLocaleDateString()
+        return time
+    }
     const columns = [
         { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
         { title: '住院序号', dataIndex: 'behospitalCode', key: 'behospitalCode' },
@@ -145,7 +166,9 @@ function FieldProblem() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ isSolved: '', type: '' }}
+                    initialValues={{
+                        isSolved: '', type: '', time: [moment(getCurrentDataFront()), moment(getCurrentData())]
+                    }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>
@@ -158,22 +181,22 @@ function FieldProblem() {
                         </Col>
                         <Col span={5} key={1}>
                             <Form.Item label="住院序号" name="behospitalCode">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="住院序号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
                             <Form.Item label="文书编号" name="recId">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书编号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
                             <Form.Item label="文书标题" name="recTitle">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书标题" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>
                             <Form.Item label="质控模块名称" name="modeName">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="质控模块名称" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={5}>
@@ -242,7 +265,7 @@ function FieldProblem() {
                             <p>未处理</p>
                         </Col>
                     </Row>
-                    <Row className="data-box" style={{ marginLeft: '20px' }}>
+                    <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
                             <p>{probleData.resolvedNonnull || '-'}</p>
                             <p>数据缺失</p>

+ 6 - 5
src/components/FieldRules/addRules.js

@@ -109,7 +109,7 @@ function ContentForm(props) {
         seIsChange(false)
         setColList([...colList])
     }
-    function colchange(value, options){
+    function colchange(value, options) {
         const formData = form.getFieldsValue();
         let columnList = formData.columnList;
         columnList[options.index].id = options.key
@@ -142,7 +142,7 @@ function ContentForm(props) {
         let standardValueList = formData.standardValueList;
         if (i == 0) {
             standardValueList.push({
-                tit: ''
+                tit: null
             })
         } else {
             standardValueList.splice(i, 1)
@@ -171,12 +171,14 @@ function ContentForm(props) {
     }
     function addColumnVerify() {
         const formData = form.getFieldsValue();
-        console.log(formData);
         let arr = []
         let url
         formData.standardValueList.forEach(it => {
-            arr.push(it.tit)
+            if (it.tit) {
+                arr.push(it.tit)
+            }
         });
+        console.log(arr);
         formData.standardValueList = arr
         if (type == 1) {
             url = api.addColumnVerify
@@ -204,7 +206,6 @@ function ContentForm(props) {
             seIsChange(false)
             list.forEach((item, i) => {
                 detail.columnList.forEach(it => {
-                    console.log(456);
                     if (item.getTableNameDTO.tableCname == it.tableCname) {
                         let colList = list[i].getColumnNameDTOList
                         console.log(colList);

+ 21 - 21
src/components/FieldRules/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space,message } from 'antd';
+import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space, message } from 'antd';
 import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
 import '@common/common.less';
 import apiObj from '@api/index';
@@ -128,42 +128,42 @@ function FieldRules() {
         setVisible(flag)
     }
     //新增修改跳转
-    function showModal(type,id) {
+    function showModal(type, id) {
         setAddVisible(true)
         setType(type)
-        if(type == 1){
+        if (type == 1) {
             setFiledDetail({
                 columnList: [{
                     columnCname: undefined,
                     columnEname: undefined,
                     ableCname: undefined,
                     tableEname: undefined,
-                    id:undefined
+                    id: undefined
                 }],
                 standardValueList: [{
-                    tit: ''
+                    tit: null
                 }]
             })
-        }else{
+        } else {
             getByIdColumnVerify(id)
         }
-        
+
     }
     //详情
-    function getByIdColumnVerify(id){
+    function getByIdColumnVerify(id) {
         const param = {
             columnId: id,
         }
         post(api.getByIdColumnVerify, param).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
-                const arr ={
+                const arr = {
                     columnList: [{
                         columnCname: data.columnCname,
                         columnEname: data.columnEname,
                         tableCname: data.tableCname,
                         tableEname: data.tableEname,
-                        id:data.id
+                        id: data.id
                     }],
                     standardValueList: [{
                         tit: data.standardvalue,
@@ -212,23 +212,23 @@ function FieldRules() {
         getColumnVerifyPage(data);
     };
     const columns = [
-        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1,width: 60 },
-        { title: '表名称(中文)', dataIndex: 'tableCname', key: 'tableCname',width: 130, },
-        { title: '表名称(英文)', dataIndex: 'tableEname', key: 'tableEname',width: 130, },
-        { title: '字段名称(中文)', dataIndex: 'columnCname', key: 'columnCname',width: 145, },
-        { title: '字段名称(英文)', dataIndex: 'columnEname', key: 'columnEname',width: 145, },
+        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1, width: 60 },
+        { title: '表名称(中文)', dataIndex: 'tableCname', key: 'tableCname', width: 130, },
+        { title: '表名称(英文)', dataIndex: 'tableEname', key: 'tableEname', width: 130, },
+        { title: '字段名称(中文)', dataIndex: 'columnCname', key: 'columnCname', width: 145, },
+        { title: '字段名称(英文)', dataIndex: 'columnEname', key: 'columnEname', width: 145, },
         {
             title: '是否必填', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
-                return record.isRequired == 1 ? "是" : "否";
+                return record.isRequired == 1 ? "是" : record.isRequired == 0 ? "否" : '';
             }
         },
-        { title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue',width: 110 },
-        { title: '正则式名称', dataIndex: 'regular', key: 'regular',width: 110 },
+        { title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue', width: 110 },
+        { title: '正则式名称', dataIndex: 'regular', key: 'regular', width: 110 },
         { title: '说明', dataIndex: 'description', key: 'description' },
         {
             title: '操作', dataIndex: 'key', render: (text, record) => (
                 <Space size="middle">
-                    <a onClick={() => showModal(2,record.columnId)}>修改</a>
+                    <a onClick={() => showModal(2, record.columnId)}>修改</a>
                 </Space>
             )
         }
@@ -251,7 +251,7 @@ function FieldRules() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ lossType: '', lossWay: '', isRequired: '', regularName: '' }}
+                    initialValues={{ lossType: '', lossWay: '', isRequired: '' }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>
@@ -312,7 +312,7 @@ function FieldRules() {
                         </Col>
                         <Col span={5} key={5}>
                             <Form.Item label="标准值" name="standardValue">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="标准值" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={6}>

+ 115 - 0
src/components/MedicalTeam/addMedical.js

@@ -0,0 +1,115 @@
+import React, {
+  useState, useEffect, useContext
+} from 'react';
+import {  Form, Input, Select, Button, Switch, TreeSelect, message, Space } from 'antd';
+import apiObj from '@api/index';
+import { organizationData } from '@utils/index'
+import MedicalContext from './medical-context';
+import { useSelector } from 'react-redux'
+const { post, api, xPost } = apiObj;
+const { Option } = Select;
+
+function AddMedical(props){
+	//加载下拉条件
+	useEffect(() => {
+	  // getHospitalTree();
+	  // getCreateRoles()
+	});
+	const [form] = Form.useForm(); 
+	const { formData } = useContext(MedicalContext); //中间组件传值过来的
+	const initialValues = formData; //表单的值
+	console.log(initialValues);
+	
+	const staticInfo = useSelector(state => {
+	  return state.staticInfo;
+	});
+	const { titleList } = staticInfo; //上级科室
+	
+	const onFinish = values => {
+	  let params = values
+	  // addHospitalTreeVO.hospitals = unique(addHospitalTreeVO.hospitals)
+	  // params.addHospitalTreeVO = addHospitalTreeVO
+	  // if (type == 2) {
+	  //   params.id = userId
+	  //   editUser(params)
+	  // } else {
+	  //   addUser(params)
+	  // }
+	
+	};
+	//接收父组件的方法
+	function cancel() {
+	  props.userChange()
+	}
+	
+	return (
+		<>
+			<Form
+			  labelCol={{ span: 6 }}
+			  wrapperCol={{ span: 16 }}
+			  form={form}
+			  name="register"
+			  onFinish={onFinish}
+			  initialValues={initialValues}
+			>
+				<Form.Item
+				  name="username"
+				  label="医疗组ID"
+				>
+					<Input placeholder="请输入医疗组ID" autoComplete='off'/>
+				</Form.Item>
+				<Form.Item
+				  name="name"
+				  label="医疗组名称"
+				  rules={[
+				    {
+				      required: true,
+				      message: '请输入医疗组名称',
+				    },
+				  ]}
+				>
+					<Input placeholder="请输入医疗组名称" autoComplete='off'/>
+				</Form.Item>
+				<Form.Item
+				  name="titleId"
+				  label="上级科室"
+				>
+				  
+				    <Select placeholder="请选择上级科室">
+				      {titleList.map((item) => {
+				        return (
+				          <Option value={item.name} key={item.name}>{item.val}</Option>
+				        )
+				      })}
+				    </Select>
+				</Form.Item>
+				<Form.Item
+				  name="titleId"
+				  label="上级病区"
+				>
+				  
+				    <Select placeholder="请选择上级病区">
+				      {titleList.map((item) => {
+				        return (
+				          <Option value={item.name} key={item.name}>{item.val}</Option>
+				        )
+				      })}
+				    </Select>
+				</Form.Item>
+				
+				
+				<Form.Item wrapperCol={{ offset: 8, span: 16 }}>
+				  <Space size="middle">
+				    <Button htmlType="button" onClick={e => cancel()}>
+				      取消
+				  </Button>
+				    <Button type="primary" htmlType="submit">
+				      保存
+				  </Button>
+				  </Space>
+				</Form.Item>
+			</Form>
+		</>
+	)
+}
+export default AddMedical;

+ 283 - 182
src/components/MedicalTeam/index.js

@@ -1,194 +1,295 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Row, Col, DatePicker } from 'antd';
+import { Form, Input, Button, Table, Row, Col, DatePicker,Modal } from 'antd';
 import '@common/common.less';
 import apiObj from '@api/index';
 import moment from "moment";
 import "moment/locale/zh-cn"
+import medicalContext from './medical-context';
+import AddMedical from './addMedical.js';
 // import "./index.less"
-const { post, api, } = apiObj;
-const { RangePicker } = DatePicker;
+	const { post, api, } = apiObj;
+	const { RangePicker } = DatePicker;
 function MedicalTeam() {
-  useEffect(() => {
-	getMedicalTeam();
-  }, []);
-  const [logList, setLogList] = useState([]);
-  const [total, setTotal] = useState(0);
-  const [size, setSize] = useState(15);
-  const [current, setCurrent] = useState(1);
-  const [selectedRowKeys, setSelectedRowKeys] = useState([]);
-  const [params, setParams] = useState({
-	pages: 1,
-	current: 1,
-	size: 15
-  });
-  const [form] = Form.useForm();
-
-  let list = []
-  let data = {
-	pages: 1,
-	current: 1,
-	size: size
-  }
-  //表格数据
-  function getMedicalTeam(param) {
-	post(api.getOfficialCapacityPage, param || params).then((res) => {
-	  if (res.data.code === 200) {
-		const data = res.data.data;
-		setLogList(data.records);
-		setTotal(data.total)
-	  }
-	})
-  }
-  function onSizeChange(current, pageSize) {
-	params.current = current
-	params.size = pageSize
-	setSize(pageSize)
-	setCurrent(current)
-	setParams(params)
-	getMedicalTeam()
-  }
-  function changePage(page, pageSize) {
-	params.current = page
-	params.size = pageSize
-	setParams(params);
-	setCurrent(page);
-	getMedicalTeam()
-  }
-
-  function onSelectChange(selectedRowKeys){
-	console.log('selectedRowKeys changed: ', selectedRowKeys);
-	setSelectedRowKeys(selectedRowKeys);
-  };
-
-  function onEdit(){
-
-  }
-  function onForbidden(){
-
-  }
-  function onDelete(){
-
-  }
-
-  const onFinish = (value) => {
-	if (value.time){
-	  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');
+	useEffect(() => {
+		getMedicalTeam();
+	}, []);
+	const [logList, setLogList] = useState([{operationId:'3233',operationName:'张三',operationDate:'心电',operationIp:'232323',operationDate:'232323',status:'1'},
+	{operationId:'3233',operationName:'张三',operationDate:'心电',operationIp:'232323',operationDate:'232323',status:'2'}]);
+	const [total, setTotal] = useState(0);
+	const [size, setSize] = useState(15);
+	const [current, setCurrent] = useState(1);
+	const [selectedRowKeys, setSelectedRowKeys] = useState([]);
+	const [params, setParams] = useState({
+		pages: 1,
+		current: 1,
+		size: 15
+	});
+	const [form] = Form.useForm(); 
+	//表格
+	let list = []
+	let data = {
+		pages: 1,
+		current: 1,
+		size: size
 	}
-	const param = {
-	  ...data,
-	  ...value,
+	//表格数据
+	function getMedicalTeam(param) {
+		post(api.getOfficialCapacityPage, param || params).then((res) => {
+		  if (res.data.code === 200) {
+			const data = res.data.data;
+			// setLogList(data.records);
+			setTotal(data.total)
+		  }
+		})
 	}
-	setCurrent(1)
-	setParams(param)
-	getMedicalTeam(param);
-  };
-  const onReset = () => {
-	setCurrent(1)
-	setParams(data)
-	form.resetFields();
-	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: '状态', dataIndex: 'operationIp', key: 'index' },
-	{title: '操作', dataIndex: 'operation', key: 'operation', render: (text, record) =>{
-		return <div className="medical-team-operation">
-		  			<a onClick={onEdit}>修改</a>
-				  <a onClick={onForbidden}>禁用</a>
-				  <a onClick={onDelete}>删除</a>
-				</div>
-	  }},
-  ];
-  const rowSelection = {
-	selectedRowKeys,
-	onChange: onSelectChange,
-  };
-  return (
-	  <div className="wrapper">
-		<div className="filter-box">
-		  <Form
-			  form={form}
-			  name="normal_login"
-			  onFinish={onFinish}
-			  initialValues={{ status: '' }}
-		  >
-			<Row gutter={24}>
-			  <Col span={5} key={0}>
-				<Form.Item label="医疗组ID" name="operationName">
-				  <Input placeholder="请输入" autoComplete='off'/>
-				</Form.Item>
-			  </Col>
-			  <Col span={5} key={1}>
-				<Form.Item label="医疗组名称" name="operationName">
-				  <Input placeholder="请输入" autoComplete='off'/>
-				</Form.Item>
-			  </Col>
-			  <Col span={5} key={2}>
-				<Form.Item label="上级科室" name="operationName">
-				  <Input placeholder="请输入" autoComplete='off'/>
-				</Form.Item>
-			  </Col>
-			  <Col span={5} key={3}>
-				<Form.Item label="上级病区" name="operationName">
-				  <Input placeholder="请输入" autoComplete='off'/>
-				</Form.Item>
-			  </Col>
-			  <Col span={5} key={4}>
-				<Form.Item label="关联医生" name="operationName">
-				  <Input placeholder="请输入" autoComplete='off'/>
-				</Form.Item>
-			  </Col>
-			  <Col span={7} key={5}>
-				<Form.Item label="状态" name="operationName">
-				  <RangePicker
-					  placeholder={['开始时间', '结束时间']}
-				  />
-				</Form.Item>
-			  </Col>
-			  <Col span={6} key={6}>
-				<Form.Item>
-				  <Button type="primary" htmlType="submit">
-					查询
-				  </Button>
-				  <Button onClick={onReset}>
-					重置
-				  </Button>
-				</Form.Item>
-			  </Col>
-			</Row>
-		  </Form>
-		</div>
-
-		<div className="table">
-		  <div className="table-header">
-			<h2 className="table-title">医疗组管理</h2>
-			<Button type="primary" >新增</Button>
-		  </div>
-		  <Table
-			  columns={columns}
-			  rowSelection={rowSelection}
-			  scroll={{ y: 'calc(100vh - 360px)' }}
-			  dataSource={logList}
-			  rowKey={record => record.id}
-			  pagination={{
-				pageSize: size,
-				size: 'small',
-				current: current,
-				showSizeChanger: true,
-				pageSizeOptions: ['15', '30', '60', '120'],
-				showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
-				onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
-				onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
-				total: total
-			  }} />
-		</div>
-	  </div >
-  )
+	function onSizeChange(current, pageSize) {
+		params.current = current
+		params.size = pageSize
+		setSize(pageSize)
+		setCurrent(current)
+		setParams(params)
+		getMedicalTeam()
+	}
+	function changePage(page, pageSize) {
+		params.current = page
+		params.size = pageSize
+		setParams(params);
+		setCurrent(page);
+		getMedicalTeam()
+	}
+	
+	function onSelectChange(selectedRowKeys){
+		console.log('selectedRowKeys changed: ', selectedRowKeys);
+		setSelectedRowKeys(selectedRowKeys);
+	};
+	
+	function onEdit(){
+	
+	}
+	function onForbidden(){
+	
+	}
+	function onDelete(){
+	
+	}
+	//弹窗类型:1.禁用 2.启用 3.删除 (1.有关联医生,2.没有关联医生)
+	const [modalType, setModalType] = useState(1);
+	//弹框提示文字
+	const tipText={
+		1:'确认禁用该医疗组?',
+		2:'该医疗组信息关联医生,禁用后将自动解除关联,确认禁用该数据?',
+		3:'医疗组信息删除后将无法恢复,确认删除该数据?',
+		4:'该医疗组信息关联医生,删除后将自动解除关联,确认删除该数据?'  
+	}
+	const [visibleModel, setVisible] = useState(false);   //删除禁用确认弹窗显示
+	const [confirmLoading, setConfirmLoading] = useState(false);
+	//启用/禁用 flag=1启用 :禁用
+	const enable=(flag,id,type)=>{
+			//请求接口
+	}
+	//启用/禁用弹框打开方法
+	const showModal=(type,id,flag)=>{
+		setModalType(type);
+		setVisible(true)
+	}
+		//启用/禁用弹窗取消
+		const handleCancel=()=>{
+			setVisible(false);
+			// setAddVisible(false);
+		}
+		//启用/禁用弹窗确认事件
+	  function handleOk() {
+	      if ("1,2".indexOf(modalType) > -1) {
+	          // onDelete();
+	      } else if ("3,4".indexOf(modalType) > -1) {
+	          enable(0);
+	      } else if (modalType === 5) {
+	          // onResetPsd();
+	      }
+	
+	  }
+	
+		//打开新增修改弹框
+		const [addVisible,setaddVisible] = useState(false); //弹框是否显示
+		const [formData, setFormData] = useState(null); //弹框是否有数据
+		const [title, setTitle] = useState("");    //弹框的标题
+		const [type, setType] = useState("");    //弹框类型是新增还是修改
+		const [userId, setUserId] = useState(""); 
+		//新增/修改弹框打开方法(flag 1:新增,2:修改 )
+		const showAddModel=(name,flag,userId)=>{
+			console.log('111',flag)
+			setTitle(name);
+			setType(flag)
+			setUserId(userId)
+			if (flag == 1||flag == 2) {
+			  setFormData({
+			    status: '1'
+			  })
+			}
+			setaddVisible(true);
+		}
+		//新增修改弹框关闭方法
+		function cancel() {
+		  setVisible(false)
+		  setFormData(null)
+		}
+		//点击按钮关闭
+		function userChange() {
+		  setVisible(false)
+		  setFormData(null)
+		  //重新渲染列表
+		  // getUserPage();
+		}
+	
+	const onFinish = (value) => {
+		if (value.time){
+		  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,
+		  ...value,
+		}
+		setCurrent(1)
+		setParams(param)
+		getMedicalTeam(param);
+	};
+	const onReset = () => {
+		setCurrent(1)
+		setParams(data)
+		form.resetFields();
+		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: '状态', dataIndex: 'operationIp', key: 'index' },
+		{title: '操作', dataIndex: 'operationId', key: 'operationId', render: (text, record) =>{
+			return <div className="medical-team-operation">
+			  			<a onClick={e => showAddModel('修改医疗组信息', 2)}>修改</a>
+					  	{record.status === '1' ?(<a onClick={()=>showModal(record.hasUserFlag || record.hasHospitalFlag ? 2 : 1, record.operationId, record.type='')}>禁用</a>):(<a onClick={enable}>启用</a>)}
+					 	<a onClick={()=>showModal(record.UserFlag || record.HospitalFlag ? 4 : 3, record.operationId, record.type='')}>删除</a>
+					</div>
+		  }},
+	];
+	const rowSelection = {
+		selectedRowKeys,
+		onChange: onSelectChange,
+	};
+	return (
+		  <div className="wrapper">
+			<div className="filter-box">
+			  <Form
+				  form={form}
+				  name="normal_login"
+				  onFinish={onFinish}
+				  initialValues={{ status: '' }}
+			  >
+				<Row gutter={24}>
+				  <Col span={5} key={0}>
+					<Form.Item label="医疗组ID" name="operationName">
+					  <Input placeholder="请输入" autoComplete='off'/>
+					</Form.Item>
+				  </Col>
+				  <Col span={5} key={1}>
+					<Form.Item label="医疗组名称" name="operationName">
+					  <Input placeholder="请输入" autoComplete='off'/>
+					</Form.Item>
+				  </Col>
+				  <Col span={5} key={2}>
+					<Form.Item label="上级科室" name="operationName">
+					  <Input placeholder="请输入" autoComplete='off'/>
+					</Form.Item>
+				  </Col>
+				  <Col span={5} key={3}>
+					<Form.Item label="上级病区" name="operationName">
+					  <Input placeholder="请输入" autoComplete='off'/>
+					</Form.Item>
+				  </Col>
+				  <Col span={5} key={4}>
+					<Form.Item label="关联医生" name="operationName">
+					  <Input placeholder="请输入" autoComplete='off'/>
+					</Form.Item>
+				  </Col>
+				  <Col span={7} key={5}>
+					<Form.Item label="状态" name="operationName">
+					  <RangePicker
+						  placeholder={['开始时间', '结束时间']}
+					  />
+					</Form.Item>
+				  </Col>
+				  <Col span={6} key={6}>
+					<Form.Item>
+					  <Button type="primary" htmlType="submit">
+						查询
+					  </Button>
+					  <Button onClick={onReset}>
+						重置
+					  </Button>
+					</Form.Item>
+				  </Col>
+				</Row>
+			  </Form>
+			</div>
+	
+			<div className="table">
+			  <div className="table-header">
+				<h2 className="table-title">医疗组管理</h2>
+				<Button type="primary" onClick={(e) => showAddModel('新增医疗组信息', 1)}>新增</Button>
+			  </div>
+			  <Table
+				  columns={columns}
+				  rowSelection={rowSelection}
+				  scroll={{ y: 'calc(100vh - 360px)' }}
+				  dataSource={logList}
+				  rowKey={record => record.id}
+				  pagination={{
+					pageSize: size,
+					size: 'small',
+					current: current,
+					showSizeChanger: true,
+					pageSizeOptions: ['15', '30', '60', '120'],
+					showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+					onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+					onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+					total: total
+				  }} />
+			</div>
+			
+			{addVisible && formData ?
+			  <Modal
+			    title={title}
+			    okText='确定'
+			    cancelText='取消'
+			    width={500}
+			    visible={addVisible}
+			    onCancel={cancel}
+			    footer={null}
+			    forceRender={true}
+			  >
+					<medicalContext.Provider value={{ formData }}>
+					  <AddMedical userChange={userChange} />
+					</medicalContext.Provider>
+			  </Modal>
+			  : ''}
+			
+			<Modal
+	              title="提示"
+	              okText='确定'
+	              cancelText='取消'
+	              width={400}
+	              visible={visibleModel}
+	              onOk={handleOk}
+	              confirmLoading={confirmLoading}
+	              onCancel={handleCancel}
+	          >
+	          <p>{tipText[modalType]}</p>
+	      </Modal>
+		  </div >
+	)
 }
 
 export default MedicalTeam;

+ 4 - 0
src/components/MedicalTeam/medical-context.js

@@ -0,0 +1,4 @@
+import { createContext } from 'react';
+const MedicalContext = createContext(null);
+
+export default MedicalContext;

+ 61 - 61
src/components/MyMessage/index.js

@@ -4,7 +4,7 @@ import { Table, Modal, message, Menu, Breadcrumb, Dropdown, Space, Form, Input,
 import { DownOutlined, PlusOutlined } from '@ant-design/icons';
 import './index.less';
 import apiObj from '@api/index';
-import { setUnReadNum} from '@reducers/userInfo.js';
+import { setUnReadNum } from '@reducers/userInfo.js';
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 function MyMessage() {
@@ -18,9 +18,9 @@ function MyMessage() {
     const [size, setSize] = useState(15);       //每页显示条数
     const [current, setCurrent] = useState(1);//当前页
     const [params, setParams] = useState({
-      pages: 1,
-      current: 1,
-      size: 15
+        pages: 1,
+        current: 1,
+        size: 15
     });
     const [total, setTotal] = useState(0);       //每页显示条数
     const [dataSource, setDataSource] = useState([]);   //列表数据
@@ -54,11 +54,11 @@ function MyMessage() {
         setVisible(false);
     }
     //获取未读消息数量
-    function getNotNoticeCount(){
+    function getNotNoticeCount() {
         xPost(api.getNotNoticeCount).then((res) => {
             if (res.data.code === 200) {
                 let count = res.data.data.count;
-                count = count>99?'99+':count;
+                count = count > 99 ? '99+' : count;
                 dispatch(setUnReadNum(count));
             } else {
                 //message.warning(res.data.msg || '请求失败');
@@ -78,74 +78,74 @@ function MyMessage() {
                 setMsgDetail(data);
                 //更新未读消息数量
                 getNotNoticeCount();
-			    getTableData(params);//刷新列表
+                getTableData(params);//刷新列表
             } else {
                 message.warning(res.data.message || '获取详情失败')
             }
         });
     }
     //每页显示条数切换
-    function onSizeChange(current, pageSize){
-	  params.current = current
-	  params.size = pageSize
-	  setSize(pageSize)
-	  setCurrent(current)
-	  setParams(params)
-	  getTableData(params)
+    function onSizeChange(current, pageSize) {
+        params.current = current
+        params.size = pageSize
+        setSize(pageSize)
+        setCurrent(current)
+        setParams(params)
+        getTableData(params)
     }
     //翻页
-    function onPageChange(page, pageSize){
-	  params.current = page
-	  params.size = pageSize
-	  setCurrent(page)
-	  setParams(params)
-	  getTableData(params)
+    function onPageChange(page, pageSize) {
+        params.current = page
+        params.size = pageSize
+        setCurrent(page)
+        setParams(params)
+        getTableData(params)
     }
     //表格渲染
     function RenderTable() {
-            const columns = [
-                { title: '标题', dataIndex: 'title', key: 'title' },
-                {
-                    title: '类型', width: 150, dataIndex: 'typeName', key:'typeName'
-                },
-                { title: '发送者', dataIndex: 'sender', key: 'sender' },
-                { title: '发送时间', width: 240, dataIndex: 'gmtCreate', key: 'gmtCreate' },
-                {
-                    title: '阅读状态', key: 'statusName', dataIndex:'statusName'
-                },
-                {
-                    title: '操作', key: 'operation', render: (row) => {
-                        return (<Space size="middle">
-                            <a onClick={() => showMessage(row.id)}>查看</a>
-                        </Space>)
-                    }
-                },
-            ];
-            return (
-                <Table
-                    rowKey={record => record.id}
-                    scroll={{ y: 'calc(100vh - 360px)' }}
-                    columns={columns}
-                    dataSource={dataSource}
-                    pagination={{
-                        showSizeChanger:true,
-                        pageSizeOptions:[15,30,60,120],
-                        defaultPageSize:size,
-                        pageNo: 1,
-					    current:current,
-                        size:'small',
-                        total: total,
-                        showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
-                        onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
-					    onChange: (page, pageSize) => onPageChange(page, pageSize),//点击页码事件
-                    }}
-                />
-            )
+        const columns = [
+            { title: '标题', dataIndex: 'title', key: 'title' },
+            {
+                title: '类型', width: 150, dataIndex: 'typeName', key: 'typeName'
+            },
+            { title: '发送者', dataIndex: 'sender', key: 'sender' },
+            { title: '发送时间', width: 240, dataIndex: 'gmtCreate', key: 'gmtCreate' },
+            {
+                title: '阅读状态', key: 'statusName', dataIndex: 'statusName'
+            },
+            {
+                title: '操作', key: 'operation', render: (row) => {
+                    return (<Space size="middle">
+                        <a onClick={() => showMessage(row.id)}>查看</a>
+                    </Space>)
+                }
+            },
+        ];
+        return (
+            <Table
+                rowKey={record => record.id}
+                scroll={{ y: 'calc(100vh - 360px)' }}
+                columns={columns}
+                dataSource={dataSource}
+                pagination={{
+                    showSizeChanger: true,
+                    pageSizeOptions: [15, 30, 60, 120],
+                    defaultPageSize: size,
+                    pageNo: 1,
+                    current: current,
+                    size: 'small',
+                    total: total,
+                    showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+                    onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+                    onChange: (page, pageSize) => onPageChange(page, pageSize),//点击页码事件
+                }}
+            />
+        )
 
     }
     //筛选项渲染
     const [form] = Form.useForm();
-    const initialValues = {status:toUnRead?'0':''};
+    const initialValues = { status: toUnRead ? '0' : '' };
     const onFinish = (values) => {
         getTableData(values);
         console.log('筛选项:', values);
@@ -210,11 +210,11 @@ function MyMessage() {
                 width={724}
                 visible={visible}
                 confirmLoading={confirmLoading}
-                onCancel={()=>setVisible(false)}
+                onCancel={() => setVisible(false)}
             >
                 <div className="message-box">
                     <p className='msg-title'>{msgDetail.title}</p>
-                    <div className="msg-content" dangerouslySetInnerHTML = {{__html:msgDetail.content}}></div>
+                    <div className="msg-content" dangerouslySetInnerHTML={{ __html: msgDetail.content }}></div>
                     <div className="msg-footer">
                         <span className="msg-type">类型:{msgDetail.typeName}</span>
                         <span className="msg-sender">发送者:{msgDetail.creatorName}</span>

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

@@ -102,7 +102,7 @@ function OperationLog() {
                 <Input placeholder="用户名" autoComplete='off' />
               </Form.Item>
             </Col>
-            <Col span={5} key={1}>
+            <Col span={7} key={1}>
               <Form.Item name="time" label="操作日期">
                 <RangePicker
                   disabledDate={disabledDate}

+ 7 - 7
src/components/OrgManager/index.js

@@ -6,7 +6,7 @@ import AddSubOrg from './AddSubOrg';
 import './index.less';
 import apiObj from '@api/index';
 import OrgContext from './org-context';
-import { pickCheckedTreeIds, getValueFromEvent,getCookie } from '@utils/index'
+import { pickCheckedTreeIds, getValueFromEvent, getCookie } from '@utils/index'
 
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
@@ -204,22 +204,22 @@ function OrgManager() {
         if (orgType == 4) {
             param.type = 5
             param.addHospitalUserVO = {
-                username:'122',
-                password:'111'
+                username: '122',
+                password: '111'
             }
             param.softwares = [{
                 id: 1,
                 softwareMenuIds: ['1'],
                 softwareResourceIds: ['2'],
             }]
-        }else{
+        } else {
             formData.softwares = arr;
         }
         if (type == 2) {
             url = api.updateHospital
             param.id = operId
         }
-        
+
         post(url, param).then((res) => {
             if (res.data.code === 200) {
                 getTableData();
@@ -386,11 +386,11 @@ function OrgManager() {
     return (
         <div className='wrapper'>
             <div className="filter-box">
-                <Form form={form} name="control-hooks" onFinish={onFinish}>
+                <Form form={form} name="control-hooks" onFinish={onFinish} initialValues={{ type:'',status: '' }}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item name="hospitalName" label="组织名称" getValueFromEvent={getValueFromEvent}>
-                                <Input placeholder='组织名称' autoComplete="off"/>
+                                <Input placeholder='组织名称' autoComplete="off" />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={1}>

+ 20 - 11
src/components/PageLayout/index.js

@@ -1,20 +1,22 @@
-import {useEffect,useState} from 'react';
-import { useDispatch,useSelector } from 'react-redux'
-import { Layout } from 'antd';
+import { useEffect, useState } from 'react';
+import { useDispatch, useSelector } from 'react-redux'
+import { MenuUnfoldOutlined,MenuFoldOutlined } from '@ant-design/icons';
+import { Layout, Button } from 'antd';
 import AHeader from '../AHeader'
 import AMenu from '../AMenu'
 import ATabs from '../ATabs'
 import apiObj from '@api/index';
-import { setStatusList, setHisTypeList, setTitleList, setDataList,setMsgTypeList, setMsgStatusList} from '@reducers/staticInfo';
+import { setStatusList, setHisTypeList, setTitleList, setDataList, setMsgTypeList, setMsgStatusList } from '@reducers/staticInfo';
 
-const {  Content, Sider } = Layout;
-const {post,api,xPost} = apiObj;
+const { Content, Sider } = Layout;
+const { post, api, xPost } = apiObj;
 const propTypes = {
 
 }
 const defaultProps = {};
 
-function PageLayout(){
+function PageLayout() {
+    const [collapsed, setCollapsed] = useState(false);
     const dispatch = useDispatch();
     /*const staticInfo =useSelector(state => {
         return state.staticInfo;
@@ -27,7 +29,7 @@ function PageLayout(){
         post(api.getManagerBoxInfo).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
-                dispatch(setHisTypeList(data[43]||data[45]));       //非单家医院为医院类型43,单家医院为病区45
+                dispatch(setHisTypeList(data[43] || data[45]));       //非单家医院为医院类型43,单家医院为病区45
                 dispatch(setStatusList(data[47]));
                 dispatch(setTitleList(data[40]));
                 dispatch(setDataList(data[48]));
@@ -36,15 +38,22 @@ function PageLayout(){
             }
         })
     }
-    useEffect(()=>{
+    function toggleCollapsed() {
+        setCollapsed(!collapsed)
+    }
+    useEffect(() => {
         getStaticInfos()
-    },[]);
+    }, []);
     return (
         <Layout>
             <AHeader></AHeader>
             <Layout>
-                <Sider className='page-sider'>
+                <Sider className='page-sider' collapsed={collapsed} >
                     <AMenu></AMenu>
+                    <span onClick={toggleCollapsed} style={{ marginBottom: 16 }} className='toogle'>
+                        {collapsed ? <MenuUnfoldOutlined className='icon'/> : <MenuFoldOutlined className='icon'/>}
+                    </span>
+                    <span className='logoT'>©杭州朗通信息技术有限公司</span>
                 </Sider>
                 <Content className='page-content'>
                     <ATabs></ATabs>

+ 23 - 7
src/components/RegularManage/addRegular.js

@@ -1,7 +1,7 @@
 import React, {
     useState, useEffect, useContext
 } from 'react';
-import { Form, Col, DatePicker, Button, Radio, TreeSelect, message, Space, Input } from 'antd';
+import { Form, Modal, Button, message, Space, Input } from 'antd';
 import apiObj from '@api/index';
 import RegularContext from './regular-context';
 const { post, api, xPost } = apiObj;
@@ -10,19 +10,24 @@ function EditBlock(props) {
     useEffect(() => {
     }, []);
     const [form] = Form.useForm();
-    const { regularDetail, type } = useContext(RegularContext);
+    const [delvisible, setDelVisible] = useState(false);
+    const { regularDetail, type, flag } = useContext(RegularContext);
     const initialValues = regularDetail;
     const onFinish = values => {
-        addRegular(values)
+        if (flag == 1) {
+            setDelVisible(true)
+        } else {
+            addRegular(values)
+        }
     };
     //添加
     function addRegular(params) {
         let url
-        if(type == 1){
+        if (type == 1) {
             url = api.addRegular
-        }else{
+        } else {
             url = api.upRegularById
-            params.id= regularDetail.id
+            params.id = regularDetail.id
         }
         post(url, params).then((res) => {
             if (res.data.code === 200) {
@@ -72,8 +77,19 @@ function EditBlock(props) {
                         </Button>
                     </Space>
                 </Form.Item>
-
             </Form>
+            <Modal
+                title="提示"
+                okText='确定'
+                cancelText='取消'
+                width={400}
+                visible={delvisible}
+                onOk={addRegular}
+                /*confirmLoading={confirmLoading}*/
+                onCancel={() => cancel()}
+            >
+                <p>该正则式关联字段校验规则,修改后将同步更新,确认修改?</p>
+            </Modal>
         </>
     );
 }

+ 5 - 4
src/components/RegularManage/index.js

@@ -18,6 +18,7 @@ function RegularManage() {
     const [total, setTotal] = useState(0);
     const [title, setTitle] = useState();
     const [tip, setTip] = useState();
+    const [flag, setFlag] = useState(0);
     const [type, setType] = useState(0);//1新增 2修改
     const [visible, setVisible] = useState(false);
     const [delvisible, setDelVisible] = useState(false);
@@ -106,10 +107,10 @@ function RegularManage() {
             arr.push(it.split('-')[1])
         });
         if (arr.indexOf('1') > 0) {
-            console.log(123);
+            setFlag(1)
             setTip('正则式关联字段校验规则,删除后将取消关联且无法恢复,确认删除这' + selectedRowKeys.length + '条正则式?')
         } else {
-            console.log(456);
+            setFlag(0)
             setTip('正则式删除后将无法恢复,确认删除这' + selectedRowKeys.length + '条正则式?')
         }
 
@@ -155,7 +156,7 @@ function RegularManage() {
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item label="正则式名称" name="name">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="正则式名称" autoComplete='off' />
                             </Form.Item>
                         </Col>
 
@@ -213,7 +214,7 @@ function RegularManage() {
                     footer={null}
                     forceRender={true}
                 >
-                    <RegularContext.Provider value={{ regularDetail, type }}>
+                    <RegularContext.Provider value={{ regularDetail, type,flag }}>
                         <AddRegular userChange={userChange} cancel={cancel} />
                     </RegularContext.Provider>
 

+ 84 - 79
src/components/RoleManager/index.js

@@ -1,29 +1,29 @@
-import {useEffect,useState} from 'react';
+import { useEffect, useState } from 'react';
 import { useSelector } from 'react-redux'
 /*import { useDispatch,useSelector } from 'react-redux'*/
-import { Table,Modal, message,Space, Form, Input, Button, Row, Col, Select } from 'antd';
+import { Table, Modal, message, Space, Form, Input, Button, Row, Col, Select } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddRole from './AddRole';
 import './index.less';
 import apiObj from '@api/index';
 import RoleContext from './role-context';
 import { pickCheckedTreeIds, getValueFromEvent } from '@utils/index'
-const {post,api,xPost} = apiObj;
+const { post, api, xPost } = apiObj;
 
 const { Option } = Select;
-function RoleManager(){
+function RoleManager() {
     useEffect(() => {
         getTableData();
-    },[]);
+    }, []);
 
     const [dataSource, setDataSource] = useState([]);   //列表数据
     const [roleDetail, setRoleDetail] = useState(null);   //角色详情数据
-    const [visible,setVisible] = useState(false);   //删除禁用确认弹窗显示
-    const [addVisible,setAddVisible] = useState(false);         //新增页面显示
+    const [visible, setVisible] = useState(false);   //删除禁用确认弹窗显示
+    const [addVisible, setAddVisible] = useState(false);         //新增页面显示
     const [confirmLoading, setConfirmLoading] = useState(false);
     //弹窗类型:1删除 2有用户删除 3禁用 4有用户禁用
-    const [modalType,setModalType] = useState(1);
-    const [operId,setOperId] = useState('');    //当前操作的角色id
+    const [modalType, setModalType] = useState(1);
+    const [operId, setOperId] = useState('');    //当前操作的角色id
     const [total, setTotal] = useState(0);
     const [size, setSize] = useState(15);
     const [current, setCurrent] = useState(1);
@@ -33,15 +33,15 @@ function RoleManager(){
         size: 15
     });
     //从state中取出状态、类型列表
-    const staticInfo =useSelector(state => {
+    const staticInfo = useSelector(state => {
         return state.staticInfo;
     });
-    const {statusList} = staticInfo;
-    const tipText={
-        1:'确定要删除该角色?',
-        2:'当前角色存在用户,删除后用户将一并被删除',
-        3:'确定要禁用该角色?',
-        4:'当前角色存在用户,禁用后用户将一并被禁用',
+    const { statusList } = staticInfo;
+    const tipText = {
+        1: '确定要删除该角色?',
+        2: '当前角色存在用户,删除后用户将一并被删除',
+        3: '确定要禁用该角色?',
+        4: '当前角色存在用户,禁用后用户将一并被禁用',
     };
     let data = {
         pages: 1,
@@ -49,9 +49,9 @@ function RoleManager(){
         size: size
     }
     //获取表格数据
-    function getTableData(param){
-        post(api.getRolePage, param || params).then((res)=>{
-            if(res.data.code===200){
+    function getTableData(param) {
+        post(api.getRolePage, param || params).then((res) => {
+            if (res.data.code === 200) {
                 const data = res.data.data;
                 setDataSource(data.records);
                 setTotal(data.total)
@@ -60,71 +60,71 @@ function RoleManager(){
         })
     }
     //启用/禁用
-    function enable(flag,id) {
-        const param = {roleId:id||operId,status:flag};
-        xPost(api.disableRole,param).then((res)=>{
-            if(res.data.code===200){
+    function enable(flag, id) {
+        const param = { roleId: id || operId, status: flag };
+        xPost(api.disableRole, param).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setVisible(false);
-                message.success((flag?'启用':'禁用')+"成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+                message.success((flag ? '启用' : '禁用') + "成功");
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
     //删除
-    function onDelete(){
-        const param = {roleId:operId};
-        xPost(api.deleteRole,param).then((res)=>{
-            if(res.data.code===200){
+    function onDelete() {
+        const param = { roleId: operId };
+        xPost(api.deleteRole, param).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setVisible(false);
                 message.success("删除成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
     //显示弹窗
-    function showModal(type,id){
+    function showModal(type, id) {
         setModalType(type);
         setOperId(id);
         setVisible(true);
     }
     //弹窗确认事件
-    function handleOk(){
-        if("1,2".indexOf(modalType)>-1){
+    function handleOk() {
+        if ("1,2".indexOf(modalType) > -1) {
             onDelete();
-        }else if("3,4".indexOf(modalType)>-1){
+        } else if ("3,4".indexOf(modalType) > -1) {
             enable(0);
         }
     }
     //弹窗取消
-    function handleCancel(){
+    function handleCancel() {
         setVisible(false);
         setAddVisible(false);
     }
     //新增角色弹窗
-    function showAddRole(){
+    function showAddRole() {
         setAddVisible(true);
     }
-    function getRoleDetail(id){
-        return xPost(api.getRoleById,{roleId:id});
+    function getRoleDetail(id) {
+        return xPost(api.getRoleById, { roleId: id });
     }
     //修改角色
-    async function editRole(id){
+    async function editRole(id) {
         const data = await getRoleDetail(id);
         const detail = data.data;
-        if(detail.code===200){
-            const content= detail.data;
+        if (detail.code === 200) {
+            const content = detail.data;
             const menuData = content.loginUserMenuResourceTree;
             const loginSoftwares = content.loginSoftwares;
-            let softwares=[],sids=[];
-            for(let i=0;i<menuData.length;i++){
+            let softwares = [], sids = [];
+            for (let i = 0; i < menuData.length; i++) {
                 const obj = pickCheckedTreeIds(menuData[i]);
                 softwares.push(obj);
             }
@@ -134,43 +134,43 @@ function RoleManager(){
                     sids.push(obj.id);
                 }
             }
-            const fData = Object.assign({},content,{sids,softwares});
+            const fData = Object.assign({}, content, { sids, softwares });
             setRoleDetail(fData);
         }
         setAddVisible(true);
     }
 
     //保存
-    function addRole(formData){
+    function addRole(formData) {
         let url = api.addRole;
-        const arr = formData.softwares.filter((it)=>{
-            if(Object.keys(it).length&&it.softwareMenuIds&&it.softwareMenuIds.length){
+        const arr = formData.softwares.filter((it) => {
+            if (Object.keys(it).length && it.softwareMenuIds && it.softwareMenuIds.length) {
                 return it;
             }
         });
-        if(roleDetail){     //修改角色
-            formData.id=roleDetail.id;
-            url=api.updateRole;
+        if (roleDetail) {     //修改角色
+            formData.id = roleDetail.id;
+            url = api.updateRole;
         }
-        formData.softwares=arr;
-        post(url,formData).then((res)=>{
-            if(res.data.code===200){
+        formData.softwares = arr;
+        post(url, formData).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setAddVisible(false);
                 setRoleDetail(null)
                 message.success("添加成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
-    function goBack(){
+    function goBack() {
         setAddVisible(false);
         setRoleDetail(null)
         getTableData();
-    } 
+    }
     function onSizeChange(current, pageSize) {
         params.current = current
         params.size = pageSize
@@ -187,24 +187,29 @@ function RoleManager(){
         getTableData()
     }
     //表格渲染
-    function RenderTable(){
+    function RenderTable() {
         const columns = [
             { title: '角色名称', dataIndex: 'name', key: 'name' },
             { title: '角色描述', dataIndex: 'remark', key: 'remark' },
-            { title: '状态', key: 'statusName',render:(row) => {
-                    return (<span className={ (row.status==='1')?'Enable':'Disable' }>{row.statusName}</span>)
-                        }},
+            {
+                title: '状态', key: 'statusName', render: (row) => {
+                    return (<span className={(row.status === '1') ? 'Enable' : 'Disable'}>{row.statusName}</span>)
+                }
+            },
             /*{ title: '创建时间', dataIndex: 'gmtCreate', key: 'gmtCreate' },*/
-            { title: '操作', key: 'operation', render: (row,i) => {
+            {
+                title: '操作', key: 'operation', render: (row, i) => {
                     //console.log(21,row)
-                    if(row.rootFlag){
+                    if (row.rootFlag) {
                         return '-'
                     }
                     return (<Space size="middle">
-                        <a onClick={()=>editRole(row.id)}>修改</a>
-                        {row.status === '1' ? (<a className="disable" onClick={()=>showModal(row.hasUserFlag?4:3,row.id)}>禁用</a>):(<a onClick={()=>enable(1,row.id)}>启用</a>)}
-                        <a className="delete" onClick={()=>showModal(row.hasUserFlag?2:1,row.id)}>删除</a>
-                    </Space>) }},
+                        <a onClick={() => editRole(row.id)}>修改</a>
+                        {row.status === '1' ? (<a className="disable" onClick={() => showModal(row.hasUserFlag ? 4 : 3, row.id)}>禁用</a>) : (<a onClick={() => enable(1, row.id)}>启用</a>)}
+                        <a className="delete" onClick={() => showModal(row.hasUserFlag ? 2 : 1, row.id)}>删除</a>
+                    </Space>)
+                }
+            },
         ];
         return (
             <Table
@@ -244,21 +249,21 @@ function RoleManager(){
         form.resetFields();
         getTableData(data);
     };
-    if(addVisible){
+    if (addVisible) {
         return (
-            <RoleContext.Provider value={{save:addRole,detail:roleDetail}}>
-                <AddRole back={goBack}/>
+            <RoleContext.Provider value={{ save: addRole, detail: roleDetail }}>
+                <AddRole back={goBack} />
             </RoleContext.Provider>
         )
     }
     return (
         <div className='wrapper'>
             <div className="filter-box">
-                <Form form={form} name="control-hooks" onFinish={onFinish}>
+                <Form form={form} name="control-hooks" onFinish={onFinish} initialValues={{ status: '' }}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item name="name" label="角色名称" getValueFromEvent={getValueFromEvent}>
-                                <Input placeholder='角色名称' autoComplete='off'/>
+                                <Input placeholder='角色名称' autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
@@ -266,7 +271,7 @@ function RoleManager(){
                                 <Select
                                     allowClear
                                 >
-                                    {statusList.map((item)=>{
+                                    {statusList.map((item) => {
                                         return (
                                             <Option value={item.name} key={item.name}>{item.val}</Option>
                                         )
@@ -290,7 +295,7 @@ function RoleManager(){
             <div className="table">
                 <div className="table-header">
                     <h2 className="table-title">组织管理</h2>
-                    <Button type="primary" icon={<PlusOutlined />} onClick={()=> showAddRole()}>新增角色</Button>
+                    <Button type="primary" icon={<PlusOutlined />} onClick={() => showAddRole()}>新增角色</Button>
                 </div>
                 <RenderTable />
             </div>

+ 155 - 155
src/components/SurgeryManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Pagination, Space, Modal,  message, Row, Col, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Pagination, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddSurg from './addSurg'
 import MatchSurg from './MatchSurg.js'
@@ -29,18 +29,18 @@ function SurgManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配诊断选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -59,9 +59,9 @@ function SurgManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Surgrow)
-		getOperationPage()
-		}
+      setFormData(Surgrow)
+      getOperationPage()
+    }
   }
   //表格数据
   function getOperationPage(param) {
@@ -76,17 +76,17 @@ function SurgManager() {
 
   //删除
   function delOperationById() {
-    post(api.delOperationById,{ids:Surgid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delOperationById, { ids: Surgid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getOperationPage();
-		setSurgid([])
+        setSurgid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -129,122 +129,122 @@ function SurgManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Surgid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Surgid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function SurgChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getOperationPage();
+    getOperationPage();
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setSurgid(selectedRowKeys)
+      setSurgid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importOperation,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  const {response,status} = info.file;
-    if(status === 'done'){
-	  if (response.code === 200) {
-		getOperationPage();		//刷新列表
-		//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 { response, status } = info.file;
+      if (status === 'done') {
+        if (response.code === 200) {
+          getOperationPage();		//刷新列表
+          //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);
+      }
     },
   };
 
-  function saveMatching(){
-	post(api.matchingOperation, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getOperationPage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingOperation, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getOperationPage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院手术/操作名称', dataIndex: 'name',},
-    { title: '手术和操作代码', dataIndex: 'code',},
-    { title: '标准手术/操作名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院手术/操作名称', dataIndex: 'name', },
+    { title: '手术和操作代码', dataIndex: 'code', },
+    { title: '标准手术/操作名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,36 +256,36 @@ function SurgManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院手术/操作名称" name="name">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={1}>
-		    <Form.Item label="手术和操作代码" name="code">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="标准手术/操作名称" name="standard">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院手术/操作名称" name="name">
+                <Input placeholder="医院手术/操作名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="手术和操作代码" name="code">
+                <Input placeholder="手术和操作代码" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="标准手术/操作名称" name="standard">
+                <Input placeholder="标准手术/操作名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={3}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -306,21 +306,21 @@ function SurgManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">手术信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} type="primary" danger>删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 350px)' }}
           dataSource={SurgList}
@@ -348,24 +348,24 @@ function SurgManager() {
           footer={null}
           forceRender={true}
         >
-          <SurgContext.Provider value={{type, formData}}>
-            <AddSurg SurgChange={SurgChange} cancel={cancel} isChange={isChange}/>
+          <SurgContext.Provider value={{ type, formData }}>
+            <AddSurg SurgChange={SurgChange} cancel={cancel} isChange={isChange} />
           </SurgContext.Provider>
-				<Modal
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -376,34 +376,34 @@ function SurgManager() {
       >
         <p>诊断信息删除后将无法恢复,确认删除这{Surgid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>手术信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-		okText='保存'
-	    cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchSurg row={formData} onChange={matchChange}></MatchSurg>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>手术信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchSurg row={formData} onChange={matchChange}></MatchSurg>
+      </Modal>
     </div>
   )
 }

+ 2 - 0
src/components/SysChoose/index.js

@@ -41,6 +41,7 @@ function SysChoose({history}) {
         const his =checkOrg.hospitals;
         setSysId(id);
         setHisList(his);
+        setCookie('isPlacefile',id == 2?0:1);
     }
     //获取组织列表
     function getOrgList(){
@@ -53,6 +54,7 @@ function SysChoose({history}) {
                 setSysId(software[0].id);
                 setCookie('userId',userInfo.id);
 			    setCookie('userName',userInfo.name);
+                setCookie('isPlacefile',userInfo.id == 2?0:1);
                 dispatch(setUser(userInfo));
                 localStorage.setItem('software', JSON.stringify(software));
                 //默认显示第一个系统的组织

+ 0 - 3
src/components/UserManager/index.js

@@ -7,8 +7,6 @@ import { useSelector } from 'react-redux'
 import apiObj from '@api/index';
 import UserContext from './user-context';
 import { getValueFromEvent } from '@utils/index'
-import { logDOM } from '@testing-library/react';
-
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 function UserManager() {
@@ -98,7 +96,6 @@ function UserManager() {
           status: data.status,
           hospitalName:getHospitalsName(data.hospitals)
         }
-        console.log(arr);
         setRoleList(data.roles)
         setFormData(arr)
       }