Procházet zdrojové kódy

辅检信息提示

Luolei před 6 roky
rodič
revize
e2651490d6

binární
src/components/AddAssistCheck/img/info2.png


binární
src/components/AddAssistCheck/img/info3.png


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

@@ -123,12 +123,17 @@ class AddAssistCheck extends React.Component {
     </ul>
   }
   getAssistLabel() {
-    const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth } = this.props;
+    const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
     return <ul className={styles.labelWrap} id="datePick">
       {
         assistLabel.map((item, idx) => {
           return (<li key={item.id} className={styles.assistLists}>
-            <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>{item.name}:</span>
+            <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+              <span className={styles.tagSpan}>
+                {item.name}:
+                <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+              </span>
+            </span>
             <div className={styles.textareaWrap}>
               <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
             </div>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 28 - 0
src/components/AddAssistCheck/index.less


+ 18 - 4
src/components/AddInspect/SlideExcel/index.jsx

@@ -31,17 +31,26 @@ class SlideExcel extends Component {
     })
   }
   render() {
-    const {items,item,idx,dateTime} = this.props;
+    const {items,item,idx,dateTime,getInfomation} = this.props;
     const {show} = this.state;
     return (
       <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
           <span className={styles.excelDataTitle}>
-              {item.menus}
+              <span className={styles.tagSpan}>
+                {item.menus}
+                <span className={styles.imgInfo} onClick={()=>getInfomation('',item.lisExcelItem[0].uniquemealName)}></span>
+              </span>
           </span>
           <table className={styles.table}>
              {  show ? (item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
+                console.log(value,788778)
                   return <tr>
-                      <td style={{width:'30%'}}>{value.itemName}</td>
+                      <td style={{width:'30%'}}>
+                        <span className={styles.tagSpan}>
+                          {value.itemName}
+                          <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '')}></span>
+                        </span>
+                      </td>
                       <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
                       <td style={{width:'25%'}}>
                           {normalVal(value.min,value.max)}
@@ -51,7 +60,12 @@ class SlideExcel extends Component {
                 })):(item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
                   if(idx < 4){
                     return <tr>
-                        <td style={{width:'30%'}}>{value.itemName}</td>
+                        <td style={{width:'30%'}}>
+                          <span className={styles.tagSpan}>
+                            {value.itemName}
+                            <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '')}></span>
+                          </span>
+                        </td>
                         <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
                         <td style={{width:'25%'}}>
                             {normalVal(value.min,value.max)}

+ 27 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -142,4 +142,31 @@
   .num {
     color: @blue;
   }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+}
+.imgInfo:hover {
+  background: url('../img/info3.png') no-repeat center center;
+  background-size: 100% auto; 
+}
+.tagSpan {
+  position: relative;
+}
+.tagSpan:hover {
+  .imgInfo {
+    display: block;
+  }
 }

+ 2 - 5
src/components/AddInspect/SlideSelect/index.jsx

@@ -6,8 +6,6 @@ import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import date1 from '../img/date1.png';
 import close from '../img/close.png';
-import info from '../img/info3.png';
-import info2 from '../img/info2.png';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -48,13 +46,13 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
                 </i>
             </p>
         }
@@ -87,7 +85,6 @@ class SlideSelect extends Component {
                                 </tr>
                             }
                         })):(item.details.map((val,num)=>{
-                          console.log(item,788787)
                           if(val.value && val.value != '' ){
                               ++numPlus1;
                               if(numPlus1 < 5){

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

@@ -302,6 +302,7 @@ class Inspect extends React.Component {
                           item={item}
                           idx={idx}
                           dateTime={this.state.dateTime}
+                          getInfomation={getInfomation}
                         ></SlideExcel>
                       })
                     }

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

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

+ 4 - 1
src/containers/AssistCheck.js

@@ -4,7 +4,7 @@ import {
 } from 'react-redux';
 import AssistCheck from '@components/AssistCheck';
 import { assistLable,delAssistLabel,changeAssistVal,changeDate } from '@store/actions/assistCheck';
-import { getSearchList } from '@store/async-actions/assistCheck';
+import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
 
@@ -20,6 +20,9 @@ function mapStateToProps(state) {//console.log(state.assistCheck)
 
 function mapDispatchToProps(dispatch, store) {
     return {
+        getInfomation(id,name){
+            dispatch(getInstroduce(id,name))
+        },
         handleChangeValue(val) {
             dispatch(getSearchList(val))
         },

+ 3 - 3
src/containers/Inspect.js

@@ -20,8 +20,9 @@ function mapDispatchToProps(dispatch, store) {
         handleChangeValue(val){
             dispatch(getSearchList(val))
         },
-        getInfomation(id){
-            dispatch(getInstroduce(id))
+        getInfomation(id,name){
+            console.log(id,name)
+            dispatch(getInstroduce(id,name))
         },
         handleSign(id,idx,type){
             dispatch(setLabel(idx,type))
@@ -40,7 +41,6 @@ function mapDispatchToProps(dispatch, store) {
             dispatch(checkValueIsChange(idx,time,arr))
         },
         changeActivePart(idx,value){
-            console.log(idx,value)
             dispatch(fillActiveDetail(idx,value))
         },
         handleCloseExcel(idx){

+ 21 - 0
src/store/async-actions/assistCheck.js

@@ -1,6 +1,7 @@
 import axios from '@utils/ajax';
 import store from '@store';
 import { searchList } from '../actions/assistCheck';
+import { SET_TIPS } from '../types/pushMessage';
 
 
 export const getSearchList = (val) => {
@@ -23,3 +24,23 @@ export const getSearchList = (val) => {
         })
     }
 };
+
+export const getInstroduce = (id,name)=>{    //获取辅检的提示信息
+  return (dispatch, getState) =>{
+      axios.json('/api/icss/introduceInfo/getByQuestionId', {
+        questionId: id?id:'',
+        type: 6,
+        tagName:name?name:'',
+        position: 1
+    })
+    .then((data)=>{
+        dispatch({
+          type: SET_TIPS,
+          tips: data.data.data,
+          tmpFlg:'midPart'
+      })          
+    }).catch((e) => {
+        console.log(e)
+    })
+  }
+}

+ 5 - 3
src/store/async-actions/inspect.js

@@ -2,7 +2,7 @@ import axios from '@utils/ajax';
 import store from '@store';
 
 import { searchList,resetLabel } from '../actions/inspect';
-import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS } from '../types/pushMessage';
+import { SET_TIPS } from '../types/pushMessage';
 
 export const getSearchList = (val) => {
     if(val.trim() == ''){
@@ -50,11 +50,13 @@ export const getSublableList = (id,idx) => {
     }
 };
 
-export const getInstroduce = (id)=>{    //获取化验的提示信息
+export const getInstroduce = (id,name)=>{    //获取化验的提示信息
+  console.log(id,name,78878788787)
   return (dispatch, getState) =>{
       axios.json('/api/icss/introduceInfo/getByQuestionId', {
-        questionId: id,
+        questionId: id?id:'',
         type: 5,
+        tagName:name?name:'',
         position: 1
     })
     .then((data)=>{