Преглед на файлове

Merge remote-tracking branch 'origin/dev/byll' into dev/new1

zhouna преди 6 години
родител
ревизия
993eaf02f2

+ 4 - 4
src/common/components/ConfirmModal/index.jsx

@@ -134,20 +134,20 @@ class ConfirmModal extends Component {
                         <div className={styles['modal-content']}>{children}</div>
                         {noFooter ? '' : <div className={styles['modal-operator']+' clearfix'}>
                             <div className={styles['modal-btn-box']}>
-                                <button 
+                                <div 
                                     onClick={this.confirm} 
                                     className={styles['modal-operator-confirm']}
                                     style={{borderColor: okBorderColor, background: oKBg, color: okColor}}>
                                     { okText}
-                                </button>
+                                </div>
                             </div>
                             <div className={styles['modal-btn-box']}>
-                                <button 
+                                <div 
                                 onClick={this.cancel} 
                                 className={styles['modal-operator-close']}
                                 style={{borderColor: cancelBorderColor, background: cancelBg, color: cancelColor}}>
                                 { cancelText}
-                            </button>
+                            </div>
                             </div>
                         </div>}
                     </div>

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

@@ -46,7 +46,7 @@
     outline: none;
     margin: auto;
     height: 34px;
-    line-height: 24px;
+    line-height: 32px;
     opacity: 1;
     color: #fff;
     cursor: pointer;

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

@@ -8,9 +8,8 @@
     min-width: 300px;
     max-width: 600px;
     box-sizing: border-box;
-    box-shadow: 0 6px 20px 0 #989DA3;
     margin-bottom: 80px;
-    // border: 1px solid #989DA3;
+    .llStyle;
 }
 .btnWrap{
     span {

+ 20 - 14
src/common/components/SearchOption/index.jsx

@@ -46,9 +46,22 @@ class SearchOption extends React.Component {
         });
         handleChangeValue('');
     }
-
+    handleInput(e){
+      if((e.target.value).trim() != ''){
+          this.props.handleChangeValue(e.target.value);
+          this.setState({
+              val:e.target.value,
+              show:true
+          })
+      }else{
+          this.handleClearVal()
+          this.setState({
+              show:false
+          })
+      }
+    }
     render() {
-        const { handleChangeValue,children,visible } = this.props;
+        const { children,visible } = this.props;
         const { show } = this.state;
         return (
             <div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
@@ -67,18 +80,11 @@ class SearchOption extends React.Component {
                         }
                     }}
                     onBlur={()=>{this.setState({border:false,val:''})}}
-                    onKeyUp={(e) => { 
-                        if((e.target.value).trim() != ''){
-                            handleChangeValue(e.target.value);
-                            this.setState({
-                                val:e.target.value,
-                                show:true
-                            })
-                        }else{
-                            this.setState({
-                                show:false
-                            })
-                        }
+                    onInput={(e) => { 
+                        this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
                     }}
                     placeholder="搜索"
                 />

+ 2 - 2
src/common/components/SearchOption/index.less

@@ -8,8 +8,8 @@
     top: 40px;
     z-index: 99;
     background-color: #fff;
-    box-shadow: 0 6px 20px 0 #989DA3;
     margin-bottom: 80px;
+    .llStyle;
     .autoList {
         max-height: 225px;
         min-height: 80px;
@@ -47,4 +47,4 @@
 }
 .hide {
     display: none;
-}
+}

+ 6 - 0
src/common/less/variables.less

@@ -154,4 +154,10 @@
 
 .hide{
   display: none!important;
+}
+
+.llStyle{
+  box-shadow: 0 10px 20px 0 #989DA3;
+  filter:progid:DXImageTransform.Microsoft.Shadow(color='#989DA3',Direction=125,Strength=6);
+  border: 1px solid #f3f0f0;
 }

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

@@ -50,7 +50,7 @@ class Textarea extends Component {
       <div className={style.divTextarea}
           contenteditable={true}
           ref={this.$dom}
-          onChange={this.handleInput}
+          onInput={this.handleInput}
       ></div>
     );
   }

+ 3 - 23
src/components/AddAssistCheck/index.jsx

@@ -109,26 +109,10 @@ class AddAssistCheck extends React.Component {
             {
                 assistLabel.map((item,idx) => {
                     return (<li key={item.id}> 
-                        <span style={{float:"left"}}>{item.name}:</span>
-                        <p style={{float:"none",overflow:"hidden",marginRight:"215px",paddingLeft:'8px'}}>
-                        {/* <p className={styles.textareaWrap}> */}
-                            {/* <textarea
-                                className={styles.divTextarea}
-                                onChange={(e)=>{
-                                    handleChangeAssistValue(e.target.value,idx,e)
-                                    if(e.target.value.trim() == '') {
-                                        e.target.style.height = '18px';
-                                        return;
-                                    }
-                                    e.target.style.height = e.targetv.scrollHeight+'px';
-                                }}
-                                value={item.value}
-                                // onFocus={(e)=>{e.target.style.height = e.target.scrollHeight+'px';}}
-                                onKeyUp={(e)=>{handleChangeAssistValue(e.target.value,idx,e)}} 
-                                placeholder="报告描述或意见"
-                            ></textarea> */}
+                        <span className={styles.assistName} style={{float:"left"}}>{item.name}:</span>
+                        <div className={styles.textareaWrap}>
                             <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
-                        </p>
+                        </div>
                         <div className={styles.pointerFinger}>
                             <p onClick={()=>this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                             <i onClick={()=>this.handleShowDate(idx)}></i>
@@ -137,14 +121,10 @@ class AddAssistCheck extends React.Component {
                                 <Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
                             </div>
                         </div>
-                        {/* <p className={styles.iptWrap}> */}
-                            {/* <input type="text" onChange={(e)=>{handleChangeAssistValue(e.target.value,idx)}} placeholder={"报告描述或意见"}/> */}
-                        {/* </p> */}
                     </li>)
                 })
             }
         </ul>
-        
     }
     render() {
         const { handleChangeValue, list } = this.props;

Файловите разлики са ограничени, защото са твърде много
+ 2 - 20
src/components/AddAssistCheck/index.less


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

@@ -150,7 +150,7 @@ class Inspect extends React.Component {
                     <span>化验结果数据</span>
                     <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}>
                        {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
-                        <button>导入化验结果</button>
+                        <div className={styles.pushButton}>导入化验结果</div>
                         <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
                     </div>
                 </div>

+ 4 - 6
src/components/Inspect/index.less

@@ -31,14 +31,13 @@
             color:@placeholder-color;
         }
     }
-    button {
-        outline: none;
+    .pushButton {
         font-size: 12px;
         padding: 0 8px;
         background-color: #fff;
         height: 28px;
-        line-height: 30px;
-        border: 0 none;
+        line-height: 28px;
+        border-radius: 5px;
         color: @template-color;
     }
 }
@@ -59,12 +58,11 @@
     width: 100px;
     height: 34px;
     line-height: 34px;
-    margin: 0 auto;
+    margin: 10px auto;
     background-color: #78bddd;
     border-radius: 5px;
     text-align: center;
     color: #fff;
-    margin-bottom: 20px;
     cursor: pointer;
 }
 

+ 13 - 21
src/components/Operation/index.jsx

@@ -172,14 +172,15 @@ class Operation extends Component {
     let jsonStr = getAllDataStringList(baseList);
     let whichSign = baseList.typeConfig.typeConfig;
     let tmpLis = baseList.tabTemplate.items;
-    if (whichSign == 0) {
-      for(let i = 0;i <tmpLis.length;i++){
-        let dataStr = tmpLis[i].dataJson;
-        if(dataStr == JSON.stringify(jsonData)){
-          Notify.info('该模板已保存');
-          return false;
-        }
+    for(let i = 0;i <tmpLis.length;i++){
+      let dataStr = tmpLis[i].preview;
+      let jsStr = tmpLis[i].dataJson;
+      if(JSON.stringify(JSON.parse(dataStr)) == JSON.stringify(jsonStr) && jsStr == JSON.stringify(jsonData)){
+        Notify.info('该模板已保存');
+        return false;
       }
+    }
+    if (whichSign == 0) {
       if (
         JSON.stringify(jsonData.advice) == '{}' &&
         (jsonData.chief.length < 1 && jsonStr.chief == '[]') &&
@@ -197,15 +198,6 @@ class Operation extends Component {
         return true;
       }
     } else if(whichSign == 1) {
-      for(let i = 0;i <tmpLis.length;i++){
-        let dataStr = tmpLis[i].preview;
-        let jsStr = tmpLis[i].dataJson;
-        console.log(dataStr == JSON.stringify(jsonStr))
-        if(JSON.stringify(JSON.parse(dataStr)) == JSON.stringify(jsonStr) && jsStr == JSON.stringify(jsonData)){
-          Notify.info('该模板已保存');
-          return false;
-        }
-      }
       if (JSON.stringify(jsonData.advice) == '{}' && 
           jsonStr.chief == '[]' && 
           jsonStr.present == '[]' && 
@@ -281,11 +273,11 @@ class Operation extends Component {
     const { visible, preVisible,diagShow } = this.props.print;
     const {zIndex} = this.state;
     return <div className={style['container']} style={{zIndex:zIndex}}>
-      <button className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</button>
-      <button className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</button>
-      <button className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</button>
-      <button className={style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</button>
-      <button className={`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</button>
+      <span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
+      <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
+      <span className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</span>
+      <span className={style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
+      <span className={`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
       <PrintPreviewContainer visible={visible} onClose={closePrint} />
       <PreviewContainer visible={preVisible} onClose={closePreview} />
       <ConfirmModal

+ 3 - 0
src/components/Operation/index.less

@@ -45,11 +45,14 @@
     .saveButton {
         width: 80px;
         height: 34px;
+        line-height: 34px;
+        text-align: center;
         outline: none;
         border-radius: 4px;
         cursor: pointer;
         color: #000;
         border: 1px solid #3B9ED0;
+        box-sizing: border-box;
         background: #fff;
         margin-left:20px;
         background: #3B9ED0;

+ 11 - 24
src/components/PrintPreview/index.jsx

@@ -78,31 +78,18 @@ class PrintPreview extends Component {
         this.props.onClose()
     }
     surePrint(jsonData,jsonStr,whichSign){
-        if(whichSign == 0){
-            if(jsonData.chief.length < 1){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(jsonData.diag.length < 1){
-                Notify.info('诊断不能为空');
-                return;
-            }else{
-                this.onPrint();
-                this.props.save(true)
-            }
+        if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0].trim() ==''){
+          Notify.info('主诉不能为空');
+            return false;
+        }else if(jsonStr.chief && JSON.parse(jsonStr.chief).length < 1){
+            Notify.info('主诉不能为空');
+            return false;
+        }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
+            Notify.info('诊断不能为空');
+            return false;
         }else{
-            if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0] ==''){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(JSON.parse(jsonStr.chief).length < 1){
-                Notify.info('主诉不能为空');
-                return;
-            }else if(jsonStr.diag.trim().length < 1){
-                Notify.info('诊断不能为空');
-                return;
-            }else{
-                this.onPrint();
-                this.props.save(true)
-            }
+            this.onPrint();
+            this.props.save(true)
         }
     }
     render() {

+ 0 - 1
src/store/async-actions/patInfo.js

@@ -21,7 +21,6 @@ export const initPersonInfo = (dispatch, getState) => {
         const data = res.data;
         if (data.code == 0) {
             dispatch(getInfos(data.data));
-            console.log(data.data)
             getPatientMessage(dispatch, getState);
         } else {
             console.log(res)

+ 4 - 3
src/store/async-actions/tabTemplate.js

@@ -125,15 +125,16 @@ export const delBatchItem = (ids) => { //批量删除
 export const changeTitleAsync = (obj) => { //改标题
   let baseList = store.getState();
   let whichSign = baseList.typeConfig.typeConfig;
+  let state = baseList.patInfo.message;
   if (obj.title == '') {
     Notify.success('请输入模板名称');
     return;
   }
   return (dispatch) => {
     axios.json('/api/icss/templateInfo/updateByIdUsNames', {
-      "doctorId": 1,
-      "hospitalDeptId": 1,
-      "hospitalId": 1,
+      "doctorId": state.doctorId,
+      "hospitalDeptId": state.hospitalDeptId,
+      "hospitalId": state.hospitalId,
       "id": obj.id,
       "modeName": obj.title,
       "type": whichSign

+ 5 - 5
src/store/reducers/assistCheck.js

@@ -20,7 +20,7 @@ function getCurrentDate() {
     let date = year+'-'+(mon<10?'0'+mon:mon)+'-'+(day<10?'0'+day:day);
     return date;
 }
-export default (state = initSearchList, action) => {
+export default (state = initSearchList, action) => { 
     if (action.type == GET_ASSIST_SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
@@ -39,7 +39,7 @@ export default (state = initSearchList, action) => {
             }
         }
         for (let j = 0; j < tempArrs.length; j++) {
-            tmpString += (tempArrs[j].name+(tempArrs[j].value?(':'+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期:'+tempArrs[j].time:'')+';')
+            tmpString += (tempArrs[j].name+(tempArrs[j].value?(':'+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期:'+tempArrs[j].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;
@@ -54,7 +54,7 @@ export default (state = initSearchList, action) => {
             return
         }
         for (let i = 0; i < tempArr.length; i++) {
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.assistLabel = [...tempArr]
         newState.dataString = tmpString
@@ -69,7 +69,7 @@ export default (state = initSearchList, action) => {
                 tempArr[i].value = action.val
                 newState.assistLabel = [...tempArr]
             }
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;
@@ -83,7 +83,7 @@ export default (state = initSearchList, action) => {
                 tempArr[i].time = action.date
                 newState.assistLabel = [...tempArr]
             }
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;

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

@@ -16,7 +16,7 @@ const initState = {
   emptyData:[],
   symptomIds:[] //搜索去重
 };
-export default function(state=initState,action){
+export default function(state=initState,action){    
   const res = Object.assign({},state);
   switch (action.type){
     case SET_CURRENT://需要处理截取的模板