Selaa lähdekoodia

Merge branch 'dev/new1' into innterfaceUpdate

luolei 5 vuotta sitten
vanhempi
commit
9cae14b821

BIN
src/common/images/icon-current.png


+ 7 - 266
src/components/AssessResult/ScaleItem/index.jsx

@@ -2,11 +2,7 @@ import React, { Component } from "react";
 import style from "../index.less";
 import deleteIcon from '@common/images/delete.png';
 import deleteIconNo from '@common/images/delete_no.png';
-import allTableIcon from '@common/images/all-table.png';
-import level1 from "@common/images/级别1.png";
-import checkIcon from '@common/images/check.png';
 import {ComplexModal,MiniToast,Radio} from '@commonComp';
-import Notify from '@commonComp/Notify';
 import {deepClone,preventDefault} from '@utils/tools';
 import { getFormulaResult } from '@store/async-actions/fetchModules'
 /**
@@ -17,171 +13,15 @@ class ScaleItem extends Component {
   constructor(props) {
     super(props);
     this.$area = React.createRef();
-    const {result}= props;
-    let radioVal = result&&result.radioVal;
     this.state = {
-      scaleId:'',
-      scaleName:'',
-      parentId:'',
-      showScale:false,
-      optionId:'',
-      radioVal:Object.assign({},radioVal)||{},
-      formulaId:'',
       text:props.text,
-      isCalculated:false,
-      calcuValues:deepClone(props.calcuValues),   //计算公式填的值
     };
     this.getItems = this.getItems.bind(this);
     this.getDetailItems = this.getDetailItems.bind(this);
-    this.showOption = this.showOption.bind(this);
-    this.closeOption = this.closeOption.bind(this);
-    this.closeFormula = this.closeFormula.bind(this);
-    this.handleInputformula =this.handleInputformula.bind(this);
-  }
-  showOption(id){
-    this.setState({
-      optionId: id,
-      formulaId: ''
-    })
-  }
-  closeOption(){
-    const {result} = this.props;
-    const possible=result&&result.possible;
-    let {radioVal} = this.state;
-    this.setState({
-      radioVal:Object.assign({},radioVal,possible),
-      optionId:null,
-    });
-  }
-  confirmOption(){
-    const {handleRes} = this.props;
-    const {radioVal} = this.state;
-    handleRes&&handleRes({
-      possible:Object.assign({},radioVal),
-      radioVal:Object.assign({},radioVal),//不设置radioVal只有最近一次选中的值
-    });
-    this.setState({
-      optionId:null,
-    });
-  }
-  handleShowScale(item){
-    const {showScaleFn,closeAssess} = this.props;
-    //closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item,true);
-  }
-  handleRadio(item,parent){
-    let {result} = this.props;
-    let radioVal = result&&result.radioVal;
-    this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
-    })
-  }
-  handleReg(e){   //只能输入数字和特殊符号
-    const key = e.key;
-    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      preventDefault(e);
-    }
-  }
-  handleInputformula(id,calcuContent,i,e) {
-    const { calcuResult,handleCalcu } = this.props;
-    const {calcuValues} = this.state;
-    let obj = deepClone(calcuValues);
-    let values = (obj&&obj[id])||deepClone(calcuContent);
-    const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
-    obj[id] = values;
-    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
-      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
-    }
-    this.setState({
-      isCalculated:false,
-      calcuValues:obj
-    });
-    handleCalcu&&handleCalcu(id,values,calcuResult);
-  }
-  handleForRadio(id,calcuContent,i,fidx){//计算公式
-    const { calcuValues } = this.state;
-    let obj = deepClone(calcuValues);
-    let values = (obj&&obj[id])||deepClone(calcuContent);
-    let details = values[i].details;
-    for(let x=0;x<details.length;x++){
-      if(x!=fidx){
-        details[x].state=0;
-      }else{
-        details[x].state=1;
-      }
-    }
-    obj[id] = values;
-    this.setState({
-      isCalculated:false,
-      calcuValues:obj
-    });
-  }
-  showFormula(id){
-    this.setState({
-      formulaId: id,
-      optionId: ''
-    });
-  }
-  closeFormula(){
-    if(this.state.isCalculated){
-      this.setState({
-        formulaId:null,
-      });
-    }else{
-      this.setState({
-        formulaId:null,
-        calcuValues:deepClone(this.props.calcuValues)
-      });
-    }
-  }
-  calcuFormula(item) { //计算公式计算
-    const { calcuResult,handleCalcu } = this.props;
-    const {calcuValues,formulaId} = this.state;
-    let it=calcuValues&&deepClone(calcuValues[formulaId]);
-    let allHasInfo = true;
-    for (let i = 0; i < it.length; i++) {
-      if(it[i].controlType == 2) {  //输入框类型的有没有填值
-        if(!it[i].value) {
-          allHasInfo = false
-        }
-      } else if(it[i].controlType == 0) {
-        let hasSelect = false;
-        for( let z = 0; z <it[i].details.length; z++) {
-          if(it[i].details[z].state == 1) {
-            hasSelect= true
-          }
-        }
-        if(!hasSelect) {
-          allHasInfo = false
-        }
-      }
-    }
-    const itemCopy = deepClone(item)
-    itemCopy.content.details = calcuValues[formulaId]
-    // item.content.details = calcuValues[formulaId];
-    if(allHasInfo) { //所有都有值,则计算
-      let results = deepClone(calcuResult);
-      getFormulaResult({type:2,data:itemCopy}).then((res)=>{
-        if(+res.data.code==0){
-          const result = res.data.data.result;
-          results[formulaId] = result;
-          handleCalcu&&handleCalcu(formulaId,calcuValues[formulaId],results);
-          this.setState({
-            isCalculated:true
-          });
-        }else{
-          Notify.error(res.data.msg||'计算没有结果返回');
-        }
-      })
-    } else {  //不是所有值都填过了
-      Notify.info('请填写计算公式内容')
-    }
   }
   getDetailItems(item,i){
     let arr = [],temp='';
-    const {indexs,result,formulaResult,disabled,calcuValues,calcuResult} = this.props;
-    const {optionId,formulaId,radioVal} = this.state;
+    const {indexs,result,formulaResult,disabled,calcuResult} = this.props;
     const possible=result&&result.possible;
     item.details.map((its,j)=>{
       let it=its;
@@ -190,108 +30,20 @@ class ScaleItem extends Component {
           let scaleRes=formulaResult&&formulaResult[it.content.conceptId]&&formulaResult[it.content.conceptId].calcalculate;
           const name = scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】';
           temp =<span className={style['scale']}
-                      title={name}
-                      onClick={this.handleShowScale.bind(this,it.content)}>
+                      title={name}>
                         {name}
                         </span>;
         }else if(its.type==2){      //计算公式
           const showRes = calcuResult&&calcuResult[item.conceptId]||it.content.result;
-          const details = calcuValues&&calcuValues[item.conceptId]||it.content.details;
-
           const cresult = showRes&&showRes[1]&&showRes[1].text;
                     temp = <div className={style['results']}>
-                    <span>计算公式结果:</span>
-                    <span className={style["blue"]} style={disabled?{cursor:'default'}:''} onClick={disabled?'':this.showFormula.bind(this,item.conceptId,it)}>{cresult?cresult:'请选择'}</span>
-                      {disabled?'':<img src={level1} />}
-                      {disabled?'':<MiniToast title={it.content.name}
-                               confirmText='关闭'
-                               icon={allTableIcon}
-                               show={formulaId&&formulaId==item.conceptId?true:false}
-                               close={this.closeFormula}
-                               confirm={this.closeFormula}
-                               footer="true">
-                      <table>
-                        {details.map((item1,idd)=>{
-                          if(item1.controlType==0){//单选
-                            return <tr>
-                              <td>
-                                <span>{item1.isShow == '0' ? item1.name+':' : '请选择'+item1.name+':'}</span>
-                              </td>
-                              <td>
-                              {Array.isArray(item1.details)&&item1.isShow == '0'&&item1.details.map((ii,ind)=>{
-                                return ii.state == 1 && <div className={style["chooseItem"]}>
-                                          {ii.detailName}
-                                      </div>
-                              })}
-                              {Array.isArray(item1.details)&&item1.isShow != '0'&&item1.details.map((ii,ind)=>{
-                                return <div className={style["chooseItem"]}>
-                                        <Radio label={ii.detailName}
-                                                  isSelect={ii.state == 1}
-                                                  handleClick={this.handleForRadio.bind(this,item.conceptId,details,idd,ind)}>
-                                          </Radio>
-                                      </div>
-                              })}          
-                                
-
-                               
-                              </td>
-                            </tr>
-                          }else if(item1.controlType==2){//输入框
-                            
-                            return <tr>
-                              <td>
-                                <span>{item1.isShow == '0' ? item1.name+':':'请输入'+item1.name+':'}</span>
-                              </td>
-                              <td>
-                                {item1.isShow == '0' ? item1.value + ' ' +item1.uint : <input type="text" placeholder="请输入"  value={item1.value} onKeyDown={this.handleReg.bind(this)} onInput={(e)=>this.handleInputformula(item.conceptId,details,idd,e)}/>}
-                              </td>
-                              <td>
-                                {item1.isShow != '0'&&<span>{item1.uint}</span>}  
-                              </td>
-
-                            </tr>
-                          }
-                        })}
-                      </table>
-                      <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,its)}>计算</div>
-                      <table>
-                        {showRes && Array.isArray(showRes) &&showRes.map((itemResult) => {
-                          return <tr>
-                            <td>
-                              <span>{itemResult.name+':'}</span>
-                            </td>
-                            <td>
-                              <span>{itemResult.text}</span>
-                            </td>
-                          </tr>
-                        })}
-                      </table>
-                    </MiniToast>}
+                    <span>患者可能有:</span>
+                    <span className={style["blue"]}>{cresult}</span>
                 </div>
         }else if(its.type==3){
           temp = <div className={style['results']}>
                     <span>可能结果:</span>
-                    <span onClick={disabled?'':this.showOption.bind(this,item.conceptId)} style={disabled?{cursor:'default'}:''} className={style["blue"]}>{possible&&possible[item.conceptId]?possible[item.conceptId]:'请选择'}</span>
-                    {disabled?'':<img src={level1} />}
-                    {disabled?'':<MiniToast title='结果选择'
-                         icon={checkIcon}
-                         show={optionId&&optionId==item.conceptId?true:false}
-                         close={this.closeOption}
-                         confirm={this.confirmOption.bind(this,item.conceptId)}
-                         footer={true}>
-                        <div className={style["infoOption"]}>
-                          <span>{it.content.name?it.content.name+':':''}</span>
-                          {it.content.details&&it.content.details.map((lis,ind)=>{
-                            return <div className={style["chooseItem"]}>
-                              <Radio label={lis.detailName}
-                                     isSelect={radioVal&&radioVal[item.conceptId]==lis.detailName||(Object.keys(radioVal).length===0&&lis.state==1)}
-                                     handleClick={this.handleRadio.bind(this,lis,item,i)}>
-                              </Radio>
-                              {/*{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}*/}
-                            </div>
-                          })}
-                        </div>
-                    </MiniToast>}
+                    <span className={style["blue"]}>{possible[item.conceptId]}</span>
                   </div>;
         }
         const passId = item.details[j].type==1?item.details[j].content.conceptId:undefined;
@@ -317,16 +69,6 @@ class ScaleItem extends Component {
       return this.getDetailItems(it,i);
     });
   }
-  getScaleContent(data){
-    if(!data){
-      return null;
-    }
-    const item = data&&data.find((it)=>{
-      return it.type==1;
-    });
-    const content = JSON.parse(item.content||null);
-    return {conceptId:item.conceptId,content,name:content.scaleName};
-  }
   getScales(){
     const {scaleItems,disabled,formulaResult} = this.props;
     let li='',temp='',arr=[],it={};
@@ -334,14 +76,13 @@ class ScaleItem extends Component {
       return '';
     };
     for( let i in scaleItems){
-      it = {conceptId:i,name:scaleItems[i].name};//this.getScaleContent(scaleItems[i].data);
+      it = {conceptId:i,name:scaleItems[i].name};
       if(!it) continue;
       let scaleRes=formulaResult&&formulaResult[it.conceptId]&&formulaResult[it.conceptId].calcalculate;
       const name = scaleRes&&scaleRes.result?(' 【'+scaleItems[i].name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+scaleItems[i].name+'】';
       //这里onClick不能用箭头函数,用箭头函数会一直绑定for的最后一个it
       temp =<span className={style['scale']}
-                  title={name}
-                  onClick={this.handleShowScale.bind(this,it)}>{name}</span>;
+                  title={name}>{name}</span>;
       li = disabled?<li>
         <span className={style['s-title']}>相关量表:</span>
         <div className={style['row']}>{temp}</div>

+ 3 - 34
src/components/AssessResult/index.jsx

@@ -25,19 +25,12 @@ class AssessResult extends Component {
       wholeAssessText:props.wholeAssessText||{},     //整体评估补充说明
       wholeResults: wholeResults,
       calcuResult:props.calcuResult,     //计算公式结果
-      calcuValues:props.calcuValues,    //计算公式填的值
       addedScaleIds:props.addedScaleIds,    //已加入量表的id
     };
     this.handleChooseChange = this.handleChooseChange.bind(this);
     this.handleScaleDel = this.handleScaleDel.bind(this);
     this.handleScaleText = this.handleScaleText.bind(this);
-    this.handleResult = this.handleResult.bind(this);
   }
-  /*componentWillMount(){
-    const {disId,disName,getAssess} = this.props;
-    //获取评估
-    getAssess&&getAssess(disId,disName);
-  }*/
   handleScaleText(text){
     const {disName} = this.props;
     const obj = Object.assign({},this.state.wholeAssessText);
@@ -70,15 +63,6 @@ class AssessResult extends Component {
       });
     }
   }
-  handleResult(opt){
-    const {wholeResults} = this.state.wholeResults;
-    const {savePossibleRes} = this.props;
-    const res = Object.assign({},wholeResults,opt);
-    this.setState({
-      wholeResults:res
-    });
-    savePossibleRes && savePossibleRes(res);
-  }
   handleChooseChange(i,selects){
     const {chooseSelecteds} = this.state;
     this.setState({
@@ -91,15 +75,6 @@ class AssessResult extends Component {
       chartTimeTypes:Object.assign(chartTimeTypes,{[i]:selects})
     });
   }
-  handleCalcu(id,values,ret){
-    const {saveCalcuValue,saveCalcuResult}=this.props;
-    this.setState({
-      calcuResult:ret,
-      calcuValues:{[id]:values}
-    });
-    saveCalcuResult&&saveCalcuResult(ret);
-    saveCalcuValue&&saveCalcuValue(values, id);
-  }
   componentWillUnmount(){
     //点确定关闭弹窗时把参数传到父组件去
     const {saveAssessInfos,isAssessConfirm,clearChartData} = this.props;
@@ -121,13 +96,13 @@ class AssessResult extends Component {
     }
   }
   handoutTypes(item,i){
-    const {getIndexData,indexData,timeTypes,wholeIndexs,closeAssess,showScaleFn,chronicPushItems,
+    const {getIndexData,indexData,timeTypes,wholeIndexs,chronicPushItems,
       formulaResult,indexNames,disName} =this.props;
     let obj = [];
     Object.keys(wholeIndexs).map((i)=>{
       obj[i]=chronicPushItems[i];
     });
-    const {chooseSelecteds,wholeAssessItems,wholeScaleItems,wholeAssessText,chartTimeTypes,wholeResults,calcuResult,calcuValues} = this.state;
+    const {chooseSelecteds,wholeAssessItems,wholeScaleItems,wholeAssessText,chartTimeTypes,wholeResults,calcuResult} = this.state;
     const chartData = indexData;
     const name = item.regionName+":";
     const list = item.data&&item.data.rows;
@@ -137,18 +112,12 @@ class AssessResult extends Component {
                           data={obj}
                           handleRemove={this.handleScaleDel}
                           handleInp={this.handleScaleText}
-                          handleRes={this.handleResult}
-                          handleCalcu={this.handleCalcu.bind(this)}
                           text={wholeAssessText[disName]}
                           indexs={wholeAssessItems}
                           scaleItems ={wholeScaleItems}
                           result={wholeResults}
-                          showScaleFn={showScaleFn}
                           calcuResult={calcuResult}
-                          calcuValues={calcuValues}
-                          formulaResult={formulaResult}
-                          chronicPushItems={chronicPushItems}
-                          closeAssess={closeAssess}></ScaleItem>;
+                          formulaResult={formulaResult}></ScaleItem>;
       case 1:     //数据来源于大数据
         return <ChooseItem title={name}
                            data={list}

+ 0 - 2
src/components/AssessResult/index.less

@@ -57,7 +57,6 @@
     .scale{
       display: inline-block;
       color: @blue;
-      cursor: pointer;
       white-space: nowrap;
       max-width: 100%;
       overflow: hidden;
@@ -66,7 +65,6 @@
     }
     .blue{
       color:#3B9ED0;
-      cursor: pointer;
     }
     .blue + img{
       vertical-align: middle;

+ 5 - 4
src/components/Banner/index.jsx

@@ -107,7 +107,7 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
+    const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
@@ -121,10 +121,10 @@ class Banner extends Component {
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       <i>本科室近期全部病历</i>
                     </div>:''}
-          <div className={style.prec} onClick={()=>preShow(show)}>
+          {pre == 1?<div className={style.prec} onClick={()=>preShow(show)}>
             <img className={style["st"]} src={prec} alt="预问诊"/>
             <i> 预问诊信息</i>
-          </div>
+          </div>:null}
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
             <i> 设置</i>
@@ -157,7 +157,8 @@ const mapStateToProps = function(state){
   return {
     ifShow:sysConfig.general_show,
     deptName:message.selfDeptName,
-    show:state.preIcss.preShow
+    show:state.preIcss.preShow,
+    pre:sysConfig.connect_prec
   }
 }
 

+ 12 - 12
src/components/ChronicInfo/index.jsx

@@ -156,8 +156,8 @@ class ChronicInfo extends React.Component{
   // 量表明细-关闭,isClose是否是点击关闭按钮
   closeTable(isClose){
     const {scaleParam} = this.state;
-    const {showHide,chronicMagItem} = this.props;
-    if(!showHide.isPop){
+    const {showHide} = this.props;
+    //if(!showHide.isPop){    //管理评估中点开的量表,按钮显示为确定,不可加入病例
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
       // innerHTML 兼容FF26
       const res = this.$result.current&&(this.$result.current.innerText||this.$result.current.innerHTML);
@@ -165,11 +165,11 @@ class ChronicInfo extends React.Component{
         Notify.info("请先计算量表结果!");
         return ;
       }
-      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);   //是慢病流程才能加入病例
+      !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
       this.setState({
         scaleParam:{}
       });
-    }
+    //}
     this.props.hideList({name:'showTable',value:false});
   }
   // 非计分量表确定-延时关闭->量表存值
@@ -248,12 +248,12 @@ class ChronicInfo extends React.Component{
     addAssessItem(v,pIndex,i);
   }
   addFormula(it,v,pIndex,i){
-    const {chronicMagItem, setCalcuInfo} = this.props;
+    const {setCalcuInfo} = this.props;
     this.closeFormula(it);
     const itCopy = deepClone(it)
     const vCopy = deepClone(v)
     setCalcuInfo && setCalcuInfo(v.conceptId,itCopy.content.details,itCopy.content.result)
-    chronicMagItem&&this.handleAddAssessItem(vCopy,pIndex,i);
+    this.handleAddAssessItem(vCopy,pIndex,i);
   }
   handleInputformula(id,calcuContent,i,j,idd,cres,e) {
     // const {calcuValues} = this.state;
@@ -296,7 +296,7 @@ class ChronicInfo extends React.Component{
   }
   confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
-    const {savePossibleResult,chronicMagItem} = this.props;
+    const {savePossibleResult} = this.props;
     if(Object.keys(radioVal).length===0){     //初始状态,可能有推荐选项
       const defaulted = parent.details[i].content.details.filter((it)=>+it.state===1);
       if(defaulted.length>0){
@@ -309,7 +309,7 @@ class ChronicInfo extends React.Component{
       optionId:null,
     });
     savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
-    chronicMagItem&&this.handleAddAssessItem(parent,pIndex,i);
+    this.handleAddAssessItem(parent,pIndex,i);
 
   }
   handleSaveCalcu(obj){
@@ -387,7 +387,7 @@ class ChronicInfo extends React.Component{
     return hasCritical
   }
   getDetail(){
-    const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
+    const {data,formulaResult,calcuResult} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
     /*let names = [];*/
     let list = data&&data.map((v,i)=>{
@@ -443,7 +443,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
                                 icon={allTableIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText='加入管理评估'
                                 show={formulaId&&formulaId==v.conceptId?true:false}
                                 close={this.closeFormula.bind(this,it)}
                                 confirm={this.addFormula.bind(this,it,v,i,j)}
@@ -512,7 +512,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             <MiniToast title='结果选择'
                                 icon={checkIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText='加入管理评估'
                                 show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
                                 confirm={this.confirmOption.bind(this,v,i,j)}
@@ -572,7 +572,7 @@ class ChronicInfo extends React.Component{
     const {comfirnFlag,flag,ff} = this.state;
     const {chronicMagItem,chronicDesease,data,showHide,slideUp} = this.props;
     const scaleFooter = <Footer print={true}
-                                footText={showHide.isPop||!chronicMagItem?"确定":"加入病历记录"}
+                                footText="加入管理评估"
                                 handlePrint={this.onPrint}
                                 handleConfirm={this.comfirnTable}/>;
     if(data&&data.length>0){

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

@@ -258,7 +258,7 @@ class NumberDrop extends Component{
     if(wrBmi!==nextProps.wrBmi&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
       handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
     }
-
+    
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
       return
     }

+ 9 - 14
src/components/PreInIcss/RotateImg/index.jsx

@@ -57,9 +57,9 @@ class RotateImg extends Component {
       mgLeft:-width/2,
       mgTop:-height/2
     },()=>{
-      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left
-      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top
-      localStorage.setItem("changeImg",width>height?overLenT:overLenL)
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handleNext(){
@@ -99,9 +99,9 @@ class RotateImg extends Component {
       mgTop:-height/2,
       de:0
     },()=>{
-      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left
-      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top
-      localStorage.setItem("changeImg",width>height?overLenT:overLenL)
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handlePrev(){
@@ -148,6 +148,9 @@ class RotateImg extends Component {
   }
   handlePlus(){
     const {imgWidth,imgHeight,isMove} = this.state;
+    const { idx,imgLis } = this.props;
+    let width = imgLis[idx].width
+    let height = imgLis[idx].height
     if(this.props.isMove){
       this.setState({
         imgWidth:1.2*imgWidth,
@@ -155,8 +158,6 @@ class RotateImg extends Component {
       })
       return;
     }
-    localStorage.setItem("changeImg",true)
-
     this.setState({
       imgWidth:1.2*imgWidth,
       imgHeight:1.2*imgHeight,
@@ -173,8 +174,6 @@ class RotateImg extends Component {
       })
       return;
     }
-    localStorage.setItem("changeImg",true)
-
     this.setState({
       imgWidth:imgWidth*0.8,
       imgHeight:imgHeight*0.8,
@@ -192,10 +191,6 @@ class RotateImg extends Component {
       deg = deg-0+90
     }
     this.setState({
-      // imgWidth:tmpHeight,
-      // imgHeight:tmpWidth,
-      // mgLeft:-tmpHeight/2,
-      // mgTop:-tmpWidth/2,
       de:deg
     })
   }

+ 1 - 1
src/components/PreviewBody/ItemPart/index.jsx

@@ -4,7 +4,7 @@ import { filterDataArr } from '@utils/tools';
 const ItemPart = (props) => {
   let {dataStr,title,type,dataJson,other_yjs,lastDot} = props;
   if(lastDot){
-    dataStr=dataStr.trim().replace(/;$/g,'');
+    dataStr=dataStr.trim().replace(/;$/g,'');
   }
   return <tr className={style['patInfoFst']}>
     <td className={style['patInfoSec']}>{title}</td>

+ 2 - 0
src/components/PushContainer/index.jsx

@@ -73,6 +73,8 @@ class PushContainer extends Component {
    */
   handleActiveClick(id) {
     if (id == '2') {
+      document.getElementById("searchTmp").value = ""
+      // let searchVal = document.getElementById("searchTmp").value
       store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))

+ 14 - 5
src/components/PushItems/DetailsModal/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from "react";
 import styles from "./index.less";
 import NewPortal from './NewPortal'
 import close from "./../img/close.png";
+import imgCurrent from '@common/images/icon-current.png';
 import $ from "jquery";
 import { imageUrlPrefix } from '@utils/config.js';
 import { dragBox } from '@utils/drag';
@@ -69,10 +70,10 @@ class DetailsModal extends Component {
                         <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && showAllName ? showAllName : tipsDetails &&tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
                         <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
                             {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
-                                return (<div id={item.title}>
+                                return (<div id={item.title} class={styles['details-content-box']}>
                                     <div className={styles['details-content-title-box']} >
                                         <span className={styles['details-content-title-name']}>{item.title}</span>
-                                        <div className={styles['details-content-title-line']}></div>
+                                        <div className={styles['details-content-title-circle-box']}><span className={styles['details-content-title-circle']}></span></div>
                                     </div>
                                     <pre dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre>
                                 </div>)
@@ -82,16 +83,24 @@ class DetailsModal extends Component {
                         <div className={styles['content-menu-box']}>
                             <div className={styles['content-menu-wrapper']}>
                                 <div className={styles['content-menu']}>
-                                    {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
-                                            return (<div>
+                                    <div className={styles['content-menu-border']}>    
+                                        {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
+                                            return (<div class={styles['details-menu-title-wrapper']}>
                                                 <div className={styles['details-menu-title-box']}>
                                                     {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
                                                     <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                                        <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                                        <div className={styles['details-content-menu-circle-box']}>
+                                                            {index !== currentIndex&&<span className={styles['details-content-menu-circle']} ></span>}
+                                                            {index === currentIndex&&<img className={styles['details-content-menu-img']} src ={imgCurrent}/>}
+                                                        </div>
+                                                        {item.title}
                                                     </span>
                                                 </div>
                                             </div>)
                                         })}
+
+                                    </div>
+                                   
                                 </div>
 
                             </div>

+ 57 - 17
src/components/PushItems/DetailsModal/index.less

@@ -38,7 +38,8 @@
     padding: 0 40px;
     height: 50px;
     line-height: 50px;
-    font-size: 24px;
+    font-size: 32px;
+    font-weight: bold;
 }
 
 .details-content-title-box {
@@ -47,22 +48,21 @@
     line-height: 40px;
     font-size: 20px;
 }
+.details-menu-title-wrapper {
+    padding: 0 0 0 15px;
+    position: relative;
+}
 
 .details-content-title-name {
     position: absolute;
+    font-weight: bold;
     background: #fff;
     padding-right: 5px;
-    font-size: 20px;
+    font-size: 22px;
     z-index: 10;
 }
 
-.details-content-title-line {
-    position: absolute;
-    width: 100%;
-    height: 20px;
-    top: 0;
-    border-bottom: 1px dashed #ccc;
-}
+
 .details-close {
     position: absolute;
     right: 0;
@@ -101,32 +101,46 @@
 }
 .content-menu {
     
-    background: #eee;
-    border: 1px solid #eee;
+    background: #F5F6F7;
+    border: 1px solid #F5F6F7;
     width: 160px;
     padding: 15px 18px;
 }
 .details-content-menu-line {
     height: 15px;
     width: 0;
-    border: 1px solid #ccc;
-    background-color: #ccc;
-    margin-left: 4px
+    background-color: #E0E2E3;
+    margin-left: 0px
 }
 .details-content-menu-name {
-    color: #33475f;
+    position: relative;
+    color: #777777;
     font-size: 13px;
     cursor: pointer;
 }
+.details-content-menu-circle-box {
+    display:inline-block;
+    position: absolute;
+    left: -20px;
+    background: #F5F6F7;
+
+}
 .details-content-menu-circle {
+    position: relative;
     display: inline-block;
     width: 8px;
     height: 8px;
     border-radius: 5px;
-    border: 1px solid #ccc;
     margin-top: 5px;
-    background-color: #eee;
+    background-color: #E0E2E3;
     margin-right: 10px;
+   
+}
+.details-content-menu-img {
+    position: relative;
+    z-index: 20;
+    left: -3px;
+    top: 0;
 }
 .details-mask {
     position: fixed;
@@ -139,8 +153,34 @@
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
+.details-content-box {
+    border-left: 1px solid #969C9F;
+    padding: 0 0 0 20px;
+}
+.details-content-title-circle-box {
+   position: absolute;
+   z-index: 10;
+   background: #fff;
+   left: -27px;
+   height: 32px;
+   top: 0px;
+}
+.details-content-title-circle {
+    display: inline-block;
+    width: 12px;
+    height: 12px;
+    border-radius: 50%;
+    background: #3B9ED0;
+    position: relative;
+    top: 2px;
+}
+.content-menu-border{
+    border-left: 2px solid #E0E2E3;
+}
 pre {
     white-space: pre-wrap;
     word-wrap: break-word;
     font-family: inherit;
+    color: #333;
+    margin: 10px 0;
   }

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

@@ -143,8 +143,8 @@ class TemplateItems extends React.Component {
                         </div> :
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
-                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} id='clearTemplateSearch' alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>
                             {
@@ -156,7 +156,7 @@ class TemplateItems extends React.Component {
                     items&&!admin ? 
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" id='templateSearch' maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
                                 {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>

+ 24 - 13
src/components/TreatDesc/DrugInfo/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import close from './../img/close.png';
+import imgCurrent from '@common/images/icon-current.png';
 import $ from "jquery";
 import {dragBoxs} from '@utils/drag'
 import { imageUrlPrefix } from '@utils/config.js';
@@ -56,28 +57,38 @@ class DrugInfo extends Component {
         const { currentIndex } = this.state
         return (<div className={style['drug-info-wrapper']} id="drugWrapper">
                 <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
-                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h3>
+                <h1 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h1>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>
-                    <div className={style['drug-title1']} >{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</div>
+                    {/* <div className={style['drug-title1']} >{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</div> */}
                     {drugInfo.drugDesc.map((item, index) =>{
                         return <div className={style['drug-desc-item']} id={item.title.trim()}>
-                            <div className={style['drug-desc-title']} >{item.title.trim()}</div> 
+                            <div className={style['details-content-title-box']} >
+                                <span className={style['details-content-title-name']}>{item.title}</span>
+                                <div className={style['details-content-title-circle-box']}><span className={style['details-content-title-circle']}></span></div>
+                            </div>
                             <pre className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre> 
                         </div>
                     })}
                     <div className={style['content-menu-box']}>
                         <div className={style['content-menu-wrapper']}>
                             <div className={style['content-menu']}>
-                                {drugInfo.drugDesc.map((item, index) => {
-                                    return (<div >
-                                        <div className={style['details-menu-title-box']}>
-                                            {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
-                                            <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                                <span className={style['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
-                                            </span>
-                                        </div>
-                                    </div>)
-                                })}
+                                <div className={style['content-menu-border']}> 
+                                    {drugInfo.drugDesc.map((item, index) => {
+                                        return (<div class={style['details-menu-title-wrapper']}>
+                                            <div className={style['details-menu-title-box']}>
+                                                {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
+                                                <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
+                                                    <div className={style['details-content-menu-circle-box']}>
+                                                        {index !== currentIndex&&<span className={style['details-content-menu-circle']} ></span>}
+                                                        {index === currentIndex&&<img className={style['details-content-menu-img']} src ={imgCurrent}/>}
+                                                    </div>
+                                                    {item.title}
+                                                </span>
+                                            </div>
+                                        </div>)
+                                    })}
+                                </div>
+                                
                             </div>
                         </div>
                     </div>

+ 67 - 20
src/components/TreatDesc/DrugInfo/index.less

@@ -9,7 +9,7 @@
     top: 10%;
     margin-left: -475px;
     background: #fff;
-    padding: 40px 0 60px;
+    padding: 50px 0 60px;
     box-shadow: 0px 0px 5px -2px #7d7c7c;
     word-break: break-all;
     max-width: 100%;
@@ -35,10 +35,11 @@
     position: absolute;
     top: 0;
     width: 100%;
-    height: 40px;
-    line-height: 40px;
+    height: 50px;
+    line-height: 50px;
+    font-size: 32px;
+    font-weight: bold;
     padding: 0 40px;
-    border-bottom: 1px solid #979797;
     cursor: move;
     moz-user-select: -moz-none;
     -moz-user-select: none;
@@ -48,6 +49,7 @@
     -ms-user-select:none;
     user-select:none;
 }
+
 .close-drug-desc {
     .contentZIndex1;
     position: absolute;
@@ -58,7 +60,8 @@
 }
 .drug-desc-item {
     zoom: 1;
-    padding: 5px 0;
+    border-left: 1px solid #969C9F;
+    padding: 0 0 0 20px;
     &:after{
         content: "";
         display: block;
@@ -70,19 +73,14 @@
 .drug-desc-title {
     display: inline-block;
     font-weight: bold;
-    font-size: 14px;
+    font-size: 22px;
     // height: 100%;
     // float: left;
     // width: 190px;
     // text-align-last:justify;    /*chrome*/
     // text-justify: distribute;   /*ff*/
 }
-.drug-desc-title::before {
-    content: '【'
-}
-.drug-desc-title::after {
-    content: '】'
-}
+
 .drug-title1 {
     height: 60px;
     line-height: 60px;
@@ -92,7 +90,7 @@
 }
 .drug-desc-content {
     /*width: 100%;*/
-    margin: 0px 160px 0px 10px;
+    margin: 10px 160px 10px 10px;
 }
 
 .content-menu-box {
@@ -109,37 +107,86 @@
     height: 100%;
     overflow-y: auto;
 }
+.content-menu-border{
+    border-left: 2px solid #E0E2E3;
+    padding: 0 0 0 15px;
+}
 .content-menu {
     
-    background: #eee;
-    border: 1px solid #eee;
+    background: #F5F6F7;
+    border: 1px solid #F5F6F7;
     width: 160px;
     padding: 15px 18px;
 }
 .details-content-menu-line {
     height: 15px;
     width: 0;
-    border: 1px solid #ccc;
-    background-color: #ccc;
     margin-left: 4px
 }
 .details-content-menu-name {
-    color: #33475f;
+    position: relative;
+    color: #777777;
     font-size: 13px;
     cursor: pointer;
 }
+.details-content-menu-circle-box {
+    display:inline-block;
+    position: absolute;
+    left: -20px;
+    background: #F5F6F7;
+
+}
 .details-content-menu-circle {
+    position: relative;
     display: inline-block;
     width: 8px;
     height: 8px;
     border-radius: 5px;
-    border: 1px solid #ccc;
     margin-top: 5px;
-    background-color: #eee;
+    background-color: #E0E2E3;
     margin-right: 10px;
+   
+}
+.details-content-menu-img {
+    position: relative;
+    z-index: 20;
+    left: -3px;
+    top: 0;
+}
+.details-content-title-circle-box {
+    position: absolute;
+    z-index: 10;
+    background: #fff;
+    left: -27px;
+    height: 32px;
+    top: 0px;
+ }
+ .details-content-title-circle {
+     display: inline-block;
+     width: 12px;
+     height: 12px;
+     border-radius: 50%;
+     background: #3B9ED0;
+     position: relative;
+     top: 2px;
+ }
+ .details-content-title-box {
+    position: relative;
+    height: 40px;
+    line-height: 40px;
+    font-size: 20px;
+}
+.details-content-title-name {
+    position: absolute;
+    font-weight: bold;
+    background: #fff;
+    padding-right: 5px;
+    font-size: 22px;
+    z-index: 10;
 }
 pre {
     white-space: pre-wrap;
     word-wrap: break-word;
     font-family: inherit;
+    color: #333;
   }

+ 0 - 40
src/containers/AssessResult.js

@@ -70,33 +70,6 @@ function mapDispatchToProps(dispatch) {
         type:CLEAR_INDEX_DATA
       })
     },
-    saveCalcuResult(data){
-      dispatch({
-        type: SET_CHRONIC_CALCU_RESULT,
-        data:deepClone(data)
-      })
-    },
-    // setCalcuInfo(id, calcuVal, calcuResult) {
-    //   dispatch({
-    //     type: SET_CHRONIC_CALCU_RESULT,
-    //     result:calcuResult,
-    //     id:id
-    //   });
-    //   dispatch({
-    //     type:SET_CALCU_VALUES,
-    //     data:deepClone(calcuVal),
-    //     id:id
-    //   })
-    // },
-    showScaleFn(item,isPop){
-      dispatch({
-        type:SHOW_TABLE_LIST,
-        name:'showTable',
-        value:true,
-        isPop,
-        item:Object.assign({},item)
-      });
-    },
     //保存管理评估
     saveAssessInfos(obj,flg,noSave){     //noSave未true则不调页面保存接口
       dispatch(Object.assign({},obj,{type:SET_SAVE_ASSESS_DATA}));
@@ -107,19 +80,6 @@ function mapDispatchToProps(dispatch) {
         }
       }
     },
-    savePossibleRes(data) {
-      dispatch({
-        type: 'SAVE_POSSIBLE_RESULT',
-        wholeResults: data
-      })
-    },
-    saveCalcuValue(data,id){
-      dispatch({
-        type:SET_CALCU_VALUES,
-        data,
-        id
-      })
-    }
   }
 }
 

+ 1 - 2
src/containers/MedicalInfoContainer.js

@@ -32,12 +32,11 @@ function mapDispatchToProps(dispatch) {
                 type:CLEAR_INFO_SEARCH_LIST
               })
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

+ 1 - 2
src/containers/ScaleSearchContainer.js

@@ -23,12 +23,11 @@ function mapDispatchToProps(dispatch) {
         getScale(item) {
             dispatch(getScaleInfo(item))
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

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

@@ -113,7 +113,7 @@ export const initHistoryDetails = (dispatch) => {
             "inquiryCode": state.recordId,
         }).then((res) => {
             const data = res.data;
-            let pre = baseList.homePage.sysConfig.connect_prec;
+            // let pre = baseList.homePage.sysConfig.connect_prec;
             if (data.code == 0) {
                 const detail = data.data;
                 if(detail.dataJson){

+ 5 - 4
src/store/async-actions/preIcss.js

@@ -5,7 +5,7 @@ import { GET_PREC_LIST,SET_PREC_SHOW } from "../types/preIcss";
 import config from '@config/index';
 import {Notify} from '@commonComp';
 
-export const getPreMsg = () => {
+export const getPreMsg = (sign) => {
     let baseList = store.getState().patInfo.message;
     json('/api/prec/inquiryInfo/hisInquirysForIcss', {
         "isHaveDetail":1,
@@ -18,9 +18,10 @@ export const getPreMsg = () => {
         if (data.code == 0) {
             let result = data.data;
             if(result.length > 0){
-              store.dispatch({type:SET_PREC_SHOW})
+                !sign&&store.dispatch({type:SET_PREC_SHOW})
             }else{
-              Notify.info('暂无预问诊信息');
+                sign&&store.dispatch({type:SET_PREC_SHOW})
+                !sign&&Notify.info('暂无预问诊信息');
             }
             store.dispatch({type:GET_PREC_LIST,preData:result});
         } else {
@@ -55,6 +56,6 @@ export const tellPred = () => {
         "patientSex": idcon.patientSex=='男'?1:idcon.patientSex=='女'?2:3,
         "patientBirthday": idcon.birthday
     },true).then((res) => {
-      
+        getPreMsg(1)
     })
 }

+ 2 - 1
src/store/async-actions/tabTemplate.js

@@ -36,7 +36,7 @@ export const initItemList = (current,name) => {
 export const initCommonItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
   let state = baseList.patInfo.message;
-
+  // let searchVal = document.getElementById("searchTmp").value
   return (dispatch) => {
     axios.json('/templateInfo/getTemplatePageAlls', {
       "doctorId": state.doctorId,
@@ -60,6 +60,7 @@ export const initCommonItemList = (current,name) => { //初始化数据
 };
 export const initAdminItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
+  // let searchVal = document.getElementById("searchTmp").value
   let state = baseList.patInfo.message;
   return (dispatch) => {
     axios.json('/templateAdmin/getTemplatePageAlls', {

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

@@ -67,7 +67,7 @@ export default function(state = initState, action) {
       res.tableList = action.data;
       return res;
     case SHOW_TABLE_LIST://显示、隐藏量表列表
-      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value,isPop:action.isPop},action.item);
+      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value},action.item);
       return res;
     case SET_CHRONIC_PUSHS:
       res.chronicPushItems = action.data;

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
-// const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 7 - 29
src/utils/drag.js

@@ -176,8 +176,8 @@ let imgXS = 0,//鼠标距离图片左侧的位置
     imgDYS = 0,//图片距离顶部的位置top
     drgLeft= 0,
     tmpValL=0,
-    tmpNum=0,
     tmpValR=0,
+    tmpVal=0,
     imgDrag = false;
 function imgDragMove(type){
   let wrap = $("#previewWrapper");
@@ -198,20 +198,7 @@ function imgDragMove(type){
       imgDYS = drag.offset().top;
       imgWXS = wrap.offset().left;
       imgWYS = wrap.offset().top;
-
-      if(localStorage.getItem('changeImg')){
-        tmpNum == 0
-        // localStorage.setItem("changeImg",false)
-        
-      }
-      
-      // if(tmpNum == 0){
-      //   tmpValL = imgDXS-imgWXS;
-      //   tmpValR = imgDYS-imgWYS;
-      //   ++tmpNum
-      // }
-
-      console.log(imgDXS,imgWXS,tmpNum,'hahaha')
+      tmpVal = localStorage.getItem('changeImg')-0;
 
       $(document).on('mousemove',handleMoveImg)
       $(document).on('mouseup',handleUpImg)
@@ -231,15 +218,14 @@ function handleMoveImg(event){
   let page = getPageCoordinate(event,'0');
   let wrapWidth = drag[0].offsetWidth;
   let wrapHeight = drag[0].offsetHeight;
+  
   if(imgDrag){
-      
     // console.log('鼠标左:'+page.boxLeft)
     // console.log('鼠标图左:'+imgXS)
     // console.log('容器左:'+imgWXS)
     // console.log('被拖图左:'+drag.offset().left)
     // console.log('bian1:'+tmpValL)
     // console.log('bian2:'+tmpValR)
-
     imgDXS = page.boxLeft - imgXS - imgWXS;//相对于父元素定位
     imgDYS = page.boxTop - imgYS - imgWYS;
 
@@ -249,8 +235,8 @@ function handleMoveImg(event){
         height:wrapHeight+'px',
         marginLeft:'0px',
         marginTop:'0px',
-        left:imgDXS+(de?tmpValL:0) + 'px',
-        top:imgDYS-(de?tmpValL:0) + 'px'
+        left:imgDXS+(de?tmpVal:0) + 'px',
+        top:imgDYS-(de?tmpVal:0) + 'px'
       })
     }
     else{
@@ -259,18 +245,10 @@ function handleMoveImg(event){
         height:wrapHeight+'px',
         marginLeft:'0px',
         marginTop:'0px',
-        left:imgDXS-(de?tmpValR:0) + 'px',
-        top:imgDYS+(de?tmpValR:0) + 'px'
+        left:imgDXS-(de?tmpVal:0) + 'px',
+        top:imgDYS+(de?tmpVal:0) + 'px'
       })
     }
-    // drag.css({
-    //   width:wrapWidth+'px',
-    //   height:wrapHeight+'px',
-    //   marginLeft:'0px',
-    //   marginTop:'0px',
-    //   left:imgDXS-(de?tmpValR:0) + 'px',
-    //   top:imgDYS+(de?tmpValR:0) + 'px'
-    // })
   }
 }
 module.exports = {