Jelajahi Sumber

重复调用bug

zhouna 3 tahun lalu
induk
melakukan
4e2cbeaa8e
2 mengubah file dengan 9 tambahan dan 4 penghapusan
  1. 6 2
      src/js/dept/readmissionDept.js
  2. 3 2
      src/js/dept/uncorrectedCopyDept.js

+ 6 - 2
src/js/dept/readmissionDept.js

@@ -153,6 +153,7 @@ ele.addClass('active');
   return false;
 }*/
 function getTabData(activePage) {
+  //console.trace(22);
   const dateStatrt = getPickerDate($('#datepicker'), 1);
   const dateEnd = getPickerDate($('#datepicker2'), 2);
   const start = new Date(dateStatrt).getTime();
@@ -208,7 +209,7 @@ function getTabData(activePage) {
     .catch(e => {});
 }
 
-getTabData(1);
+//getTabData(1);
 
 $('.filter').on('click', function(e) {
   // deptName = deptNameTemp;
@@ -408,7 +409,10 @@ function bindModuleTypeSelect() {
 //科室处理
 function getDeptList(flg) {
   let str = ``;
-  if (deptList.length <= 0) return;
+  if (deptList.length <= 0){
+	getTabData(1);
+	return;
+  }
   if (flg) {
     $('.qcListCopy .selectDept ')
       .attr('data-id', deptList[0].deptName)

+ 3 - 2
src/js/dept/uncorrectedCopyDept.js

@@ -146,6 +146,7 @@ function setTitleList() {
   });
 }
 function getTabData(activePage) {
+  console.trace(32)
   const dateStatrt = getPickerDate($('#datepicker'), 1);
   const dateEnd = getPickerDate($('#datepicker2'), 2);
   const start = new Date(dateStatrt).getTime();
@@ -323,7 +324,7 @@ function orderTitleLis(data) {
 function getDeptList(flg) {
   let str = ``;
   if(deptList.length<=0){
-	getTabData(1);
+	//getTabData(1);  //获取表头之后会调,不重复调用了
 	return
   }
   if (flg) {
@@ -341,7 +342,7 @@ function getDeptList(flg) {
   }
   $('.partDetailControl .filterDropList').html(str);
   getmoduleTypeList();
-  getTabData(1);
+  //getTabData(1);
 }
 bindDeptSelect();
 //科室选择