Переглянути джерело

Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

liucf 6 роки тому
батько
коміт
def701de70

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

@@ -151,7 +151,7 @@ class AddAssistCheck extends React.Component {
     </ul>
   }
   render() {
-    const { handleChangeValue, list } = this.props;
+    const { handleChangeValue, list,assistVal } = this.props;
     const { visible } = this.state;
     return (
       <div className={styles.wrapper}>
@@ -159,9 +159,9 @@ class AddAssistCheck extends React.Component {
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):''}
+            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0?'':<div>
+              list && list.length>0 || (assistVal != '')?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {
                   this.getCommonList()

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

@@ -26,7 +26,7 @@
 .searchLiUl {
   overflow-y: auto;
   max-height: 225px;
-  min-height: 80px;
+  // min-height: 80px;
 }
 .searchLi:hover {
     border: 1px solid @blue;

+ 4 - 3
src/components/AddInspect/index.jsx

@@ -284,8 +284,9 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const { getInfomation,handleChangeValue, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { getInfomation,handleChangeValue,inspectVal, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { toastText, visible, tmpId, tmpIdx } = this.state;
+    console.log(this.props,99999)
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
@@ -343,9 +344,9 @@ class Inspect extends React.Component {
         <div style={{ position: "relative", clear: "both" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
           {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):''}
+            {list && list.length>0?this.getSearchList(list):(inspectVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0?'':<div>
+              list && list.length>0 || (inspectVal != '')?'':<div>
                   <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用化验项</p>
                   {
                     this.getCommonList()

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

@@ -91,7 +91,7 @@
 .searchLiUl {
   overflow-y: auto;
   max-height: 225px;
-  min-height: 80px;
+  // min-height: 80px;
 }
 .searchLi {
     height: 36px;

+ 2 - 1
src/components/AssistCheck/index.jsx

@@ -10,7 +10,7 @@ class AssistCheck extends React.Component {
     }
 
     render(){
-        const {list,getInfomation,assistLabel,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {list,getInfomation,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
@@ -38,6 +38,7 @@ class AssistCheck extends React.Component {
                             winWidth={winWidth}
                             getInfomation={getInfomation}
                             assistList={assistList}
+                            assistVal={assistVal}
                         >
 
                         </AddAssistCheck>

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

@@ -147,7 +147,7 @@ class Inspect extends React.Component {
         </ul>
     }
     render() {
-        const {fetchPushInfos,getInfomation, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
+        const {fetchPushInfos,getInfomation,inspectVal, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
         const {ieVersion,isIE} = this.state;
         return (
             <div className={styles.wrapper} >
@@ -185,6 +185,7 @@ class Inspect extends React.Component {
                             delPartItem={delPartItem}
                             inspectList={inspectList}
                             getInfomation={getInfomation}
+                            inspectVal={inspectVal}
                         >
                         </AddInspect>
                     </div>

+ 25 - 22
src/components/PreviewBody/index.jsx

@@ -154,28 +154,26 @@ class PreviewBody extends Component {
               }
               {
                 dataJson.lis.labelList && dataJson.lis.labelList.map((item, idx) => {
-                  // if (item.show) {
-                    return <table style={{ margin: '8px 0', width: '100%' }}>
-                      {
-                        item.show?<tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ borderBottom: '1px solid #666666' }}> {item.name} </span></td></tr>:
-                        <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
-                      }
-                      {
-                        item.details.map((val) => {
-                          if (val.value && val.value != '') {
-                            return <tr style={{ lineHeight: '1.5', width: '100%', fontSize: '12px' }}>
-                              <td style={{ width: '32%', fontSize: '12px' }}>{val.name}</td>
-                              {this.showDetails(val)}
-                              <td style={{ width: '24%', fontSize: '12px' }}>
-                                {normalVal(val.minValue, val.maxValue)}
-                              </td>
-                              <td style={{ width: '28%', fontSize: '12px' }}>{'化验时间:' + item.time}</td>
-                            </tr>
-                          }
-                        })
-                      }
-                    </table>
-                  // }
+                  return <table style={{ margin: '8px 0', width: '100%' }}>
+                    {
+                      item.show?<tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ borderBottom: '1px solid #666666' }}> {item.name} </span></td></tr>:
+                      <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
+                    }
+                    {
+                      item.details.map((val) => {
+                        if (val.value && val.value != '') {
+                          return <tr style={{ lineHeight: '1.5', width: '100%', fontSize: '12px' }}>
+                            <td style={{ width: '32%', fontSize: '12px' }}>{val.name}</td>
+                            {this.showDetails(val)}
+                            <td style={{ width: '24%', fontSize: '12px' }}>
+                              {normalVal(val.minValue, val.maxValue)}
+                            </td>
+                            <td style={{ width: '28%', fontSize: '12px' }}>{'化验时间:' + item.time}</td>
+                          </tr>
+                        }
+                      })
+                    }
+                  </table>
                 })
               }
             </td>
@@ -203,10 +201,15 @@ class PreviewBody extends Component {
           <tr className={style['patInfoFst']}>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={style['patInfoSec']} style={{ fontSize: '14px', padding: '1px 0px 8px 0px', lineHeight: '20px' }}>
+              {((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>开单项目</span></p>}
+              {
+                ((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <div style={{ padding: '0px 0px 5px 0px',wordBreak:"break-all" }}>{dataJson.advice.check?dataJson.advice.check+',':''} {dataJson.advice.assay}</div>
+              }
               {dataJson.advice.commontreatment && dataJson.advice.commontreatment.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>一般治疗</span></p>}
               {
                 dataJson.advice.commontreatment && <div style={{ padding: '0px 0px 5px 0px',wordBreak:"break-all" }}>{dataJson.advice.commontreatment}</div>
               }
+              {dataJson.advice.followUp && dataJson.advice.followUp.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>回访时间:<span className={style['bbtm']}>{dataJson.advice.followUp}</span> 后回访,不适随诊</span></p>}
               {dataJson.advice.scheme && dataJson.advice.scheme.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>治疗方案</span></p>}
               {
                 dataJson.advice.scheme && dataJson.advice.scheme.map((item, index) => {

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

@@ -46,4 +46,7 @@ table{
   tr td:first-child{
     width: 31%;
   }
+}
+.bbtm {
+  border-bottom: 1px solid #333;
 }

+ 1 - 0
src/containers/AssistCheck.js

@@ -15,6 +15,7 @@ function mapStateToProps(state) {//console.log(state)
         isRead:state.homePage.isRead,
         winWidth:state.homePage.windowWidth,
         assistList:state.homePage.assistList,
+        assistVal:state.assistCheck.assistVal,
     }
 }
 

+ 1 - 0
src/containers/Inspect.js

@@ -12,6 +12,7 @@ function mapStateToProps(state) {//console.log(state)
         getExcelDataList:state.inspect.getExcelDataList,
         labelListActive:state.inspect.labelListActive,
         inspectList:state.homePage.inspectList,
+        inspectVal:state.inspect.inspectVal
     }
 }
 

+ 3 - 2
src/store/actions/assistCheck.js

@@ -1,8 +1,9 @@
 import {GET_ASSIST_SEARCH_LIST,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
 
-export const searchList = (list) => ({         //获取搜索数据
+export const searchList = (list,val) => ({         //获取搜索数据
     type:GET_ASSIST_SEARCH_LIST,
-    list
+    list,
+    val
 })
 export const assistLable = (id,idx,sign) => ({         //添加数据
     type:GET_ASSIST_LABEL,

+ 3 - 2
src/store/actions/inspect.js

@@ -1,8 +1,9 @@
 import {ADD_LABEL,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
 
-export const searchList = (list) => ({         //初始化数据
+export const searchList = (list,val) => ({         //初始化数据
     type:SEARCH_LIST,
-    list
+    list,
+    val
 })
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果

+ 2 - 2
src/store/async-actions/assistCheck.js

@@ -7,7 +7,7 @@ import { SET_TIPS } from '../types/pushMessage';
 export const getSearchList = (val) => {
     if(val.trim() == ''){
         const data = [];
-        return (dispatch) => dispatch(searchList(data));
+        return (dispatch) => dispatch(searchList(data,''));
     }
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
@@ -20,7 +20,7 @@ export const getSearchList = (val) => {
         })
         .then((res)=>{
             const data = res.data.data;
-            dispatch(searchList(data));
+            dispatch(searchList(data,val.trim()));
         })
     }
 };

+ 2 - 2
src/store/async-actions/inspect.js

@@ -7,7 +7,7 @@ import { SET_TIPS } from '../types/pushMessage';
 export const getSearchList = (val) => {
     if(val.trim() == ''){
         const data = [];
-        return (dispatch) => dispatch(searchList(data));
+        return (dispatch) => dispatch(searchList(data,''));
     }
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
@@ -20,7 +20,7 @@ export const getSearchList = (val) => {
         })
         .then((res)=>{
             const data = res.data.data;
-            dispatch(searchList(data));
+            dispatch(searchList(data,val.trim()));
         })
     }
 };

+ 2 - 0
src/store/reducers/assistCheck.js

@@ -12,6 +12,7 @@ const initSearchList = {
     list: [], //点击的结果
     assistLabel: [], //搜索的结果
     dataString:'',      //结果拼接
+    assistVal:''
 }
 function getCurrentDate() {
     let myDate = new Date();
@@ -44,6 +45,7 @@ export default (state = initSearchList, action) => {
     if (action.type == GET_ASSIST_SEARCH_LIST) {    //右侧推送添加到左侧
         const newState = Object.assign({}, state);
         newState.list = action.list
+        newState.assistVal = action.val
         return newState;
     }
     if (action.type == GET_ASSIST_LABEL) {             //默认

+ 2 - 0
src/store/reducers/inspect.js

@@ -26,12 +26,14 @@ const initSearchList = {
     getExcelDataList: [], //导入的数据
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
+    inspectVal:''
 }
 
 export default (state = initSearchList, action) => {
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
+        newState.inspectVal = action.val
         return newState;
     }
     if (action.type == SET_LABEL) {             //选中的结果    

+ 2 - 1
src/utils/tools.js

@@ -877,10 +877,11 @@ function inspectAndAssist(){
       questionId: '',
       showType: 1,
     }
+    console.log(tmpInspect[i])
     if (tmpInspect[i].controlType == 0) {
       tmpDetail = tmpInspect[i].questionMapping
     }else if(tmpInspect[i].controlType == 1 || tmpInspect[i].controlType == 6){
-      tmpDetail.push(tmpInspect[i])
+      tmpDetail = new Array(tmpInspect[i])
     }
     tmpObj.questionId = tmpInspect[i].id
     tmpObj.name = tmpInspect[i].name