Browse Source

Merge remote-tracking branch 'origin/CommonTemplate' into testedMerge

zhouna 5 years ago
parent
commit
ae75aef479
39 changed files with 606 additions and 158 deletions
  1. 1 2
      src/common/components/ItemBox/index.jsx
  2. 0 1
      src/common/less/base.less
  3. 1 1
      src/components/AddInspect/InspectName/index.jsx
  4. 1 1
      src/components/AddInspect/InspectName/index.less
  5. 1 1
      src/components/Banner/index.less
  6. 1 1
      src/components/BodyContainer/index.less
  7. 1 1
      src/components/InfoTitle/index.jsx
  8. 1 1
      src/components/Inspect/index.jsx
  9. 2 2
      src/components/MainSuit/index.jsx
  10. 0 1
      src/components/Operation/Search/index.jsx
  11. 66 57
      src/components/Operation/index.jsx
  12. BIN
      src/components/PreInIcss/RotateImg copy/img/closeImg.png
  13. BIN
      src/components/PreInIcss/RotateImg copy/img/imgBgActive.png
  14. BIN
      src/components/PreInIcss/RotateImg copy/img/nextImg.png
  15. BIN
      src/components/PreInIcss/RotateImg copy/img/plus.png
  16. BIN
      src/components/PreInIcss/RotateImg copy/img/prevImg.png
  17. BIN
      src/components/PreInIcss/RotateImg copy/img/reduce.png
  18. BIN
      src/components/PreInIcss/RotateImg copy/img/rotated.png
  19. 229 0
      src/components/PreInIcss/RotateImg copy/index.jsx
  20. 104 0
      src/components/PreInIcss/RotateImg copy/index.less
  21. 41 36
      src/components/PreInIcss/RotateImg/index.jsx
  22. 2 1
      src/components/PreInIcss/SliddleTgl/index.jsx
  23. 2 2
      src/components/PreInIcss/index.jsx
  24. 1 0
      src/components/PreInIcss/index.less
  25. 9 1
      src/components/PreviewBody/Inspect/index.jsx
  26. 2 0
      src/components/PreviewBody/index.jsx
  27. 14 0
      src/components/PreviewBody/index.less
  28. 7 4
      src/components/PushContainer/index.jsx
  29. 5 5
      src/components/TemplateItems/TemplateItem/index.jsx
  30. 1 1
      src/components/TemplateItems/TemplateItem/index.less
  31. 1 1
      src/components/TemplateItems/index.jsx
  32. 2 2
      src/store/async-actions/patInfo.js
  33. 6 14
      src/store/async-actions/preIcss.js
  34. 3 4
      src/store/async-actions/tabTemplate.js
  35. 4 0
      src/store/reducers/inspect.js
  36. 1 1
      src/store/types/checkBody.js
  37. 2 2
      src/utils/config.js
  38. 60 9
      src/utils/drag.js
  39. 35 6
      src/utils/tools.js

+ 1 - 2
src/common/components/ItemBox/index.jsx

@@ -28,7 +28,6 @@ class ItemBox extends Component {
     const sty = {width:boxWidth?boxWidth:undefined,height:boxHeight?boxHeight:undefined,lineHeight:boxLineHeight?boxLineHeight:'22px',marginTop:marginTop,backgroundColor:backgroundColor?backgroundColor:''};
     return style?Object.assign(style,sty):sty;
   }
-
   handleClick(e){
     e.stopPropagation();
     const {handleClick,hideAllDrop} = this.props;
@@ -62,7 +61,7 @@ componentWillReceiveProps(nextP){
     }
 }
 setFontColorSize(){
-  const {data,saveText} = this.props;
+  const {data,saveText,title} = this.props;
   if(data&&data.length==0&&saveText&&saveText[0]){
     return setFontColorSize(2,7)
   }

+ 0 - 1
src/common/less/base.less

@@ -116,7 +116,6 @@ html,body {
 }
 :global(.titleWidth){
     width: 78px !important;
-    margin-top: 8px !important;
     #mainSuit {
         margin-left: 78px;
     }

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

@@ -53,7 +53,7 @@ class InspectName extends Component {
           <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} onClick={this.handleEdit}>
+          item.inpValue||this.state.isEdit?<div title={this.state.value} className={styles.iptTipWrap} onClick={this.handleEdit}>
             <input 
             ref="iptTip"
             onBlur={this.handleBlur}

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

@@ -215,7 +215,7 @@
       }
 }
 .iptValue {
-    width: 50px;
+    width: 100px;
     color: #3B9ED0;
     font-size: 12px;
     margin-left: 10px;

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

@@ -7,7 +7,7 @@
     height: 50px;
 
     border-bottom: 10px solid #e4e6e7;
-    position: fixed;          //页面布局调整
+    position: absolute;          //页面布局调整
     width: 100%;
     top: 0;
     // z-index: 202;

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

@@ -4,6 +4,6 @@
   }
 }*/
 .container{
-  padding: 50px 10px 0 10px;
+  padding: 50px 8px 0 10px;
   position: relative;
 }

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

@@ -52,7 +52,7 @@ class InfoTitle extends Component {
     render() {
         const {disVisible,copyVisible,winWidth,loading} = this.props;
         const {le} = this.state;
-        return <div className={style['title-wrapper']} >
+        return <div className={style['title-wrapper']}  style={{left:le}}>
             <PatInfoContainer />
             <div className={style['activeWrap']}>
                 <div className={style["operations"]} onClick={this.showHistoryBox}>

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

@@ -221,7 +221,7 @@ class Inspect extends React.Component {
         <div className={styles.top}>
           <span id="inspectResultData" className={setFontColorSize(2,5)}>化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0 ? 'none' : 'block' }}>
+          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? 'none' : 'block' }}>
             {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
             <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
             {/* {0没有,1本地,2医院,3本地和医院} */}

+ 2 - 2
src/components/MainSuit/index.jsx

@@ -269,8 +269,8 @@ class MainSuit extends Component{
       }
   }*/
   render(){
-    const {saveChronic,readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,showArr} = this.props;
-    const {symptom,boxLeft,boxTop} = this.state;
+    const {readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,showArr} = this.props;
+    const {boxLeft,boxTop} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
     const boxTop1 = datas.length>0?boxTop:45;

+ 0 - 1
src/components/Operation/Search/index.jsx

@@ -71,7 +71,6 @@ class SearchList extends React.Component {
       this.setState({border:false,val:''})
     }
     componentWillReceiveProps(next){
-        console.log(next.value)
         if(next.value&&(next.value != this.props.value)){
             this.textInput.current.value = next.value;
         }

+ 66 - 57
src/components/Operation/index.jsx

@@ -10,7 +10,7 @@ import { ConfirmModal, Notify } from '@commonComp';
 import Search from './Search';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
-import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
+import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory,checkDeptContent} from '@utils/tools';
 
 import {dragBox} from '@utils/drag';
 import store from '@store';
@@ -136,64 +136,51 @@ class Operation extends Component {
   }
   saveHis(type) {
     const { diagShowTmp } = this.props;
-    let flg = this.getAllData();
-    if(flg){
-      this.setState({
-        title: '',
-        sex:'3',
-        type: type,
-        okText: '保存',
-        borderColor: '#3B9ED0',
-        okColor: '#fff',
-        oKBg: '#3B9ED0',
-        msg: this.changeTitle()
-      })
-      diagShowTmp(true)
-    }
-  }
-  getAllData(){
     let baseList = store.getState();
-    let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
-    let whichSign = baseList.typeConfig.mode;
     let tmpLis = [];
     let flg = isAllClear(jsonStr);
     if(!flg){
-      Notify.info('模板数据不能为空')
-      return false
+      Notify.info('模板数据不能为空');
+      return false;
     }
-    // console.log(jsonStr.chief,'文本')
-    // console.log(jsonData,'结构')       //测试需要用到,不要删了
-    // console.log(tmpLis,'接口返回的')
-    if(this.props.admin){
-      tmpLis = baseList.tabTemplate.adminItems;
-    }else{
+    if(!this.props.admin){
       tmpLis = baseList.tabTemplate.items;
-    }
-    for(let i = 0;i <tmpLis.length;i++){
-      let dataStr = tmpLis[i].preview;
-      if(
-        filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
-        filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
-        filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
-        filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
-        jsonStr.lis == JSON.parse(dataStr).lis &&
-        jsonStr.pacs == JSON.parse(dataStr).pacs &&
-        jsonStr.diag == JSON.parse(dataStr).diag &&
-        jsonStr.advice == JSON.parse(dataStr).advice
-      ){
-        Notify.info('该模板已保存');
-        return false;
+      for(let i = 0;i <tmpLis.length;i++){
+        let dataStr = tmpLis[i].preview;
+        if(
+          filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+          filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+          filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+          filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+          jsonStr.lis == JSON.parse(dataStr).lis &&
+          jsonStr.pacs == JSON.parse(dataStr).pacs &&
+          jsonStr.diag == JSON.parse(dataStr).diag &&
+          jsonStr.advice == JSON.parse(dataStr).advice
+        ){
+          Notify.info('该模板已保存');
+          return false;
+        }
       }
     }
-    return true;
+    this.setState({
+      title: '',
+      sex:'3',
+      type: type,
+      okText: '保存',
+      borderColor: '#3B9ED0',
+      okColor: '#fff',
+      oKBg: '#3B9ED0',
+      msg: this.changeTitle()
+    })
+    diagShowTmp(true)
   }
   changeTitle() {
     return <div className={style['box']}>
       {/* <div className={style.titleTip}></div> */}
       <div className={style['iptWrap']}>
         <div className={style.name}>
-          <span>模版名称:</span>
+          <span>模名称:</span>
           <input className={style['ipt']}
             placeholder="请输入模板名称"
             type="text"
@@ -272,6 +259,26 @@ class Operation extends Component {
         return;
       }
       if(admin){
+        let baseList = store.getState();
+        let tmpLis = baseList.tabTemplate.adminItems||[];
+        let jsonStr = getAllDataStringList(baseList);
+        for(let i = 0;i <tmpLis.length;i++){
+          let dataStr = tmpLis[i].preview;
+          if(
+            filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+            filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+            filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+            filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+            jsonStr.lis == JSON.parse(dataStr).lis &&
+            jsonStr.pacs == JSON.parse(dataStr).pacs &&
+            jsonStr.diag == JSON.parse(dataStr).diag &&
+            jsonStr.advice == JSON.parse(dataStr).advice&&
+            deptId == tmpLis[i].hospitalDeptId
+          ){
+            Notify.info('该模板已保存');
+            return false;
+          }
+        }
         saveDataAlls(title,sex,deptId);
       }else{
         saveDataAll(title,sex);
@@ -283,10 +290,10 @@ class Operation extends Component {
     const { type } = this.state;
     if (type == 3){
       diagShowTmp(false)
-      this.setState({ title: '' })
+      this.setState({ title: '',deptId:"",value:"" })
     }else{
       diagShowTmp(false)
-      this.setState({ title: '' }) 
+      this.setState({ title: '',deptId:"",value:"" }) 
     }
   }
   setDeptId(id,name){
@@ -346,17 +353,19 @@ class Operation extends Component {
         {
           admin&&type==3?<div className={style.department}>
               <span>科室归属:</span>
-              <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
-                <ul className={style.departLis}>
-                  {
-                    departLis.map((item,idx)=>{
-                      return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
-                        {item.conceptDeptName}
-                      </li>
-                    })
-                  }
-                </ul>
-              </Search>
+                <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
+                {
+                  departLis.length>0&&value&&<ul className={style.departLis}>
+                    {
+                      departLis.map((item,idx)=>{
+                        return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
+                          {item.conceptDeptName}
+                        </li>
+                      })
+                    }
+                  </ul>
+                }
+                </Search>
               <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
           </div>:null
         }

BIN
src/components/PreInIcss/RotateImg copy/img/closeImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/imgBgActive.png


BIN
src/components/PreInIcss/RotateImg copy/img/nextImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/plus.png


BIN
src/components/PreInIcss/RotateImg copy/img/prevImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/reduce.png


BIN
src/components/PreInIcss/RotateImg copy/img/rotated.png


+ 229 - 0
src/components/PreInIcss/RotateImg copy/index.jsx

@@ -0,0 +1,229 @@
+import React, { Component } from "react";
+import $ from "jquery";
+import style from "./index.less";
+import ReactDom from "react-dom";
+import closeImg from "./img/closeImg.png";
+import imgBgActive from "./img/imgBgActive.png";
+import plus from "./img/plus.png";
+import reduce from "./img/reduce.png";
+import nextImg from "./img/nextImg.png";
+import prevImg from "./img/prevImg.png";
+import rotated from "./img/rotated.png";
+import {imgDragMove} from '@utils/drag';
+
+class RotateImg extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      de:0,
+      current:0,
+      length:0,
+      imgWidth:'auto',
+      imgHeight:'auto',
+      mgLeft:'',
+      mgTop:'',
+      left:'50%',
+      top:'50%'
+    }
+    this.handlePrev = this.handlePrev.bind(this)
+    this.handleNext = this.handleNext.bind(this)
+    this.handleRotate = this.handleRotate.bind(this)
+    this.handlePlus = this.handlePlus.bind(this)
+    this.handleReduce = this.handleReduce.bind(this)
+  }
+  componentWillReceiveProps(next){
+    console.log(next.windowHeight,this.props.windowHeight)
+  }
+  componentDidMount(){
+    imgDragMove('add')
+    const { idx,imgLis } = this.props;
+    let currentImg = imgLis[idx];
+    let width = currentImg.width,height = currentImg.height;
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    this.setState({
+      current:idx,
+      length:imgLis.length,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2
+    })
+  }
+  getStyle(){
+    const { imgDetail,idx,imgLis } = this.props;
+    let currentImg = imgLis[this.state.current];
+    let width = currentImg.width,height = currentImg.height;
+    let isLorR = width > height;
+    return {
+      width:width,
+      height:height,
+      marginLeft:-width/2,
+      marginTop:-height/2
+    }
+  }
+  handleNext(){
+    this.props.setMove(false)
+    const { imgLis,isMove } = this.props;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == tmpLen-1){
+      width = imgLis[0].width
+      height = imgLis[0].height
+    }else{
+      width = imgLis[tmpIdx+1].width
+      height = imgLis[tmpIdx+1].height
+    }
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == tmpLen-1?0:(tmpIdx+1),
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+  }
+  handlePrev(){
+    const { imgLis } = this.props;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == 0){
+      width = imgLis[tmpLen-1].width
+      height = imgLis[tmpLen-1].height
+    }else{
+      width = imgLis[tmpIdx-1].width
+      height = imgLis[tmpIdx-1].height
+    }
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == 0?tmpLen-1:tmpIdx-1,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+    this.props.setMove(false)
+  }
+  handlePlus(){
+    const {imgWidth,imgHeight,isMove} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:1.2*imgWidth,
+        imgHeight:1.2*imgHeight
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:1.2*imgWidth,
+      imgHeight:1.2*imgHeight,
+      mgLeft:-imgWidth*1.2/2,
+      mgTop:-imgHeight*1.2/2
+    })
+  }
+  handleReduce(){
+    const {imgWidth,imgHeight} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:imgWidth*0.8,
+        imgHeight:imgHeight*0.8
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:imgWidth*0.8,
+      imgHeight:imgHeight*0.8,
+      mgLeft:-imgWidth*0.8/2,
+      mgTop:-imgHeight*0.8/2
+    })
+  }
+  handleRotate(flg){
+    let deg = this.state.de;
+    if(flg){
+      deg = deg-90
+    }else{
+      deg = deg-0+90
+    }
+    this.setState({
+      de:deg
+    })
+  }
+
+  render() {
+    const { imgLis,handleClose } = this.props;
+    const { current,imgWidth,imgHeight,mgLeft,mgTop,de,left,top } = this.state;
+
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style.preImgWrap}>
+      <div className={style.modal} onClick={handleClose}></div>
+      <div className={style.mainWrap}>
+        <div className={style.imgWrap} id="previewWrapper">
+            <img className={style.rotateImg}
+              id="drugImg"
+              ref="rotateImg" 
+              src={imgLis[current].originalImage} 
+              style={{
+                width:imgWidth+'px',
+                height:imgHeight+'px',
+                marginLeft:mgLeft+'px',
+                marginTop:mgTop+'px',
+                transform:"rotate(" + de + "deg)",
+                left:left,
+                top:top,
+              }}
+              alt="预览图片"/>
+          <div className={style.activeBar}>
+            <img className={style.plus} src={plus} onClick={this.handlePlus} alt="图片放大"/>
+            <img className={style.reduce} src={reduce} onClick={this.handleReduce} alt="图片缩小"/>
+            <img className={style.rotate} src={rotated} onClick={this.handleRotate} alt="图片旋转"/>
+          </div>
+          <img src={closeImg} onClick={handleClose} className={style.close} alt="close"/>
+        </div>
+          <img src={nextImg} className={style.next} onClick={this.handleNext} alt="下一张"/>
+          <img src={prevImg} className={style.prev} onClick={this.handlePrev} alt="上一张"/>
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default RotateImg;

+ 104 - 0
src/components/PreInIcss/RotateImg copy/index.less

@@ -0,0 +1,104 @@
+.preImgWrap {
+  .modal {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 100;
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+    opacity: 0.6;
+    filter: alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .imgWrap {
+    // margin-left: -500px;
+    // left: 50%;
+    // width: 1000px;
+    // top: 7%;
+    // bottom: 7%;
+    // height: 86%;
+    z-index: 100;
+    position: fixed;
+    width: 750px;
+    height: 750px;
+    left: 50%;
+    top: 50%;
+    margin-left: -375px;
+    margin-top: -375px;
+    background-color: #fff;
+    overflow: hidden;
+    .close {
+      position: absolute;
+      right: 20px;
+      top: 20px;
+      cursor: pointer;
+    }
+    .imgDiv {
+      position: absolute;
+      width: 750px;
+      height: 750px;
+      left: 50%;
+      top: 50%;
+      margin-left: -375px;
+      margin-top: -375px;
+      overflow: hidden;
+    }
+    .rotateImg {
+      position: absolute;
+      cursor: move;
+      // left: 50%;
+      // top: 50%;
+      // transform: translateX(-50%) translateY(-50%);
+    }
+    .activeBar {
+      width: 400px;
+      height: 40px;
+      background-color: #9B979A;
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      margin-left: -200px;
+      border-radius: 4px 4px 0 0;
+      text-align: center;
+      // display: none;
+      img {
+        margin: 10px 0px;
+        padding: 3px 20px;
+        cursor: pointer;
+      }
+      
+      .rotate {
+    
+      }  
+      .plus,.reduce {
+        border-right: 1px solid #7A7779;
+      }  
+    }
+  }
+  .mainWrap {
+    position: absolute;
+    width: 900px;
+    height: 900px;
+    left: 50%;
+    top: 50%;
+    margin-left: -450px;
+    margin-top: -450px;
+    .next {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      right: 0;
+    }
+    .prev {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      left: 0;
+    }
+  }
+}

+ 41 - 36
src/components/PreInIcss/RotateImg/index.jsx

@@ -33,18 +33,19 @@ class RotateImg extends Component {
   }
   componentDidMount(){
     imgDragMove('add')
-    const { idx,imgLis } = this.props;
+    const { idx,imgLis,windowHeight } = this.props;
     let currentImg = imgLis[idx];
+    let scaleHeight = windowHeight*0.8;
     let width = currentImg.width,height = currentImg.height;
     if(width>height){
-      if(width > 750){
-        width=750
-        height=height*750/width
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
       }
     }else{
-      if(height > 750){
-        height = 750
-        width = width*750/height
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
       }
     }
     this.setState({
@@ -56,21 +57,10 @@ class RotateImg extends Component {
       mgTop:-height/2
     })
   }
-  getStyle(){
-    const { imgDetail,idx,imgLis } = this.props;
-    let currentImg = imgLis[this.state.current];
-    let width = currentImg.width,height = currentImg.height;
-    let isLorR = width > height;
-    return {
-      width:width,
-      height:height,
-      marginLeft:-width/2,
-      marginTop:-height/2
-    }
-  }
   handleNext(){
     this.props.setMove(false)
-    const { imgLis,isMove } = this.props;
+    const { imgLis,isMove,windowHeight } = this.props;
+    let scaleHeight = windowHeight*0.8;
     let tmpIdx = this.state.current;
     let tmpLen = this.state.length,width,height;
     if(tmpIdx == tmpLen-1){
@@ -81,14 +71,14 @@ class RotateImg extends Component {
       height = imgLis[tmpIdx+1].height
     }
     if(width>height){
-      if(width > 750){
-        width=750
-        height=height*750/width
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
       }
     }else{
-      if(height > 750){
-        height = 750
-        width = width*750/height
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
       }
     }
     let imgDom = this.refs.rotateImg.getDOMNode();
@@ -106,7 +96,8 @@ class RotateImg extends Component {
     })
   }
   handlePrev(){
-    const { imgLis } = this.props;
+    const { imgLis,windowHeight } = this.props;
+    let scaleHeight = windowHeight*0.8;
     let tmpIdx = this.state.current;
     let tmpLen = this.state.length,width,height;
     if(tmpIdx == 0){
@@ -117,14 +108,14 @@ class RotateImg extends Component {
       height = imgLis[tmpIdx-1].height
     }
     if(width>height){
-      if(width > 750){
-        width=750
-        height=height*750/width
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
       }
     }else{
-      if(height > 750){
-        height = 750
-        width = width*750/height
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
       }
     }
     let imgDom = this.refs.rotateImg.getDOMNode();
@@ -176,27 +167,41 @@ class RotateImg extends Component {
   }
   handleRotate(flg){
     let deg = this.state.de;
+    let tmpWidth = this.state.imgWidth;
+    let tmpHeight = this.state.imgHeight;
     if(flg){
       deg = deg-90
     }else{
       deg = deg-0+90
     }
     this.setState({
+      // imgWidth:tmpHeight,
+      // imgHeight:tmpWidth,
+      // mgLeft:-tmpHeight/2,
+      // mgTop:-tmpWidth/2,
       de:deg
     })
   }
+
   render() {
-    const { imgLis,handleClose } = this.props;
+    const { imgLis,handleClose,windowHeight } = this.props;
     const { current,imgWidth,imgHeight,mgLeft,mgTop,de,left,top } = this.state;
-
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(<div className={style.preImgWrap}>
       <div className={style.modal} onClick={handleClose}></div>
       <div className={style.mainWrap}>
-        <div className={style.imgWrap} id="previewWrapper">
+        <div className={style.imgWrap}
+          id="previewWrapper"
+          style={{
+            width:0.8*windowHeight+'px',
+            height:0.8*windowHeight+'px',
+            marginLeft:-0.8*windowHeight/2+'px',
+            marginTop:-0.8*windowHeight/2+'px'
+          }}>
             <img className={style.rotateImg}
               id="drugImg"
               ref="rotateImg" 
+              data-deg={de}
               src={imgLis[current].originalImage} 
               style={{
                 width:imgWidth+'px',

+ 2 - 1
src/components/PreInIcss/SliddleTgl/index.jsx

@@ -62,7 +62,7 @@ class SlideTgl extends Component {
     })
   }
   render() {
-    const { item,showPre,isMove,setMove } = this.props;
+    const { item,showPre,isMove,setMove,windowHeight } = this.props;
     return <li>
     <div className={style.current} ref="current" style={{height:this.state.slide?'18px':'auto'}}>
       <p className={style.curStyle}><span>现病史:</span>{item.detail.xbs}</p>
@@ -93,6 +93,7 @@ class SlideTgl extends Component {
         imgShow={this.state.imgShow}
         imgLis={this.state.imgList}
         isMove = {isMove}
+        windowHeight = {windowHeight}
         setMove = {setMove}
         handleClose={this.handleClose}
         idx={this.state.idx}></RotateImg>:null}

+ 2 - 2
src/components/PreInIcss/index.jsx

@@ -21,11 +21,11 @@ class PreIcss extends Component {
           data.map((item,index)=>{
             return <div className={style.mainPre}>
               <ul>
-                <li><span>预问诊录入时间:</span>{item.gmtCreate}</li>
+                <li><span>预问诊录入时间:</span>{item.gmtModified}</li>
                 <li><span>录入选择医院:</span>{item.sonHospitalName?item.sonHospitalName:item.hospitalName}</li>
                 <li><span>科室:</span>{item.hospitalDeptName}</li>
                 <li><span>主诉:</span>{item.detail.chiefComplaint}</li>
-                <SlideTgl showPre={showPre} item={item} isMove={isMove} setMove={setMove}></SlideTgl>
+                <SlideTgl windowHeight={windowHeight} showPre={showPre} item={item} isMove={isMove} setMove={setMove}></SlideTgl>
               </ul>
             </div>
           })

+ 1 - 0
src/components/PreInIcss/index.less

@@ -45,6 +45,7 @@
       }
       .curStyle {
         padding: 0 0 5px 0;
+        line-height: 18px;
       }
       .slideTgl {
         line-height: 18px;

+ 9 - 1
src/components/PreviewBody/Inspect/index.jsx

@@ -35,7 +35,15 @@ const PreviewInspect = (props) => {
           dataJson&&dataJson.labelList && dataJson.labelList.map((item, idx) => {
             return <table style={{ margin: '8px 0', width: '100%' }}>
               {
-                item.show?<tr className={style.assistTableTrFst}><td><span> {item.name} </span></td></tr>:
+                item.show?<tr className={style.assistTableTrFst}>
+                  <td colSpan='4'>
+                    <span> {item.name} </span> 
+                    <p style={{display:item.inpValue?'inline-block':'none'}}>
+                      ({item.inpValue})
+                      <i></i>
+                    </p>
+                    </td>
+                </tr>:
                 <tr className={style.assistTableTrFstExcel}><td><span>「{item.name}」</span></td></tr>
               }
               {

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

@@ -7,6 +7,7 @@ import PreviewInspect from './Inspect';
 import ItemPart from './ItemPart';
 import $ from "jquery";
 import AssessResultHis from '@containers/AssessResultHis';
+import { dragBox } from '@utils/drag';
 
 class PreviewBody extends Component {
   constructor(props) {
@@ -39,6 +40,7 @@ class PreviewBody extends Component {
       return false;
     } else {
       this.onPrint();
+      dragBox('previewPrintWrapper','previewPrintStatic','del')
       this.props.save(true)
     }
   }

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

@@ -82,9 +82,23 @@ table{
 .assistTableTrFst {
   font-size: 14px;
   line-height: 1.5;
+  .ediName {
+    width: 100%;
+  }
   span {
     border-bottom: 1px solid #666666;
   }
+  p {
+    display: inline-block;
+    margin-left: 10px;   
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 5px;
+    max-width: 490px;
+    float: right;
+  }
 }
 .assistTableTdFst {
   width: 32%;

+ 7 - 4
src/components/PushContainer/index.jsx

@@ -43,6 +43,7 @@ class PushContainer extends Component {
       oKBg: '',
       okColor: 'red',
       num: 0,          //计数
+      deptId:'',       //科室id
     }
     this.$cont = React.createRef();
     this.itemList = null;
@@ -71,7 +72,7 @@ class PushContainer extends Component {
    * @param {tab组件切换id} id
    */
   handleActiveClick(id) {
-    if (id == '1') {
+    if (id == '2') {
       store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))
@@ -121,7 +122,7 @@ class PushContainer extends Component {
   delDiv() {
     return <p className={style['center']}>确认删除模板?</p>
   }
-  onchange(value) {
+  onchange(value,deptId) {
     this.setState({
       title: value
     }, () => {
@@ -162,13 +163,14 @@ class PushContainer extends Component {
    * 改变模板标题
    * @param {模板id和模板title} obj
    */
-  handleTitleChange(id, text) {
+  handleTitleChange(id, text,deptId) {
     store.dispatch(changeVisible(true))
     this.setState({
       type: 3,
       currId: id,
       title: text,
       text: text,
+      deptId: deptId,
       okText: '保存',
       okBorderColor: '#3B9ED0',
       okColor: '#fff',
@@ -254,7 +256,8 @@ class PushContainer extends Component {
       }
       let tempObj = {
         id: this.state.currId,
-        title: this.state.title
+        title: this.state.title,
+        deptId:this.state.deptId
       }
       if(this.props.admin){
         store.dispatch(changeTitleAsyncAdmin(tempObj))

+ 5 - 5
src/components/TemplateItems/TemplateItem/index.jsx

@@ -113,10 +113,10 @@ class TemplateItem extends React.Component {
     });
   }
 
-  handleEditIconClick(e, name) {
+  handleEditIconClick(e, name,deptId) {
     e.stopPropagation();
     let currId = this.props.id
-    this.props.handleTitleChange(currId, name);
+    this.props.handleTitleChange(currId, name,deptId);
   }
 
   handleTitleClick(e) {
@@ -211,9 +211,9 @@ class TemplateItem extends React.Component {
     }
   }
   render() {
-    const { allCheckShow, id, name, preview,conceptDeptName, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
+    const { allCheckShow, id, name,hospitalDeptId, preview,conceptDeptName, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
     let previewJson = JSON.parse(preview);
-    let sexStr = sex == 2 ? ' (女'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : sex == 1 ? ' (男'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : ' (通用'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')';
+    let sexStr = sex == 2 ? ' (女'+(conceptDeptName&&'-'+conceptDeptName)+')' : sex == 1 ? ' (男'+(conceptDeptName&&'-'+conceptDeptName)+')' : ' (通用'+(conceptDeptName&&'-'+conceptDeptName)+')';
     return (
       <div className={style.wrapper}>
         <div className={this.getStyleFst()}
@@ -243,7 +243,7 @@ class TemplateItem extends React.Component {
             src={this.getEditIcon()}
             onMouseEnter={() => this.handleEditIconMouseEnter()}
             onMouseLeave={() => this.handleEditIconMouseLeave()}
-            onClick={(e) => this.handleEditIconClick(e, name)}
+            onClick={(e) => this.handleEditIconClick(e, name,hospitalDeptId)}
           />}
         </div>
         <div

+ 1 - 1
src/components/TemplateItems/TemplateItem/index.less

@@ -59,7 +59,7 @@
       vertical-align: top;
     //   margin-top: 3px;
     // padding: 0 5px;
-      max-width: 150px;
+      max-width: 200px;
       overflow: hidden;
       text-overflow: ellipsis;
       white-space: nowrap;

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

@@ -81,7 +81,7 @@ class TemplateItems extends React.Component {
     }
     templateSearch(){
         const {templateSearch} = this.props
-        templateSearch(this.$search.current.value)
+        templateSearch((this.$search.current.value).trim())
         if(this.$search.current.value.trim()){
             this.setState({
                 msg:'暂无模板信息'

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

@@ -60,6 +60,7 @@ export const getAdminCheckout = (val1,val2,dispatch) => {
               type: SETADMIN,
               admin:data.data
             });
+            dispatch(initItemList(1,''));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
         } else {
             console.log(res)
         }
@@ -124,7 +125,6 @@ export const initHistoryDetails = (dispatch) => {
                 dispatch({
                   type:ISREAD
                 });
-                dispatch(initItemList(1,''));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
                 dispatch({type:MODI_LOADING,flag:false});
             } else {
                 dispatch({type:MODI_LOADING,flag:false});
@@ -185,12 +185,12 @@ export async function getPatientMessage(dispatch, getState){
   let data1 = {},data2 = {};
   if(res1.data.code=='0'){
     data1 = res1.data.data;
-    getAdminCheckout(data1.doctorId,data1.hospitalId,dispatch)
     getDoctorConfig(data1.doctorId,dispatch);
   }
   if(res2.data.code=='0'){
     data2 = res2.data.data;
   }
+  getAdminCheckout(data1.doctorId,data1.hospitalId,dispatch)
   dispatch({
     type: GET_PATIENT_MESSAGE,
     data:Object.assign(data1,data2)

+ 6 - 14
src/store/async-actions/preIcss.js

@@ -7,22 +7,12 @@ import {Notify} from '@commonComp';
 
 export const getPreMsg = () => {
     let baseList = store.getState().patInfo.message;
-    const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
     json('/api/prec/inquiryInfo/hisInquirys', {
         "isHaveDetail":1,
         "hospitalCode": baseList.hospitalCode,
-        "inquiryCode":inCode,
-        "patientCode": baseList.patientCode,
         "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline,
-
-        // "doctorCode": baseList,
-        // "doctorId": baseList.doctorId,
-        // "hospitalDeptCode": baseList.hospitalDeptCode,
-        // "hospitalDeptId": baseList.hospitalDeptId,
-        // "hospitalId": baseList.hospitalId,
-        // "patientId": baseList.patientId,
-        // "patientIdNo": baseList.patientIdNo,
-        // "patientName": baseList.patientName
+        "patientIdNo": baseList.patientIdentityNum?baseList.patientIdentityNum:baseList.patientIdNo,
+        "patientName": baseList.patientName
     },true).then((res) => {
         const data = res.data;
         if (data.code == 0) {
@@ -40,13 +30,15 @@ export const getPreMsg = () => {
 }
 
 export const tellPred = () => {
-    let baseList = store.getState().homePage.item;
+    let baseData = store.getState();
+    let baseList = baseData.homePage.item;
+    let idcon = baseData.patInfo.message;
     const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
     json('/api/prec/inquiryInfo/inquiryQuoteForIcss', {
         "hospitalCode": baseList.hospitalCode,
         "inquiryCode":inCode,
         "patientCode": baseList.patientCode,
-
+        "patientIdentityNum":idcon.patientIdentityNum,
         "doctorCode":baseList.doctorCode,
         "doctorId": baseList.doctorId,
         "doctorName":baseList.doctorName,

+ 3 - 4
src/store/async-actions/tabTemplate.js

@@ -40,7 +40,7 @@ export const initCommonItemList = (current,name) => { //初始化数据
   return (dispatch) => {
     axios.json('/templateInfo/getTemplatePageAlls', {
       "doctorId": state.doctorId,
-      "hospitalDeptId": state.hospitalDeptId,
+      "hospitalDeptId": (name == '')?state.hospitalDeptId:null,
       "hospitalId": state.hospitalId,
       "hospitalCode": state.hospitalCode,
       "current": current,
@@ -278,7 +278,7 @@ export const changeTitleAsyncAdmin = (obj) => { //改标题
   return (dispatch) => {
     axios.json('/templateAdmin/updateByAdminNames', {
       "doctorId": state.doctorId,
-      "hospitalDeptId": state.hospitalDeptId,
+      "hospitalDeptId": obj.deptId,
       "hospitalId": state.hospitalId,
       "id": obj.id,
       "modeName": obj.title,
@@ -303,7 +303,7 @@ export const changeTitleAsync = (obj) => { //改标题
   return (dispatch) => {
     axios.json('/templateInfo/updateByIdUsNames', {
       "doctorId": state.doctorId,
-      "hospitalDeptId": state.hospitalDeptId,
+      "hospitalDeptId": obj.deptId,
       "hospitalId": state.hospitalId,
       "id": obj.id,
       "modeName": obj.title,
@@ -368,7 +368,6 @@ export const getDepartments = (value) => { //获取模板结构化数据
     }).then((res) => {
       let data = res.data;
       if (data.code == 0) {
-        console.log(data)
         dispatch(getDptLis(data.data))
       } else {
         Notify.error(data.msg);

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

@@ -185,6 +185,10 @@ export default (state = initSearchList, action) => {
                 tempArr[i].inpValue=action.value
             }
         }
+        let tmpArr = newState.getExcelDataList;
+        newState.pushItem = getPushList(tmpArr,tempArr);
+        newState.pushItems = getPushLists(tmpArr,tempArr);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
     return state;

+ 1 - 1
src/store/types/checkBody.js

@@ -21,4 +21,4 @@ export const SET_IMPORT_CHECKBODY_LABEL='SET_IMPORT_CHECKBODY_LABEL';
 export const PRESET = 'PRESET_CHECKBODY_DATA';
 export const RECOVER_TAG_CHECK = 'RECOVER_TAG_CHECK';     //恢复已删除标签
 export const DELETE_CHECK_SELECTED_TAGS='DELETE_CHECK_SELECTED_TAGS';
-export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体
+export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体

+ 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'; //周铁刚

+ 60 - 9
src/utils/drag.js

@@ -30,6 +30,7 @@ let width = '',//屏幕宽度
  */
 function handleMove(event) {
   let wrap = $("#"+dragWrapper); //被拖拽的元素
+  if(!wrap[0]){return}
   let dragDes = $("#"+addPart); //展開区域
   let page = getPageCoordinate(event, '0');//获取鼠标位置
   let maxDragX = 0,dragDesWidth = 0;
@@ -168,11 +169,16 @@ function handleMoves(event){
  * 预问诊预览图片可拖拽
  */
 let imgXS = 0,//鼠标距离图片左侧的位置
+    imgWXS = 0,//图片容器距离左侧的位置
+    imgDXS = 0,//图片距离左侧的位置left
     imgYS = 0,//鼠标距离图片顶部的位置
-    imgDXS = 0,//图片距离左侧的位置
-    imgDYS = 0,//图片距离顶部的位置
-    imgWXS = 0,//图片容器距离顶部的位置
     imgWYS = 0,//图片容器距离顶部的位置
+    imgDYS = 0,//图片距离顶部的位置top
+    drgLeft= 0,
+    tmpValL=0,
+    tmpNum=0,
+    tmpName='',
+    tmpValR=0,
     imgDrag = false;
 function imgDragMove(type){
   let wrap = $("#previewWrapper");
@@ -188,12 +194,27 @@ function imgDragMove(type){
       imgXS = page.boxLeft - drag.offset().left;
       imgYS = page.boxTop - drag.offset().top;       
       imgDrag = true;
-      
+
       imgDXS = drag.offset().left;
       imgDYS = drag.offset().top;
-      imgWXS = wrap.offset().left
-      imgWYS = wrap.offset().top
-        
+      imgWXS = wrap.offset().left;
+      imgWYS = wrap.offset().top;
+
+      if(tmpName){
+        if(drag.attr("src") != tmpName||drag.attr("data-deg")==0){
+          tmpNum==0
+        }
+      }else{
+        tmpName = drag.attr("src")
+      }
+      
+      if(tmpNum == 0){
+        tmpValL = imgDXS-imgWXS;
+        tmpValR = imgDYS-imgWYS;
+        tmpName = 
+        ++tmpNum
+      }
+      console.log(imgDXS,imgWXS,tmpNum,'hahaha')
       $(document).on('mousemove',handleMoveImg)
       $(document).on('mouseup',handleUpImg)
     })
@@ -208,19 +229,49 @@ function handleMoveImg(event){
   !isMove&&store.dispatch({type:SET_MOVE,isMove:true})
   let wrap = $("#previewWrapper");
   let drag = $("#drugImg");
+  let de = (Math.abs(drag.attr("data-deg")%180)==90)?true:false;
   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;
+
+    // if(wrapHeight > wrapWidth){
+    //   drag.css({
+    //     width:wrapWidth+'px',
+    //     height:wrapHeight+'px',
+    //     marginLeft:'0px',
+    //     marginTop:'0px',
+    //     left:imgDXS+(de?163:0) + 'px',
+    //     top:imgDYS-(de?163:0) + 'px'
+    //   })
+    // }
+    // else{
+    //   drag.css({
+    //     width:wrapWidth+'px',
+    //     height:wrapHeight+'px',
+    //     marginLeft:'0px',
+    //     marginTop:'0px',
+    //     left:imgDXS-(de?163:0) + 'px',
+    //     top:imgDYS+(de?163:0) + 'px'
+    //   })
+    // }
     drag.css({
       width:wrapWidth+'px',
       height:wrapHeight+'px',
       marginLeft:'0px',
       marginTop:'0px',
-      left:imgDXS + 'px',
-      top:imgDYS + 'px'
+      left:imgDXS-(de?tmpValL:0) + 'px',
+      top:imgDYS+(de?tmpValL:0) + 'px'
     })
   }
 }

+ 35 - 6
src/utils/tools.js

@@ -1223,10 +1223,12 @@ function getStringPlus(dataList){
   let strPlus = '';
   dataList && dataList.map((item)=>{
     if(item.detailName){
-      let strTmp = item.name + ',' + item.detailName + ',' + (item.otherValue ? item.otherValue : (item.value + item.units)) +';'
+      let strTmp = item.name + ','+ item.detailName + ',' + (item.otherValue ? item.otherValue : (item.value + item.units)) +';'
+      // let strTmp = item.name + ','+(item.inpValue?(item.inpValue+','):'') + item.detailName + ',' + (item.otherValue ? item.otherValue : (item.value + item.units)) +';'
       strPlus += strTmp;
     }else{
-      let strTmp = item.name+';'
+      // let strTmp = item.name+ (item.inpValue?(','+item.inpValue):';')
+      let strTmp = item.name+ ';'
       strPlus += strTmp;
     }
   })
@@ -1308,6 +1310,7 @@ function getPushLists(data1,data2){     //推送数据
             if(val.value != undefined && val.value != ''){
                 let tmpObj = {};
                 tmpObj.name = item.name || '';
+                tmpObj.inpValue = item.inpValue || '';//套餐名
                 tmpObj.detailName = val.name || '';
                 tmpObj.uniqueName = val.uniqueName || '';//公表名称
                 tmpObj.source = '0';     //数据来源
@@ -1322,6 +1325,7 @@ function getPushLists(data1,data2){     //推送数据
       }else{
         let tmpObj = {};
         tmpObj.name = item.name;
+        tmpObj.inpValue = item.inpValue;
         tmpArr2.push(tmpObj);
       }
     })
@@ -1447,7 +1451,7 @@ const setFontColorSize = (flg,pacs) => {
         }else if(pacs == 6){
           classStr = `largeFontSize selectColor`
         }else if(pacs == 7){
-          classStr = `largeFontSize fontWeight`
+          classStr = `largeFontSize fontWeight selectColor`
         }else{
           classStr = `largeFontSize`
         }
@@ -1461,7 +1465,7 @@ const setFontColorSize = (flg,pacs) => {
         if(pacs == 6){
           classStr = `simpleFontSize selectColor`
         }else if(pacs == 7){
-          classStr = `simpleFontSize fontWeight`
+          classStr = `simpleFontSize fontWeight selectColor`
         }else{
           classStr = `simpleFontSize`
         }
@@ -1494,7 +1498,11 @@ const setFontColorSize = (flg,pacs) => {
       }
     }else{//都是标准的
       if(flg == 2){
-        classStr = `simpleFontSize`
+        if(pacs == 7){
+          classStr = `simpleFontSize fontWeight`
+        }else{
+          classStr = `simpleFontSize`
+        }
       }else if(pacs == 7){
         classStr = `simpleFontSize fontWeight`
       }else if(flg == 1){
@@ -1562,6 +1570,26 @@ function handleMouseUp(param){
   }
 }
 
+//判断不同科室内容是否相同
+function checkDeptContent(jsonStr,tmpLis){
+  for(let i = 0;i <tmpLis.length;i++){
+    let dataStr = tmpLis[i].preview;
+    if(
+      filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) &&
+      filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) &&
+      filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) &&
+      filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+      jsonStr.lis == JSON.parse(dataStr).lis &&
+      jsonStr.pacs == JSON.parse(dataStr).pacs &&
+      jsonStr.diag == JSON.parse(dataStr).diag &&
+      jsonStr.advice == JSON.parse(dataStr).advice
+    ){
+      // Notify.info('该模板已保存');
+      return false;
+    }
+  }
+}
+
 module.exports = {
     getIds,
     getWindowInnerWidth,
@@ -1618,5 +1646,6 @@ module.exports = {
     getLifeLabels,
     getValuedLabels,
     removeRepeat,
-    handleMouseUp
+    handleMouseUp,
+    checkDeptContent
 };