فهرست منبع

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

liucf 5 سال پیش
والد
کامیت
da1e65952a
35فایلهای تغییر یافته به همراه254 افزوده شده و 401 حذف شده
  1. 1 1
      src/common/components/EditableSpan/index.less
  2. 4 43
      src/common/components/InlineTag/index.jsx
  3. 4 4
      src/components/ChronicInfo/index.jsx
  4. 1 0
      src/components/DiagnosticList/index.jsx
  5. 4 3
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  6. 3 42
      src/components/MultSpread/index.jsx
  7. 12 68
      src/components/NumberDrop/index.jsx
  8. 34 26
      src/components/Operation/index.jsx
  9. 1 0
      src/components/Preview/index.jsx
  10. 2 2
      src/components/PreviewBody/Inspect/index.jsx
  11. 3 3
      src/components/PreviewBody/ItemPart/index.jsx
  12. 25 13
      src/components/PreviewBody/index.jsx
  13. 1 0
      src/components/PrintPreview/index.jsx
  14. 16 6
      src/components/PushContainer/index.jsx
  15. 6 1
      src/components/TemplateItems/index.jsx
  16. 6 0
      src/components/TemplateItems/index.less
  17. 4 2
      src/components/Treat/index.jsx
  18. 2 5
      src/containers/DiagnosticList.js
  19. 0 25
      src/containers/InlineTag.js
  20. 5 39
      src/containers/MultSpread.js
  21. 7 81
      src/containers/NumberDrop.js
  22. 1 1
      src/containers/PushContainer.js
  23. 1 1
      src/containers/PushItemsContainer.js
  24. 1 1
      src/containers/TypeConfigContainer.js
  25. 10 9
      src/store/async-actions/fetchModules.js
  26. 30 7
      src/store/async-actions/historyTemplates.js
  27. 3 3
      src/store/async-actions/patInfo.js
  28. 19 1
      src/store/async-actions/print.js
  29. 27 6
      src/store/async-actions/tabTemplate.js
  30. 2 0
      src/store/reducers/assessResult.js
  31. 1 1
      src/store/reducers/historyTemplates.js
  32. 1 1
      src/store/reducers/otherHistory.js
  33. 13 2
      src/store/reducers/tabTemplate.js
  34. 2 2
      src/utils/config.js
  35. 2 2
      src/utils/tools.js

+ 1 - 1
src/common/components/EditableSpan/index.less

@@ -5,7 +5,7 @@
   word-break: break-word;
   min-width: 10px;
   // line-height: 2;
-  height: 16px;
+  /*height: 16px;*/
   line-height: 16px;
   vertical-align: middle;
   text-align: left;

+ 4 - 43
src/common/components/InlineTag/index.jsx

@@ -15,49 +15,16 @@ import {handleEnter} from '@utils/tools.js';
 class InlineTag extends Component {
   constructor(props){
     super(props);
-    this.$box = React.createRef();
     this.$span = React.createRef();
-    this.$pre = React.createRef();
-    this.$suf = React.createRef();
     this.state = {
-      editable:false,
       value:props.value||'',
       placeholder:props.placeholder||''
     };
-    this.changeToEdit = this.changeToEdit.bind(this);
-    this.changeToClick = this.changeToClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
     this.handleInput = this.handleInput.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleFixClick = this.handleFixClick.bind(this);
   }
-  changeToEdit(e){
-    const {handledbClick,id} = this.props;
-    // 输入框有值才可以双击编辑
-    const text = this.$span.current.innerText;
-    if(!text.trim()){
-      return
-    }
-    this.setState({
-      editable:true
-    });
-    //埋点记录
-    handledbClick&&handledbClick({id});
-  }
-  changeToClick(e){
-    e.stopPropagation();
-    const {saveEditText,ikey} = this.props;
-    this.setState({
-      editable:false
-    });
-    saveEditText&&saveEditText({
-      changeVal:this.$span.current.innerText,
-      totalVal:this.$box.current.innerText,
-      prefix:this.$pre.current.innerText,
-      suffix:this.$suf.current.innerText,
-      ikey
-    });
-  }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
     e.stopPropagation();
   }
@@ -125,24 +92,18 @@ class InlineTag extends Component {
   }
   render(){
     const {prefix,suffix} = this.props;
-    const {editable,placeholder,value} = this.state;
+    const {placeholder,value} = this.state;
     return <div className={this.getStyle()}
-                 onDoubleClick={this.changeToEdit}
-                 /*onClick={!editable?this.handleFixClick:''}*/
-                 onKeyDown={handleEnter}
-                 onBlur={this.changeToClick} 
-                 ref={this.$box} 
-                 contentEditable={editable}>
-                <span ref={this.$pre}>&nbsp;{prefix}</span>
+                onClick={this.handleFixClick}>
+                <span>{prefix}</span>
                 <span className={style['free-in']}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
-                      /*onClick={e=>e.stopPropagation()}*/
                       onKeyDown={handleEnter}
                       ref={this.$span}>&nbsp;{value||placeholder}</span>
-                <span ref={this.$suf}>&nbsp;{suffix}</span>
+                <span>{suffix}</span>
             </div>;
     }
 }

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

@@ -232,10 +232,10 @@ class ChronicInfo extends React.Component{
   }
   handleReg(e){   //只能输入数字和特殊符号
     //const hasDot = e.target.value.indexOf('.')!=-1;
-    const key = e.key;
-    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      e.preventDefault();
-    }
+    // const key = e.key;
+    // if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
+    //   e.preventDefault();
+    // }
   }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;

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

@@ -113,6 +113,7 @@ class DiagnosticList extends Component {
         // showHistoryCaseModal && showHistoryCaseModal()
         // store.dispatch(initItemList(chronicMagItem))
         initItemList(chronicMagItem).then((res)=>{
+          console.log(99999,chronicMagItem)
             const result = res.data;
             if(result.code==0 && result.data){
               store.dispatch(setInitHistory(result.data));

+ 4 - 3
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -13,6 +13,7 @@ import { ConfirmModal } from '@commonComp';
 import {showHistory} from "@store/actions/historyTemplates";
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
+import {getHistempDetail} from '@store/async-actions/historyTemplates';
 
 
 class HistoryCaseContainer extends React.Component {
@@ -54,7 +55,7 @@ class HistoryCaseContainer extends React.Component {
         activeId:idx,
         activeHis:tmpItems,
         dataStr:tmpItems.detailList||[],
-        dataJson:JSON.parse(tmpItems.dataJson)||{},
+        // dataJson:JSON.parse(tmpItems.dataJson)||{},
       })
     }
     makeSure(){
@@ -62,7 +63,7 @@ class HistoryCaseContainer extends React.Component {
         this.setState({visible:false})
         store.dispatch(showHistory(false))
         store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
-        pushAllDataList(activeHis.sign,'push',activeHis,'history')       //引用
+        store.dispatch(getHistempDetail(activeHis))
         if(didPushParamChange()){
           store.dispatch(billing())
         }
@@ -81,7 +82,7 @@ class HistoryCaseContainer extends React.Component {
         activeId:idx,
         activeHis:val,
         dataStr:val.detailList||[],
-        dataJson:JSON.parse(val.dataJson)||{},
+        // dataJson:JSON.parse(val.dataJson)||{},
       })
     }
     render(){

+ 3 - 42
src/components/MultSpread/index.jsx

@@ -33,12 +33,8 @@ class MultSpread extends Component{
   constructor(props){
     super(props);
     this.state = {
-      editable: false,
       numDoms:[]
     };
-    this.$cont = React.createRef();
-    this.changeToEdit = this.changeToEdit.bind(this);
-    this.handleEdit = this.handleEdit.bind(this);
   }
   getClass(){
     const {saveText,ikey,showAdd} = this.props;
@@ -76,12 +72,11 @@ class MultSpread extends Component{
   }
   getLabels(){
     const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;
-    const {editable}= this.state;
     let show = false;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
       inx=ikey+'-'+i;
-      show = editable?false:showArr&&showArr[inx];
+      show = showArr&&showArr[inx];
       switch (true){
         case +it.tagType===8:
           return it.name;
@@ -166,33 +161,6 @@ class MultSpread extends Component{
     });
     return list;
   }
-  changeToEdit(e){
-    const {name,copyId,ikey,placeholder,handleDbclick,saveText,prefix,suffix} = this.props;
-    const labelInx = tools.getLabelIndex(ikey);
-    const text = saveText&&saveText[+labelInx];
-    //clearTimeout(this.state.timer);//取消延时的单击事件
-    e.preventDefault();
-    if(text&&text.trim()) {//有选中值的标签才能双击编辑
-      this.setState({
-        editable: true
-      });
-      //失焦关闭编辑状态
-      setTimeout(()=>{
-        this.$cont.current.focus();
-      });
-      //双击埋点记录
-      handleDbclick && handleDbclick({id:copyId});
-    }
-  }
-  handleEdit(e){
-    const {saveEditText,ikey} = this.props;
-    if(!this.state.editable) return;
-    this.setState({
-      editable: false
-    });
-    let totalVal = e.target.innerText || e.target.innerHTML;
-    saveEditText && saveEditText({ikey,type:ikey.split("-")[0],totalVal});
-  }
   componentDidMount(){
     //挂载完成保存有加号的项目数据
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
@@ -204,23 +172,16 @@ class MultSpread extends Component{
     }
   }
   getContClass(){
-    const {editable} = this.state;
     const {isImports,ikey,saveText} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    const edit = editable?style['blue-border']:'';
-    return classNames(edit,orgBorder);
+    return classNames(orgBorder);
   }
   render(){
     const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix} = this.props;
     return (<div className={this.getContClass()}
-                 style={{display:'inline-block'}}
-                 onDoubleClick={this.changeToEdit}
-                 ref = {this.$cont}
-                 contentEditable={this.state.editable}
-                 onBlur={this.handleEdit}
-                 onKeyDown={tools.handleEnter}>
+                 style={{display:'inline-block'}}>
       {textPrefix?<span>{textPrefix}</span>:''}
       <div className={this.getClass()}>
       {this.getLabels()}

+ 12 - 68
src/components/NumberDrop/index.jsx

@@ -3,7 +3,7 @@ import className from 'classnames';
 import {NumberPan,Notify} from '@commonComp';
 import style from './index.less';
 import $ from "jquery";
-import {handleEnter,getPageCoordinate} from '@utils/tools.js';
+import {getPageCoordinate} from '@utils/tools.js';
 /***
  * author:zn@2018-11-19
  * 接收参数:
@@ -18,7 +18,7 @@ class NumberDrop extends Component{
   constructor(props){
     super(props);
     this.state={
-      editable:false,      //标签是否可输入
+      /*editable:false,      //标签是否可输入*/
       timer:null,
       sltTimer:null,
       blurTimer:null,
@@ -30,16 +30,10 @@ class NumberDrop extends Component{
       placeholder:props.placeholder
     };
     this.$span = React.createRef();
-    this.$pre = React.createRef();
-    this.$suf = React.createRef();
-    this.$cont = React.createRef();
-    //this.select = this.select.bind(this);
     this.numInpBlur = this.numInpBlur.bind(this);
     this.handleSpanInp = this.handleSpanInp.bind(this);
     this.handleNumClick = this.handleNumClick.bind(this);
     this.handleNumFocus = this.handleNumFocus.bind(this);
-    this.handleBlur = this.handleBlur.bind(this);
-    this.changeToEdit = this.changeToEdit.bind(this);
     this.handleKeyDowm = this.handleKeyDowm.bind(this);
     this.beyondArea = this.beyondArea.bind(this);
   }
@@ -109,23 +103,12 @@ class NumberDrop extends Component{
       handleHide && handleHide();
       return;
     }else{
-      const {editable} = this.state;
-      if(editable){
-        return;
-      }
-      const that = this;
-      //双击时不显示下拉
-      clearTimeout(that.state.timer);
-      const timer = setTimeout(function(){
-        //只有弹窗关闭则点击数字键盘会清空当前数据
-        that.$span.current.focus();
-        that.setState({
-          hasSelect:false
-        });
-        handleShow&&handleShow({ikey,id:patId||id});
-      },300);
+      this.$span.current.focus();
+      this.setState({
+        hasSelect:false
+      });
+      handleShow&&handleShow({ikey,id:patId||id});
       this.setState({
-        timer,
         boxLeft:getPageCoordinate(e).boxLeft,
         boxTop:getPageCoordinate(e).boxTop,
         tmpScroll: $("#addScrollEvent")[0].scrollTop,
@@ -207,42 +190,10 @@ class NumberDrop extends Component{
   getClasses(){         //整个标签是否有值的状态
     const {hideTag,placeholder,value,isImports} = this.props;
     const val = value;
-    const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,blueBorder,orgBorder);
-  }
-  changeToEdit(e){        //整个标签双击编辑状态
-    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
-    const {value,id,handleDbclick,patId,handleHide,show} = this.props;
-    clearTimeout(this.state.timer);//取消延时的单击事件
-    e.preventDefault();
-    if(show){
-      handleHide&&handleHide();
-    }
-    if(value&&value.trim()) {//有选中值的标签才能双击编辑
-      this.setState({
-        editable: true
-      });
-      setTimeout(()=>{
-        this.$cont.current.focus();
-      })
-      //双击埋点记录
-      handleDbclick && handleDbclick({id:patId||id});
-    }
-  }
-  handleBlur(e){     //双击编辑blur
-    const {handleLabelChange,ikey,boxMark,value} = this.props;
-    this.setState({
-      editable: false
-    });
-    let totalVal = e.target.innerText.trim();
-    let changeVal = this.$span.current.innerText.trim();//数字框值-修改后;去掉前空格避免多空格叠加
-    let prefix = this.$pre.current.innerText.trim(); //前缀值-修改后
-    let suffix = this.$suf.current.innerText.trim(); //后缀值-修改后
-    // console.log('数字框:'+changeVal,";全部:"+totalVal,";前缀:"+prefix+";后缀:"+suffix);
-    handleLabelChange && handleLabelChange({ikey,changeVal,type:boxMark,totalVal,prefix,suffix});
+    return className(isSelected,noTag,orgBorder);
   }
   getSpanClass(){       //将被替换的文字选中状态显示
     const cls = this.props.show?style['blued']:'';
@@ -264,17 +215,10 @@ class NumberDrop extends Component{
   }
   render(){
     const {prefix,suffix,show,value,handleHide,allClick} = this.props;
-    const {placeholder,editable,hasSelect,boxTop,boxLeft} = this.state;
-    //console.log(prefix,value,placeholder+'1',this.props.placeholder)
+    const {placeholder,hasSelect,boxTop,boxLeft} = this.state;
     return <div className={this.getClasses()}
-                ref={this.$cont}
-                onDblClick ={this.changeToEdit}
-                onClick={allClick?this.handleNumClick:null}
-                contentEditable={editable}
-                onBlur={this.handleBlur}
-                onKeyDown={handleEnter}
-                onFocus={this.stopBubble.bind(this)}>
-      <span ref = {this.$pre}>&nbsp;{prefix}</span>
+                onClick={allClick?this.handleNumClick:null}>
+      <span>{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             contentEditable={true}
@@ -285,7 +229,7 @@ class NumberDrop extends Component{
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}
             >&nbsp;{value||placeholder}</span>
-      <span ref = {this.$suf}>&nbsp;{suffix}</span>
+      <span>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  onClose={handleHide}
                  show={show}

+ 34 - 26
src/components/Operation/index.jsx

@@ -160,33 +160,37 @@ class Operation extends Component {
       Notify.info('模板数据不能为空')
       return false
     }
-    console.log(jsonStr,'文本')
-    console.log(jsonData,'结构')       //测试需要用到,不要删了
+    // console.log(jsonStr,'文本')
+    // console.log(jsonData,'结构')       //测试需要用到,不要删了
+    // console.log(tmpLis,'接口返回的')
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
-      let dataJson = tmpLis[i].dataJson;
+      // let dataJson = tmpLis[i].dataJson;
       // console.log(jsonStr.chief , JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')))
-      // console.log(jsonData.chief , JSON.parse(dataJson).chief)
       if(whichSign == 0){
         if(
           jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
           jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
           jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
-          jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')'))  &&
-          JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
-          JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
-          JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
-          JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
-          JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-          JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-          JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-          JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-          JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
-          JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
-          JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
-          JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
-          JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
-          JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
+          jsonStr.vital == JSON.stringify(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
+          // JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
+          // JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
+          // JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
+          // JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
+          // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
+          // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
+          // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
+          // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
+          // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
+          // JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
+          // JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
+          // JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
+          // JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
+          // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
         ){
           Notify.info('该模板已保存');
           return false;
@@ -197,13 +201,17 @@ class Operation extends Component {
           jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
           jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
           jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
-          jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')'))  &&
-          JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-          JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-          JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-          JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-          JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
-          JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
+          jsonStr.vital == JSON.stringify(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
+          // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
+          // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
+          // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
+          // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
+          // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
+          // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
         ){
           Notify.info('该模板已保存');
           return false;

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

@@ -28,6 +28,7 @@ class Preview extends Component {
             dataJson={dataJson}
             dataStr={dataStr}
             show={false}
+            come={'preview'}
         ></PreviewBody>
       </div>
     </div>

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

@@ -7,7 +7,7 @@ const PreviewInspect = (props) => {
       <td className={style['patInfoSec']}>化验:</td>
       <td className={style['patInfoSec']}>
         {
-          dataJson.lis.getExcelDataList && dataJson.lis.getExcelDataList.map((items) => {
+          dataJson&&dataJson.getExcelDataList && dataJson.getExcelDataList.map((items) => {
             return items.lisExcelRes && items.lisExcelRes.map((item) => {
               return <table style={style.assistTable}>
                 <tr style={style.assistTableTrFst}><td><span>{item.menus}</span></td></tr>
@@ -32,7 +32,7 @@ const PreviewInspect = (props) => {
           })
         }
         {
-          dataJson.lis.labelList && dataJson.lis.labelList.map((item, idx) => {
+          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>:

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

@@ -22,9 +22,9 @@ const ItemPart = (props) => {
       </td>:
       <td className={style['patInfoSec']}>
       {
-        other_yjs.str1
+        other_yjs&&other_yjs.str1
       }
-      {dataJson['yjs_1']||dataJson['yjs_2']||dataJson['yjs_3']||dataJson['yjs_4']?<table className={style['formulaTable']}>
+      {(dataJson&&dataJson['yjs_1'])||(dataJson&&dataJson['yjs_2'])||(dataJson&&dataJson['yjs_3'])||(dataJson&&dataJson['yjs_4'])?<table className={style['formulaTable']}>
         <tr>
           <td rowSpan='2' className={style['alignMiddle']}>月经史:(</td>
           <td rowSpan='2' className={style['alignMiddle']}>{dataJson['yjs_1']||'初潮年龄'}</td>
@@ -36,7 +36,7 @@ const ItemPart = (props) => {
         </tr>
       </table>:''}
       {
-        other_yjs.str2
+       other_yjs&&other_yjs.str2
       }
     </td>
 

+ 25 - 13
src/components/PreviewBody/index.jsx

@@ -101,8 +101,20 @@ class PreviewBody extends Component {
     }
   }
   render() {
-    const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
-    const other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
+    const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
+    let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
+    if(!come){
+      other_data = JSON.parse(baseObj.detailList[2].contentJson)
+      lis_data = JSON.parse(baseObj.detailList[4].contentJson)
+      pas_data = JSON.parse(baseObj.detailList[5].contentJson)
+      adviceData = JSON.parse(baseObj.detailList[7].contentJson)
+      other_yjs = other_data&&other_data.pfix;
+      access = other_data&&other_data.haveAssess
+    }else{
+      other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
+      access = dataJson.haveAssess
+      adviceData=dataJson.advice
+    }
     //const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
     const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
@@ -111,26 +123,26 @@ class PreviewBody extends Component {
         <table className={style['infos']}>
           <ItemPart dataStr={dataStr.chief} title={'主诉:'} type={1}></ItemPart>
           <ItemPart dataStr={dataStr.present} title={'现病史:'} type={1}></ItemPart>
-          <ItemPart dataStr={dataStr.present} title={'其他史:'} dataJson={dataJson} other_yjs={other_yjs} type={3}></ItemPart>
+          <ItemPart dataStr={dataStr.present} title={'其他史:'} dataJson={come?dataJson:other_data} other_yjs={other_yjs} type={3}></ItemPart>
           <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>
-          <PreviewInspect dataJson={dataJson} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetails}></PreviewInspect>
+          <PreviewInspect dataJson={come?dataJson.lis:lis_data} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetails}></PreviewInspect>
           <ItemPart dataStr={dataStr.pacs} title={'辅检:'} type={2}></ItemPart>
           <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2}></ItemPart>
           <tr className={style['patInfoFst']}>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={`${style['patInfoSec']} ${style['pushMessage']} ${style['font14']}`}>
-              {((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <p className={style.pushMessageTitle}><span>开单项目</span></p>}
+              {((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check)&& (adviceData&&adviceData.assay.check > 0))) && <p className={style.pushMessageTitle}><span>开单项目</span></p>}
               {
-                ((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <div className={style.pushMessageDes}>{dataJson.advice.check?dataJson.advice.check+',':''} {dataJson.advice.assay}</div>
+                ((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check) && (adviceData&&adviceData.assay.check > 0))) && <div className={style.pushMessageDes}>{adviceData.check?adviceData.check+',':''} {adviceData.assay}</div>
               }
-              {dataJson.advice.commontreatment && dataJson.advice.commontreatment.length > 0 && <p  className={style.pushMessageTitle}><span>一般治疗</span></p>}
+              {adviceData&&adviceData.commontreatment && adviceData.commontreatment.length > 0 && <p  className={style.pushMessageTitle}><span>一般治疗</span></p>}
               {
-                dataJson.advice.commontreatment && <div dangerouslySetInnerHTML={{__html: dataJson.advice.commontreatment}} className={style.pushMessageDes}></div>
+                adviceData&&adviceData.commontreatment && <div dangerouslySetInnerHTML={{__html: adviceData.commontreatment}} className={style.pushMessageDes}></div>
               }
-              {dataJson.advice.followUp && dataJson.advice.followUp.length > 0 && <p className={style.pushMessageTitle}><span>回访时间:<span className={style['bbtm']}>{dataJson.advice.followUp}</span> 后回访,不适随诊</span></p>}
-              {dataJson.advice.scheme && dataJson.advice.scheme.length > 0 && <p className={style.pushMessageTitle}><span>治疗方案</span></p>}
+              {adviceData&&adviceData.followUp && adviceData.followUp.length > 0 && <p className={style.pushMessageTitle}><span>回访时间:<span className={style['bbtm']}>{adviceData.followUp}</span> 后回访,不适随诊</span></p>}
+              {adviceData&&adviceData.scheme && adviceData.scheme.length > 0 && <p className={style.pushMessageTitle}><span>治疗方案</span></p>}
               {
-                dataJson.advice.scheme && dataJson.advice.scheme.map((item, index) => {
+                adviceData&&adviceData.scheme && adviceData.scheme.map((item, index) => {
                   return <p>{item.treatment.map((it, ii) => {
                     return (it.treatmentStr && it.treatmentStr.length > 0 ?
                       <div className={style.pushMessageDes}>{it.treatmentStr}</div> : '')
@@ -138,13 +150,13 @@ class PreviewBody extends Component {
                   })
               }
               {
-                dataJson.advice.adviceInput && <div className={style.pushMessageDes}>{dataJson.advice.adviceInput}</div>
+                adviceData&&adviceData.adviceInput && <div dangerouslySetInnerHTML={{__html: adviceData.adviceInput}} className={style.pushMessageDes}></div>
               }
             </td>
           </tr>
         </table>
         <p className={style.docName}>医生签名:<span>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
-        {showAssessBtn&&dataJson.haveAssess?<AssessResultHis showHistoryCases={showHistoryCases} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
+        {showAssessBtn&&access?<AssessResultHis showHistoryCases={showHistoryCases} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
         <div onClick={() => { this.surePrint(dataStr) }} className={style.printBtn} style={{
           display: show ? 'inline-block' : 'none',
         }}>打印</div>

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

@@ -33,6 +33,7 @@ class PrintPreview extends Component {
                       show={true}
                       onClose={onClose}
                       save={save}
+                      come={'preview'}
                   ></PreviewBody>
             </div>
         </div>

+ 16 - 6
src/components/PushContainer/index.jsx

@@ -2,8 +2,7 @@ import React, { Component } from 'react';
 import style from './index.less';
 import { Tab, ConfirmModal, Notify } from '@commonComp';
 import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow } from '@store/actions/tabTemplate';
-import { initItemList, delItem, delBatchItem, changeTitleAsync, saveTemplateDetail } from '@store/async-actions/tabTemplate';
-import { CHANGE_TYPE } from "@store/types/typeConfig";
+import { initItemList, delItem, delBatchItem, changeTitleAsync, setPageView } from '@store/async-actions/tabTemplate';
 import { connect } from "react-redux";
 import store from '@store';
 import { billing } from '@store/async-actions/pushMessage';
@@ -66,7 +65,7 @@ class PushContainer extends Component {
    */
   handleActiveClick(id) {
     if (id == '1') {
-      store.dispatch(initItemList());
+      store.dispatch(initItemList("",1));
     }
     store.dispatch(tabChange(id))
   }
@@ -205,6 +204,11 @@ class PushContainer extends Component {
     })
     store.dispatch(changeVisible(true))
   }
+  handleClickGetMore(page){
+    let tmpPage = ++page
+    store.dispatch(initItemList("",tmpPage,true))
+  }
+  
   makeSure() {
     if (this.state.type == 1) {
       store.dispatch(delItem(this.state.id))
@@ -225,11 +229,12 @@ class PushContainer extends Component {
       store.dispatch(changeTitleAsync(tempObj))
     } else if (this.state.type == 4) {        //模板引入
       const { items } = this.props;
+      store.dispatch(setPageView(this.state.id,items[0].type))
       items && items.map((part) => {
         if (this.state.id == part.id) {
           let typeConfig = part.type;
-          store.dispatch(keepPushData(part, 'part'))                 //引用数据的存储,用于保存模板是判断数据是否变化
-          pushAllDataList(typeConfig, 'push', part, 'template')       //引用
+          // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
+          // pushAllDataList(typeConfig, 'push', part, 'template')//引用
           if (didPushParamChange()) {
             store.dispatch(billing())
           }
@@ -242,7 +247,7 @@ class PushContainer extends Component {
     store.dispatch(changeVisible(false));
   }
   render() {
-    const { activeId, checkItems, visible, showMsg, items, allCheckShow } = this.props;
+    const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow } = this.props;
     return <div className={style["container"]} ref={this.$cont} >
       <Tab tabs={this.state.tabs}
         activeId={activeId}
@@ -252,6 +257,8 @@ class PushContainer extends Component {
           <PushItemsContainer></PushItemsContainer>
           <TemplateItems
             items={items}
+            current={current}
+            hasMore={hasMore}
             checkItems={checkItems}
             allCheckShow={allCheckShow}
             handleContentClick={this.handleContentClick}
@@ -260,6 +267,7 @@ class PushContainer extends Component {
             handleDelList={this.handleDelList}
             handleMangerTemplate={this.handleMangerTemplate}
             handleAllCheckbox={this.handleAllCheckbox}
+            handleClickGetMore={this.handleClickGetMore}
           ></TemplateItems>
           <MedicalInfoContainer></MedicalInfoContainer>
           <ScaleSearchContainer></ScaleSearchContainer>
@@ -285,6 +293,8 @@ class PushContainer extends Component {
 const mapStateToProps = (state) => {
   return {
     items: state.tabTemplate.items,
+    current: state.tabTemplate.current,
+    hasMore: state.tabTemplate.hasMore,
     activeId: state.tabTemplate.activeId,
     checkItems: state.tabTemplate.checkItems,
     allChecked: state.tabTemplate.allChecked,

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

@@ -50,7 +50,8 @@ class TemplateItems extends React.Component {
         }
     }
     render() {
-        const { allCheckShow, handleMangerTemplate, handleDelList, handleAllCheckbox, items,checkItems } = this.props;
+        const { allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
+        // console.log(hasMore,current,7877877)
         return (
             <div className={style.wrapper}>
                 {
@@ -75,6 +76,10 @@ class TemplateItems extends React.Component {
                         this.genItems().length > 0?this.genItems():
                         <Empty message={'还没有保存模板'}></Empty>
                     }
+                    {
+                      hasMore?<p onClick={()=>handleClickGetMore(current)} className={style.loadMore}>点击查看更多</p>:null
+                    }
+                    
                 </div>
             </div>
         )

+ 6 - 0
src/components/TemplateItems/index.less

@@ -52,5 +52,11 @@
             color: @template-color;
         }
     }
+    .loadMore {
+      text-align: center;
+      color: #2a9bd5;
+      cursor: pointer;
+      margin-top: 15px;
+    }
 }
 

+ 4 - 2
src/components/Treat/index.jsx

@@ -16,6 +16,7 @@ import drugIcon from './img/drug.png';
 import adverseReactionIcon from './img/adverseReaction.png';
 import $ from "jquery";
 import {dragBox} from '@utils/drag';
+import ReactDom from "react-dom";
 
 class Treat extends Component {
     constructor(props){
@@ -65,7 +66,8 @@ class Treat extends Component {
                 selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo,
                 title, drugInfoList, hideDrugInfoMore, adversReactionList, changeReact, followUp, setFollowUp, isRead, hasFollowUp} = this.props;
         const { zIndex,show } = this.state
-        return(
+        const domNode = document.getElementById('root');
+        return ReactDom.createPortal(
             <div   className={style['treat-wrapper']}>
                 <div className={style['treat-mask']} onClick={this.hideTreat}>
                 </div>
@@ -125,7 +127,7 @@ class Treat extends Component {
                 {showDrug && drugInfo && <DrugInfo setTreatBox={this.setTreatBox} treatIndexSet={treatIndexSet} drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
                 {/* 查询多个药品说明书 (添加数据查看药品说明书用)*/}
                 {/* {showDrug && <DrugInfo drugInfoList = {drugInfoList} hideDrugInfoMore = {hideDrugInfoMore}></DrugInfo>} */}
-            </div>
+            </div>,domNode
         )
     }
 }

+ 2 - 5
src/containers/DiagnosticList.js

@@ -1,16 +1,13 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import DiagnosticList from '@components/DiagnosticList';
-import { ADD_DIAGNOSTIC,  DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, GET_IS_FIRST, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
+import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
 import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 import {keepPushData} from '@store/actions/tabTemplate';
-import { showHistory,sortHistory,activeHistory,visibleHistory } from '@store/actions/historyTemplates'
-import {CURRENT_CHRONIC} from '@store/types/currentIll';
+import { visibleHistory } from '@store/actions/historyTemplates'
 import {autoFillModules} from '@store/async-actions/fetchModules';
-import { initItemList } from '@store/async-actions/historyTemplates';
-import {MODI_LOADING} from '@store/types/homePage.js';
 import {SET_ASSESS_DATA} from '@types/assessResult';
 
 function mapStateToProps(state) {

+ 0 - 25
src/containers/InlineTag.js

@@ -6,7 +6,6 @@ import {SETCURRENTINPUT,CURRENT_TEXT_LABEL} from '@types/currentIll';
 import {SETCHECKINPUT} from "@types/checkBody";
 import InlineTag from "../common/components/InlineTag";
 import {getLabelIndex} from '@utils/tools.js';
-import {CLICKCOUNT} from '@types/homePage.js';
 import {CHANGEOTHERTEXTLABEL} from "../store/types/otherHistory";
 import {CHANGECHECKTEXTLABEL} from "../store/types/checkBody";
 import {CHANGE_LABELVAL} from "../store/types/mainSuit";
@@ -22,13 +21,6 @@ const tagInpActions = {
   4:SETCHECKINPUT
 };
 
-const inpEditActions = {
-  1:CHANGE_LABELVAL,
-  2:CURRENT_TEXT_LABEL,
-  3:CHANGEOTHERTEXTLABEL,
-  4:CHANGECHECKTEXTLABEL
-};
-
 function mapDispatchToProps(dispatch,store){
   return {
     handleInput(params) {
@@ -45,23 +37,6 @@ function mapDispatchToProps(dispatch,store){
         subIndex:inner
       })
     },
-    handledbClick(obj){
-      dispatch({
-        type:CLICKCOUNT,
-        data:obj,
-        clickType:'双击',
-        num:1
-      });
-    },
-    saveEditText(obj){
-      const i = getLabelIndex(obj.ikey);
-      const type = obj.ikey.substr(0,1);
-      obj.ikey = i;
-      dispatch({
-        type:inpEditActions[type],
-        data:obj
-      })
-    }
   }
 }
 

+ 5 - 39
src/containers/MultSpread.js

@@ -1,11 +1,11 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import MultSpread from "@components/MultSpread";
-import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL,OTHERADDLABELITEM} from '@types/otherHistory';
-import {CHANGECHECKTEXTLABEL,ADDLABELITEM} from '@types/checkBody.js';
-import {CHANGE_LABELVAL,MAINADDLABELITEM} from '@store/types/mainSuit.js';
-import {CURRENTADDLABELITEM,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
-import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD} from '@store/types/homePage.js';
+import {OTHERADDLABELITEM} from '@types/otherHistory';
+import {ADDLABELITEM} from '@types/checkBody';
+import {MAINADDLABELITEM} from '@store/types/mainSuit';
+import {CURRENTADDLABELITEM} from '@store/types/currentIll';
+import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD} from '@store/types/homePage';
 
 function mapStateToProps(state){
   return {}
@@ -34,15 +34,6 @@ const getCopyData = (copyId,inx,boxMark)=>{
   }
 };
 
-/**************************双击标签输入*********************************/
-
-const editTypes={
-  1:CHANGE_LABELVAL,      //主诉
-  2:CURRENT_TEXT_LABEL,                   //现病史
-  3:CHANGEOTHERTEXTLABEL,  //其他史
-  4:CHANGECHECKTEXTLABEL    //查体
-};
-
 function mapDispatchToProps(dispatch){
   return {
     resetHide(){
@@ -50,14 +41,6 @@ function mapDispatchToProps(dispatch){
         type: RESET
       })
     },
-    handleDbclick(obj){
-      dispatch({
-        type:CLICKCOUNT,
-        data:obj,
-        clickType:'双击',
-        num:1
-      });
-    },
     saveAddItem(id,data){      //保存有加号的标签原始数据
       dispatch({
         type:SETADDITEMINIT,
@@ -78,16 +61,6 @@ function mapDispatchToProps(dispatch){
       });
       dispatch(getCopyData(copyId,inx,boxMark));
     },
-    saveEditText(params){
-      const {type} = params;
-      const index = params.ikey;
-      let ikey = index.split("-")[1];
-      const {changeVal,totalVal} = params;
-      dispatch({
-        type:editTypes[+type],
-        data:{changeVal:changeVal,ikey:ikey,totalVal}
-      });
-    },
     handleClick(obj){
       dispatch({
         type:CLICKCOUNT,
@@ -96,13 +69,6 @@ function mapDispatchToProps(dispatch){
         num:1
       });
     }
-    /*handleConfirm(checks,key){
-      dispatch({
-        type: CONFIRMSELECTED,
-        checks,
-        key
-      })
-    }*/
   }
 }
 

+ 7 - 81
src/containers/NumberDrop.js

@@ -1,15 +1,15 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import NumberDrop from "@components/NumberDrop";
-import {SETNUMBER,CHANGEOTHERTEXTLABEL,CHANGEOTHERTEXTLABEL_NUMBER} from '@types/otherHistory';
-import {SETNUMBER4,CHANGECHECKTEXTLABEL,CHANGECHECKTEXTLABEL_NUMBER} from '@types/checkBody.js';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} from '@types/homePage.js';
-import {NUMBER_SELECT,CHANGE_LABELVAL,CHANGE_LABELVAL_NUMBER} from '@store/types/mainSuit.js';
-import {CURRENT_NUMBER,CURRENT_TEXT_LABEL,CURRENT_TEXT_LABEL_NUMBER} from '@store/types/currentIll.js';
+import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
+import {SETNUMBER4} from '@types/checkBody';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} from '@types/homePage';
+import {NUMBER_SELECT} from '@store/types/mainSuit';
+import {CURRENT_NUMBER} from '@store/types/currentIll';
 import {billing} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange,filterDataArr,getLabelIndex} from '@utils/tools.js';
-import config from '@config/index.js';
+import {filterArr,didPushParamChange,filterDataArr} from '@utils/tools';
+import config from '@config/index';
 
 function mapStateToProps(state){
   return {
@@ -69,55 +69,7 @@ function handleModuleDiff(dispatch,params){
     default:
   }
 }
-/**************************双击标签输入*********************************/
-// 主诉
-function mainSuitLabel(dispatch,params){
-  const index = params.ikey;
-  let ikey = getLabelIndex(index);
-  const {changeVal,totalVal} = params;
-  dispatch({
-    // type:CHANGE_LABELVAL,
-    type:CHANGE_LABELVAL_NUMBER,
-    data:Object.assign({},params,{ikey})
-  })
-}
-// 现病史
-function currentLabel(dispatch,params){
-  const index = params.ikey;
-  let ikey = getLabelIndex(index);
-  dispatch({
-    // type:CURRENT_TEXT_LABEL,
-    type:CURRENT_TEXT_LABEL_NUMBER,
-    data:Object.assign({},params,{ikey})
-  });
-  dispatch({
-    type:ISREAD
-  })
-}
-
-//其他史
-function otherHisLabelEdit(dispatch,params){
-  const index = params.ikey;
-  //const {changeVal,totalVal} = params;
-  let ikey = getLabelIndex(index);
-  dispatch({
-    // type:CHANGEOTHERTEXTLABEL,
-    type:CHANGEOTHERTEXTLABEL_NUMBER,
-    data:Object.assign({},params,{ikey})
-  })
-}
 
-//查体
-function checkBodyLabelEdit(dispatch,params){
-  const index = params.ikey;
-  let ikey = getLabelIndex(index);
-  //const {changeVal,totalVal} = params;
-  dispatch({
-    // type:CHANGECHECKTEXTLABEL,
-    type:CHANGECHECKTEXTLABEL_NUMBER,
-    data:Object.assign({},params,{ikey})
-  })
-}
 function mapDispatchToProps(dispatch,store){
   return {
     handleSelect(params){
@@ -130,14 +82,6 @@ function mapDispatchToProps(dispatch,store){
         }
       },config.delayPushTime);
     },
-    handleDbclick(obj){
-      dispatch({
-        type:CLICKCOUNT,
-        data:obj,
-        clickType:'双击',
-        num:1
-      });
-    },
     handleHide(){
       dispatch({
         type:HIDEDROP
@@ -158,24 +102,6 @@ function mapDispatchToProps(dispatch,store){
         type: RESET
       });*/
     },
-    handleLabelChange(params){
-      const {type} = params;
-      switch (+type){
-        case 1:
-          mainSuitLabel(dispatch,params);
-          break;
-        case 2:
-          currentLabel(dispatch,params);
-          break;
-        case 3:
-          otherHisLabelEdit(dispatch,params);
-          break;
-        case 4:
-          checkBodyLabelEdit(dispatch,params);
-          break;
-        default:
-      }
-    }
   }
 }
 

+ 1 - 1
src/containers/PushContainer.js

@@ -7,7 +7,7 @@ function mapStateToProps(state) {
     return {
         showHistoryCases:state.historyTemplates.showHistoryCases,
         activeHistory:state.historyTemplates.activeHistory,
-        items:state.historyTemplates.items,
+        items:state.historyTemplates.items
     }
 }
 

+ 1 - 1
src/containers/PushItemsContainer.js

@@ -17,7 +17,7 @@ function mapStateToProps(state) {//console.log(state)
         tableList: pushMessage.tableList,
         showList: pushMessage.showList,
         chronicPushItems: pushMessage.chronicPushItems,
-        setPushEmergencyIdx: state.pushMessage.setPushEmergencyIdx || '',  
+        setPushEmergencyIdx: state.pushMessage.setPushEmergencyIdx || '',
         sysConfig:state.homePage.sysConfig,
         windowHeight:state.homePage.windowHeight,
     }

+ 1 - 1
src/containers/TypeConfigContainer.js

@@ -49,7 +49,7 @@ function mapDispatchToProps(dispatch) {
           });
           dispatch(getOtherHisRecord());        //获取其他史最近记录
           Notify.success("模式切换成功");
-          dispatch(initItemList(confirmType));
+          dispatch(initItemList(confirmType,1));//切换模式调用模板接口
           dispatch(allCheckedShow(false))    //全选反选显示重置
           dispatch({//推送重置
             type: BILLING_ADVICE,

+ 10 - 9
src/store/async-actions/fetchModules.js

@@ -1,15 +1,15 @@
-import {json,expJson} from '@utils/ajax.js';
-import {SET,PRESET} from '@types/checkBody.js';
+import {json,expJson} from '@utils/ajax';
+import {SET,PRESET} from '@types/checkBody';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
-import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone} from '@utils/tools.js';
+import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone,filterDataArr} from '@utils/tools';
 import {Notify} from '@commonComp';
 import {billing} from '@store/async-actions/pushMessage';
 import {SETOTHERHISTORY,ISREAD} from "../types/homePage";
 import config from "@config/index";
 import {CURRENT_CHRONIC} from '@store/types/currentIll';
-import {MODI_LOADING} from '@store/types/homePage.js';
-import {GET_ALL_HIS,FILTER_ALL_HIS} from '@store/types/emergencyHis.js';
+import {MODI_LOADING} from '@store/types/homePage';
+import {GET_ALL_HIS,FILTER_ALL_HIS} from '@store/types/emergencyHis';
 import {SET_IMPORT_CHECKBODY_LABEL} from "../types/checkBody";
 
 const api={
@@ -120,17 +120,18 @@ export const getOtherHisRecord = ()=>{
               save:[objStr[0]]
             });
           }else{
+            const text = filterDataArr(objStr);
             dispatch({
               type:SETOTHERHISTORY,
-              data:arr,
-              period:{
+              data:[{tagType:8,name:'',controlType:0,value:text}],
+              /*period:{
                 yjs_1: obj.yjs_1,
                 yjs_2: obj.yjs_2,
                 yjs_3: obj.yjs_3,
                 yjs_4: obj.yjs_4,
               },
-              selecteds:obj.otherHistorySelecteds,
-              save:objStr
+              selecteds:obj.otherHistorySelecteds,*/
+              save:[text]
             });
           }
         }

+ 30 - 7
src/store/async-actions/historyTemplates.js

@@ -1,17 +1,20 @@
 import axios from '@utils/ajax';
-
+import { pushAllDataList } from '@utils/tools';
 import { initHistory } from '@store/actions/historyTemplates';
+import Notify from '@commonComp/Notify';
 import store from '@store';
 
 export const initItemList = (item) => {
-    let baseList = store.getState();
-    // let whichSign = baseList.typeConfig.typeConfig;
-    let state = baseList.patInfo.message;
-    const param = {
+  let baseList = store.getState();
+  // let whichSign = baseList.typeConfig.typeConfig;
+  let state = baseList.patInfo.message;
+  const param = {
       "hospitalId": state.hospitalId,
       "patientId": state.patientId,
-      "disName":item?item.name : 'dis',
-      "disType":item?1:0
+      "disName":item&&item.name?item.name : 'dis',
+      "disType":item?1:0,
+      "current": 1,
+      "size": 9999
     }
     /*return (dispatch) => {
         axios.json('/inquiryInfo/hisInquirys',param).then((res)=>{
@@ -25,6 +28,26 @@ export const initItemList = (item) => {
     }*/
     return axios.json('/inquiryInfo/hisInquirys',param);
 };
+export const getHistempDetail = (item) => {
+  const param = {
+      "inquiryId": item.id
+    }
+    return (dispatch) => {
+        axios.json('/inquiryInfo/getInquiryDetail',param).then((res)=>{
+            const data =res.data;
+            if(data.code == 0){
+                let tmpData = data.data
+                // let tmpList = tmpData.inquiryDetailList
+                // tmpData.detailList = tmpList
+                // console.log(tmpData)
+                pushAllDataList(item.sign,'push',tmpData,'history')       //引用                
+            }else{
+                console.log(data)
+                Notify.error(data.msg);
+            }
+        })
+    }
+};
 
 export function setInitHistory(data){
   return (dispatch) => {

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

@@ -74,10 +74,10 @@ export const initHistoryDetails = (dispatch) => {
                         confirmType: detail.sign
                     })
                     if(baseList.tabTemplate.items.length == 0){
-                      dispatch(initItemList());        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
+                      dispatch(initItemList("",1));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
                     }
                 }else{
-                  dispatch(initItemList(baseList.typeConfig.typeConfig))
+                  dispatch(initItemList(baseList.typeConfig.typeConfig,1))
                 }
                 dispatch({type:MODI_LOADING,flag:false});
             } else {
@@ -104,7 +104,7 @@ export async function getPatientMessage(dispatch, getState){
   let res2 = await json(api.getPatBaseInfo, params);
   /*console.log(res2);
   console.log(2);*/
-  let data1 = {},data2={};
+  let data1 = {},data2 = {};
   if(res1.data.code=='0'){
     data1 = res1.data.data;
   }

+ 19 - 1
src/store/async-actions/print.js

@@ -7,7 +7,8 @@ import {
     getAllDataList,
     getAllDataStringList,
     pushAllDataList,
-    filterDataArr
+    filterDataArr,
+    filterOtherDataArr
 } from '@utils/tools';
 
 export const saveMessage = (bool) => {
@@ -20,12 +21,21 @@ export const saveMessage = (bool) => {
     const lisData = baseList.inspect.pushItem;
     const lisArr = transferIndexData(lisData);
     const haveAssess = Object.keys(baseList.assessResult.data).length>0;
+    let otherData = {},pacsData={};
     const evaluation={
       htmlContent:haveAssess?JSON.stringify(getEvaluations(baseList.assessResult,pushMessage)):'{}',
       //scaleList:[]
     };//getEvaluation();
     //console.log(baseList)
     // console.log(jsonStr.diag,'保存历史病历')
+    otherData['yjs_1']=jsonData['yjs_1']||''
+    otherData['yjs_2']=jsonData['yjs_2']||''
+    otherData['yjs_3']=jsonData['yjs_3']||''
+    otherData['yjs_4']=jsonData['yjs_4']||''
+    otherData['haveAssess']=haveAssess
+    otherData['pfix']=jsonStr.other?filterOtherDataArr(JSON.parse(jsonStr.other),jsonData.other):''
+    pacsData.pacs = jsonData.pacs
+    pacsData.checkedListImport = jsonData.checkedListImport
     json('/inquiryInfo/saveInquiry', {
         "doctorId": state.doctorId,
         "hospitalDeptId": state.hospitalDeptId,
@@ -37,34 +47,42 @@ export const saveMessage = (bool) => {
         "detailList": [{
             "content": jsonStr.chief,
             "contentValue":filterDataArr(JSON.parse(jsonStr.chief)),
+            "contentJson":'',
             "type": 1
         }, {
             "content": jsonStr.present,
             "contentValue":filterDataArr(JSON.parse(jsonStr.present)),
+            "contentJson":'',
             "type": 2
         }, {
             "content": jsonStr.other,
             "contentValue":filterDataArr(JSON.parse(jsonStr.other)),
+            "contentJson":JSON.stringify(otherData),
             "type": 3
         }, {
             "content": jsonStr.vital,
             "contentValue":filterDataArr(JSON.parse(jsonStr.vital)),
+            "contentJson":'',
             "type": 4
         }, {
             "content": jsonStr.lis,
             "contentValue":jsonStr.lis,
+            "contentJson":JSON.stringify(jsonData.lis),
             "type": 5
         }, {
             "content": jsonStr.pacs,
             "contentValue":jsonStr.pacs,
+            "contentJson":JSON.stringify(pacsData),
             "type": 6
         }, {
             "content": jsonStr.diag,
             "contentValue":jsonStr.diag,
+            "contentJson":'',
             "type": 7
         }, {
             "content": jsonStr.advice,
             "contentValue":jsonStr.advice,
+            "contentJson":JSON.stringify(jsonData.advice),
             "type": 8
         }],
         "sign": whichSign, //类型0结构化 1文本

+ 27 - 6
src/store/async-actions/tabTemplate.js

@@ -12,24 +12,29 @@ import Notify from '@commonComp/Notify';
 import store from '@store';
 import {
   getAllDataList,
-  getAllDataStringList
+  getAllDataStringList,
+  pushAllDataList
 } from '@utils/tools';
 
-export const initItemList = (type) => { //初始化数据
+export const initItemList = (type,current,flg) => { //初始化数据
   let baseList = store.getState();
   let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
 
   return (dispatch) => {
-    axios.json('/templateInfo/getByDoctorIdTemplates', {
+    axios.json('/templateInfo/getTemplatePageAlls', {
       "doctorId": state.doctorId,
       "hospitalDeptId": state.hospitalDeptId,
       "hospitalId": state.hospitalId,
       "type": type || whichSign,
+      "current": current,
+      "sex":[1,2,3],
+      "size": 9999
     }).then((res) => {
       const data = res.data;
       if (data.code == 0) {
-        dispatch(initItems(data));
+        // data.data.flg = flg||false  //获取下一页,暂时不用
+        dispatch(initItems(data.data));
       } else {
         Notify.error(data.msg)
       }
@@ -71,7 +76,7 @@ export const saveTemplateDetail = (val,sex) => { //保存为模板
       const data = res.data;
       if (data.code == 0) {
         Notify.success('模板保存成功');
-        dispatch(initItemList());
+        dispatch(initItemList("",1));
         dispatch(keepPushData(getdata(1),'part'));
         dispatch({
           type: DIAG_SHOW,
@@ -124,6 +129,7 @@ export const delBatchItem = (ids) => { //批量删除
     })
   }
 };
+
 export const changeTitleAsync = (obj) => { //改标题
   let baseList = store.getState();
   let whichSign = baseList.typeConfig.typeConfig;
@@ -147,9 +153,24 @@ export const changeTitleAsync = (obj) => { //改标题
         Notify.success('标题修改成功');
         store.dispatch(changeVisible(false))
       } else {
-        console.log(data)
+        // console.log(data)
         Notify.error(data.msg)
       }
     })
   }
+};
+
+export const setPageView = (id,typeConfig) => { //批量删除
+  return (dispatch) => {
+    axios.json('/templateInfo/getTemplateIdAlls', {
+      id: id
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        pushAllDataList(typeConfig, 'push', data.data, 'template')//引用
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
 };

+ 2 - 0
src/store/reducers/assessResult.js

@@ -47,6 +47,8 @@ export default (state=init,action)=>{
       res.indexTimeTypes = {};
       return res;
     case CLEAR_ASSESS_RESULT_VALUE:
+      res.data = {};
+      res.indexNames = {};
       res.addedScaleIds = [];
       res.calcuResult = {};
       res.calcuValues = {};

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

@@ -28,7 +28,7 @@ export default (state = initHistoryList, action) => {
     }
     if (action.type === HISTORY_INIT) {
         const newState = Object.assign({}, state);
-        const tempArr = action.data || [];
+        const tempArr = action.data.records || [];
         newState.items = [...tempArr];
         newState.activeHistory = tempArr[0];
         return newState;

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

@@ -4,7 +4,7 @@ import {SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT
 import {confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,
   changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText,changeNumLabelVal,multipleComfirn,
   removeId,delSingleLable,setRadioInputValue} from '../actions/otherHistory';
-import config from '@config/index.js';
+import config from '@config/index';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
 const initState = {data:[block],isEmpty:true,saveText:[],selecteds:[],focusIndex:'',editClear:true};

+ 13 - 2
src/store/reducers/tabTemplate.js

@@ -27,6 +27,8 @@ const initDataList = {
   activeItem: {}, //引用的模板
   activeItemHis: {}, //引用的历史病例
   allCheckShow: false, //全选反选是否显示
+  current:1,//当前页
+  hasMore:true,//是否显示更多
 }
 export default (state = initDataList, action) => {
   if (action.type === DEL_ITEMS) {
@@ -49,7 +51,17 @@ export default (state = initDataList, action) => {
   }
   if (action.type === INIT_ITEMS) {
     const newState = Object.assign({}, state);
-    newState.items = action.state.data;
+    // let tmpItems = JSON.parse(JSON.stringify(newState.items))
+    // let tmpCurrent = JSON.parse(JSON.stringify(newState.current))
+    // console.log(action.state.flg,action.state.pages,tmpCurrent,45544)
+    // if(action.state.current == 1&&!action.state.flg){//进入页面会调取分页相关先去掉
+    //   newState.items = action.state.records
+    // }else{
+    //   newState.items = tmpItems.concat(action.state.records);
+    // }
+    newState.items = action.state.records
+    newState.current = action.state.current;
+    newState.hasMore = action.state.current<action.state.pages;
     return newState;
   }
   if (action.type === CHANGE_VISIBLE) {
@@ -89,7 +101,6 @@ export default (state = initDataList, action) => {
       tempArr.splice(tempArr.findIndex(item => item === action.id), 1)
       newState.checkItems = [...tempArr]
     }
-    console.log(newState.checkItems)
     return newState;
   }
   if (action.type === KEEP_PUSH_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.241:5050';//后端接口访问地址
+// const host='http://192.168.2.241: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.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 2 - 2
src/utils/tools.js

@@ -288,7 +288,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
           //其他史data
           const oData = dataJson.other;
           const onlyOneText = oData.length==1&&oData[0].tagType==8&&!(oData[0].name||oData[0].value);
-            if(type == 'template'){        //结构化模板回读
+          if(type == 'template'){        //结构化模板回读
               let dataJsonStr = JSON.parse(reData.preview);
                 // console.log(dataJson,dataJsonStr,'结构化模板引用')
                 store.dispatch({
@@ -358,7 +358,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
             }else{    //结构化历史病历回读
                 /*let dataJson = JSON.parse(reData.dataJson);*/
                 let dataJsonStr = reData.detailList;
-              // console.log(dataJson,dataJsonStr,'结构化历史病历回读')
+              // console.log(dataJsonStr,'结构化历史病历回读')
                 // console.log(dataJson.mainSuitSelecteds,7887)
                 store.dispatch({
                     type: CLEAR_MAIN_SUIT,