|
@@ -7,8 +7,10 @@ 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,curDept = '',curDeptId='',datafst=[],datasec=[],datatrd=[],datafour=[],hospital=getCookie("hospital");
|
|
|
+let payMoney = [],behosDateStart="",behosDateEnd="",dayLis = [],dateType = 2,curDept = '',curDeptId='',datafst=[],datasec=[],datatrd=[],datafour=[],hospital=getCookie("hospital");
|
|
|
$(function(){
|
|
|
if(!hasData('YH-KZT')&&!hasData('YH-KZTKS')){
|
|
|
$("body").html('')
|
|
@@ -97,7 +99,7 @@ function dateChange(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 1
|
|
|
- getBarData(1)
|
|
|
+ dateConsole(1)
|
|
|
})
|
|
|
$(".monthYear .year").click(function(){
|
|
|
$(this).css({
|
|
@@ -110,7 +112,7 @@ function dateChange(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 2
|
|
|
- getBarData(2)
|
|
|
+ dateConsole(2)
|
|
|
})
|
|
|
}
|
|
|
//控制台数
|
|
@@ -208,7 +210,9 @@ function renderDeptLis(data){
|
|
|
function getBarData(type){
|
|
|
if(hasData('FUNC000054')){
|
|
|
post(api.leaveHosCountByDept,{//出院人数统计
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -220,7 +224,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000055')){
|
|
|
post(api.mrCountByDept,{//质控病历统计
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data
|
|
|
if(data.code == 0){
|
|
@@ -232,7 +238,9 @@ function getBarData(type){
|
|
|
}
|
|
|
if(hasData('FUNC000056')){
|
|
|
post(api.entryCountGroupByCaseAndDept,{//各模块缺陷占比排行
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -245,7 +253,9 @@ function getBarData(type){
|
|
|
if(hasData('FUNC000057')){
|
|
|
if(hospital=="台州市立"){
|
|
|
post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -260,7 +270,9 @@ function getBarData(type){
|
|
|
})
|
|
|
}else{
|
|
|
post(api.entryCountGroupByEntryAndDept,{//条目缺陷占比
|
|
|
- "type": type||1//1月2年
|
|
|
+ "type": type||1,//1月2年
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -281,7 +293,9 @@ function getHomePageLevelStatisticsByDept(type){
|
|
|
if(hospital=="长兴医院"&&hasData("FUNC000076")){
|
|
|
post(api.homePageLevelStatisticsByDept,{//病案首页
|
|
|
"type": dateType||2,//1月2年
|
|
|
- "deptName":curDept
|
|
|
+ "deptName":curDept,
|
|
|
+ "startDate":behosDateStart,
|
|
|
+ "endDate":behosDateEnd
|
|
|
}).then((res)=>{
|
|
|
let data = res.data;
|
|
|
if(data.code == 0){
|
|
@@ -804,5 +818,96 @@ function getTimeDetail(){
|
|
|
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()
|
|
|
+ getBarData(dateType)
|
|
|
+})
|
|
|
+//日期联动
|
|
|
+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()
|
|
|
+ getBarData(dateType)
|
|
|
+}
|
|
|
+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)
|
|
|
+ $('.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()
|
|
|
+ })
|
|
|
+});
|