|
@ -84,7 +84,7 @@ mui.back = function(){
|
|
|
title = title.substring(0,3);
|
|
|
}
|
|
|
$("#title").html(title);
|
|
|
$('#tjTitle').html(level==4? "各区管理" : level==3? "各社区情况" : "各团队情况");
|
|
|
$('#tjTitle').html("各科室管理");
|
|
|
$(".c-lab-mor #labLi1").addClass("hit")
|
|
|
}
|
|
|
}
|
|
@ -187,20 +187,18 @@ function loadData(type, level, area){
|
|
|
clearData(type);
|
|
|
var params = {level: level, area: area, year: chooseYear}
|
|
|
loadAmount(params);
|
|
|
if(level==4){//市级管理员才可以查看市下面的所有社区数据
|
|
|
if(level==3){//市级管理员才可以查看市下面的所有社区数据
|
|
|
$(".c-lab-mor #labLi2").removeClass("c-hide");
|
|
|
}
|
|
|
}
|
|
|
//后台接收数据
|
|
|
function loadAmount(params){
|
|
|
sendPost("/statistics/time",null,function(res){
|
|
|
|
|
|
sendPost("/statistics/time",null,function(res){
|
|
|
},function(res){
|
|
|
if(res.status=="200"){
|
|
|
var date = (res.data && res.data.substring(11,16)) || "";
|
|
|
$(".jiezhi-time").html(date)
|
|
|
}
|
|
|
|
|
|
})
|
|
|
console.log("第一个:"+JSON.stringify(params))
|
|
|
sendPost("/statistics/Consulting_Title", params, null, countHandle);
|
|
@ -212,8 +210,8 @@ function loadAmount(params){
|
|
|
sendPost("/statistics/Consulting_StatList", params, null, listHandle);
|
|
|
// delete params.lowLevel;
|
|
|
if($(".c-lab-mor #labLi2").css("display")!="none"){
|
|
|
if(roleLevel==4){//市级管理员才可以查看市下面的所有社区数据
|
|
|
params.lowlevel = "2";
|
|
|
if(roleLevel==3){//市级管理员才可以查看市下面的所有社区数据
|
|
|
params.lowlevel = "1";
|
|
|
console.log("第三个:"+JSON.stringify(params))
|
|
|
sendPost("/statistics/Consulting_StatList", params, null, list2Handle);
|
|
|
delete params.lowLevel;
|
|
@ -284,7 +282,7 @@ function listHandle(res){
|
|
|
var name = $(this).attr("data-name");
|
|
|
title = name;
|
|
|
$("#title").html(title);
|
|
|
$('#tjTitle').html(level==4? "各区管理" : level==3? "各社区情况" : "各团队情况");
|
|
|
$('#tjTitle').html("各医生情况");
|
|
|
path[level] = {type: type, level: level, area: area, title: name}
|
|
|
})
|
|
|
}
|
|
@ -320,16 +318,16 @@ function list2Handle(res){
|
|
|
|
|
|
if($div){
|
|
|
$div.append(template("list_tmpl", res));
|
|
|
$("li", $div).on("tap", function(){
|
|
|
level = 2;
|
|
|
area = $(this).attr("data-code");
|
|
|
load(type, level, area);
|
|
|
var name = $(this).attr("data-name");
|
|
|
title = name;
|
|
|
$("#title").html(title);
|
|
|
$('#tjTitle').html("各团队情况");
|
|
|
path[level] = {type: type, level: level, area: area, title: name}
|
|
|
})
|
|
|
// $("li", $div).on("tap", function(){
|
|
|
// level = 2;
|
|
|
// area = $(this).attr("data-code");
|
|
|
// load(type, level, area);
|
|
|
// var name = $(this).attr("data-name");
|
|
|
// title = name;
|
|
|
// $("#title").html(title);
|
|
|
// $('#tjTitle').html("各医生情况");
|
|
|
// path[level] = {type: type, level: level, area: area, title: name}
|
|
|
// })
|
|
|
$("#list2").append($div);
|
|
|
scroller1.refresh();
|
|
|
plus.nativeUI.closeWaiting();
|
|
@ -342,7 +340,7 @@ function list2Handle(res){
|
|
|
|
|
|
|
|
|
|
|
|
function countHandle(res){
|
|
|
function countHandle(res){
|
|
|
if(res.status == 200) {
|
|
|
res = res.data.result[0] || [];
|
|
|
$('#div_total').html(res.total);
|
|
@ -451,9 +449,9 @@ function dateLineHandle(res){
|
|
|
}
|
|
|
|
|
|
function load(type, level, area, from, to){
|
|
|
$('#labLi2').toggle(level == 4);
|
|
|
$('#labLi2').toggle(level == 3);
|
|
|
if($(".c-lab-mor .hit").attr("id")=="labLi2"){
|
|
|
$('#list2').toggle(level == 4);
|
|
|
$('#list2').toggle(level == 3);
|
|
|
$('#labLi2').removeClass("hit");
|
|
|
}
|
|
|
$('#list').show();
|
|
@ -466,7 +464,8 @@ function load(type, level, area, from, to){
|
|
|
window.addEventListener("loadData", function(e) {
|
|
|
// userRole = JSON.parse(plus.storage.getItem("userRole"))[0] ;
|
|
|
userRole = JSON.parse(plus.storage.getItem("selectedRole"));
|
|
|
roleLevel = userRole.code == '350200' ? 4 : userRole.code.length==6 ? 3 : 2;
|
|
|
// roleLevel = userRole.code == '350200' ? 4 : userRole.code.length==6 ? 3 : 2;
|
|
|
roleLevel=3;
|
|
|
|
|
|
type = e.detail.type;
|
|
|
$('.type-'+ type).show();
|
|
@ -477,9 +476,9 @@ window.addEventListener("loadData", function(e) {
|
|
|
|
|
|
load(type, level, area);
|
|
|
|
|
|
$('#tjTitle').html(level==4? "各区管理" : level==3? "各社区情况" : "各团队情况");
|
|
|
$('#tjTitle').html("各科室管理");
|
|
|
if(!e.detail.title){
|
|
|
$('#labLi2').toggle(level == 4);
|
|
|
$('#labLi2').toggle(level == 3);
|
|
|
}
|
|
|
$(".c-lab-mor #labLi2").removeClass("hit");
|
|
|
if(level==4){
|