|
@@ -26,9 +26,6 @@ $(function(){
|
|
|
// $(".innerOuter").css("display","none")
|
|
|
// }
|
|
|
$(".partTitle p span").html(hospital)
|
|
|
- // setInterval(() => {
|
|
|
- // getTimeDetail()
|
|
|
- // }, 1000);
|
|
|
resizeBox()
|
|
|
initConsole()//质控列表
|
|
|
// getBarData(2)//图标数据获取
|
|
@@ -198,7 +195,7 @@ function resizeBox(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 1
|
|
|
- dateConsole(1)
|
|
|
+ dateConsole(1,1)
|
|
|
})
|
|
|
$(".monthYear .year").click(function(){
|
|
|
$(this).css({
|
|
@@ -211,7 +208,7 @@ function resizeBox(){
|
|
|
backgroundColor:'#203463'
|
|
|
})
|
|
|
dateType = 2
|
|
|
- dateConsole(2)
|
|
|
+ dateConsole(2,1)
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -1703,6 +1700,8 @@ $(".sureDate").click(function(){
|
|
|
if(!getStaticDate()){
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ setCookieAction(behosDateStart.split(" ")[0],behosDateEnd.split(" ")[0])
|
|
|
getAverageScoreLis()
|
|
|
getBarData(dateType)
|
|
|
getEveryDeptLevel()
|
|
@@ -1720,17 +1719,31 @@ $(".sureDate").click(function(){
|
|
|
dateType = 3
|
|
|
})
|
|
|
//日期联动
|
|
|
-function dateConsole(dateType){
|
|
|
+function dateConsole(dateType,flg){
|
|
|
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`)
|
|
|
+ startDate = new Date(`${year}/${month}/01`)
|
|
|
}else if(dateType == '2'){
|
|
|
- startDate = new Date(`${year}-01-01`)
|
|
|
+ startDate = new Date(`${year}/01/01`)
|
|
|
} else {
|
|
|
startDate = "-6d"
|
|
|
}
|
|
|
+ if(getCookie("behosDateStart")&&!flg){
|
|
|
+ startDate = new Date(getCookie("behosDateStart"))
|
|
|
+ endDate = new Date(getCookie("behosDateEnd"))
|
|
|
+ $(".monthYear .year").css({
|
|
|
+ "border-color":'#A5ADBF',
|
|
|
+ color:'#A5ADBF',
|
|
|
+ backgroundColor:'#203463'
|
|
|
+ })
|
|
|
+ $(".monthYear .mon").css({
|
|
|
+ "border-color":'#A5ADBF',
|
|
|
+ color:'#A5ADBF',
|
|
|
+ backgroundColor:'#203463'
|
|
|
+ })
|
|
|
+ }
|
|
|
$( "#datepicker" ).datepicker({
|
|
|
yearRange: "2015:"+year,
|
|
|
changeMonth: true,
|
|
@@ -1743,13 +1756,17 @@ function dateConsole(dateType){
|
|
|
changeYear: true,
|
|
|
dateFormat:"yy/mm/dd"
|
|
|
}).datepicker( "setDate",endDate);
|
|
|
- getStaticDate()
|
|
|
+ getStaticDate(flg)
|
|
|
getAverageScoreLis()
|
|
|
getBarData(dateType)
|
|
|
getHomeData('firstLevelPercent')
|
|
|
getEveryDeptLevel()
|
|
|
}
|
|
|
-function getStaticDate(){
|
|
|
+function setCookieAction(startDate,endDate){
|
|
|
+ setCookie('behosDateStart',startDate)
|
|
|
+ setCookie('behosDateEnd',endDate)
|
|
|
+}
|
|
|
+function getStaticDate(flg){
|
|
|
behosDateStart = $("#datepicker").val()
|
|
|
behosDateEnd = $("#datepicker2").val()
|
|
|
const start = new Date(behosDateStart).getTime()
|
|
@@ -1758,6 +1775,9 @@ function getStaticDate(){
|
|
|
$.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
return false
|
|
|
}
|
|
|
+ if(flg){
|
|
|
+ setCookieAction(behosDateStart,behosDateEnd)
|
|
|
+ }
|
|
|
if(behosDateStart){
|
|
|
behosDateStart = behosDateStart.replace(/\//g,'-') + ' 00:00:00'
|
|
|
}
|