Browse Source

Merge branch 'dev5.3.4' of http://192.168.2.236:10080/zhouna/newICSS into dev5.3.4

luolei 5 years atrás
parent
commit
391ac13839

BIN
src/common/images/check_off.png


BIN
src/common/images/check_on.png


+ 15 - 12
src/components/Banner/ModeChange/index.jsx

@@ -14,8 +14,11 @@ class ModeChange extends Component {
       this.getStyle=this.getStyle.bind(this);
 
     }
-    getStyle(){
-        const {hideBtn} = this.props;
+    getStyle(flag){
+        const {hideBtn,config0} = this.props;
+        if(flag===1&&config0===1){
+          return style['fade'];
+        }
         return hideBtn?'':style['fade'];
     }
     render(){
@@ -34,43 +37,43 @@ class ModeChange extends Component {
                 <div className={style["oper"]}>
                     <p className={this.getStyle()}>
                       <span>开启模板智能推送:</span>
-                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',isOpen?'1':'0'):null}>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',isOpen?1:0):null}>
                         <img src={isOpen?sopen:sclose} alt=""/>
                         {isOpen?'开':'关'}
                         </a>
                     </p>
-                  <p className={this.getStyle()}>
+                  <p className={this.getStyle(1)}>
                     <span>开启一般情况默认值:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config1',general?'0':'1'):null}>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config1',general?1:0):null}>
                       <img src={general?sclose:sopen} alt=""/>
                       {general?'关':'开'}
                     </a>
                   </p>
-                  <p className={this.getStyle()+" "+style['big-marb']}>
-                    <span>开启开启其他史默认值:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config2',ohis?'0':'1'):null}>
+                  <p className={this.getStyle(1)+" "+style['big-marb']}>
+                    <span>开启其他史默认值:</span>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config2',ohis?1:0):null}>
                       <img src={ohis?sclose:sopen} alt=""/>
                       {ohis?'关':'开'}
                     </a>
                   </p>
                   <p className={this.getStyle()}>
                     <span>默认字体大小:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3','0'):null}>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',0):null}>
                       <img src={fontsize?radio_on:radio_off} alt=""/>
                       标准
                     </a>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3','1'):null}>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',1):null}>
                       <img src={fontsize?radio_off:radio_on} alt=""/>
                       增大
                     </a>
                   </p>
                   <p className={this.getStyle()}>
                     <span>默认字体颜色:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4','0'):null}>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',0):null}>
                       <img src={color?radio_on:radio_off} alt=""/>
                       标准
                     </a>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4','1'):null}>
+                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',1):null}>
                       <img src={color?radio_off:radio_on} alt=""/>
                       增黑
                     </a>

+ 9 - 1
src/components/Banner/index.jsx

@@ -39,6 +39,14 @@ class Banner extends Component {
   }
 
   changeType(type,typeConfig){
+    if(type==='config0'&&typeConfig===1){     //智能模式关闭,一般情况和其他史默认值也关闭
+      this.setState({
+        config0: 1,
+        config1: 0,
+        config2: 0,
+      });
+      return;
+    }
     this.setState({
       [type]:typeConfig
     });
@@ -72,7 +80,7 @@ class Banner extends Component {
       config1:conf[1],
       config2:conf[2],
       config3:conf[3],
-      config4:conf[0],
+      config4:conf[4],
     });
   }
   showHisModal(){

+ 31 - 0
src/components/MedicalInfo/Filters/index.jsx

@@ -0,0 +1,31 @@
+import React, {Component} from "react";
+import style from './index.less';
+import checkOnIcon from '@common/images/check_on.png';
+import checkOffIcon from '@common/images/check_off.png';
+
+class Filters extends Component {
+  constructor(props) {
+    super(props);
+  }
+  drawItem(){
+    const {data,checkeds,handleCheck} = this.props;
+    let isChecked=false;
+    return data.map((it)=>{
+      isChecked = checkeds.includes(it.val);
+      return <span onClick={()=>handleCheck(it.val)}>
+                  <img src={isChecked?checkOnIcon:checkOffIcon} alt=""/>
+                  {it.name}
+                </span>
+    })
+  }
+  render() {
+    return <div className={style["filters"]}>
+              {this.drawItem()}
+            </div>
+
+
+
+  }
+}
+
+export default Filters;

+ 13 - 0
src/components/MedicalInfo/Filters/index.less

@@ -0,0 +1,13 @@
+.filters{
+  width: 380px;
+  margin-top:10px;
+  img{
+    vertical-align: text-bottom;
+    margin-right: 3px;
+  }
+  span{
+    cursor: pointer;
+    font-size: 12px;
+    margin:0 20px 4px 0;
+  }
+}

+ 31 - 6
src/components/MedicalInfo/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from 'react';
 import style from './index.less';
 import delIcon from '@common/images/del_nor.png';
 import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+import Filters from './Filters';
 
 class MedicalInfo extends Component {
     constructor(props) {
@@ -12,20 +13,22 @@ class MedicalInfo extends Component {
         this.state={
           val:'',
           hasSearch: false,
-          msg:''
+          msg:'',
+          typeChecks:['0'],
         };
         this.search = this.search.bind(this);
         this.handleChange = this.handleChange.bind(this);
         this.clear = this.clear.bind(this);
         this.getSearchList = this.getSearchList.bind(this);
         this.handleEnter = this.handleEnter.bind(this);
+        this.handleTypeCheck = this.handleTypeCheck.bind(this);
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
+            that.$ul.current.style.height = getWindowInnerHeight()-278+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
@@ -48,7 +51,7 @@ class MedicalInfo extends Component {
       }
       const {handleChangeValue} = this.props;
       const val = this.$inp.current.value;
-      handleChangeValue&&handleChangeValue(val);
+      handleChangeValue&&handleChangeValue(val,this.state.typeChecks);
     }
   handleChange(){
     const value = this.$inp.current.value;
@@ -82,16 +85,37 @@ class MedicalInfo extends Component {
       this.$inp.current.focus();
       clearResult&&clearResult();
   }
+  handleTypeCheck(val){
+    let {typeChecks} = this.state;
+    //const allChecked = typeChecks.includes('0');
+    const alli = typeChecks.findIndex((it)=>it==='0');
+    const allChecked = alli!==-1;
+    if(val==='0'){      //全部与其他互斥
+      !allChecked?typeChecks=['0']:typeChecks.splice(alli,1);
+    }else{
+      allChecked&&typeChecks.splice(alli,1);
+      if(!typeChecks.includes(val)){
+        typeChecks.push(val);
+      }else{
+        const i = typeChecks.findIndex((it)=>val===it);
+        typeChecks.splice(i,1);
+      }
+    }
+    this.setState({
+      typeChecks:typeChecks
+    });
+  }
   componentDidMount(){
     const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
+    this.props.getFilters();
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
         const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-248;
+        const height = getWindowInnerHeight()-278;
         this.$ul.current.style.height = height+"px";
       }
     });
@@ -102,8 +126,8 @@ class MedicalInfo extends Component {
     });
   }
     render() {
-        const {searchResult} = this.props;
-        const {val, hasSearch,msg} = this.state;
+        const {searchResult,filterList} = this.props;
+        const {val, hasSearch,msg,typeChecks} = this.state;
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
@@ -112,6 +136,7 @@ class MedicalInfo extends Component {
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                   <button onClick={this.search}>搜索</button>
                 </p>
+                <Filters data ={filterList} checkeds={typeChecks} handleCheck={this.handleTypeCheck}></Filters>
               </div>
               {searchResult&&searchResult.length>0?<div className={style['result']}>
                     <p className={style['title']}>查询内容</p>

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

@@ -56,7 +56,7 @@
         border: none;
     }
     .result{
-        margin-top:46px;
+        margin-top:95px;
         padding: 0 5px 0 0;
         height: 100%;
         box-sizing: border-box;

+ 6 - 0
src/components/PushItems/DetailsModal/index.less

@@ -23,6 +23,12 @@
     overflow: hidden;
     z-index: 10;
     word-break: break-all;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
 }
 
 .details-content-name {

+ 6 - 1
src/components/PushItems/TipsMsg/index.less

@@ -2,7 +2,12 @@
 @import "~@less/base.less";
 
 .tips{
-  
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
    ul, ol {
      padding: 0 0 0 15px;
    }

+ 3 - 2
src/components/RadioDrop/index.jsx

@@ -101,9 +101,10 @@ class RadioDrop extends Component{
     });
   }
   componentDidMount(){    //默认值选中
-    const {data,ikey,handleSelect,hideTag,mainSaveText,value,boxMark} = this.props;
+    const {data,ikey,handleSelect,hideTag,mainSaveText,value,boxMark,readDefault,confDefault} = this.props;
+    const showDefault = readDefault===-1||readDefault===undefined?confDefault:readDefault;
     const selected = data.find((it)=>{
-      return it.selected === undefined&&+it.defaultSelect===1;
+      return it.selected === undefined&&+showDefault===1&&+it.defaultSelect===1;
     });
     if(boxMark!=1&&!hideTag&&selected){
       // const text = selected.labelPrefix+selected.name+selected.labelSuffix;

+ 6 - 1
src/components/Treat/GeneralTreat/index.less

@@ -24,6 +24,11 @@
     margin: 10px;
 }
 .general-item {
-    
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
     line-height: 36px;
 }

+ 17 - 4
src/containers/MedicalInfoContainer.js

@@ -3,18 +3,21 @@ import { connect } from 'react-redux';
 import { getSearchList } from '@store/async-actions/medicalInfo';
 import MedicalInfo from '@components/MedicalInfo';
 import {getAllConceptDetail} from '../store/async-actions/pushMessage';
-import {CLEAR_INFO_SEARCH_LIST} from '@types/medicalInfo';
+import {getMedicalFilters} from '../store/async-actions/fetchModules';
+import {CLEAR_INFO_SEARCH_LIST,SET_FILTER_LIST} from '@types/medicalInfo';
 
 function mapStateToProps(state) {
+    const {medicalInfo} = state;
     return{
-        searchResult: state.medicalInfo.searchResult,
+        searchResult: medicalInfo.searchResult,
+        filterList:medicalInfo.filterList
     }
 }
 
 function mapDispatchToProps(dispatch) {
     return {
-        handleChangeValue(val){
-            dispatch(getSearchList(val))
+        handleChangeValue(val,types){
+            dispatch(getSearchList(val,types))
         },
         getAllConceptDetail(item) {
             dispatch(getAllConceptDetail(item))
@@ -23,6 +26,16 @@ function mapDispatchToProps(dispatch) {
               dispatch({
                 type:CLEAR_INFO_SEARCH_LIST
               })
+        },
+        getFilters(){
+              getMedicalFilters().then((res)=>{
+                  if(res.data.code=='0'){
+                      dispatch({
+                        type:SET_FILTER_LIST,
+                        list:res.data.data[7]
+                      })
+                  }
+              });
         }
     }
 }

+ 3 - 0
src/containers/RadioDrop.js

@@ -12,8 +12,11 @@ import {billing} from '@store/async-actions/pushMessage';
 import config from '@config/index.js';
 
 function mapStateToProps(state){
+  const {typeConfig} = state;
   return {
     mainSaveText:state.mainSuit.saveText,
+    readDefault:typeConfig.readConfig[1],
+    confDefault:typeConfig.typeConfig[1]
   }
 }
 

+ 10 - 3
src/containers/SpreadDrop.js

@@ -15,10 +15,17 @@ import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText,ch
 import config from '@config/index.js';
 
 function mapStateToProps(state) {//console.log(state);
+  const {mainSuit,homePage} = state;
+  const {readConfig,typeConfig}=state.typeConfig;
+  const hasReadMode = readConfig!==-1;
+  const curOtherMode =hasReadMode&&readConfig[2]!==null?readConfig[2]:typeConfig[2];
+  const curMode =hasReadMode&&readConfig[1]!==null?readConfig[1]:typeConfig[1];
   return {
-    mainSaveText:state.mainSuit.saveText,
-    mainData:state.mainSuit.data,
-    windowWidth:state.homePage.windowWidth
+    mainSaveText:mainSuit.saveText,
+    mainData:mainSuit.data,
+    windowWidth:homePage.windowWidth,
+    otherDefault:+curOtherMode===1,
+    curDefault:+curMode===1,
   }
 }
 

+ 9 - 3
src/containers/eleType.js

@@ -142,14 +142,20 @@ function multCheckLabels(params,tagType){
   const {i,boxMark,showArr,importLabel,setHighter} = params;
   let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+"-"+i+'-0';
-  const showVal = data.value!==undefined?data.value:data.selFlag===1?data.remark:undefined;
+  const defaulted =data.selFlag===1;
+  let showVal = '';
+  if(defaulted){
+    const item0 = data.questionMapping[0];
+    showVal = item0.exclusionType===1?item0.questionDetailList[0].name:'';
+  }
   return <SpreadDrop data={data.questionMapping}
                      pos={data.pos}
                      ikey={showInx}
-                     defaulted={data.selFlag}
+                     defaulted={defaulted}
+                     showVal={showVal}
                      setHighter={setHighter}
                      placeholder={data.name}
-                     value={showVal}
+                     value={data.value}
                      copyType={data.copyType}
                      isExtBlue={data.specFlag===4?true:false}
                      selecteds={data.selecteds}

+ 2 - 1
src/store/actions/otherHistory.js

@@ -23,9 +23,10 @@ export const confirm = (state,action) =>{
     return res;
   }
   //只有无的项目选中
-  if(+copyType===0) {      //原标签保留
+  if(+copyType===0) {      //原标签保留
     arr.splice(ikey,1);
   }
+  arr[ikey].selFlag=0;      //已展开的既往史类标签,默认选中状态去掉
   if(arr[ikey].value)  arr[ikey].value= '';
   let preText = arr[ikey-1].value!==undefined?arr[ikey-1].value:arr[ikey-1].name||'';
   let newPreText =preText +nones;//console.log(arr[ikey-1],newPreText)

+ 6 - 0
src/store/async-actions/fetchModules.js

@@ -29,6 +29,7 @@ const api={
   getAllHisURL:'/inquiryInfo/hisInquirysForJz',   //全科历史病历
   downloadURL:'/inquiryInfo/exportInquirys',   //全科历史病历--导出
   addSecondDia:'/inquiryInfo/addDiagnoseSecond',   //全科历史病历--添加二次诊断
+  getMedicalTypes:'/dictionaryInfo/getList',       //获取医学知识搜索分类
 };
 
 export const getFeature = (item)=>{
@@ -36,6 +37,11 @@ export const getFeature = (item)=>{
   return datas;
 }
 
+//获取医学知识搜索分类
+export const getMedicalFilters = ()=>{
+  return json(api.getMedicalTypes,{});
+};
+
 //获取模板,多个
 export const getModules = (ids)=>{
   const {patInfo} = store.getState();

+ 3 - 2
src/store/async-actions/medicalInfo.js

@@ -2,7 +2,7 @@ import { json } from "@utils/ajax";
 import { GET_SEARCH_RESULT } from '@store/types/medicalInfo';
 
 
-export const getSearchList = (val) => {
+export const getSearchList = (val,types) => {
     if(val.trim() == ''){
         const data = [];
         return (dispatch) =>  dispatch({
@@ -14,7 +14,8 @@ export const getSearchList = (val) => {
     return (dispatch, getState) => {
         json('/retrieval/getStaticKnowledge',{
             inputStr:val,
-            inputIds:[]
+            inputIds:[],
+            types
         })
         .then((res)=>{
             const data = res.data.data;

+ 4 - 3
src/store/async-actions/print.js

@@ -43,10 +43,11 @@ export const saveMessage=(bool)=>{
 }
 export const realSaveData = (bool,list) => {
     let baseList = store.getState();
-    const readMode = baseList.typeConfig.readMode;          //回读模式
+    const dConfig = baseList.typeConfig;
+    const readMode = dConfig.readMode;          //回读模式
     let state = baseList.patInfo.message;
     //保存时保存当前的数据实际模式,不是系统模式,针对回读模式与系统模式不一致的情况处理
-    let whichSign = readMode===-1||readMode===null?baseList.typeConfig.mode:readMode;
+    let whichSign = readMode===-1||readMode===null?dConfig.mode:readMode;
     const pushMessage = baseList.pushMessage;
     let jsonStr = getAllDataStringList(baseList);
     let jsonData = getAllDataList(baseList);
@@ -54,7 +55,7 @@ export const realSaveData = (bool,list) => {
     const lisArr = transferIndexData(lisData);
     const haveAssess = Object.keys(baseList.assessResult.data).length>0;
     let otherData = {},pacsData={};
-    const docConfigs = baseList.typeConfig.typeConfig;
+    const docConfigs = dConfig.readConfig===-1||!dConfig.readConfig?dConfig.typeConfig:dConfig.readConfig;
     const evaluation={
       htmlContent:haveAssess?JSON.stringify(getEvaluations(baseList.assessResult,pushMessage)):'{}',
       //scaleList:[]

+ 5 - 2
src/store/async-actions/tabTemplate.js

@@ -47,8 +47,11 @@ export const saveTemplateDetail = (val,sex) => { //保存为模板
   let baseList = store.getState();
   let jsonData = getAllDataList(baseList);
   let jsonStr = getAllDataStringList(baseList);
-  const readMode = baseList.typeConfig.readMode;          //回读模式
-  let whichSign = readMode===-1||readMode===null?baseList.typeConfig.mode:readMode;
+  const dConfig = baseList.typeConfig;
+  const readMode = dConfig.readMode;          //回读模式
+  let whichSign = readMode===-1||readMode===null?dConfig.mode:readMode;
+  const docConfigs = dConfig.readConfig===-1||!dConfig.readConfig?dConfig.typeConfig:dConfig.readConfig;
+  jsonData.docConfigs=docConfigs;     //保存当时的设置引用
   let state = baseList.patInfo.message;
   let preview = {
     "chief": jsonStr.chief,

+ 6 - 2
src/store/reducers/medicalInfo.js

@@ -1,9 +1,10 @@
-import { SET_SEARCH_VALUE, GET_SEARCH_RESULT ,CLEAR_INFO_SEARCH_LIST} from '../types/medicalInfo';
+import { SET_SEARCH_VALUE, GET_SEARCH_RESULT ,CLEAR_INFO_SEARCH_LIST,SET_FILTER_LIST} from '../types/medicalInfo';
 import { setSearchValue, getSearchResult } from '../actions/medicalInfo'; 
 
 const initState = {
     searchValue: '',
-    searchResult: []
+    searchResult: [],
+    filterList:[],      //搜索分类
 }
 
 export default function (state=initState, action) {
@@ -16,6 +17,9 @@ export default function (state=initState, action) {
         case CLEAR_INFO_SEARCH_LIST:
             res.searchResult=[];
             return res;
+      case SET_FILTER_LIST:
+            res.filterList = action.list;
+            return res;
         default: 
             return state;
     }

+ 2 - 1
src/store/types/medicalInfo.js

@@ -1,3 +1,4 @@
 export const SET_SEARCH_VALUE = 'SET_SEARCH_VALUE';
 export const GET_SEARCH_RESULT = Symbol('GET_SEARCH_RESULT');
-export const CLEAR_INFO_SEARCH_LIST = 'CLEAR_INFO_SEARCH_LIST';
+export const CLEAR_INFO_SEARCH_LIST = 'CLEAR_INFO_SEARCH_LIST';
+export const SET_FILTER_LIST = 'SET_FILTER_LIST';