Prechádzať zdrojové kódy

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

# Conflicts:
#	src/common/components/EditableSpan/index.jsx
#	src/components/AddAssistCheck/index.jsx
zhouna 6 rokov pred
rodič
commit
6732dbb617

+ 0 - 6
src/components/AddAssistCheck/index.less

@@ -102,10 +102,4 @@
         }
     }
 }
-.center {
-    text-align: center;
-    font-size: 16px;
-    padding-top: 10px;
-    padding-bottom: 50px;
-}
 

+ 1 - 1
src/components/AddInspect/index.jsx

@@ -114,7 +114,7 @@ class Inspect extends React.Component {
             currentIdx:idx,
             currentData:baseList
         })
-        // e.stopPropagation();
+        e.stopPropagation();
     }
     handleShowDate(){
         this.setState({

+ 4 - 12
src/components/Banner/index.jsx

@@ -10,8 +10,7 @@ class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
-      mode: props.typeConfig,
-      zIndex:40
+      mode: props.typeConfig
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.closeConfigModal = this.closeConfigModal.bind(this);
@@ -21,17 +20,13 @@ class Banner extends Component {
 
   showConfigModal(){
     this.setState({
-      mode:this.props.typeConfig,
-      zIndex:202
+      mode:this.props.typeConfig
     });
     this.props.showConfigModal()
   }
 
   closeConfigModal(){
     this.props.closeConfigModal();
-    this.setState({
-      zIndex:40
-    })
   }
 
   changeType(typeConfig){
@@ -49,9 +44,6 @@ class Banner extends Component {
     }
     confirmType&&confirmType(mode);
     this.closeConfigModal()
-    this.setState({
-      zIndex:40
-    })
   }
   /*componentDidUpdate(){
     const {failed} = this.props;
@@ -62,11 +54,11 @@ class Banner extends Component {
   }*/
   render() {
     const {visible} = this.props;
-    const {mode,zIndex} = this.state;
+    const {mode} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
-      <div className={style["logo"]} style={{zIndex:zIndex}}>
+      <div className={style["logo"]} >
         <img src={logo} />
         <span>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]} onClick={showConfigModal}>

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

@@ -9,7 +9,7 @@
     position: fixed;          //页面布局调整
     width: 100%;
     top: 0;
-    // z-index: 202;
+    z-index: 202;
 
     img{
       vertical-align: middle;

+ 6 - 1
src/components/DiagnosticList/index.jsx

@@ -80,13 +80,18 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
+                        const hasTreat = item.treat.commonTreatment && item.treat.surgeryTreatment && item.treat.treatment.length>0
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '主' : index+1}</span>
                                     <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
-                                    <span className={style['treat']} onClick={() =>{this.showTreat(item)}}>治疗方案</span>
+                                    <span className={style['treat']}
+                                          style ={{ color: hasTreat ?'' : 'gray', border: hasTreat ?'' : '1px solid gray'}}
+                                          onClick={() =>{hasTreat && this.showTreat(item)}}>
+                                          治疗方案
+                                    </span>
                                     <img className={style['diag-del']} src={del_icon} onClick={()=>{this.handleDeleteItem(item.id)}}/>
                         </div>)
                     })}

+ 1 - 2
src/components/Inspect/index.jsx

@@ -67,8 +67,7 @@ class Inspect extends React.Component {
                 if( files.length ){
                     console.log(files[0])
                     FileAPI.upload({
-                        // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
-                        url: api.upload,
+                        url: 'http://192.168.2.236/api/icss/lisExcelRes/lisExcelAnalysis',
                         data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
                         files: { uploadfile: files[0] },
                         headers:{

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

@@ -140,13 +140,12 @@ class MainSuit extends Component{
     const that = this;
     if(data.length > config.limited){
       Notify.info(config.limitText);
+      e.target.innerText = text.substr(0,config.limited);  //输入法内输入多个字再按enter的情况
+      e.target.blur();
       if(overFlag){
         e.target.innerText = inpText;
-        e.target.blur();
         return
       }
-      e.target.innerText = data.substr(0,config.limited);  //输入法内输入多个字再按enter的情况
-      e.target.blur();
       this.setState({
         inpText:data.substr(0,config.limited),
         overFlag:true

+ 2 - 16
src/components/Operation/index.jsx

@@ -22,8 +22,7 @@ class Operation extends Component {
       okColor: '',
       oKBg: '',
       msg: '',
-      type: '',
-      zIndex:40
+      type: ''
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -36,31 +35,19 @@ class Operation extends Component {
   }
 
   showPrint() {
-    this.setState({
-      zIndex:240
-    })
     this.props.showPrintPreview()
   }
 
   closePrint() {
-    this.setState({
-      zIndex:40
-    })
     this.props.closePrintPreview()
   }
 
 
   showPreview() {
-    this.setState({
-      zIndex:240
-    })
     this.props.showPreview()
   }
 
   closePreview() {
-    this.setState({
-      zIndex:40
-    })
     this.props.closePreview()
   }
 
@@ -257,9 +244,8 @@ class Operation extends Component {
   render() {
     const { showPrint, closePrint, showPreview, closePreview } = this;
     const { visible, preVisible } = this.props.print;
-    const {zIndex} = this.state;
 
-    return <div className={style['container']} style={{zIndex:zIndex}}>
+    return <div className={style['container']} >
       <button className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</button>
       <button className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</button>
       <button className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</button>

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

@@ -7,7 +7,7 @@
     left: 10px;
     right: 480px;
     background-color: #fff;
-    // z-index: 240;
+    z-index: 240;
     padding-bottom: 10px;
     border-bottom: 10px solid #e4e6e7;
     .button {

+ 2 - 1
src/components/TreatDesc/DrugInfo/index.jsx

@@ -12,8 +12,9 @@ class DrugInfo extends Component {
         return (<div className={style['drug-info-wrapper']}>
                 <h3 className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']}>
+                    <div className={style['drug-title1']}>{drugInfo.title}说明书</div>
                     {drugInfo.drugDesc.map((item, index) =>{
-                        return <div className={style['drug-desc-item']}>{item.title}: <span dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
+                        return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title}</span> <span className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
                     })}
                 </div> }
 

+ 26 - 1
src/components/TreatDesc/DrugInfo/index.less

@@ -20,9 +20,34 @@
     height: 40px;
     line-height: 40px;
     padding: 0 40px;
+    border-bottom: 1px solid #979797;
 }
 .close-drug-desc {
     position: absolute;
     right: 0;
     width: 30px;
-}
+}
+.drug-desc-item {
+    padding: 5px 0;
+}
+.drug-desc-title {
+    display: inline-block;
+    font-weight: bold;
+    font-size: 14px;
+    height: 100%;
+    float: left;
+}
+.drug-desc-title::before {
+    content: '【'
+}
+.drug-desc-title::after {
+    content: '】'
+}
+.drug-title1 {
+    height: 60px;
+    line-height: 60px;
+    font-size: 32px;
+    color: #000000;
+    text-align: center;
+}
+.drug-desc-content {}

+ 6 - 4
src/containers/DiagnosticItem.js

@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
 import DiagnosticItem from '@components/DiagnosticItem';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'; 
 import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
+import { addDiagnostic } from '@store/async-actions/treat';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import {billing, getTips} from '../store/async-actions/pushMessage';
@@ -17,10 +18,11 @@ function mapStateToProps(state) {
 function mapDispatchToProps(dispatch) {
     return{
         addDiagnostic: (item) => {
-            dispatch({
-                type: ADD_DIAGNOSTIC,
-                item: item
-            });
+            dispatch(addDiagnostic(item))
+            // dispatch({
+            //     type: ADD_DIAGNOSTIC,
+            //     item: item
+            // });
             dispatch({
                 type: GET_DIAGNOSTIC_STR
             });

+ 1 - 1
src/containers/Inspect.js

@@ -25,7 +25,7 @@ function mapDispatchToProps(dispatch, store) {
         },
         handleLabelSub(e,id,idx){
             dispatch(fillActived(id,idx))
-            // e.stopPropagation()
+            e.stopPropagation()
         },
         handleClear(e,idx){
             e.stopPropagation();

+ 0 - 1
src/store/actions/diagnosticList.js

@@ -7,7 +7,6 @@ export const addDiagnostic = (state, action) => {
 export const delDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.diagnosticList = res.diagnosticList.filter(item => item.id !== action.id);
-    console.log('del',state,action.id)
     return res;
 }
 

+ 1 - 1
src/store/actions/pushMessage.js

@@ -190,7 +190,7 @@ export const addBilling = (state, action) => {
 		}
 	}
 	if(res.advice.assay  && res.advice.check !== '') {
-			if(res.advice.assay.substring(res.advice.assay.length-2,res.advice.assay.length-1) !== ', ') {
+			if(res.advice.assay.substring(res.advice.assay.length-2,res.advice.assay.length) !== ', ') {
 				res.advice.assay = res.advice.assay + ', '
 			} 
 	}

+ 1 - 1
src/store/async-actions/copyRight.js

@@ -5,7 +5,7 @@ import { storageLocal } from "@utils/tools"
 export const getMessage = (dispatch, getState) => {
     const state = getState();
     // 请求地址
-    post('/api/icss/versionInfo/getVersionInfoAlls')
+    post('http://192.168.2.236/api/icss/versionInfo/getVersionInfoAlls')
     .then((data) => {
         
         const versionInfo = JSON.parse(storageLocal.get('versionInfo'));

+ 53 - 1
src/store/async-actions/treat.js

@@ -1,5 +1,6 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
+import { ADD_DIAGNOSTIC} from '@store/types/diagnosticList'; 
 import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
 import {getEMRParams} from  '@utils/tools';
 const api={
@@ -7,6 +8,58 @@ const api={
     textPush:'/api/icss/push/pushText'
 }
 
+export const addDiagnostic = (item) => {
+        return (dispatch, getState) => {
+            const state = getState();
+            let url = api.push;
+            if(+state.typeConfig.confirmType===1){
+                url=api.textPush;
+            }
+            const emrData = getEMRParams();
+            const diagnosticList = state.diagnosticList.diagnosticList;
+            let diag = '';
+            if(diagnosticList) {
+                for (let i = 0; i < diagnosticList.length; i++ ) {
+                    if(i ===0 ) {
+                        diag = diag + diagnosticList[i].name;
+                    } else {
+                        diag = diag + ',' + diagnosticList[i].name;
+                    }
+                    
+                }
+            }
+            if (item.type === 1) {
+                diag = diag + ',' + item.name
+            } else {
+                diag = diag + ',' + item.name
+            }
+            const params = {
+                "age": emrData.age,
+                "featureType": "8",
+                "diag": diag,
+                "diseaseId":  item.id,
+                "lis": emrData.lis,
+                "other": emrData.other,
+                "pacs": emrData.pacs,
+                "sex": emrData.sex,
+                "symptom": emrData.current||emrData.main,
+                "vital": emrData.vital
+            };
+            
+            json(url, params).then((data) =>{
+                item.treat = data.data.data.treat
+            
+                return dispatch({
+                    type: ADD_DIAGNOSTIC,
+                    item: item
+                })
+            }).catch((e) =>{
+                console.log(e)
+            })
+        }
+
+}
+
 export const getTreatResult = (item) =>{
     return (dispatch, getState) => {
         const state = getState();
@@ -146,7 +199,6 @@ export const getTreatResult = (item) =>{
     
 } 
 export const getInstroduce = (item)=>{
-    // const instroduce = '<p>药品说明1</p><p>药品说明2</p><p>药品说明3</p>'
 
     return (dispatch, getState) =>{
         const url = '/api/icss/introduceInfo/getByQuestionId';

+ 2 - 2
static/pages/hisLib/infomation.js

@@ -3,8 +3,8 @@
     function getInfomation(){
         // var infoUrl ="http://" + window.location.host+'/icss-web/kl/introduce/get_by_itemidAndType';
         // var infoUrl ="http://" + window.location.host+'/api/icss/introduceInfo/getByQuestionId';
-        var infoUrl ='/api/icss/introduceInfo/getByQuestionId'
-        var imageUrlPrefix = 'http://192.168.2.241:82'
+        var infoUrl ='http://192.168.2.236:5050/api/icss/introduceInfo/getByQuestionId'
+        var imageUrlPrefix = 'http://192.168.2.236:82'
         var urlParam = parseUrlParams();
         console.log(urlParam)
         var param = {

+ 0 - 119
static/pages/test.html

@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Document</title>
-    <style>
-        .upload-btn {
-            width: 130px;
-            height: 25px;
-            overflow: hidden;
-            position: relative;
-            border: 3px solid #06c;
-            border-radius: 5px;
-            background: #0cf;
-        
-        }
-            .upload-btn:hover {
-                background: #09f;
-            }
-            .upload-btn__txt {
-                z-index: 1;
-                position: relative;
-                color: #fff;
-                font-size: 18px;
-                font-family: "Helvetica Neue";
-                line-height: 24px;
-                text-align: center;
-                text-shadow: 0 1px 1px #000;
-            }
-            .upload-btn input {
-                top: -10px;
-                right: -40px;
-                z-index: 2;
-                position: absolute;
-                cursor: pointer;
-                opacity: 0;
-                filter: alpha(opacity=0);
-                font-size: 50px;
-            }
-        </style>
-        <script src="../dist/jQuery.js"></script>
-        <script>
-        
-          window.onload=function(){
-              document.documentElement.focus()
-            } 
-        </script>
-
-    <script>
-        var FileAPI = {
-            // @default: "./dist/"
-            staticPath: './dist/',
-
-            // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-            flashUrl: './dist/FileAPI.flash.swf',
-
-            // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
-            flashImageUrl: './dist/FileAPI.flash.image.swf'
-        };
-    </script>
-    <script src="../dist/FileAPI.js"></script>
-
-</head>
-<body>
-    <div>
-        <div class="js-fileapi-wrapper upload-btn">
-            <div class="upload-btn__txt">Choose files</div>
-            <input id="choose" name="uploadfile" type="file" multiple />
-        </div>
-    </div>
-    
-    <script>
-        $(function(){
-            $('iframe').bind( 'load', function(){} )
-            FileAPI.debug = true
-            $.support.cors = true;
-            var choose = document.getElementById('choose');
-            FileAPI.event.on(choose, 'change', function (evt){
-                var files = FileAPI.getFiles(evt);
-                FileAPI.filterFiles(files, function (file, info){
-                    return	true;
-                }, 
-                function (files, rejected){
-                    if( files.length ){
-                        FileAPI.upload({
-                            dataType: 'string',
-                            url: 'http://192.168.2.236/api/icss/lisExcelRes/lisExcelAnalysis',
-                            files: { 
-                                // 'hospitalCode':'A001',
-                                'uploadfile': files[0]
-                            },
-                            headers:{
-                                // 'Content-Type':'Content-Type: multipart/form-data;'
-                                // 'Content-Type':'application/json;charset=UTF-8'
-                                // 'Content-type': "text/plain"
-                            },
-                            progress: function (evt){ 
-                                console.log(files,1111)
-                                alert(7)
-                            },
-                            complete: function (err, xhr){
-                                alert(9999)
-                                if( !err ){
-                                    var result = xhr.responseText;
-                                    alert(JSON.parse(result).code == 0?'成功':'失败')
-                                }else{
-                                    alert(9)
-                                }
-                            }
-                        });
-                    }
-                });
-            });
-        })
-    </script>
-</body>
-</html>

+ 0 - 75
static/pages/test2.html

@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=8">
-    <title>Document</title>
-
-    <script src="./dist/jquery-1.9.1.min.js"></script>
-    <script src="./dist/jquery.form.js"></script>
-
-</head>
-<body>
-<div>
-    <form id="tForm" action='http://192.168.2.236:5050/api/icss/lisExcelRes/lisExcelAnalysis' enctype="multipart/form-data" method="post" name="fileForm">
-        <input type="hidden" value="A001" name="hospitalCode"/>
-        <label for="upload">
-            <input type="file" id="upload" class="file" name="uploadfile"/>
-        </label>
-        <input type="submit" value="Submit 1" name="uploadSubmitter1">
-    </form>
-</div>
-
-<script>
-  /*function subimtBtn() {
-    var form = $("form[name=fileForm]");console.log(111)
-    var options = {
-      url:'http://192.168.2.241:5050/api/icss/lisExcelRes/lisExcelAnalysis', //上传文件的路径
-      type:'post',
-      data:{hospitalCode:'A001',uploadfile:$("#upload").value},
-      success:function(data,a){
-        console.log(222,JSON.stringify(data));
-        //....       //异步上传成功之后的操作
-      },
-      complete:function(data,a){
-        console.log(111,JSON.stringify(data));
-        //....       //异步上传成功之后的操作
-      }
-    };
-    form.ajaxSubmit(options);
-  }*/
-  /*$(function(){
-    $('iframe').bind( 'load', function(){} )
-    FileAPI.debug = true
-    $.support.cors = true;
-    var choose = document.getElementById('upload');
-    FileAPI.event.on(choose, 'change', function (evt){
-      var files = FileAPI.getFiles(evt);console.log(files[0])
-      FileAPI.filterFiles(files, function (file, info){
-          return	true;
-        },
-        function (files, rejected){
-          if( files.length ){
-            var form = $("form[name=fileForm]");
-            var options = {
-              url:'http://192.168.3.98:5050/api/icss/lisExcelRes/lisExcelAnalysis', //上传文件的路径
-              type:'post',
-              data:{hospitalCode:'A001'},
-              files: { uploadfile: files[0] },
-              success:function(data){
-                console.log(JSON.stringify(data));
-                //....       //异步上传成功之后的操作
-              },
-              complete:function(s){
-                console.log(222,JSON.stringify(s));
-              }
-            };
-            form.ajaxSubmit(options);
-          }
-        });
-    });
-  })*/
-</script>
-</body>
-</html>

+ 0 - 49
static/pages/test3.html

@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head runat="server">
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title></title>
-    <script src="dist/jquery-1.7.1.js"></script>
-    <script src="dist/ajaxfileupload.js"></script>
-</head>
-<body>
-<p><input type="file" id="file1" name="file" /></p>
-<input type="button" value="上传" />
-<p><img id="img1" alt="上传成功" src="" /></p>
-
-<script>
-  $(function () {
-    //$.support.cors = true;
-    $(":button").click(function () {
-      ajaxFileUpload();
-    })
-  })
-  function ajaxFileUpload() {
-    $.ajaxFileUpload
-    (
-      {
-        url: 'http://192.168.2.236:5050/api/icss/lisExcelRes/lisExcelAnalysis', //用于文件上传的服务器端请求地址
-        fileElementId: 'file1', //文件上传空间的id属性  <input type="file" id="file" name="file" />
-        dataType: 'json', //返回值类型 一般设置为json
-        success: function (data, status)  //服务器成功响应处理函数
-        {
-          $("#img1").attr("src", data.imgurl);
-          if (typeof (data.error) != 'undefined') {
-            if (data.error != '') {
-              alert(data.error);
-            } else {
-              alert(data.msg);
-            }
-          }
-        },
-        error: function (data, status, e)//服务器响应失败处理函数
-        {
-          alert(e);
-        }
-      }
-    )
-    return false;
-  }
-</script>
-</body>
-</html>