|
@@ -7,9 +7,9 @@ require("../images/arrow_down.png")
|
|
|
// import 'zrender/lib/svg/svg';
|
|
|
const echarts = require('echarts');
|
|
|
const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
|
|
|
-let payMoney = [],dayLis = [],dateType = 2,slideType = 1;
|
|
|
+let payMoney = [],dayLis = [],dateType = 2,curDept = '',datafst=[],datasec=[],datatrd=[],datafour=[];
|
|
|
$(function(){
|
|
|
- if(!hasData('YH-KZT')){
|
|
|
+ if(!hasData('YH-KZT')&&!hasData('YH-KZTKS')){
|
|
|
$("body").html('')
|
|
|
}
|
|
|
$(".partTitle p span").html(getCookie("hospital"))
|
|
@@ -18,19 +18,14 @@ $(function(){
|
|
|
}, 1000);
|
|
|
// resizeBox()
|
|
|
initConsole()//质控列表
|
|
|
- getBarData(2)//图标数据获取
|
|
|
+ getOwnDept()
|
|
|
dateChange()
|
|
|
$(window).click(function(){
|
|
|
window.parent.userActionHide()
|
|
|
$(".toggleSlide ul").css("display","none")
|
|
|
})
|
|
|
- let sildeIS = true
|
|
|
- if(!hasData('FUNC000045')&&!hasData('FUNC000046')){
|
|
|
- $(".toggleSlide").css("opacity","0.5")
|
|
|
- sildeIS = false
|
|
|
- }
|
|
|
+
|
|
|
$(".toggleSlide p").click(function(e){
|
|
|
- if(!sildeIS)return
|
|
|
e.stopPropagation()
|
|
|
$(this).next().slideToggle()
|
|
|
})
|
|
@@ -38,7 +33,7 @@ $(function(){
|
|
|
//判断有无某一权限
|
|
|
function hasData(data){
|
|
|
let lis = JSON.parse(getCookie("codeLis"))
|
|
|
- console.log(lis)
|
|
|
+ // console.log(lis)
|
|
|
if(lis.indexOf(data)>-1){//有权限
|
|
|
return true
|
|
|
}
|
|
@@ -113,92 +108,94 @@ function initConsole(result){
|
|
|
}
|
|
|
$(".partAll").html(dom)
|
|
|
}
|
|
|
+//获取科室列表
|
|
|
+function getOwnDept(){
|
|
|
+ if(hasData('FUNC000058')){
|
|
|
+ post('/consoleByDept/getDept',{}).then((res)=>{
|
|
|
+ let data = res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ let result = data.data
|
|
|
+ renderDeptLis(result)//科室tab渲染
|
|
|
+ curDept = result[0].deptName
|
|
|
+ $(".partTitle p i,.toggleSlide p span").html(curDept).attr("title",curDept)
|
|
|
+ getBarData(2)//图标数据获取
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+function renderDeptLis(data){
|
|
|
+ let str = ''
|
|
|
+ for(let i = 0; i < data.length;i++){
|
|
|
+ str += `
|
|
|
+ <li title="${data[i].deptName}" class="${i == 0?'li0 toggleAverge toggleSlide1':'toggleAverge toggleSlide1'}" data-dept="${data[i].deptName}">${data[i].deptName}</li>
|
|
|
+ `
|
|
|
+ }
|
|
|
+ $(".toggleSlide ul").html(str)
|
|
|
+ $(".toggleSlide ul li").click(function(){
|
|
|
+ let name = $(this).attr("data-dept")
|
|
|
+ curDept = name
|
|
|
+ $(this).parent().slideToggle().prev().find("span").html(name).attr("title",name)
|
|
|
+ $(".partTitle p i").html(name).attr("title",name)
|
|
|
+ personNum(datafst[name]||[])
|
|
|
+ setNumDetail(datasec[name]||[])
|
|
|
+ queList(datatrd[name]||[])
|
|
|
+ for(let i = 0;i < datafour[name].length;i++){
|
|
|
+ datafour[name][i].value = datafour[name][i].num
|
|
|
+ }
|
|
|
+ emptyCircleB(datafour[name])
|
|
|
+ panDetailB(datafour[name])
|
|
|
+ $(this).addClass("li0").siblings().removeClass("li0")
|
|
|
+ })
|
|
|
+}
|
|
|
//获取图表数据
|
|
|
function getBarData(type){
|
|
|
- if(hasData('FUNC000049')){
|
|
|
- // post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
|
|
|
- post('/console/leaveHosCount',{//出院人数统计
|
|
|
+ if(hasData('FUNC000054')){
|
|
|
+ post('/consoleByDept/leaveHosCountByDept',{//出院人数统计
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- // console.log(data)
|
|
|
- let result1 = data.data['出院人数统计']||[]
|
|
|
- personNum(result1)
|
|
|
+ let result = data.data[curDept]||[]
|
|
|
+ datafst = data.data
|
|
|
+ personNum(result)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if(hasData('FUNC000050')){
|
|
|
- // post('/consoleByDept/mrCountByDept',{//质控病历统计
|
|
|
- post('/console/mrCount',{//质控病历统计
|
|
|
+ if(hasData('FUNC000055')){
|
|
|
+ post('/consoleByDept/mrCountByDept',{//质控病历统计
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data
|
|
|
if(data.code == 0){
|
|
|
- let result3 = data.data['病历数统计']||[]
|
|
|
- if(result3.length == 0){
|
|
|
- result3 = [
|
|
|
- {
|
|
|
- "id":null,
|
|
|
- "name":"累计质控病历数",
|
|
|
- "totleNum":0,
|
|
|
- "num":0,
|
|
|
- "percent":null,
|
|
|
- "percentStr":null
|
|
|
- },
|
|
|
- {
|
|
|
- "id":null,
|
|
|
- "name":"甲级病历",
|
|
|
- "totleNum":10,
|
|
|
- "num":0,
|
|
|
- "percent":0,
|
|
|
- "percentStr":"0.00%"
|
|
|
- },
|
|
|
- {
|
|
|
- "id":null,
|
|
|
- "name":"乙级病历",
|
|
|
- "totleNum":10,
|
|
|
- "num":0,
|
|
|
- "percent":0,
|
|
|
- "percentStr":"0.00%"
|
|
|
- },
|
|
|
- {
|
|
|
- "id":null,
|
|
|
- "name":"丙级病历",
|
|
|
- "totleNum":10,
|
|
|
- "num":0,
|
|
|
- "percent":0,
|
|
|
- "percentStr":"0.00%"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ let result3 = data.data[curDept]||[]
|
|
|
+ datasec = data.data
|
|
|
setNumDetail(result3)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if(hasData('FUNC000051')){
|
|
|
- // post('/consoleByDept/entryCountGroupByCaseAndDept',{//各模块缺陷占比排行
|
|
|
- post('/console/entryCountGroupByCase',{//各模块缺陷占比排行
|
|
|
+ if(hasData('FUNC000056')){
|
|
|
+ post('/consoleByDept/entryCountGroupByCaseAndDept',{//各模块缺陷占比排行
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- let result1 = data.data['各模块缺陷占比排行']||[]
|
|
|
+ let result1 = data.data[curDept]||[]
|
|
|
+ datatrd = data.data
|
|
|
queList(result1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if(hasData('FUNC000052')){
|
|
|
- // post('/consoleByDept/entryCountGroupByEntryAndDept',{//条目缺陷占比
|
|
|
- post('/console/entryCountGroupByEntry',{//条目缺陷占比
|
|
|
+ if(hasData('FUNC000057')){
|
|
|
+ post('/consoleByDept/entryCountGroupByEntryAndDept',{//条目缺陷占比
|
|
|
"type": type||1//1月2年
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
|
- let result3 = data.data['条目缺陷占比']||[]
|
|
|
+ let result3 = data.data[curDept]||[]
|
|
|
for(let i = 0;i < result3.length;i++){
|
|
|
result3[i].value = result3[i].num
|
|
|
}
|
|
|
+ datafour = data.data
|
|
|
emptyCircleB(result3)
|
|
|
panDetailB(result3)
|
|
|
}
|
|
@@ -215,11 +212,46 @@ function personNum(data){
|
|
|
//part02
|
|
|
function setNumDetail(data){
|
|
|
// console.log(data,2222222222)
|
|
|
- if(data.length == 0)return
|
|
|
+ if(data.length == 0){
|
|
|
+ data = [
|
|
|
+ {
|
|
|
+ "id":null,
|
|
|
+ "name":"累计质控病历数",
|
|
|
+ "totleNum":0,
|
|
|
+ "num":0,
|
|
|
+ "percent":null,
|
|
|
+ "percentStr":null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id":null,
|
|
|
+ "name":"甲级病历",
|
|
|
+ "totleNum":10,
|
|
|
+ "num":0,
|
|
|
+ "percent":0,
|
|
|
+ "percentStr":"0.00%"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id":null,
|
|
|
+ "name":"乙级病历",
|
|
|
+ "totleNum":10,
|
|
|
+ "num":0,
|
|
|
+ "percent":0,
|
|
|
+ "percentStr":"0.00%"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id":null,
|
|
|
+ "name":"丙级病历",
|
|
|
+ "totleNum":10,
|
|
|
+ "num":0,
|
|
|
+ "percent":0,
|
|
|
+ "percentStr":"0.00%"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
let str = ''
|
|
|
for(let i = 0;i < data.length;i++){
|
|
|
str += `
|
|
|
- <li class="${i==0?'fst':''}">
|
|
|
+ <li class="${i==0?'fst':i == data.length-1?' four':''}">
|
|
|
<p class="numShow">${data[i].num}</p>
|
|
|
<p class="explainNum">${data[i].name}</p>
|
|
|
</li>
|
|
@@ -443,4 +475,6 @@ function getTimeDetail(){
|
|
|
let hour = d.getHours()
|
|
|
let str = `${d.getFullYear()}年${d.getMonth()+1}月${d.getDate()}日 / ${days[d.getDay()]} / ${hour>9?hour:'0'+hour}:${min>9?min:'0'+min}:${sec>9?sec:'0'+sec}`
|
|
|
$(".dateDetail").html(str)
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|