Explorar o código

Merge branch 'referMasterCdss' into his/yinjiang

licy %!s(int64=3) %!d(string=hai) anos
pai
achega
83f41d5018

+ 118 - 0
src/components/AddNewInspect/SearchSelect/index.jsx

@@ -0,0 +1,118 @@
+import React, { Component } from "react";
+import axios from '@utils/ajax';
+import styles from "./index.less";
+import { Notify, DelToast } from '@commonComp';
+import $ from 'jquery';
+import dowm from '../img/down.png';
+import del from '../img/close.png';
+
+class SearchSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      data: [],
+      inpVal: ''
+    };
+    this.handleBlur = this.handleBlur.bind(this);
+    this.getDrugWayList = this.getDrugWayList.bind(this);
+  }
+
+  componentDidMount() {
+    //关闭下拉弹窗
+    $(document).click((event) => {
+      const domClass = $(event.target).attr("class") || '';
+      if (domClass.indexOf(styles.selectLis) === -1 && domClass.indexOf(styles.inpSearch) === -1) {
+        this.setState({
+          show: false
+        })
+      }
+    });
+  }
+  handleBlur() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 8 });       //右侧推送
+  }
+
+  handleFocus() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 8 });
+  }
+  handleSelect(part, idx) {
+    const { selectJiType, handlePush, type, hosId } = this.props;
+    const item = Object.assign(part, { uniqueName: hosId === -1 ? part.name : undefined });       //朗通的需要传uniqueName
+    selectJiType(item, idx, type)
+    handlePush && handlePush({ mode: 8 });
+  }
+  
+  handleFocu(e){
+    const val = e.target.value;
+    this.getDrugWayList(val)
+  }
+  handleChange(e, isClear) {
+    const val = e.target.value;
+    if (isClear || !val) {
+      this.setState({
+        data: [],
+        inpVal: ''
+      });
+      this.handleSelect({ name: '', uniqueName: '' }, this.props.idx);
+    }
+    this.setState({
+      show: true,
+      inpVal: val,
+    });
+    //搜索
+    this.getDrugWayList(val)
+  }
+  //获取药品剂型15,、给药途径16
+  getDrugWayList(val) {
+    const { hosId, type } = this.props;
+    if(!val){
+      this.setState({
+        data: [],
+        inpVal: ''
+      });
+      this.handleSelect({ name: '', uniqueName: '' }, this.props.idx);
+      return
+    }
+    axios.json('/demo/retrieval/index', {
+      "inputStr": val.trim(),
+      "type": type,
+      "hospitalId": hosId,
+      "defaultList":0
+    }).then((res) => {
+      if (res.data.code == 0) {
+        const data = res.data.data;
+        this.setState({
+          data: data.nameList || [],
+          show: true,
+          inpVal: val
+        })
+      } else {
+        Notify.success(res.data.msg)
+      }
+    })
+  };
+  render() {
+    const { idx, title, selected } = this.props;
+    const { show, data, inpVal } = this.state; 
+    console.log(inpVal);
+    return (
+      <div className={styles.medType}>
+        <input placeholder={title} value={selected} title={selected} className={styles.inpSearch} onFocus={(e) => this.handleFocu(e)} onInput={(e) => this.handleChange(e)} />
+        {inpVal? <img className={styles.clear} src={del} alt="清空" onClick={(e) => this.handleChange(e, true)} /> : ''}
+        {
+          show ? <ul className={styles.selectLis}>
+            {
+              data && data.map((part) => {
+                return <li title={part.name} onClick={() => this.handleSelect(part, idx)}>{part.name}</li>
+              })
+            }
+          </ul> : ''
+        }
+      </div>
+    );
+  }
+}
+export default SearchSelect;

+ 58 - 0
src/components/AddNewInspect/SearchSelect/index.less

@@ -0,0 +1,58 @@
+@import "~@less/variables.less";
+.medType{
+    display: inline-block;
+    width: 110px;
+    border:1px solid #aaa;
+    border-radius: 3px;
+    position: relative;
+    margin-right: 10px;
+    .down{
+        width: 8px;
+        height: 5px;
+        position: absolute;
+        cursor: pointer;
+        top:8px;
+        right: 5px;
+    }
+    .clear{
+        display: none;
+        width: 12px;
+        height: 12px;
+        position: absolute;
+        cursor: pointer;
+        top: 5px;
+        right: -10px;
+    }
+    &:hover .clear{
+        display: inline-block;
+    }
+    .selectLis{
+        position: absolute;
+        top:24px;
+        background: #fff;
+        width: 100%;
+        max-height: 110px;
+        box-shadow: 0 10px 20px 0 #989da3;
+        z-index: 9;
+        overflow: auto;
+        li{
+            height: 35 px;
+            line-height: 35px;
+            padding: 0 8px;
+            cursor: pointer;
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow:ellipsis;
+        }
+        li:hover{
+            background: #E2F1F8;
+        }
+    }
+}
+.inpSearch{
+    width: 105px;
+    padding-left: 5px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}

+ 118 - 0
src/components/AddNewInspect/SearchSelect2/index.jsx

@@ -0,0 +1,118 @@
+import React, { Component } from "react";
+import axios from '@utils/ajax';
+import styles from "./index.less";
+import { Notify, DelToast } from '@commonComp';
+import $ from 'jquery';
+import down from '../img/down.png';
+import del from '../img/close.png';
+
+class SearchSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      data: [],
+      inpVal: ''
+    };
+    this.handleBlur = this.handleBlur.bind(this);
+    this.getDrugWayList = this.getDrugWayList.bind(this);
+    this.confirm = this.confirm.bind(this);
+  }
+
+  componentDidMount() {
+    //关闭下拉弹窗
+    $(document).click((event) => {
+      const domClass = $(event.target).attr("class") || '';
+      if (domClass.indexOf(styles.selectLis) === -1 && domClass.indexOf(styles.inpSearch) === -1) {
+        this.setState({
+          show: false
+        })
+      }
+    });
+  }
+  handleBlur() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 8 });       //右侧推送
+  }
+
+  handleFocus() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 8 });
+  }
+  handleSelect(part, idx) {
+    const { selectJiType, handlePush, type, hosId } = this.props;
+    const item = Object.assign(part, { uniqueName: hosId === -1 ? part.name : undefined });       //朗通的需要传uniqueName
+    selectJiType(item, idx, type)
+    handlePush && handlePush({ mode: 8 });
+    this.setState({
+      inpVal: part.name,
+    });
+  }
+  handleFocu(e){
+    const val = e.target.value;
+    this.getDrugWayList(val)
+  }
+  handleChange(e, isClear) {
+    const val = e.target.value;
+    if (isClear || !val) {
+      this.setState({
+        data: [],
+        inpVal: ''
+      });
+      this.handleSelect({ name: '', uniqueName: '' }, this.props.idx);
+    }
+    this.setState({
+      show: true,
+      inpVal: val,
+    });
+    //搜索
+    this.getDrugWayList(val)
+  }
+  confirm(){
+    let val = this.state.inpVal
+    console.log(this.state);
+    this.getDrugWayList(val)
+  }
+  //获取药品剂型15,、给药途径16
+  getDrugWayList(val) {
+    const { hosId, type } = this.props;
+    axios.json('/demo/retrieval/index', {
+      "inputStr": val,
+      "type": type,
+      "hospitalId": hosId,
+      "defaultList":1
+    }).then((res) => {
+      if (res.data.code == 0) {
+        const data = res.data.data;
+        this.setState({
+          data: data.nameList || [],
+          show: true,
+          inpVal: val
+        })
+      } else {
+        Notify.success(res.data.msg)
+      }
+    })
+  };
+  render() {
+    const { idx, title, selected } = this.props;
+    const { show, data, inpVal } = this.state; 
+    return (
+      <div className={styles.medType}>
+        <input placeholder={title} value={selected} title={selected} className={styles.inpSearch} onFocus={(e) => this.handleFocu(e)} onInput={(e) => this.handleChange(e)} />
+        <img className={show?styles.up:styles.down} src={down} alt="" onClick={this.confirm}/>
+        {inpVal? <img className={styles.clear} src={del} alt="清空" onClick={(e) => this.handleChange(e, true)} /> : ''}
+        {
+          show ? <ul className={styles.selectLis}>
+            {
+              data && data.map((part) => {
+                return <li title={part.name} onClick={() => this.handleSelect(part, idx)}>{part.name}</li>
+              })
+            }
+          </ul> : ''
+        }
+      </div>
+    );
+  }
+}
+export default SearchSelect;

+ 67 - 0
src/components/AddNewInspect/SearchSelect2/index.less

@@ -0,0 +1,67 @@
+@import "~@less/variables.less";
+.medType {
+  display: inline-block;
+  width: 110px;
+  border: 1px solid #aaa;
+  border-radius: 3px;
+  position: relative;
+  margin-right: 10px;
+  .down {
+    width: 8px;
+    height: 5px;
+    position: absolute;
+    cursor: pointer;
+    top: 8px;
+    right: 5px;
+  }
+  .up {
+    width: 8px;
+    height: 5px;
+    position: absolute;
+    cursor: pointer;
+    top: 8px;
+    right: 5px;
+    transform: rotate(180deg);
+  }
+  .clear {
+    display: none;
+    width: 12px;
+    height: 12px;
+    position: absolute;
+    cursor: pointer;
+    top: 5px;
+    right: 4px;
+  }
+  &:hover .clear {
+    display: inline-block;
+  }
+  .selectLis {
+    position: absolute;
+    top: 24px;
+    background: #fff;
+    width: 100%;
+    max-height: 110px;
+    box-shadow: 0 10px 20px 0 #989da3;
+    z-index: 9;
+    overflow: auto;
+    li {
+      height: 35 px;
+      line-height: 35px;
+      padding: 0 8px;
+      cursor: pointer;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+    li:hover {
+      background: #e2f1f8;
+    }
+  }
+}
+.inpSearch {
+  width: 90px;
+  padding-left: 5px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}

+ 9 - 29
src/components/AddNewInspect/SlidePic/index.jsx

@@ -7,10 +7,11 @@ import checkOff from '@common/images/check_off.png';
 import checkOn from '@common/images/check_on.png';
 import dowm from '../img/down.png';
 import SlideIpt from '../SlideIpt';
+import SearchSelect from '../SearchSelect';
+import SearchSelect2 from '../SearchSelect2';
 import singleB from '../img/singleB.png';
 import singleL from '../img/singleL.png';
 
-
 class SlidePic extends Component {
   constructor(props) {
     super(props);
@@ -98,52 +99,31 @@ class SlidePic extends Component {
     const {handlePush} = this.props;
     handlePush&&handlePush({mode:8});
   }
-  handleSelect(part,idx){
-    const {selectJiType,handleSelectShow,handlePush} = this.props;
-    selectJiType(part,idx)
-    handlePush&&handlePush({mode:8});
-    handleSelectShow(idx)
-  }
-  handleSelectShow (idx){
-    const {handleSelectShow} = this.props;
-    handleSelectShow(idx)
-  }
   handleSui(item,idx){
     const {handleSuiFang,handlePush} = this.props;
     handleSuiFang&&handleSuiFang(item,idx)
     handlePush&&handlePush({mode:8});
   }
   render() {
-    const {item,time,setTipValue,idx,handlePush,staticData,activeIdx,hosId} = this.props;
+    const {item,time,setTipValue,idx,handlePush,hosId,selectJiType} = this.props;
     const {selectShow,activeInd,activeName,value,style} = this.state;
     return (
-      <li key={item.time} className={`${styles.slideLi} clearfix`}> 
+      <li key={item.time} className={`${styles.slideLi} clearfix`}>
           <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
           <span className={styles.bigname} title={item.detailName}>{item.detailName}</span>
           <span className={styles.smallname}>{item.flg == 5?'药品':item.flg == 6?'手术/操作':'输血'}</span>
-          <span className={styles.medType}>
-            <a style={{display:item.flg == 5&&hosId==-1?'block':'none',color:item.form=='选择剂型'||!item.form?"#AAAAAA":"#333"}} id="selectJiTypeWrap" onClick={()=>this.handleSelectShow(idx)}>
-              {item.form||'选择剂型'}
-              <img src={dowm} alt=""/>
-            </a>
-              {
-                hosId==-1&&item.flg == 5&&item.selectShow&&activeIdx==idx?<ul className={styles.selectLis} id="selectJiType">
-                  {
-                    staticData&&staticData.map((part)=>{
-                      return <li onClick={()=>this.handleSelect(part,idx)}>{part.name||'选择剂型'}</li>
-                    })
-                  }
-                </ul>:''
-              }
-          </span>
+          {hosId===-1 && item.flg == 5?<SearchSelect title='搜索剂型' hosId={hosId} selected={item.form} type={15} selectJiType={selectJiType} handlePush={handlePush} idx={idx}></SearchSelect>:<p style={{width:'110px',marginRight:'10px'}}></p>}
+          {item.flg == 5?<SearchSelect2 title='选择给药途径' hosId={hosId} selected={item.routeName} type={16} selectJiType={selectJiType} handlePush={handlePush} idx={idx}></SearchSelect2>:<p style={{width:'108px',marginRight:'10px'}}></p>}
+          
           <span className={styles.edit}>
             {
               item.flg == 5||item.flg == 8?
               <input type="text" 
                 class="canEdit" 
                 style={{color:'#333'}}
-                placeholder={item.flg == 5?'(填写用法计量)':'(填写用量)'}
+                placeholder='(填写用量)'
                 autoComplete="off"
+                maxLength='10'
                 value={item.value}
                 title={item.value}
                 onInput={(e)=>{this.handleInput(e,item,2,idx)}}

+ 5 - 27
src/components/AddNewInspect/SlidePic/index.less

@@ -46,39 +46,17 @@
     }
     .bigname {
         .ellipsis;
-        width: 400px;
+        width: 360px;
         font-weight: bold;
         margin-right: 15px;
     }
     .smallname {
-        width: 85px;
-        margin-right: 15px;
-    }
-    .medType {
-        width: 94px;
-        cursor: pointer;
-        margin-right: 30px;
-        position: relative;
-        padding: 0;
-        a {
-            padding: 0 5px;
-            box-sizing: border-box;
-            display: inline-block;
-            border: 1px solid #AAAAAA;
-            border-radius: 4px;
-            width: 100%;
-            position: relative;
-            img{
-                position: absolute;
-                right: 8px;
-                top: 9px;
-                width: 8px;
-            }
-        }
+        width: 80px;
+        margin-right: 10px;
     }
     .edit {
         width: 150px;
-        margin-right: 15px;
+        margin-right: 5px;
         input {
             width: 100%;
         }
@@ -94,7 +72,7 @@
     }
     .pass {
         text-align: right;
-        padding-left: 15px;
+        padding-left: 10px;
         box-sizing: border-box;
         width: 150px;
         margin-right: 15px;

+ 58 - 47
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -3,65 +3,76 @@ import style from "../index.less";
 class MedicalAdvice extends Component {
   constructor(props) {
     super(props);
-    this.state = {  }
+    this.state = {}
   }
-  render() { 
-    const {advice} = this.props
+  render() {
+    const { advice } = this.props
     // console.log(advice,'===========');
-    const {labelListBig,labelListSmall,labelListBlood} = advice
+    const { labelListBig, labelListSmall, labelListBlood } = advice
     // console.log(advice, 'advice');
-    return ( 
-        <tr className={style['patInfoFst']}>
-          <td className={style['patInfoSec']}>医嘱:</td>
-          <td className={style['patInfoSec']}>
-            <table className={style.assistTable}>
-              {
-              labelListBig && labelListBig.map((item,index)=>{
+    return (
+      <tr className={style['patInfoFst']}>
+        <td className={style['patInfoSec']}>医嘱:</td>
+        <td className={style['patInfoSec']}>
+          <table className={style.assistTable}>
+            {
+              labelListBig && labelListBig.map((item, index) => {
                 return (
                   <tr>
-                    <td className={style.adviceTableTdFst}>{item.uniqueName}</td>
-                    
-                    <td className={style.assistTableTdTrd}>药品</td>
-                    <td className={style.assistTableTdSec}>{item.form}</td>
-                    <td className={style.assistTableTdSec}>{item.value}</td>
-                    <td className={style.assistTableTdFor}>{item.time}</td>
+                    <div className={style.adviceTable}>
+                      <div className={style.adviceTableTop}>
+                        <p className={style.adviceTableTopFst}>{item.uniqueName}</p>
+                        <p className={style.assistTableTopTwo}>药品</p>
+                      </div>
+                      <p className={style.assistTableTopFor}>{item.form}</p>
+                      <p className={style.assistTableTopFor}>{item.routeName}</p>
+                      <p className={style.assistTableTopFor}>{item.value}</p>
+                      <p className={style.assistTableTopTime}>{item.time}</p>
+                    </div>
                   </tr>
                 )
               })
-              }
-              {
+            }
+            {
               labelListSmall && labelListSmall.map((item, index) => {
-                  return (
-                    <tr>
-                      <td className={style.adviceTableTdFst}>{item.name}</td>
-                      {/* <td className={style.assistTableTdSec}></td> */}
-                      <td className={style.assistTableTdTrd}>手术/操作</td>
-                      <td className={style.assistTableTdSec}></td>
-                      <td className={style.assistTableTdSec}>{item.value}</td>
-                      <td className={style.assistTableTdFor}>{item.time}</td>
-                    </tr>
-                  )
-                })
-              }
-              {
+                return (
+                  <tr>
+                    <div className={style.adviceTable} className={style.adviceTables}>
+                      <div className={style.adviceTableTop}>
+                        <p className={style.adviceTableTopFst}>{item.name}</p>
+                        <p className={style.assistTableTopTwo}>手术/操作</p>
+                      </div>
+                      <p className={style.assistTableTdSec}>{item.value}</p>
+                      <p className={style.assistTableTopTime}>{item.time}</p>
+                    </div>
+
+                  </tr>
+                )
+              })
+            }
+            {
               labelListBlood && labelListBlood.map((item, index) => {
-                  return (
-                    <tr>
-                      <td className={style.adviceTableTdFst}>{item.name}</td>
-                      <td className={style.assistTableTdTrd}>输血</td>
-                      <td className={style.assistTableTdSec}></td>
-                      <td className={style.assistTableTdSec}>{item.value}</td>
-                      <td className={style.assistTableTdFor}>{item.time}</td>
-                    </tr>
-                  )
-                })
-              }
-            </table>
-          </td>
-        </tr>
+                return (
+                  <tr>
+                    <div className={style.adviceTable}>
+                      <div className={style.adviceTableTop}>
+                        <p className={style.adviceTableTopFst}>{item.name}</p>
+                        <p className={style.assistTableTopTwo}>输血</p>
+                      </div>
+                      <p className={style.assistTableTopFor}>{item.value}</p>
+                      <p className={style.assistTableTopTime}>{item.time}</p>
+                    </div>
+
+                  </tr>
+                )
+              })
+            }
+          </table>
+        </td>
+      </tr>
 
     );
   }
 }
- 
+
 export default MedicalAdvice;

+ 30 - 1
src/components/PreviewBody/index.less

@@ -134,7 +134,36 @@ table{
   margin-right: 10px;
 }
 .adviceTableTdFst {
-  width: 28%;
+  width: 100%;
+}
+.adviceTable{
+  padding: 0 0 0 12px;
+}
+.adviceTables{
+  margin-top: 10px;
+}
+.adviceTableTop{
+  display: flex;
+  justify-content: space-between;
+}
+.adviceTableTopFst{
+  line-height: 25px;
+ 
+}
+.assistTableTopTwo{
+  margin-right: 15px;
+}
+.assistTableTopFor{
+  margin-right: 15px;
+  line-height: 25px;
+  color: #666666;
+}
+.assistTableTopTime{
+  width: 100%;
+  border-top: 1px solid #E2E2E2;
+  text-align: right;
+  padding: 5px 0;
+  padding-right: 5px;
 }
 .assistTableTdSec {
   width: 120px;

+ 2 - 2
src/containers/NewAdvice.js

@@ -65,8 +65,8 @@ function mapDispatchToProps(dispatch) {
     handleSelectShow(idx,sign){
       dispatch(handleSelectShow(idx,sign))
     },
-    selectJiType(part,idx){
-      dispatch(selectJiType(part,idx))
+    selectJiType(part,idx,type){
+      dispatch(selectJiType(part,idx,type))
     },
     checkOnOff(item,idx){
       dispatch(checkOffOn(item,idx))

+ 2 - 2
src/store/actions/diagnosticList.js

@@ -131,7 +131,7 @@ export const delDiagnostic = (state, action) => {
         if(isTcm){
             res.otherIndex=tmpLis[0];
         }else{
-            res.diseaseName = {}
+            res.diseaseName = null
         }
     }
     res[k] = [...tmpLis]
@@ -207,7 +207,7 @@ export const clearAllDiag = (state, action) => {
     res.mainSuitStr = action.mainSuitStr
     res.diagnosticStrNoType = action.saveText
     res.chronicMagItem = action.chronicMagItem
-    res.diseaseName = {}
+    res.diseaseName = null
     return res;
 }
 

+ 2 - 2
src/store/actions/newAdvice.js

@@ -83,9 +83,9 @@ export const checkOffOn = (item,tip) => ({
     item,tip
 })
 
-export const selectJiType = (part,idx) => ({
+export const selectJiType = (part,idx,type) => ({
     type:SELECTJITYPE,
-    part,idx
+    part,idx,operType:type
 })
 export const handleSuiFang = (item,idx) => ({
     type:HANDLESUI,

+ 0 - 1
src/store/async-actions/newAdvice.js

@@ -14,7 +14,6 @@ export const getSearchList = (val) => {
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
             "inputStr": val.trim(),
-            "hospitalId": 2,
             "age": formatFormParmas('patientAge',baseList.patInfo.patInfoData),
             "sex": formatFormParmas('patientSex',baseList.patInfo.patInfoData),
             "type": type,

+ 2 - 4
src/store/reducers/diagnosticList.js

@@ -54,9 +54,7 @@ const initState = {
     mainSuitStr:'',
     diagnosticStrNoType:'',
     diagnosticStr:'',
-    diseaseName: {
-      
-    },
+    diseaseName: null,
     otherIndex:{}
 }
 
@@ -114,7 +112,7 @@ export default function (state=initState, action) {
         let newState = Object.assign({}, state);
         newState.diagnosticStr = '';
         newState.diagnosticList = [];
-        newState.diseaseName = {};
+        newState.diseaseName = null;
         newState.diagnosticStrNoType = '';
         return newState;
       case 'CLEARTCMDIAGDATA':

+ 9 - 4
src/store/reducers/newAdvice.js

@@ -46,7 +46,7 @@ const initSearchList = {
     operationOrder: [],//开单项
     transfusionOrder: [],
     activeIdx: '',
-    operationName: {}
+    operationName: null
 }
 
 export default (state = initSearchList, action) => {
@@ -89,7 +89,12 @@ export default (state = initSearchList, action) => {
         for (let i = 0; i < tempArr.length; i++) {
             if (action.idx == i) {
                 tempArr[i].selectShow = false
-                tempArr[i].form = action.part.name
+                if(+action.operType===16){   //给药途径
+                    tempArr[i].routeName=action.part.name;
+                    tempArr[i].routeUniqueName=action.part.uniqueName;
+                }else{      //剂型
+                    tempArr[i].form = action.part.name;
+                }
                 tempArr[i].selectVal = action.part.val
             }
         }
@@ -155,7 +160,7 @@ export default (state = initSearchList, action) => {
                 }
             })
             if (tempArrs.length == 0) {
-                newState.operationName = {}
+                newState.operationName = null
             } else {
                 for (let i = 0; i < tempArrs.length; i++) {
                     if (tempArrs[i].hasTreat != 1) {
@@ -447,7 +452,7 @@ export default (state = initSearchList, action) => {
         newState.operationOrder = [];
         newState.labelListBlood = [];
         newState.transfusionOrder = [];
-        newState.operationName = {};
+        newState.operationName = null;
         return newState;
     }
     return state;

+ 1 - 1
src/utils/config.js

@@ -7,7 +7,7 @@ const { func } = require("prop-types");
 
 
 
-const host='http://192.168.2.241:6060';//后端接口访问地址
+const host='http://192.168.2.236:6060';//后端接口访问地址
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';

+ 2 - 2
src/utils/tools.js

@@ -1043,7 +1043,7 @@ function getEMRParams() {
     }
     return item
   })
-  let tempOperationName = newAdvice.operationName
+  let tempOperationName = newAdvice.operationName ? newAdvice.operationName:[]
   if (curHos.hosId != -1 && tempOperationName.name) {
     tempOperationName.uniqueName = ''
   }
@@ -1084,7 +1084,7 @@ function getEMRParams() {
     "menstrual": menstruationHistory.saveText[0] || '',  //月经史
     "diseaseName": diagnosticList.diseaseName,
     "otherIndex": diagnosticList.otherIndex,
-    "operationName": tempOperationName,
+    "operationName": (tempOperationName&&Object.keys(tempOperationName).length===0)?null:tempOperationName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",