1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962 |
- 'use strict';
- app.controller('charts4Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$interval", "$http", "$cookieStore", "Restangular", "api_hkreport", function($scope, $rootScope, $state, $timeout, $interval, $http, $cookieStore, Restangular, api_hkreport) {
- // 获取当前时间
- $interval(function(){
- $scope.jry_year=new Date().getFullYear();//获取当前年份
- $scope.jry_month=new Date().getMonth()+1;//获取当前月份
- $scope.jry_data=new Date().getDate();//获取当前日号
- $scope.jry_hours=new Date().getHours();//获取当前小时
- $scope.jry_minute=new Date().getMinutes();//获取当前分钟
- $scope.jry_second=new Date().getSeconds();//获取当前秒
- var jry_week_index=new Date().getDay();//获取当前星期索引
- var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
- $scope.jry_week=weekday[jry_week_index];//获取当前星期几
- $scope.getMinute=function(res){
- if(Number(res)<10){
- return "0"+res
- }else{
- return res
- }
- }
- $scope.getSecond=function(res){
- if(Number(res)<10){
- return "0"+res
- }else{
- return res
- }
- }
- },1000);
- // 调用数据
- var nowYear=moment(new Date().getTime()).format('YYYY');
- var nowMonth=moment(new Date().getTime()).format('YYYY-MM');
- var nowMonthOnly=moment(new Date().getTime()).format('MM');
- var fiveYearAgo=String(Number(nowYear-4));
- var nowDay=moment(new Date().getTime()).format("YYYY-MM-DD");
- var seventDayAgo=moment(new Date().getTime() - 86400000*30).format("YYYY-MM-DD");
- // 当月满意度TOP5
- var satisfied_myColor = [ 'rgba(34,142,215,1)', 'rgba(34,142,215,1)','rgba(12,167,167,1)', 'rgba(34,142,215,1)', 'rgba(249,143,59,1)' ];
- var satisfied_myColor2 = ['rgba(34,142,215,0)', 'rgba(34,142,215,0)','rgba(12,167,167,0)', 'rgba(34,142,215,0)', 'rgba(249,143,59,0)'];
- var dom_satisfied = document.getElementById("satisfied");
- var myChart_satisfied = echarts.init(dom_satisfied);
- myChart_satisfied.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_satisfied = null;
- option_satisfied = {
- grid: {
- left: '11%',
- top: '4%',
- right: '13%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- show: false,
- }],
- yAxis: [{
- axisTick: 'none',
- axisLine: 'none',
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color: 'white',
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
- },
- ],
- series: [{
- name: '条',
- type: 'bar',
- yAxisIndex: 0,
- data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
- label: {
- normal: {
- show: true,
- position: 'right',
- textStyle: {
- color: 'white',
- fontSize: '16',
- },
- formatter:"{c}%"
- }
- },
- barWidth: 16,
- barMaxWidth:16,
- itemStyle: {
- normal: {
- color:function(params){
- var num = satisfied_myColor.length;
- return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- offset: 0,
- color: satisfied_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: satisfied_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- },
- z: 2
- },
- ]
- };;
- // 获取当月满意度TOP5数据
- // --开始
- function getSatisfiedData(time){
- let y=nowYear;
- let m=nowMonthOnly;
- if(Number(m)-1==0){
- y--
- m=12
- time={
- "start":y+"-"+m+"-01",
- "end":y+"-"+m+"-30"
- }
- }
- api_hkreport.incidentreport(time, 'large_screen_degree_top').then(function(res) {
- option_satisfied.yAxis[0].data=[];
- option_satisfied.series[0].data=[];
- var pieData=res.data;
- for(var i=0;i<pieData.length;i++){
- option_satisfied.yAxis[0].data.unshift(pieData[i].name);
- option_satisfied.series[0].data.unshift(pieData[i].degree)
- }
- myChart_satisfied.setOption(option_satisfied);
- myChart_satisfied.hideLoading();
- })
- }
- getSatisfiedData({
- "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- // "start":nowMonth+"-01",
- // "end":nowDay
- });
- // --结束
- // 当月人员按时解决率TOP5
- var peopleOnTime_myColor = [ 'rgba(34,142,215,1)', 'rgba(34,142,215,1)','rgba(12,167,167,1)', 'rgba(34,142,215,1)', 'rgba(249,143,59,1)' ];
- var peopleOnTime_myColor2 = ['rgba(34,142,215,0)', 'rgba(34,142,215,0)','rgba(12,167,167,0)', 'rgba(34,142,215,0)', 'rgba(249,143,59,0)'];
- var dom_peopleOnTime = document.getElementById("peopleOnTime");
- var myChart_peopleOnTime = echarts.init(dom_peopleOnTime);
- myChart_peopleOnTime.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_peopleOnTime = null;
- option_peopleOnTime = {
- grid: {
- left: '11%',
- top: '4%',
- right: '10%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- show: false,
- }],
- yAxis: [{
- axisTick: 'none',
- axisLine: 'none',
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color: 'white',
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
- },
- ],
- series: [{
- name: '条',
- type: 'bar',
- yAxisIndex: 0,
- data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
- label: {
- normal: {
- show: true,
- position: 'right',
- textStyle: {
- color: 'white',
- fontSize: '16',
- }
- }
- },
- barWidth: 16,
- barMaxWidth:16,
- itemStyle: {
- normal: {
- // color: function(params) {
- // var num = people_myColor.length;
- // return people_myColor[params.dataIndex % num]
- // },
- color:function(params){
- var num = peopleOnTime_myColor.length;
- return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- offset: 0,
- color: peopleOnTime_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: peopleOnTime_myColor2[params.dataIndex % num]
- }
- ])
- }
- // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- // offset: 0,
- // color: "#6f3d9e"
- // },
- // {
- // offset: 1,
- // color: "#3637a3"
- // }
- // ])
- }
- },
- z: 2
- },
- ]
- };;
- // 获取当月人员按时解决率TOP5数据
- // --开始
- function getPeopleOnTimeData(time){
- let y=nowYear;
- let m=nowMonthOnly;
- if(Number(m)-1==0){
- y--
- m=12
- time={
- "start":y+"-"+m+"-01",
- "end":y+"-"+m+"-30"
- }
- }
- api_hkreport.incidentreport(time, 'incident_handler').then(function(res) {
- option_peopleOnTime.yAxis[0].data=[];
- option_peopleOnTime.series[0].data=[];
- var pieData=res.pieChart;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].account=="管理员"){
- pieData.splice(i,1)
- }
- }
- if(pieData.length>6){
- for(var i=0;i<5;i++){
- option_peopleOnTime.yAxis[0].data.unshift(pieData[i].account);
- option_peopleOnTime.series[0].data.unshift(pieData[i].value)
- }
- }else{
- for(var i=0;i<pieData.length;i++){
- option_peopleOnTime.yAxis[0].data.unshift(pieData[i].account);
- option_peopleOnTime.series[0].data.unshift(pieData[i].value)
- }
- }
- myChart_peopleOnTime.setOption(option_peopleOnTime);
- myChart_peopleOnTime.hideLoading();
- })
- }
- getPeopleOnTimeData({
- // "start":nowMonth+"-01",
- // "end":nowDay
- "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- });
- // --结束
- // 当月故障原因TOP5
- var fault_myColor = [ 'rgba(34,142,215,1)', 'rgba(34,142,215,1)','rgba(12,167,167,1)', 'rgba(34,142,215,1)', 'rgba(249,143,59,1)' ];
- var fault_myColor2 = ['rgba(34,142,215,0)', 'rgba(34,142,215,0)','rgba(12,167,167,0)', 'rgba(34,142,215,0)', 'rgba(249,143,59,0)' ];
- var dom_fault = document.getElementById("fault");
- var myChart_fault = echarts.init(dom_fault);
- myChart_fault.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_fault = null;
- option_fault = {
- grid: {
- left: '11%',
- top: '4%',
- right: '8%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- show: false,
- }],
- yAxis: [{
- axisTick: 'none',
- axisLine: 'none',
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color: 'white',
- fontSize: '13',
- // align:"left"
- lineHeight:15
- },
- formatter:function(params){
- // console.log(params);
- if(params.length>3){
- return params.slice(0,3)+"\n"+params.slice(3,params.length)
- }else{
- return params;
- }
-
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
- },
- ],
- series: [{
- name: '条',
- type: 'bar',
- yAxisIndex: 0,
- data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
- label: {
- normal: {
- show: true,
- position: 'right',
- textStyle: {
- color: 'white',
- fontSize: '16',
- }
- }
- },
- barWidth: 16,
- barMaxWidth:16,
- itemStyle: {
- normal: {
- color:function(params){
- var num = fault_myColor.length;
- return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- offset: 0,
- color: fault_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: fault_myColor2[params.dataIndex % num]
- }
- ])
- }
- // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- // offset: 0,
- // color: "#6f3d9e"
- // },
- // {
- // offset: 1,
- // color: "#3637a3"
- // }
- // ])
- }
- },
- z: 2
- },
- ]
- };;
- // 获取当月故障原因TOP5数据
- // --开始
- function getFaultData(time){
- let y=nowYear;
- let m=nowMonthOnly;
- if(Number(m)-1==0){
- y--
- m=12
- time={
- "start":y+"-"+m+"-01",
- "end":y+"-"+m+"-30"
- }
- }
- api_hkreport.incidentreport(time, 'incident_category_faultcause_top').then(function(res) {
- option_fault.yAxis[0].data=[];
- option_fault.series[0].data=[];
- var pieData=res.dataList;
- // if(pieData.length>6){
- // for(var i=0;i<5;i++){
- // if(pieData[i].reason=="其它问题(注解中说明)"){
- // pieData[i].reason="其它问题"
- // };
- // pieData[i].reason=pieData[i].reason.replace("问题","");
- // option_fault.yAxis[0].data.unshift(pieData[i].reason);
- // option_fault.series[0].data.unshift(pieData[i].sum)
- // }
- // }else{
- // for(var i=0;i<pieData.length;i++){
- // if(pieData[i].reason=="其它问题(注解中说明)"){
- // pieData[i].reason="其它问题"
- // };
- // pieData[i].reason=pieData[i].reason.replace("问题","");
- // pieData[i].reason=pieData[i].reason.replace("、","和");
- // option_fault.yAxis[0].data.unshift(pieData[i].reason);
- // option_fault.series[0].data.unshift(pieData[i].sum)
- // }
- // }
- // if(pieData.length>6){
- // for(var i=0;i<5;i++){
- // if(pieData[i].reason=="其它问题(注解中说明)"){
- // pieData[i].reason="其它问题"
- // };
- // pieData[i].reason=pieData[i].reason.replace("问题","");
- // option_fault.yAxis[0].data.unshift(pieData[i].reason);
- // option_fault.series[0].data.unshift(pieData[i].sum)
- // }
- // }else if(pieData.length==0){
- // option_fault.yAxis[0].data.unshift("电脑系统和程序");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("计算机病毒");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("系统故障");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("用户软件版本");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("联系不上");
- // option_fault.series[0].data.unshift(0);
- // }else if(pieData.length==1){
- // option_fault.yAxis[0].data.unshift("电脑系统和程序");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("计算机病毒");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("系统故障");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("用户软件版本");
- // option_fault.series[0].data.unshift(0);
- // }else if(pieData.length==2){
- // option_fault.yAxis[0].data.unshift("电脑系统和程序");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("计算机病毒");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("系统故障");
- // option_fault.series[0].data.unshift(0);
- // }else if(pieData.length==3){
- // option_fault.yAxis[0].data.unshift("电脑系统和程序");
- // option_fault.series[0].data.unshift(0);
- // option_fault.yAxis[0].data.unshift("计算机病毒");
- // option_fault.series[0].data.unshift(0);
- // }else if(pieData.length==4){
- // option_fault.yAxis[0].data.unshift("电脑系统和程序");
- // option_fault.series[0].data.unshift(0);
- // }else{
- // for(var i=0;i<pieData.length;i++){
- // if(pieData[i].reason=="其它问题(注解中说明)"){
- // pieData[i].reason="其它问题"
- // };
- // pieData[i].reason=pieData[i].reason.replace("问题","");
- // pieData[i].reason=pieData[i].reason.replace("、","和");
- // option_fault.yAxis[0].data.unshift(pieData[i].reason);
- // option_fault.series[0].data.unshift(pieData[i].sum)
- // }
- // }
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].reason=="其它问题(注解中说明)"){
- pieData[i].reason="其它问题"
- };
- pieData[i].reason=pieData[i].reason.replace("问题","");
- option_fault.yAxis[0].data.unshift(pieData[i].reason);
- option_fault.series[0].data.unshift(pieData[i].sum);
- }
- myChart_fault.setOption(option_fault);
- myChart_fault.hideLoading();
- })
- }
- getFaultData({
- // "start":nowMonth+"-01",
- // "end":nowDay
- "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- });
- // --结束
- // 当月事件来源占比
- var dom_source = document.getElementById("source");
- var myChart_source = echarts.init(dom_source);
- myChart_source.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_source = null;
- option_source = {
- // title: {
- // subtext: '0',
- // text: "事件总数(件)",
- // itemGap: 3,
- // "x": '50%',
- // "y": '40%',
- // textAlign: "center",
- // "textStyle": {
- // "fontWeight": 'normal',
- // "fontSize": 16,
- // "color": '#18f0ff',
- // },
- // "subtextStyle": {
- // "fontWeight": 'normal',
- // "fontSize": 22,
- // "color": 'white',
- // "lineHeight": 44
- // },
- // },
- grid: {
- top: '8%',
- left: '1%',
- right: '1%',
- bottom: '8%',
- containLabel: true,
- },
- legend: {
- orient: 'vertical',
- x: 'left',
- y: 'bottom',
- left:"23%",
- show:false,
- data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- textStyle: {
- color: 'white',
- borderColor: '#fff',
- fontSize:13,
- show:false
- },
- formatter: function(param) {
-
- },
- itemWidth:15,
- width:450,
- height:100,
- itemGap:20,
- },
- series: [
- {
- name:'访问来源',
- type:'pie',
- radius: ['35%', '60%'],
- center: ['50%', '50%'],
- avoidLabelOverlap: true,
- label: {
- align: 'left',
- normal: {
- show: true,
- position: 'outside',
- rich:"rich",
- formatter:function(param){
- // return param.name+'\n'+param.value+' '+param.percent+"%"
- return param.name+'\n'+param.percent+"%"
- },
- color:"rgba(255,255,255,0.6)"
- },
- // emphasis: {
- // show: false,
- // textStyle: {
- // fontSize: '30',
- // fontWeight: 'bold'
- // }
- // }
- },
- labelLine: {
- normal: {
- show: true
- }
- },
- data:[
- {value:335, name:'工作组1'},
- {value:310, name:'工作组2'},
- {value:234, name:'工作组3'},
- {value:135, name:'工作组4'},
- {value:1548, name:'工作组5'},
- {value:154, name:'工作组6'}
- ]
- }
- ],
- color:["#ecc625","#228ed7","#d0402f","#f98f3b","#118178","#c053d5"]
- };;
- // 获取当月事件来源占比数据
- // --开始
- function getSourceData(time){
- let y=nowYear;
- let m=nowMonthOnly;
- if(Number(m)-1==0){
- y--
- m=12
- time={
- "start":y+"-"+m+"-01",
- "end":y+"-"+m+"-30"
- }
- }
- api_hkreport.incidentreport(time, 'incident_source_pie').then(function(res) {
- option_source.legend.data=[];
- option_source.series[0].data=[];
- var allData=[];
- var allNum=0;
- for(var i=0;i<res.data[1].length;i++){
- if(res.data[1][i].count=="0"){
- delete res.data[1][i]
- }
- }
- for(var i=0;i<res.data[1].length;i++){
- if(res.data[1][i]){
- option_source.series[0].data.push({value:res.data[1][i].count,name:res.data[1][i].name});
- allNum+=Number(res.data[1][i].count)
- }
-
- }
- // option_source.title.subtext=allNum;
- myChart_source.setOption(option_source);
- myChart_source.hideLoading();
- })
- }
- getSourceData({
- // "startTime":nowMonth+"-01",
- // "endTime":nowDay
- "startTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- "endTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- });
- // --结束
- // 事件响应时长趋势
- var dom_response = document.getElementById("response");
- var myChart_response = echarts.init(dom_response);
- myChart_response.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var option_response = null;
- option_response={
- xAxis: {
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)"
- }
- },
- yAxis: {
- type: 'value',
- axisLabel:{
- color:"rgba(255,255,255,0.8)"
- },
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- },
- series: [{
- data: [40, 932, 901, 934, 1290, 1330, 1320],
- type: 'line',
- symbol:"circle",
- symbolSize:1,
- lineStyle:{
- color:"#0ca7a7"
- },
- label:{
- normal:{
- show:true,
- color:"#0ca7a7"
- }
-
- }
- }]
- }
- // 获取事件响应时长趋势
- // 开始
- function getResponseData(time){
- api_hkreport.incidentreport(time, 'incident_ops_efficiency_response').then(function(res) {
- option_response.xAxis.data=[];
- option_response.series[0].data=[];
- var pieData=res.graphlist;
- $scope.allResponseTime=0;
- for(var i=0;i<pieData.length;i++){
- option_response.xAxis.data.push(pieData[i].accdate.slice(5,pieData[i].accdate.length));
- option_response.series[0].data.push(pieData[i].responsetime);
- $scope.allResponseTime+=Number(pieData[i].responsetime)
- }
- $scope.allResponseAverageTime=Math.round($scope.allResponseTime/7);
- myChart_response.setOption(option_response);
- myChart_response.hideLoading();
- })
- }
- getResponseData({
- "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
- "end":nowDay
- });
- // 结束
- // 事件解决时长趋势
- var dom_woll = document.getElementById("woll");
- var myChart_woll = echarts.init(dom_woll);
- myChart_woll.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var option_woll = null;
- option_woll={
- xAxis: {
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)"
- }
- },
- yAxis: {
- type: 'value',
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)"
- },
- },
- series: [{
- data: [820, 932, 901, 934, 1290, 1330, 1320],
- type: 'line',
- symbol:"circle",
- symbolSize:1,
- lineStyle:{
- color:"#f98f3b"
- },
- label:{
- normal:{
- show:true,
- color:"#f98f3b"
- }
-
- }
- }]
- }
- // 获取事件解决时长趋势
- // 开始
- function getWollData(time){
- api_hkreport.incidentreport(time, 'incident_ops_efficiency_solve').then(function(res) {
- option_woll.xAxis.data=[];
- option_woll.series[0].data=[];
- var pieData=res.graphlist;
- $scope.allSolveAverageTime=0;
- $scope.chushu=0;
- for(var i=0;i<pieData.length;i++){
- option_woll.xAxis.data.push(pieData[i].accdate.slice(5,pieData[i].accdate.length));
- option_woll.series[0].data.push(pieData[i].responsetime);
- $scope.allSolveAverageTime+=Number(pieData[i].responsetime);
- $scope.chushu++
- };
- $scope.solveAverageTime=Math.round($scope.allSolveAverageTime/$scope.chushu);
- myChart_woll.setOption(option_woll);
- myChart_woll.hideLoading();
- })
- }
- getWollData({
- "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
- "end":nowDay
- });
- // 结束
- // 词云图开始
- TagCanvas.Start('myCanvas', 'tags', {
- textColour: '',
- // outlineColour: '#fff',
- weight:true,
- reverse: true,
- depth: 0.8,
- dragControl: true,
- decel:0.95,
- maxSpeed: 0.05,
- initial: [-0.2, 0]
- });
- // 词云图结束
- // 近五年事件统计
- var incidentFiveAll_myColor = [ 'rgba(249,143,59,1)','rgba(236,198,37,1)', 'rgba(249,143,59,1)','rgba(236,198,37,1)', 'rgba(249,143,59,1)' ];
- var incidentFiveAll_myColor2 = ['rgba(249,143,59,0)','rgba(236,198,37,0)', 'rgba(249,143,59,0)','rgba(236,198,37,0)','rgba(249,143,59,0)' ];
- var dom_incidentFiveAll = document.getElementById("incidentFiveAll");
- var myChart_incidentFiveAll = echarts.init(dom_incidentFiveAll);
- myChart_incidentFiveAll.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFiveAll = null;
- option_incidentFiveAll = {
- grid: {
- left: '5%',
- top: '12%',
- right: '8%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white"
- }
- },
- type: 'bar',
- itemStyle: {
- normal: {
- color:function(params){
- var num = incidentFiveAll_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFiveAll_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFiveAll_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- },
- z: 2
- },
- ]
- };;
- // 获取近五年事件数据
- // --开始
- function getiIncidentFiveAllData(time){
- api_hkreport.incidentreport(time, 'incident_trend_hk').then(function(res) {
- for(var i=0;i<res.quantityStatistics.length;i++){
- if(res.quantityStatistics[i].category=="统一认证及信息系统"){
- res.quantityStatistics[i].category="信息系统"
- }
- }
- $scope.fenlei=res.quantityStatistics || [];
- var pieData=res.quantityStatisticsList || [];
- // 近五年事件统计
- option_incidentFiveAll.xAxis[0].data=[];
- option_incidentFiveAll.series[0].data=[];
- $scope.incidentFiveNumAll=0;
- for(var i=0;i<pieData.length;i++){
- option_incidentFiveAll.xAxis[0].data.push(pieData[i].date);
- option_incidentFiveAll.series[0].data.push(pieData[i].sum);
- $scope.incidentFiveNumAll+=Number(pieData[i].sum)
- }
- myChart_incidentFiveAll.setOption(option_incidentFiveAll);
- myChart_incidentFiveAll.hideLoading();
- // 近五年事件分类占比雷达图
- option_classification.legend.data=[];
- option_classification.radar.indicator=[];
- option_classification.series[0].data=[];
- var all_category = $scope.fenlei.map(function(v){return 0});
- for(var i=0;i<pieData.length;i++){
- // all_category0+=Number(pieData[i].category0);
- // all_category1+=Number(pieData[i].category1);
- // all_category2+=Number(pieData[i].category2);
- // all_category3+=Number(pieData[i].category3);
- // all_category4+=Number(pieData[i].category4);
- if(all_category[i] < Number(pieData[i]['category' + i])){
- all_category[i] = Number(pieData[i]['category' + i]);
- }
- // if(all_category1 < Number(pieData[i].category1)){
- // all_category1 = Number(pieData[i].category1)
- // }
- // if(all_category2 < Number(pieData[i].category2)){
- // all_category2 = Number(pieData[i].category2)
- // }
- // if(all_category3 < Number(pieData[i].category3)){
- // all_category3 = Number(pieData[i].category3)
- // }
- // if(all_category4 < Number(pieData[i].category4)){
- // all_category4= Number(pieData[i].category4)
- // }
- }
- // console.log(all_category0);
- // console.log(all_category1);
- // console.log(all_category2);
- // console.log(all_category3);
- // console.log(all_category4);
- for(var i=0;i<pieData.length;i++){
- option_classification.legend.data.push(pieData[i].date)
- }
- for(var i=0;i<$scope.fenlei.length;i++){
- option_classification.radar.indicator.push({"name":$scope.fenlei[i].category,"max":all_category[i]});
- }
- // option_classification.radar.indicator.push({"name":$scope.fenlei[0].category,"max":all_category0});
- // option_classification.radar.indicator.push({"name":$scope.fenlei[1].category,"max":all_category1});
- // option_classification.radar.indicator.push({"name":$scope.fenlei[2].category,"max":all_category2});
- // option_classification.radar.indicator.push({"name":$scope.fenlei[3].category,"max":all_category3});
- // option_classification.radar.indicator.push({"name":$scope.fenlei[4].category,"max":all_category4});
- for(var i=0;i<pieData.length;i++){
- option_classification.series[0].data.push({value:[pieData[i].category0,pieData[i].category1,pieData[i].category2,pieData[i].category3,pieData[i].category4],"name":pieData[i].date})
- }
- myChart_classification.setOption(option_classification);
- myChart_classification.hideLoading();
- // // 近五年事件分类1
- // option_classification1.legend.data=[];
- // option_classification1.series[0].data=[];
- // var all_category0=0;
- // var all_category1=0;
- // var all_category2=0;
- // var all_category3=0;
- // var all_category4=0;
- // for(var i=0;i<pieData.length;i++){
- // all_category0+=Number(pieData[i].category0);
- // all_category1+=Number(pieData[i].category1);
- // all_category2+=Number(pieData[i].category2);
- // all_category3+=Number(pieData[i].category3);
- // all_category4+=Number(pieData[i].category4);
- // }
- // option_classification1.series[0].data.push({value:all_category0,name:$scope.fenlei[0].category});
- // option_classification1.series[0].data.push({value:all_category1,name:$scope.fenlei[1].category});
- // option_classification1.series[0].data.push({value:all_category2,name:$scope.fenlei[2].category});
- // option_classification1.series[0].data.push({value:all_category3,name:$scope.fenlei[3].category});
- // option_classification1.series[0].data.push({value:all_category4,name:$scope.fenlei[4].category});
- // myChart_classification1.setOption(option_classification1);
- // myChart_classification1.hideLoading();
- // // 近五年事件分类2
- // option_classification2.legend.data=[];
- // option_classification2.series[0].data=[];
- // option_classification2.series[0].data.push({value:pieData[4].category0,name:$scope.fenlei[0].category});
- // option_classification2.series[0].data.push({value:pieData[4].category1,name:$scope.fenlei[1].category});
- // option_classification2.series[0].data.push({value:pieData[4].category2,name:$scope.fenlei[2].category});
- // option_classification2.series[0].data.push({value:pieData[4].category3,name:$scope.fenlei[3].category});
- // option_classification2.series[0].data.push({value:pieData[4].category4,name:$scope.fenlei[4].category});
- // myChart_classification2.setOption(option_classification2);
- // myChart_classification2.hideLoading();
- // // 近五年事件分类3
- // option_classification3.legend.data=[];
- // option_classification3.series[0].data=[];
- // option_classification3.series[0].data.push({value:pieData[3].category0,name:$scope.fenlei[0].category});
- // option_classification3.series[0].data.push({value:pieData[3].category1,name:$scope.fenlei[1].category});
- // option_classification3.series[0].data.push({value:pieData[3].category2,name:$scope.fenlei[2].category});
- // option_classification3.series[0].data.push({value:pieData[3].category3,name:$scope.fenlei[3].category});
- // option_classification3.series[0].data.push({value:pieData[3].category4,name:$scope.fenlei[4].category});
- // myChart_classification3.setOption(option_classification3);
- // myChart_classification3.hideLoading();
- // // 近五年事件分类4
- // option_classification4.legend.data=[];
- // option_classification4.series[0].data=[];
- // option_classification4.series[0].data.push({value:pieData[2].category0,name:$scope.fenlei[0].category});
- // option_classification4.series[0].data.push({value:pieData[2].category1,name:$scope.fenlei[1].category});
- // option_classification4.series[0].data.push({value:pieData[2].category2,name:$scope.fenlei[2].category});
- // option_classification4.series[0].data.push({value:pieData[2].category3,name:$scope.fenlei[3].category});
- // option_classification4.series[0].data.push({value:pieData[2].category4,name:$scope.fenlei[4].category});
- // myChart_classification4.setOption(option_classification4);
- // myChart_classification4.hideLoading();
- // // 近五年事件分类5
- // option_classification5.legend.data=[];
- // option_classification5.series[0].data=[];
- // option_classification5.series[0].data.push({value:pieData[1].category0,name:$scope.fenlei[0].category});
- // option_classification5.series[0].data.push({value:pieData[1].category1,name:$scope.fenlei[1].category});
- // option_classification5.series[0].data.push({value:pieData[1].category2,name:$scope.fenlei[2].category});
- // option_classification5.series[0].data.push({value:pieData[1].category3,name:$scope.fenlei[3].category});
- // option_classification5.series[0].data.push({value:pieData[1].category4,name:$scope.fenlei[4].category});
- // myChart_classification5.setOption(option_classification5);
- // myChart_classification5.hideLoading();
- // // 近五年事件分类6
- // option_classification6.legend.data=[];
- // option_classification6.series[0].data=[];
- // option_classification6.series[0].data.push({value:pieData[0].category0,name:$scope.fenlei[0].category});
- // option_classification6.series[0].data.push({value:pieData[0].category1,name:$scope.fenlei[1].category});
- // option_classification6.series[0].data.push({value:pieData[0].category2,name:$scope.fenlei[2].category});
- // option_classification6.series[0].data.push({value:pieData[0].category3,name:$scope.fenlei[3].category});
- // option_classification6.series[0].data.push({value:pieData[0].category4,name:$scope.fenlei[4].category});
- // myChart_classification6.setOption(option_classification6);
- // myChart_classification6.hideLoading();
- // // 近五年事件分类7
- // option_classification7.legend.data=[];
- // option_classification7.series[0].data=[];
- // var all_category0_bf=0;
- // var all_category1_bf=0;
- // var all_category2_bf=0;
- // var all_category3_bf=0;
- // var all_category4_bf=0;
- // for(var i=0;i<pieData.length;i++){
- // all_category0_bf+=Number(pieData[i].category0);
- // all_category1_bf+=Number(pieData[i].category1);
- // all_category2_bf+=Number(pieData[i].category2);
- // all_category3_bf+=Number(pieData[i].category3);
- // all_category4_bf+=Number(pieData[i].category4);
- // }
- // option_classification7.series[0].data.push({value:all_category0_bf,name:$scope.fenlei[0].category});
- // option_classification7.series[0].data.push({value:all_category1_bf,name:$scope.fenlei[1].category});
- // option_classification7.series[0].data.push({value:all_category2_bf,name:$scope.fenlei[2].category});
- // option_classification7.series[0].data.push({value:all_category3_bf,name:$scope.fenlei[3].category});
- // option_classification7.series[0].data.push({value:all_category4_bf,name:$scope.fenlei[4].category});
- // myChart_classification7.setOption(option_classification7);
- // myChart_classification7.hideLoading();
- // 近五年事件分类同比增幅1
- // option_incidentFivePecent1.xAxis[0].data=[];
- // option_incidentFivePecent1.series[0].data=[];
- // var pieData=res.quantityStatisticsList;
- // for(var i=0;i<pieData.length;i++){
- // if(pieData[i].date=="2015"){
- // pieData[i].allzzl="100"
- // }
- // if(pieData[i].allzzl=="-"){
- // pieData[i].allzzl="0"
- // }
- // option_incidentFivePecent1.xAxis[0].data.push(pieData[i].date);
- // option_incidentFivePecent1.series[0].data.push(pieData[i].allzzl)
- // }
- // myChart_incidentFivePecent1.setOption(option_incidentFivePecent1);
- // myChart_incidentFivePecent1.hideLoading();
- // 近五年事件分类同比增幅2
- option_incidentFivePecent2.xAxis[0].data=[];
- option_incidentFivePecent2.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl0="100"
- }
- if(pieData[i].zzl0=="-"){
- pieData[i].zzl0="0"
- }
- option_incidentFivePecent2.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent2.series[0].data.push(pieData[i].zzl0)
- }
- myChart_incidentFivePecent2.setOption(option_incidentFivePecent2);
- myChart_incidentFivePecent2.hideLoading();
- // 近五年事件分类同比增幅3
- option_incidentFivePecent3.xAxis[0].data=[];
- option_incidentFivePecent3.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl1="100"
- }
- if(pieData[i].zzl1=="-"){
- pieData[i].zzl1="0"
- }
- option_incidentFivePecent3.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent3.series[0].data.push(pieData[i].zzl1)
- }
- myChart_incidentFivePecent3.setOption(option_incidentFivePecent3);
- myChart_incidentFivePecent3.hideLoading();
- // 近五年事件分类同比增幅4
- option_incidentFivePecent4.xAxis[0].data=[];
- option_incidentFivePecent4.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl2="100"
- }
- if(pieData[i].zzl2=="-"){
- pieData[i].zzl2="0"
- }
- option_incidentFivePecent4.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent4.series[0].data.push(pieData[i].zzl2)
- }
- myChart_incidentFivePecent4.setOption(option_incidentFivePecent4);
- myChart_incidentFivePecent4.hideLoading();
- // 近五年事件分类同比增幅5
- option_incidentFivePecent5.xAxis[0].data=[];
- option_incidentFivePecent5.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl3="100"
- }
- if(pieData[i].zzl3=="-"){
- pieData[i].zzl3="0"
- }
- option_incidentFivePecent5.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent5.series[0].data.push(pieData[i].zzl3)
- }
- myChart_incidentFivePecent5.setOption(option_incidentFivePecent5);
- myChart_incidentFivePecent5.hideLoading();
- // 近五年事件分类同比增幅6
- option_incidentFivePecent6.xAxis[0].data=[];
- option_incidentFivePecent6.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl4="100"
- }
- if(pieData[i].zzl4=="-"){
- pieData[i].zzl4="0"
- }
- option_incidentFivePecent6.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent6.series[0].data.push(pieData[i].zzl4)
- }
- myChart_incidentFivePecent6.setOption(option_incidentFivePecent6);
- myChart_incidentFivePecent6.hideLoading();
- // 近五年事件分类同比增幅7
- // option_incidentFivePecent7.xAxis[0].data=[];
- // option_incidentFivePecent7.series[0].data=[];
- // var pieData=res.quantityStatisticsList;
- // for(var i=0;i<pieData.length;i++){
- // if(pieData[i].date=="2015"){
- // pieData[i].allzzl="100"
- // }
- // if(pieData[i].allzzl=="-"){
- // pieData[i].allzzl="0"
- // }
- // option_incidentFivePecent7.xAxis[0].data.push(pieData[i].date);
- // option_incidentFivePecent7.series[0].data.push(pieData[i].allzzl)
- // }
- // myChart_incidentFivePecent7.setOption(option_incidentFivePecent7);
- // myChart_incidentFivePecent7.hideLoading();
- option_incidentFivePecent7.xAxis[0].data=[];
- option_incidentFivePecent7.series[0].data=[];
- var pieData=res.quantityStatisticsList;
- for(var i=0;i<pieData.length;i++){
- if(pieData[i].date=="2015"){
- pieData[i].zzl0="100"
- }
- if(pieData[i].zzl0=="-"){
- pieData[i].zzl0="0"
- }
- option_incidentFivePecent7.xAxis[0].data.push(pieData[i].date);
- option_incidentFivePecent7.series[0].data.push(pieData[i].zzl0)
- }
- myChart_incidentFivePecent7.setOption(option_incidentFivePecent7);
- myChart_incidentFivePecent7.hideLoading();
- })
- }
- getiIncidentFiveAllData({
- "start":fiveYearAgo,
- "end":nowYear
- });
- // --结束
- // 近五年事件分类同比增幅
- var incidentFivePecent_myColor = [ 'rgba(12,167,167,1)','rgba(73,161,221,1)', 'rgba(12,167,167,1)','rgba(73,161,221,1)', 'rgba(12,167,167,1)' ];
- var incidentFivePecent_myColor2 = ['rgba(12,167,167,0)','rgba(73,161,221,0)', 'rgba(12,167,167,0)','rgba(73,161,221,0)','rgba(12,167,167,0)' ];
- // 1
- // var dom_incidentFivePecent1 = document.getElementById("incidentFivePecent1");
- // var myChart_incidentFivePecent1 = echarts.init(dom_incidentFivePecent1);
- // myChart_incidentFivePecent1.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_incidentFivePecent1 = null;
- // option_incidentFivePecent1 = {
- // grid: {
- // left: '6%',
- // top: '7%',
- // right: '6%',
- // bottom: '2%',
- // containLabel: true
- // },
- // xAxis: [{
- // axisLine:{
- // lineStyle:{
- // color:"rgba(255,255,255,0.5)"
- // }
- // },
- // axisTick:{
- // show:false
- // },
- // show :true,
- // offset: '27',
- // axisLabel: {
- // textStyle: {
- // color:"rgba(255,255,255,0.8)",
- // fontSize: '16',
- // }
- // },
- // data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- // type: 'category',
- // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- // }],
- // yAxis: [{
- // axisLine:{
- // show:false,
- // lineStyle:{
- // color:"rgba(255,255,255,0.5)"
- // }
- // },
- // axisTick:{
- // show:false
- // },
- // splitLine:{
- // show:true,
- // lineStyle:{
- // type:'dotted',
- // color:"rgba(255,255,255,0.3)"
- // }
- // },
- // axisLabel:{
- // color:"rgba(255,255,255,0.8)",
- // formatter:function(params){
- // return params+"%"
- // }
- // },
- // type: 'value'
- // },
- // ],
- // series: [{
- // barWidth: 32,
- // barMaxWidth:32,
- // data: [120, 200, 150, 80, 70, 110, 130],
- // type: 'bar',
- // // markPoint: {
- // // data: [
- // // {type: 'max', name: '最大值'},
- // // {type: 'min', name: '最小值'}
- // // ],
- // // label:{
- // // show:true,
- // // fontWeight:"normal",
- // // fontSize:12,
- // // color:"white"
- // // }
- // // },
- // itemStyle: {
- // normal: {
- // color:function(params){
- // if(Number(params.data)<0){
- // var num = incidentFivePecent_myColor.length;
- // return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- // offset: 0,
- // color: incidentFivePecent_myColor[params.dataIndex % num]
- // },
- // {
- // offset: 1,
- // color: incidentFivePecent_myColor2[params.dataIndex % num]
- // }
- // ])
- // }else{
- // var num = incidentFivePecent_myColor.length;
- // return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- // offset: 0,
- // color: incidentFivePecent_myColor[params.dataIndex % num]
- // },
- // {
- // offset: 1,
- // color: incidentFivePecent_myColor2[params.dataIndex % num]
- // }
- // ])
- // }
- // }
- // }
- // },
- // z: 2
- // },
- // ]
- // };
- // 2
- var dom_incidentFivePecent2 = document.getElementById("incidentFivePecent2");
- var myChart_incidentFivePecent2 = echarts.init(dom_incidentFivePecent2);
- myChart_incidentFivePecent2.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent2 = null;
- option_incidentFivePecent2 = {
- grid: {
- left: '6%',
- top: '7%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 3
- var dom_incidentFivePecent3 = document.getElementById("incidentFivePecent3");
- var myChart_incidentFivePecent3 = echarts.init(dom_incidentFivePecent3);
- myChart_incidentFivePecent3.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent3 = null;
- option_incidentFivePecent3 = {
- grid: {
- left: '6%',
- top: '7%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 4
- var dom_incidentFivePecent4 = document.getElementById("incidentFivePecent4");
- var myChart_incidentFivePecent4 = echarts.init(dom_incidentFivePecent4);
- myChart_incidentFivePecent4.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent4 = null;
- option_incidentFivePecent4 = {
- grid: {
- left: '6%',
- top: '7%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 5
- var dom_incidentFivePecent5 = document.getElementById("incidentFivePecent5");
- var myChart_incidentFivePecent5 = echarts.init(dom_incidentFivePecent5);
- myChart_incidentFivePecent5.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent5 = null;
- option_incidentFivePecent5 = {
- grid: {
- left: '6%',
- top: '7%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- symbol:'arrow',
- symbolSize:1,
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 6
- var dom_incidentFivePecent6 = document.getElementById("incidentFivePecent6");
- var myChart_incidentFivePecent6 = echarts.init(dom_incidentFivePecent6);
- myChart_incidentFivePecent6.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent6 = null;
- option_incidentFivePecent6 = {
- grid: {
- left: '6%',
- top: '7%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
- // distance:10,
- offset:[0,5],
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 7
- var dom_incidentFivePecent7 = document.getElementById("incidentFivePecent7");
- var myChart_incidentFivePecent7 = echarts.init(dom_incidentFivePecent7);
- myChart_incidentFivePecent7.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_incidentFivePecent7 = null;
- option_incidentFivePecent7 = {
- grid: {
- left: '6%',
- top: '12%',
- right: '6%',
- bottom: '2%',
- containLabel: true
- },
- xAxis: [{
- axisLine:{
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- show :true,
- offset: '27',
- axisLabel: {
- textStyle: {
- color:"rgba(255,255,255,0.8)",
- fontSize: '16',
- }
- },
- data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }],
- yAxis: [{
- axisLine:{
- show:false,
- lineStyle:{
- color:"rgba(255,255,255,0.5)"
- }
- },
- axisTick:{
- show:false
- },
- splitLine:{
- show:true,
- lineStyle:{
- type:'dotted',
- color:"rgba(255,255,255,0.3)"
- }
- },
- axisLabel:{
- color:"rgba(255,255,255,0.8)",
- formatter:function(params){
- return params+"%"
- }
- },
- type: 'value'
- },
- ],
- series: [{
- barWidth: 32,
- barMaxWidth:32,
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'bar',
- markPoint: {
- data: [
- {type: 'max', name: '最大值'},
- {type: 'min', name: '最小值'}
- ],
- label:{
- show:true,
- fontWeight:"normal",
- fontSize:12,
- color:"white",
- position:"insideBottom",
-
- // position:[20,20],
- formatter:"{c}%"
- }
- },
- itemStyle: {
- normal: {
- color:function(params){
- if(Number(params.data)<0){
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }else{
- var num = incidentFivePecent_myColor.length;
- return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: incidentFivePecent_myColor[params.dataIndex % num]
- },
- {
- offset: 1,
- color: incidentFivePecent_myColor2[params.dataIndex % num]
- }
- ])
- }
- }
- }
- },
- z: 2
- },
- ]
- };
- // 近五年事件分类占比雷达图
- var dom_classification = document.getElementById("classification");
- var myChart_classification = echarts.init(dom_classification);
- myChart_classification.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- var app = {};
- var option_classification = null;
- option_classification = {
- tooltip: {},
- legend: {
- data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)'],
- width:100,
- right:10,
- bottom:10,
- textStyle:{
- color:"white"
- },
- itemHeight:5
- },
- radar: {
- // shape: 'circle',
- name: {
- textStyle: {
- color: 'rgba(255,255,255,0.5)',
- // backgroundColor: '#999',
- borderRadius: 3,
- padding: [3, 5]
- }
- },
- splitLine:{
- show:true,
- lineStyle:{
- color:'rgba(255,255,255,0.3)'
- }
- },
- axisLine:{
- lineStyle:{
- color:'rgba(255,255,255,0.3)'
- }
- },
- splitArea:{
- show:false
- },
- center:['40%','50%'],
- indicator: [
- { name: '销售(sales)', max: 6500},
- { name: '管理(Administration)', max: 16000},
- { name: '信息技术(Information Techology)', max: 30000},
- { name: '客服(Customer Support)', max: 38000},
- { name: '研发(Development)', max: 52000},
- { name: '市场(Marketing)', max: 25000}
- ]
- },
- series: [{
- name: '预算 vs 开销(Budget vs spending)',
- type: 'radar',
- symbol:'none',
- data : [
- {
- value : [4300, 10000, 28000, 35000, 50000, 19000],
- name : '预算分配(Allocated Budget)'
- },
- {
- value : [5000, 14000, 28000, 31000, 42000, 21000],
- name : '实际开销(Actual Spending)'
- }
- ]
- }],
- color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- };;
- // // 近五年事件分类占比
- // // 1
- // var dom_classification1 = document.getElementById("classification1");
- // var myChart_classification1 = echarts.init(dom_classification1);
- // myChart_classification1.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification1 = null;
- // option_classification1 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // return param.name+'\n'+param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 2
- // var dom_classification2 = document.getElementById("classification2");
- // var myChart_classification2 = echarts.init(dom_classification2);
- // myChart_classification2.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification2 = null;
- // option_classification2 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 3
- // var dom_classification3 = document.getElementById("classification3");
- // var myChart_classification3 = echarts.init(dom_classification3);
- // myChart_classification3.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification3 = null;
- // option_classification3 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 4
- // var dom_classification4 = document.getElementById("classification4");
- // var myChart_classification4 = echarts.init(dom_classification4);
- // myChart_classification4.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification4 = null;
- // option_classification4 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 5
- // var dom_classification5 = document.getElementById("classification5");
- // var myChart_classification5 = echarts.init(dom_classification5);
- // myChart_classification5.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification5 = null;
- // option_classification5 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 6
- // var dom_classification6 = document.getElementById("classification6");
- // var myChart_classification6 = echarts.init(dom_classification6);
- // myChart_classification6.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification6 = null;
- // option_classification6 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- // // 7
- // var dom_classification7 = document.getElementById("classification7");
- // var myChart_classification7 = echarts.init(dom_classification7);
- // myChart_classification7.showLoading({
- // text: '数据加载中...',
- // color: '#c23531',
- // textColor: '#fff',
- // maskColor: 'rgba(255,255,255,0)',
- // zlevel: 0
- // });
- // var app = {};
- // var option_classification7 = null;
- // option_classification7 = {
- // // title: {
- // // subtext: '0',
- // // text: "事件总数(件)",
- // // itemGap: 3,
- // // "x": '50%',
- // // "y": '40%',
- // // textAlign: "center",
- // // "textStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 16,
- // // "color": '#18f0ff',
- // // },
- // // "subtextStyle": {
- // // "fontWeight": 'normal',
- // // "fontSize": 22,
- // // "color": 'white',
- // // "lineHeight": 44
- // // },
- // // },
- // grid: {
- // top: '13%',
- // left: '1%',
- // right: '1%',
- // bottom: '8%',
- // containLabel: true,
- // },
- // legend: {
- // orient: 'vertical',
- // x: 'left',
- // y: 'bottom',
- // left:"23%",
- // show:false,
- // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
- // textStyle: {
- // color: 'white',
- // borderColor: '#fff',
- // fontSize:13,
- // show:false
- // },
- // formatter: function(param) {
-
- // },
- // itemWidth:15,
- // width:450,
- // height:100,
- // itemGap:20,
- // },
- // series: [
- // {
- // name:'访问来源',
- // type:'pie',
- // radius: ['40%', '70%'],
- // center: ['50%', '50%'],
- // avoidLabelOverlap: true,
- // label: {
- // align: 'left',
- // normal: {
- // show: true,
- // position: 'outside',
- // rich:"rich",
- // formatter:function(param){
- // // console.log(param)
- // // return param.value+' '+param.percent+"%"
- // return param.name+'\n'+param.percent+"%"
- // },
- // color:"rgba(255,255,255,0.6)"
- // },
- // // emphasis: {
- // // show: false,
- // // textStyle: {
- // // fontSize: '30',
- // // fontWeight: 'bold'
- // // }
- // // }
- // },
- // labelLine: {
- // normal: {
- // show: true
- // }
- // },
- // data:[
- // {value:335, name:'工作组1'},
- // {value:310, name:'工作组2'},
- // {value:234, name:'工作组3'},
- // {value:135, name:'工作组4'},
- // {value:1548, name:'工作组5'},
- // {value:154, name:'工作组6'}
- // ]
- // }
- // ],
- // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
- // };;
- $scope.incidentFivePecentBoxTabList=0;
- $scope.classificationBoxTabList=0;
- $scope.incidentFivePecentBoxChartsList=1;
- $scope.classificationBoxChartsList=1;
- $scope.timerToChange=$interval(function(){
- $scope.incidentFivePecentBoxTabList++;
- $scope.classificationBoxTabList++;
- if($scope.incidentFivePecentBoxTabList==5){
- $scope.incidentFivePecentBoxTabList=0;
- };
- if($scope.classificationBoxTabList==6){
- $scope.classificationBoxTabList=0;
- };
- var l="-"+920*$scope.incidentFivePecentBoxChartsList+"px";
- $('.incidentFivePecentFlex:eq(0)').animate({left:l},0,function(){
- if($scope.incidentFivePecentBoxChartsList==5){
- $(this).css('left',0);
- $scope.incidentFivePecentBoxChartsList=1;
- }else{
- $scope.incidentFivePecentBoxChartsList++;
- }
- });
- var k="-"+464*$scope.classificationBoxChartsList+"px";
- $('.classificationFlex:eq(0)').animate({left:k},0,function(){
- if($scope.classificationBoxChartsList==6){
- $(this).css('left',0);
- $scope.classificationBoxChartsList=1;
- }else{
- $scope.classificationBoxChartsList++;
- }
- });
- },3000);
- $scope.timeToRefresh=$interval(function(){
- // getSatisfiedData({
- // // "start":nowMonth+"-01",
- // // "end":nowDay
- // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- // });
- // getPeopleOnTimeData({
- // // "start":nowMonth+"-01",
- // // "end":nowDay
- // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- // });
- // getFaultData({
- // // "start":nowMonth+"-01",
- // // "end":nowDay
- // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- // });
- // getSourceData({
- // // "startTime":nowMonth+"-01",
- // // "endTime":nowDay
- // "startTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
- // "endTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
- // });
- getResponseData({
- "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
- "end":nowDay
- });
- getWollData({
- "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
- "end":nowDay
- });
- getiIncidentFiveAllData({
- "start":fiveYearAgo,
- "end":nowYear
- });
- },300000);
- $scope.$on('destroy',function(){
- $interval.cancel($scope.timerToChange);
- $interval.cancel($scope.timeToRefresh)
- })
- }]);
|