Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev5.3.3' into dev/new1

zhouna před 5 roky
rodič
revize
61eba95acf

+ 15 - 12
src/common/components/EditableSpan/index.jsx

@@ -41,6 +41,15 @@ class EditableSpan extends Component{
   }
   handleFocus(e){
     e.stopPropagation();
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$span.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$span.current.innerText;
+        that.$span.current.innerHTML = txt;
+      });
+    })
     const {mainSaveText,full,setFocusIndex,i,boxMark,value}= this.props;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==3||+boxMark==4){         //主诉为空,且第一次聚焦其他史查体时提示且不可输入
@@ -100,13 +109,10 @@ class EditableSpan extends Component{
       clearTimeout(that.state.timer);
       temp = newText.replace(searchPre,'');
       isEnd = !(newText.indexOf(searchPre)>0);
-      // search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
       search = temp.replace(config.regPreAndAft,'');
-      // if(!search&&searchPre){
       if(!temp&&searchPre&&newText){
         search = searchPre;
       }
-      //console.log(labelVal,'旧:',searchPre,'新:',newText,'搜索:',search);
       if(config.punctuationReg.test(search)){    //只有标点符号时不搜索
         handleSearch&&handleSearch({text:search,isEnd,boxMark,mainIds});
       }else{//只有标点符号时要清空搜索结果
@@ -123,16 +129,9 @@ class EditableSpan extends Component{
   }
 
   handleBlur(e){//为了阻止冒泡事件
-    const {boxMark,handleClear,handleChange,i} = this.props;
     e.stopPropagation();
-    // 延时清空搜索结果,不延时会影响选中
-    /*clearTimeout(this.state.clearTimer);
-    const clearTimer = setTimeout(function(){
-      handleClear && handleClear({boxMark})
-    },config.delayTime);
-    this.setState({
-      clearTimer
-    });*/
+    //解除绑定事件
+    $(this.$span.current).off("paste");
   }
 
   moveEnd(obj) {
@@ -306,6 +305,10 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const $span = this.$span.current;
+    if(br&&$span&&!$span.innerText){
+      this.$span.current.innerHTML=' ';
+    }
     return classNames(style['editable-span'],isFull,unselect,hasBr);
   }
 

+ 4 - 4
src/components/MedicalInfo/index.jsx

@@ -25,7 +25,7 @@ class MedicalInfo extends Component {
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
@@ -83,15 +83,15 @@ class MedicalInfo extends Component {
       clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

+ 5 - 5
src/components/ScaleSearch/index.jsx

@@ -38,10 +38,10 @@ class ScaleSearch extends Component {
   }
   getSearchList() {
     const { searchResult } = this.props;
-    const that = this;console.log(getWindowInnerHeight()-270);
+    const that = this;
     if(searchResult&&searchResult.length>0){
       setTimeout(function(){
-        that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+        that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
       },100);
     }
     return searchResult && searchResult.map((item) => {
@@ -97,15 +97,15 @@ class ScaleSearch extends Component {
     clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

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

@@ -25,11 +25,11 @@ class TemplateItems extends React.Component {
         this.clear = this.clear.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-216;
+        const height = getWindowInnerHeight()-195;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
             if(this.$cont.current){
-                const height = getWindowInnerHeight()-216;
+                const height = getWindowInnerHeight()-195;
                 this.$cont.current.style.height = height+"px";
             }
         });

+ 2 - 2
src/store/actions/checkBody.js

@@ -382,8 +382,8 @@ export function setImportCheckbodyLabel(state,action) {
 export function recoveTag(state,action) {
   let res = Object.assign({},state);
   let arr = [...res.data];
-  //const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config._textLabel));
-  arr.splice(action.index,0,action.data);
+  const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config.textLabel));
+  arr.splice(action.index,0,action.data,text);
   res.data = checkFullfillText(arr).newArr;
   res.saveText = checkFullfillText(arr).saveText;
   shiftLocalDelTag();

+ 7 - 3
src/store/actions/copyRight.js

@@ -24,9 +24,13 @@ export const closeDisclatmerModal=(state,action)=>{
   
 export const getMessage=(state,action)=>{
   const res=Object.assign({},state);
-  res.number = action.data.data.data.name;
-  res.date = action.data.data.data.refreshTime;
-  res.content = action.data.data.data.detail;
+  const data = action.data.data;
+  if(!data) {
+    return res;
+  }
+  res.number = data.data.name;
+  res.date = data.data.refreshTime;
+  res.content = data.data.detail;
   return res;
 };
 

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/store/async-actions/copyRight.js


+ 1 - 1
src/utils/config.js

@@ -1,6 +1,6 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.121:5050';//后端接口访问地址
 // const host='http://192.168.2.121:5050';//后端接口访问地址
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇