瀏覽代碼

化验标记基本完成

luolei 5 年之前
父節點
當前提交
e5d3dcd647

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

@@ -59,7 +59,6 @@ class AddAssistCheck extends React.Component {
             })
           }
         }
-        
       }
     });
     const that = this;
@@ -203,12 +202,6 @@ class AddAssistCheck extends React.Component {
             {
               part.map((item, idx) => {
                 return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
-                  {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
-                    <span className={styles.tagSpan}>
-                      {item.name}:
-                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
-                    </span>
-                  </span> */}
                   <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation} normal={true}></AssistName>
                   <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                     <ScrollArea speed={0.8}

+ 2 - 20
src/components/AddAssistCheck/index.less

@@ -55,7 +55,7 @@
       width: 260px;
       position: absolute;
       right: 0;
-      top: 10px;
+      bottom: 10px;
       p {
         font-size: unset;
         span {
@@ -72,40 +72,22 @@
         background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAANtJREFUOBHFU90RwiAMDj3H8FV3KQ4AxwAO5QQwgbvoY90DQ+/gUpogXj3bF/L75ctXANj7c85pY0zMPKy1U7bLmQqG4hFjwPIL8UEp9aI+UOxFotcRZ3MALEmu8I+xWoGk2VpiQqhoWneSmoXZvfWehaubsVgBoGxdxb93EekhdbVyKjWh5iNSvcUYjxJIK57WxN5rCOE+13E/scWCy2WMzLC81haTTzlkOONtf6I4KTM8SFPTWqjLicujZk/v/ZnLdV9ZrpmLiQwlBhwIjWVAjStOG6+NpsA/s99BMkpktdAgdAAAAABJRU5ErkJggg==') no-repeat;
       }
 
-      /* a {
-                img {
-                  width: 13px;
-                  height: 13px;
-                  // margin-bottom: 11px;
-                  cursor: pointer;
-                  display: inline-block;
-                  position: absolute;
-                  // right: -4px;
-                  right: 3px;
-                  top: 2px;
-                }
-            } */
-
       p {
         display: inline-block;
         margin: 0 6px;
         vertical-align: top;
-
         span {
           border-bottom: 1px dashed #333;
           box-sizing: border-box;
           margin-right: 0;
           display: inline-block;
-          // width: 140px;
         }
       }
     }
 
     .assistName {
-      // height: 20px;
-      // line-height: 20px;
       box-sizing: border-box;
-      float: left;
+      // float: left;
       position: relative;
       span {
         font-size: unset;

+ 72 - 0
src/components/AddInspect/InspectName/index.jsx

@@ -0,0 +1,72 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import edit1 from "@common/images/edit1.png";
+import edit2 from "@common/images/edit2.png";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+class InspectName extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      isEdit: false,
+      value:''
+    };
+    this.handleInput = this.handleInput.bind(this)
+    this.handleBlur = this.handleBlur.bind(this)
+    this.handleEdit = this.handleEdit.bind(this)
+  }
+  componentDidMount(){
+    const {item} = this.props
+    this.setState({
+      value:item.inpValue
+    })
+    this.refs.iptTip.getDOMNode().value = item.inpValue
+  }
+  handleEdit(){
+    this.setState({
+      isEdit:true
+    },()=>{
+      this.refs.iptTip.getDOMNode().focus()
+    })
+  }
+  handleBlur(){
+    let val = this.state.value
+    if (val) return
+    this.setState({
+      isEdit:false
+    })
+  }
+  handleInput(e){
+    const {setTipValue,idx} = this.props
+    this.setState({
+      value:e.target.value
+    })
+    this.props.setTipValue(idx,e.target.value)
+  }
+  render(){
+    const {item,getInfomation,idx,handleLabelSub} = this.props
+    return item.show ? <p className={styles.staticTagActive}>
+        <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </span>
+        {
+          item.inpValue||this.state.isEdit?<div className={styles.iptTipWrap}>
+            <input 
+            ref="iptTip"
+            onBlur={this.handleBlur}
+            onInput={this.handleInput}
+            className={styles.iptValue}
+            type="text"/>
+            <i></i>
+          </div>:<span className={styles.iptValueBtn} onClick={this.handleEdit}>点击备注</span>
+        }
+    </p>:
+    <p >
+        <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </i>
+    </p>
+  }
+}
+export default InspectName;

+ 246 - 0
src/components/AddInspect/InspectName/index.less

@@ -0,0 +1,246 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  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;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 3px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}
+.iptTipWrap {
+    display: inline-block;
+    i {
+        display: inline-block;
+        width: 10px;
+        height: 10px;
+        background: url('../../../common/images/edit1.png') no-repeat;
+    }
+}

+ 4 - 4
src/components/AddInspect/SlideExcel/index.less

@@ -41,7 +41,7 @@
 
 .table {
   color: #000;
-  width: 80%;
+  width: 100%;
   // display: inline-block;
   tr {
     line-height: 18px;
@@ -102,15 +102,14 @@
     padding: 2px 0px;
     border-bottom: 1px dashed #989DA3;
     .excelDataTitle {
-        display: inline-block;
-        width: 20%;
+        width: 100%;
         vertical-align: top;
         padding-left: 10px;
         float: left;
         color: #000;
     }
     table {
-        width: 80%;
+        width: 100%;
         tr {
             height: 16px;
             line-height: 16px;
@@ -119,6 +118,7 @@
         td {
             text-align: left;
             padding-top: 6px;
+            padding-left: 10px;
             cursor: default;
         }
         .excelUnit {

+ 16 - 3
src/components/AddInspect/SlideSelect/index.jsx

@@ -7,6 +7,7 @@ import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import date1 from '../img/date1.png';
 import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -94,7 +95,7 @@ class SlideSelect extends Component {
     })*/
   }
   render() {
-    const {windowWidth,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
+    const {windowWidth,handleFillShow,setTipValue,setHighter,refreshScroller,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
     let staticTime = {}
@@ -122,7 +123,16 @@ class SlideSelect extends Component {
     const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
       <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
-        {
+        <InspectName 
+          item={item} 
+          handleLabelSub={this.handleLabelSub} 
+          idx={idx} 
+          getInfomation={getInfomation} 
+          refreshScroller={refreshScroller} 
+          setHighter={setHighter} 
+          setTipValue={setTipValue}
+          handleFillShow={handleFillShow}></InspectName>
+        {/* {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
@@ -130,6 +140,9 @@ class SlideSelect extends Component {
                   {item.name}
                   <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
+                {
+                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
+                }
             </p>:
             <p >
                 <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
@@ -137,7 +150,7 @@ class SlideSelect extends Component {
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
-        }
+        } */}
 
         {
           item.details && item.details.map((val)=>{

+ 26 - 4
src/components/AddInspect/SlideSelect/index.less

@@ -51,12 +51,12 @@
 .staticTagActive {
     cursor: pointer;
     color: #333;
-    display: inline-block;
+    // display: inline-block;
     position: relative;
     vertical-align: top;
-    padding: 2px 10px;
+    padding: 2px 10px 10px 10px;
     box-sizing: border-box;
-    width: 20%;
+    width: 100%;
     float: left;
     span {
         border-bottom: 1px solid #666666 ;
@@ -79,7 +79,7 @@
 }
 .table {
     color: #000;
-    width: 80%;
+    width: 100%;
     tr {
         line-height: 18px;
         height: 18px;
@@ -94,6 +94,10 @@
           }
         }
     }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
 }
 
 .searchResult {
@@ -209,4 +213,22 @@
     .imgInfo, .imgInfo1 {
         display: block;
       }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
 }

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

@@ -330,7 +330,7 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
     const contStyle={
@@ -403,6 +403,7 @@ class Inspect extends React.Component {
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
                   setHighter={setHighter}
+                  setTipValue={setTipValue}
                 ></SlideSelect>
               })
             }

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

@@ -208,7 +208,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    const {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -286,6 +286,7 @@ class Inspect extends React.Component {
               inspectVal={inspectVal}
               windowHeight={windowHeight}
               windowWidth={windowWidth}
+              setTipValue={setTipValue}
             >
             </AddInspect>
           </div>

+ 5 - 1
src/containers/Inspect.js

@@ -15,7 +15,8 @@ import {
   delExcelLis,
   clearLabel,
   delPartItem,
-  setContext
+  setContext,
+  setTip
 } from '@store/actions/inspect';
 import {
   billing,
@@ -75,6 +76,9 @@ function mapDispatchToProps(dispatch, store) {
     delPartItem(idx) {
       dispatch(delPartItem(idx))
     },
+    setTipValue(idx,value) {
+      dispatch(setTip(idx,value))
+    },
     //右侧推送
     fetchPushInfos() {
       //调右侧推送

+ 6 - 1
src/store/actions/inspect.js

@@ -1,4 +1,4 @@
-import {SET_CONTEXT,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';
+import {SET_CONTEXT,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,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 setLabel = (idx,sign) => ({          //搜索后点击选中的结果
     type:SET_LABEL,
@@ -63,3 +63,8 @@ export const setContext = (obj) => ({
     type:SET_CONTEXT,
     obj
 })
+export const setTip = (idx,value) => ({
+    type:SET_TIP,
+    idx,
+    value
+})

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

@@ -36,15 +36,11 @@ export const getSublableList = (id,idx) => {
             const data = res.data.data;
             if (data.controlType == 0) {
                 dispatch(resetLabel(data.questionMapping,data.uniqueName||''));
-            }else if(data.controlType == 1){
+            }else if(data.controlType == 1||data.controlType == 6){
                 let arr = [];
                 arr[0] = data;
                 dispatch(resetLabel(arr));
-            }else if(data.controlType == 6) {
-                let arr =[];
-                arr[0] = data;
-                dispatch(resetLabel(arr));
-            } 
+            }
         })
     }
 };

+ 13 - 1
src/store/reducers/inspect.js

@@ -10,7 +10,8 @@ import {
     DEL_PART_ITEM,
     DEL_EXCEL_LIST,
     ADD_LABEL,
-    SET_CONTEXT
+    SET_CONTEXT,
+    SET_TIP
 } from '../types/inspect';
 import store from '@store';
 import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
@@ -66,6 +67,7 @@ export default (state = initSearchList, action) => {
         const tempArr = newState.labelList;
         tempArr[tempArr.length-1].details = action.list;
         tempArr[tempArr.length-1].uniqueName = action.uniqueName;
+        tempArr[tempArr.length-1].inpValue = '';
         return newState;
     } 
     if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上
@@ -175,6 +177,16 @@ export default (state = initSearchList, action) => {
         newState.context = action.obj
         return newState;
     }
+    if (action.type == SET_TIP) {    
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelList;
+        for(let i = 0;i < tempArr.length;i++){
+            if(action.idx == i){
+                tempArr[i].inpValue=action.value
+            }
+        }
+        return newState;
+    }
     return state;
 }
 

+ 1 - 0
src/store/types/inspect.js

@@ -12,3 +12,4 @@ export const DEL_PART_ITEM = 'DEL_PART_ITEM';
 export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
 export const SET_CONTEXT = 'SET_CONTEXT';
+export const SET_TIP = 'SET_TIP';