فهرست منبع

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

# Conflicts:
#	src/components/DiagnosticList/index.jsx
liucf 6 سال پیش
والد
کامیت
bd44119ec7

+ 4 - 2
src/common/js/func.js

@@ -102,6 +102,7 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
     cNum = i;
     value = it.value||'';
     textLabel = !ifEmpty&&i==0?Object.assign({},JSON.parse(config.textLabel),{showInCheck:true}):JSON.parse(config.textLabel);
+    //n个显示的标签最后一个标签后面要落关标,所以+1
     _textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
     if(i===0){
       //第一个标签不是文本标签时在前面添加文本标签
@@ -119,7 +120,7 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       }
       saveText.push(tempText);
       // 模板只有一个标签时第一项后面也要加空标签
-      if(arr.length==1){
+      if(arr.length==1&&notText){
         newArr.push(textLabel);
         saveText.push('');
       }
@@ -155,7 +156,8 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       }
       if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
         //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
-        newArr.push(ifEmpty?textLabel:_textLabel);
+        const _text = arr.length>config.showCheckNum?JSON.parse(config._textLabel):_textLabel;
+        newArr.push(ifEmpty?textLabel:_text);
         saveText.push("");
       }
     }

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

@@ -113,6 +113,7 @@
         td {
             text-align: left;
             padding-top: 6px;
+            cursor: default;
         }
         .excelUnit {
             width: auto;
@@ -157,6 +158,7 @@
   left: 50%;
   margin-left: -8px;
   display: none;
+  cursor: pointer;
 }
 .imgInfo:hover {
   background: url('../img/info3.png') no-repeat center center;

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

@@ -83,7 +83,8 @@
         height: 18px;
         width: 100%;
         td {
-            padding-top: 3px;
+          cursor: default;
+          padding-top: 3px;
         }
     }
 }
@@ -130,6 +131,7 @@
             td {
                 text-align: left;
                 padding-top: 6px;
+                cursor: default;
             }
             .excelUnit {
                 width: auto;
@@ -175,6 +177,7 @@
   left: 50%;
   margin-left: -8px;
   display: none;
+  cursor: pointer;
 }
 .imgInfo:hover {
   background: url('../img/info3.png') no-repeat center center;

+ 19 - 17
src/components/AddInspect/index.jsx

@@ -206,23 +206,25 @@ class Inspect extends React.Component {
             return (
               <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
                 <span className={styles.itemPartL}>{item.name}</span>
-                <select className={styles.itemPartR} onChange={(e) => {
-                  if (e.target.value == '请选择') {
-                    this.changeActivePart(idx, '')
-                    return;
-                  }
-                  this.changeActivePart(idx, e.target.value);
-                }}
-                >
-                  <option value="请选择">请选择</option>
-                  {
-                    (item.questionDetailList).map((val) => {
-                      return <option value={val.name}
-                        selected={val.name == item.value ? true : false}
-                      >{val.name}</option>
-                    })
-                  }
-                </select>
+                <span className={styles.itemPartT}>
+                  <select className={styles.itemPartR} onChange={(e) => {
+                    if (e.target.value == '请选择') {
+                      this.changeActivePart(idx, '')
+                      return;
+                    }
+                    this.changeActivePart(idx, e.target.value);
+                  }}
+                  >
+                    <option value="请选择">请选择</option>
+                    {
+                      (item.questionDetailList).map((val) => {
+                        return <option value={val.name}
+                          selected={val.name == item.value ? true : false}
+                        >{val.name}</option>
+                      })
+                    }
+                  </select>
+                </span>
               </li>
             )
           } else if (item.controlType == 6) {

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

@@ -147,7 +147,8 @@
     .itemPartR {
         width: 62px;
         outline: none;
-        float: right;
+        float: left;
+        margin-top: 5px;
     }
     .itemPartT {
         float: right;

+ 4 - 4
src/components/DiagnosticItem/index.jsx

@@ -42,9 +42,9 @@ class DiagnosticItem extends Component{
     chooseDiagodal(item) {
         const { diagnosticList,getTips, type } = this.props;
         // getTips && getTips(item);
-        if (type == 'search') {
-            getTips && getTips({id:item.id,type:7});
-        }
+        // if (type == 'search') {  //现在搜索点击也不展示提示信息
+        //     getTips && getTips({id:item.id,type:7});
+        // }
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
@@ -124,7 +124,7 @@ class DiagnosticItem extends Component{
         const { visible,hasEnterItem,hasEnterImg } = this.state
         const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
-                    <span className={style['diag-name']} 
+                    <span className={`${style['diag-name']} ${type == 'search' ? style['diag-name-search'] : ''}`} 
                           title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}

+ 5 - 0
src/components/DiagnosticItem/index.less

@@ -9,6 +9,11 @@
     display: inline-block;
     width: 100%;
 }
+.diag-name-search {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
 .diag-name {
     position: relative;
     display: inline-block;

BIN
src/components/DiagnosticList/img/delete-on.png


+ 14 - 2
src/components/DiagnosticList/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import del_icon from './img/delete.png'
+import del_on from './img/delete-on.png'
 import diagUp from './img/diagUp.png'
 import diagDown from './img/diagDown.png'
 import printIcon from '@common/images/team.png';
@@ -33,6 +34,7 @@ class DiagnosticList extends Component {
             isAssessConfirm:false,
             radioVal:{},  //可能结果选择内容
             possible:{},  //可能结果
+            hasOndel: false
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -233,9 +235,19 @@ class DiagnosticList extends Component {
           })
       }
     }
+    handleEnterDel() {
+      this.setState({
+        hasOndel: true
+      })
+    }
+    handleLeaveDel() {
+      this.setState({
+        hasOndel: false
+      })
+    }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading} = this.props;
-        const { visible, treatTitle ,showAssess, isAssessConfirm, radioVal, possible,assessId,disName} = this.state;
+        const { visible, treatTitle ,showAssess, isAssessConfirm, radioVal, possible,assessId,disName, hasOndel} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         const chronicLine = chronicMagItem&&chronicMagItem.name;     //当前是否走的慢病流程
         let isChronic = false;      //是否要显示管理评估
@@ -264,7 +276,7 @@ class DiagnosticList extends Component {
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
                                     </span>:''}
-                                    <img className={style['diag-del']} src={del_icon} onClick={()=>{this.handleDeleteItem(item)}}/>
+                                    <img className={style['diag-del']} src={hasOndel ? del_on : del_icon} onMouseEnter={this.handleEnterDel.bind(this)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
                         </div>)
                     })}
                      {treatment&&<Treat title={treatTitle}></Treat>}

+ 12 - 6
src/store/async-actions/assistCheck.js

@@ -2,7 +2,7 @@ import axios from '@utils/ajax';
 import store from '@store';
 import { searchList } from '../actions/assistCheck';
 import { SET_TIPS } from '../types/pushMessage';
-
+import { Notify} from '@commonComp';
 
 export const getSearchList = (val) => {
     if(val.trim() == ''){
@@ -34,11 +34,17 @@ export const getInstroduce = (id,name)=>{    //获取辅检的提示信息
         position: 1
     })
     .then((data)=>{
-        dispatch({
-          type: SET_TIPS,
-          tips: data.data.data,
-          tmpFlg:'midPart'
-      })          
+        if(data.data.code == 0) {
+            dispatch({
+                type: SET_TIPS,
+                tips: data.data.data,
+                tmpFlg:'midPart'
+            }) 
+        } else {
+            Notify.info(data.data.msg||'暂无提示信息')
+        }
+
+                 
     }).catch((e) => {
         console.log(e)
     })

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

@@ -3,6 +3,7 @@ import store from '@store';
 
 import { searchList,resetLabel } from '../actions/inspect';
 import { SET_TIPS } from '../types/pushMessage';
+import { Notify} from '@commonComp';
 
 export const getSearchList = (val) => {
     if(val.trim() == ''){
@@ -71,11 +72,15 @@ export const getInstroduce = (id,name,type)=>{    //获取化验的提示信息
   return (dispatch, getState) =>{
     axios.json(url, param)
     .then((data)=>{
-        dispatch({
-          type: SET_TIPS,
-          tips: data.data.data,
-          tmpFlg:'midPart'
-        })          
+      if(data.data.code == 0) {
+          dispatch({
+              type: SET_TIPS,
+              tips: data.data.data,
+              tmpFlg:'midPart'
+          }) 
+      } else {
+          Notify.info(data.data.msg||'暂无提示信息')
+      }        
     }).catch((e) => {
         console.log(e)
     })

+ 9 - 4
src/store/async-actions/pushMessage.js

@@ -110,10 +110,15 @@ export const billing = (mdata,boxMark) => {
         }
         json(url, params)
         .then((data)=>{
-                dispatch({
-                    type: SET_TIPS,
-                    tips: data.data.data
-                })
+                if(data.data.code == 0) {
+                    dispatch({
+                        type: SET_TIPS,
+                        tips: data.data.data
+                    })
+                } else {
+                    Notify.info(data.data.msg||'暂无提示信息')
+                }
+                
         }).catch((e) => {
             console.log(e)
         })