Przeglądaj źródła

合并liucf分支
Squashed commit of the following:

commit 5294585ebded597041f65b614815aa13cb8d0a58
Author: liucf <liucf@zjlantone.com>
Date: Tue Jun 4 17:34:59 2019 +0800

添加时间筛选

commit 23fc91ea79b0f5f2122b19f08155784b7c8238d5
Author: liucf <liucf@zjlantone.com>
Date: Tue Jun 4 16:14:30 2019 +0800

合并优化分支
Squashed commit of the following:

commit 6de3fad484f6aa57daa6bcb00e3179c567bae2d9
Merge: 0af6118 f90aeef
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 15:28:43 2019 +0800

Merge remote-tracking branch 'origin/optimize' into optimize

commit 0af61189386522a227a25e5f3ac1f1a86bd1eb10
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 15:28:30 2019 +0800

全部量表接口对接

commit d67b5e9cf980afbd3d9b09a84114b1196281e431
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 13:50:07 2019 +0800

引用病例推送检查重复调用

commit f7434ab9d3c270e9058988d18bb2a8414b4b0cbd
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 13:34:05 2019 +0800

删除无效代码

commit f90aeef464ab17eaa3509319a9961e10e0e62312
Merge: 7791b5b 60b0cb5
Author: Luolei <16657115156@163.com>
Date: Tue Jun 4 09:57:49 2019 +0800

Merge branch 'optimize-ll' into optimize

commit 60b0cb5910ae9562e8b4f1f07310c461b9ca748c
Author: Luolei <16657115156@163.com>
Date: Tue Jun 4 09:56:52 2019 +0800

1

commit 98b2f3d0a81c2e24d61e374c54807a121f115c92
Author: Luolei <16657115156@163.com>
Date: Tue Jun 4 09:54:57 2019 +0800

添加注释

commit 98f3939410037828e647453e5008cf6fcc14babc
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 09:30:23 2019 +0800

双击编辑蓝底选中消除

commit 250d2ba147aa705047879d1d2b67c34bffe89258
Author: zhouna <zhouna@zjlantone.com>
Date: Tue Jun 4 09:25:21 2019 +0800

无返回数据loading也关闭

commit 7791b5b679437efd590623789d473458961b2646
Merge: b926b8c 96a6fd2
Author: Luolei <16657115156@163.com>
Date: Mon Jun 3 17:25:13 2019 +0800

Merge branch 'optimize-ll' into optimize

commit 96a6fd268033ac6953a4f48ebc7242e2faf8ff9e
Author: Luolei <16657115156@163.com>
Date: Mon Jun 3 17:23:01 2019 +0800

console

commit 63897f7a04aad3a207b921026656b9c8f1a0f6a4
Author: Luolei <16657115156@163.com>
Date: Mon Jun 3 17:22:01 2019 +0800

时间插件修改,区间选择组件完成

commit dffa61771828ff0f486919a09562e24b29cdea2c
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 17:16:20 2019 +0800

删除多余代码和推送调用

commit e4fd3e22378e3b6dd159b400682bf21646e08378
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 16:35:48 2019 +0800

推送参数对比函数bug修改

commit f1c7b1934d2cca472ad44641d0247870ed9b0c1c
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 16:11:01 2019 +0800

全部量表-接口未对

commit b926b8c33a3535e3d5341f3e94ee853d39c91b89
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 15:52:09 2019 +0800

加收起展开按钮

commit a7cd00e68421464a68523d2df85caa9871af5cec
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 14:44:32 2019 +0800

加清空按钮

commit 4742892f6ba752689bacffe3828d00f5e29e9555
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 11:50:59 2019 +0800

静态知识搜索

commit 16c48a0629d0900c4e67fc5c8590f78e814f9206
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 10:53:13 2019 +0800

指标推送收起展开效果

commit 2442d00474a875a09671259f0052f42f46217690
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 10:32:58 2019 +0800

指标推送收起展开bug修改

commit d49848ce253a774838fe111e9f7f6eb91c74b941
Author: zhouna <zhouna@zjlantone.com>
Date: Mon Jun 3 10:30:18 2019 +0800

删除多余文件

commit da614e0d4c6119278b211f5fd769611557740acc
Author: Luolei <16657115156@163.com>
Date: Mon Jun 3 10:16:34 2019 +0800

date

commit 5ea348245d8061aee67efdf04c7d6cbacdd2a1af
Merge: 84a47f4 99af44b
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:45:44 2019 +0800

Merge branch 'optimize' into optimize-zxc

commit 84a47f400db92078a0ef92e8f5fce7e1c7e90fa1
Merge: fd6e7ff 8f53d2e
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:38:51 2019 +0800

Merge branch 'ChronicMag' into optimize-zxc

commit 99af44b61c4c9c6d9680ddcccf32cb9cc10e5ab8
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:31:45 2019 +0800

注释医学知识(未完成)

commit a6065dc09996a65640b4a48783eb2e9ded4b8359
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:31:08 2019 +0800

注释医学知识(医学知识未完成)

commit fd6e7ff7f036ea48795dbee290bac393d55757eb
Merge: 8e2d799 0755f5c
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:29:04 2019 +0800

merge from 'origin'

commit 8e2d79940befe9715dfd54ccf179fd710274aec9
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 16:27:53 2019 +0800

医学知识

commit 0755f5c881b2022cbaebf1a937c2bcb207417150
Merge: 4d1f197 7113420
Author: zhouna <zhouna@zjlantone.com>
Date: Fri May 31 15:57:37 2019 +0800

Merge remote-tracking branch 'origin/optimize' into optimize

# Conflicts:
# src/store/async-actions/pushMessage.js

commit 4d1f19780b40256265c95aecfa9a08535ce29707
Author: zhouna <zhouna@zjlantone.com>
Date: Fri May 31 14:29:53 2019 +0800

指标推送收起展开

commit 711342004f84e8cbdaac78c1e101363b7fa44e1d
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 14:16:25 2019 +0800

静态信息修改

commit bb7e1aa388cd1d6304942f6623b2123903341155
Merge: bad3590 77026bb
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 14:03:45 2019 +0800

Merge branch 'optimize' into optimize-zxc

commit bad3590764a6b4b04a99ec4e6486df3d8f938eb7
Author: zhangxc <zhangxc@zjlantone.com>
Date: Fri May 31 11:41:33 2019 +0800

右侧推送组件提取

commit 930f2ad9d465b9d7bba7628e8bdd1f60638cac95
Author: zhouna <zhouna@zjlantone.com>
Date: Fri May 31 10:24:29 2019 +0800

文本模式推送接口修改

commit eb1b26500858b99ec3643f4f9033cc3cdf2d5ebe
Author: zhangxc <zhangxc@zjlantone.com>
Date: Thu May 30 17:18:59 2019 +0800

推荐检验检查(未完成)

commit 77026bb1c76616aca71c7d2b858e68aa83d621d0
Author: Luolei <16657115156@163.com>
Date: Thu May 30 15:47:19 2019 +0800

同时出现两个拖拽弹窗处理

commit 75c0db17f4758393e8a7c541efd9da91a25902e5
Merge: 7346d73 7d52d97
Author: zhangxc <zhangxc@zjlantone.com>
Date: Thu May 30 14:54:10 2019 +0800

Merge branch 'optimize' into optimize-zxc

commit 7d52d977839b208fafe011a5785df2fdd7301699
Merge: 5b0c6c6 34ccfe1
Author: Luolei <16657115156@163.com>
Date: Thu May 30 14:10:55 2019 +0800

Merge branch 'optimize-ll' into optimize

commit 7346d73ed52b5134b8eb90e0282cfc7327be82ec
Merge: 0d0fabe 34ccfe1
Author: zhangxc <zhangxc@zjlantone.com>
Date: Thu May 30 13:53:28 2019 +0800

Merge branch 'optimize-ll' into optimize-zxc

commit 34ccfe17729d27aa445010dcc67f35e38bce8c63
Author: Luolei <16657115156@163.com>
Date: Thu May 30 13:51:58 2019 +0800

接口对接,弹窗代码优化

commit 0d0fabe62cbc20225911adbd50e6456489084284
Author: zhangxc <zhangxc@zjlantone.com>
Date: Thu May 30 09:48:06 2019 +0800

免责声明和版本信息

commit 335db8568bcbccd0b0ddd0056d79d48056036f8b
Author: zhangxc <zhangxc@zjlantone.com>
Date: Wed May 29 17:20:12 2019 +0800

推送接口对接

commit cf9d835e17aef5c00181312ac7de5e0ebb6045fd
Merge: e3ef981 50d2cce
Author: Luolei <16657115156@163.com>
Date: Wed May 29 17:02:07 2019 +0800

Merge branch 'optimize-zxc' into optimize-ll

commit e3ef981021b94497c994430b400beb58e6173055
Merge: 1ed52ce 719c2cc
Author: Luolei <16657115156@163.com>
Date: Wed May 29 16:59:40 2019 +0800

Merge branch 'optimize' into optimize-ll

commit 50d2cce7bdbeaf883fb37595e7b3e1e48b00f45b
Author: zhangxc <zhangxc@zjlantone.com>
Date: Wed May 29 16:17:22 2019 +0800

说明书修改

commit 5b0c6c6324cd6fd8e2491aa5285c0205d5389a7c
Merge: 2925167 719c2cc
Author: zhouna <zhouna@zjlantone.com>
Date: Wed May 29 15:55:22 2019 +0800

Merge remote-tracking branch 'origin/optimize' into optimize

# Conflicts:
# src/utils/tools.js

commit 2925167e24df0bc7a1a5d788c653db63b564d020
Author: zhouna <zhouna@zjlantone.com>
Date: Wed May 29 15:54:42 2019 +0800

管理评估,图表接口对接

commit 1ed52ce1a6d42eaef6d6c622f3b6ae97aba9bfed
Author: Luolei <16657115156@163.com>
Date: Wed May 29 15:47:58 2019 +0800

拖拽

commit 4ee10e346d3aacac930f594f442a41e6a1d72336
Author: zhangxc <zhangxc@zjlantone.com>
Date: Wed May 29 15:47:42 2019 +0800

药品说明书

commit 509eb82e53e69e2898d932f1f4792fdb295ebe2a
Author: zhouna <zhouna@zjlantone.com>
Date: Wed May 29 13:53:29 2019 +0800

指标推送量表加入按钮bug修改

commit 8f53d2e8754ff1d448a517b554d53bee6d427a05
Author: zhangxc <zhangxc@zjlantone.com>
Date: Tue May 28 17:20:37 2019 +0800

修改删除诊断图标bug

commit 4cfe762692950831638ecf4b1c611868682ea2e2
Merge: 9bd0b47 afadf59
Author: Luolei <16657115156@163.com>
Date: Mon May 27 16:58:05 2019 +0800

Merge branch 'optimize' into optimize-ll

commit 9bd0b4776490cd09749a4918c57a8c098d895628
Author: Luolei <16657115156@163.com>
Date: Mon May 27 16:56:41 2019 +0800

11

# Conflicts:
# src/store/async-actions/diagnosticSearch.js
# src/store/index.js
# src/utils/tools.js

commit c36cc8f097eb25a397953f4b66be68788273b2e5
Author: liucf <liucf@zjlantone.com>
Date: Tue Jun 4 15:58:53 2019 +0800

急诊全科历史病历,还缺时间筛选

commit 561a4ac54d3cfe9f54eb3d723bc6f258977f9309
Author: liucf <liucf@zjlantone.com>
Date: Wed May 29 17:41:57 2019 +0800

急诊科病例列表入口

# Conflicts:
# src/components/ScaleSearch/index.jsx
# src/components/ScaleSearch/index.less
# src/containers/ScaleSearchContainer.js
# src/store/async-actions/diagnosticSearch.js
# src/store/index.js
# src/utils/tools.js

liucf 6 lat temu
rodzic
commit
3f452eabf3

BIN
src/common/images/check-circle.png


BIN
src/common/images/check-right.png


BIN
src/common/images/date1.png


BIN
src/common/images/emergency.png


+ 13 - 0
src/common/less/variables.less

@@ -246,3 +246,16 @@
     opacity: .5;
   }
 }
+// 弹窗遮罩
+.mask{
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #000;
+  opacity: .6;
+  filter:alpha(opacity=60);
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  z-index: 999;
+}

+ 59 - 7
src/components/Banner/index.jsx

@@ -1,22 +1,32 @@
 import React, { Component } from "react";
+import { connect } from "react-redux";
 import style from "./index.less";
 import logo from "../../common/images/logoa.png";
 import setup from "../../common/images/setup.png";
 import close from '../../common/images/icon_close.png';
 import ok from '../../common/images/confirm.png'
+import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
+// import Emergency from '@components/Emergency';
+import Emergency from '@containers/Emergency';
+import {getAllHis} from '@store/async-actions/fetchModules.js';
+import {timestampToTime} from '@utils/tools.js';
 
 class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
       mode: props.typeConfig,
-      zIndex:204
+      zIndex:204,
+      emergency:true,
+      emergencyBox:false
     };
     this.showConfigModal = this.showConfigModal.bind(this);
     this.closeConfigModal = this.closeConfigModal.bind(this);
     this.changeType = this.changeType.bind(this);
     this.confirmType = this.confirmType.bind(this);
+    this.showHisModal = this.showHisModal.bind(this);
+    this.handleHisClose = this.handleHisClose.bind(this);
   }
 
   showConfigModal(){
@@ -60,18 +70,41 @@ class Banner extends Component {
       Notify.error("模式切换失败,请稍后再试");
     }
   }*/
+  showHisModal(){
+    const {getAllRecord} = this.props;
+    const item = {
+      current:1
+    }
+    getAllRecord&&getAllRecord(item);
+    this.setState({
+      emergencyBox:true,
+      zIndex:206
+    })
+  }
+  handleHisClose(){
+    this.setState({
+      emergencyBox:false,
+      zIndex:204
+    })
+  }
   render() {
     const {visible,disVisible,copyVisible} = this.props;
-    const {mode,zIndex} = this.state;
+    const {mode,zIndex,emergency,emergencyBox} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
       <div className={style["logo"]} style={{zIndex:disVisible||copyVisible?40:zIndex}}>
         <img src={logo} />
-        <span>|&nbsp;&nbsp;智能辅助临床决策系统</span>
-        <div className={style["buon"]} onClick={showConfigModal}>
-          <img className={style["st"]} src={setup} />
-          设置
+        <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
+        <div className={style["buon"]}>
+          {emergency?<div className={style["buon1"]} onClick={this.showHisModal}>
+                      <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
+                      本科室近期全部病历
+                    </div>:''}
+          <div className={style["buon1"]} onClick={showConfigModal}>
+            <img className={style["st"]} src={setup} />
+            设置
+          </div>
         </div>
         {visible?<div className={style['modal']}>
           <div className={style['shade']} onClick={closeConfigModal}></div>
@@ -85,9 +118,28 @@ class Banner extends Component {
             <div className={style['btn']} onClick={confirmType}>确认</div>
           </div>
         </div>:''}
+        {emergencyBox?<div className={style['modal']}>
+            <div className={style['shade']} onClick={this.handleHisClose}></div>
+            <Emergency show={emergencyBox} close={this.handleHisClose}/>
+          </div>:''}
+        
       </div>
     );
   }
 }
 
-export default Banner;
+const mapStateToProps = function(state){
+  return {
+
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    getAllRecord(item){
+      dispatch(getAllHis(item));
+    }
+  }
+}
+// export default Banner;
+export default connect(mapStateToProps,mapDispatchToProps)(Banner);

+ 12 - 2
src/components/Banner/index.less

@@ -15,7 +15,8 @@
       vertical-align: middle;
       margin: 0 10px 2px 18px;
     }
-    span{
+    // span{
+    .logo-name{
         display: inline-block;
         line-height: 40px;
         color: #FFFFFF;
@@ -27,13 +28,22 @@
         margin: 0px 15px 4px 10px;
         color: #FFFFFF;
         font-size: 16px;
-        cursor: pointer;
+        // cursor: pointer;
+        .buon1{
+          display: inline-block;
+          cursor: pointer;
+          margin-left: 10px;
+        }
     }
     .st{
         margin: 9px 2px 10px 10px;
         border: 0 solid #FFFFFF;
         text-align: center;
     }
+    .his{
+      width: 20px;
+      height: 20px;
+    }
     .modal {
       .shade {
         position: fixed;

+ 181 - 0
src/components/Emergency/HisList/index.jsx

@@ -0,0 +1,181 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import empty from '@common/images/check-circle.png';
+import check from '@common/images/check-right.png';
+import date from '@common/images/date1.png';
+import TimeInterval from '@components/TimeInterval';
+import {getCurrentDate} from "@utils/tools";
+/**
+  科室病历列表
+**/
+
+class HisList extends Component {
+  constructor(props){
+    super(props);
+    this.state = {
+      select:[], //选中ids
+      hasSecond:-1,
+      all:false,
+      index:0,
+      startTime:getCurrentDate(false,'/')+' 00:00:00',
+      endTime:getCurrentDate(false,'/')+' 23:59:59',
+    }
+    this.handleGetMore = this.handleGetMore.bind(this);
+    this.handleSelect = this.handleSelect.bind(this);
+    this.handleAll = this.handleAll.bind(this);
+    this.handleDownload = this.handleDownload.bind(this);
+    this.getStartTime = this.getStartTime.bind(this);
+    this.getEndTime = this.getEndTime.bind(this);
+  }
+  getStartTime(date){
+    this.setState({startTime:date});
+    const {handleFilter} = this.props;
+    const {endTime} = this.state;
+    const obj = {
+      startDate:date.replace(/\//g,'-'),
+      endDate:endTime.replace(/\//g,'-'),
+      flag:999 //自定义以区分筛选条件
+    }
+    handleFilter&&handleFilter(obj);
+  }
+  getEndTime(date){
+    this.setState({endTime:date});
+    const {handleFilter} = this.props;
+    const {startTime} = this.state;
+    const obj = {
+      startDate:startTime.replace(/\//g,'-'),
+      endDate:data.replace(/\//g,'-'),
+      flag:999 //自定义以区分筛选条件
+    }
+    handleFilter&&handleFilter(obj);
+  }
+  handleFilter(flag){
+    const {handleFilter} = this.props;
+    this.setState({
+      hasSecond:flag
+    })
+    const obj = {
+      flag:flag
+    }
+    handleFilter&&handleFilter(obj);
+  }
+
+  handleGetMore(){
+    const {getMore} = this.props;
+    getMore&&getMore();
+  }
+
+  getClassName(id,ind){
+    const {select,index} = this.state;
+    if(select.indexOf(id) !=-1 || ind==index){
+      return style['select-li']
+    }
+    return '';
+  }
+
+  handleSelect(e,id){console.log(e,id)
+    e.stopPropagation();
+    let {select} = this.state;
+    if(select.indexOf(id)==-1){
+      select.push(id);
+    }else{
+      select.splice(select.indexOf(id),1);
+    }
+    this.setState({
+      select
+    })
+  }
+
+  getIcon(id){
+    const {select} = this.state;
+    if(select.indexOf(id)==-1){
+      return empty;
+    }
+    return check;
+  }
+
+  getAllIcon(){
+    const {all,select} = this.state;
+    const {data} = this.props;
+    if(all || select.length==data.length&&select.length!=0){
+      return check;
+    }
+    return empty;
+  }
+
+  handleAll(){
+    const {data} = this.props;
+    let {all} = this.state;
+    let allIds = [];
+    if(!all){
+      data&&data.map((v,i)=>{
+        allIds.push(v.inquiryId);
+      })
+    }
+    this.setState({
+      all:!all,
+      select:allIds
+    })
+  }
+
+  handleDetail(index){
+    const {detail} = this.props;
+    detail&&detail(index);
+    this.setState({
+      index:index
+    })
+  }
+
+  handleDownload(){
+    const { handleDownload } = this.props;
+    const {select} = this.state;
+    handleDownload&&handleDownload(select);
+  }
+
+  getList(){
+    const { data } = this.props;
+    let list = data&&data.map((v,i)=>{
+      return <li className={this.getClassName(v.inquiryId,i)} key={v.inquiryId} onClick={this.handleDetail.bind(this,i)}>
+        <p>{v.diagnose}</p>
+        <p className={style['name']}>{v.doctorName} {'于'}{v.inquiryTime} {'保存病历'}</p>
+        {v.diagnoseSecond?<div className={style['second']}>
+          <p>{v.diagnoseSecond}{'(诊后添加)'}</p>
+          <p className={style['name']}>{v.doctorNameSecond} {'于'}{v.inquiryTimeSecond} {'添加'}</p>
+        </div>:''}
+        <img src={this.getIcon(v.inquiryId)} className={style['check-box']} onClick={(e)=>this.handleSelect(e,v.inquiryId)}/>
+      </li>
+    })
+    return list;
+  }
+
+  render(){
+    const { data,total } = this.props;
+    const { hasSecond } = this.state;
+    return <div className={style['list-Box']}>
+      <h2>本科室近期全部历史病历</h2>
+      <div className={style['list-time']}>
+        <img src={date} />
+        <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+      </div>
+      <div className={style['filter-box']}>
+        <span className={style['filter']}>筛选:</span>
+        <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
+        <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
+        <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+      </div>
+      <div className={style['list']}>
+        <ul>
+          {this.getList()}
+        </ul>
+        {total>data.length?<p className={style['more']} onClick={this.handleGetMore}>点击查看更多</p>:''}
+      </div>
+      <div className={style['all-box']}>
+        <img src={this.getAllIcon()} className={style['check-all']} onClick={this.handleAll}/>
+        <span onClick={this.handleAll}>全选</span>
+        <span className={style['export']} onClick={this.handleDownload}>导出已选数据</span>
+      </div>
+    </div>
+  }
+}
+
+export default HisList;

+ 112 - 0
src/components/Emergency/HisList/index.less

@@ -0,0 +1,112 @@
+.list-Box{
+  width: 360px;
+  height: 700px;
+  padding-top: 30px;
+  h2{
+    font-weight: 700;
+    font-size: 18px;
+    color: #2A9BD5;
+    letter-spacing: 0;
+    // line-height: 18px;
+    margin: 0 0 10px 20px;
+  }
+  .list-time{
+    width: 320px;
+    height: 39px;
+    background: #E9F5FA;
+    margin: 0 20px 8px;
+    padding-top: 6px;
+    position: relative;
+  }
+  .filter-box{
+    font-size: 12px;
+    color: #767676;
+    height: 44px;
+    line-height: 44px;
+    background: #F8F9FB;
+    .filter{
+      font-size: 12px;
+      margin-left: 20px;
+    }
+    .condition{
+      font-size: 12px;
+      padding: 3px 10px;
+      border-radius: 12px;
+      margin-left: 3px;
+      cursor: pointer;
+    }
+    .select{
+      color: #2A9BD5;
+      background: #E2EFF6;
+    }
+  }
+  .list{
+    height: 480px;
+    overflow-y: auto;
+    padding-bottom: 20px;
+    li{
+      font-size: 13px;
+      color: #0E1932;
+      // height: 68px;
+      padding: 16px 20px 16px 44px;
+      position: relative;
+    }
+    .name{
+      font-size: 12px;
+      color: #7C828E;
+      margin-top: 8px;
+    }
+    .second{
+      margin-top: 15px;
+    }
+    .select-li{
+      color:#2A9BD5;
+      background: #E9F5FA;
+      .name{
+        color:#2A9BD5;
+      }
+    }
+    /* .select-name{
+      color:#2A9BD5;
+    } */
+    .check-box{
+      width: 14px;
+      // height: 14px;
+      position: absolute;
+      left: 0px;
+      top: 27px;
+    }
+    .more{
+      text-align: center;
+      color: #2A9BD5;
+      cursor: pointer;
+      margin-top: 15px;
+    }
+  }
+  .all-box{
+    color: #7C828E;
+    height: 69px;
+    line-height: 69px;
+    padding: 0 20px;
+    border-top: 1px solid #E9F5FA;
+    .check-all{
+      width: 14px;
+      margin: 0 8px 0 0;
+    }
+    .export{
+      color: #2A9BD5;
+      display: inline-block;
+      width: 92px;
+      height: 30px;
+      line-height: 30px;
+      text-align: center;
+      border: 1px solid #2A9BD5;
+      border-radius: 4px;
+      margin-left: 177px;
+    }
+    .exp-select{
+      color: #2A9BD5;
+      border-color: #2A9BD5;
+    }
+  }
+}

+ 197 - 0
src/components/Emergency/index.jsx

@@ -0,0 +1,197 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import closeIcon from '@common/images/close-icon.png';
+import HisList from './HisList';
+import PreviewBody from '@components/PreviewBody';
+import config from '@config/index';
+
+/**
+  急诊:全科历史病历
+*/
+
+class EmergencyHis extends Component{
+  constructor(props){
+    super(props);
+    this.state = {
+      index:0,
+      timer:null,
+      valChange:true,
+      chooseItem:''
+    }
+    this.searInp = React.createRef();
+    this.handleClose = this.handleClose.bind(this);
+    this.getMore = this.getMore.bind(this);
+    this.handleFilter = this.handleFilter.bind(this);
+    this.showDetail = this.showDetail.bind(this);
+    this.handleDownload = this.handleDownload.bind(this);
+    this.handleInput = this.handleInput.bind(this);
+    this.handleAdd = this.handleAdd.bind(this);
+  }
+
+  handleClose(){
+    const {close} = this.props;
+    close&&close();
+  }
+
+  getMore(){//点击更多
+    const {params,getNextPage} = this.props;
+    let current = params&&params.current + 1;
+    let param = Object.assign({},params,{current:current});
+    getNextPage&&getNextPage(param);
+  }
+
+  handleFilter(obj){//筛选
+    const {filterData} = this.props;
+    filterData&&filterData(obj);
+  }
+
+  showDetail(index){//病历详情
+    this.setState({
+      index:index
+    })
+  }
+
+  handleDownload(ids){//导出
+    const { getDownload } = this.props;
+    getDownload&&getDownload(ids)
+  }
+  //搜索框输入
+  handleInput(e){
+    const { handleChangeValue } = this.props;
+    clearTimeout(this.state.timer);
+    let timer = setTimeout(()=>{
+        clearTimeout(this.state.timer);
+        if(e.target.value.trim() == ''){
+          return  handleChangeValue('');
+        }
+        handleChangeValue(e.target.value);
+    },config.delayTime);
+    this.setState({
+        timer,
+        valChange:true,
+        chooseItem:''
+    });
+  }
+  //点击搜索结果
+  handleListClick(item){console.log(333,item)
+    const { handleChangeValue } = this.props;
+    // this.searInp.current.innerText = '';
+    this.searInp.current.value = item.name;
+    handleChangeValue('');
+    this.setState({
+      valChange:false,
+      chooseItem:item.name
+    });
+  }
+  getBtnStyle(){
+    const {valChange} = this.state;
+    if(valChange){
+      return `${style['add-btn']} ${style['gray-btn']}`
+    }
+    return style['add-btn'];
+  }
+  // 确认添加
+  handleAdd(){
+    const {chooseItem,index} = this.state;
+    const {addSecond,data} = this.props;
+    console.log("添加成功")
+    if(chooseItem.trim()){
+      // 添加接口
+      const item = {
+        name:chooseItem,
+        id:data[index].inquiryId
+      }
+      addSecond&&addSecond(item)
+    }
+  }
+
+  componentWillUnmount(){
+    // 组件销毁时 清除病历数据,因为每点开一次都会去请求
+    const {clearHisRecord} = this.props;
+    clearHisRecord&&clearHisRecord();
+  }
+
+  render(){
+    const {show,data,total,preInfo,searchData} = this.props;
+    const {index,valChange} = this.state;
+    // const searchData = [];
+    let baseObj = data[index];
+    let dataJson,dataStr;
+    if(baseObj){
+        dataJson = JSON.stringify(baseObj) == "{}" ? {} : JSON.parse(baseObj.dataJson);
+        dataStr = JSON.stringify(baseObj) == "{}" ? [] : baseObj.detailList;
+    }
+    const getAllDataStringList = () =>{           //获取所有模块文本的数据
+        let jsonDataString = {};
+        jsonDataString.lis = {};
+        jsonDataString.chief = dataStr[0].content || '';      //主诉
+        jsonDataString.present = dataStr[1].content || '';     //现病史
+        jsonDataString.other = dataStr[2].content || '';      //其他史
+        jsonDataString.vital = dataStr[3].content || '';    //查体
+        jsonDataString.lis = dataStr[4].content || '';      //化验导入填写
+        jsonDataString.pacs = dataStr[5].content || '';     //辅检
+        jsonDataString.diag = dataStr[6].content || '';      //诊断
+        jsonDataString.advice = dataStr[7].content || '';       //医嘱
+        return jsonDataString;
+    }
+    if(show){
+    return <div className={style['emer-box']}>      
+            <div className={style['emer-content']}>
+              <img src={closeIcon} className={style['img']} onClick={this.handleClose}/>
+              <div className={style['emer-left']}>
+                <HisList data={data} 
+                        total={total} 
+                        getMore={this.getMore} 
+                        handleFilter={this.handleFilter}
+                        detail={this.showDetail}
+                        handleDownload={this.handleDownload}/>
+              </div>
+              <div className={style['emer-right']}>
+                {
+                    baseObj == undefined || JSON.stringify(baseObj) == "{}" ? <p className={style['no-data']}>暂无数据</p> :
+                    <PreviewBody
+                        preInfo={preInfo}
+                        dataJson={dataJson}
+                        baseObj={baseObj}
+                        dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}
+                        show={false}
+                        flg={true}
+                    ></PreviewBody>
+                }
+                <div className={style['emer-right-footer']}>
+                  {baseObj&&baseObj.diagnoseSecond?<p className={style['diag-display']}>
+                    <span>{baseObj.doctorNameSecond} {'在'}{baseObj.inquiryTimeSecond} 添加</span>
+                    <span className={style['diag-cont']}>{baseObj.diagnoseSecond}{'(诊后添加)'}</span>
+                  </p>:''}
+                  <div className={style['add-diag']}>
+                    <div>
+                      <span>添加二次诊断:</span>
+                      <input className={style['add-inp']} 
+                            ref={this.searInp}
+                            onInput={(e) => { 
+                              this.handleInput(e)
+                             }}
+                            onPropertyChange={(e) => {  // 兼容ie
+                                this.handleInput(e)
+                            }}/>
+                      <span className={this.getBtnStyle()} onClick={!valChange?this.handleAdd:''}>确认添加</span>
+                    </div>
+                    <p className={style['add-tip']}>说明:二次诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
+                  </div>
+                </div>
+              </div>
+                {searchData.length>0?<div className={style['search-list']}>
+                      <ul>
+                        {searchData.map((v,i)=>{
+                          return <li key={v.questionId} onClick={this.handleListClick.bind(this,v)}>{v.name}{v.retrievalName?'('+v.retrievalName+')':''}</li>
+                        })}
+                      </ul>
+                    </div>:''}
+            </div>
+          </div>
+    }
+    return ''
+  }
+}
+
+export default EmergencyHis;

+ 117 - 0
src/components/Emergency/index.less

@@ -0,0 +1,117 @@
+@import "~@less/mixin.less";
+.mask-box{
+  .mask;
+}
+.emer-box{
+  width: 1060px;
+  height: 700px;
+  position: fixed;
+  left: 110px;
+  top: 70px;
+  z-index: 2002;
+  background: #fff;
+  // overflow: hidden;
+  .emer-content{
+    position: relative;
+  }
+  .img{
+    width: 40px;
+    height: 40px;
+    position: absolute;
+    top: 5px;
+    right: 3px;
+    cursor: pointer;
+    z-index: 888;
+  }
+  .emer-left{
+    width: 360px;
+    display: inline-block;
+    border-right: 1px solid #E9F5FA;
+  }
+  .emer-right{
+    width: 700px;
+    height: 700px;
+    overflow-y: auto;
+    display: inline-block;
+    vertical-align: top;
+    position: relative;
+    .no-data{
+      font-size: 18px;
+      position: absolute;
+      top: 300px;
+      left: 288px;
+      color: #7C828E;
+    }
+    .emer-right-footer{
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+    }
+    .diag-display{
+      color: #7C828E;
+      width: 100%;
+      height: 44px;
+      line-height: 44px;
+      background: #E9F5FA;
+      padding-left: 20px;
+      .diag-cont{
+        color: #2A9BD5;
+        margin-left: 10px;
+      }
+    }
+    .add-diag{
+      height: 71px;
+      border-top: 1px solid #E9F5FA;
+      padding: 8px 20px;
+      position: relative;
+      background: #fff;
+      .add-inp{
+        width: 460px;
+        height: 30px;
+        line-height: 30px;
+        border: 1px solid #C9CCD4;
+        border-radius: 2px;
+        padding-left: 10px;
+        margin-left: 7px;
+      }
+      .add-btn{
+        display: inline-block;
+        width: 80px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        color: #2A9BD5;
+        border: 1px solid #2A9BD5;
+        border-radius: 4px;
+        margin-left: 10px;
+        cursor: pointer;
+      }
+      .gray-btn{
+        color: #7C828E;
+        border-color: #7C828E;
+      }
+      .add-tip{
+        font-size: 12px;
+        color: #7C828E;
+        margin-top: 5px;
+      }
+    }
+  }
+  .search-list{
+    width: 460px;
+    height: 136px;
+    position: absolute;
+    bottom: -105px;
+    right: 115px;
+    background:#fff;
+    li{
+      height: 34px;
+      line-height: 34px;
+      padding-left: 20px;
+    }
+    li:hover{
+      background: #E9F5FA;
+    }
+  }
+}

+ 2 - 2
src/components/HistoryCaseContainer/index.less

@@ -1,6 +1,6 @@
 
 .maskHistory {
-    position: fixed;
+     position: fixed;
     left: 0;
     top: 0;
     z-index: 241;
@@ -9,7 +9,7 @@
     background-color: #000;
     opacity:0.6;
     filter:alpha(opacity=60);
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);"; 
 }
 .center {
     text-align: center;

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

@@ -76,7 +76,7 @@ class PreviewBody extends Component {
   }
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
-    const other_yjs = filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other);
+    const other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
     const noData = JSON.stringify(preInfo) == '{}';
     const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
@@ -118,10 +118,6 @@ class PreviewBody extends Component {
           </tr>
         </table>
         <p className={style.docName}>医生签名:<span>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
-        {showAssessBtn?<AssessResultHis showHistoryCases={showHistoryCases} isChronic={isChronic?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
-        <div onClick={() => { this.surePrint(dataStr) }} className={style.printBtn} style={{
-          display: show ? 'inline-block' : 'none',
-        }}>打印</div>
       </div>
     </div>
   }

+ 50 - 0
src/containers/Emergency.js

@@ -0,0 +1,50 @@
+import {connect} from 'react-redux';
+import Emergency from '@components/Emergency';
+import {getAllHis,getFilterHis,downloadData,addSecondDiag} from '@store/async-actions/fetchModules.js';
+import { downloadExportedData } from '@utils/tools.js';
+import {CLEAR_RECORD} from '@store/types/emergencyHis.js';
+import { getSearchList } from '@store/async-actions/diagnosticSearch';
+import {Notify} from '@commonComp';
+
+const mapStateToProps = function(state){
+  const {emergencyHis} = state;
+  return {
+    data:emergencyHis.allHisRecord,
+    total:emergencyHis.total,
+    params:emergencyHis.params,
+    preInfo : state.patInfo.message,
+    searchData:emergencyHis.searchData
+  }
+}
+
+const mapDispatchToProps = function(dispatch){
+  return {
+    getNextPage(item){
+      dispatch(getAllHis(item));
+    },
+    filterData(obj){
+      dispatch(getFilterHis(obj))
+    },
+    async getDownload(ids){
+      let resData = await downloadData(ids);
+      downloadExportedData(resData.data,"全科历史病历");
+    },
+    clearHisRecord(){
+      dispatch({type:CLEAR_RECORD})
+    },
+    handleChangeValue(val){
+      dispatch(getSearchList(val,true))
+    },
+    async addSecond(item){
+      // dispatch(addSecondDiag(item))
+      let resData = await addSecondDiag(item);
+      if(resData&&resData.data.code==0){
+        Notify.info("添加成功");
+        dispatch(getFilterHis({flag:-1}));
+      }
+      
+    }
+  }
+}
+
+export default connect(mapStateToProps,mapDispatchToProps)(Emergency);

+ 1 - 1
src/containers/ScaleSearchContainer.js

@@ -7,7 +7,7 @@ import {getScaleInfo} from '../store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return{
         searchResult: state.scaleSearch.searchResult,
-        formulaResult: state.pushMessage.formulaResult,//�表内容
+        formulaResult: state.pushMessage.formulaResult,//Á¿±íÄÚÈÝ
     }
 }
 

+ 22 - 8
src/store/async-actions/diagnosticSearch.js

@@ -1,11 +1,18 @@
 import { json } from "@utils/ajax";
 import { GET_SEARCH_RESULT } from '@store/types/diagnosticSearch';
+import { GET_SEARCH } from '@store/types/emergencyHis';
 
 
-export const getSearchList = (val) => {
+export const getSearchList = (val,flag) => {
     if(val.trim() == ''){
-        const data = [];
-        return (dispatch) =>  dispatch({
+        // const data = [];
+        if(flag){//ÀúÊ·²¡Àú
+            return (dispatch) =>  dispatch({
+                type: GET_SEARCH,
+                searchResult: []
+            })
+        }
+        return (dispatch) =>  dispatch({//Õï¶Ï
             type: GET_SEARCH_RESULT,
             searchResult: []
         })
@@ -13,7 +20,7 @@ export const getSearchList = (val) => {
    
     return (dispatch, getState) => {
         const state = getState();
-        const diagnosticList = state.diagnosticList.diagnosticList
+        const diagnosticList = flag?state.emergencyHis.searchData:state.diagnosticList.diagnosticList;
         let noIds = []
         for(let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].conceptId) {
@@ -29,10 +36,17 @@ export const getSearchList = (val) => {
         })
         .then((res)=>{
             const data = res.data.data;
-            dispatch({
-                type: GET_SEARCH_RESULT,
-                searchResult: data
-            })
+            if(flag){ //ÀúÊ·²¡Àú
+                dispatch({
+                    type: GET_SEARCH,
+                    searchResult: data
+                })
+            }else{//Õï¶Ï
+                dispatch({
+                    type: GET_SEARCH_RESULT,
+                    searchResult: data
+                })
+            }
         })
     }
 };

+ 89 - 1
src/store/async-actions/fetchModules.js

@@ -1,4 +1,4 @@
-import {json} from '@utils/ajax.js';
+import {json,expJson} from '@utils/ajax.js';
 import {SET,PRESET} from '@types/checkBody.js';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
@@ -10,6 +10,7 @@ import {SAVE_TABLE_RESULT,SET_CHRONIC_PUSHS} from "../types/pushMessage";
 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';
 
 const api={
   // getSpreadModule:'/questionInfo/getByIds',
@@ -25,6 +26,9 @@ const api={
   // getFormulaResult:'/push/calculate',  // 计算接口
   getFormulaResult:'/calc/calculate',  // 计算接口
   getAssessHis:'/inquiryInfo/getEvaluations',   //历史评估记录
+  getAllHisURL:'/inquiryInfo/hisInquirysForJz',   //全科历史病历
+  downloadURL:'/inquiryInfo/exportInquirys',   //全科历史病历--导出
+  addSecondDia:'/inquiryInfo/addDiagnoseSecond',   //全科历史病历--添加二次诊断
 };
 
 export const getFeature = (item)=>{
@@ -354,3 +358,87 @@ export function autoFillModules (){
     });
   }
 }
+
+// 获取全科历史病历
+export function getAllHis(item){
+  return (dispatch,getStore)=>{
+    const state = getStore();
+    const {message} = state.patInfo;
+    const params = {
+      "current": item.current,
+      // "endDate": item.endDate,
+      "hospitalDeptId": message.hospitalDeptId,
+      "hospitalId": message.hospitalId,
+      "size": 6,
+      // "startDate": item.startDate,
+    }
+
+    json(api.getAllHisURL,params).then((res)=>{
+      const result = res.data;
+      if(result.code == 0){
+        dispatch({
+          type:GET_ALL_HIS,
+          data:result.data.inquiryList,
+          total:result.data.total,
+          params:params,
+        })
+      }
+    })
+  } 
+}
+// 筛选全科历史病历
+export function getFilterHis(obj){
+  return (dispatch,getStore)=>{
+    const state = getStore();
+    const {message} = state.patInfo;
+    const {params} = state.emergencyHis;
+    let newParam = {};
+    if(obj.flag == 999){//时间筛选
+      newParam = Object.assign(params,{startDate:obj.startDate,endDate:obj.endDate})
+    }else{
+      if(obj.flag==-1){
+        newParam = Object.assign(params,{current:1})
+      }else{
+        newParam = Object.assign({},params,{isHasSecond:flag})
+      }
+    }
+
+    json(api.getAllHisURL,newParam).then((res)=>{
+      const result = res.data;
+      if(result.code == 0){
+        dispatch({
+          type:FILTER_ALL_HIS,
+          data:result.data.inquiryList,
+          total:result.data.total,
+          params:Object.assign(params,{current:1}),
+        })
+      }
+    })
+  } 
+}
+
+// 全科病历导出
+export function downloadData (ids){
+  const param = {
+    "inquiryIds":ids
+  }
+  return expJson(api.downloadURL,param);
+}
+
+export function addSecondDiag(item){
+  const state = store.getState();
+  const {message} = state.patInfo;
+  const param = {
+    "diagnoseSecond": item.name,
+    "doctorId": message.doctorId,
+    "inquiryId": item.id
+  }
+  return json(api.addSecondDia,param)
+  /*.then((res)=>{
+    const result = res.data;
+    if(result.code==0){
+      Notify.info("添加成功");
+    }
+  })*/
+}
+

+ 3 - 1
src/store/index.js

@@ -29,6 +29,7 @@ import assessResult from './reducers/assessResult';
 import assessResultHis from './reducers/assessResultHis';
 import medicalInfo from './reducers/medicalInfo';
 import scaleSearch from './reducers/scaleSearch';
+import emergencyHis from './reducers/emergencyHis';
 
 
 const composeEnhancers =
@@ -63,7 +64,8 @@ const rootReducer = combineReducers({
     currentIll,
     assessResult,
     assessResultHis,
-    medicalInfo
+    medicalInfo,
+  emergencyHis
 });
 
 export default createStore(rootReducer, enhancer);

+ 35 - 0
src/store/reducers/emergencyHis.js

@@ -0,0 +1,35 @@
+import {GET_ALL_HIS,FILTER_ALL_HIS,CLEAR_RECORD,GET_SEARCH} from '../types/emergencyHis.js';
+// import {getAllHis} from '../actions/emergencyHis.js';
+
+const initState = {
+  allHisRecord:[],
+  total:null,
+  params:{},
+  searchData:[]
+}
+
+export default function (state=initState,action){
+  let res = Object.assign({},state);
+  switch(action.type){
+    case GET_ALL_HIS://获取-追加
+      res.allHisRecord = res.allHisRecord.concat(action.data);
+      res.total = action.total;
+      res.params = Object.assign(res.params,action.params);
+      return res;
+    case FILTER_ALL_HIS://筛选-替换
+      res.allHisRecord = action.data;
+      res.total = action.total;
+      res.params = action.params;
+      return res;
+    case CLEAR_RECORD://清除
+      res.allHisRecord = [];
+      res.total = null;
+      res.params = {};
+      return res;
+    case GET_SEARCH://搜素
+      res.searchData = action.searchResult;
+      return res;
+    default:
+      return res;
+  }
+}

+ 4 - 0
src/store/types/emergencyHis.js

@@ -0,0 +1,4 @@
+export const GET_ALL_HIS = 'GET_ALL_HIS'; //获取全科历史病历
+export const FILTER_ALL_HIS = 'FILTER_ALL_HIS'; //筛选全科历史病历
+export const CLEAR_RECORD = 'CLEAR_RECORD'; //清除历史病历
+export const GET_SEARCH = 'GET_SEARCH'; //搜素

+ 13 - 1
src/utils/ajax.js

@@ -86,6 +86,17 @@ const json=(url,data)=>{
   });*/
 };
 
+// 导出
+const expJson = (url,data) =>{
+  return axios({
+    method:'post',
+    url:url.indexOf('http:')!=-1?url:qhost+url,
+    data,
+    contentType: "application/vnd.ms-excel" ,
+    responseType: 'blob' //必须添加,否则会乱码
+  });
+}
+
 const get=(url)=>{
   return axios.get(qhost+url).then(data=>data.data);
 };
@@ -93,5 +104,6 @@ const get=(url)=>{
 module.exports={
   post,
   get,
-  json
+  json,
+  expJson
 };

+ 17 - 1
src/utils/tools.js

@@ -1067,6 +1067,21 @@ function getCalendarDate(info,flg,con) {
   }
   return date;
 }
+
+// 导出
+function downloadExportedData(data, fileName) {
+    // var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); //type表示xlsx类型
+    var blob = new Blob([data], {type: 'application/vnd.ms-excel'}); //type表示xlsx类型
+    var downloadElement = document.createElement('a');
+    var href = window.URL.createObjectURL(blob); //创建下载的链接
+    downloadElement.href = href;
+    downloadElement.download = fileName; //下载后文件名
+    document.body.appendChild(downloadElement);
+    downloadElement.click(); //点击下载
+    document.body.removeChild(downloadElement); //下载完成移除元素
+    window.URL.revokeObjectURL(href);
+}
+
 module.exports = {
     checkType: Type.checkType,
     getIds,
@@ -1110,5 +1125,6 @@ module.exports = {
     ifOtherClear,
     readyKeepHistory,
     parseChartData,
-    getCalendarDate
+    getCalendarDate,
+	downloadExportedData
 };