Преглед на файлове

icss引用预问诊信息基本完成,除了图片预览

luolei преди 5 години
родител
ревизия
7c9ba7bcec

BIN
src/common/images/mimi.png


BIN
src/common/images/prec.png


+ 2 - 2
src/components/Banner/ModeChange/index.jsx

@@ -85,8 +85,8 @@ class ModeChange extends Component {
                     <p>2、慢病模式下,该模版智能推送的设置功能不可用;</p>
                     <p>3、一般情况默认值:神清、精神可、胃纳可、睡眠可、二遍无殊、体重无明显减轻;</p>
                     <p>4、其他史默认值:既往史无殊、过敏史无殊、个人史无殊;</p>
-                    <p>5、标准字号:</p>
-                    <p>6、标准字体颜色:</p>
+                    <p>5、病历书写模块,字体大小标准为14px,增大为18px;</p>
+                    <p>6、病历书写模块,字体颜色标准为灰黑色,增黑为全黑色;</p>
                 </div>
                 {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:<div className={style['btn']} onClick={closeConfigModal}><button>&nbsp;&nbsp;关闭&nbsp;&nbsp;</button></div>}
             </div>

+ 16 - 5
src/components/Banner/index.jsx

@@ -3,14 +3,18 @@ import { connect } from "react-redux";
 import style from "./index.less";
 import ReactDom from "react-dom";
 import logo from "../../common/images/logoa.png";
+import prec from "../../common/images/prec.png";
 import setup from "../../common/images/setup.png";
 import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
 import Emergency from '@containers/Emergency';
+import PreInIcss from '@containers/PreInIcss';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime,getCurrentDate} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
 import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
+import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
+import {getPreMsg} from '@store/async-actions/preIcss';
 import ModeChange from './ModeChange'
 
 class Banner extends Component {
@@ -103,7 +107,7 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther} = this.props;
+    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
@@ -117,9 +121,13 @@ class Banner extends Component {
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       本科室近期全部病历
                     </div>:''}
+          <div className={style.prec} onClick={()=>preShow(show)}>
+            <img className={style["st"]} src={prec} alt="预问诊"/>
+            <i> 预问诊信息</i>
+          </div>
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
-            设置
+            <i> 设置</i>
           </div>
         </div>
         {visible&& <ModeChange
@@ -137,7 +145,7 @@ class Banner extends Component {
             </div>
           </React.Fragment>
           , domNode):''}
-        
+        {show?<PreInIcss></PreInIcss>:null}
       </div>
     );
   }
@@ -148,7 +156,8 @@ const mapStateToProps = function(state){
   const {message} = state.patInfo;
   return {
     ifShow:sysConfig.general_show,
-    deptName:message.selfDeptName
+    deptName:message.selfDeptName,
+    show:state.preIcss.preShow
   }
 }
 
@@ -162,7 +171,9 @@ const mapDispatchToProps = function(dispatch){
         type: CLEAR_COMSYMPTOMS
       })
     },
+    preShow(show){
+      show?dispatch({type:SET_PREC_SHOW}):getPreMsg()
+    }
   }
 }
-// export default Banner;
 export default connect(mapStateToProps,mapDispatchToProps)(Banner);

+ 10 - 0
src/components/Banner/index.less

@@ -35,6 +35,16 @@
           cursor: pointer;
           margin-left: 10px;
         }
+        .prec {
+          display: inline-block;
+          margin-right: 20px;
+          cursor: pointer;
+        }
+        i {
+          position: relative;
+          top: 1px;
+          font-weight: bold;
+        }
     }
     .st{
         margin: 9px 2px 10px 10px;

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

@@ -3,7 +3,7 @@ import PatInfoContainer from '@containers/PatInfoContainer.js';
 import style from "./index.less";
 import { connect } from 'react-redux';
 import historyCase from '@common/images/history.png';
-import health from '@common/images/prec.png'
+import health from '@common/images/health.png'
 import store from '@store';
 import { showHistory } from '@store/actions/historyTemplates';
 import { initItemList,setInitHistory } from '@store/async-actions/historyTemplates';
@@ -59,7 +59,7 @@ class InfoTitle extends Component {
                     <span><img src={historyCase} />&nbsp;历史病历</span>
                 </div>
                 <div className={style["health"]} >
-                    <span><img src={health} />&nbsp;预问诊信息</span>
+                    <span><img src={health} />&nbsp;健康档案</span>
                 </div>
             </div>
             <HistoryCases></HistoryCases>

+ 4 - 4
src/components/InfoTitle/index.less

@@ -43,10 +43,10 @@
   }
 }
 .health{
-    // opacity: 0.3;
-    // color: rgba(0,0,0,0.6);
-    // filter:alpha(opacity=30);
-    // -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
+    opacity: 0.3;
+    color: rgba(0,0,0,0.6);
+    filter:alpha(opacity=30);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
 }
 .font{
   font-size: 13px;

+ 40 - 0
src/components/PreInIcss/RotateImg/index.jsx

@@ -0,0 +1,40 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import down from "@common/images/show.png";
+import ReactDom from "react-dom";
+
+class RotateImg extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      de:0
+    }
+  }
+  componentDidMount() {
+    setTimeout(() => {
+
+    }, 0);
+  }
+  xunzhaun(flg){
+    console.log(this.refs.rotateImg.getDOMNode())
+    let de = this.state.de;
+    if(flg){
+        de = de-90
+    }else{
+        de = de-0+90
+    }
+    de=parseInt(de)
+    // $("#img_id").css("transform", "translateX(-50%) translateY(-50%) rotate(" + de + "deg)" );
+    // $("#img_id").attr("de", de);
+  }
+  render() {
+    const { src } = this.props;
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style.preImgWrap}>
+      <img className={style.rotateImg} src={src} ref="rotateImg" alt=""/>
+      <img className={style.rotate} src={down} alt="图片旋转"/>
+    </div>,domNode)
+  }
+}
+
+export default RotateImg;

+ 76 - 0
src/components/PreInIcss/SliddleTgl/index.jsx

@@ -0,0 +1,76 @@
+import React, { Component } from "react";
+import RotateImg from "../RotateImg";
+import style from "../index.less";
+import mimi from '@common/images/mimi.png';
+import down from "@common/images/show.png";
+import up from "@common/images/close.png";
+
+class SlideTgl extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      height:"",
+      slide:false,//展开收起显示隐藏
+      slideToggle:false,
+      text:'展开',
+      tgl:true,//展开收起文本设置
+      src:''
+    }
+    this.slideDown = this.slideDown.bind(this)
+    this.prePrecImg = this.prePrecImg .bind(this)
+  }
+  componentDidMount() {
+    setTimeout(() => {
+      let height = this.refs.current.getDOMNode().offsetHeight;
+      this.setState({
+        height:height,
+        slide:height>24?true:false,
+        slideToggle:height>24?true:false,
+      })
+    }, 0);
+  }
+  slideDown(flg){
+    this.setState({
+      tgl:flg,
+      slide:flg
+    })
+  }
+  prePrecImg(src){
+    this.setState({
+      src
+    })
+  }
+  render() {
+    const { item,showPre } = this.props;
+    return <li>
+    <div className={style.current} ref="current" style={{height:this.state.slide?'18px':'auto'}}>
+      <p className={style.curStyle}><span>现病史:</span>{item.detail.xbs}</p>
+      {item.detail.qts?<div className={style.slideTgl}><span>其他史:</span>{item.detail.qts}</div>:null}
+      {item.detail.supplement?<div className={style.slideTgl}><span>补充内容:</span>{item.detail.supplement}</div>:null}
+      {item.detail.imageList?<p className={style.last}>最近一次报告:</p>:null}
+      {item.detail.imageList?<div className={`${style.preImg} clearfix`}>
+        {
+          item.detail.imageList.map((part,idx)=>{
+            return <div className={style.img}>
+              <img className={style.report} src={part.originalImage} alt=""/>
+              <img className={style.mimi} onClick={()=>this.prePrecImg(part.originalImage)} src={mimi} alt=""/>
+            </div>
+          })
+        }
+      </div>:null}
+      {this.state.slideToggle&&!this.state.slide?<p className={style.slidesx} onClick={()=>this.slideDown(true)}>
+        收起
+        <img src={up} alt="收起"/>  
+      </p>:null}
+    </div>
+      {this.state.slideToggle&&this.state.slide?<p className={style.slidesx} onClick={()=>{this.slideDown(false)}}>
+        展开
+        <img src={down} alt="展开"/>
+      </p>:null}
+      <div className={style.pushPre} onClick={()=>showPre(item.detail)}>引用</div>
+      {/* {this.state.src?<RotateImg src={this.state.src}></RotateImg>:null} */}
+  </li>
+  }
+}
+
+export default SlideTgl;

+ 38 - 0
src/components/PreInIcss/index.jsx

@@ -0,0 +1,38 @@
+import React, { Component } from "react";
+import ReactDom from "react-dom";
+import style from "./index.less";
+import close from '@common/images/icon_close.png';
+import SlideTgl from "./SliddleTgl";
+
+class PreIcss extends Component {
+  constructor(props){
+    super(props)
+  }
+  render() {
+    const { show,data,windowHeight,showPreModal,showPre } = this.props;
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style['preInIcss']}>
+      <div className={style.title}>
+          <span>患者预问诊信息</span>
+          <img src={close} alt="关闭" onClick={showPreModal}/>
+        </div>
+      <div className={style.scrollWrap} style={{height:windowHeight-100+'px'}}>
+        {
+          data.map((item,index)=>{
+            return <div className={style.mainPre}>
+              <ul>
+                <li><span>预问诊录入时间:</span>{item.gmtCreate}</li>
+                <li><span>录入选择医院:</span>{item.sonHospitalName?item.sonHospitalName:item.hospitalName}</li>
+                <li><span>科室:</span>{item.hospitalDeptName}</li>
+                <li><span>主诉:</span>{item.detail.chiefComplaint}</li>
+                <SlideTgl showPre={showPre} item={item}></SlideTgl>
+              </ul>
+            </div>
+          })
+        }
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default PreIcss;

+ 126 - 0
src/components/PreInIcss/index.less

@@ -0,0 +1,126 @@
+.preInIcss {
+  z-index: 20;
+  position: fixed;
+  top: 50px;
+  bottom: 10px;
+  width: 450px;
+  right: 10px;
+  background-color: #fff;
+  overflow: hidden;
+  .scrollWrap {
+    overflow: auto;
+    height: 100%;
+    padding-bottom: 30px;
+  }
+  .title {
+    height: 40px;
+    line-height: 40px;
+    position: relative;
+    padding-left: 20px;
+    border-bottom: 1px solid #979797;
+    span {
+      font-size: 16px;
+    }
+    img {
+      position: absolute;
+      right: 10px;
+      top: 8px;
+      cursor: pointer;
+    }
+  }
+  .mainPre {
+    padding: 15px 20px 15px 20px;
+    font-size: 14px;
+    border-bottom: 5px solid #f5f5f5;
+    li {
+      // line-height: 18px;
+      padding: 5px 0;
+      span {
+        color: #000;
+        font-weight: bold;
+      }
+      .current {
+        // height: 24px;
+        overflow: hidden;
+      }
+      .curStyle {
+        padding: 0 0 5px 0;
+      }
+      .slideTgl {
+        line-height: 18px;
+        padding: 5px 0;
+      }
+      .last {
+        font-weight: bold;
+        line-height: 18px;
+        padding: 5px 0;
+      }
+      .preImg {
+        .img {
+          width: 120px;
+          height: 145px;
+          float: left;
+          margin-right: 10px;
+          margin-top: 10px;
+          border: 1px solid #ccc;
+          overflow: hidden;
+          position: relative;
+          .report {
+            width: 100%;
+          }
+          .mimi {
+            position: absolute;
+            bottom: 8px;
+            right: 8px;
+            width: 15px;
+            cursor: pointer;
+          }
+        }
+        .img:nth-child(3n+3){
+          margin-right: 0;
+        }
+      }
+    }
+  }
+  .slidesx {
+    cursor: pointer;
+    color: #58ACD7;
+    text-align: right;
+    img {
+      width: 15px;
+      height: 15px;
+      position: relative;
+      top: 2px;
+    }
+  }
+  .pushPre {
+    width: 50px;
+    height: 26px;
+    line-height: 26px;
+    background-color: #3B9ED0;
+    border-radius: 4px;
+    color: #fff;
+    text-align: center;
+    font-size: 12px;
+    margin-top: 15px;
+    cursor: pointer;
+  }
+}
+.rotateImg {
+  
+}
+.rotate{
+
+}
+.preImgWrap {
+  z-index: 100;
+  position: fixed;
+  margin-left: -500px;
+  left: 50%;
+  width: 1000px;
+  top: 7%;
+  bottom: 7%;
+  height: 86%;
+  background-color: #fff;
+  overflow: hidden;
+}

+ 39 - 0
src/containers/PreInIcss.js

@@ -0,0 +1,39 @@
+import {connect} from 'react-redux';
+import PreInIcss from '@components/PreInIcss';
+import {getPreMsg} from '@store/async-actions/preIcss';
+import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
+import {SETPRE,SETPREDATA} from "@store/types/homePage";
+
+const mapStateToProps = function(state){//console.log(state)
+  return {
+    data:state.preIcss.preData,
+    show:state.preIcss.preShow,
+    windowHeight:state.homePage.windowHeight,
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    showPreModal(){
+      dispatch({type:SET_PREC_SHOW})
+    },
+    showPre(detail){
+      let preIcss = {}
+      if(detail){
+        preIcss = {
+          chief:detail.chiefComplaint?new Array(detail.chiefComplaint):[],
+          current:detail.xbs?new Array(detail.xbs):[],
+          other:detail.qts?new Array(detail.qts):[],
+          checkBody:detail.supplement?detail.supplement:''
+        }
+      }
+      dispatch({type:SETPREDATA,preData:preIcss});
+      dispatch({type:SETPRE,show:true});
+    },
+    setPreData(){
+      getPreMsg()
+    }
+  }
+}
+
+export default connect(mapStateToProps,mapDispatchToProps)(PreInIcss);

+ 12 - 0
src/store/actions/preIcss.js

@@ -0,0 +1,12 @@
+export const getPrecList=(state,action)=>{
+  const res=Object.assign({},state);
+  res.preData = action.preData
+  return res;
+};
+
+export const setPrecShow=(state,action)=>{
+  const res=Object.assign({},state);
+  const show = res.preShow
+  res.preShow = action.preShow?action.preShow:!show
+  return res;
+};

+ 1 - 2
src/store/async-actions/patInfo.js

@@ -27,13 +27,13 @@ export const getPreMsg = (dispatch, getState) => {
     json(api.getPreMsgLis, {
         "hospitalCode": getUrlArgObject('hospitalId'),
         "inquiryCode":inCode,
+        "isHaveDetail":1,
         "patientCode": getUrlArgObject("patientNo"),
         "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline
     },true).then((res) => {
         const data = res.data;
         if (data.code == 0) {
             let result = data.data;
-            console.log(result)
             let preIcss = {
               chief:result.chiefComplaint?new Array(result.chiefComplaint):[],
               current:result.xbs?new Array(result.xbs):[],
@@ -95,7 +95,6 @@ export const initHistoryDetails = (dispatch) => {
         }).then((res) => {
             const data = res.data;
             let pre = baseList.homePage.sysConfig.connect_prec;
-            (pre==1)&&getPreMsg(dispatch)
             if (data.code == 0) {
                 const detail = data.data;
                 if(detail.dataJson){

+ 31 - 0
src/store/async-actions/preIcss.js

@@ -0,0 +1,31 @@
+import {json} from '@utils/ajax';
+import store from '@store';
+import {getUrlArgObject} from '@utils/tools';
+import { GET_PREC_LIST,SET_PREC_SHOW } from "../types/preIcss";
+import config from '@config/index';
+
+export const getPreMsg = () => {
+  // return (dispatch) => {
+    // let baseList = getState();
+    // let state = baseList.patInfo.message;
+    const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
+    json('/api/prec/inquiryInfo/hisInquirys', {
+        "hospitalCode": getUrlArgObject('hospitalId'),
+        "inquiryCode":inCode,
+        "isHaveDetail":1,
+        "patientCode": getUrlArgObject("patientNo"),
+        "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline
+    },true).then((res) => {
+        const data = res.data;
+        if (data.code == 0) {
+            let result = data.data;
+            if(result.length > 0){
+              store.dispatch({type:SET_PREC_SHOW})
+            }
+            store.dispatch({type:GET_PREC_LIST,preData:result});
+        } else {
+            // console.log(res)
+        }
+    })
+  // }
+}

+ 2 - 0
src/store/index.js

@@ -32,6 +32,7 @@ import scaleSearch from './reducers/scaleSearch';
 import emergencyHis from './reducers/emergencyHis';
 import wrapModalBody from './reducers/wrapModalBody';
 import wrapModalBodyPac from './reducers/wrapModalBodyPac';
+import preIcss from './reducers/preIcss';
 
 
 const composeEnhancers =
@@ -70,6 +71,7 @@ const rootReducer = combineReducers({
     emergencyHis,
     wrapModalBody,
     wrapModalBodyPac,
+    preIcss,
 });
 
 export default createStore(rootReducer, enhancer);

+ 2 - 0
src/store/reducers/homePage.js

@@ -77,8 +77,10 @@ export default function (state=initState,action) {
       return res;
     case SETPRE:
       res.showPre = action.show;
+      return res;
     case SETPREDATA:
       res.preData = action.preData;
+      return res;
     default:
       return res;
   }

+ 17 - 0
src/store/reducers/preIcss.js

@@ -0,0 +1,17 @@
+import { GET_PREC_LIST,SET_PREC_SHOW } from "../types/preIcss";
+import {getPrecList,setPrecShow} from "../actions/preIcss";
+
+const initState = {
+  preData: [],
+  preShow: false
+};
+export default function(state = initState, action) {
+  switch (action.type) {
+    case GET_PREC_LIST:
+      return getPrecList(state, action);
+    case SET_PREC_SHOW:
+      return setPrecShow(state, action);
+    default:
+      return state;
+  }
+}

+ 2 - 0
src/store/types/preIcss.js

@@ -0,0 +1,2 @@
+export const GET_PREC_LIST = 'GET_PREC_LIST';
+export const SET_PREC_SHOW = 'SET_PREC_SHOW';

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
+// const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚