浏览代码

Merge branch 'testNew' into masterCdss

跳转地址可配置
luolei 4 年之前
父节点
当前提交
869ab43168
共有 3 个文件被更改,包括 54 次插入19 次删除
  1. 2 2
      src/components/DiagnosticList/index.jsx
  2. 13 15
      src/components/PatInfo/index.jsx
  3. 39 2
      src/utils/config.js

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

@@ -291,7 +291,7 @@ class DiagnosticList extends Component {
     }
     handleInput(e,index){
       const {editDiagName,getBilling} = this.props;
-      let name = e.target.value
+      let name = (e.target.value).trim()
       editDiagName(index,name)
       //右侧推送--延时推送
       const stimer = this.state.timer;
@@ -318,7 +318,7 @@ class DiagnosticList extends Component {
                         /*const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
                         isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;*/
-                        return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
+                        return (<div draggable={false} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>

+ 13 - 15
src/components/PatInfo/index.jsx

@@ -101,21 +101,19 @@ class PatInfo extends Component {
     let patientItem = newInfo.find(item =>{
       return item.id === e.target.id
     })      
-    if (patientItem.id === 'patientAge'){
-      let temp = Math.round(e.target.value.replace(/[^\d\.]+/, ''))
-      if (isNaN(temp)){
-        patientItem.value = 50
-        Notify.info('请输入正确的年龄')
-        return 
-      }else {
-        patientItem.value = temp
-      }
-      
-      // patientItem.value = e.target.value.replace(/[^\d\.]+/, '')   //小数四舍五入_楼超强2020914
-    } else {
-      patientItem.value = e.target.value;
-    }
-    // console.log(typeof patientItem.value, patientItem.value,'patientItem.value');
+    // if (patientItem.id === 'patientAge'){
+    //   let temp = Math.round(e.target.value.replace(/[^\d\.]+/, ''))
+    //   if (isNaN(temp)){
+    //     patientItem.value = 50
+    //     Notify.info('请输入正确的年龄')
+    //     return 
+    //   }else {
+    //     patientItem.value = temp
+    //   }
+    // } else {
+    //   patientItem.value = e.target.value;
+    // }
+    patientItem.value = e.target.value;  // 20201014 取消年龄格式限制 lcq
     if (patientItem.id === 'patientAge' && +patientItem.value > 200) {
       Notify.info('年龄不能超过200')
       // return false

+ 39 - 2
src/utils/config.js

@@ -1,5 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
+
+const { func } = require("prop-types");
+
 // const host='http://192.168.2.121:5050';//后端接口访问地址
 
 
@@ -11,11 +14,45 @@ const host='http://192.168.2.241:6060';//后端接口访问地址
 // const host='http://192.168.3.117:5050'; //周铁刚
 // const newIcssVisitUrl = '223.93.170.82:13000';    //icss服务访问地址(跳转目的地),不能加http://
 const imageUrlPrefix = 'http://192.168.2.241:82';
+function geturl(){
+    if(window.location.href.indexOf('localhost')>-1){
+        return {
+            gourl:'http://localhost:8080/cdss.html',
+            imgurl:host.replace('6060','22')
+        }
+    }else if(window.location.href.indexOf('192.168.2.236')>-1){
+        return {
+            gourl:'http://192.168.2.236:5654/cdss.html',
+            imgurl:'http://192.168.2.236:82'
+        }
+    }else if(window.location.href.indexOf('192.168.2.241')>-1){
+        return {
+            gourl:'http://192.168.2.241:5654/cdss.html',
+            imgurl:'http://192.168.2.241:82'
+        }
+    }else if(window.location.href.indexOf('192.168.2.121')>-1){
+        return {
+            gourl:'http://192.168.2.121:5654/cdss.html',
+            imgurl:'http://192.168.2.121:82'
+        }
+    }else if(window.location.href.indexOf('192.168.2.122')>-1){
+        return {
+            gourl:'http://192.168.2.122:5654/cdss.html',
+            imgurl:'http://192.168.2.122:82'
+        }
+    }else{
+        return {
+            gourl:'http://192.168.2.236:5654/cdss.html',
+            imgurl:'http://192.168.2.236:82'
+        }
+    }
+}
+let urlSelect = geturl()
 module.exports={
     host,
     prefix:'',            //带权限验证的api
     pushPage:'http://192.168.2.241:5488/icssIndex.html',        //右侧推送页面的地址
-    imageUrlPrefix,
-    pushPage2:'http://192.168.2.121:5654/cdss.html',        //右侧推送页面的地址
+    imageUrlPrefix:urlSelect.imgurl,
+    pushPage2:urlSelect.gourl,        //右侧推送页面的地址
     // pushPage2:'http://localhost:8080/cdss.html',        //右侧推送页面的地址
 };