Jelajahi Sumber

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

# Conflicts:
#	src/utils/tools.js
zhouna 5 tahun lalu
induk
melakukan
8ddf93aebe

+ 2 - 28
src/common/components/EditableSpan/index.jsx

@@ -1,7 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import config from "@config/index";
-import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault,setFontColorSize} from '@utils/tools.js';
+import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault,setFontColorSize,moveEnd} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 import classNames from 'classnames';
 
@@ -37,7 +37,6 @@ class EditableSpan extends Component{
     this.handleBlur = this.handleBlur.bind(this);
     this.handleKeydown = this.handleKeydown.bind(this);
     this.handleKeyup = this.handleKeyup.bind(this);
-    this.moveEnd = this.moveEnd.bind(this);
     this.handleClick = this.handleClick.bind(this);
   }
   handleFocus(e){
@@ -49,7 +48,7 @@ class EditableSpan extends Component{
       setTimeout(function(){
         txt = that.$span.current.innerText||that.$span.current.innerHTML;
         that.$span.current.innerHTML = txt;
-        that.moveEnd($(that.$span.current)[0]);     //光标落到最后去
+        moveEnd($(that.$span.current)[0]);     //光标落到最后去
       });
     })
     
@@ -138,31 +137,6 @@ class EditableSpan extends Component{
     $(this.$span.current).off("paste");
   }
 
-  moveEnd(obj,flg) {
-    if(window.getSelection){//ie11 10 9 ff safari
-      setTimeout(() => {
-        obj.focus(); //解决ff不获取焦点无法定位问题
-        var range = window.getSelection();//创建range
-        range.selectAllChildren(obj);//range 选择obj下所有子内容
-        if(flg){
-          range.collapseToStart();//光标移至开头
-        }else{
-          range.collapseToEnd();//光标移至最后
-        }
-      }, 0);
-    }
-    else if (document.selection) {//ie10 9 8 7 6 5
-      var range = document.selection.createRange();//创建选择对象
-      range.moveToElementText(obj);//range定位到obj
-      if(flg){
-        range.collapse(true);//光标移至开头
-      }else{
-        range.collapse(false);//光标移至最后
-      }
-      range.select();
-    }
-  }
-
   handleKeydown(e){
     const ev = e||window.event;
     const {i} = this.props;

+ 1 - 1
src/common/components/InlineTag/index.jsx

@@ -119,7 +119,7 @@ class InlineTag extends Component {
     return <div className={this.getStyle()}
                 onClick={this.handleFixClick}>
                 <span className="prefixUnset">{prefix}</span>
-                <span className={`${style['free-in']}`}
+                <span className={`${style['free-in']} prefixUnset`}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}

+ 8 - 1
src/common/components/ItemBox/index.jsx

@@ -58,12 +58,19 @@ componentWillReceiveProps(nextP){
         that.context.scrollArea&&that.context.scrollArea.refresh();
       });
     }
+}
+setFontColorSize(){
+  const {data,saveText} = this.props;
+  if(data&&data.length==0&&saveText&&saveText[0]){
+    return setFontColorSize(2,7)
+  }
+  return setFontColorSize(2,5)
 }
   render(){
     const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"}>
       <div className={`${style["title"]} ${setFontColorSize(2,4)}` + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
-      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:'' } ${setFontColorSize(2,5)}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
+      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:'' } ${this.setFontColorSize()}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
         {fuzhen?children||fuzhen:children}
       </div>
     </div>

+ 2 - 1
src/common/components/Textarea/index.less

@@ -17,7 +17,7 @@
   .content{
     // height:120px;
     min-height: 38px;
-    line-height: 22px;
+    line-height: 24px;
     margin-left: 60px;
     position: relative;
     padding:5px;
@@ -25,6 +25,7 @@
     border-bottom:1px @part-border-color dashed;
     margin-right: 470px;
     word-break: break-all;
+    font-weight: bold;
     textarea{
       width: 100%;
     }

TEMPAT SAMPAH
src/common/images/prec.png


+ 4 - 0
src/common/less/base.less

@@ -116,6 +116,7 @@ html,body {
 }
 :global(.titleWidth){
     width: 78px !important;
+    margin-top: 8px !important;
     #mainSuit {
         margin-left: 78px;
     }
@@ -126,4 +127,7 @@ html,body {
 :global(.specialpaceSize){
     margin-left: 74px !important;
 }
+:global(.fontWeight){
+    font-weight: bold !important;
+}
 

+ 2 - 2
src/components/AddAssistCheck/AssistName/index.jsx

@@ -22,9 +22,9 @@ class AssistName extends Component {
 		}
 	}
 	render() {
-		const { winWidth, name, getInfomation } = this.props;
+		const { winWidth, name, getInfomation,normal } = this.props;
 		return (
-				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto' }} ref={this.$assistName}>
+				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold' }} ref={this.$assistName}>
 					<span className={styles.tagSpan} title={name}>
 						{name&&this.splitName(name)}:
             <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span>

+ 14 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -2,7 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
-import { setFontColorSize} from '@utils/tools';
+import { setFontColorSize,moveEnd} from '@utils/tools';
 
 class Textarea extends Component {
   constructor(props) {
@@ -66,6 +66,19 @@ class Textarea extends Component {
     }else{
       this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '报告描述或意见'):(this.$dom.current.nextSibling.innerHTML = '报告描述或意见')
     }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();

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

@@ -209,7 +209,7 @@ class AddAssistCheck extends React.Component {
                       <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                     </span>
                   </span> */}
-                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
+                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation} normal={true}></AssistName>
                   <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                     <ScrollArea speed={0.8}
                                 horizontal={false}
@@ -222,7 +222,7 @@ class AddAssistCheck extends React.Component {
                       <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                     </ScrollArea>
                   </div>
-                  <div className={`${styles.pointerFinger} ${setFontColorSize(2)}`}>
+                  <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
                     <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                   </div>
                 </li>)

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

@@ -192,7 +192,6 @@
 .tagSpan {
   position: relative;
   cursor: default;
-  font-weight: bold;
 }
 
 .tagSpan:hover {

+ 16 - 8
src/components/Advice/Textarea/index.jsx

@@ -1,7 +1,7 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
-import {setFontColorSize} from '@utils/tools';
+import {setFontColorSize,moveEnd} from '@utils/tools';
 import $ from 'jquery';
 
 class Textarea extends Component {
@@ -20,7 +20,6 @@ class Textarea extends Component {
     e.stopPropagation();
     const {handleChangeAssistValue,idx,handlePush} = this.props;
     const text =  e.target.textContent.trim() ? e.target.innerHTML : ''
-    const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text);
    
   }
@@ -32,13 +31,8 @@ class Textarea extends Component {
   }
   componentWillReceiveProps(next){
     const {isRead, typeConfig} = this.props;
-    // if(next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
-    //   next.value ? this.$dom.current.innerText = next.value :  this.$dom.current.innerText = next.value 
-    //   // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
-    // }
     if(next.isRead != isRead && next.value || next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
       next.value ? this.$dom.current.innerHTML = next.value :  this.$dom.current.innerHTML = '' 
-      // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
     }
     if(next.typeConfig != typeConfig) {
       this.$dom.current.innerText = '' 
@@ -52,8 +46,22 @@ class Textarea extends Component {
       // 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 = '')
     }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+      });
+      setTimeout(function(){
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      },200)
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
   }
- 
   render() {
     return (
       <div>

+ 8 - 6
src/components/InfoTitle/index.jsx

@@ -3,7 +3,7 @@ import PatInfoContainer from '@containers/PatInfoContainer.js';
 import style from "./index.less";
 import { connect } from 'react-redux';
 import historyCase from '@common/images/history.png';
-import health from '@common/images/health.png'
+import health from '@common/images/prec.png'
 import store from '@store';
 import { showHistory } from '@store/actions/historyTemplates';
 import { initItemList,setInitHistory } from '@store/async-actions/historyTemplates';
@@ -54,11 +54,13 @@ class InfoTitle extends Component {
         const {le} = this.state;
         return <div className={style['title-wrapper']} >
             <PatInfoContainer sizeFlag={winWidth <= 1065?true:false}/>
-            <div className={style["operations"]} onClick={this.showHistoryBox}>
-                <span><img src={historyCase} />&nbsp;历史病历</span>
-            </div>
-            <div className={style["health"]} >
-                <span><img src={health} />&nbsp;健康档案</span>
+            <div className={style['activeWrap']}>
+                <div className={style["operations"]} onClick={this.showHistoryBox}>
+                    <span><img src={historyCase} />&nbsp;历史病历</span>
+                </div>
+                <div className={style["health"]} >
+                    <span><img src={health} />&nbsp;预问诊信息</span>
+                </div>
             </div>
             <HistoryCases></HistoryCases>
             <Loading show={loading}/>

+ 15 - 7
src/components/InfoTitle/index.less

@@ -11,15 +11,23 @@
   top: 50px;
   right: 470px;
   min-width: 548px;
+  padding-right: 122px;
+  .activeWrap {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 122px;
+    line-height: 28px;
+  }
 }
 .operations, .health{
   float: left;
 //   border: 1px @border-color solid; 
-  height: 61px;
-  width: 12%;
+  // height: 61px;
+  width: 122px;
   border-left: 0px solid #fff;
   text-align: center;
-  line-height: 61px;
+  // line-height: 61px;
   color: @blue;
   span{
     cursor: pointer;
@@ -35,10 +43,10 @@
   }
 }
 .health{
-    opacity: 0.3;
-    color: rgba(0,0,0,0.6);
-    filter:alpha(opacity=30);
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
+    // opacity: 0.3;
+    // color: rgba(0,0,0,0.6);
+    // filter:alpha(opacity=30);
+    // -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
 }
 .font{
   font-size: 13px;

+ 1 - 0
src/components/MainSuit/index.jsx

@@ -293,6 +293,7 @@ class MainSuit extends Component{
       handleClick={this.handleClick} 
       handleBlur={this.handleBlur}
       data={datas}
+      saveText={saveText}
       boxId="mainSuit">
         {''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>

+ 4 - 2
src/components/MultSpread/index.jsx

@@ -54,7 +54,7 @@ class MultSpread extends Component{
     //const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd,setFontColorSize(isExtBlue?2:!!text?'':1));
+    return classNames(isSelected,hasAdd,setFontColorSize(!!text?'2,6':isExtBlue?2:1));
   }
   saveDoms(it){
     const doms = this.state.numDoms;
@@ -138,7 +138,7 @@ class MultSpread extends Component{
   }
   getLabels(){
     const {data,ikey,showArr,copyId,boxMark,isExtBlue,saveText} = this.props;
-    const {wrBmi,bmi,isSelectAll} = this.state;
+    const {wrBmi,bmi} = this.state;
     const labelInx = tools.getLabelIndex(ikey);
     const text = !!(saveText&&saveText[+labelInx]);
     let show = false;
@@ -157,6 +157,7 @@ class MultSpread extends Component{
                             placeholder={it.name}
                             show={show}
                             value = {it.value}
+                            isSelectAll={text}
                             ikey={inx}
                             id={it.id}
                             patId = {copyId}
@@ -255,6 +256,7 @@ class MultSpread extends Component{
     const text = saveText&&saveText[+labelInx];
     const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
+
     return classNames(orgBorder,ext);
   }
   render(){

+ 8 - 6
src/components/NumberDrop/index.jsx

@@ -204,12 +204,14 @@ class NumberDrop extends Component{
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:val?2:isSelectAll?2:1));
+    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(val||isSelectAll?'2,6':isExtBlue?2:1));
   }
   getSpanClass(nospecial){       //将被替换的文字选中状态显示
-    const {isSelectAll} = this.props;
+    const {isSelectAll,isExtBlue,show} = this.props;
+    const val = this.state.value;
     const cls = this.props.show?style['blued']:style['nol'];
-    return cls+' '+setFontColorSize(nospecial?'':2);
+    // return cls+' '+setFontColorSize(nospecial?'':2);
+    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)))
   }
   stopBubble(e){
     e.stopPropagation();
@@ -251,7 +253,7 @@ class NumberDrop extends Component{
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
                 onClick={allClick?this.handleNumClick:null}>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)}`}>{prefix}</span>
+      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             contentEditable={true}
@@ -260,9 +262,9 @@ class NumberDrop extends Component{
             onkeyup={this.handleKeyDowm}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
-            className={this.getSpanClass(nospecial)}
+            className={`${this.getSpanClass(nospecial)}`}
             >&nbsp;{val||placeholder}</span>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)}`}>{suffix}</span>
+      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  noString={formulaCode?true:false}
                  onClose={handleHide}

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

@@ -2,7 +2,7 @@
 .container{
   .tag;
   &.ext{
-    color: @extBlue!important;
+    color: @extBlue;
   }
   line-height: 22px;
   .blued{
@@ -29,6 +29,10 @@
   .blued{
     background: @blue;
     color: #fff;
+    font-size: unset;
+  }
+  .nol {
+    color: unset;
   }
   .nol,.blued{
     min-width:10px;

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

@@ -1,6 +1,6 @@
 @import "~@less/variables.less";
 .table{
-  width: 76%;
+  width: 100%;
 //   border:1px @border-color solid;
   float: left;
   td{
@@ -32,5 +32,6 @@
     font-size: 13px;
     white-space: nowrap;
     text-overflow: ellipsis;
+    max-width: 180px;
   }
 }

+ 1 - 1
src/components/PushItems/index.less

@@ -49,7 +49,7 @@
       h1{
         font-size: 14px;
         color: #000;
-        padding: 4px 15px;
+        padding: 8px 15px;
         background: #FAEBEC;
         font-weight: bold;
         img {

+ 1 - 1
src/components/RadioDrop/index.jsx

@@ -34,7 +34,7 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,isSelectAll} = this.props;
     const ext = isExtBlue?style['ext']:'';
     const orgBorder = isImports?style['orange-border']:'';      //橙色框高亮
     const editBorder = this.state.editable?style['blue-border']:'';

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

@@ -128,7 +128,7 @@ class ScaleSearch extends Component {
             </p>
           </div>
           {searchResult&&searchResult.length>0?<div className={style['result']}>
-            <p className={style['title']}>查询内容</p>
+            <p className={style['title']}>搜索内容</p>
             <ul ref={this.$ul}>
               {this.getSearchList()}
             </ul>

+ 8 - 6
src/store/async-actions/patInfo.js

@@ -15,6 +15,7 @@ const api = {
     getPatBaseInfo: '/patientInfo/getPatientInfo',
     getHospitalInfo:'/hospitalInfo/getHospitalInfo',
     getPreMsg:'/api/prec/inquiryInfo/getInquiryDetail',
+    getPreMsgLis:'/api/prec/inquiryInfo/hisInquirys',
     getDoctorConfig:'/doctorPageMode/getDoctorPageModes',       //获取医生设置
 };
 
@@ -23,7 +24,7 @@ export const getPreMsg = (dispatch, getState) => {
     // let baseList = getState();
     // let state = baseList.patInfo.message;
     const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
-    json(api.getPreMsg, {
+    json(api.getPreMsgLis, {
         "hospitalCode": getUrlArgObject('hospitalId'),
         "inquiryCode":inCode,
         "patientCode": getUrlArgObject("patientNo"),
@@ -32,13 +33,14 @@ export const getPreMsg = (dispatch, getState) => {
         const data = res.data;
         if (data.code == 0) {
             let result = data.data;
+            console.log(result)
             let preIcss = {
               chief:result.chiefComplaint?new Array(result.chiefComplaint):[],
               current:result.xbs?new Array(result.xbs):[],
               other:result.qts?new Array(result.qts):[],
               checkBody:result.supplement?result.supplement:''
             }
-            dispatch({type:SETPRE,show:true});
+            // dispatch({type:SETPRE,show:true});
             dispatch({type:SETPREDATA,preData:preIcss});
         } else {
             // console.log(res)
@@ -92,15 +94,15 @@ export const initHistoryDetails = (dispatch) => {
             "inquiryCode": state.recordId,
         }).then((res) => {
             const data = res.data;
+            let pre = baseList.homePage.sysConfig.connect_prec;
+            (pre==1)&&getPreMsg(dispatch)
             if (data.code == 0) {
                 const detail = data.data;
                 if(detail.dataJson){
                   pushAllDataList(detail.sign,'push',detail,'history');
                 }else{
-                  let pre = baseList.homePage.sysConfig.connect_prec;
-                  (pre==1)&&getPreMsg(dispatch)
-                  // (pre==1)&&dispatch({type:SETPRE,show:true});
-
+                  // let pre = baseList.homePage.sysConfig.connect_prec;
+                  // (pre==1)&&getPreMsg(dispatch)
                 }
                 dispatch({
                   type:ISREAD

+ 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'; //周铁刚

+ 35 - 0
src/utils/tools.js

@@ -1331,6 +1331,31 @@ function setPosition (e,dom,setHighter){
     // $(e.target)[0].scrollIntoView(true);
   },10);
 }
+
+function moveEnd(obj,flg) {
+  if(window.getSelection){//ie11 10 9 ff safari
+    setTimeout(() => {
+      obj.focus(); //解决ff不获取焦点无法定位问题
+      var range = window.getSelection();//创建range
+      range.selectAllChildren(obj);//range 选择obj下所有子内容
+      if(flg){
+        range.collapseToStart();//光标移至开头
+      }else{
+        range.collapseToEnd();//光标移至最后
+      }
+    }, 0);
+  }
+  else if (document.selection) {//ie10 9 8 7 6 5
+    var range = document.selection.createRange();//创建选择对象
+    range.moveToElementText(obj);//range定位到obj
+    if(flg){
+      range.collapse(true);//光标移至开头
+    }else{
+      range.collapse(false);//光标移至最后
+    }
+    range.select();
+  }
+}
 /**
  * 获取样式类名
  * largeFontSize 18px      middleFontSize 16px(暂无)       simpleFontSize 14px
@@ -1358,6 +1383,8 @@ const setFontColorSize = (flg,pacs) => {
           classStr = `largeFontSize specialSize`
         }else if(pacs == 6){
           classStr = `largeFontSize selectColor`
+        }else if(pacs == 7){
+          classStr = `largeFontSize fontWeight`
         }else{
           classStr = `largeFontSize`
         }
@@ -1370,6 +1397,8 @@ const setFontColorSize = (flg,pacs) => {
       if(flg == 2){
         if(pacs == 6){
           classStr = `simpleFontSize selectColor`
+        }else if(pacs == 7){
+          classStr = `simpleFontSize fontWeight`
         }else{
           classStr = `simpleFontSize`
         }
@@ -1390,6 +1419,8 @@ const setFontColorSize = (flg,pacs) => {
           classStr = `largeFontSize titleWidth`
         }else if(pacs == 5){
           classStr = `largeFontSize specialSize`
+        }else if(pacs == 7){
+          classStr = `largeFontSize fontWeight`
         }else{
           classStr = `largeFontSize`
         }
@@ -1401,6 +1432,8 @@ const setFontColorSize = (flg,pacs) => {
     }else{//都是标准的
       if(flg == 2){
         classStr = `simpleFontSize`
+      }else if(pacs == 7){
+        classStr = `simpleFontSize fontWeight`
       }else if(flg == 1){
         classStr = `simpleLightColor simpleFontSize`
       }else{
@@ -1482,6 +1515,8 @@ module.exports = {
     isAllPartClear,
     getDomUpDown,
     setFontColorSize,
+    moveEnd,
+    setFontColorSize,
     getValuedLabels,
     removeRepeat
 };