|
@@ -1,4 +1,5 @@
|
|
|
const $ = require('jquery');
|
|
|
+
|
|
|
require("../css/reset.less")
|
|
|
require("../css/console.less")
|
|
|
require("../images/logo.png")
|
|
@@ -7,8 +8,11 @@ require("../images/arrow_down.png")
|
|
|
// import 'zrender/lib/svg/svg';
|
|
|
const {api} = require('./api.js')
|
|
|
const echarts = require('echarts');
|
|
|
+require('./../resource/jquery-ui/jquery-ui.min.js');
|
|
|
+require('./../resource/jquery-ui/jquery-ui.min.css');
|
|
|
const {post,setCookie,delCookie,getCookie,focusMenuItem,picEmptyData} = require('../js/utils.js');
|
|
|
-let payMoney = [],dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="合格率",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
|
|
|
+let payMoney = [],behosDateStart="",behosDateEnd="",dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="合格率",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
|
|
|
+
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')){
|
|
|
$("body").html('')
|
|
@@ -21,12 +25,12 @@ $(function(){
|
|
|
// $(".innerOuter").css("display","none")
|
|
|
// }
|
|
|
$(".partTitle p span").html(hospital)
|
|
|
- setInterval(() => {
|
|
|
- getTimeDetail()
|
|
|
- }, 1000);
|
|
|
+ // setInterval(() => {
|
|
|
+ // getTimeDetail()
|
|
|
+ // }, 1000);
|
|
|
resizeBox()
|
|
|
initConsole()//质控列表
|
|
|
- getBarData(2)//图标数据获取
|
|
|
+ // getBarData(2)//图标数据获取
|
|
|
dateChange()
|
|
|
$(window).resize(function(){
|
|
|
resizeBox()
|
|
@@ -112,7 +116,6 @@ $(function(){
|
|
|
$(this).find(".explainNum").css("color","#A5ADBF")
|
|
|
})
|
|
|
getDetails()
|
|
|
- getAverageScoreLis()
|
|
|
getEveryDeptLevel()
|
|
|
})
|
|
|
function getDetails(){
|
|
@@ -193,9 +196,7 @@ function resizeBox(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 1
|
|
|
- getBarData(1)
|
|
|
- getAverageScoreLis()
|
|
|
- getEveryDeptLevel()
|
|
|
+ dateConsole(1)
|
|
|
})
|
|
|
$(".monthYear .year").click(function(){
|
|
|
$(this).css({
|
|
@@ -208,11 +209,11 @@ function resizeBox(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 2
|
|
|
- getBarData(2)
|
|
|
- getAverageScoreLis()
|
|
|
- getEveryDeptLevel()
|
|
|
+ dateConsole(2)
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//控制台数
|
|
|
function initConsole(result){
|
|
|
let url = {
|
|
@@ -264,7 +265,9 @@ function getAverageScoreLis(){
|
|
|
}
|
|
|
post(url,{//各科室质控平均分
|
|
|
"type": dateType||1,//1月2年
|
|
|
- "deptClass":deptType
|
|
|
+ "deptClass":deptType,
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -280,10 +283,12 @@ function getAverageScoreLis(){
|
|
|
}
|
|
|
//获取各科室病历等级占比
|
|
|
function getEveryDeptLevel(){
|
|
|
- if(1){
|
|
|
+ if(1){//权限暂无
|
|
|
post(api.qcResultLevelPercent,{//各科室病历等级占比
|
|
|
"type": dateType||2,//1月2年
|
|
|
- "level":level
|
|
|
+ "level":level,
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -368,7 +373,9 @@ function getBarData(type){
|
|
|
// }
|
|
|
if(hasData("FUNC000075")){
|
|
|
post(api.homePageLevelLimit,{//病案首页
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -391,7 +398,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000049')){
|
|
|
post(api.leaveHosCount,{//出院人数统计
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -404,7 +413,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000050')){
|
|
|
post(api.mrCount,{//质控病历统计
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data
|
|
|
if(data.code == 0){
|
|
@@ -415,7 +426,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000051')){
|
|
|
post(api.entryCountGroupByCase,{//各模块缺陷占比排行
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -427,7 +440,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000052')){
|
|
|
post(api.entryCountGroupByEntry,{//条目缺陷占比
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -460,6 +475,8 @@ function getBarData(type){
|
|
|
"type": type||2,//1月2年
|
|
|
"deptClass": "",
|
|
|
"level": "",
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -820,7 +837,6 @@ function lineChartHome(dataX,dataY){
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
|
- console.log(lineType)
|
|
|
option = {
|
|
|
color:(lineType == "合格率")?'#00A1FF':(lineType=="完整率"?'#FF2B92':'#3EFFD1'),
|
|
|
title: {
|
|
@@ -905,6 +921,7 @@ function lineChartHome(dataX,dataY){
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
min:0,
|
|
|
+ max:100,
|
|
|
boundaryGap: [0.01, 0.01],axisLabel: {
|
|
|
show: true,
|
|
|
},
|
|
@@ -1675,4 +1692,102 @@ 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)
|
|
|
-}
|
|
|
+}
|
|
|
+$(".sureDate").click(function(){
|
|
|
+ getStaticDate()
|
|
|
+ getAverageScoreLis()
|
|
|
+ getBarData(dateType)
|
|
|
+ getEveryDeptLevel()
|
|
|
+})
|
|
|
+//日期联动
|
|
|
+function dateConsole(dateType){
|
|
|
+ let startDate = "", endDate=new Date()
|
|
|
+ let year = new Date().getFullYear()
|
|
|
+ let month = new Date().getMonth() + 1
|
|
|
+ if(dateType == '1'){
|
|
|
+ startDate = new Date(`${year}-${month}-01`)
|
|
|
+ }else if(dateType == '2'){
|
|
|
+ startDate = new Date(`${year}-01-01`)
|
|
|
+ } else {
|
|
|
+ startDate = "-1m"
|
|
|
+ }
|
|
|
+ $( "#datepicker" ).datepicker({
|
|
|
+ yearRange: "2015:"+year,
|
|
|
+ changeMonth: true,
|
|
|
+ changeYear: true,
|
|
|
+ dateFormat:"yy/mm/dd",
|
|
|
+ }).datepicker( "setDate", startDate);
|
|
|
+ $( "#datepicker2" ).datepicker({
|
|
|
+ yearRange: "2015:"+year,
|
|
|
+ changeMonth: true,
|
|
|
+ changeYear: true,
|
|
|
+ dateFormat:"yy/mm/dd"
|
|
|
+ }).datepicker( "setDate",endDate);
|
|
|
+ getStaticDate()
|
|
|
+ getAverageScoreLis()
|
|
|
+ getBarData(dateType)
|
|
|
+ getEveryDeptLevel()
|
|
|
+}
|
|
|
+function getStaticDate(){
|
|
|
+ behosDateStart = $("#datepicker").val().trim()
|
|
|
+ behosDateEnd = $("#datepicker2").val().trim()
|
|
|
+ const start = new Date(behosDateStart).getTime()
|
|
|
+ const end = new Date(behosDateEnd).getTime()
|
|
|
+ if(start > end){
|
|
|
+ $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(behosDateStart){
|
|
|
+ behosDateStart = behosDateStart.replace(/\//g,'-') + ' 00:00:00'
|
|
|
+ }
|
|
|
+ if(behosDateEnd){
|
|
|
+ behosDateEnd = behosDateEnd.replace(/\//g,'-') + ' 23:59:59'
|
|
|
+ }
|
|
|
+}
|
|
|
+$(function() {
|
|
|
+ const iconCalenBlue= require("./../images/darkDate.png")
|
|
|
+ const iconCalenGrey= require("./../images/icon_calen_grey.png")
|
|
|
+ $.datepicker.regional['zh-CN'] = {
|
|
|
+ clearText: '清除',
|
|
|
+ clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
|
|
|
+ closeText: '关闭',
|
|
|
+ closeStatus: '不改变当前选择',
|
|
|
+ prevText: '<上月',
|
|
|
+ prevStatus: '显示上月',
|
|
|
+ prevBigText: '<<',
|
|
|
+ prevBigStatus: '显示上一年',
|
|
|
+ nextText: '下月>',
|
|
|
+ nextStatus: '显示下月',
|
|
|
+ nextBigText: '>>',
|
|
|
+ nextBigStatus: '显示下一年',
|
|
|
+ currentText: '今天',
|
|
|
+ currentStatus: '显示本月',
|
|
|
+ monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
|
|
|
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
|
|
|
+ yearNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
|
|
|
+ monthStatus: '选择月份',
|
|
|
+ yearStatus: '选择年份',
|
|
|
+ weekHeader: '周',
|
|
|
+ weekStatus: '年内周次',
|
|
|
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
|
|
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
|
|
+ dayNamesMin: ['日','一','二','三','四','五','六'],
|
|
|
+ dayStatus: '设置 DD 为一周起始',
|
|
|
+ dateStatus: '选择 m月 d日, DD',
|
|
|
+ dateFormat: 'yy-mm-dd',
|
|
|
+ firstDay: 1,
|
|
|
+ initStatus: '请选择日期',
|
|
|
+ isRTL: false};
|
|
|
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
|
|
|
+ dateConsole(dateType)
|
|
|
+ // $(".filter").click(); //初始查询
|
|
|
+ $('.iconCalen').on("mouseenter", function(e){
|
|
|
+ $(this).attr("src", iconCalenBlue)
|
|
|
+ })
|
|
|
+ $('.iconCalen').on("mouseleave", function(e){
|
|
|
+ $(this).attr("src", iconCalenGrey)
|
|
|
+ })
|
|
|
+ $('.iconCalen').on("click", function(e){
|
|
|
+ $(this).parent().find("input").focus()
|
|
|
+ })
|
|
|
+});
|