Browse Source

查体高亮

zhouna 6 years ago
parent
commit
0038e4e582

+ 6 - 0
src/common/less/variables.less

@@ -44,6 +44,7 @@
 @dropdwon-long-width:600px;
 @dropdwon-height:200px;
 @selected-bg:#fff;
+@import-color:#ffad5f;
 
 /*********推送内容容器宽度*************/
 @push-width: 450px;
@@ -177,4 +178,9 @@
   border:2px @blue solid;
   border-radius: 2px;
   /*box-shadow: 0px 0px 2px @blue;*/
+}
+
+.orange-border{
+  border:1px solid @import-color;
+  //color: @import-color!important;
 }

+ 2 - 2
src/components/CheckBody/index.jsx

@@ -30,7 +30,7 @@ class CheckBody extends Component{
     this.setState({boxLeft:nextProps.boxLeft})
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds} = this.props;
+    const {data,showArr,saveText,selecteds,importLabel} = this.props;
     let arr = [],list=[];//console.log(data,saveText)
     const {boxMark,showAll} = this.state;
     let showArray = data.filter((it)=>{
@@ -41,7 +41,7 @@ class CheckBody extends Component{
     if(showData){
       list = showData;
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds});
+        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel});
       });
     }
     return arr;

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

@@ -33,12 +33,13 @@ class MultSpread extends Component{
     this.handleEdit = this.handleEdit.bind(this);
   }
   getClass(){
-    const {saveText,ikey,showAdd} = this.props;
+    const {saveText,ikey,showAdd,isImports} = this.props;
     const labelInx = ikey.substr(1);
     const text = saveText&&saveText[+labelInx];
+    const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd);
+    return classNames(isSelected,hasAdd,orgBorder);
   }
   getLabels(){
     const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;

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

@@ -180,13 +180,14 @@ class NumberDrop extends Component{
     }
   }
   getClasses(){         //整个标签是否有值的状态
-    const {hideTag,placeholder,value} = this.props;
+    const {hideTag,placeholder,value,isImports} = this.props;
     const $span = this.$span.current;
     const val = value;//$span&&$span.innerText.trim()||value;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
+    const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,blueBorder);
+    return className(isSelected,noTag,blueBorder,orgBorder);
   }
   changeToEdit(e){        //整个标签双击编辑状态
     const {value,id,handleDbclick,patId,handleHide,show} = this.props;

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

@@ -1,6 +1,7 @@
 import React,{Component} from 'react';
 import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js';
 import {DropList} from '@commonComp';
+import classNames from 'classnames';
 import style from "./index.less";
 import $ from "jquery";
 
@@ -36,8 +37,9 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show} = this.props;
+    const {value,hideTag,placeholder,show,isImports} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
+    const orgBorder = isImports?style['orange-border']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -47,9 +49,9 @@ class RadioDrop extends Component{
       return style['no-tag'];
     }
     if(value){
-      return blueBorder?style['selected-tag']+' '+blueBorder:style['selected-tag'];
+      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
   handleSelect(item){
     const {handleSelect,ikey,mainSaveText,value} = this.props;

+ 5 - 3
src/components/RadioInpDrop/index.jsx

@@ -3,6 +3,7 @@ import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js'
 import {DropList} from '@commonComp';
 import config from '@config/index';
 import style from "./index.less";
+import classNames from 'classnames';
 import $ from "jquery";
 
 /****
@@ -39,8 +40,9 @@ class RadioInpDrop extends Component{
     this.handleInnerInp = this.handleInnerInp.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show} = this.props;
+    const {value,hideTag,placeholder,show,isImports} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
+    const orgBorder = isImports&&!value?style['orange-border']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -50,9 +52,9 @@ class RadioInpDrop extends Component{
       return style['no-tag'];
     }
     if(value){
-      return blueBorder?style['selected-tag']+' '+blueBorder:style['selected-tag'];
+      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
   handleSelect(item){
     const {handleSelect,ikey,value,placeholder} = this.props;

+ 5 - 3
src/components/SpreadDrop/index.jsx

@@ -310,16 +310,18 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
+    const {isImports,show,value} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
-    if(this.props.show){
+    const orgBorder = isImports&&!value?style['orange-border']:'';
+    if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
       $(this.$div.current).removeClass(style['borderd']);
     }
-    if(this.props.value){
+    if(value){
       return classNames(style['selected-tag'],blueBorder);
     }
-    return style['tag'];
+    return classNames(style['tag'],orgBorder);
   }
 
   componentDidMount(){

+ 1 - 0
src/containers/CheckBody.js

@@ -25,6 +25,7 @@ function mapStateToProps(state){
     selecteds:checkBody.selecteds,       //普通多选选中状态
     boxTop:state.homePage.boxTop,
     boxLeft:state.homePage.boxLeft,
+    importLabel:checkBody.importLabel,    //需高亮的标签id
   }
 }
 

+ 14 - 3
src/containers/eleType.js

@@ -20,7 +20,8 @@ import Multiple from '@containers/Multiple';
 //单选类型
 export function singleRadio(params){
   const data = params.item;//console.log(111,data);
-  const {i,hideTag,boxMark,showArr,selecteds,boxTop,boxLeft} = params;
+  const {i,hideTag,boxMark,showArr,selecteds,boxTop,boxLeft,importLabel} = params;
+  let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+i+'0';    //单括号多标签的情况下需要识别同一个标签内多个下拉组件的显示状态
   switch (+data.controlType){
     case 0:
@@ -34,6 +35,7 @@ export function singleRadio(params){
                         value = {data.value}
                         boxMark={boxMark}
                         id={data.id}
+                        isImports={isHigh}
                         ikey={showInx}
                         hideTag={hideTag}></RadioDrop>;
     case 2:
@@ -47,6 +49,7 @@ export function singleRadio(params){
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      type={boxMark}
+                     isImports={isHigh}
                      textPrefix={data.labelPrefix}
                      textSuffix={data.labelSuffix}
                      id={data.id}></Multiple>
@@ -59,6 +62,7 @@ export function singleRadio(params){
                          formulaCode={data.formulaCode}
                          boxMark={boxMark}
                          id={data.id}
+                         isImports={isHigh}
                          show={showArr&&showArr[showInx]}
                          ikey={showInx}
                          value={data.value}
@@ -68,6 +72,7 @@ export function singleRadio(params){
                         suffix={data.labelSuffix}
                         placeholder={data.name}
                         value={data.value}
+                        isImports={isHigh}
                         id={data.id}
                         ikey={showInx}></InlineTag>;
     case 7:
@@ -75,6 +80,7 @@ export function singleRadio(params){
                          suffix={data.labelSuffix}
                          min={data.minValue}
                          max={data.maxValue}
+                         isImports={isHigh}
                          placeholder={data.name}
                          boxMark={boxMark}
                          id={data.id}
@@ -90,6 +96,7 @@ export function singleRadio(params){
                         show={showArr&&showArr[showInx]}
                         value = {data.value}
                         boxMark={boxMark}
+                        isImports={isHigh}
                         id={data.id}
                         ikey={showInx}></RadioInpDrop>;
     default:
@@ -100,7 +107,8 @@ export function singleRadio(params){
 //多标签组合型
 function multLabels(params){
   const data = params.item;
-  const {i,boxMark,showArr,saveText,selecteds} = params;
+  const {i,boxMark,showArr,saveText,selecteds,importLabel} = params;
+  let isHigh=importLabel&&importLabel.includes(data.id);
   return <MultSpread data={data.questionMapping}
                      showAdd = {+data.showAdd===1}
                      copyId={data.id}
@@ -108,6 +116,7 @@ function multLabels(params){
                      showArr={showArr||{}}
                      update={Math.random()}
                      boxMark={boxMark}
+                     isImports={isHigh}
                      ikey={boxMark+i}
                      selecteds={selecteds&&selecteds[i]}
                      saveText={saveText}
@@ -119,7 +128,8 @@ function multLabels(params){
 //多选标签展开型
 function multCheckLabels(params,tagType){
   const data = params.item;
-  const {i,boxMark,showArr,selecteds} = params;
+  const {i,boxMark,showArr,selecteds,importLabel} = params;
+  let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+i+'0';
   return <SpreadDrop data={data.questionMapping}
                      ikey={showInx}
@@ -129,6 +139,7 @@ function multCheckLabels(params,tagType){
                      selecteds={selecteds ?selecteds[i]:[]}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
+                     isImports={isHigh}
                      type={boxMark}
                      tagType={tagType}
                      textPrefix={data.prefix}

+ 7 - 0
src/store/actions/checkBody.js

@@ -454,4 +454,11 @@ export function delSingleLable(state,action){
   }
   res.update = Math.random();
   return res;
+}
+//查体推送高亮标签
+export function setImportCheckbodyLabel(state,action) {console.log(action)
+  let res = Object.assign({},state);
+  res.importLabel = action.labels;
+  res.update = Math.random();
+  return res;
 }

+ 8 - 2
src/store/async-actions/pushMessage.js

@@ -2,6 +2,7 @@ import { get, post, json } from "@utils/ajax";
 import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS } from '../types/pushMessage';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
 import {storageLocal,getEMRParams} from '@utils/tools';
+import {SET_IMPORT_CHECKBODY_LABEL} from "../types/checkBody";
 
 const api={
   push:'/api/icss/push/pushInner',
@@ -19,7 +20,7 @@ export const billing = (mdata) => {
   const emrData = getEMRParams();
   const params = {
     age: emrData.age,
-    featureType: "5,6,7",
+    featureType: "4,5,6,7",
     diag: emrData.dis,
     lis: emrData.lis,
     other: emrData.other,
@@ -30,7 +31,7 @@ export const billing = (mdata) => {
   };
   storageLocal.set('emrParam',params);      //推送数据存储,用作推送前对比是否有变,有变才推送
     json(url, params).then((data) => {
-        let {dis, lab, pacs} = data.data.data||{};
+        let {dis, lab, pacs,markedVitalIds} = data.data.data||{};console.log(markedVitalIds)
         lab = lab||[];
         pacs = pacs||[];
         // console.log('推送数据', data.data.data);
@@ -61,6 +62,11 @@ export const billing = (mdata) => {
             lab: lab||[],
             pacs: pacs||[],
         });
+        //查体高亮标签
+        dispatch({
+          type:SET_IMPORT_CHECKBODY_LABEL,
+          labels:markedVitalIds
+        })
   }).catch((e) =>{
       console.log(e)
   }) 

+ 6 - 3
src/store/reducers/checkBody.js

@@ -1,10 +1,10 @@
 import {SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
   SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,
   SETCHECKINPUT,DEL_CHECKBODY,CHANGECHECKTEXTLABEL_NUMBER,CHECKCONFIRMSELECTED,
-  CHECKBODY_MUL,DEL_CHECKBODY_LABLE,SET_CK_RADIO_INPUT_VAL} from '../types/checkBody.js';
+  CHECKBODY_MUL,DEL_CHECKBODY_LABLE,SET_CK_RADIO_INPUT_VAL,SET_IMPORT_CHECKBODY_LABEL} from '../types/checkBody.js';
 import {set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,
   setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel,backspaceText,
-  changeNumLabelVal,confirm,multipleComfirn,delSingleLable,setRadioInputValue} from '../actions/checkBody.js';
+  changeNumLabelVal,confirm,multipleComfirn,delSingleLable,setRadioInputValue,setImportCheckbodyLabel} from '../actions/checkBody.js';
 import config from '@config/index.js';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
@@ -15,7 +15,8 @@ const initState = {
                 selecteds:[],
                 focusIndex:'',
                 isEmpty:true,      //是否为空白,需要请求数据
-                showSearchBox:false
+                showSearchBox:false,
+                importLabel:[]//[430,436,40,278,435,279,28,442,447,448,449,450,453,454,457,456,282]
           };
 export default function(state=initState,action){
   let res = Object.assign({},state);
@@ -60,6 +61,8 @@ export default function(state=initState,action){
       return delSingleLable(state,action);
     case SET_CK_RADIO_INPUT_VAL:
       return setRadioInputValue(state,action);
+    case SET_IMPORT_CHECKBODY_LABEL:
+      return setImportCheckbodyLabel(state,action);
     default:
       return res;
   }

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

@@ -17,4 +17,5 @@ export const CHANGECHECKTEXTLABEL_NUMBER = 'CHANGECHECKTEXTLABEL_NUMBER';//数
 export const CHECKCONFIRMSELECTED = 'spread_check_body_labels';
 export const CHECKBODY_MUL = 'CHECKBODY_MUL';//单列多选
 export const DEL_CHECKBODY_LABLE = 'DEL_CHECKBODY_LABLE';
-export const SET_CK_RADIO_INPUT_VAL = 'SET_CK_RADIO_INPUT_VAL';
+export const SET_CK_RADIO_INPUT_VAL = 'SET_CK_RADIO_INPUT_VAL';
+export const SET_IMPORT_CHECKBODY_LABEL='SET_IMPORT_CHECKBODY_LABEL';

+ 1 - 1
src/utils/tools.js

@@ -629,7 +629,7 @@ function didPushParamChange(){
   const oldParams = storageLocal.get('emrParam');
   const newParams = JSON.stringify({
     age: emrData.age,
-    featureType: "5,6,7",
+    featureType: "4,5,6,7",
     diag: emrData.dis,
     lis: emrData.lis,
     other: emrData.other,