123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955 |
- '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)
- }
- }
- 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').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_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);
- if(all_category0 < Number(pieData[i].category0)){
- all_category0 = Number(pieData[i].category0)
- }
- 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)
- }
- 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)
- })
- }]);
|