luolei 5 éve
szülő
commit
7527bb9a75

+ 1 - 0
src/common/components/ConfirmModal/index.less

@@ -17,6 +17,7 @@
     line-height: 46px;
     padding: 0 10px;
     background: #e5e5e5;
+    border-radius: 5px 5px 0 0;
 }
 
 .icon{

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

@@ -8,11 +8,11 @@ class CaseQuailty extends Component {
     this.$cont = React.createRef();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
     });

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

@@ -115,12 +115,12 @@ class MedicalInfo extends Component {
     });
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
     this.props.getFilters();
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){

+ 3 - 2
src/components/Operation/Search/index.jsx

@@ -39,7 +39,7 @@ class SearchList extends React.Component {
         handleChangeValue('');
     }
     handleInput(e){
-      const { handleChangeValue } = this.props;
+      const { handleChangeValue,handleChangeIpt } = this.props;
         clearTimeout(this.state.timer);
         let timer = setTimeout(()=>{
             clearTimeout(this.state.timer);
@@ -54,6 +54,7 @@ class SearchList extends React.Component {
                 show:true
             })
             handleChangeValue(e.target.value);
+            handleChangeIpt(e.target.value);
         },config.delayTime);
         this.setState({
             timer
@@ -70,7 +71,7 @@ class SearchList extends React.Component {
       this.setState({border:false,val:''})
     }
     componentWillReceiveProps(next){
-        console.log(next,this.props)
+        console.log(next.value)
         if(next.value&&(next.value != this.props.value)){
             this.textInput.current.value = next.value;
         }

+ 15 - 12
src/components/Operation/index.jsx

@@ -42,6 +42,7 @@ class Operation extends Component {
     this.saveHis = this.saveHis.bind(this);
     this.keypress = this.keypress.bind(this);
     this.setDeptId = this.setDeptId.bind(this);
+    this.handleChangeIpt = this.handleChangeIpt.bind(this);
   }
 
   showPrint() {
@@ -153,8 +154,8 @@ class Operation extends Component {
     let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
     let whichSign = baseList.typeConfig.mode;
-    let tmpLis = baseList.tabTemplate.items;
-    let flg = isAllClear(jsonStr)
+    let tmpLis = [];
+    let flg = isAllClear(jsonStr);
     if(!flg){
       Notify.info('模板数据不能为空')
       return false
@@ -162,6 +163,11 @@ class Operation extends Component {
     // console.log(jsonStr.chief,'文本')
     // console.log(jsonData,'结构')       //测试需要用到,不要删了
     // console.log(tmpLis,'接口返回的')
+    if(this.props.admin){
+      tmpLis = baseList.tabTemplate.adminItems;
+    }else{
+      tmpLis = baseList.tabTemplate.items;
+    }
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
       if(
@@ -181,7 +187,6 @@ class Operation extends Component {
     return true;
   }
   changeTitle() {
-    const {handleChangeValue} = this.props;
     return <div className={style['box']}>
       {/* <div className={style.titleTip}></div> */}
       <div className={style['iptWrap']}>
@@ -292,12 +297,6 @@ class Operation extends Component {
   componentWillReceiveProps(next){//监听滚动事件
     const that = this;
     if(next.winWidth <= 1024){
-      /*$(document).on('scroll',function(){
-        let left = -($(document).scrollLeft() - 10) + 'px';
-        that.setState({
-          le:left
-        })
-      })*/
       $(window).scroll(function(){
         let scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
         let left = -(scrollLeft - 10) +'px';
@@ -307,9 +306,13 @@ class Operation extends Component {
       })
     }
   }
-
+  handleChangeIpt(val){
+    this.setState({
+      value:val
+    })
+  }
   render() {
-    const { showPrint, closePrint, showPreview, closePreview } = this;
+    const { showPrint, closePrint, showPreview, closePreview,handleChangeIpt } = this;
     const { visible, preVisible,diagShow } = this.props.print;
     const {winWidth,cancelDelTag,departLis,handleChangeValue,admin} = this.props;
     const {zIndex,type,le,value} = this.state;
@@ -341,7 +344,7 @@ class Operation extends Component {
         {
           admin&&type==3?<div className={style.department}>
               <span>科室归属:</span>
-              <Search handleChangeValue={handleChangeValue} value={value} visible={true}>
+              <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
                 <ul className={style.departLis}>
                   {
                     departLis.map((item,idx)=>{

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

@@ -211,9 +211,9 @@ class TemplateItem extends React.Component {
     }
   }
   render() {
-    const { allCheckShow, id, name, preview, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
+    const { allCheckShow, id, name, preview,conceptDeptName, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
     let previewJson = JSON.parse(preview);
-    let sexStr = sex == 2 ? ' (女)' : sex == 1 ? ' (男)' : ' (通用)';
+    let sexStr = sex == 2 ? ' (女'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : sex == 1 ? ' (男'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : ' (通用'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')';
     return (
       <div className={style.wrapper}>
         <div className={this.getStyleFst()}

+ 15 - 8
src/components/TemplateItems/index.jsx

@@ -120,7 +120,6 @@ class TemplateItems extends React.Component {
     render() {
         const { checkItemsAdmin,handleAllCheckboxAdmin,handleMangerTemplateAdmin,allCheckShowAdmin,admin,adminItems,allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
         const {height} = this.state
-        // console.log(checkItemsAdmin,7877877)
         return (
             <div className={style.wrapper} >
                 {//管理员操作
@@ -159,9 +158,11 @@ class TemplateItems extends React.Component {
                 }
                 {
                     <div className={style.comAdminWrp}>
-                        <div className={`${style.tempLists} ${style.tempListsP}`} ref={this.$cont} style={{display:admin?'none':'block',height:height/2+'px',border:'1px solid #EAEDF1'}}>
+                        <div className={`${style.tempLists} ${style.tempListsP}`} ref={this.$cont} style={{display:admin?'none':'block',border:'1px solid #EAEDF1'}}>
                             {//个人
                                 allCheckShow&&!admin ?<div className={`${style.wrapperTop} ${style.wrapperTopM} ${style.personalTmp}`}>
+                                    <i></i>
+                                    <i></i>
                                     <div className={style['check-wrap']} onClick={handleAllCheckbox}>
                                         <img className={`${style['fl-element']} ${style['check-box']}`} src={this.getCheckIcon()} />
                                     </div>
@@ -174,22 +175,28 @@ class TemplateItems extends React.Component {
                                 </div>:null
                             }
                             {
-                                items.length > 0&&20.0&&<div className={`${style.personalTmp} clearfix`}>
+                                !allCheckShow&&<div className={`${style.personalTmp} clearfix`}>
                                     <span className={style.tip}>个人模板</span>
                                     <i></i>
-                                    <span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                                    {
+                                        items.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                                    }
                                 </div>
                             }
                             {
-                                this.genItems(items).length > 0?this.genItems(items): <Empty message={this.state.msg}></Empty>
+                                <div style={{height:height/2-42+'px',overflow:'auto'}}>
+                                    {this.genItems(items).length > 0?this.genItems(items): <Empty message={this.state.msg}></Empty>}
+                                </div>
                             }
                         </div>
-                        <div className={style.tempLists} ref={this.$conts} style={{height:admin?height+'px':(height-20)/2+'px',border:admin?'0':'1px solid #EAEDF1'}}>
+                        <div className={style.tempLists} ref={this.$conts} style={{border:admin?'0':'1px solid #EAEDF1'}}>
                             {
-                                adminItems.length > 0&&!admin&&!allCheckShowAdmin&&<div className={`${style.personalTmp}`}>标准模板</div>
+                                !admin?!allCheckShowAdmin&&<div className={`${style.personalTmp}`}>标准模板</div>:''
                             }
                             {
-                                this.genItems(adminItems,true).length > 0?this.genItems(adminItems,true): <Empty message={this.state.msg}></Empty>
+                                <div style={{height:admin?height+'px':(height-20)/2-42+'px',overflow:'auto'}}>
+                                    {this.genItems(adminItems,true).length > 0?this.genItems(adminItems,true): <Empty message={this.state.msg}></Empty>}
+                                </div>
                             }
                         </div>
                     </div>

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

@@ -9,6 +9,7 @@
     .tempLists {
         overflow-y: auto;
         background-color: #fff;
+        position: relative;
         // margin-top: 15px;
     }
     .tempListsP {
@@ -105,7 +106,7 @@
         img {
             position: absolute;
             width: 15px;
-            left: 264px;
+            left: 294px;
             top: 10px;
             cursor: pointer;
         }

+ 12 - 12
src/store/reducers/tabTemplate.js

@@ -54,9 +54,9 @@ export default (state = initDataList, action) => {
     let tempArr = newState.items;
     tempArr.splice(tempArr.findIndex(item => item.id == action.id), 1)
     newState.items = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShow = false
+    }
     return newState;
   }
   if (action.type === DEL_ITEMS_ADMIN) {
@@ -64,9 +64,9 @@ export default (state = initDataList, action) => {
     let tempArr = newState.adminItems;
     tempArr.splice(tempArr.findIndex(item => item.id == action.id), 1)
     newState.adminItems = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShowAdmin = false
+    }
     return newState;
   }
   if (action.type === BATCH_DEL_ITEMS) {
@@ -77,9 +77,9 @@ export default (state = initDataList, action) => {
       tempArr.splice(tempArr.findIndex(item => item.id == currentId), 1)
     }
     newState.items = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShow = false
+    }
     newState.checkItems = [];
     return newState;
   }
@@ -91,9 +91,9 @@ export default (state = initDataList, action) => {
       tempArr.splice(tempArr.findIndex(item => item.id == currentId), 1)
     }
     newState.adminItems = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShowAdmin = false
+    }
     newState.checkItemsAdmin = [];
     return newState;
   }