|
@@ -37,7 +37,13 @@ $(function() {
|
|
|
const last = "456".replace(tabs,'');
|
|
|
$(".tabs [data-code="+(last-4)+"]").parent().hide();
|
|
|
}
|
|
|
- global_activeTabCode=tabs.substr(0,1)-4;
|
|
|
+ global_activeTabCode=tabs.substr(0,1)-4;console.log(global_activeTabCode)
|
|
|
+ //获取科室列表
|
|
|
+ if(global_activeTabCode=="0"){
|
|
|
+ getSubDeptList();
|
|
|
+ }else{
|
|
|
+ getDeptList();
|
|
|
+ }
|
|
|
$(".tabs [data-code="+global_activeTabCode+"]").addClass("active");
|
|
|
$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
|
$('.iconCalen').on("mouseenter", function(e){
|
|
@@ -65,6 +71,11 @@ $(function() {
|
|
|
$(".tabBox .tabs button").on("click",(e)=>{
|
|
|
const me = e.target;
|
|
|
global_activeTabCode = $(me).attr("data-code");
|
|
|
+ if(global_activeTabCode=="0"){
|
|
|
+ getSubDeptList();
|
|
|
+ }else{
|
|
|
+ getDeptList();
|
|
|
+ }
|
|
|
$(".tabBox .tabs button").removeClass("active");
|
|
|
$(me).addClass("active");
|
|
|
//更新列表并重置筛选条件
|
|
@@ -124,8 +135,7 @@ $(function() {
|
|
|
}
|
|
|
$(".modal-container").hide();
|
|
|
})
|
|
|
-//获取科室列表
|
|
|
- getDeptList()
|
|
|
+
|
|
|
//出院日期初始化
|
|
|
$.datepicker.regional['zh-CN'] = {
|
|
|
clearText: '清除',
|
|
@@ -397,9 +407,20 @@ function bindLeveldSelect(){
|
|
|
//$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
})
|
|
|
}
|
|
|
+//获取科室任务对应的列表
|
|
|
+function getSubDeptList(){
|
|
|
+ post(api.getDept,{}).then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ const deptList = res.data.data||[]
|
|
|
+ rendeDeptList(deptList)
|
|
|
+ }else{rendeDeptList([])}
|
|
|
+ }).catch((e) =>{
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
//科室列表
|
|
|
-function getDeptList(val){
|
|
|
- post(api.getDeptList,{inputStr:val=="全部"?"":val||""}).then(res =>{
|
|
|
+function getDeptList(){
|
|
|
+ post(api.getDeptList,{}).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
|
const deptList = res.data.data||[]
|
|
|
rendeDeptList(deptList)
|