Explorar o código

接口重复调用bug1635

zhouna %!s(int64=3) %!d(string=hai) anos
pai
achega
08216d9b2e
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      src/js/singleVeto.js

+ 6 - 2
src/js/singleVeto.js

@@ -125,7 +125,10 @@ $(function(){
     if(!isReject){
         setDatePicker($("#datepicker"),$("#datepicker2"),"default")
       }
-    getTabData(1)//条目缺陷
+      if(from!=2){  //避免重复调用,上面getDeptList内有调用
+		getmoduleTypeList()
+		getTabData(1)//条目缺陷
+      }
 })
 //科室相关
 bindDeptSelect()
@@ -198,6 +201,7 @@ $("th[code]").on("click",function(e){
 
 
 function getTabData(activePage){
+    console.trace(11)
     const dateStatrt = getPickerDate($("#datepicker"),1)
     const dateEnd = getPickerDate($("#datepicker2"),2)
     const start = new Date(dateStatrt).getTime()
@@ -501,7 +505,7 @@ $('.selectModuleType').on("input", function(e){
     getmoduleTypeList(val)
 })
 
-getmoduleTypeList()
+//getmoduleTypeList()
 //获取模块类型
 function getmoduleTypeList(val){
     post(api.getQcCasesAll,{casesName:val=="全部"?"":val||""}).then(res =>{