Browse Source

Merge branch 'groupTypeStyle' of http://223.93.170.82:10080/zhouna/newICSS into groupTypeStyle

zhangxc 5 years atrás
parent
commit
6ed4f4a982
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/components/PushContainer/index.jsx

+ 12 - 0
src/components/PushContainer/index.jsx

@@ -15,6 +15,7 @@ import MedicalInfoContainer from '@containers/MedicalInfoContainer';
 import FolderName from '@components/FolderName';
 import slideDown from '@common/images/slideDown.png';
 import CaseQuailty from "../CaseQuailty";
+import pinyin from '@utils/Convert_Pinyin.js';
 import $ from "jquery";
 
 class PushContainer extends Component {
@@ -196,6 +197,15 @@ class PushContainer extends Component {
       })
     })
   }
+
+  spellFst(){
+    let tmpFst = pinyin.getCamelChars(this.state.title);
+    // console.log(tmpFst.substr(0,1).toUpperCase())
+    this.setState({fstName:tmpFst.toUpperCase()})
+      // this.$inp.current.vaule = tmpFst
+    document.getElementById ('FstInp').value=tmpFst.toUpperCase()
+    
+  }
   changeTitle() {//模板名称修改
     return <div className={style['box']}>
         <div className={style['iptWrap']}>
@@ -221,7 +231,9 @@ class PushContainer extends Component {
               placeholder=""
               type="text"
               maxLength='20'
+              id="FstInp"
               // value={this.state.fstName}
+              onFocus={() =>this.spellFst()}
               onInput={(e) => {
                 this.handleInputFst(e)
               }}