Selaa lähdekoodia

新增量表选择

1178232204@qq.com 3 vuotta sitten
vanhempi
commit
78a171b54e

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

@@ -226,7 +226,7 @@ class AddAssistCheck extends React.Component {
     return <React.Fragment>
       <ul className={styles.labelWrap} id="datePick">
         {
-          assistLabel.map((item, idx) => {
+          assistLabel && assistLabel.map((item, idx) => {
             let staticTime = {}
             if (item.time) {
               let tmp1 = (item.time).split(' ')[0].split('-')

+ 37 - 0
src/components/AddGuage/AssistName/index.jsx

@@ -0,0 +1,37 @@
+import React, { Component } from "react";
+import styles from "../index.less";
+import $ from 'jquery';
+import { windowEventHandler, setFontColorSize } from '@utils/tools';
+import checkOff from '@common/images/check_off.png';
+import checkOn from '@common/images/check_on.png';
+
+class AssistName extends Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+		};
+		this.$assistName = React.createRef();
+		this.splitName = this.splitName.bind(this);
+	}
+	splitName(name) {
+		let wid = this.props.winWidth;
+		if (name.length > 15 && wid > 1150) {
+			let tmpStr = name.substr(0, 15)
+			return tmpStr + '...'
+		} else {
+			return name
+		}
+	}
+	render() {
+		const { winWidth, name, getInfomation, normal, item, idx } = this.props;
+		return (
+			<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto', fontWeight: normal ? 'normal' : 'bold' }} ref={this.$assistName}>
+				<span className={styles.tagSpan} title={name}>
+					{name && this.splitName(name)}:
+				</span>
+			</span>
+		);
+	}
+}
+
+export default AssistName;

+ 124 - 0
src/components/AddGuage/Textarea/index.jsx

@@ -0,0 +1,124 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import config from '@config/index';
+import $ from 'jquery';
+import { setFontColorSize,moveEnd} from '@utils/tools';
+import store from '@store';
+import { embedPush } from '../../../store/async-actions/pushMessage'
+class Textarea extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      timer:null,
+      val:'报告描述或意见'
+    };
+    this.textInput = React.createRef();
+    this.$dom = React.createRef();
+    this.$domW = React.createRef();
+    this.handleInput = this.handleInput.bind(this);
+    this.handleFocus = this.handleFocus.bind(this);
+    this.handleInputFocus = this.handleInputFocus.bind(this);
+  }
+  handleInput(e){
+    const {handleChangeGuageValue,idx,handlePush} = this.props;
+    const text = (e.target.innerText || e.target.innerHTML||e.target.textContent);
+    $(e.target).find('img').remove();
+    this.context.scrollArea.scrollBottom();       //避免滚动条上移不见
+    // e.target.innerHTML = e.target.textContent
+    handleChangeGuageValue&&handleChangeGuageValue(text,idx);
+    //右侧推送--延时推送
+    const stimer = this.state.timer;
+    clearTimeout(stimer);
+    let timer = setTimeout(function(){
+      handlePush&&handlePush({mode:9});
+      clearTimeout(stimer);
+    },config.delayPushTime);
+    if(text.trim() != '' && text != '<br>'){
+      e.target.nextSibling.innerText?(e.target.nextSibling.innerText = ''):(e.target.nextSibling.innerHTML = '')
+    }else{
+      e.target.nextSibling.innerText?(e.target.nextSibling.innerText = '报告描述或意见'):(e.target.nextSibling.innerHTML = '报告描述或意见')
+    }
+    $(".TextareaRsize").css({marginTop:0});
+    this.setState({
+      timer
+    });
+  }
+  handleInputFocus(){
+    /*const {handlePush} = this.props;
+    const stimer = this.state.timer;
+    clearTimeout(stimer);
+    let timer = setTimeout(function(){
+      handlePush&&handlePush({mode:9});
+      clearTimeout(stimer);
+    },config.delayPushTime);
+    this.setState({
+      timer
+    });*/
+  }
+  shouldComponentUpdate(next){
+    if(JSON.stringify(next) == JSON.stringify(this.props)){
+      return false;
+    }
+    return true;
+  }
+  componentWillReceiveProps(next){
+    const isRead = this.props.isRead;
+    if(next.isRead != isRead){
+      this.$dom.current.innerText?(this.$dom.current.innerText = next.value||'') : (this.$dom.current.innerHTML = next.value||'')
+      if(next.value && next.value.trim()){
+        this.$dom.current.nextSibling.innerText = ''
+      }else{
+        this.$dom.current.nextSibling.innerHTML = '量表结果'
+      }
+    }
+  }
+  componentDidMount(){
+    const {value} = this.props;
+    if(value && value.trim()){
+      this.$dom.current.innerText?(this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
+      this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
+    }else{
+      this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '量表结果'):(this.$dom.current.nextSibling.innerHTML = '量表结果')
+    }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
+  }
+  handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
+    this.textInput.current.previousSibling.focus();
+    store.dispatch(embedPush({
+      action: "pacs",
+      mode: 1
+    }))
+    // this.textInput.current.previousSibling.focus();
+  }
+  render() {
+    const {idx,disabled} = this.props;
+    return (
+      <div className={style.textWap}>
+        <div className={`${style.divTextarea} ${setFontColorSize(2)}`}
+            contenteditable={disabled?false:true}
+            ref={this.$dom}
+            onInput={this.handleInput}
+            onKeyUp={this.handleInput}
+            onFocus={this.handleInputFocus}
+        ></div>
+        <p ref={this.textInput} onClick={this.handleFocus} className={`${style.textareaWarring} ${setFontColorSize(2)}`}></p>
+      </div>
+    );
+  }
+}
+Textarea.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
+export default Textarea;

+ 37 - 0
src/components/AddGuage/Textarea/index.less

@@ -0,0 +1,37 @@
+.divTextarea {
+  /*overflow-y: auto;*/
+  // overflow-x: hidden;
+  /*max-height: 100px;*/
+  padding-bottom: 3px;
+  border-bottom: 1px dashed #333;
+  box-sizing: border-box;
+  min-height: 21px;
+  // width: 100%;
+  outline: none;
+  line-height: 20px;
+  resize: none;
+  font-family: inherit;
+  position: relative;
+  // z-index: 10;
+  word-break: break-all;
+  word-wrap:break-word;
+  padding-right: 6px;
+}
+.textWap {
+  overflow: hidden;
+  position: relative;
+  .textareaWarring {
+    position: absolute;
+    left: 0;
+    top: 0;
+    color: #a5a3a3;
+    z-index: 5;
+  }
+}
+// .divTextarea:empty:before{ 
+//   content: '报告描述或意见'; 
+//   color: #a5a3a3; 
+// } 
+// .divTextarea:focus:before{
+//   content:none;
+// }

BIN
src/components/AddGuage/img/close.png


BIN
src/components/AddGuage/img/date1.png


BIN
src/components/AddGuage/img/date2.png


BIN
src/components/AddGuage/img/info2.png


BIN
src/components/AddGuage/img/info3.png


+ 224 - 0
src/components/AddGuage/index.jsx

@@ -0,0 +1,224 @@
+import React from 'react';
+import { SearchOption, Notify, Add, DelToast } from '@commonComp';
+import styles from './index.less';
+import config from '@config/index';
+import $ from 'jquery';
+import Textarea from './Textarea';
+import AssistName from './AssistName';
+import { getPageCoordinate, getCurrentDate, setPosition, setFontColorSize } from '@utils/tools';
+import ScrollArea from 'react-scrollbar';
+import report from '@common/images/report_time.png';
+import billing from '@common/images/billing_time.png';
+class AddGuage extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      date: false,
+      dateTime: "",
+      active: '',
+      visible: false,
+      pageTop: '',
+      id: null,
+      stimer: null,
+      activeName: ''
+    }
+    this.handleShowDate = this.handleShowDate.bind(this)
+    this.getSearchList = this.getSearchList.bind(this)
+    this.getGuageLabel = this.getGuageLabel.bind(this)
+    this.handleDelClick = this.handleDelClick.bind(this)
+    this.delConfirm = this.delConfirm.bind(this)
+    this.handleCancel = this.handleCancel.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+
+  handleDelClick(id, item) {
+    this.setState({
+      visible: true,
+      id: id,
+      activeName: item.name
+    })
+  }
+
+  delConfirm(type) {
+    const { handleDelAssist, handlePush } = this.props;
+    const { id, activeName } = this.state;
+    $(".TextareaRsize").css({ marginTop: 0 });
+    handleDelAssist && handleDelAssist(id, activeName, type);
+    handlePush && handlePush({ mode: 9 });           //右侧推送
+    this.setState({
+      visible: false,
+      id: null,
+      activeName: ''
+    })
+    Notify.success("删除成功");
+  }
+
+  handleCancel() {
+    this.setState({
+      visible: false,
+      id: null,
+      activeName: ''
+    })
+  }
+
+  handleSearchShow(e) {
+    const { handlePush } = this.props;
+    let tmpShow = this.state.show;
+    this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
+    // e.stopPropagation(); 
+    if (tmpShow) {
+      this.props.setHighter(48)
+    } else {
+      setPosition(e, "#searchOption", this.props.setHighter)
+      handlePush && handlePush({ mode: 9 });           //右侧推送
+    }
+  }
+  handleShowDate(idx) {
+    this.setState({
+      date: !this.state.date,
+      active: idx
+    })
+  }
+  handleSign(item, idx) {
+    const { handleSign, handlePush } = this.props;
+    handleSign(item, idx)
+    handlePush && handlePush({ mode: 8 });       //右侧推送
+  }
+
+  getSearchList(list) {      //搜索列表
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '15',
+      width: '14px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
+    return <ul className={`${styles.searchLiUl} ${styles.assistListUl}`} style={{ height: '205px', width: '412px', overflow: 'auto' }}>
+      {
+        list && list.map((item, idx) => {
+          return <li key={item.id}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              this.props.setHighter(96)
+              this.handleSign(item, 'search');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}
+          </li>
+        })
+      }
+    </ul>;
+  }
+  handleChangeDate() { }
+  timeSure(date, idx) {
+    this.props.handleChangeDate(date, idx)
+    this.setState({ date: false })
+  }
+  setEdit(e) {
+    // $('.canEdit').blur().attr('disabled','disabled')
+    $(e.target).removeAttr('disabled').focus()
+  }
+  handleBlur() {
+    // const {handlePush} = this.props;
+    $('.canEdit').attr('disabled', 'disabled')
+    // handlePush && handlePush({mode:8});       //右侧推送
+  }
+  handleInput(e, item, idx, tip) {
+    const { setTipValue, handlePush } = this.props
+    setTipValue(item, e.target.value, idx, tip)
+    //右侧推送--延时推送
+    const stimer = this.state.timer;
+    clearTimeout(stimer);
+    let timer = setTimeout(function () {
+      handlePush && handlePush({ mode: 9 });
+      clearTimeout(stimer);
+    }, config.delayPushTime);
+    this.setState({ timer })
+  }
+  handleFocus() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 9 });
+  }
+  getGuageLabel() {
+    const { guageLabel, handleChangeGuageValue, checkOnOff, handleChangeDate, isRead, handlePush, winWidth, getInfomation, guageList } = this.props;
+    const { visible, activeName, id, date } = this.state;
+    //出现滚动条时阻止滚动冒泡,未出现时不阻止,否则外部滚动条滚不动
+    const showedBar = $("#datePick .scrollbar-container").length === 1;
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '1',
+      width: '8px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
+    return <React.Fragment>
+      <ul className={styles.labelWrap} id="datePick">
+        {
+          guageLabel.map((item, idx) => {
+            let staticTime = {}
+            if (item.time) {
+              let tmp1 = (item.time).split(' ')[0].split('-')
+              let tmp2 = (item.time).split(' ').length > 1 && (item.time).split(' ')[1].split(':')
+              staticTime = {
+                year: tmp1[0] - 0,
+                month: tmp1[1] - 0,
+                day: tmp1[2] - 0,
+                hour: tmp2[0],
+                minute: tmp2[1],
+                second: tmp2[2]
+              }
+            }
+            return (item.disabled ? null : <li className={`${styles.assistLists} ${styles.clearfix}`}>
+              <AssistName item={item} idx={idx} checkOnOff={checkOnOff} name={item.name} winWidth={winWidth} handlePush={handlePush} getInfomation={getInfomation}></AssistName>
+              <div className={`${styles.textareaWrap} ${setFontColorSize(2, 1)}`}>
+                <ScrollArea speed={0.8}
+                  horizontal={false}
+                  stopScrollPropagation={showedBar ? true : false}
+                  style={{ maxHeight: '100px' }}
+                  className={styles["area"]}
+                  verticalContainerStyle={contStyle}
+                  verticalScrollbarStyle={barStyle}
+                  contentClassName="content TextareaRsize">
+                  <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeGuageValue={handleChangeGuageValue} idx={idx}></Textarea>
+                </ScrollArea>
+              </div>
+              <div className={`${styles.pointerFinger} ${setFontColorSize(2, 2)}`}>
+                <span className={styles.closeIcon} id="scaleClose" onClick={() => { this.handleDelClick(idx, item) }}></span>
+              </div>
+              <DelToast show={idx == id && item.name == activeName ? visible : false}
+                name={activeName}
+                right={'-40px'}
+                top={'50px'}
+                cancel={this.handleCancel}
+                confirm={() => this.delConfirm(1)} />
+            </li>)
+          })
+        }
+      </ul>
+    </React.Fragment>
+  }
+  render() {
+    const { handleChangeValue, list, assistVal, windowHeight, refreshScroller } = this.props;
+    const { pageTop } = this.state;
+    return (
+      <div className={styles.wrapper}>
+        {this.getGuageLabel()}
+        <div id="aaaa" style={{ position: "relative", clear: 'both' }}>
+          <Add showText="添加量表项" handleClick={(e) => this.handleSearchShow(e)} id="guage" />
+          {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller} searchTop={40} pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length > 0 ? this.getSearchList(list) : (assistVal == '' ? '' : <p style={{ padding: '42px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+          </SearchOption> : ''}
+        </div>
+      </div>
+    )
+  }
+}
+
+export default AddGuage;

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 210 - 0
src/components/AddGuage/index.less


+ 21 - 2
src/components/AnalysisResult/index.jsx

@@ -9,7 +9,7 @@ class AnalysisResult extends Component {
 	}
 	render() {
 		const { show, onClose, data } = this.props;
-		const { chiefLabel, presentLabel, pastLabel, vitalLabel, lis, lisOrder, pacs, pacsOrder, pacsLabel,
+		const { chiefLabel, presentLabel, pastLabel, vitalLabel, lis, lisOrder, pacs, pacsOrder, pacsLabel,scale,
 			diag, operation, operationOrder, transfusion, transfusionOrder, drug, drugOrder } = data;
 		const chiefClinicals = (chiefLabel || {}).clinicals || [];
 		const chiefDiags = (chiefLabel || {}).diags || [];
@@ -21,7 +21,6 @@ class AnalysisResult extends Component {
 		const vitalClinicals = (vitalLabel || {}).clinicals || [];
 		const vitals = (vitalLabel || {}).vitals || [];
 		const { res, pacsNumList } = pacsLabel || {};
-		console.log(data);
 		const domNode = document.getElementById('root');
 		return ReactDom.createPortal(
 			show ? <React.Fragment>
@@ -232,6 +231,26 @@ class AnalysisResult extends Component {
 									})}
 								</table>
 							</div> : ''}
+						{(scale || []).length > 0 ?
+							<div className="tableItem">
+								<p className={styles.title}>量表项目</p>
+								<table>
+									<tr>
+										<th>是否开单</th>
+										<th>原词</th>
+										<th>转化为标准词</th>
+									</tr>
+									{(scale || []).map((item) => {
+										return <tr>
+											<td>否</td>
+											<td>{item.name}</td>
+											<td>{item.uniqueName}</td>
+										</tr>;
+									})}
+								</table>
+							</div> : ''}
+
+
 						{[...(res || []), ...(pacsNumList || [])].length > 0 ?
 							<div className="tableItem">
 								<p className={styles.title}>检查结果</p>

+ 3 - 0
src/components/BlockEmrCont/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from 'react';
 import Diagnosis from '@containers/Diagnosis';
 import Inspect from '@containers/Inspect';
 import AssistCheck from '@containers/AssistCheck';
+import Guage from '@containers/Guage';
 import OperationContainer from '../../containers/OperationContainer'
 import style from './index.less';
 import AdviceContainer from '../../containers/AdviceContainer';
@@ -115,6 +116,8 @@ class BlockEMRCont extends Component {
           <Inspect setHighter={this.setHighter}></Inspect>
           {/* 检查 */}
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
+          {/* 量表 */}
+          <Guage setHighter={this.setHighter}></Guage>
           {/* 诊断 */}
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
           {/* 诊断 */}

+ 83 - 0
src/components/Guage/index.jsx

@@ -0,0 +1,83 @@
+import React from 'react';
+import AddGuage from '../AddGuage';
+import { ItemBox } from '@commonComp';
+import styles from './index.less';
+import { isIE, setFontColorSize } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import store from '@store';
+import { getMRAnalyse } from '@store/async-actions/pushMessage';
+import { SET_CURRENT_MODULE } from '@types/homePage';
+
+class AssistCheck extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      val: '',
+      visible: false,
+      dom: [],
+      isIE: isIE(),
+      ieVersion: null,
+      height: '-1',
+      hide: false,
+      importLis: false
+    }
+    this.refreshScroller = this.refreshScroller.bind(this);
+  }
+
+  refreshScroller() {
+    //更新滚动条状态,解决容器变大滚动条不更新bug
+    return this.context.scrollArea;
+    //this.context.scrollArea.scrollBottom();
+
+  }
+  render() {
+    const { setHighter, checkOnOff, checkedListImport, list, getInfomation, windowHeight, guageLabel, guageVal,
+      handleChangeValue, handleSign, fetchPushInfos, handleDelAssist, handleChangeGuageValue, handleChangeDate,
+      isRead, winWidth, assistList, hideAllDrop, setTipValue } = this.props;
+    return (
+      <div className={styles.wrapper}>
+        <div className={styles.top}>
+          <span id="assistResultData" className={`${setFontColorSize(2, 5)}`}>量表结果数据</span>
+        </div>
+        <ItemBox
+          className={styles.title}
+          hideAllDrop={hideAllDrop}
+          title={'量表'}
+          editable={false}
+          border={true}
+          marginTop={'20px'}
+        >
+          <div style={{ padding: '10px', boxSizing: 'border-box', color: '#000' }} >
+            <AddGuage
+              setTipValue={setTipValue}
+              checkOnOff={checkOnOff}
+              handleChangeValue={handleChangeValue}
+              refreshScroller={this.refreshScroller}
+              list={list}
+              handleSign={handleSign}
+              guageLabel={guageLabel}
+              handleDelAssist={handleDelAssist}
+              handlePush={fetchPushInfos}
+              handleChangeGuageValue={handleChangeGuageValue}
+              handleChangeDate={handleChangeDate}
+              isRead={isRead}
+              winWidth={winWidth}
+              getInfomation={getInfomation}
+              assistList={assistList}
+              guageVal={guageVal}
+              windowHeight={windowHeight}
+              checkedListImport={checkedListImport}
+              setHighter={setHighter}
+            >
+            </AddGuage>
+          </div>
+        </ItemBox>
+      </div>
+    )
+  }
+}
+
+AssistCheck.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
+export default AssistCheck;

+ 73 - 0
src/components/Guage/index.less

@@ -0,0 +1,73 @@
+@import "~@less/mixin.less";
+@import "~@less/variables.less";
+
+
+.top {
+    position: relative;
+    margin: 20px 490px -21px 20px;
+    span {
+        margin-left: 68px;
+        border: 1px dashed @part-border-color;
+        border-bottom: 1px solid #fff;
+        display: inline-block;
+        width: 118px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        position: relative;
+        z-index: 2;
+    }
+}
+
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.pushButton {
+    float: right;
+    // width: 90px;
+    height: 28px;
+    line-height: 28px;
+    border: 1px solid @template-color;
+    color: @template-color;
+    background-color: #fff;
+    border-radius: 5px;
+    font-size: 12px;
+    position: relative;
+    bottom: 3px;
+    cursor: pointer;
+    text-align: center;
+    box-sizing: content-box;
+}
+.title {
+    margin-top: -23px !important;
+}
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.importSelect {
+  position: absolute;
+  width: 120%;
+  top: 29px;
+  left: 0;
+  z-index: 10;
+  font-size: 12px;
+  box-shadow: 0 10px 20px 0 #989DA3;
+  border: 1px solid #dedede;
+  background-color: #fff;
+  // display: none;
+  li {
+    height: 34px;
+    line-height: 34px;
+    padding-left: 10px;
+    cursor: pointer;
+  }
+  li:hover {
+    background-color: @ipt-color;
+    color: #2A9BD5;
+  }
+}

+ 1 - 0
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -323,6 +323,7 @@ class HistoryCaseContainer extends React.Component {
             jsonDataString.vital = dataStr[7] && dataStr[7].content || '';    //查体
             jsonDataString.lis = dataStr[8] && dataStr[8].content || '';      //检验导入填写
             jsonDataString.pacs = dataStr[9] && dataStr[9].content || '';     //检查
+            jsonDataString.scale = dataStr[13] && dataStr[13].content || '';     //检查
             jsonDataString.diag = dataStr[10] &&dataStr[10].content || '';      //诊断
             jsonDataString.tcmDiag = dataStr[12] &&dataStr[12].content || '';      //诊断
             jsonDataString.advice = dataStr[11] && dataStr[11].content || '';       //医嘱

+ 25 - 0
src/components/PreviewBody/ItemScale/index.jsx

@@ -0,0 +1,25 @@
+import style from "../index.less";
+import { filterDataArr } from '@utils/tools';
+import down from '@images/down.png';
+const ItemPart = (props) => {
+  let { dataStr, title, type, dataJson, other_yjs, lastDot } = props;
+  // console.log(dataStr,'dataStr===============');
+  if (lastDot) {
+    dataStr = dataStr.trim().replace(/;$/g, '');
+  }
+  return <tr className={style['patInfoFst']} style={{ flexFlow: 'column' }}>
+    <td className={style['patInfoSec']} className={style['patInfoSecs']}>
+      量表:
+        <span style={{ lineHeight: '36px' }}>量表结果数据</span>
+    </td>
+    <td className={style['patInfoSec']} style={{ padding: '0px 5px 8px 30px',justifyContent:'flex-start' }}>
+      {
+        dataStr && dataStr != '' && dataStr.split('^;').map((item) => {
+          return <div className={style.checkAssist} dangerouslySetInnerHTML={{ __html: item }}></div>
+        })
+      }
+    </td>
+  </tr>
+}
+
+export default ItemPart;

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

@@ -7,6 +7,7 @@ import MedicalAdvice from './MedicalAdvice';
 import PreviewInspect from './Inspect';
 import ItemPart from './ItemPart';
 import ItemPect from './ItemPect';
+import ItemScale from './ItemScale';
 import $ from "jquery";
 import AssessResultHis from '@containers/AssessResultHis';
 import { dragBox } from '@utils/drag';
@@ -132,6 +133,7 @@ class PreviewBody extends Component {
             <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>
             <PreviewInspect dataJson={dataStr.lis} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetailsCopy}></PreviewInspect>
             <ItemPect dataStr={dataStr.pacs} title={'检查:'} type={2}></ItemPect>
+            <ItemScale dataStr={dataStr.scale} title={'量表:'} type={2}></ItemScale>
             <ItemPart dataStr={dataStr.diag} title={'西医诊断:'} type={2} lastDot={true}></ItemPart>
             <ItemPart dataStr={dataStr.tcmDiag} title={'中医诊断:'} type={2} lastDot={true}></ItemPart>
             <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>

+ 99 - 0
src/containers/Guage.js

@@ -0,0 +1,99 @@
+import React from 'react';
+import {
+  connect
+} from 'react-redux';
+import Guage from '@components/Guage';
+import { guageLable, delguageLabel, changeGuageVal, changeDate, allCheckImports, selectOneChecks, showInIcsss, checkOffOn, setTipVal } from '@store/actions/guage';
+import { getSearchList, getInstroduce, getImportLists, getSonDetailList } from '@store/async-actions/guage';
+import { ISREAD, HIDEDROP } from '@store/types/homePage.js';
+import { embedPush, getConceptDetail, getMRAnalyse } from '@store/async-actions/pushMessage';
+import { getCalendarDate } from '@utils/tools';
+
+function mapStateToProps(state) {//console.log(state.typeConfig)
+  return {
+    list: state.guage.list,
+    guageLabel: state.guage.guageLabel,
+    isRead: state.homePage.isRead,
+    winWidth: state.homePage.windowWidth,
+    guageList: state.homePage.guageList,
+    guageVal: state.guage.guageVal,
+    windowHeight: state.homePage.windowHeight,
+    hospitalMsg: state.homePage.sysConfig || {},
+
+    message: state.patInfo.message,
+    hospitalPac: state.guage.hospitalPac,
+    hospitalSonInspect: state.guage.hospitalPacObj,
+    checkedList: state.guage.checkedList,
+    selectGroupList: state.guage.selectGroupList,
+    allCheck: state.guage.allCheck,
+    msgObj: state.guage.msgObj,
+    checkedListImport: state.guage.checkedListImport,
+    typeConfig: state.typeConfig
+  }
+}
+
+function mapDispatchToProps(dispatch, store) {
+  return {
+    setTipValue(item, val, idx, tip) {
+      dispatch(setTipVal(item, val, idx, tip))
+    },
+    checkOnOff(item, idx) {
+      dispatch(checkOffOn(item, idx))
+    },
+    showInIcss() {
+      dispatch(showInIcsss())
+    },
+    selectOneCheck(name, checkItem, item) {
+      dispatch(selectOneChecks(name, checkItem, item))
+    },
+    allCheckImport() {
+      dispatch(allCheckImports())
+    },
+    handleSearchs(data) {
+      dispatch(getImportLists(data))
+    },
+    handleGetSonList(name, time) {
+      dispatch(getSonDetailList(name, time))
+    },
+
+    getInfomation(item) {
+      dispatch(getConceptDetail(item))
+    },
+    handleChangeValue(val) {
+      dispatch(getSearchList(val))
+    },
+    handleSign(item, type) {
+      dispatch(guageLable(item, type))
+      dispatch(getMRAnalyse())
+    },
+    handleDelAssist(idx, name, type) {
+      dispatch(delguageLabel(idx, name, type))
+      dispatch(getMRAnalyse())
+      dispatch({
+        type: ISREAD
+      })
+    },
+    handleChangeGuageValue(val, idx) {
+      dispatch(changeGuageVal(val, idx))
+    },
+    handleChangeDate(info, idx) {
+      let date = getCalendarDate(info);
+      dispatch(changeDate(date, idx))
+    },
+    //右侧推送
+    fetchPushInfos(obj) {
+      obj.action = 'pacs'
+      //调右侧推送
+      dispatch(embedPush(obj));
+    },
+    hideAllDrop() {
+      dispatch({
+        type: HIDEDROP
+      });
+    },
+  }
+}
+
+const GuageAction = connect(mapStateToProps, mapDispatchToProps)(Guage);
+
+export default GuageAction;

+ 45 - 0
src/store/actions/guage.js

@@ -0,0 +1,45 @@
+import {SET_GUAGE_TIP_VAL,GET_GUAGE_SEARCH_LIST,GET_GUAGE_LABEL,DEL_GUAGE_LABEL,CHANGE_GUAGE_VAL,CHANGE_GUAGE_DATE,CLEAR_GUAGE_DATA,ADD_GUAGE_LABEL} from '../types/guage';
+
+export const searchList = (list,val) => ({         //搜索列表渲染
+    type:GET_GUAGE_SEARCH_LIST,
+    list,
+    val
+})
+export const guageLable = (item,sign) => ({         //添加数据
+    type:GET_GUAGE_LABEL,
+    item,
+    sign
+})
+export const addguageLabel = (lis) => ({         //右侧推送交到左侧
+    type:ADD_GUAGE_LABEL,
+    lis
+})
+export const delguageLabel = (idx,name,flg) => ({         //删除数据
+    type:DEL_GUAGE_LABEL,
+    idx,
+    name,
+    flg
+})
+export const changeGuageVal = (val,idx) => ({         //更改数据
+    type:CHANGE_GUAGE_VAL,
+    val,
+    idx
+})
+export const changeDate = (date,idx) => ({         //更改时间
+    type:CHANGE_GUAGE_DATE,
+    date,
+    idx
+})
+export const setTipVal = (item, val, idx, tip) => ({
+    type:SET_GUAGE_TIP_VAL,
+    item,
+    val,
+    idx,
+    tip
+})
+export const clearGuageData = (data,saveText,checkedListImport) => ({         //清空回读
+    type:CLEAR_GUAGE_DATA,
+    data,
+    saveText,
+    checkedListImport
+})

+ 39 - 0
src/store/async-actions/guage.js

@@ -0,0 +1,39 @@
+import axios from '@utils/ajax';
+import store from '@store';
+import { searchList } from '../actions/guage';
+import { Notify } from '@commonComp';
+import { formatFormParmas } from '@utils/tools';
+
+export const getSearchList = (val) => {
+    if (val.trim() == '') {
+        const data = [];
+        return (dispatch) => dispatch(searchList(data, ''));
+    }
+    let baseList = store.getState();
+    let sex = baseList.patInfo.message.patientSex;
+    return (dispatch) => {
+        axios.json('/demo/retrieval/index', {
+            "age": formatFormParmas('patientAge', baseList.patInfo.patInfoData),
+            "inputStr": val.trim(),
+            "sex": formatFormParmas('patientSex', baseList.patInfo.patInfoData),
+            "type": '10',
+            "hospitalId": baseList.homePage.curHos.hosId
+        })
+            .then((res) => {
+                if (res.data.code == 0) {
+                    const data = res.data.data; let curDate = [];
+                    let arr = data.nameList || [];
+                    for (var key in arr) {
+                        let obj = {}
+                        obj['uniqueName'] = arr[key].name;
+                        obj['detailName'] = arr[key].name;
+                        obj['name'] = arr[key].name;
+                        curDate.push(obj)
+                    }
+                    dispatch(searchList(curDate, val.trim()));
+                } else {
+                    Notify.error(res.data.msg)
+                }
+            })
+    }
+};

+ 51 - 51
src/store/async-actions/historyTemplates.js

@@ -12,50 +12,50 @@ import Notify from '@commonComp/Notify';
 import store from '@store';
 
 export const initItemList = (item) => {
-    let baseList = store.getState();
-    const { homePage:{curHos}} = baseList
-    let params = {
-      sex: '',
-      name: '',
-      current: 1,
-      size: 9999,
-      desc : ['gmt_create'],
-      hospitalId:curHos.hosId
-    }; 
-    if (item === 'up') {
-      params.desc = ['gmt_create'];
-    }else if(item === 'down'){
-      delete params.desc;
-      params.asc = ['gmt_create'];
-    }
-    return axios.json('/demo/templateInfo/getTemplatePageAlls', params);
+  let baseList = store.getState();
+  const { homePage: { curHos } } = baseList
+  let params = {
+    sex: '',
+    name: '',
+    current: 1,
+    size: 9999,
+    desc: ['gmt_create'],
+    hospitalId: curHos.hosId
+  };
+  if (item === 'up') {
+    params.desc = ['gmt_create'];
+  } else if (item === 'down') {
+    delete params.desc;
+    params.asc = ['gmt_create'];
+  }
+  return axios.json('/demo/templateInfo/getTemplatePageAlls', params);
 };
 export const getHistempDetail = (item) => {
   const param = {
-      "id": item.id
-    }
-    return (dispatch) => {
-       axios.json('/demo/templateInfo/getTemplatebyId',param).then((res)=>{        
-            const data =res.data;
-            if(data.code == 0){
-                let tmpData = data.data
-                pushHistoryDataList(tmpData);       //引用
-                // 引用成功后默认推送
-                store.dispatch(
-                  embedPush({
-                    action: 'patientia',
-                    mode: 1,
-                  })
-                );
-                
-            }else{
-                Notify.error(data.msg);
-            }
-        })
-    }
+    "id": item.id
+  }
+  return (dispatch) => {
+    axios.json('/demo/templateInfo/getTemplatebyId', param).then((res) => {
+      const data = res.data;
+      if (data.code == 0) {
+        let tmpData = data.data
+        pushHistoryDataList(tmpData);       //引用
+        // 引用成功后默认推送
+        store.dispatch(
+          embedPush({
+            action: 'patientia',
+            mode: 1,
+          })
+        );
+
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
 };
 
-export function setInitHistory(data){
+export function setInitHistory(data) {
   return (dispatch) => {
     dispatch(initHistory(data));
   }
@@ -64,19 +64,19 @@ export function setInitHistory(data){
 
 export const asyncUpdateByIdUsNames = (editId, templateName) => {
   let baseList = store.getState();
-  const { homePage:{curHos}} = baseList
+  const { homePage: { curHos } } = baseList
   return (dispatch) => {
-    return new Promise((resolve, reject)=>{
+    return new Promise((resolve, reject) => {
       let param = {
         id: editId,
         modeName: templateName,
         doctorId: '',
-        hospitalId:curHos.hosId
+        hospitalId: curHos.hosId
       }
-      axios.json('/demo/templateInfo/updateByIdUsNames', param).then(res=>{
-        if (res.data.code === '0'){
+      axios.json('/demo/templateInfo/updateByIdUsNames', param).then(res => {
+        if (res.data.code === '0') {
           resolve(res)
-        }else{
+        } else {
           reject(res.data)
         }
       })
@@ -86,12 +86,12 @@ export const asyncUpdateByIdUsNames = (editId, templateName) => {
 
 export const asyncCancelTemplateInfos = (delId) => {
   let baseList = store.getState();
-  const { homePage:{curHos}} = baseList
+  const { homePage: { curHos } } = baseList
   return (dispatch) => {
     return new Promise((resolve, reject) => {
       let param = {
         ids: delId,
-        hospitalId:curHos.hosId
+        hospitalId: curHos.hosId
       }
       axios.json('/demo/templateInfo/cancelTemplateInfos', param).then(res => {
         if (res.data.code === '0') {
@@ -106,10 +106,10 @@ export const asyncCancelTemplateInfos = (delId) => {
 
 
 // 获取医院信息
-export const getHospitalInfo = () =>{
-  return (dispatch) =>{
+export const getHospitalInfo = () => {
+  return (dispatch) => {
     let baseList = store.getState();
-    const { homePage:{curHos}} = baseList
+    const { homePage: { curHos } } = baseList
     axios.json('/tran/hospitalInfo/getHospitalInfoById', { id: curHos.hosId }).then(res => {
       if (res.data.code === '0') {
         dispatch({
@@ -119,6 +119,6 @@ export const getHospitalInfo = () =>{
       }
     });
   }
-  
+
 }
 

+ 6 - 0
src/store/async-actions/print.js

@@ -160,6 +160,12 @@ export const saveMedicalData = () =>{
           contentJson: tempPreview.tcmDiag.diagnosticStrNoType,
           type: 13,
       },
+      {
+        content: tempPreview.scale.dataString,
+        contentValue: tempPreview.scale.guageLabel,
+        contentJson: JSON.stringify(tempPreview.scale.dataString),
+        type: 14,
+      },
     ];
     // let sex = formatFormParmas('patientSex', patInfoData) === '男' ? 1 : 0
     let params = {

+ 2 - 0
src/store/index.js

@@ -15,6 +15,7 @@ import diagnosticList from './reducers/diagnosticList';
 import inspect from './reducers/inspect';
 import newAdvice from './reducers/newAdvice';
 import assistCheck from './reducers/assistCheck';
+import guage from './reducers/guage';
 import copyRight from './reducers/copyRight';
 import homePage from './reducers/homePage';
 import mainSuit from './reducers/mainSuit';
@@ -67,6 +68,7 @@ const rootReducer = combineReducers({
     submit,
     treat,
     assistCheck,
+    guage,
     checkBody,
     getInfoByUuid,
     scaleSearch,

+ 209 - 0
src/store/reducers/guage.js

@@ -0,0 +1,209 @@
+import {
+    GET_GUAGE_SEARCH_LIST,
+    GET_GUAGE_LABEL,
+    DEL_GUAGE_LABEL,
+    CHANGE_GUAGE_VAL,
+    CHANGE_GUAGE_DATE,
+    CLEAR_GUAGE_DATA,
+    ADD_GUAGE_LABEL,
+    REGUAGECHECKDATA,
+    CLEARGUAGECHECKDATA,
+    SET_GUAGE_TIP_VAL,
+  } from '../types/guage';
+  import store from '@store';
+  const initSearchList = {
+    list: [], //搜索的结果
+    guageLabel: [], //点击的结果
+    dataString: '', //结果拼接
+    dataArr: [], //结果拼接
+    guageVal: '',
+  
+    hospitalPac: [], //医院检索到的
+    hospitalPacObj: {}, //组对应的明细(单选多选全选)
+    selectGroupList: [], //选的组的明细可能有多个组
+    allCheck: false, //全选反选
+    checkedList: [], //选中的小项
+    checkedListImport: [], //检查导入
+    allCheckLis:[],//所有导入数据
+    msgObj:{
+      name:'',
+      patientNum:''
+    },
+    totalOrder:[],//开单项
+  }
+  import { getCurrentDate, getAllString} from '@utils/tools';
+  import { Notify } from '@commonComp';
+  export default (state = initSearchList, action) => {
+    if (action.type == SET_GUAGE_TIP_VAL) { //改变shijian
+      const newState = Object.assign({}, state);
+      let tempArr = newState.guageLabel;
+      tempArr = tempArr.filter((item, idx) => {
+        if (action.idx == idx) {
+          if (action.tip == 1) {
+            item.time = action.val
+            item.dateValue = action.val
+          } else {
+            item.finishDateValue = action.val
+          }
+        }
+        return item
+      })
+      // for (let i = 0; i < tempArr.length; i++) {
+      //   if (i == action.idx) {
+      //     if (action.tip == 1) {
+      //       if (compareDate(action.val) > compareDate(tempArr[i].referenceValue)) {
+      //         Notify.error("报告时间不能早于开单时间");
+      //         return tempArr
+      //       }
+      //       if (action.val == '') {
+      //         Notify.error("开单时间不能为空");
+      //         return tempArr
+      //       }
+      //       tempArr[i].time = action.val
+      //       tempArr[i].dateValue = action.val
+      //     } else {
+      //       if (compareDate(tempArr[i].dateValue) > compareDate(action.val)) {
+      //         Notify.error("报告时间不能早于开单时间");
+      //         return tempArr[i]
+      //       }
+      //       tempArr[i].referenceValue = action.val
+      //     }
+      //     console.log(tempArr[i])
+      //     // tempArr[i].dateValue = action.val
+      //     // tempArr[i].time = action.val
+      //     newState.GUAGELabel = [...tempArr]
+      //   }
+      // }
+      newState.guageLabel = [...tempArr]
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      newState.dataArr = tmpObj.arr
+      newState.dataString = tmpObj.str
+      
+      return newState;
+    }
+    if (action.type == ADD_GUAGE_LABEL) {
+      const newState = Object.assign({}, state);
+      let tempArr = newState.guageLabel;
+      for (let i = 0; i < action.lis.length; i++) {
+        tempArr.push(action.lis[i]);
+      }
+      for (let i = 0; i < tempArr.length; i++) {
+        if (i == action.idx) {
+          tempArr[i].time = action.date
+          tempArr[i].dateValue = action.date
+          newState.guageLabel = [...tempArr]
+        }
+      }
+      newState.guageLabel = [...tempArr]
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      newState.dataString = tmpObj.str
+      newState.dataArr = tmpObj.arr
+      return newState;
+    }
+    if (action.type == GET_GUAGE_SEARCH_LIST) { //搜索结果
+      const newState = Object.assign({}, state);
+      newState.list = action.list
+      newState.guageVal = action.val
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      newState.dataString = tmpObj.str
+      newState.dataArr = tmpObj.arr
+      return newState;
+    }
+    if (action.type == GET_GUAGE_LABEL) { //选中搜索结果
+      const newState = Object.assign({}, state);
+      console.log(newState,122);
+      let tempArrs = newState.guageLabel;
+      let tempList = action.item
+      tempList['dateValue'] = getCurrentDate(1)
+      tempList['time'] = getCurrentDate(1)
+      tempList['finishDateValue'] = getCurrentDate(1)
+      tempArrs.push(tempList)
+      let tmpObj = getAllString([],newState.guageLabel)
+      newState.guageLabel = [...tempArrs]
+      newState.dataArr = tmpObj.arr
+      newState.dataString = tmpObj.str
+      return newState;
+    }
+    if (action.type == DEL_GUAGE_LABEL) { //删除
+      const newState = Object.assign({}, state);
+      let tempArr = newState.guageLabel,tempArrs = [],tempOrder=[];
+      let tmpImportLis = newState.checkedListImport;
+      if(action.flg == 0){//删除检查导入
+        tmpImportLis.splice(action.idx,1)
+      }else{
+        for (let k = 0; k < tempArr.length; k++) {
+          if (k != action.idx) {
+            tempArrs.push(tempArr[k])
+          }
+        }
+        newState.guageLabel = [...tempArrs]
+      }
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      tempOrder=tempArrs.filter((item)=>item.check)
+      newState.totalOrder = [...tempOrder]
+      newState.dataArr = tmpObj.arr
+      newState.dataString = tmpObj.str
+      return newState;
+    }
+    if (action.type == CHANGE_GUAGE_VAL) { //改变输入值
+      const newState = Object.assign({}, state);
+      const tempArr = newState.guageLabel;
+      for (let i = 0; i < tempArr.length; i++) {
+        if (i == action.idx) {
+          tempArr[i].value = action.val
+          tempArr[i].result = action.val
+          newState.guageLabel = [...tempArr]
+        }
+      }
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      newState.dataArr = tmpObj.arr
+      newState.dataString = tmpObj.str
+      return newState;
+    }
+    if (action.type == CHANGE_GUAGE_DATE) { //新增
+      const newState = Object.assign({}, state);
+      const tempArr = newState.guageLabel;
+      for (let i = 0; i < tempArr.length; i++) {
+        if (i == action.idx) {
+          tempArr[i].time = action.date
+          newState.guageLabel = [...tempArr]
+        }
+      }
+      let tmpObj = getAllString(newState.checkedListImport,newState.guageLabel)
+      newState.dataArr = tmpObj.arr
+      newState.dataString = tmpObj.str
+      return newState;
+    }
+    if (action.type == CLEAR_GUAGE_DATA) {
+      const newState = Object.assign({}, state);
+      newState.guageLabel = [...action.data];
+      newState.dataString = action.saveText;
+      newState.checkedListImport = action.checkedListImport;
+      if(action.checkedListImport.length == 0&&action.data.length==0){
+        newState.dataArr = [];
+      }
+      return newState;
+    }
+    if (action.type == REGUAGECHECKDATA) {
+      const newState = Object.assign({}, state);
+      const data = action.params[13].contentValue;
+      const arr = data.filter((it)=>{
+        return it.check;
+      });
+      newState.guageLabel = data;
+      newState.totalOrder = arr;
+      newState.dataArr = data;
+      newState.dataString = action.params[13].content;
+      return newState;
+    }
+    if (action.type == CLEARGUAGECHECKDATA) {
+      let newState = Object.assign({}, state);
+      newState.guageLabel = [];
+      newState.dataArr = [];
+      newState.dataString = [];
+      newState.totalOrder = [];
+      return newState;
+    }
+    return state;
+  }
+  

+ 12 - 0
src/store/types/guage.js

@@ -0,0 +1,12 @@
+export const GET_GUAGE_SEARCH_LIST = 'GET_GUAGE_SEARCH_LIST';
+export const GET_GUAGE_LABEL = 'GET_GUAGE_LABEL';
+export const DEL_GUAGE_LABEL = 'DEL_GUAGE_LABEL';
+export const CHANGE_GUAGE_VAL = 'CHANGE_GUAGE_VAL';
+export const CHANGE_GUAGE_DATE = 'CHANGE_GUAGE_DATE';
+export const CLEAR_GUAGE_DATA = 'CLEAR_GUAGE_DATA';
+export const ADD_GUAGE_LABEL = 'ADD_GUAGE_LABEL';
+export const SET_GUAGE_TIP_VAL = 'SET_GUAGE_TIP_VAL';
+
+
+export const REGUAGECHECKDATA = 'REGUAGECHECKDATA';
+export const CLEARGUAGECHECKDATA = 'CLEARGUAGECHECKDATA';

+ 2 - 2
src/utils/config.js

@@ -7,7 +7,7 @@ const { func } = require("prop-types");
 
 
 
-const host='http://192.168.2.241:6060';//后端接口访问地址
+const host='http://192.168.2.236:6060';//后端接口访问地址
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
@@ -17,7 +17,7 @@ const imageUrlPrefix = 'http://192.168.2.241:82';
 function geturl(){
     if(window.location.href.indexOf('localhost')>-1){
         return {
-            gourl:'http://localhost:8080/cdss.html',
+            gourl:'http://localhost:8081/cdss.html',
             // gourl:'http://192.168.2.236:5654/cdss.html',
             imgurl:host.replace('6060','22')
         }

+ 45 - 8
src/utils/tools.js

@@ -20,10 +20,12 @@ import { REMARRIAGETEXTDATA, CLEARMARRIAGETEXTDATA } from '@store/types/marriage
 import { REMENSTRUATIONTEXTDATA, CLEARMENSTRUATIONTEXTDATA, } from '@store/types/menstruationHistory';
 import { REINSPECTDATA, CLEARINSPECTDATA } from '@store/types/inspect';
 import { REASSISTCHECKDATA, CLEARASSISTCHECKDATA } from '@store/types/assistCheck';
+import { REGUAGECHECKDATA, CLEARGUAGECHECKDATA } from '@store/types/guage';
 import { RENEWADVICEDATA, CLEARNEWADVICEDATA } from '@store/types/newAdvice';
 import { CLEAROTHERHISTORY, OTHERHIS_CLEAR } from '@store/types/otherHistory';
 import { CLEARCHECKBODY, SET, CHECKBODY_CLEAR, RECHECKBODYTEXTDATA, CLEARCHECKBODYTEXTDATA } from '@store/types/checkBody';
 import { clearAssistData, addAssistLabel } from '@store/actions/assistCheck';
+import { clearGuageData, addguageLabel } from '@store/actions/guage';
 import { clearAllLabel, addLabel } from '@store/actions/inspect';
 import { CLEAR_ALL_DIAG, REDIAGDATA, CLEARDIAGDATA } from '@store/types/diagnosticList';
 import { CLEAR_ALL_PUSH_MESSAGE, SET_TIPS, BILLING_ADVICE, PUSHCHANGE, SET_MR_ANALYSE } from '@store/types/pushMessage';
@@ -109,6 +111,7 @@ const getUrlArgObject = (parm) => {
 
 // 转换jsonData 数据  转为json
 const getAllDataList = (baseList) => {           //获取所有模块结构化的数据
+  console.log(baseList, 445);
   let jsonData = {};
   jsonData.lis = {};
   jsonData.chief = baseList.mainSuit.saveText && baseList.mainSuit.saveText[0];   // 主诉
@@ -124,7 +127,7 @@ const getAllDataList = (baseList) => {           //获取所有模块结构化
   jsonData.pacs = baseList.assistCheck.assistLabel;     //辅检
   jsonData.diag = baseList.diagnosticList.diagnosticList;      //诊断
   jsonData.advice = baseList.newAdvice.labelListSmall;       //医嘱
-
+  jsonData.scale = baseList.guage.guageLabel;
 
   //月经史公式
   // const other = baseList.otherHistory;
@@ -188,6 +191,7 @@ const getAllDataStringList = (baseList) => {           //获取所有模块文
     'vital': JSON.stringify(vitalData),
     'lis': baseList.inspect.inspectStrPlus,
     'pacs': baseList.assistCheck.dataString,
+    'scale': baseList.guage.dataString,
     'diag': baseList.diagnosticList.diagnosticStr,
     'advice': baseList.pushMessage.AdviceStr
   }
@@ -219,7 +223,10 @@ const formatTextInfo = (baseList) => {
     dataString: baseList.assistCheck.dataString,
     assistLabel: baseList.assistCheck.assistLabel,
   };
-
+  let guageLabelList = {
+    dataString: baseList.guage.dataString,
+    guageLabel: baseList.guage.guageLabel,
+  };
   let diagnosticList = {
     diagnosticList: baseList.diagnosticList.diagnosticList,
     diagnosticStrNoType: baseList.diagnosticList.diagnosticStrNoType,
@@ -249,6 +256,7 @@ const formatTextInfo = (baseList) => {
     vital: JSON.stringify(baseList.checkBody.saveText),
     lis: labelList, //化验
     pacs: assistLabelList,
+    scale:guageLabelList,
     diag: diagnosticList,
     tcmDiag: diagnosticTcmList,
     advice: newAdviceLabelList,
@@ -314,6 +322,10 @@ const pushHistoryDataList = (reData) => {
     type: REASSISTCHECKDATA,
     params: dataJson,
   });
+  store.dispatch({
+    type: REGUAGECHECKDATA,
+    params: dataJson,
+  });
   store.dispatch({
     type: REDIAGDATA,
     params: dataJson,
@@ -361,6 +373,9 @@ const delHistoryDataList = () => {
   store.dispatch({
     type: CLEARASSISTCHECKDATA,
   });
+  store.dispatch({
+    type: CLEARGUAGECHECKDATA,
+  });
   store.dispatch({
     type: CLEARDIAGDATA,
   });
@@ -416,6 +431,8 @@ const pushAllDataList = (whichSign, action, reData, type) => {           //回
     store.dispatch({ type: CLEARCHECKBODY, data: [block], isEmpty: true, saveText: [] });
     //store.dispatch({type:SETREADDITEMS});     //清空已存的血压加号项
     store.dispatch(clearAssistData([], '', []));
+    store.dispatch(clearGuageData([], '', []));
+
     store.dispatch(clearAllLabel([], [], ''));
     store.dispatch(embedPush({ mode: 1 }));  //刷新右侧推送
     //右侧搜索条件清空
@@ -461,6 +478,7 @@ const pushAllDataList = (whichSign, action, reData, type) => {           //回
       likely: [],
       lab: [],
       pacs: [],
+      scale:[],
       setPushEmergency: {},
       setPushEmergencyIdx: ''
     });
@@ -500,6 +518,8 @@ const pushAllDataList = (whichSign, action, reData, type) => {           //回
     });
     store.dispatch({ type: SETREADDITEMS });     //清空已存的血压加号项
     store.dispatch(clearAssistData([], '', []));
+    store.dispatch(clearGuageData([], '', []));
+
     store.dispatch(clearAllLabel([], [], ''));
     store.dispatch({
       type: SET_TIPS,
@@ -537,11 +557,13 @@ const pushAllDataList = (whichSign, action, reData, type) => {           //回
       likely: [],
       lab: [],
       pacs: [],
+      scale:[],
       setPushEmergency: {},
       setPushEmergencyIdx: ''
     });
     storageLocal.remove('emrParam');
   } else {
+    console.log(11,55);
     let dataJson = JSON.parse(reData.dataJson);
     const docConfig = dataJson.docConfigs;
     //回读/引用设置回读模式值(主诉-其他史使用)
@@ -940,6 +962,7 @@ function getEMRParams() {
     checkBody,
     inspect,
     assistCheck,
+    guage,
     diagnosticList,
     marriageHistory,
     pastHistory,
@@ -991,6 +1014,13 @@ function getEMRParams() {
     //   item.finishDateValue = ""
     // }
   })
+  let tempscale = guage.guageLabel
+  tempscale = tempscale.filter((item) => {
+    if (curHos.hosId != -1) {
+      item.uniqueName = ''
+    }
+    return item
+  })
   let tempPacOrder = JSON.parse(JSON.stringify(assistCheck.totalOrder))
   tempPacOrder = tempPacOrder.filter((item) => {
     delete item.finishDateValue
@@ -1043,19 +1073,19 @@ function getEMRParams() {
     }
     return item
   })
-  let tempOperationName = newAdvice.operationName ? newAdvice.operationName:[]
+  let tempOperationName = newAdvice.operationName ? newAdvice.operationName : []
   if (curHos.hosId != -1 && tempOperationName.name) {
     tempOperationName.uniqueName = ''
   }
   let tempblood = newAdvice.labelListBlood || [];
   tempblood = tempblood.filter((item) => {
     if (!item.check) {
-	  item.finishDateValue = item.finishDateValue?item.finishDateValue:item.dateValue;
+      item.finishDateValue = item.finishDateValue ? item.finishDateValue : item.dateValue;
       if (curHos.hosId != -1) {
         item.uniqueName = ''
       }
       return item
-    }else{
+    } else {
       delete item.finishDateValue;
     }
   })
@@ -1084,7 +1114,7 @@ function getEMRParams() {
     "menstrual": menstruationHistory.saveText[0] || '',  //月经史
     "diseaseName": diagnosticList.diseaseName,
     "otherIndex": diagnosticList.otherIndex,
-    "operationName": (tempOperationName&&Object.keys(tempOperationName).length===0)?null:tempOperationName,
+    "operationName": (tempOperationName && Object.keys(tempOperationName).length === 0) ? null : tempOperationName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",
@@ -1096,6 +1126,7 @@ function getEMRParams() {
     "drugString": "",
     "lis": templis,
     "pacs": temppacs || [],
+    "scale":tempscale,
     "diag": diag,
     "lisOrder": tempLisOrder,
     "pacsOrder": tempPacOrder,
@@ -1315,7 +1346,7 @@ function inspectAndAssist() {
   let tmpAll = state.homePage.allModules;
   let tmpInspected = state.inspect.labelList;
   let tmpAssisted = state.assistCheck.assistLabel;
-  let tmpInspect = [], tmpAssist = [], assayArr = [], tmpDetail = [], checkArr = [];
+  let tmpInspect = [], tmpAssist = [], assayArr = [], tmpDetail = [], checkArr = [], scalekArr = [];
   for (let i = 0; i < tmpAll.length; i++) {
     let tmpItem = tmpAll[i];
     if (tmpItem.type == 5) {
@@ -1355,12 +1386,17 @@ function inspectAndAssist() {
     tmpObj.name = tmpAssist[i].name
     checkArr.push(tmpObj)
   }
+  console.log(1111,555);
   if (assayArr.length > 0 && tmpInspected.length == 0) {//化验
     store.dispatch(addLabel(assayArr))
   }
   if (checkArr.length > 0 && tmpAssisted.length == 0) {//辅检
     store.dispatch(addAssistLabel(checkArr))
   }
+  if (checkArr.length > 0 && tmpAssisted.length == 0) {//辅检
+    store.dispatch(addguageLabel(checkArr))
+  }
+  
 }
 function readyKeepHistory() {
   let baseList = store.getState();
@@ -1934,7 +1970,7 @@ function getAllString(checkedListImport, assistLabel, flg) {
       + `<div style="display:flex;justify-content: space-between;">`
       + `<span style="font-size:12px">` + tempArr[i].name + `</span>`
       + `<div style="display:flex;font-size:12px"><img style='margin:0 3px;width:16px;height:18px' title="开单时间" src='${billing}'/>`
-    + (tempArr[i].time ? tempArr[i].time : '') + (tempArr[i].check ? '<span style="width:140px"></span>' : !tempArr[i].check && tempArr[i].finishDateValue == '' ? `<img style="margin:0 3px;width:16px;height:18px" title="报告时间" src='${report}'/><span style="width:118px"></span>` : `<img style="margin:0 3px;width:16px;height:18px" title="报告时间" src='${report}'/>`) 
+      + (tempArr[i].time ? tempArr[i].time : '') + (tempArr[i].check ? '<span style="width:140px"></span>' : !tempArr[i].check && tempArr[i].finishDateValue == '' ? `<img style="margin:0 3px;width:16px;height:18px" title="报告时间" src='${report}'/><span style="width:118px"></span>` : `<img style="margin:0 3px;width:16px;height:18px" title="报告时间" src='${report}'/>`)
       + (tempArr[i].check ? '' : tempArr[i].finishDateValue)
       + '</div>'
       + `</div>`
@@ -2212,6 +2248,7 @@ function checkDeptContent(jsonStr, tmpLis) {
       filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('(' + JSON.parse(dataStr).vital + ')')) &&
       jsonStr.lis == JSON.parse(dataStr).lis &&
       jsonStr.pacs == JSON.parse(dataStr).pacs &&
+      jsonStr.scale == JSON.parse(dataStr).scale &&
       jsonStr.diag == JSON.parse(dataStr).diag &&
       jsonStr.advice == JSON.parse(dataStr).advice
     ) {