Browse Source

问题修改

1178232204@qq.com 3 years ago
parent
commit
1f3431a03f
2 changed files with 23 additions and 11 deletions
  1. 7 7
      src/js/doctorQcAverageDetail.js
  2. 16 4
      src/js/doctorQcListCopy.js

+ 7 - 7
src/js/doctorQcAverageDetail.js

@@ -19,12 +19,12 @@ listenScroll()
 $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`);
 let tabList = [], /*statisticsType="",*/
     levelTemp = "", deptId = "", deptIdTemp = "", deptName = "", deptNameTemp = "", doctorName = "", doctorNameTemp = "",
-    data_desc = ['entryNum'], data_asc = [],doctorNum = "",doctorNumTemp = "", hospital = getCookie("hospital");
+    data_desc = ['entryNum'], data_asc = [], doctorNum = "", doctorNumTemp = "", hospital = getCookie("hospital");
 let srcUrl = $("#contentIframe", parent.document).attr("src")
 /*statisticsType = getUrlArgObjectNew("dateType",srcUrl)||""*/
 deptType = getUrlArgObjectNew("deptType", srcUrl) || ""
-deptName = getUrlArgObjectNew("deptName", srcUrl) || ""
-deptId = getUrlArgObjectNew("deptId", srcUrl) || ""
+deptName = deptNameTemp = getUrlArgObjectNew("deptName", srcUrl) || ""
+deptId = deptIdTemp = getUrlArgObjectNew("deptId", srcUrl) || ""
 
 let startDateParam = getUrlArgObjectNew("startDateParam", srcUrl) || ""
 let endDateParam = getUrlArgObjectNew("endDateParam", srcUrl) || ""
@@ -83,7 +83,7 @@ function getTabData(activePage) {
         "asc": data_asc,
         "desc": data_desc,
         "doctorName": doctorName || "",
-        "doctorId":doctorNum || "",
+        "doctorId": doctorNum || "",
         "deptId": deptId,
         "deptName": deptName == "全院" ? "" : (deptName || ""),
         "type": 0, //1-本月,2-本年,0-自定义时间(现在 都是自定义时间,都会传具体时间进去)
@@ -193,7 +193,7 @@ function renderTab(data, hisId, activePage) {
         let deptId = $(this).attr("dept-id")
         let doctorName = $(this).attr("dept-doc")
         let doctorId = $(this).attr("dept-docId")
-        $(parent.document).find("#contentIframe").attr("src", "doctorQuexianDetailControl.html?deptName=" + deptName + "&deptId=" + deptId+ "&doctorName=" + doctorName+ "&doctorId=" + doctorId + "&from=2" + "&shijian=3" + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
+        $(parent.document).find("#contentIframe").attr("src", "doctorQuexianDetailControl.html?deptName=" + deptName + "&deptId=" + deptId + "&doctorName=" + doctorName + "&doctorId=" + doctorId + "&from=2" + "&shijian=3" + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
     })
     //病历跳转
     $(".goHomeDetailB").click(function () {
@@ -202,7 +202,7 @@ function renderTab(data, hisId, activePage) {
         let deptIds = $(this).attr("dept-id")
         let doctorName = $(this).attr("dept-doc")
         let doctorId = $(this).attr("dept-docId")
-        $(parent.document).find("#contentIframe").attr("src", "doctorQcListCopy.html?deptName=" + deptName + "&from=3" + "&shijian=3&chengdu=" + deptC + "&deptId=" + deptIds+ "&doctorName=" + doctorName+ "&doctorId=" + doctorId + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
+        $(parent.document).find("#contentIframe").attr("src", "doctorQcListCopy.html?deptName=" + deptName + "&from=3" + "&shijian=3&chengdu=" + deptC + "&deptId=" + deptIds + "&doctorName=" + doctorName + "&doctorId=" + doctorId + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
     })
 }
 
@@ -372,7 +372,7 @@ $(function () {
             "asc": data_asc,
             "desc": data_desc,
             "doctorName": doctorName || "",
-            "doctorId":doctorNum || "",
+            "doctorId": doctorNum || "",
             "deptName": deptName == "全院" ? "" : (deptName || ""),
             "deptId": deptId,
             /*"type": statisticsType||2,*/ //1-本月,2-本年

+ 16 - 4
src/js/doctorQcListCopy.js

@@ -1287,6 +1287,7 @@ $(function ($) {
     $('.export').click(function () {
         const behosDateStartTime = new Date(behosDateStart).getTime()
         const behosDateEndTime = new Date(behosDateEnd).getTime()
+        const exportTime = defectName && defectName !== 'undefined' ? exportTimeLimit.defectTime :exportTimeLimit.normalTime
         if (behosDateStartTime > behosDateEndTime) {
             $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
             return
@@ -1362,10 +1363,21 @@ $(function ($) {
                 mrTimeEnd: fpCheckDateEnd.replace(/\//g, '-'), //首页核查截止时间
             }
         }
-        $.alerModal({ type: "radio", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
-        closeRadio()
-        radioSelect()
-        bindSaveColPort(param, exportURL)
+        if(exportTime==90){
+            if((new Date(behosDateEnd) - new Date(behosDateStart))/24/60/60/1000 > exportTime){
+                $.alerModal({"message":`最多只能导出${exportTime}天`,type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+                return
+            }else{
+                expJson(exportURL,param).then(res =>{
+                    downloadExportedData(res.data, $(".partTitle").text()+".xls")
+                })
+            }
+        }else{
+            $.alerModal({type:"radio",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
+            closeRadio()
+            radioSelect()
+            bindSaveColPort(param,exportURL)
+        }
     })
 });
 function closeRadio() {