luolei 5 anni fa
parent
commit
82e26a3800

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

@@ -303,7 +303,8 @@ class EditableSpan extends Component{
             }
           }else{
             let tmpVal = data.substr(0,data.length-1)
-            handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            // handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            removeId && removeId({boxMark,i:index-1,text:""});
             preObj.html(tmpVal)
             if(preObj[0].nodeName !=="DIV"){
               moveEnd(preObj[0]);
@@ -353,7 +354,7 @@ class EditableSpan extends Component{
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
     //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
     const ext = preIsExt?style['ext']:style['unselect'];
-    const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
+    const unselect = value.match(config.punctuationReg)||(preSelected&&preSelected.match(config.punctuationReg))?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
     const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
@@ -361,10 +362,8 @@ class EditableSpan extends Component{
     if(br&&$span&&!$span.innerText){
       this.$span.current.innerHTML=' ';
     }
-    
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,unselect?8:6),selectedArea);
+    return classNames(style['editable-span'],isFull,hasBr,setFontColorSize(2,unselect?6:8),unselect,selectedArea);
   }
-
   render() {
     return <span className={this.getClass()}
                  contentEditable='true'

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

@@ -692,7 +692,7 @@ export function removeId(state,action){
       data[index].value = text;
     }
   }else{
-    if(!data[index].value && data[index-1].tagType==8){
+    if(!data[index].value &&data[index-1]&& data[index-1].tagType==8){
       data.splice(index,1);
       res.saveText.splice(index,1);
     }else{

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
-// const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 0 - 1
src/utils/tools.js

@@ -1703,7 +1703,6 @@ module.exports = {
     getDomUpDown,
     setFontColorSize,
     moveEnd,
-    setFontColorSize,
     getLifeLabels,
     getValuedLabels,
     removeRepeat,