zhangxc 6 éve
szülő
commit
ad68815606

+ 5 - 6
src/common/components/EditableSpan/index.jsx

@@ -74,14 +74,13 @@ class EditableSpan extends Component{
       let temp = '';
       let search='';
       clearTimeout(that.state.timer);
-      // temp = newText.replace(oldText.replace(/(^\s*)|(\s*$)/g,''),'');
-      temp = newText.replace(labelVal.replace(/(^\s*)|(\s*$)/g,''),'');
+      temp = newText.replace(oldText.replace(/(^\s*)|(\s*$)/g,''),'');
       search = temp.replace(/(^\s*)|(\s*$)/g,'');
-      // console.log(111,labelVal,333,newText,444,search);
+      //console.log(111,oldText,333,newText,444,search);
       handleSearch&&handleSearch({text:search,boxMark,mainIds});
-      /*that.setState({
-        oldText:newText.replace(search,'')
-      })*/
+      that.setState({
+        oldText:newText
+      })
     },config.delayTime);
     this.setState({
       timer

+ 3 - 47
src/components/AddAssistCheck/index.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { SearchOption, Calendar ,ConfirmModal,Notify} from '@commonComp';
+import { SearchOption, Calendar } from '@commonComp';
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
@@ -12,41 +12,11 @@ class AddAssistCheck extends React.Component {
             date: false,
             dateTime:"",
             active:'',
-            visible:false,
-            id:null
         }
         this.handleShowDate = this.handleShowDate.bind(this)
         this.getCurrentDate = this.getCurrentDate.bind(this)
         this.getSearchList = this.getSearchList.bind(this)
         this.getAssistLabel = this.getAssistLabel.bind(this)
-        this.handleDelClick = this.handleDelClick.bind(this)
-        this.delConfirm = this.delConfirm.bind(this)
-        this.handleCancel = this.handleCancel.bind(this)
-    }
-
-    handleDelClick(id){
-        this.setState({
-            visible:true,
-            id:id
-        })
-    }
-
-    delConfirm(){
-        const {handleDelAssist} = this.props;
-        const {id} = this.state;
-        handleDelAssist&&handleDelAssist(id)
-        this.setState({
-            visible:false,
-            id:null
-        })
-        Notify.success("删除成功");
-    }
-
-    handleCancel(){
-        this.setState({
-            visible:false,
-            id:null
-        })
     }
 
     componentDidMount() {
@@ -66,7 +36,7 @@ class AddAssistCheck extends React.Component {
     handleSearchShow(e) {
         let tmpShow = this.state.show;
         this.setState({ show: !tmpShow })
-        // e.stopPropagation();
+        e.stopPropagation();
     }
     handleShowDate(idx){
         this.setState({
@@ -130,7 +100,7 @@ class AddAssistCheck extends React.Component {
                         <div>
                             <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                             <i onClick={()=>this.handleShowDate(idx)}></i>
-                            <a href="javascript:void(0);" onClick={(idx)=>{this.handleDelClick(idx)}}></a>
+                            <a href="javascript:void(0);" onClick={()=>{handleDelAssist(idx)}}></a>
                             <div style={{display:this.state.date && idx == this.state.active?"block":"none",position:"relative"}}>
                                 <Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
                             </div>
@@ -146,7 +116,6 @@ class AddAssistCheck extends React.Component {
     }
     render() {
         const { handleChangeValue, list } = this.props;
-        const { visible } = this.state;
         return (
             <div className={styles.wrapper}>
                 {this.getAssistLabel()}
@@ -156,19 +125,6 @@ class AddAssistCheck extends React.Component {
                         {this.getSearchList(list)}
                     </SearchOption>
                 </div>
-                <ConfirmModal 
-                    visible={visible}
-                    confirm={()=>{this.delConfirm()}}
-                    close={this.handleCancel}
-                    cancel={this.handleCancel}
-                    okText="删除"
-                    cancelText='取消'
-                    okBorderColor={'#3B9ED0'}
-                    okColor={'#fff'}
-                    oKBg={'#3B9ED0'}
-                >
-                    <p className={styles['center']}>是否删除该辅检项?</p>
-                </ConfirmModal>
             </div>
         )
     }

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

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

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

@@ -104,7 +104,7 @@ class Inspect extends React.Component {
     handleSearchShow(e) {
         let tmpShow = this.state.show;
         this.setState({ show: !tmpShow })
-        // e.stopPropagation();
+        e.stopPropagation();
     }
     handleFillShow(e,idx) {
         let tmpShow = this.state.showFill;
@@ -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;

+ 1 - 3
src/components/CopyRight/index.less

@@ -50,7 +50,7 @@
         left: 50%;
         margin-left: -410px;
         background: #fff;
-        top: 20%;
+        top: 65px;
        
         img{
           float: right;
@@ -74,8 +74,6 @@
         }
         .content {
           padding: 10px;
-          max-height: 400px;
-          overflow: auto;
         }
       }
     }

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

@@ -65,8 +65,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 {

+ 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();

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

@@ -76,7 +76,7 @@ export const setData = (state,action) =>{
   let mainLabelModuleArr = objToArr.filter((item)=>{
     return item.questionMapping.length>0;
   })
-  
+  console.log(444,mainLabelModuleArr);
   if (useEmpty) {
     res.data = res.emptyData;
   } else {

+ 2 - 3
src/store/actions/pushMessage.js

@@ -44,12 +44,11 @@ function getAdviceStr(advice) {
 			if(scheme[i].treatment[j].treatmentStr === '') {
 				AdviceStr = AdviceStr + scheme[i].treatment[j].treatmentStr
 			} else {
-				AdviceStr = AdviceStr + ', ' + scheme[i].treatment[j].treatmentStr
+				AdviceStr = AdviceStr.substring(1, AdviceStr.length) + ', ' + scheme[i].treatment[j].treatmentStr
 			}
 			
 		}
 	}
-	AdviceStr = AdviceStr.substring(1, AdviceStr.length)
 	if(assay || check)  { 
 		AdviceStr = assay + check +'; ' + AdviceStr;
 	}	
@@ -93,7 +92,7 @@ export const addScheme = (state, action) => {
    //将同类药添加到一起
 	for (let i = 0; i < scheme[RepeatIndex].treatment.length; i++) {
 		for (let j = 0; j < treatment.length; j++) {
-			if (scheme[RepeatIndex].treatment[i].id === treatment[j].id && scheme[RepeatIndex].treatment[i].drugsName === treatment[j].drugsName) {
+			if (scheme[RepeatIndex].treatment[i].id === treatment[j].id) {
 				for(let z = 0; z < treatment[j].medicitionsList.length; z++) {
 					if(treatment[j].medicitionsList[z].selected) {
 						if(scheme[RepeatIndex].treatment[i].treatmentStr !== '') {

+ 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'));

+ 1 - 1
src/utils/ajax.js

@@ -62,7 +62,7 @@ const json=(url,data)=>{
   return new Promise((resolve,reject)=>{
     $.ajax({
       method:'post',
-      url:url,
+      url:'http://192.168.2.236:5050'+url,
       data:JSON.stringify(data),
       contentType:"application/json; charset=UTF-8",
       success:function(res){

+ 1 - 1
src/utils/config.js

@@ -1,5 +1,5 @@
 // const host='http://192.168.3.100:5050';//王峰
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:8080'; //周铁刚
 // const newIcssVisitUrl = '223.93.170.82:13000';    //icss服务访问地址(跳转目的地),不能加http://

+ 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>