浏览代码

Merge remote-tracking branch 'origin/dev5.3.2' into dev5.3.2

zhouna 5 年之前
父节点
当前提交
b020567d71

+ 1 - 1
src/common/components/ComplexModal/index.less

@@ -3,7 +3,7 @@
 .container {
   // position: relative;
   // padding-top: 40px;  //改为绝对定位,拖拽元素不在监听document,改为这个
- .maskZIndex;
+ .maskContentZIndex1;
   position: absolute;
   width: 100%;
   height: 100%;

+ 4 - 4
src/common/components/Textarea/index.jsx

@@ -69,7 +69,7 @@ class Textarea extends Component {
         inpText:text.substr(0,config.limited),
         overFlag:true
       });
-      handleInput&&handleInput({text:text.substr(0,config.limited)});
+      handleInput&&handleInput({text:text.substr(0,config.limited).replace('<br>','')});
       return;
     }
     /*if(boxMark=='3'&&!hasMain){
@@ -81,8 +81,8 @@ class Textarea extends Component {
       overFlag:false
     })
 
-    //存值到store
-    handleInput&&handleInput({text});
+    //存值到store  FF26 会有一个<br>
+    handleInput&&handleInput({text:text.replace('<br>','')});
     //右侧推送--延时推送
     clearTimeout(stimer);
     let timer = setTimeout(function(){
@@ -103,7 +103,7 @@ class Textarea extends Component {
   }
   handleBlur(e){
     const {saveChronic} = this.props;
-    const text = e.target.innerText;
+    const text = e.target.innerText || e.target.innerHTML;
     getFeature(text).then((res)=>{
       if(res.data.code==0){
         const result = res.data.data;

+ 1 - 1
src/components/Advice/Textarea/index.jsx

@@ -18,7 +18,7 @@ class Textarea extends Component {
   handleInput(e){
     e.stopPropagation();
     const {handleChangeAssistValue,idx,handlePush} = this.props;
-    const text =  e.target.innerHTML;
+    const text =  e.target.textContent.trim() ? e.target.innerHTML : ''
     const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text);
    

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

@@ -16,7 +16,7 @@ class HistoryCaseContainer extends React.Component {
         const { visible,showHistoryCases,showHistoryBox,items,handleCaseClick,handleQuoteClick,handleSortClick,activeHistory,preInfo } = this.props;
         const domNode = document.getElementById('root');
         return ReactDom.createPortal(
-              showHistoryCases?<div className={styles.historyCaseWrap}>
+              showHistoryCases?<React.Fragment>
                 <div className={styles.maskHistory} onClick={this.showHistoryBox}></div>
                 <HistoryList 
                     items={items}
@@ -28,7 +28,7 @@ class HistoryCaseContainer extends React.Component {
                     handleSortClick={handleSortClick}
                     preInfo={preInfo}
                 ></HistoryList>
-            </div>:null
+            </React.Fragment>:null
         ,domNode)
     }
 }

+ 11 - 6
src/components/MainSuit/index.jsx

@@ -115,6 +115,9 @@ class MainSuit extends Component{
       return
     }
     if(datas.length==0){//没有使用模板时点击搜索结构要展开模板
+      // FF26 清空输入的值 bug2283
+      const mainBox = document.getElementById('mainSuit');
+      mainBox.innerHTML = "";
       insertSearch &&insertSearch({item,span});
       this.setState({
         search: false,
@@ -182,7 +185,8 @@ class MainSuit extends Component{
       const timer = setTimeout(function(){
         pushMessage && pushMessage(data);
         //调搜索接口 使用模板走EditableSpan里的搜索方法
-        getSearchData && getSearchData({inpStr:data,boxMark:1,itemType:0});
+        // FF26 会多一个<br>
+        getSearchData && getSearchData({inpStr:data.replace('<br>',''),boxMark:1,itemType:0});
       },config.delayTime);
       this.setState({
         symptom:false,
@@ -231,10 +235,10 @@ class MainSuit extends Component{
     const {freeText,saveText,datas,clearSearch,getSymptomFeature,currentData,saveChronic} = this.props;
     const that = this;
     let data = this.state.inpText;
-    const inner = e.target.innerText;
+    const inner = e.target.innerText || e.target.innerHTML ;
     //分词-现病史没有模板的时候才去获取
     if(inner.trim() && currentData&&currentData.length==0){
-      getFeature(inner).then((res)=>{
+      getFeature(inner.replace('<br>','')).then((res)=>{
         if(res.data.code==0){
           const result = res.data.data;
           // 慢病
@@ -250,12 +254,13 @@ class MainSuit extends Component{
       })
     }
     if(!isIE()){
-      inner?(e.target.innerText=""):(e.target.innerHTML="")
-      freeText && freeText(data.trim());
+      // inner?(e.target.innerText=""):(e.target.innerHTML="")
+      e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="");
+      freeText && freeText(data.trim().replace('<br>',''));
     }else{
       if(datas.length==0){
         const ev = e || window.event;
-        const data = ev.target.innerText;
+        const data = ev.target.innerText || ev.target.innerHTML;
         // freeText && freeText(data.trim());
         freeText && freeText(data);
       }

+ 6 - 4
src/components/RadioInpDrop/index.jsx

@@ -219,17 +219,19 @@ class InputComp extends Component{
   }
   handleBlur(e){
     e.stopPropagation();
-    const text = e.target.innerText||e.target.textContent;//单选输入预览拿不到值innerHTML会有空格
+    // FF26 只有innerHTML
+    const text = e.target.innerText || e.target.innerHTML;
     const {handleInp,index,value} = this.props;
-    e.target.innerText = '';
-    handleInp(index,text);
+    e.target.innerText?(e.target.innerText = ''):(e.target.innerHTML = '');
+    // FF26 会把&nbsp; 也获取到
+    handleInp(index,text.replace('&nbsp;',''));
   }
   componentWillReceiveProps(next){
     if(next.over&&!this.props.over){
       const inp = this.$inp.current;
       const value = this.props.value;
       setTimeout(function(){
-        inp.innerText = value;
+        inp.innerText?(inp.innerText = value):(inp.innerHTML = value);
       })
     }
   }

+ 1 - 1
src/components/Treat/FollowUp/Textarea/index.jsx

@@ -42,7 +42,7 @@ class Textarea extends Component {
   componentDidMount(){
     const {value} = this.props;
     if(value && value.trim()){
-      this.$dom.current.innerText = value
+      this.$dom.current.innerHTML = value
       // this.$dom.current.focus()
       // this.$dom.current.innerText ? (this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
     //   this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')

+ 2 - 1
src/components/Treat/FollowUp/Textarea/index.less

@@ -5,5 +5,6 @@
     min-width: 30px;
     text-align: center;
     margin-right: 5px;
-    line-height: 20px
+    line-height: 20px;
+    min-height: 20px;
 }

+ 2 - 1
src/components/WrapModalBody/index.less

@@ -24,7 +24,7 @@
     line-height: 46px;
     background-color: @ipt-bg-color;
     padding: 0 20px;
-    overflow: hidden;
+    // overflow: hidden;
   }
   .items {
     .search {
@@ -47,6 +47,7 @@
       float: left;
       margin-right: 5px;
       position: relative;
+      height:46px;
       span {
         font-size: 12px;
       }

+ 5 - 5
src/components/WrapModalBodyPac/Item/index.jsx

@@ -52,7 +52,7 @@ class Item extends React.Component {
     const {handleSearch,message} = this.props
     return <div className={style['items']}>
       <ul>
-        <li className={`${style.code} ${style.pubLi}`}>
+        <li className={`${style.code} ${style.pubLi} ${style.partLish}`}>
           <span>门诊号 : </span>
           <input type="text" value={this.state.code || message.recordId} readOnly
             onInput={(e) => { 
@@ -62,7 +62,7 @@ class Item extends React.Component {
                 this.handleInput(e,1)
             }} />
         </li>
-        <li className={`${style.name} ${style.pubLi}`}>
+        <li className={`${style.name} ${style.pubLi} ${style.partLish}`}>
           <span>姓名 : </span>
           <input type="text" value={this.state.name || message.patientName} readOnly
             onInput={(e) => { 
@@ -72,7 +72,7 @@ class Item extends React.Component {
                 this.handleInput(e,2)
             }} />
         </li>
-        <li className={`${style.sex} ${style.pubLi}`}>
+        <li className={`${style.sex} ${style.pubLi} ${style.partLish}`}>
           <span>性别 : </span>
           <input type="text" value={this.state.sex || message.patientSex} readOnly
             onInput={(e) => { 
@@ -82,7 +82,7 @@ class Item extends React.Component {
                 this.handleInput(e,3)
             }} />
         </li>
-        <li className={`${style.age} ${style.pubLi}`}>
+        <li className={`${style.age} ${style.pubLi} ${style.partLish}`}>
           <span>年龄 : </span>
           <input type="text" value={this.state.age||message.patientAge} readOnly
             onInput={(e) => { 
@@ -92,7 +92,7 @@ class Item extends React.Component {
                 this.handleInput(e,4)
             }} />
         </li>
-        <li className={`${style.time} ${style.pubLi}`}>
+        <li className={`${style.time} ${style.pubLi} ${style.partLish}`}>
           <span>送检时间 : </span>
           <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
         </li>

+ 5 - 1
src/components/WrapModalBodyPac/index.less

@@ -24,7 +24,7 @@
     line-height: 46px;
     background-color: @ipt-bg-color;
     padding: 0 20px;
-    overflow: hidden;
+    // overflow: hidden;
   }
   .items {
     .search {
@@ -59,6 +59,10 @@
         box-sizing: border-box;
       }
     }
+    
+    .partLish {
+      height: 46px;
+    }
     .code{
       input {
         width: 74px;

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

@@ -836,7 +836,7 @@ export function insertLabelData(state,action){
       }
     }
   }
-  res.searchData = [];    //选中清空搜索内容(即关闭搜索弹窗)
+  res.searchDatas = [];    //选中清空搜索内容(即关闭搜索弹窗)
   res.update = Math.random();//console.log('现病史',res);
   return res;
 }

+ 2 - 2
src/store/async-actions/tabTemplate.js

@@ -134,8 +134,8 @@ export const changeTitleAsync = (obj) => { //改标题
   let baseList = store.getState();
   let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
-  if (obj.title == '') {
-    Notify.success('请输入模板名称');
+  if (obj.title.trim() == '') {
+    Notify.info('请输入模板名称');
     return;
   }
   return (dispatch) => {

+ 1 - 1
src/utils/config.js

@@ -7,7 +7,7 @@ const host='http://192.168.2.241:5050';//后端接口访问地址
 //const host='http://192.168.2.164:8080';
 // 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'
+const imageUrlPrefix = 'http://192.168.2.121:82';
 module.exports={
     host,
     prefix:'/api/icss',            //带权限验证的api