1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864 |
- const $ = require('jquery');
- require("../css/reset.less")
- require("../css/console.less")
- require("../images/logo.png")
- require("../images/arrow_down.png")
- require('./modal.js');
- require('./scrollBar.js')
- // 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, initScroll} = require('../js/utils.js');
- const { get } = require('jquery');
- let payMoney = [],behosDateStart="",ownSelectDate='',behosDateEnd="",dayLis = [],dateType = 2,slideType = 1,hospital=getCookie("hospital"),deptType="内科",deptId="",level="甲",lineType="合格率",lineType1=[],lineType2=[],lineType3=[],lineType4=[];
- $(function(){
- if(!hasData('YH-KZT')){
- $("body").html('')
- }
- // if(hospital == "台州市立"){
- // $(".part03 .partTitlePub .name").html('各科室甲级病例占比')
- // $(".innerOuter").css("display","block")
- // }else{
- // $(".part03 .partTitlePub .name").html('病案首页合格率')
- // $(".innerOuter").css("display","none")
- // }
- $(".partTitle p span").html(hospital)
- resizeBox()
- initConsole()//质控列表
- // getBarData(2)//图标数据获取
- dateChange()
- $(window).resize(function(){
- resizeBox()
- })
- $(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()
- })
- $(".toggleSlide li").click(function(){
- let str = $(this).attr("data-str"),type = $(this).attr("data-type")
- if(type == 1){
- // if(!hasData('FUNC000045')){
- // return
- // }
- slideType = 1
- level = "甲"
- getEveryDeptLevel()
- // $(".pubEchart .title span").html("科室平均住院天数柱状图")
- // barChart(dayLis,dateType)
- $(this).parent().slideToggle().prev().find("span").html(str)
- }else if(type == 2){
- // if(!hasData('FUNC000046')){
- // return
- // }
- slideType = 2
- level = "乙"
- getEveryDeptLevel()
- // $(".pubEchart .title span").html("科室平均住院花费柱状图")
- // barChart(payMoney,dateType)
- $(this).parent().slideToggle().prev().find("span").html(str)
- }else if(type == 6){
- // if(!hasData('FUNC000046')){
- // return
- // }
- slideType = 6
- level = "丙"
- getEveryDeptLevel()
- // $(".pubEchart .title span").html("科室平均住院花费柱状图")
- // barChart(payMoney,dateType)
- $(this).parent().slideToggle().prev().find("span").html(str)
- }else if(type == 3){//科室平均分内科
- if(!hasData('FUNC000091')){
- return
- }
- deptType="内科"
- getAverageScoreLis()
- $(this).parent().slideToggle().prev().find("span").html(str+"系统")
- }else if(type == 4){//科室平均分外科
- if(!hasData('FUNC000091')){
- return
- }
- deptType="外科"
- getAverageScoreLis()
- $(this).parent().slideToggle().prev().find("span").html(str+"系统")
- }else if(type == 7){//病案首页firstLevelPercent emptyPercent errorPercent
- lineType="合格率"
- getHomeData('firstLevelPercent')
- $(this).parent().slideToggle().prev().find("span").html(str)
- }else if(type == 8){//病案首页
- lineType = "完整率"
- getHomeData('emptyPercent')
- $(this).parent().slideToggle().prev().find("span").html(str)
- }else if(type == 9){//病案首页
- lineType = "完善率"
- getHomeData('errorPercent')
- $(this).parent().slideToggle().prev().find("span").html(str)
- }
- })
- $(".part02").on("mouseenter",".bingli li.sec",function(){
- $(this).find(".explainNum").css("color","#00A1FF")
- })
- $(".part02").on("mouseleave",".bingli li.sec",function(){
- $(this).find(".explainNum").css("color","#A5ADBF")
- })
- // getEveryDeptLevel()
- })
- function getDetails(dateType){
- $(".pubEchartB.paymoney .title").click(function(){
- focusMenuItem("YH-ZKK-GKSQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&deptType="+deptType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".part02 .bingliLis").click(function(){
- focusMenuItem("YH-ZKK-GKSQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".part03 .circle .title").click(function(){
- focusMenuItem("YH-ZKK-TMQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&shijian="+dateType+"&qxName=&selectReject=1"+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".part02").on("click",".bingli li.sec",function(){
- focusMenuItem("YH-BLZK-ZKPF");
- let dataC = $(this).attr("data-c")
- let chengdu = dataC == 1?'甲':dataC==2?'乙':'丙'
- $(parent.document).find("#contentIframe").attr("src","./qcList.html?from=1&dateType="+dateType+"&chengdu="+chengdu+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".part03 .partTitlePub").click(function(){
- // if(hospital=="台州市立"){
- // focusMenuItem("YH-ZKK-GKSJJBLZB_XQ")
- // $(parent.document).find("#contentIframe").attr("src","./jiaji.html?from=1&dateType="+dateType)
- // }else{
- // focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
- // $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType)
- // }
- focusMenuItem("YH-ZKK-BASYHGLZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./partDetailControl.html?from=1&dateType="+dateType+"&lineType="+lineType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".paymoney.pubEchart .title").click(function(){
- // if($(this).text().indexOf("花费")!==-1){
- // focusMenuItem("YH-ZKK-KSPJZYHF_XQ");
- // $(parent.document).find("#contentIframe").attr("src","./payDetail.html?from=1&dateType="+dateType)
- // }else{
- // focusMenuItem("YH-ZKK-KSPJZYTS_XQ");
- // $(parent.document).find("#contentIframe").attr("src","./dayDetail.html?from=1&dateType="+dateType)
- // }
- focusMenuItem("YH-ZKK-GKSQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./deptScoreDetailControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".defect .partTitlePub").click(function(){ //from 1 console / 2 deptConsole
- focusMenuItem("YH-ZKK-GMKQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./mukuaiControl.html?from=1&dateType="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $(".circleB .title").click(function(){
- focusMenuItem("YH-ZKK-TMQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&special=1&shijian="+dateType+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $("body").on("click",".homegodetail",function(){
- let name = $(this).attr("data-name")
- focusMenuItem("YH-ZKK-TMQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","./singleVeto.html?from=1&special=1&shijian="+dateType+"&model="+name+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- $("body").on("click",".explainPanT .explainLi",function(){
- let deptName = $(this).attr("data-dept")
- let deptId = $(this).attr("dept-id")
- focusMenuItem("YH-ZKK-TMQXZB_XQ");
- $(parent.document).find("#contentIframe").attr("src","singleVeto.html?from=1&shijian="+dateType+"&qxName="+deptName+"&startDateParam="+behosDateStart+"&endDateParam="+behosDateEnd)
- })
- }
- //判断有无某一权限
- function hasData(data){
- let lis = JSON.parse(getCookie("codeLis"))
- // console.log(lis)
- if(lis.indexOf(data)>-1){//有权限
- return true
- }
- return false;
- }
- function resizeBox(){
- $(".partWrap").css({
- height:$(window).height()-43+'px'
- })
- }
- //所有数据切换日期筛选
- function dateChange(){
- $(".monthYear .mon").click(function(){
- $(this).css({
- backgroundColor:'#00A1FF',
- color:'#E9EBEF',
- "border-color":'#00A1FF'
- }).siblings().css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- dateType = 1
- ownSelectDate = ''
- dateConsole(1,true)
- })
- $(".monthYear .year").click(function(){
- $(this).css({
- backgroundColor:'#00A1FF',
- color:'#E9EBEF',
- "border-color":'#00A1FF'
- }).siblings().css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- dateType = 2
- ownSelectDate = ''
- dateConsole(2,true)
- })
- }
- //控制台数
- function initConsole(result){
- let url = {
- '本月病历数':require("../images/icon6.png"),
- '本月不合格病历-机器':require("../images/icon7.png"),
- '本月质控数-机器':require("../images/icon10.png"),
- '本月甲级病历-机器':require("../images/icon8.png"),
- '本月乙级病历-机器':require("../images/icon9.png"),
- '本年病历数':require("../images/icon6.png"),
- '本年不合格病历-机器':require("../images/icon7.png"),
- '本年质控数-机器':require("../images/icon10.png"),
- '本年甲级病历-机器':require("../images/icon8.png"),
- '本年乙级病历-机器':require("../images/icon9.png"),
- }
- let dom = '';
- for(let i in result){
- if(i.indexOf("人工")==-1){
- let name = i.split("-")[0];
- let num = 0;
- if(name=='本月病历数'||name=='本年病历数'){
- num = result[i]
- }else{
- num = result[name+'-人工']+result[i]
- }
- dom += `
- <li class="partLi">
- <div class="partIn">
- <p class="top">${name}</p>
- <p class="btm clearfix">
- <img src="${url[i]}" alt="">
- <span>${num}</span>
- </p>
- </div>
- </li>
- `
- }
- }
- $(".partAll").html(dom)
- }
- //平均分
- function getAverageScoreLis(){
- let url = ''
- if(hospital=="台州市立"&&hasData('FUNC000091')){
- url = api.getAverageScoreByDeptClass
- }else{
- url = api.getAverageScore
- }
- post(url,{//各科室质控平均分
- "type": dateType||1,//1月2年
- "deptClass":deptType,
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result1 = (hospital=="台州市立"?data.data:data.data['各科室质控平均分'])||[]
- let dataX1=[],dataY1=[]
- for(let i = 0;i < result1.length;i++){
- dataX1.push(result1[i].name)
- dataY1.push(result1[i].averageValue)
- }
- barChartPay(dataX1,dataY1)
- }
- })
- }
- //获取各科室病历等级占比
- function getEveryDeptLevel(){
- if(1){//权限暂无
- post(api.qcResultLevelPercent,{//各科室病历等级占比
- "type": dateType||2,//1月2年
- "level":level,
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result1 = data.data||[]
- let dataX1=[],dataY1=[]
- for(let i = 0;i < result1.length;i++){
- dataX1.push(result1[i].deptName)
- dataY1.push(result1[i].percentStr.replace('%',''))
- }
- barChartLevel(dataX1,dataY1)
- }
- })
- }else{
- $(".toggleSlide1").css("opacity",0.5)
- }
- }
- //病案首页合格率 firstLevelPercent emptyPercent errorPercent
- function getHomeData(name){
- if(hasData("FUNC000075")){
- post(api.homePageLevelLimit,{//病案首页
- "type": dateType||2,//1月2年
- "startDate":behosDateStart,
- "endDate":behosDateEnd,
- "desc": name
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result1 = data.data||[]
- let dataX=[],dataY1=[],dataY2=[],dataY3=[]
- for(let i = 0;i < result1.length;i++){
- dataX.push(result1[i].deptName)
- dataY1.push((result1[i].firstLevelPercentStr.replace('%','')-0))
- dataY2.push((result1[i].emptyPercentStr.replace('%','')-0))
- dataY3.push((result1[i].errorPercentStr.replace('%','')-0))
- }
- // lineType1 = dataY1.sort(function(a, b){return b - a})
- // lineType2 = dataY2.sort(function(a, b){return b - a})
- // lineType3 = dataY3.sort(function(a, b){return b - a})
- lineType4 = dataX
- let datay = (lineType == "合格率")?dataY1:(lineType=="完整率"?dataY2:dataY3)
- lineChartHome(dataX,datay)
- }
- })
- }
- }
- //获取图表数据
- function getBarData(type){
- // if(hasData('FUNC000045')){
- // post(api.getAverageDayNum,{//平均住院天数
- // "type": type||1//1月2年
- // }).then((res)=>{
- // let data = res.data;
- // if(data.code == 0){
- // let result2 = data.data['平均住院日']||[]
- // dayLis = result2
- // if(slideType == 1){
- // barChart(result2,type||1)
- // }
- // }
- // })
- // }else{
- // $(".toggleSlide1").css("opacity",0.5)
- // }
- // if(hasData('FUNC000046')){
- // post(api.getAverageFee,{//平均住院费用
- // "type": type||1//1月2年
- // }).then((res)=>{
- // let data = res.data;
- // if(data.code == 0){
- // let result3 = data.data['平均住院费用']||[]
- // payMoney = result3;
- // if(slideType == 2){
- // barChart(result3,type||1)
- // }
- // }
- // })
- // }else{
- // $(".toggleSlide2").css("opacity",0.5)
- // }
- // if(hasData('FUNC000048')&&hospital=="台州市立"){
- // post(api.getLevelResultDept,{//各科室甲级占比
- // "type": type||1//1月2年
- // }).then((res)=>{
- // let data = res.data;
- // if(data.code == 0){
- // let result2 = data.data['各科室甲级病历占比']||[]
- // let dataX2=[],dataY2=[];
- // for(let i = 0;i < result2.length;i++){
- // dataX2.push(result2[i].deptName)
- // dataY2.push(result2[i].firstPercent.replace('%',''))
- // }
- // lineChart(dataX2,dataY2)
- // }
- // })
- // }
- // if(hasData('FUNC000075')&&hospital=="长兴医院"){
- // post(api.homePageLevelLimit,{//病案首页
- // "type": type||1//1月2年
- // }).then((res)=>{
- // let data = res.data;
- // if(data.code == 0){
- // let result1 = data.data||[]
- // let dataX1=[],dataY1=[]
- // for(let i = 0;i < result1.length;i++){
- // dataX1.push(result1[i].deptName)
- // dataY1.push(result1[i].firstLevelPercentStr.replace('%',''))
- // }
- // lineChartSpecial(dataX1,dataY1)
- // }
- // })
- // }
- if(hasData('FUNC000049')){
- post(api.leaveHosCount,{//出院人数统计
- "type": type||1,//1月2年
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- // barChart(result2,type||1)
- // console.log(data)
- let result1 = data.data['出院人数统计']||[]
- personNum(result1)
- }
- })
- }
- if(hasData('FUNC000050')){
- post(api.mrCount,{//质控病历统计
- "type": type||1,//1月2年
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data
- if(data.code == 0){
- let result3 = data.data['病历数统计']||[]
- setNumDetail(result3)
- }
- })
- }
- if(hasData('FUNC000051')){
- post(api.entryCountGroupByCase,{//各模块缺陷占比排行
- "type": type||1,//1月2年
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result1 = data.data['各模块缺陷占比排行']||[];
- // result1.length>8?result1.length=8:"";
- queList(result1)
- }
- })
- }
- if(hasData('FUNC000052')){
- post(api.entryCountGroupByEntry,{//条目缺陷占比
- "type": type||1,//1月2年
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result3 = data.data['条目缺陷占比']||[]
- for(let i = 0;i < result3.length;i++){
- result3[i].value = result3[i].num
- }
- emptyCircleB(result3)
- panDetailB(result3)
- }
- })
- }
- // if(hasData('FUNC000053')){
- // post(api.entryByDept,{//各科室缺陷占比
- // "type": type||1//1月2年
- // }).then((res)=>{
- // let data = res.data;
- // if(data.code == 0){
- // let result2 = data.data['各科室缺陷占比']||[]
- // for(let i = 0;i < result2.length;i++){
- // result2[i].value = result2[i].num
- // }
- // emptyCircle(result2)
- // panDetail(result2)
- // }
- // })
- // }
- // if(1){
- post(api.entryRejectPercent,{//单项否决
- "type": type||2,//1月2年
- "deptClass": "",
- "level": "",
- "startDate":behosDateStart,
- "endDate":behosDateEnd
- }).then((res)=>{
- let data = res.data;
- if(data.code == 0){
- let result2 = data.data||[]
- for(let i = 0;i < result2.length;i++){
- result2[i].value = result2[i].num
- }
- emptyCircle(result2)
- panDetail(result2)
- }
- })
- // }
- }
- //part01
- function personNum(data){
- if(data['总人数']==0){
- $(".chuyuan,.personNum").css("display","none")
- picEmptyData(".chuyuanEmpty")
- return
- }else{
- $(".chuyuanEmpty").css("display","none")
- $(".chuyuan,.personNum").css("display","block")
- }
- $(".personNum").html("总人数:"+data['总人数'])
- $(".died").html(data['死亡人数'])
- $(".newborn").html(data['新生儿人数'])
- $(".patientNum").html(data['手术病人数'])
- }
- //part02
- function setNumDetail(data){
- // console.log(data,2222222222)
- if(data.length == 0){
- $(".pingfendengji").css("display","block")
- $(".bldjs").css("display","none")
- picEmptyData(".pingfendengjiEmpty")
- return
- }else{
- $(".bldjs").css("display","block")
- $(".pingfendengji").css("display","none")
- }
- let str = ''
- for(let i = 0;i < data.length;i++){
- str += `
- <li class="${i==0?'fst':'sec'}" data-c="${i}">
- <p class="numShow">${data[i].num}</p>
- <p class="explainNum">${data[i].name}</p>
- </li>
- `
- if(data[i].name == '甲级病历'){
- let tmp = []
- data[i].value = data[i].num
- tmp.push(data[i])
- tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
- part02pan(tmp,'fen01')
- }
- if(data[i].name == '乙级病历'){
- let tmp = []
- data[i].value = data[i].num
- tmp.push(data[i])
- tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
- part02pan(tmp,'fen02')
- }
- if(data[i].name == '丙级病历'){
- let tmp = []
- data[i].value = data[i].num
- tmp.push(data[i])
- tmp.push({percentStr:(1-data[i].percent)*100+'%',value:data[i].totleNum - data[i].num})
- part02pan(tmp,'fen03')
- }
- }
- $('.bingli').html(str)
- }
- //part02pan
- function part02pan(data,dom){
- // console.log(data,33333)
- dom = echarts.init(document.getElementById(dom));
- $(window).resize(function(){
- dom.resize()
- });
- let bgColor = '#fff';
- let title = '总量';
- let color = ['#3fffd1','#4c5c82'];
- let echartData = data;
- option = {
- //backgroundColor: bgColor,
- color: color,
- title: [{
- text:'{val|' + echartData[0].percentStr + '}',
- top: 'center',
- left: 'center',
- textStyle: {
- rich: {
- val: {
- fontSize: 12,
- color: '#E9EBEF',
- /*fontWeight: 'bold',*/
- padding: [10, 0]
- },
- name: {
- fontSize: 12,
- fontWeight: 'normal',
- color: '#E9EBEF',
- }
- }
- }
- }],
- series: [{
- name: '',
- type: 'pie',
- radius: ['65%', '95%'],
- data: echartData,
- hoverAnimation:true,
- hoverOffset:3,
- itemStyle: {
- normal: {
- borderColor: '#203463',
- borderWidth: 3
- }
- },
- label: {
- normal: {
- show:false,
- }
- },
- }]
- };
- dom.setOption(option);
- }
- //折现图各科室甲级病历占比(长兴)
- function lineChart(dataX,dataY){
- if(dataX.length==0&&dataY.length==0){
- $(".barChartLine").css("display","none")
- picEmptyData(".barChartLineEmpty")
- return
- }else{
- $(".barChartLine").css("display","block")
- $(".barChartLineEmpty").css("display","none")
- }
- var myCharts = echarts.init(document.getElementById('lineChart'));
- $(window).resize(function(){
- myCharts.resize()
- });
- option = {
- color:"#00A1FF",
- tooltip: {
- trigger: 'axis',
- color:'#fff',
- formatter: function(param) {
- return '<div style="color:#fff;"> '+ param[0].name + "<br>" +"甲级病历占比:"+ param[0].value+"%" + "<br>"
- '</div>'
- }
- },
- grid: {
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true
- },
- title:[{
- text: dataX.length>0?'百分比':'',
- top: 15,
- left: 0,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- }],
- toolbox: {
- show: false,
- feature: {
- dataZoom: {
- yAxisIndex: 'none'
- },
- dataView: {readOnly: false},
- magicType: {type: ['line', 'bar']},
- restore: {
- },
- saveAsImage: {}
- },
- emphasis:{
- iconStyle:{
- color:'red'
- }
- },
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: dataX,
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:'45',
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- }
- },
- yAxis: {
- type: 'value',
- axisLabel: {
- formatter: '{value} %',
- textStyle: {
- color: '#E9EBEF'
- }
- },
-
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- },
- series: [
- {
- name: '甲级病历占比:',
- type: 'line',
- data: dataY,
- }
- ]
- };
- myCharts.setOption(option);
- }
- function lineChartSpecial(dataX,dataY){
- if(dataX.length==0&&dataY.length==0){
- $(".barChartLine").css("display","none")
- picEmptyData(".barChartLineEmpty")
- return
- }else{
- $(".barChartLine").css("display","block")
- $(".barChartLineEmpty").css("display","none")
- }
- var myCharts = echarts.init(document.getElementById('lineChart'));
- $(window).resize(function(){
- myCharts.resize()
- });
- option = {
- color: ['#37C4FC'],
- tooltip: {
- trigger: 'axis',
- position: 'right',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'line' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function(param) {
- 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>病案首页合格率:'+ param[0].value+"%" + "<br>"
- '</div>'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: dataX,
- axisTick: {
- alignWithLabel: true
- },
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:45,
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {//y轴刻度
- textStyle: {
- color: '#E9EBEF'
- }
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- }
-
- ],
- title:[{
- text: '合格率',
- top: 15,
- left: 10,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- }],
- series: [
- {
- name: '病案首页合格率',
- type: 'bar',
- barWidth: '23%',
- data: dataY
- }
- ]
- };
- myCharts.setOption(option);
- }
- //折线图病案首页
- function lineChartHome(dataX,dataY){
- // console.log(dataX,dataY)
- if(dataX.length==0){
- $(".barChartLine").css("display","none")
- picEmptyData(".barChartLineEmpty")
- return
- }else{
- $(".barChartLine").css("display","block")
- $(".barChartLineEmpty").css("display","none")
- }
- var myCharts = echarts.init(document.getElementById('lineChart'));
- $(window).resize(function(){
- myCharts.resize()
- });
- option = {
- color:(lineType == "合格率")?'#00A1FF':(lineType=="完整率"?'#FF2B92':'#3EFFD1'),
- title: {
- text: '百分比',
- top: 15,
- left: 10,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- },
- tooltip: {
- trigger: 'axis',
- position: 'right',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'line' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function(param) {
- return `<div style="color:#fff;">${param[0].name}<br>
- <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]&¶m[0].value}%<br>
- </div>`
- }
- },
- // legend: {
- // selectedMode :false,
- // right:15,
- // top:15,
- // data: [
- // {
- // name: '合格率',
- // textStyle: {
- // color: '#A5ADBF'
- // }
- // },
- // {
- // name: '完整率',
- // textStyle: {
- // color: '#A5ADBF'
- // }
- // },
- // {
- // name: '完善率',
- // textStyle: {
- // color: '#A5ADBF'
- // }
- // }
- // ]
- // },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: dataX,
- axisTick: {
- alignWithLabel: true
- },
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:45,
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- }
- },
- yAxis: {
- type: 'value',
- min:0,
- max:100,
- boundaryGap: [0.01, 0.01],axisLabel: {
- show: true,
- },
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {//y轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
-
- interval: 'auto',
- formatter: '{value} %'
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- },
- series: [
- {
- name: lineType,
- type: 'line',
- // stack: '总量',
- data: dataY
- },
- // {
- // name: '完整率',
- // type: 'line',
- // // stack: '总量',
- // data: dataY2
- // },
- // {
- // name: '完善率',
- // type: 'line',
- // // stack: '总量',
- // data: dataY3
- // }
- ]
- };
- myCharts.setOption(option);
- }
- //柱状图住院费用
- function barChartPay(dataX,dataY){
- // console.log(dataX,dataY,78787878)
- if(dataX.length==0&&dataY.length==0){
- $("#barChartPay,.innerOuter").css("display","none")
- picEmptyData('.barChartPayEmptys')
- return
- }else{
- if(hospital == "台州市立"){
- $(".innerOuter").css("display","block")
- }else{
- $(".innerOuter").css("display","none")
- }
- $("#barChartPay").css("display","block")
- $(".barChartPayEmptys").css("display","none")
- }
- var myCharts = echarts.init(document.getElementById('barChartPay'));
- $(window).resize(function(){
- myCharts.resize()
- });
- option = {
- color: ['#37C4FC'],
- tooltip: {
- trigger: 'axis',
- position: 'right',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'line' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: dataX,
- axisTick: {
- alignWithLabel: true
- },
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:45,
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {//y轴刻度
- textStyle: {
- color: '#E9EBEF'
- }
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- }
-
- ],
- title:[{
- text: dataX.length>0?'分数':'',
- top: 15,
- left: 10,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- }],
- series: [
- {
- name: '质控平均分',
- type: 'bar',
- barWidth: '23%',
- data: dataY
- }
- ]
- };
- myCharts.setOption(option);
- }
- //柱状图住院日期
- function barChartLevel(dataX,dataY){
- // console.log(dataX,dataY,7887878787)
- if(dataX.length==0&&dataY.length==0){
- $("#barChart,.innerOuter").css("display","none")
- picEmptyData('.barChartPayEmpty')
- return
- }else{
- $("#barChart").css("display","block")
- $(".barChartPayEmpty").css("display","none")
- }
- var myCharts = echarts.init(document.getElementById('barChart'));
- $(window).resize(function(){
- myCharts.resize()
- });
- option = {
- color: ['#37C4FC'],
- tooltip: {
- trigger: 'axis',
- position: 'right',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'line' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function(param) {
- return `<div style="color:#fff;">${param[0].name}<br>
- <i style="background:#00A1FF;margin-right:5px;display:inline-block;width:8px;height:8px;border-radius:50%"></i>${level}级病历占比:${param[0]&¶m[0].value}%<br>
- </div>`
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- data: dataX,
- axisTick: {
- alignWithLabel: true
- },
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:45,
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {//y轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
-
- interval: 'auto',
- formatter: '{value} %'
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- }
-
- ],
- title:[{
- text: dataX.length>0?'百分比':'',
- top: 15,
- left: 10,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- }],
- series: [
- {
- name: level+'级病历占比',
- type: 'bar',
- barWidth: '23%',
- data: dataY
- }
- ]
- };
- myCharts.setOption(option);
- }
- function barChart(data,type){
- // console.log(data,type,78787888787787)
- if(data.length==0){
- $(".toggleSlide,#barChart").css("display","none")
- picEmptyData('.barChartPayEmpty')
- return
- }else{
- $(".toggleSlide,#barChart").css("display","block")
- $(".barChartPayEmpty").css("display","none")
- }
- var myChart = echarts.init(document.getElementById('barChart'));
- $(window).resize(function(){
- myChart.resize()
- });
- var posList = [
- 'left', 'right', 'top', 'bottom',
- 'inside',
- 'insideTop', 'insideLeft', 'insideRight', 'insideBottom',
- 'insideTopLeft', 'insideTopRight', 'insideBottomLeft', 'insideBottomRight'
- ];
- let app = {}
- app.configParameters = {
- rotate: {
- min: -90,
- max: 90
- },
- align: {
- options: {
- left: 'left',
- center: 'center',
- right: 'right'
- }
- },
- verticalAlign: {
- options: {
- top: 'top',
- middle: 'middle',
- bottom: 'bottom'
- }
- },
- position: {
- options: echarts.util.reduce(posList, function (map, pos) {
- map[pos] = pos;
- return map;
- }, {})
- },
- distance: {
- min: 0,
- max: 100
- }
- };
- app.config = {
- rotate: 90,
- align: 'left',
- verticalAlign: 'middle',
- position: 'insideBottom',
- distance: 15,
- onChange: function () {
- var labelOption = {
- normal: {
- rotate: app.config.rotate,
- align: app.config.align,
- verticalAlign: app.config.verticalAlign,
- position: app.config.position,
- distance: app.config.distance
- }
- };
- myChart.setOption({
- series: [{
- label: labelOption
- }, {
- label: labelOption
- }, {
- label: labelOption
- }, {
- label: labelOption
- }]
- });
- }
- };
- var labelOption = {
- show: false,
- position: app.config.position,
- distance: app.config.distance,
- align: app.config.align,
- verticalAlign: app.config.verticalAlign,
- rotate: app.config.rotate,
- formatter: '{c} {name|{a}}',
- fontSize: 12,
- rich: {
- name: {
- textBorderColor: '#fff'
- }
- }
- };
- let dataX = []
- let data1 = []
- let data2 = []
- let data3 = []
- for(let i = 0;i < data.length;i++){
- dataX.push(data[i].name)
- data1.push(data[i].averageValue)//本月
- data2.push(data[i].lastAverageValue)//本年
- data3.push(data[i].lastYearAverageValue)//去年本月
- }
- option = {
- color: ['#37CBCB','#5A8EEE', '#FAD336' ],
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- title:[{
- text: dataX.length>0?(slideType==1?'天数':'元'):'',
- top: 15,
- left: 10,
- textStyle: {
- fontSize: 14,
- color:'#E9EBEF',
- fontWeight: 400
- }
- }],
- legend: {
- itemWidth :10,
- itemHeight :10,
- right:15,
- top:15,
- selectedMode:false,
- textStyle:{
- color:'#E9EBEF'
- },
- formatter: function (name) {
- return name;
- }
- },
- toolbox: {
- show: false,
- orient: 'vertical',
- left: 'right',
- top: 'center',
- feature: {
- mark: {show: true},
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['line', 'bar', 'stack', 'tiled']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- xAxis: [
- {
- type: 'category',
- axisTick: {show: false},
- data: dataX,
- axisLabel: {//x轴刻度
- textStyle: {
- color: '#E9EBEF'
- },
- rotate:'45',
- formatter: function (value) {
- //x轴的文字改为竖版显示
- if(value.length>7){
- return value.slice(0,7)+'...'
- }
- return value;
- }
- },
- axisLine: {//x轴
- lineStyle:{
- color:'#4A5D8E'
- }
- },
- }
- ],
- yAxis: [
- {
- type: 'value',
- axisLine: {//y轴
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {//y轴刻度
- textStyle: {
- color: '#E9EBEF'
- }
- },
- splitLine:{//分割线
- lineStyle:{
- color:'#344876'
- }
- }
- }
- ],
- series: [
- {
- name: type==1?'上月':'',
- type: 'bar',
- barGap: 0,
- label: labelOption,
- barWidth: '15%',
- data: type==1?data2:[]
- },
- {
- name: type==1?'去年本月':'去年',
- type: 'bar',
- label: labelOption,
- barWidth: '15%',
- data: data3
- },
- {
- name: type==1?'本月':'本年',
- type: 'bar',
- label: labelOption,
- barWidth: '15%',
- data: data1
- }
- ]
- };
- myChart.setOption(option);
- }
- //空心饼图
- function emptyCircle(data){
- // console.log(data,1111111111)
- var myChart = echarts.init(document.getElementById('emptyCircle'));
- $(window).resize(function(){
- myChart.resize()
- });
- if(data.length == 0){
- $(".emptyCircleWrap").css("'display","none !important")
- picEmptyData("#emptyCircleWrapEmpty")
- }else{
- $(".emptyCircleWrap").css("'display","block")
- $(".console #emptyCircleWrapEmpty").html('')
- }
- let bgColor = '#203463';
- let title = '总量';
- let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
- let echartData = data;
- let total = echartData.length>0?echartData[0].totleNum:0;
-
- option = {
- /*backgroundColor: bgColor,*/
- color: color,
- title: [{
- text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
- top: 'center',
- left: 'center',
- textStyle: {
- rich: {
- val: {
- fontSize: 24,
- color: '#E9EBEF',
- fontWeight: 'bold',
- padding: [10, 0]
- },
- name: {
- fontSize: 12,
- fontWeight: 'normal',
- color: '#E9EBEF',
- }
- }
- }
- }],
- tooltip: {
- trigger: 'item',
- // formatter: '{b} : {c} ({d}%)',
- formatter:function(item){
- const {name, num, percentStr} = item.data
- return `${name} : ${num} (${percentStr})`
- }
- },
- series: [{
- name: '',
- type: 'pie',
- radius: ['70%', '90%'],
- data: echartData,
- hoverAnimation:true,
- hoverOffset:5,
- itemStyle: {
- normal: {
- borderColor: bgColor,
- borderWidth: 2
- }
- },
- labelLine: {
- normal: {
- length: 20,
- length2: 120,
- lineStyle: {
- color: '#e6e6e6'
- }
- }
- },
- label: {
- normal: {
- show:false,
- formatter: params => {
- return params.name == 'A类'?params.name:''
- },
- padding: [0 , -100, 25, -100],
- rich: {
- icon: {
- fontSize: 16
- },
- name: {
- fontSize: 14,
- padding: [0, 10, 0, 4],
- color: '#666666'
- },
- value: {
- fontSize: 18,
- fontWeight: 'bold',
- color: '#333333'
- }
- }
- }
- },
- }]
- };
- myChart.setOption(option);
- }
- function emptyCircleB(data){
- if(data.length == 0){
- $(".emptyCircleBData,.emptyCircle").css("'display","none !important")
- picEmptyData(".emptyCircleBWrap")
- }else{
- $(".emptyCircleBData").css("'display","block")
- $(".emptyCircleBWrap").css("display","none")
- }
- var myChart = echarts.init(document.getElementById('emptyCircleB'));
- $(window).resize(function(){
- myChart.resize()
- });
- let bgColor = '#203463';
- let title = '总量';
- let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
- let echartData = data;
- let total = echartData.length>0?echartData[0].totleNum:0;
- option = {
- /*backgroundColor: bgColor,*/
- color: color,
- title: [{
- text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
- top: 'center',
- left: 'center',
- textStyle: {
- rich: {
- val: {
- fontSize: 24,
- color: '#E9EBEF',
- fontWeight: 'bold',
- padding: [10, 0]
- },
- name: {
- fontSize: 12,
- fontWeight: 'normal',
- color: '#E9EBEF',
- }
- }
- }
- }],
- tooltip: {
- trigger: 'item',
- position: 'right',
- // formatter: '{b} : {c} ({d}%)',
- formatter:function(item){
- const {name, num, percentStr} = item.data
- return `${name} : ${num} (${percentStr})`
- }
- },
- series: [{
- name: '',
- type: 'pie',
- radius: ['70%', '90%'],
- data: echartData,
- hoverAnimation:true,
- hoverOffset:5,
- itemStyle: {
- normal: {
- borderColor: bgColor,
- borderWidth: 2
- }
- },
- labelLine: {
- normal: {
- length: 20,
- length2: 120,
- lineStyle: {
- color: '#e6e6e6'
- }
- }
- },
- label: {
- normal: {
- show:false,
- formatter: params => {
- return params.name == 'A类'?params.name:''
- },
- padding: [0 , -100, 25, -100],
- rich: {
- icon: {
- fontSize: 16
- },
- name: {
- fontSize: 14,
- padding: [0, 10, 0, 4],
- color: '#666666'
- },
- value: {
- fontSize: 18,
- fontWeight: 'bold',
- color: '#333333'
- }
- }
- }
- },
- }]
- };
- myChart.setOption(option);
- }
- //缺陷列表渲染
- function queList(data){
- let strAll = '',tmp = `mm
- <tr class="thead">
- <td class="td01">排名</td>
- <td class="td02">缺陷详情</td>
- <td class="td04">缺陷占比</td>
- </tr>`
- if(data.length == 0){
- $(".qtable").css("display","none")
- picEmptyData(".qtableEmpty")
- return
- }else{
- $(".qtableEmpty").css("display","none")
- $(".qtable").css("display","table")
- }
- for(let i = 0;i < data.length;i++){
- strAll += `
- <tr>
- <td style="text-align:center;"><i style="background:${i < 3?'#ECB22E':'#526186'};color:${i < 3?'#fff':'#B7BDCC'};">${i+1}</i></td>
- <td class="homegodetail" data-name="${data[i].name}"><p class="td02name ellipsis">${data[i].name}</p></td>
- <td>${data[i].percentStr}</td>
- </tr>
- `
- }
- $(".qtable").html(tmp+strAll)
- // initScroll("list","Y",2)
- }
- //饼图列表注释渲染
- function panDetail(data){
- let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
- let strAll = '';
- for(let i = 0;i < data.length;i++){
- strAll += `
- <tr class="explainLi" data-dept="${data[i].name}" dept-id="${data[i].id}">
- <td class="deptName" title="${data[i].name}">
- <p class="smp"><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
- </td>
- <td class="deptNum">${data[i].num}</td>
- <td class="percent">(${data[i].percentStr})</td>
- </tr>
- `
- }
- $(".explainPanT table").html(strAll);
- // initScroll("explainPanT","Y",2,"20px")
- }
- function panDetailB(data){
- let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
- let strAll = '';
- for(let i = 0;i < data.length;i++){
- strAll += `
- <tr class="explainLi">
- <td class="deptName" title="${data[i].name}">
- <p><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</p>
- </td>
- <td class="deptNum">${data[i].num}</td>
- <td class="percent">(${data[i].percentStr})</td>
- </tr>
- `
- }
- $(".explainPanB table").html(strAll);
- $(".explainPan").css({
- marginTop:-($(".explainPan").height()/2-20)+'px'
- })
- // new CusScrollBar({
- // contentSelector: '.explainPanB_scroll_cont' , //滚动内容区
- // barSelector: '.explainPanB_scroll_bar', //滚动条
- // sliderSelector: '.explainPanB_scroll_slider', //滚动滑块
- // sliderMode:2
- // });
- // initScroll("explainPanB","Y",2,"20px")
- }
- //时间获取
- function getTimeDetail(){
- const d = new Date();
- const days = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
- let sec = d.getSeconds()
- let min = d.getMinutes()
- 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(){
- if(!getStaticDate()){
- return
- }
- let dateStartI = behosDateStart.split(" ")[0]
- let dateEndI = behosDateEnd.split(" ")[0]
- setCookieAction(dateStartI,dateEndI)
- $(".monthYear .year").css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- $(".monthYear .mon").css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- ownSelectDate = 3
- getBarData(dateType)
- getAverageScoreLis()
- getEveryDeptLevel()
- getHomeData('firstLevelPercent')
- getDetails(ownSelectDate||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`)
- }else if(dateType == '2'){
- startDate = new Date(`${year}/01/01`)
- } else {
- startDate = "-6d"
- }
- if(getCookie("behosDateStart")&&!flg){
- startDate = new Date(getCookie("behosDateStart"))
- endDate = new Date(getCookie("behosDateEnd"))
- ownSelectDate = 3
- $(".monthYear .year").css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- $(".monthYear .mon").css({
- "border-color":'#A5ADBF',
- color:'#A5ADBF',
- backgroundColor:'#203463'
- })
- }
- getDetails(ownSelectDate||dateType)
- $( "#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(flg)
- }
- 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()
- const end = new Date(behosDateEnd).getTime()
- if(start > end){
- $.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'
- }
- if(behosDateEnd){
- behosDateEnd = behosDateEnd.replace(/\//g,'-') + ' 23:59:59'
- }
- getBarData(dateType)
- getHomeData('firstLevelPercent')
- getAverageScoreLis()
- getEveryDeptLevel()
- return true
- }
- $(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()
- })
- // new CusScrollBar({
- // contentSelector: '.console_scroll_cont', //滚动内容区
- // barSelector: '.console_scroll_bar', //滚动条
- // sliderSelector: '.console_scroll_slider', //滚动滑块
- // sliderMode:2
- // });
- // new CusScrollBar({
- // contentSelector: '.console_wrapper_scroll_cont', //滚动内容区
- // barSelector: '.console_wrapper_scroll_bar', //滚动条
- // sliderSelector: '.console_wrapper_scroll_slider', //滚动滑块
- // scrollDir:'X',
- // sliderMode:2
- // });
- // initScroll("partWrap","Y",2)
- // initScroll("console","X",2)
- });
|