浏览代码

Merge branch 'master' into referMaster

zhangxc 5 年之前
父节点
当前提交
2945f087a7
共有 10 个文件被更改,包括 159 次插入11 次删除
  1. 1 0
      package.json
  2. 13 1
      src/css/qcList.less
  3. 14 1
      src/css/qcListDept.less
  4. 3 2
      src/css/reset.less
  5. 1 1
      src/html/qcList.html
  6. 1 1
      src/html/qcListDept.html
  7. 2 0
      src/js/api.js
  8. 23 2
      src/js/qcList.js
  9. 21 1
      src/js/qcListDept.js
  10. 80 2
      src/js/utils.js

+ 1 - 0
package.json

@@ -4,6 +4,7 @@
   "description": "",
   "main": "index.js",
   "dependencies": {
+    "axios": "^0.19.2",
     "bluebird": "^3.5.5",
     "echarts": "^4.7.0",
     "es3ify-loader": "^0.2.0",

+ 13 - 1
src/css/qcList.less

@@ -168,7 +168,7 @@ table{
     width: 160px;
 }
 
-.filter,.reset{
+.filter,.reset,.export{
     display: inline-block;
     width:60px;
     height:32px;
@@ -183,6 +183,18 @@ table{
     float: left;
     margin: 0 0px 22px 0;
 }
+.export{
+    height:34px;
+    background: #fff;
+    border-radius: 4px;
+    color: #777;
+    border: 1px solid #777;
+    box-sizing: border-box;
+    cursor: pointer;
+    margin-left: 10px;
+    float: left;
+    top: 0px;
+}
 .arrow{
     position: absolute;
     width: 10px;

+ 14 - 1
src/css/qcListDept.less

@@ -167,7 +167,7 @@ table{
     width: 160px;
 }
 
-.filter,.reset{
+.filter,.reset,.export{
     display: inline-block;
     width:60px;
     height:32px;
@@ -182,6 +182,19 @@ table{
     float: left;
     margin: 0 0px 22px 0;
 }
+.export{
+    height:34px;
+    
+    background: #fff;
+    border-radius: 4px;
+    color: #777;
+    border: 1px solid #777;
+    box-sizing: border-box;
+    cursor: pointer;
+    margin-left: 10px;
+    float: left;
+    top: 0px;
+}
 .arrow{
     position: absolute;
     width: 10px;

+ 3 - 2
src/css/reset.less

@@ -153,6 +153,7 @@ textarea {
   text-indent: 20px;
   font-weight: normal;
   letter-spacing: 1px;
+  background: #fff;
 }
 
 
@@ -448,7 +449,7 @@ input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
   }
 }
 .filterclearT {
-  height: 32px !important;
+  height: 324x !important;
   line-height: 32px !important;
   float: left;
   position: relative;
@@ -462,7 +463,7 @@ input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
 .filterclear.abnormalClear {
   display: inline-block;
   width: 60px;
-  height: 32px;
+  height: 34px;
   line-height: 32px;
   background: #fff;
   border-radius: 4px;

+ 1 - 1
src/html/qcList.html

@@ -57,7 +57,7 @@
                 </span>
                
                 <span class="filter">查询</span>
-                <!-- <span class="reset">重置</span> -->
+                <span class="export">导出</span>
                 <span class="filterclear abnormalClear filterclearT">重置</span>
             </div>
             <div class="overAuto">

+ 1 - 1
src/html/qcListDept.html

@@ -56,7 +56,7 @@
                     </ul>
                 </span>
                 <span class="filter">查询</span>
-                <!-- <span class="reset">重置</span> -->
+                <span class="export">导出</span>
                 <span class="filterclear abnormalClear filterclearT">重置</span>
             </div>
             <div>

+ 2 - 0
src/js/api.js

@@ -77,6 +77,8 @@ const api = {
     typeGetById:'/qc/qcType/getById',//根据id返回
     getQcAnnormalMode:'/qc/abnormal/getQcAnnormalMode',//异常修改
     saveAndupdataModel:'/qc/modelHospital/saveAndupdataModel',//异常保存
+    exportQcList:'/qc/behospitalInfo/exportQcresult',//质控评分导出
+    exportQcListDept:'/qc/behospitalInfo/exportQcresultByDept',//质控评分(科室)导出
 }
 module.exports = {
     api

+ 23 - 2
src/js/qcList.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcList.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox,downloadExportedData,expJson} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -130,6 +130,7 @@ $(".filter").on("click", function(e){
     if(behosDateEnd){
         behosDateEnd = behosDateEnd.replace(/\//g,'-') + ' 23:59:59'
     }
+
     name = nameTemp
     behospitalCode = behospitalCodeTemp
     level = levelTemp==="全部"?"":levelTemp
@@ -600,6 +601,26 @@ $(document).on("click", function(){
     $(".selectLevel .arrow").attr("src",iconDown)
     
 })
-
 $((function($){
+
+    $('.export').click(function(){
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > 7){
+            $.alerModal({"message":"最多只能导出7天",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        const param = {
+            "behospitalCode": behospitalCode,
+            "deptId": deptId,
+            "doctorCode":doctorNum,
+            "doctorName": doctorName,
+            "leaveHosDateEnd": behosDateEnd,
+            "leaveHosDateStart": behosDateStart,
+            "level": level,
+            "name": name
+        }
+        expJson(api.exportQcList,param).then(res =>{
+            downloadExportedData(res.data, behosDateStart.slice(0,10).replace(/-/g,"")+"-"+behosDateEnd.slice(0,10).replace(/-/g,"")+"抽查住院病历质量情况.xls")
+        })
+      
+    })
 })($));

+ 21 - 1
src/js/qcListDept.js

@@ -2,7 +2,7 @@ const $ = require('jquery');
 require("../css/qcListDept.less");
 require('./modal.js');
 const {api} = require('./api.js')
-const {post,getCookie,getUrlArgObjectNew,emptyBox} = require('./utils.js')
+const {post,getCookie,getUrlArgObjectNew,emptyBox,downloadExportedData,expJson} = require('./utils.js')
 require('./../resource/jquery-ui/jquery-ui.min.js');
 require('./../resource/jquery-ui/jquery-ui.min.css');
 const iconCheck= require("./../images/icon_check.png")
@@ -605,4 +605,24 @@ $(document).on("click", function(){
 })
 
 $((function($){
+    $('.export').click(function(){
+        if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > 7){
+            $.alerModal({"message":"最多只能导出7天",type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            return
+        }
+        const param = {
+            "behospitalCode": behospitalCode,
+            "deptId": deptId,
+            "doctorCode":doctorNum,
+            "doctorName": doctorName,
+            "leaveHosDateEnd": behosDateEnd,
+            "leaveHosDateStart": behosDateStart,
+            "level": level,
+            "name": name
+        }
+        expJson(api.exportQcList,param).then(res =>{
+            downloadExportedData(res.data, behosDateStart.slice(0,10).replace(/-/g,"")+"-"+behosDateEnd.slice(0,10).replace(/-/g,"")+"抽查住院病历质量情况.xls")
+        })
+      
+    })
 })($));

文件差异内容过多而无法显示
+ 80 - 2
src/js/utils.js