console.js 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995
  1. const $ = require('jquery');
  2. require("../css/reset.less")
  3. require("../css/console.less")
  4. require("../images/logo.png")
  5. require("../images/arrow_down.png")
  6. require('./modal.js');
  7. require('./scrollBar.js')
  8. // import 'zrender/lib/svg/svg';
  9. const {api} = require('./api.js')
  10. const echarts = require('echarts');
  11. require('./../resource/jquery-ui/jquery-ui.min.js');
  12. require('./../resource/jquery-ui/jquery-ui.min.css');
  13. const {post,setCookie,delCookie,getCookie,focusMenuItem,picEmptyData, initScroll,listenScroll} = require('../js/utils.js');
  14. const { get } = require('jquery');
  15. let payMoney = [],behosDateStart="",ownSelectDate='',behosDateEnd="",dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="all",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
  16. let isPlacefile = getCookie('isPlacefile')||1
  17. listenScroll(".partWrap")
  18. if(isPlacefile == 1){
  19. $(".part01 .partTitlePub").css('cursor','default')
  20. $(".part01 .partTitlePub img").css('display','none')
  21. $(".defect .partTitlePub img").css('display','inline-block')
  22. $(".defect .partTitlePub").css('cursor','pointer')
  23. }else{
  24. $(".part01 .partTitlePub img").css('display','inline-block')
  25. $(".part01 .partTitlePub").css('cursor','pointer')
  26. }
  27. $(function(){
  28. if(!hasData('YH-KZT')){
  29. $("body").html('')
  30. }
  31. $(".partTitle p span").html(hospital)
  32. resizeBox()
  33. initConsole()//质控列表
  34. // getBarData(2)//图标数据获取
  35. dateChange()
  36. $(window).resize(function(){
  37. // console.log('窗口大小改变');
  38. resizeBox()
  39. })
  40. $(document).off("click").on("click",function(e){
  41. if(!$(e.target).is(".toggleSlide,.toggleSlide ul")){
  42. $(".toggleSlide ul").hide();
  43. }
  44. })
  45. $(".toggleSlide p").off("click").on("click",function(e){
  46. //if(!sildeIS)return
  47. e.stopPropagation()
  48. $(this).next().slideToggle()
  49. })
  50. $(".toggleSlide li").off("click").on("click",function(){
  51. let str = $(this).attr("data-str"),type = $(this).attr("data-type")
  52. if(type == 1){
  53. // if(!hasData('FUNC000045')){
  54. // return
  55. // }
  56. slideType = 1
  57. level = "甲"
  58. getEveryDeptLevel()
  59. // $(".pubEchart .title span").html("科室平均住院天数柱状图")
  60. // barChart(dayLis,dateType)
  61. $(this).parent().slideToggle().prev().find("span").html(str)
  62. }else if(type == 2){
  63. // if(!hasData('FUNC000046')){
  64. // return
  65. // }
  66. slideType = 2
  67. level = "乙"
  68. getEveryDeptLevel()
  69. // $(".pubEchart .title span").html("科室平均住院花费柱状图")
  70. // barChart(payMoney,dateType)
  71. $(this).parent().slideToggle().prev().find("span").html(str)
  72. }else if(type == 6){
  73. // if(!hasData('FUNC000046')){
  74. // return
  75. // }
  76. slideType = 6
  77. level = "丙"
  78. getEveryDeptLevel()
  79. // $(".pubEchart .title span").html("科室平均住院花费柱状图")
  80. // barChart(payMoney,dateType)
  81. $(this).parent().slideToggle().prev().find("span").html(str)
  82. }else if(type == 3){//科室平均分内科
  83. if(!hasData('FUNC000091')){
  84. return
  85. }
  86. deptType="内科"
  87. getAverageScoreLis()
  88. $(this).parent().slideToggle().prev().find("span").html(str+"系统")
  89. }else if(type == 4){//科室平均分外科
  90. if(!hasData('FUNC000091')){
  91. return
  92. }
  93. deptType="外科"
  94. getAverageScoreLis()
  95. $(this).parent().slideToggle().prev().find("span").html(str+"系统")
  96. }else if(type == 7){//病案首页firstLevelPercent emptyPercent errorPercent
  97. lineType="合格率"
  98. getHomeData('firstLevelPercent')
  99. $(this).parent().slideToggle().prev().find("span").html(str)
  100. }else if(type == 8){//病案首页
  101. lineType = "完整率"
  102. getHomeData('emptyPercent')
  103. $(this).parent().slideToggle().prev().find("span").html(str)
  104. }else if(type == 9){//病案首页
  105. lineType = "完善率"
  106. getHomeData('errorPercent')
  107. $(this).parent().slideToggle().prev().find("span").html(str)
  108. }
  109. })
  110. $(".part02").on("mouseenter",".bingli li.sec",function(){
  111. $(this).find(".numShow").css("color","#00A1FF")
  112. })
  113. $(".part02").on("mouseleave",".bingli li.sec",function(){
  114. $(this).find(".numShow").css("color","#E9EBEF")
  115. })
  116. // getEveryDeptLevel()
  117. })
  118. function getDetails(dateType){
  119. $(".pubEchartB.paymoney .title").click(function(){
  120. focusMenuItem("YH-ZKK-GKSQXZB_XQ");
  121. $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&deptType="+deptType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  122. })
  123. $(".part02 .bingliLis").click(function(){
  124. focusMenuItem("YH-ZKK-GKSQXZB_XQ");
  125. $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  126. })
  127. $(".part03 .circle .title").click(function(){
  128. focusMenuItem("YH-ZKK-TMQXZB_XQ");
  129. $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&shijian="+dateType+"&qxName=&selectReject=1"+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  130. })
  131. $(".part02").on("click",".bingli li.sec",function(){
  132. focusMenuItem("YH-BLZK-ZKPF");
  133. let dataC = $(this).attr("data-c")
  134. let chengdu = dataC == 1?'甲':dataC==2?'乙':'丙'
  135. $(parent.document).find("#contentIframe").attr("src","./qcList.html?from=1&dateType="+dateType+"&chengdu="+chengdu+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  136. })
  137. $(".part03 .partTitlePub").click(function(){
  138. if(isPlacefile == 1){
  139. focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
  140. $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  141. }else{
  142. focusMenuItem("YH-ZKK-WZGBLTJ");
  143. $(parent.document).find("#contentIframe").attr("src","./uncorrectedCasesStatistics.html?from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  144. }
  145. })
  146. $(".part01 .partTitlePub").click(function(){
  147. // $(".container",parent.document).removeClass("console-cont")
  148. if(isPlacefile == 0){
  149. focusMenuItem("YH-ZKK-RYRSTJ");
  150. $(parent.document).find("#contentIframe").attr("src","./qcListOutHospital.html?inner=2&from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  151. }
  152. })
  153. $(".paymoney.pubEchart .title").click(function(){
  154. focusMenuItem("YH-ZKK-GKSQXZB_XQ");
  155. $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  156. })
  157. $(".defect .partTitlePub").click(function(){ //from 1 console / 2 deptConsole
  158. focusMenuItem("YH-ZKK-GMKQXZB_XQ");
  159. $(parent.document).find("#contentIframe").attr("src","./mukuaiControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  160. })
  161. $(".circleB .title").click(function(){
  162. focusMenuItem("YH-ZKK-TMQXZB_XQ");
  163. $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&special=1&shijian="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  164. })
  165. $("body").on("click",".homegodetail",function(){
  166. let name = $(this).attr("data-name")
  167. focusMenuItem("YH-ZKK-TMQXZB_XQ");
  168. $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&special=1&shijian="+dateType+"&model="+name+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  169. })
  170. $("body").on("click",".explainPanT .explainLi",function(){
  171. let deptName = $(this).attr("data-dept")
  172. let deptId = $(this).attr("dept-id")
  173. focusMenuItem("YH-ZKK-TMQXZB_XQ");
  174. $(parent.document).find("#contentIframe").attr("src","singleVeto.html?from=1&shijian="+dateType+"&qxName="+deptName+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  175. })
  176. $(".binganhome").click(function(){
  177. let binganhomelevel = $(this).attr("data-level")
  178. focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
  179. $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType+"&lineType="+binganhomelevel+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  180. })
  181. $(".binganhomend").click(function(){
  182. focusMenuItem("YH-ZKK-ZKHCTJ");
  183. $(parent.document).find("#contentIframe").attr("src","./checkControl.html?from=1&dateType=3"+"&lineType=1"+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  184. })
  185. }
  186. // YH-KZT
  187. $(".menu .page", parent.document).removeClass("active")
  188. $(parent.document).find(".menu .page[code=YH-KZT]").addClass("active")
  189. //判断有无某一权限
  190. function hasData(data){
  191. let lis = JSON.parse(getCookie("codeLis"))||''
  192. // console.log(lis)
  193. if(lis&&lis.indexOf(data)>-1){//有权限
  194. return true
  195. }
  196. return false;
  197. }
  198. function resizeBox(){
  199. $(".partWrap").css({
  200. height:$(window).height()-43+'px'
  201. })
  202. }
  203. //所有数据切换日期筛选
  204. function dateChange(){
  205. $(".monthYear .mon").click(function(){
  206. $(this).css({
  207. backgroundColor:'#00A1FF',
  208. color:'#E9EBEF',
  209. "border-color":'#00A1FF'
  210. }).siblings().css({
  211. "border-color":'#A5ADBF',
  212. color:'#A5ADBF',
  213. backgroundColor:'#203463'
  214. })
  215. dateType = 1
  216. ownSelectDate = ''
  217. dateConsole(1,true)
  218. })
  219. $(".monthYear .year").click(function(){
  220. $(this).css({
  221. backgroundColor:'#00A1FF',
  222. color:'#E9EBEF',
  223. "border-color":'#00A1FF'
  224. }).siblings().css({
  225. "border-color":'#A5ADBF',
  226. color:'#A5ADBF',
  227. backgroundColor:'#203463'
  228. })
  229. dateType = 2
  230. ownSelectDate = ''
  231. dateConsole(2,true)
  232. })
  233. }
  234. //控制台数
  235. function initConsole(result){
  236. let url = {
  237. '本月病历数':require("../images/icon6.png"),
  238. '本月不合格病历-机器':require("../images/icon7.png"),
  239. '本月质控数-机器':require("../images/icon10.png"),
  240. '本月甲级病历-机器':require("../images/icon8.png"),
  241. '本月乙级病历-机器':require("../images/icon9.png"),
  242. '本年病历数':require("../images/icon6.png"),
  243. '本年不合格病历-机器':require("../images/icon7.png"),
  244. '本年质控数-机器':require("../images/icon10.png"),
  245. '本年甲级病历-机器':require("../images/icon8.png"),
  246. '本年乙级病历-机器':require("../images/icon9.png"),
  247. }
  248. let dom = '';
  249. for(let i in result){
  250. if(i.indexOf("人工")==-1){
  251. let name = i.split("-")[0];
  252. let num = 0;
  253. if(name=='本月病历数'||name=='本年病历数'){
  254. num = result[i]
  255. }else{
  256. num = result[name+'-人工']+result[i]
  257. }
  258. dom += `
  259. <li class="partLi">
  260. <div class="partIn">
  261. <p class="top">${name}</p>
  262. <p class="btm clearfix">
  263. <img src="${url[i]}" alt="">
  264. <span>${num}</span>
  265. </p>
  266. </div>
  267. </li>
  268. `
  269. }
  270. }
  271. $(".partAll").html(dom)
  272. }
  273. //平均分
  274. function getAverageScoreLis(){
  275. let url = ''
  276. if(hospital=="台州市立"&&hasData('FUNC000091')){
  277. url = api.getAverageScoreByDeptClass
  278. }else{
  279. url = api.getAverageScore
  280. }
  281. post(url,{//各科室质控平均分
  282. "type": dateType||1,//1月2年
  283. "deptClass":deptType,
  284. "startDate":behosDateStart,
  285. "endDate":behosDateEnd
  286. }).then((res)=>{
  287. let data = res.data;
  288. if(data.code == 0){
  289. let result1 = (hospital=="台州市立"?data.data:data.data['各科室质控平均分'])||[]
  290. let dataX1=[],dataY1=[],dataY2=[]
  291. for(let i = 0;i < result1.length;i++){
  292. dataX1.push(result1[i].name)
  293. dataY1.push(result1[i].averageValue)
  294. dataY2.push(result1[i].lastYearAverageValue)
  295. }
  296. barChartPay(dataX1,dataY1,dataY2)
  297. }
  298. })
  299. }
  300. //获取各科室病历等级占比
  301. function getEveryDeptLevel(){
  302. if(1){//权限暂无
  303. post(api.qcResultLevelPercent,{//各科室病历等级占比
  304. "type": dateType||2,//1月2年
  305. "level":level,
  306. "startDate":behosDateStart,
  307. "endDate":behosDateEnd
  308. }).then((res)=>{
  309. let data = res.data;
  310. if(data.code == 0){
  311. let result1 = data.data||[]
  312. let dataX1=[],dataY1=[]
  313. for(let i = 0;i < result1.length;i++){
  314. dataX1.push(result1[i].deptName)
  315. dataY1.push(result1[i].percentStr.replace('%',''))
  316. }
  317. barChartLevel(dataX1,dataY1)
  318. }
  319. })
  320. }else{
  321. $(".toggleSlide1").css("opacity",0.5)
  322. }
  323. }
  324. //病案首页合格率 firstLevelPercent emptyPercent errorPercent
  325. function getHomeData(name){
  326. // if(hasData("FUNC000075")){
  327. // post(api.homePageLevelLimit,{//病案首页
  328. // "type": dateType||2,//1月2年
  329. // "startDate":behosDateStart,
  330. // "endDate":behosDateEnd,
  331. // "desc": name
  332. // }).then((res)=>{
  333. // let data = res.data;
  334. // if(data.code == 0){
  335. // let result1 = data.data||[]
  336. // let dataX=[],dataY1=[],dataY2=[],dataY3=[]
  337. // for(let i = 0;i < result1.length;i++){
  338. // dataX.push(result1[i].deptName)
  339. // dataY1.push((result1[i].firstLevelPercentStr.replace('%','')-0))
  340. // dataY2.push((result1[i].emptyPercentStr.replace('%','')-0))
  341. // dataY3.push((result1[i].errorPercentStr.replace('%','')-0))
  342. // }
  343. // lineType4 = dataX
  344. // let datay = (lineType == "合格率")?dataY1:(lineType=="完整率"?dataY2:dataY3)
  345. // lineChartHome(dataX,datay)
  346. // }
  347. // })
  348. if(isPlacefile == '0'){
  349. // $('.bldjss').html('')
  350. $(".part03 .partTitlePub .name").html('入院记录24h内未完成')
  351. post(api.casesEntryStatisticsById,{
  352. startDate:behosDateStart, //起始时间
  353. endDate:behosDateEnd, //截止时间
  354. }).then((res)=>{
  355. let data = res.data;
  356. if(data.code == 0){
  357. let result1 = data.data||[]
  358. let dataX1=[],dataY1=[]
  359. for(let i = 0;i < result1.length;i++){
  360. dataX1.push(result1[i].name)
  361. dataY1.push(result1[i].num)
  362. }
  363. lineChartSpecial(dataX1,dataY1,'bldjss')
  364. }
  365. })
  366. }else{
  367. post(api.homePageMRCount,{//病案首页
  368. "type": dateType||2,//1月2年
  369. "startDate":behosDateStart,
  370. "endDate":behosDateEnd,
  371. }).then((res)=>{
  372. let data = res.data;
  373. if(data.code == 0){
  374. let result1 = data.data||[]
  375. let data1=result1['合格率'],data2=result1['完整率'],data3=result1['改善率'],tmp1=[],tmp2=[],tmp3=[]
  376. // console.log("data1",data1)
  377. if(data1&&data1.totleNum == 0){
  378. $(".binganshouye").css("display","block")
  379. $(".bldjss").css("display","none")
  380. picEmptyData(".binganshouyeEmpty")
  381. return
  382. }else{
  383. $(".bldjss").css("display","block")
  384. $(".binganshouye").css("display","none")
  385. }
  386. data1.value = data1.num
  387. tmp1.push(data1)
  388. tmp1.push({percentStr:(1-data1.percent)*100+'%',value:data1.totleNum - data1.num})
  389. part03pan(tmp1,'fen05')
  390. data2.value = data2.num
  391. tmp2.push(data2)
  392. tmp2.push({percentStr:(1-data2.percent)*100+'%',value:data2.totleNum - data2.num})
  393. part03pan(tmp2,'fen06')
  394. data3.value = data3.num
  395. tmp3.push(data3)
  396. tmp3.push({percentStr:(1-data3.percent)*100+'%',value:data3.totleNum - data3.num})
  397. part03pan(tmp3,'fen07')
  398. }
  399. })
  400. }
  401. // }
  402. }
  403. //获取图表数据
  404. function getBarData(type){
  405. if(isPlacefile==0){
  406. $(".part01 .partTitlePub .name").html('入院人数统计')
  407. post(api.beHosCount,{
  408. startDate:behosDateStart, //起始时间
  409. endDate:behosDateEnd, //截止时间
  410. }).then((res)=>{
  411. let data = res.data;
  412. if(data.code == 0){
  413. let result1 = data.data||[]
  414. let dataX1=[],dataY1=[]
  415. for(let i = 0;i < result1.length;i++){
  416. dataX1.push(result1[i].name)
  417. dataY1.push(result1[i].num)
  418. }
  419. $(".personNum").html("总人数:"+dataY1[0]).parent(".chuyuannum").attr("data-num",'全部')
  420. lineChartSpecial(dataX1,dataY1,'chuyuan')
  421. }
  422. })
  423. }else if(hasData('FUNC000049')&&isPlacefile==1){
  424. $('.part01 .partTitlePub .name').text('出院人数统计')
  425. post(api.leaveHosCount,{//出院人数统计
  426. "type": type||1,//1月2年
  427. "startDate":behosDateStart,
  428. "endDate":behosDateEnd
  429. }).then((res)=>{
  430. let data = res.data;
  431. if(data.code == 0){
  432. // barChart(result2,type||1)
  433. // console.log(data)
  434. let result1 = data.data['出院人数统计']||[]
  435. personNum(result1)
  436. }
  437. })
  438. }
  439. if(hasData('FUNC000050')){
  440. post(api.mrCount,{//质控病历统计
  441. "type": type||1,//1月2年
  442. "startDate":behosDateStart,
  443. "endDate":behosDateEnd
  444. }).then((res)=>{
  445. let data = res.data
  446. if(data.code == 0){
  447. let result3 = data.data['病历数统计']||[]
  448. setNumDetail(result3)
  449. }
  450. })
  451. }
  452. if(hasData('FUNC000051')){
  453. post(api.entryCountGroupByCase,{//各模块缺陷占比排行
  454. "type": type||1,//1月2年
  455. "startDate":behosDateStart,
  456. "endDate":behosDateEnd
  457. }).then((res)=>{
  458. let data = res.data;
  459. if(data.code == 0){
  460. let result1 = data.data['各模块缺陷占比排行']||[];
  461. // result1.length>8?result1.length=8:"";
  462. queList(result1)
  463. }
  464. })
  465. }
  466. if(hasData('FUNC000052')){
  467. post(api.entryCountGroupByEntry,{//条目缺陷占比
  468. "type": type||1,//1月2年
  469. "startDate":behosDateStart,
  470. "endDate":behosDateEnd
  471. }).then((res)=>{
  472. let data = res.data;
  473. if(data.code == 0){
  474. let result3 = data.data['条目缺陷占比']||[]
  475. for(let i = 0;i < result3.length;i++){
  476. result3[i].value = result3[i].num
  477. }
  478. emptyCircleB(result3)
  479. panDetailB(result3)
  480. }
  481. })
  482. }
  483. // if(hasData('FUNC000053')){
  484. // post(api.entryByDept,{//各科室缺陷占比
  485. // "type": type||1//1月2年
  486. // }).then((res)=>{
  487. // let data = res.data;
  488. // if(data.code == 0){
  489. // let result2 = data.data['各科室缺陷占比']||[]
  490. // for(let i = 0;i < result2.length;i++){
  491. // result2[i].value = result2[i].num
  492. // }
  493. // emptyCircle(result2)
  494. // panDetail(result2)
  495. // }
  496. // })
  497. // }
  498. // if(1){
  499. post(api.entryRejectPercent,{//单项否决
  500. "type": type||2,//1月2年
  501. "deptClass": "",
  502. "level": "",
  503. "startDate":behosDateStart,
  504. "endDate":behosDateEnd
  505. }).then((res)=>{
  506. let data = res.data;
  507. if(data.code == 0){
  508. let result2 = data.data||[]
  509. for(let i = 0;i < result2.length;i++){
  510. result2[i].value = result2[i].num
  511. }
  512. emptyCircle(result2)
  513. panDetail(result2)
  514. }
  515. })
  516. // }
  517. }
  518. //part01
  519. function personNum(data){
  520. if(data['总人数']==0){
  521. $(".chuyuan,.personNum").css("display","none")
  522. picEmptyData(".chuyuanEmpty")
  523. return
  524. }else{
  525. $(".chuyuanEmpty").css("display","none")
  526. $(".chuyuan,.personNum").css("display","block")
  527. }
  528. $('.chuyuan').html(`
  529. <ul class="clearfix" style="cursor: default;">
  530. <li class="topLis chuyuannum" data-type="1">
  531. <p class="numShow died"></p>
  532. <p class="explainNum">死亡人数</p>
  533. </li>
  534. <li class="li02 topLis chuyuannum" data-type="2">
  535. <p class="numShow newborn"></p>
  536. <p class="explainNum">新生儿患者</p>
  537. </li>
  538. <li class="li03 topLis chuyuannum" data-type="3">
  539. <p class="numShow patientNum"></p>
  540. <p class="explainNum">手术病人数</p>
  541. </li>
  542. <li class="li04 chuyuannum" data-type="4">
  543. <p class="numShow goAwayNum"></p>
  544. <p class="explainNum">非医嘱离院病人数</p>
  545. </li>
  546. <li class="li04 li04again" data-type="5">
  547. <p class="numShow againNum"></p>
  548. <p class="explainNum">31日再入院病历数</p>
  549. </li>
  550. </ul>
  551. `)
  552. $(".personNum").html("总人数:"+data['总人数']).parent(".chuyuannum").attr("data-num",'全部')
  553. $(".died").html(data['死亡人数']).parent(".chuyuannum").attr("data-num",'死亡人数')
  554. $(".newborn").html(data['新生儿人数']).parent(".chuyuannum").attr("data-num",'新生儿患者')
  555. $(".patientNum").html(data['手术病人数']).parent(".chuyuannum").attr("data-num",'手术病人数')
  556. $(".goAwayNum").html(data['非医嘱离院病人数']).parent(".chuyuannum").attr("data-num",'非医嘱离院病人数')
  557. $(".againNum").html(data['31日再入院病历数']).parent(".li04again").attr("data-num",'31日再入院病历数')
  558. $(".chuyuannum").click(function(){
  559. let chuyuantype = $(this).attr("data-type")
  560. let chuyuannum = $(this).attr("data-num")
  561. focusMenuItem("YH-ZKK-CYRSTJ");
  562. $(parent.document).find("#contentIframe").attr("src","qcListOutHospital.html?from=1&shijian=3"+"&outNum="+chuyuannum+"&outNumType="+chuyuantype+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  563. })
  564. // 点击31日再入院病历数
  565. $(".li04again").click(function(){
  566. let chuyuantype = $(this).attr("data-type")
  567. let chuyuannum = $(this).attr("data-num")
  568. focusMenuItem("YH-ZKK-31TZRYRS");
  569. $(parent.document).find("#contentIframe").attr("src","readmission.html?from=1&shijian=3&dateType=3"+"&outNum="+chuyuannum+"&outNumType="+chuyuantype+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
  570. })
  571. }
  572. //part02
  573. function setNumDetail(data){
  574. // console.log(data,2222222222)
  575. if(data.length == 0){
  576. $(".pingfendengji").css("display","block")
  577. $(".bldjs").css("display","none")
  578. picEmptyData(".pingfendengjiEmpty")
  579. return
  580. }else{
  581. $(".bldjs").css("display","block")
  582. $(".pingfendengji").css("display","none")
  583. }
  584. let str = ''
  585. for(let i = 0;i < data.length;i++){
  586. str += `
  587. <li class="${i==0?'fst':'sec'}" data-c="${i}">
  588. <p class="numShow">${data[i].num}</p>
  589. <p class="explainNum">${data[i].name}</p>
  590. </li>
  591. `
  592. if(data[i].name == '甲级病历'){
  593. let tmp = []
  594. data[i].value = data[i].num
  595. tmp.push(data[i])
  596. tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
  597. part02pan(tmp,'fen01')
  598. }
  599. if(data[i].name == '乙级病历'){
  600. let tmp = []
  601. data[i].value = data[i].num
  602. tmp.push(data[i])
  603. tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
  604. part02pan(tmp,'fen02')
  605. }
  606. if(data[i].name == '丙级病历'){
  607. let tmp = []
  608. data[i].value = data[i].num
  609. tmp.push(data[i])
  610. tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
  611. part02pan(tmp,'fen03')
  612. }
  613. }
  614. $('.bingli').html(str)
  615. }
  616. //part02pan
  617. function part02pan(data,dom){
  618. // console.log(data,33333)
  619. dom = echarts.init(document.getElementById(dom));
  620. $(window).resize(function(){
  621. dom.resize()
  622. });
  623. let bgColor = '#fff';
  624. let title = '总量';
  625. let color = ['#3fffd1','#4c5c82'];
  626. let echartData = data;
  627. option = {
  628. //backgroundColor: bgColor,
  629. color: color,
  630. title: [{
  631. text:'{val|' + echartData[0].percentStr + '}',
  632. top: 'center',
  633. left: 'center',
  634. textStyle: {
  635. rich: {
  636. val: {
  637. fontSize: 12,
  638. color: '#E9EBEF',
  639. /*fontWeight: 'bold',*/
  640. padding: [10, 0]
  641. },
  642. name: {
  643. fontSize: 12,
  644. fontWeight: 'normal',
  645. color: '#E9EBEF',
  646. }
  647. }
  648. }
  649. }],
  650. series: [{
  651. name: '',
  652. type: 'pie',
  653. radius: ['65%', '95%'],
  654. data: echartData,
  655. hoverAnimation:true,
  656. hoverOffset:3,
  657. itemStyle: {
  658. normal: {
  659. borderColor: '#203463',
  660. borderWidth: 3
  661. }
  662. },
  663. label: {
  664. normal: {
  665. show:false,
  666. }
  667. },
  668. }]
  669. };
  670. dom.setOption(option);
  671. }
  672. //part03pan
  673. function part03pan(data,dom){
  674. // console.log(data,33333)
  675. dom = echarts.init(document.getElementById(dom));
  676. $(window).resize(function(){
  677. dom.resize()
  678. });
  679. let bgColor = '#fff';
  680. let title = '总量';
  681. let color = ['#FF2B92','#4c5c82'];
  682. let echartData = data;
  683. option = {
  684. //backgroundColor: bgColor,
  685. color: color,
  686. title: [{
  687. text:'{val|' + echartData[0].percentStr + '}',
  688. top: 'center',
  689. left: 'center',
  690. textStyle: {
  691. rich: {
  692. val: {
  693. fontSize: 12,
  694. color: '#E9EBEF',
  695. /*fontWeight: 'bold',*/
  696. padding: [10, 0]
  697. },
  698. name: {
  699. fontSize: 12,
  700. fontWeight: 'normal',
  701. color: '#E9EBEF',
  702. }
  703. }
  704. }
  705. }],
  706. series: [{
  707. name: '',
  708. type: 'pie',
  709. radius: ['65%', '95%'],
  710. data: echartData,
  711. hoverAnimation:true,
  712. hoverOffset:3,
  713. itemStyle: {
  714. normal: {
  715. borderColor: '#203463',
  716. borderWidth: 3
  717. }
  718. },
  719. label: {
  720. normal: {
  721. show:false,
  722. }
  723. },
  724. }]
  725. };
  726. dom.setOption(option);
  727. }
  728. //折现图各科室甲级病历占比(长兴)
  729. function lineChart(dataX,dataY){
  730. if(dataX.length==0&&dataY.length==0){
  731. $(".barChartLine").css("display","none")
  732. picEmptyData(".barChartLineEmpty")
  733. return
  734. }else{
  735. $(".barChartLine").css("display","block")
  736. $(".barChartLineEmpty").css("display","none")
  737. }
  738. var myCharts = echarts.init(document.getElementById('lineChart'));
  739. $(window).resize(function(){
  740. myCharts.resize()
  741. });
  742. option = {
  743. color:"#00A1FF",
  744. tooltip: {
  745. trigger: 'axis',
  746. color:'#fff',
  747. formatter: function(param) {
  748. return '<div style="color:#fff;"> '+ param[0].name + "<br>" +"甲级病历占比:"+ param[0].value+"%" + "<br>"
  749. '</div>'
  750. }
  751. },
  752. grid: {
  753. left: '3%',
  754. right: '5%',
  755. bottom: '3%',
  756. containLabel: true
  757. },
  758. title:[{
  759. text: dataX.length>0?'百分比':'',
  760. top: 15,
  761. left: 0,
  762. textStyle: {
  763. fontSize: 14,
  764. color:'#E9EBEF',
  765. fontWeight: 400
  766. }
  767. }],
  768. toolbox: {
  769. show: false,
  770. feature: {
  771. dataZoom: {
  772. yAxisIndex: 'none'
  773. },
  774. dataView: {readOnly: false},
  775. magicType: {type: ['line', 'bar']},
  776. restore: {
  777. },
  778. saveAsImage: {}
  779. },
  780. emphasis:{
  781. iconStyle:{
  782. color:'red'
  783. }
  784. },
  785. },
  786. xAxis: {
  787. type: 'category',
  788. boundaryGap: false,
  789. data: dataX,
  790. axisLabel: {//x轴刻度
  791. textStyle: {
  792. color: '#E9EBEF'
  793. },
  794. rotate:'45',
  795. formatter: function (value) {
  796. //x轴的文字改为竖版显示
  797. if(value.length>7){
  798. return value.slice(0,7)+'...'
  799. }
  800. return value;
  801. }
  802. },
  803. axisLine: {//x轴
  804. lineStyle:{
  805. color:'#4A5D8E'
  806. }
  807. }
  808. },
  809. yAxis: {
  810. type: 'value',
  811. axisLabel: {
  812. formatter: '{value} %',
  813. textStyle: {
  814. color: '#E9EBEF'
  815. }
  816. },
  817. axisLine: {//y轴
  818. show: false
  819. },
  820. axisTick: {
  821. show: false
  822. },
  823. splitLine:{//分割线
  824. lineStyle:{
  825. color:'#344876'
  826. }
  827. }
  828. },
  829. series: [
  830. {
  831. name: '甲级病历占比:',
  832. type: 'line',
  833. data: dataY,
  834. }
  835. ]
  836. };
  837. myCharts.setOption(option);
  838. }
  839. function lineChartSpecial(dataX,dataY,dom){
  840. // if(dataX.length==0&&dataY.length==0){
  841. // $(".barChartLine").css("display","none")
  842. // picEmptyData(".barChartLineEmpty")
  843. // return
  844. // }else{
  845. // $(".barChartLine").css("display","block")
  846. // $(".barChartLineEmpty").css("display","none")
  847. // }
  848. if(dom == 'chuyuan'){
  849. if(dataX.length==0){
  850. $(".chuyuan,.personNum").css("display","none")
  851. picEmptyData(".chuyuanEmpty")
  852. return
  853. }else{
  854. $(".chuyuanEmpty").css("display","none")
  855. $(".chuyuan,.personNum").css("display","block")
  856. }
  857. }else{
  858. if(dataX.length==0){
  859. $(".binganshouye").css("display","block")
  860. $(".bldjss").css("display","none")
  861. picEmptyData(".binganshouyeEmpty")
  862. return
  863. }else{
  864. $(".bldjss").css("display","block")
  865. $(".binganshouye").css("display","none")
  866. }
  867. }
  868. // console.log(999,dataX,dataY,dom)
  869. var myCharts = echarts.init(document.getElementById(dom));
  870. $(window).resize(function(){
  871. myCharts.resize()
  872. });
  873. option = {
  874. color: dom=='chuyuan'?['#37CBCB']:['#37C4FC'],
  875. tooltip: {
  876. trigger: 'axis',
  877. position: 'right',
  878. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  879. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  880. },
  881. formatter: function(param) {
  882. return '<div style="color:#fff;">'+ param[0].name + "<br>" +'<i style="background:#37C4FC;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>'+(dom=="chuyuan"?"入院人数:":"入院记录24h内未完成:")+ param[0].value+ "<br>"
  883. '</div>'
  884. }
  885. },
  886. grid: {
  887. left: '3%',
  888. right: '4%',
  889. bottom: '3%',
  890. top:dom == 'chuyuan'?'25':'45',
  891. containLabel: true
  892. },
  893. xAxis: [
  894. {
  895. type: 'category',
  896. data: dataX,
  897. axisTick: {
  898. alignWithLabel: true
  899. },
  900. axisLabel: {//x轴刻度
  901. textStyle: {
  902. color: '#E9EBEF'
  903. },
  904. rotate:45,
  905. formatter: function (value) {
  906. //x轴的文字改为竖版显示
  907. if(dom == 'chuyuan'&&value.length>3){
  908. return value.slice(0,3)+'...'
  909. }else if(value.length>7){
  910. return value.slice(0,7)+'...'
  911. }
  912. return value;
  913. }
  914. },
  915. axisLine: {//x轴
  916. lineStyle:{
  917. color:'#4A5D8E'
  918. }
  919. }
  920. }
  921. ],
  922. yAxis: [
  923. {
  924. type: 'value',
  925. axisLine: {//y轴
  926. show: false
  927. },
  928. axisTick: {
  929. show: false
  930. },
  931. splitNumber : 3,
  932. axisLabel: {//y轴刻度
  933. textStyle: {
  934. color: '#E9EBEF'
  935. },
  936. formatter: function (value) {
  937. return value;
  938. }
  939. },
  940. splitLine:{//分割线
  941. lineStyle:{
  942. color:'#344876'
  943. }
  944. }
  945. }
  946. ],
  947. title:[{
  948. text: '数量',
  949. top: dom == 'chuyuan'?0:10,
  950. left: 10,
  951. textStyle: {
  952. fontSize: 14,
  953. color:'#E9EBEF',
  954. fontWeight: 400
  955. }
  956. }],
  957. series: [
  958. {
  959. name: '病案首页合格率',
  960. type: 'bar',
  961. barWidth: '23%',
  962. data: dataY
  963. }
  964. ]
  965. };
  966. myCharts.setOption(option);
  967. }
  968. //折线图病案首页
  969. function lineChartHome(dataX,dataY){
  970. // console.log(dataX,dataY)
  971. if(dataX.length==0){
  972. $(".barChartLine").css("display","none")
  973. picEmptyData(".barChartLineEmpty")
  974. return
  975. }else{
  976. $(".barChartLine").css("display","block")
  977. $(".barChartLineEmpty").css("display","none")
  978. }
  979. var myCharts = echarts.init(document.getElementById('lineChart'));
  980. $(window).resize(function(){
  981. myCharts.resize()
  982. });
  983. option = {
  984. color:(lineType == "合格率")?'#00A1FF':(lineType=="完整率"?'#FF2B92':'#3EFFD1'),
  985. title: {
  986. text: '百分比',
  987. top: 15,
  988. left: 10,
  989. textStyle: {
  990. fontSize: 14,
  991. color:'#E9EBEF',
  992. fontWeight: 400
  993. }
  994. },
  995. tooltip: {
  996. trigger: 'axis',
  997. position: 'right',
  998. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  999. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  1000. },
  1001. formatter: function(param) {
  1002. return `<div style="color:#fff;">${param[0].name}<br>
  1003. <i style="background:${(lineType == "合格率")?'#00A1FF':(lineType=="完整率"?'#FF2B92':'#3EFFD1')};margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>病案首页${lineType}:${param[0]&&param[0].value}%<br>
  1004. </div>`
  1005. }
  1006. },
  1007. // legend: {
  1008. // selectedMode :false,
  1009. // right:15,
  1010. // top:15,
  1011. // data: [
  1012. // {
  1013. // name: '合格率',
  1014. // textStyle: {
  1015. // color: '#A5ADBF'
  1016. // }
  1017. // },
  1018. // {
  1019. // name: '完整率',
  1020. // textStyle: {
  1021. // color: '#A5ADBF'
  1022. // }
  1023. // },
  1024. // {
  1025. // name: '完善率',
  1026. // textStyle: {
  1027. // color: '#A5ADBF'
  1028. // }
  1029. // }
  1030. // ]
  1031. // },
  1032. grid: {
  1033. left: '3%',
  1034. right: '4%',
  1035. bottom: '3%',
  1036. containLabel: true
  1037. },
  1038. xAxis: {
  1039. type: 'category',
  1040. boundaryGap: false,
  1041. data: dataX,
  1042. axisTick: {
  1043. alignWithLabel: true
  1044. },
  1045. axisLabel: {//x轴刻度
  1046. textStyle: {
  1047. color: '#E9EBEF'
  1048. },
  1049. rotate:45,
  1050. formatter: function (value) {
  1051. //x轴的文字改为竖版显示
  1052. if(value.length>7){
  1053. return value.slice(0,7)+'...'
  1054. }
  1055. return value;
  1056. }
  1057. },
  1058. axisLine: {//x轴
  1059. lineStyle:{
  1060. color:'#4A5D8E'
  1061. }
  1062. }
  1063. },
  1064. yAxis: {
  1065. type: 'value',
  1066. min:0,
  1067. max:100,
  1068. boundaryGap: [0.01, 0.01],axisLabel: {
  1069. show: true,
  1070. },
  1071. axisLine: {//y轴
  1072. show: false
  1073. },
  1074. axisTick: {
  1075. show: false
  1076. },
  1077. axisLabel: {//y轴刻度
  1078. textStyle: {
  1079. color: '#E9EBEF'
  1080. },
  1081. interval: 'auto',
  1082. formatter: '{value} %'
  1083. },
  1084. splitLine:{//分割线
  1085. lineStyle:{
  1086. color:'#344876'
  1087. }
  1088. }
  1089. },
  1090. series: [
  1091. {
  1092. name: lineType,
  1093. type: 'line',
  1094. // stack: '总量',
  1095. data: dataY
  1096. },
  1097. // {
  1098. // name: '完整率',
  1099. // type: 'line',
  1100. // // stack: '总量',
  1101. // data: dataY2
  1102. // },
  1103. // {
  1104. // name: '完善率',
  1105. // type: 'line',
  1106. // // stack: '总量',
  1107. // data: dataY3
  1108. // }
  1109. ]
  1110. };
  1111. myCharts.setOption(option);
  1112. }
  1113. //柱状图住院费用
  1114. function barChartPay(dataX,dataY,dataY2){
  1115. if(dataX.length==0&&dataY.length==0){
  1116. $("#barChartPay,.innerOuter").css("display","none")
  1117. picEmptyData('.barChartPayEmptys')
  1118. return
  1119. }else{
  1120. if(getCookie("hospital") == "台州市立"){
  1121. $(".innerOuter").css("display","block")
  1122. }else{
  1123. $(".innerOuter").css("display","none")
  1124. }
  1125. $("#barChartPay").css("display","block")
  1126. $(".barChartPayEmptys").css("display","none")
  1127. }
  1128. var myCharts = echarts.init(document.getElementById('barChartPay'));
  1129. $(window).resize(function(){
  1130. myCharts.resize()
  1131. });
  1132. option = {
  1133. color: ['#37C4FC', '#F2637B'],
  1134. tooltip: {
  1135. trigger: 'axis',
  1136. position: 'right',
  1137. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  1138. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  1139. }
  1140. },
  1141. grid: {
  1142. left: '3%',
  1143. right: '4%',
  1144. bottom: '3%',
  1145. containLabel: true
  1146. },
  1147. xAxis: [
  1148. {
  1149. type: 'category',
  1150. axisTick: {show: false,alignWithLabel: true},
  1151. axisLine: {//x轴
  1152. lineStyle:{
  1153. color:'#4A5D8E'
  1154. }
  1155. },
  1156. axisLabel: {//x轴刻度
  1157. textStyle: {
  1158. color: '#E9EBEF'
  1159. },
  1160. rotate:45,
  1161. formatter: function (value) {//x轴的文字改为竖版显示
  1162. if(value.length>7){
  1163. return value.slice(0,7)+'...'
  1164. }
  1165. return value;
  1166. }
  1167. },
  1168. data: dataX
  1169. }
  1170. ],
  1171. yAxis: [
  1172. {
  1173. type: 'value',
  1174. axisLine: {//y轴
  1175. show: false
  1176. },
  1177. axisTick: {
  1178. show: false
  1179. },
  1180. splitNumber : 3,
  1181. axisLabel: {//y轴刻度
  1182. textStyle: {
  1183. color: '#E9EBEF'
  1184. }
  1185. },
  1186. splitLine:{//分割线
  1187. lineStyle:{
  1188. color:'#344876'
  1189. }
  1190. }
  1191. }
  1192. ],
  1193. title:[{
  1194. text: dataX.length>0?'分数':'',
  1195. top: 15,
  1196. left: 10,
  1197. textStyle: {
  1198. fontSize: 14,
  1199. color:'#E9EBEF',
  1200. fontWeight: 400
  1201. }
  1202. }],
  1203. series: [
  1204. {
  1205. name: '平均分',
  1206. type: 'bar',
  1207. barGap: 0,
  1208. barWidth: '15%',
  1209. data: dataY
  1210. },
  1211. {
  1212. name: '同比',
  1213. type: 'bar',
  1214. barWidth: '15%',
  1215. data: dataY2
  1216. }
  1217. ]
  1218. };
  1219. myCharts.setOption(option);
  1220. }
  1221. //柱状图住院日期
  1222. function barChartLevel(dataX,dataY){
  1223. // console.log(dataX,dataY,7887878787)
  1224. if(dataX.length==0&&dataY.length==0){
  1225. $("#barChart,.part02 .toggleSlide").css("display","none")
  1226. picEmptyData('.barChartPayEmpty')
  1227. }else{
  1228. // $("#barChart,.part02 .toggleSlide").css("display","block")
  1229. $("#barChart,.part02 .toggleSlide").show()
  1230. $(".barChartPayEmpty").css("display","none")
  1231. }
  1232. var myCharts = echarts.init(document.getElementById('barChart'));
  1233. // console.log(myCharts,'myCharts');
  1234. setTimeout(function () { myCharts.resize()},0) // 处理 #5737bug,暂时处理方法,需后续优化
  1235. $(window).resize(function(){
  1236. myCharts.resize()
  1237. });
  1238. option = {
  1239. color: ['#37C4FC'],
  1240. tooltip: {
  1241. trigger: 'axis',
  1242. position: 'right',
  1243. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  1244. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  1245. },
  1246. formatter: function(param) {
  1247. return `<div style="color:#fff;">${param[0].name}<br>
  1248. <i style="background:#00A1FF;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>${level}级病历占比:${param[0]&&param[0].value}%<br>
  1249. </div>`
  1250. }
  1251. },
  1252. grid: {
  1253. left: '3%',
  1254. right: '4%',
  1255. bottom: '3%',
  1256. containLabel: true
  1257. },
  1258. xAxis: [
  1259. {
  1260. type: 'category',
  1261. data: dataX,
  1262. axisTick: {
  1263. alignWithLabel: true
  1264. },
  1265. axisLabel: {//x轴刻度
  1266. textStyle: {
  1267. color: '#E9EBEF'
  1268. },
  1269. rotate:45,
  1270. formatter: function (value) {
  1271. //x轴的文字改为竖版显示
  1272. if(value.length>7){
  1273. return value.slice(0,7)+'...'
  1274. }
  1275. return value;
  1276. }
  1277. },
  1278. axisLine: {//x轴
  1279. lineStyle:{
  1280. color:'#4A5D8E'
  1281. }
  1282. }
  1283. }
  1284. ],
  1285. yAxis: [
  1286. {
  1287. type: 'value',
  1288. axisLine: {//y轴
  1289. show: false
  1290. },
  1291. axisTick: {
  1292. show: false
  1293. },
  1294. axisLabel: {//y轴刻度
  1295. textStyle: {
  1296. color: '#E9EBEF'
  1297. },
  1298. interval: 'auto',
  1299. formatter: '{value} %'
  1300. },
  1301. splitLine:{//分割线
  1302. lineStyle:{
  1303. color:'#344876'
  1304. }
  1305. }
  1306. }
  1307. ],
  1308. title:[{
  1309. text: dataX.length>0?'百分比':'',
  1310. top: 15,
  1311. left: 10,
  1312. textStyle: {
  1313. fontSize: 14,
  1314. color:'#E9EBEF',
  1315. fontWeight: 400
  1316. }
  1317. }],
  1318. series: [
  1319. {
  1320. name: level+'级病历占比',
  1321. type: 'bar',
  1322. barWidth: '23%',
  1323. data: dataY
  1324. }
  1325. ]
  1326. };
  1327. // setTimeout(function () { myCharts.setOption(option);},200)
  1328. myCharts.setOption(option);
  1329. }
  1330. function barChart(data,type){
  1331. // console.log(data,type,78787888787787)
  1332. if(data.length==0){
  1333. $(".part02 .toggleSlide,#barChart").css("display","none")
  1334. picEmptyData('.barChartPayEmpty')
  1335. return
  1336. }else{
  1337. $(".part02 .toggleSlide,#barChart").css("display","block")
  1338. $(".barChartPayEmpty").css("display","none")
  1339. }
  1340. var myChart = echarts.init(document.getElementById('barChart'));
  1341. $(window).resize(function(){
  1342. myChart.resize()
  1343. });
  1344. var posList = [
  1345. 'left', 'right', 'top', 'bottom',
  1346. 'inside',
  1347. 'insideTop', 'insideLeft', 'insideRight', 'insideBottom',
  1348. 'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight'
  1349. ];
  1350. let app = {}
  1351. app.configParameters = {
  1352. rotate: {
  1353. min: -90,
  1354. max: 90
  1355. },
  1356. align: {
  1357. options: {
  1358. left: 'left',
  1359. center: 'center',
  1360. right: 'right'
  1361. }
  1362. },
  1363. verticalAlign: {
  1364. options: {
  1365. top: 'top',
  1366. middle: 'middle',
  1367. bottom: 'bottom'
  1368. }
  1369. },
  1370. position: {
  1371. options: echarts.util.reduce(posList, function (map, pos) {
  1372. map[pos] = pos;
  1373. return map;
  1374. }, {})
  1375. },
  1376. distance: {
  1377. min: 0,
  1378. max: 100
  1379. }
  1380. };
  1381. app.config = {
  1382. rotate: 90,
  1383. align: 'left',
  1384. verticalAlign: 'middle',
  1385. position: 'insideBottom',
  1386. distance: 15,
  1387. onChange: function () {
  1388. var labelOption = {
  1389. normal: {
  1390. rotate: app.config.rotate,
  1391. align: app.config.align,
  1392. verticalAlign: app.config.verticalAlign,
  1393. position: app.config.position,
  1394. distance: app.config.distance
  1395. }
  1396. };
  1397. myChart.setOption({
  1398. series: [{
  1399. label: labelOption
  1400. }, {
  1401. label: labelOption
  1402. }, {
  1403. label: labelOption
  1404. }, {
  1405. label: labelOption
  1406. }]
  1407. });
  1408. }
  1409. };
  1410. var labelOption = {
  1411. show: false,
  1412. position: app.config.position,
  1413. distance: app.config.distance,
  1414. align: app.config.align,
  1415. verticalAlign: app.config.verticalAlign,
  1416. rotate: app.config.rotate,
  1417. formatter: '{c} {name|{a}}',
  1418. fontSize: 12,
  1419. rich: {
  1420. name: {
  1421. textBorderColor: '#fff'
  1422. }
  1423. }
  1424. };
  1425. let dataX = []
  1426. let data1 = []
  1427. let data2 = []
  1428. let data3 = []
  1429. for(let i = 0;i < data.length;i++){
  1430. dataX.push(data[i].name)
  1431. data1.push(data[i].averageValue)//本月
  1432. data2.push(data[i].lastAverageValue)//本年
  1433. data3.push(data[i].lastYearAverageValue)//去年本月
  1434. }
  1435. option = {
  1436. color: ['#37CBCB','#5A8EEE', '#FAD336' ],
  1437. tooltip: {
  1438. trigger: 'axis',
  1439. axisPointer: {
  1440. type: 'shadow'
  1441. }
  1442. },
  1443. grid: {
  1444. left: '3%',
  1445. right: '4%',
  1446. bottom: '3%',
  1447. containLabel: true
  1448. },
  1449. title:[{
  1450. text: dataX.length>0?(slideType==1?'天数':'元'):'',
  1451. top: 15,
  1452. left: 10,
  1453. textStyle: {
  1454. fontSize: 14,
  1455. color:'#E9EBEF',
  1456. fontWeight: 400
  1457. }
  1458. }],
  1459. legend: {
  1460. itemWidth :10,
  1461. itemHeight :10,
  1462. right:15,
  1463. top:15,
  1464. selectedMode:false,
  1465. textStyle:{
  1466. color:'#E9EBEF'
  1467. },
  1468. formatter: function (name) {
  1469. return name;
  1470. }
  1471. },
  1472. toolbox: {
  1473. show: false,
  1474. orient: 'vertical',
  1475. left: 'right',
  1476. top: 'center',
  1477. feature: {
  1478. mark: {show: true},
  1479. dataView: {show: true, readOnly: false},
  1480. magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
  1481. restore: {show: true},
  1482. saveAsImage: {show: true}
  1483. }
  1484. },
  1485. xAxis: [
  1486. {
  1487. type: 'category',
  1488. axisTick: {show: false},
  1489. data: dataX,
  1490. axisLabel: {//x轴刻度
  1491. textStyle: {
  1492. color: '#E9EBEF'
  1493. },
  1494. rotate:'45',
  1495. formatter: function (value) {
  1496. //x轴的文字改为竖版显示
  1497. if(value.length>7){
  1498. return value.slice(0,7)+'...'
  1499. }
  1500. return value;
  1501. }
  1502. },
  1503. axisLine: {//x轴
  1504. lineStyle:{
  1505. color:'#4A5D8E'
  1506. }
  1507. },
  1508. }
  1509. ],
  1510. yAxis: [
  1511. {
  1512. type: 'value',
  1513. axisLine: {//y轴
  1514. show: false
  1515. },
  1516. axisTick: {
  1517. show: false
  1518. },
  1519. axisLabel: {//y轴刻度
  1520. textStyle: {
  1521. color: '#E9EBEF'
  1522. }
  1523. },
  1524. splitLine:{//分割线
  1525. lineStyle:{
  1526. color:'#344876'
  1527. }
  1528. }
  1529. }
  1530. ],
  1531. series: [
  1532. {
  1533. name: type==1?'上月':'',
  1534. type: 'bar',
  1535. barGap: 0,
  1536. label: labelOption,
  1537. barWidth: '15%',
  1538. data: type==1?data2:[]
  1539. },
  1540. {
  1541. name: type==1?'去年本月':'去年',
  1542. type: 'bar',
  1543. label: labelOption,
  1544. barWidth: '15%',
  1545. data: data3
  1546. },
  1547. {
  1548. name: type==1?'本月':'本年',
  1549. type: 'bar',
  1550. label: labelOption,
  1551. barWidth: '15%',
  1552. data: data1
  1553. }
  1554. ]
  1555. };
  1556. myChart.setOption(option);
  1557. }
  1558. //空心饼图
  1559. function emptyCircle(data){
  1560. // console.log(data,1111111111)
  1561. var myChart = echarts.init(document.getElementById('emptyCircle'));
  1562. $(window).resize(function(){
  1563. myChart.resize()
  1564. });
  1565. if(data.length == 0){
  1566. $(".emptyCircleWrap").css("'display","none !important")
  1567. picEmptyData("#emptyCircleWrapEmpty")
  1568. }else{
  1569. $(".emptyCircleWrap").css("'display","block")
  1570. $(".console #emptyCircleWrapEmpty").html('')
  1571. }
  1572. let bgColor = '#203463';
  1573. let title = '总量';
  1574. let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
  1575. let echartData = data;
  1576. let total = echartData.length>0?echartData[0].totleNum:0;
  1577. option = {
  1578. /*backgroundColor: bgColor,*/
  1579. color: color,
  1580. title: [{
  1581. text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
  1582. top: 'center',
  1583. left: 'center',
  1584. textStyle: {
  1585. rich: {
  1586. val: {
  1587. fontSize: 24,
  1588. color: '#E9EBEF',
  1589. fontWeight: 'bold',
  1590. padding: [10, 0]
  1591. },
  1592. name: {
  1593. fontSize: 12,
  1594. fontWeight: 'normal',
  1595. color: '#E9EBEF',
  1596. }
  1597. }
  1598. }
  1599. }],
  1600. tooltip: {
  1601. trigger: 'item',
  1602. // formatter: '{b} : {c} ({d}%)',
  1603. formatter:function(item){
  1604. const {name, num, percentStr} = item.data
  1605. return `${name} : ${num} (${percentStr})`
  1606. }
  1607. },
  1608. series: [{
  1609. name: '',
  1610. type: 'pie',
  1611. radius: ['70%', '90%'],
  1612. data: echartData,
  1613. hoverAnimation:true,
  1614. hoverOffset:5,
  1615. itemStyle: {
  1616. normal: {
  1617. borderColor: bgColor,
  1618. borderWidth: 2
  1619. }
  1620. },
  1621. labelLine: {
  1622. normal: {
  1623. length: 20,
  1624. length2: 120,
  1625. lineStyle: {
  1626. color: '#e6e6e6'
  1627. }
  1628. }
  1629. },
  1630. label: {
  1631. normal: {
  1632. show:false,
  1633. formatter: params => {
  1634. return params.name == 'A类'?params.name:''
  1635. },
  1636. padding: [0 , -100, 25, -100],
  1637. rich: {
  1638. icon: {
  1639. fontSize: 16
  1640. },
  1641. name: {
  1642. fontSize: 14,
  1643. padding: [0, 10, 0, 4],
  1644. color: '#666666'
  1645. },
  1646. value: {
  1647. fontSize: 18,
  1648. fontWeight: 'bold',
  1649. color: '#333333'
  1650. }
  1651. }
  1652. }
  1653. },
  1654. }]
  1655. };
  1656. myChart.setOption(option);
  1657. }
  1658. function emptyCircleB(data){
  1659. if(data.length == 0){
  1660. $(".emptyCircleBData,.emptyCircle").css("'display","none !important")
  1661. picEmptyData(".emptyCircleBWrap")
  1662. }else{
  1663. $(".emptyCircleBData").css("'display","block")
  1664. $(".emptyCircleBWrap").css("display","none")
  1665. }
  1666. var myChart = echarts.init(document.getElementById('emptyCircleB'));
  1667. $(window).resize(function(){
  1668. myChart.resize()
  1669. });
  1670. let bgColor = '#203463';
  1671. let title = '总量';
  1672. let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
  1673. let echartData = data;
  1674. let total = echartData.length>0?echartData[0].totleNum:0;
  1675. option = {
  1676. /*backgroundColor: bgColor,*/
  1677. color: color,
  1678. title: [{
  1679. text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
  1680. top: 'center',
  1681. left: 'center',
  1682. textStyle: {
  1683. rich: {
  1684. val: {
  1685. fontSize: 24,
  1686. color: '#E9EBEF',
  1687. fontWeight: 'bold',
  1688. padding: [10, 0]
  1689. },
  1690. name: {
  1691. fontSize: 12,
  1692. fontWeight: 'normal',
  1693. color: '#E9EBEF',
  1694. }
  1695. }
  1696. }
  1697. }],
  1698. tooltip: {
  1699. trigger: 'item',
  1700. position: 'right',
  1701. // formatter: '{b} : {c} ({d}%)',
  1702. formatter:function(item){
  1703. const {name, num, percentStr} = item.data
  1704. return `${name} : ${num} (${percentStr})`
  1705. }
  1706. },
  1707. series: [{
  1708. name: '',
  1709. type: 'pie',
  1710. radius: ['70%', '90%'],
  1711. data: echartData,
  1712. hoverAnimation:true,
  1713. hoverOffset:5,
  1714. itemStyle: {
  1715. normal: {
  1716. borderColor: bgColor,
  1717. borderWidth: 2
  1718. }
  1719. },
  1720. labelLine: {
  1721. normal: {
  1722. length: 20,
  1723. length2: 120,
  1724. lineStyle: {
  1725. color: '#e6e6e6'
  1726. }
  1727. }
  1728. },
  1729. label: {
  1730. normal: {
  1731. show:false,
  1732. formatter: params => {
  1733. return params.name == 'A类'?params.name:''
  1734. },
  1735. padding: [0 , -100, 25, -100],
  1736. rich: {
  1737. icon: {
  1738. fontSize: 16
  1739. },
  1740. name: {
  1741. fontSize: 14,
  1742. padding: [0, 10, 0, 4],
  1743. color: '#666666'
  1744. },
  1745. value: {
  1746. fontSize: 18,
  1747. fontWeight: 'bold',
  1748. color: '#333333'
  1749. }
  1750. }
  1751. }
  1752. },
  1753. }]
  1754. };
  1755. myChart.setOption(option);
  1756. }
  1757. //缺陷列表渲染
  1758. function queList(data){
  1759. let strAll = '',tmp = `mm
  1760. <tr class="thead">
  1761. <td class="td01">排名</td>
  1762. <td class="td02">模块名称</td>
  1763. <td class="td04">缺陷占比</td>
  1764. </tr>`
  1765. if(data.length == 0){
  1766. $(".qtable").css("display","none")
  1767. picEmptyData(".qtableEmpty")
  1768. return
  1769. }else{
  1770. $(".qtableEmpty").css("display","none")
  1771. $(".qtable").css("display","table")
  1772. }
  1773. for(let i = 0;i < data.length;i++){
  1774. strAll += `
  1775. <tr>
  1776. <td style="text-align:center;"><i style="background:${i < 3?'#ECB22E':'#526186'};color:${i < 3?'#fff':'#B7BDCC'};">${i+1}</i></td>
  1777. <td class="homegodetail" data-name="${data[i].name}"><p class="td02name ellipsis">${data[i].name}</p></td>
  1778. <td>${data[i].percentStr}</td>
  1779. </tr>
  1780. `
  1781. }
  1782. $(".qtable").html(tmp+strAll)
  1783. // initScroll("list","Y",2)
  1784. }
  1785. //饼图列表注释渲染
  1786. function panDetail(data){
  1787. let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
  1788. let strAll = '';
  1789. for(let i = 0;i < data.length;i++){
  1790. strAll += `
  1791. <tr class="explainLi" data-dept="${data[i].name}" dept-id="${data[i].id}">
  1792. <td class="deptName" title="${data[i].name}">
  1793. <p class="smp"><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
  1794. </td>
  1795. <td class="deptNum">${data[i].num}</td>
  1796. <td class="percent">(${data[i].percentStr})</td>
  1797. </tr>
  1798. `
  1799. }
  1800. $(".explainPanT table").html(strAll);
  1801. // initScroll("explainPanT","Y",2,"20px")
  1802. }
  1803. function panDetailB(data){
  1804. let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
  1805. let strAll = '';
  1806. for(let i = 0;i < data.length;i++){
  1807. strAll += `
  1808. <tr class="explainLi">
  1809. <td class="deptName" title="${data[i].name}">
  1810. <p><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
  1811. </td>
  1812. <td class="deptNum">${data[i].num}</td>
  1813. <td class="percent">(${data[i].percentStr})</td>
  1814. </tr>
  1815. `
  1816. }
  1817. $(".explainPanB table").html(strAll);
  1818. $(".explainPan").css({
  1819. marginTop:-($(".explainPan").height()/2-20)+'px'
  1820. })
  1821. }
  1822. //时间获取
  1823. function getTimeDetail(){
  1824. const d = new Date();
  1825. const days = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
  1826. let sec = d.getSeconds()
  1827. let min = d.getMinutes()
  1828. let hour = d.getHours()
  1829. 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}`
  1830. $(".dateDetail").html(str)
  1831. }
  1832. $(".sureDate").click(function(){
  1833. if(!getStaticDate()){
  1834. return
  1835. }
  1836. let dateStartI = behosDateStart.split(" ")[0]
  1837. let dateEndI = behosDateEnd.split(" ")[0]
  1838. setCookieAction(dateStartI,dateEndI)
  1839. $(".monthYear .year").css({
  1840. "border-color":'#A5ADBF',
  1841. color:'#A5ADBF',
  1842. backgroundColor:'#203463'
  1843. })
  1844. $(".monthYear .mon").css({
  1845. "border-color":'#A5ADBF',
  1846. color:'#A5ADBF',
  1847. backgroundColor:'#203463'
  1848. })
  1849. ownSelectDate = 3
  1850. getBarData(dateType)
  1851. getAverageScoreLis()
  1852. getEveryDeptLevel()
  1853. getHomeData('firstLevelPercent')
  1854. getDetails(ownSelectDate||dateType)
  1855. })
  1856. //日期联动
  1857. function dateConsole(dateType,flg){
  1858. let startDate = "", endDate=new Date()
  1859. let year = new Date().getFullYear()
  1860. let month = new Date().getMonth() + 1
  1861. if(dateType == '1'){
  1862. startDate = new Date(`${year}/${month}/01`)
  1863. }else if(dateType == '2'){
  1864. startDate = new Date(`${year}/01/01`)
  1865. } else {
  1866. startDate = "-6d"
  1867. }
  1868. if(getCookie("behosDateStart")&&!flg){
  1869. startDate = new Date(getCookie("behosDateStart"))
  1870. endDate = new Date(getCookie("behosDateEnd"))
  1871. ownSelectDate = 3
  1872. $(".monthYear .year").css({
  1873. "border-color":'#A5ADBF',
  1874. color:'#A5ADBF',
  1875. backgroundColor:'#203463'
  1876. })
  1877. $(".monthYear .mon").css({
  1878. "border-color":'#A5ADBF',
  1879. color:'#A5ADBF',
  1880. backgroundColor:'#203463'
  1881. })
  1882. }
  1883. getDetails(ownSelectDate||dateType)
  1884. $( "#datepicker" ).datepicker({
  1885. yearRange: "2015:"+year,
  1886. changeMonth: true,
  1887. changeYear: true,
  1888. dateFormat:"yy/mm/dd",
  1889. }).datepicker( "setDate", startDate);
  1890. $( "#datepicker2" ).datepicker({
  1891. yearRange: "2015:"+year,
  1892. changeMonth: true,
  1893. changeYear: true,
  1894. dateFormat:"yy/mm/dd"
  1895. }).datepicker( "setDate",endDate);
  1896. getStaticDate(flg)
  1897. }
  1898. function setCookieAction(startDate,endDate){
  1899. setCookie('behosDateStart',startDate)
  1900. setCookie('behosDateEnd',endDate)
  1901. }
  1902. function getStaticDate(flg){
  1903. behosDateStart = $("#datepicker").val()
  1904. behosDateEnd = $("#datepicker2").val()
  1905. const start = new Date(behosDateStart).getTime()
  1906. const end = new Date(behosDateEnd).getTime()
  1907. if(start > end){
  1908. $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
  1909. return false
  1910. }
  1911. if(flg){
  1912. setCookieAction(behosDateStart,behosDateEnd)
  1913. }
  1914. if(behosDateStart){
  1915. behosDateStart = behosDateStart.replace(/\//g,'-') + ' 00:00:00'
  1916. }
  1917. if(behosDateEnd){
  1918. behosDateEnd = behosDateEnd.replace(/\//g,'-') + ' 23:59:59'
  1919. }
  1920. getBarData(dateType)
  1921. getHomeData('firstLevelPercent')
  1922. getAverageScoreLis()
  1923. getEveryDeptLevel()
  1924. return true
  1925. }
  1926. window.onload = function(){
  1927. const iconCalenBlue= require("./../images/darkDate.png")
  1928. const iconCalenGrey= require("./../images/icon_calen_grey.png")
  1929. $.datepicker.regional['zh-CN'] = {
  1930. clearText: '清除',
  1931. clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
  1932. closeText: '关闭',
  1933. closeStatus: '不改变当前选择',
  1934. prevText: '<上月',
  1935. prevStatus: '显示上月',
  1936. prevBigText: '<<',
  1937. prevBigStatus: '显示上一年',
  1938. nextText: '下月>',
  1939. nextStatus: '显示下月',
  1940. nextBigText: '>>',
  1941. nextBigStatus: '显示下一年',
  1942. currentText: '今天',
  1943. currentStatus: '显示本月',
  1944. monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
  1945. monthNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
  1946. yearNamesShort: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
  1947. monthStatus: '选择月份',
  1948. yearStatus: '选择年份',
  1949. weekHeader: '周',
  1950. weekStatus: '年内周次',
  1951. dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
  1952. dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
  1953. dayNamesMin: ['日','一','二','三','四','五','六'],
  1954. dayStatus: '设置 DD 为一周起始',
  1955. dateStatus: '选择 m月 d日, DD',
  1956. dateFormat: 'yy-mm-dd',
  1957. firstDay: 1,
  1958. initStatus: '请选择日期',
  1959. isRTL: false};
  1960. $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
  1961. dateConsole(dateType)
  1962. // $(".filter").click(); //初始查询
  1963. $('.iconCalen').on("mouseenter", function(e){
  1964. $(this).attr("src", iconCalenBlue)
  1965. })
  1966. $('.iconCalen').on("mouseleave", function(e){
  1967. $(this).attr("src", iconCalenGrey)
  1968. })
  1969. $('.iconCalen').on("click", function(e){
  1970. $(this).parent().find("input").focus()
  1971. })
  1972. };