charts4.js 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955
  1. 'use strict';
  2. app.controller('charts4Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$interval", "$http", "$cookieStore", "Restangular", "api_hkreport", function($scope, $rootScope, $state, $timeout, $interval, $http, $cookieStore, Restangular, api_hkreport) {
  3. // 获取当前时间
  4. $interval(function(){
  5. $scope.jry_year=new Date().getFullYear();//获取当前年份
  6. $scope.jry_month=new Date().getMonth()+1;//获取当前月份
  7. $scope.jry_data=new Date().getDate();//获取当前日号
  8. $scope.jry_hours=new Date().getHours();//获取当前小时
  9. $scope.jry_minute=new Date().getMinutes();//获取当前分钟
  10. $scope.jry_second=new Date().getSeconds();//获取当前秒
  11. var jry_week_index=new Date().getDay();//获取当前星期索引
  12. var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
  13. $scope.jry_week=weekday[jry_week_index];//获取当前星期几
  14. $scope.getMinute=function(res){
  15. if(Number(res)<10){
  16. return "0"+res
  17. }else{
  18. return res
  19. }
  20. }
  21. $scope.getSecond=function(res){
  22. if(Number(res)<10){
  23. return "0"+res
  24. }else{
  25. return res
  26. }
  27. }
  28. },1000);
  29. // 调用数据
  30. var nowYear=moment(new Date().getTime()).format('YYYY');
  31. var nowMonth=moment(new Date().getTime()).format('YYYY-MM');
  32. var nowMonthOnly=moment(new Date().getTime()).format('MM');
  33. var fiveYearAgo=String(Number(nowYear-4));
  34. var nowDay=moment(new Date().getTime()).format("YYYY-MM-DD");
  35. var seventDayAgo=moment(new Date().getTime() - 86400000*30).format("YYYY-MM-DD");
  36. // 当月满意度TOP5
  37. 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)' ];
  38. 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)'];
  39. var dom_satisfied = document.getElementById("satisfied");
  40. var myChart_satisfied = echarts.init(dom_satisfied);
  41. myChart_satisfied.showLoading({  
  42. text: '数据加载中...',
  43. color: '#c23531',
  44. textColor: '#fff',
  45. maskColor: 'rgba(255,255,255,0)',
  46. zlevel: 0
  47. });
  48. var app = {};
  49. var option_satisfied = null;
  50. option_satisfied = {
  51. grid: {
  52. left: '11%',
  53. top: '4%',
  54. right: '13%',
  55. bottom: '2%',
  56. containLabel: true
  57. },
  58. xAxis: [{
  59. show: false,
  60. }],
  61. yAxis: [{
  62. axisTick: 'none',
  63. axisLine: 'none',
  64. show :true,
  65. offset: '27',
  66. axisLabel: {
  67. textStyle: {
  68. color: 'white',
  69. fontSize: '16',
  70. }
  71. },
  72. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
  73. },
  74. ],
  75. series: [{
  76. name: '条',
  77. type: 'bar',
  78. yAxisIndex: 0,
  79. data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
  80. label: {
  81. normal: {
  82. show: true,
  83. position: 'right',
  84. textStyle: {
  85. color: 'white',
  86. fontSize: '16',
  87. },
  88. formatter:"{c}%"
  89. }
  90. },
  91. barWidth: 16,
  92. barMaxWidth:16,
  93. itemStyle: {
  94. normal: {
  95. color:function(params){
  96. var num = satisfied_myColor.length;
  97. return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
  98. offset: 0,
  99. color: satisfied_myColor[params.dataIndex % num]
  100. },
  101. {
  102. offset: 1,
  103. color: satisfied_myColor2[params.dataIndex % num]
  104. }
  105. ])
  106. }
  107. }
  108. },
  109. z: 2
  110. },
  111. ]
  112. };;
  113. // 获取当月满意度TOP5数据
  114. // --开始
  115. function getSatisfiedData(time){
  116. let y=nowYear;
  117. let m=nowMonthOnly;
  118. if(Number(m)-1==0){
  119. y--
  120. m=12
  121. time={
  122. "start":y+"-"+m+"-01",
  123. "end":y+"-"+m+"-30"
  124. }
  125. }
  126. api_hkreport.incidentreport(time, 'large_screen_degree_top').then(function(res) {
  127. option_satisfied.yAxis[0].data=[];
  128. option_satisfied.series[0].data=[];
  129. var pieData=res.data;
  130. for(var i=0;i<pieData.length;i++){
  131. option_satisfied.yAxis[0].data.unshift(pieData[i].name);
  132. option_satisfied.series[0].data.unshift(pieData[i].degree)
  133. }
  134. myChart_satisfied.setOption(option_satisfied);
  135. myChart_satisfied.hideLoading();
  136. })
  137. }
  138. getSatisfiedData({
  139. "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  140. "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  141. // "start":nowMonth+"-01",
  142. // "end":nowDay
  143. });
  144. // --结束
  145. // 当月人员按时解决率TOP5
  146. 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)' ];
  147. 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)'];
  148. var dom_peopleOnTime = document.getElementById("peopleOnTime");
  149. var myChart_peopleOnTime = echarts.init(dom_peopleOnTime);
  150. myChart_peopleOnTime.showLoading({  
  151. text: '数据加载中...',
  152. color: '#c23531',
  153. textColor: '#fff',
  154. maskColor: 'rgba(255,255,255,0)',
  155. zlevel: 0
  156. });
  157. var app = {};
  158. var option_peopleOnTime = null;
  159. option_peopleOnTime = {
  160. grid: {
  161. left: '11%',
  162. top: '4%',
  163. right: '10%',
  164. bottom: '2%',
  165. containLabel: true
  166. },
  167. xAxis: [{
  168. show: false,
  169. }],
  170. yAxis: [{
  171. axisTick: 'none',
  172. axisLine: 'none',
  173. show :true,
  174. offset: '27',
  175. axisLabel: {
  176. textStyle: {
  177. color: 'white',
  178. fontSize: '16',
  179. }
  180. },
  181. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
  182. },
  183. ],
  184. series: [{
  185. name: '条',
  186. type: 'bar',
  187. yAxisIndex: 0,
  188. data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
  189. label: {
  190. normal: {
  191. show: true,
  192. position: 'right',
  193. textStyle: {
  194. color: 'white',
  195. fontSize: '16',
  196. }
  197. }
  198. },
  199. barWidth: 16,
  200. barMaxWidth:16,
  201. itemStyle: {
  202. normal: {
  203. // color: function(params) {
  204. // var num = people_myColor.length;
  205. // return people_myColor[params.dataIndex % num]
  206. // },
  207. color:function(params){
  208. var num = peopleOnTime_myColor.length;
  209. return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
  210. offset: 0,
  211. color: peopleOnTime_myColor[params.dataIndex % num]
  212. },
  213. {
  214. offset: 1,
  215. color: peopleOnTime_myColor2[params.dataIndex % num]
  216. }
  217. ])
  218. }
  219. // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
  220. // offset: 0,
  221. // color: "#6f3d9e"
  222. // },
  223. // {
  224. // offset: 1,
  225. // color: "#3637a3"
  226. // }
  227. // ])
  228. }
  229. },
  230. z: 2
  231. },
  232. ]
  233. };;
  234. // 获取当月人员按时解决率TOP5数据
  235. // --开始
  236. function getPeopleOnTimeData(time){
  237. let y=nowYear;
  238. let m=nowMonthOnly;
  239. if(Number(m)-1==0){
  240. y--
  241. m=12
  242. time={
  243. "start":y+"-"+m+"-01",
  244. "end":y+"-"+m+"-30"
  245. }
  246. }
  247. api_hkreport.incidentreport(time, 'incident_handler').then(function(res) {
  248. option_peopleOnTime.yAxis[0].data=[];
  249. option_peopleOnTime.series[0].data=[];
  250. var pieData=res.pieChart;
  251. for(var i=0;i<pieData.length;i++){
  252. if(pieData[i].account=="管理员"){
  253. pieData.splice(i,1)
  254. }
  255. }
  256. if(pieData.length>6){
  257. for(var i=0;i<5;i++){
  258. option_peopleOnTime.yAxis[0].data.unshift(pieData[i].account);
  259. option_peopleOnTime.series[0].data.unshift(pieData[i].value)
  260. }
  261. }else{
  262. for(var i=0;i<pieData.length;i++){
  263. option_peopleOnTime.yAxis[0].data.unshift(pieData[i].account);
  264. option_peopleOnTime.series[0].data.unshift(pieData[i].value)
  265. }
  266. }
  267. myChart_peopleOnTime.setOption(option_peopleOnTime);
  268. myChart_peopleOnTime.hideLoading();
  269. })
  270. }
  271. getPeopleOnTimeData({
  272. // "start":nowMonth+"-01",
  273. // "end":nowDay
  274. "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  275. "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  276. });
  277. // --结束
  278. // 当月故障原因TOP5
  279. 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)' ];
  280. 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)' ];
  281. var dom_fault = document.getElementById("fault");
  282. var myChart_fault = echarts.init(dom_fault);
  283. myChart_fault.showLoading({  
  284. text: '数据加载中...',
  285. color: '#c23531',
  286. textColor: '#fff',
  287. maskColor: 'rgba(255,255,255,0)',
  288. zlevel: 0
  289. });
  290. var app = {};
  291. var option_fault = null;
  292. option_fault = {
  293. grid: {
  294. left: '11%',
  295. top: '4%',
  296. right: '8%',
  297. bottom: '2%',
  298. containLabel: true
  299. },
  300. xAxis: [{
  301. show: false,
  302. }],
  303. yAxis: [{
  304. axisTick: 'none',
  305. axisLine: 'none',
  306. show :true,
  307. offset: '27',
  308. axisLabel: {
  309. textStyle: {
  310. color: 'white',
  311. fontSize: '13',
  312. // align:"left"
  313. lineHeight:15
  314. },
  315. formatter:function(params){
  316. // console.log(params);
  317. if(params.length>3){
  318. return params.slice(0,3)+"\n"+params.slice(3,params.length)
  319. }else{
  320. return params;
  321. }
  322. }
  323. },
  324. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云']
  325. },
  326. ],
  327. series: [{
  328. name: '条',
  329. type: 'bar',
  330. yAxisIndex: 0,
  331. data: [4, 13, 25, 29, 38, 44, 50, 52, 60, 72],
  332. label: {
  333. normal: {
  334. show: true,
  335. position: 'right',
  336. textStyle: {
  337. color: 'white',
  338. fontSize: '16',
  339. }
  340. }
  341. },
  342. barWidth: 16,
  343. barMaxWidth:16,
  344. itemStyle: {
  345. normal: {
  346. color:function(params){
  347. var num = fault_myColor.length;
  348. return new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
  349. offset: 0,
  350. color: fault_myColor[params.dataIndex % num]
  351. },
  352. {
  353. offset: 1,
  354. color: fault_myColor2[params.dataIndex % num]
  355. }
  356. ])
  357. }
  358. // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
  359. // offset: 0,
  360. // color: "#6f3d9e"
  361. // },
  362. // {
  363. // offset: 1,
  364. // color: "#3637a3"
  365. // }
  366. // ])
  367. }
  368. },
  369. z: 2
  370. },
  371. ]
  372. };;
  373. // 获取当月故障原因TOP5数据
  374. // --开始
  375. function getFaultData(time){
  376. let y=nowYear;
  377. let m=nowMonthOnly;
  378. if(Number(m)-1==0){
  379. y--
  380. m=12
  381. time={
  382. "start":y+"-"+m+"-01",
  383. "end":y+"-"+m+"-30"
  384. }
  385. }
  386. api_hkreport.incidentreport(time, 'incident_category_faultcause_top').then(function(res) {
  387. option_fault.yAxis[0].data=[];
  388. option_fault.series[0].data=[];
  389. var pieData=res.dataList;
  390. // if(pieData.length>6){
  391. // for(var i=0;i<5;i++){
  392. // if(pieData[i].reason=="其它问题(注解中说明)"){
  393. // pieData[i].reason="其它问题"
  394. // };
  395. // pieData[i].reason=pieData[i].reason.replace("问题","");
  396. // option_fault.yAxis[0].data.unshift(pieData[i].reason);
  397. // option_fault.series[0].data.unshift(pieData[i].sum)
  398. // }
  399. // }else{
  400. // for(var i=0;i<pieData.length;i++){
  401. // if(pieData[i].reason=="其它问题(注解中说明)"){
  402. // pieData[i].reason="其它问题"
  403. // };
  404. // pieData[i].reason=pieData[i].reason.replace("问题","");
  405. // pieData[i].reason=pieData[i].reason.replace("、","和");
  406. // option_fault.yAxis[0].data.unshift(pieData[i].reason);
  407. // option_fault.series[0].data.unshift(pieData[i].sum)
  408. // }
  409. // }
  410. if(pieData.length>6){
  411. for(var i=0;i<5;i++){
  412. if(pieData[i].reason=="其它问题(注解中说明)"){
  413. pieData[i].reason="其它问题"
  414. };
  415. pieData[i].reason=pieData[i].reason.replace("问题","");
  416. option_fault.yAxis[0].data.unshift(pieData[i].reason);
  417. option_fault.series[0].data.unshift(pieData[i].sum)
  418. }
  419. }else if(pieData.length==0){
  420. option_fault.yAxis[0].data.unshift("电脑系统和程序");
  421. option_fault.series[0].data.unshift(0);
  422. option_fault.yAxis[0].data.unshift("计算机病毒");
  423. option_fault.series[0].data.unshift(0);
  424. option_fault.yAxis[0].data.unshift("系统故障");
  425. option_fault.series[0].data.unshift(0);
  426. option_fault.yAxis[0].data.unshift("用户软件版本");
  427. option_fault.series[0].data.unshift(0);
  428. option_fault.yAxis[0].data.unshift("联系不上");
  429. option_fault.series[0].data.unshift(0);
  430. }else if(pieData.length==1){
  431. option_fault.yAxis[0].data.unshift("电脑系统和程序");
  432. option_fault.series[0].data.unshift(0);
  433. option_fault.yAxis[0].data.unshift("计算机病毒");
  434. option_fault.series[0].data.unshift(0);
  435. option_fault.yAxis[0].data.unshift("系统故障");
  436. option_fault.series[0].data.unshift(0);
  437. option_fault.yAxis[0].data.unshift("用户软件版本");
  438. option_fault.series[0].data.unshift(0);
  439. }else if(pieData.length==2){
  440. option_fault.yAxis[0].data.unshift("电脑系统和程序");
  441. option_fault.series[0].data.unshift(0);
  442. option_fault.yAxis[0].data.unshift("计算机病毒");
  443. option_fault.series[0].data.unshift(0);
  444. option_fault.yAxis[0].data.unshift("系统故障");
  445. option_fault.series[0].data.unshift(0);
  446. }else if(pieData.length==3){
  447. option_fault.yAxis[0].data.unshift("电脑系统和程序");
  448. option_fault.series[0].data.unshift(0);
  449. option_fault.yAxis[0].data.unshift("计算机病毒");
  450. option_fault.series[0].data.unshift(0);
  451. }else if(pieData.length==4){
  452. option_fault.yAxis[0].data.unshift("电脑系统和程序");
  453. option_fault.series[0].data.unshift(0);
  454. }else{
  455. for(var i=0;i<pieData.length;i++){
  456. if(pieData[i].reason=="其它问题(注解中说明)"){
  457. pieData[i].reason="其它问题"
  458. };
  459. pieData[i].reason=pieData[i].reason.replace("问题","");
  460. pieData[i].reason=pieData[i].reason.replace("、","和");
  461. option_fault.yAxis[0].data.unshift(pieData[i].reason);
  462. option_fault.series[0].data.unshift(pieData[i].sum)
  463. }
  464. }
  465. myChart_fault.setOption(option_fault);
  466. myChart_fault.hideLoading();
  467. })
  468. }
  469. getFaultData({
  470. // "start":nowMonth+"-01",
  471. // "end":nowDay
  472. "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  473. "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  474. });
  475. // --结束
  476. // 当月事件来源占比
  477. var dom_source = document.getElementById("source");
  478. var myChart_source = echarts.init(dom_source);
  479. myChart_source.showLoading({  
  480. text: '数据加载中...',
  481. color: '#c23531',
  482. textColor: '#fff',
  483. maskColor: 'rgba(255,255,255,0)',
  484. zlevel: 0
  485. });
  486. var app = {};
  487. var option_source = null;
  488. option_source = {
  489. // title: {
  490. // subtext: '0',
  491. // text: "事件总数(件)",
  492. // itemGap: 3,
  493. // "x": '50%',
  494. // "y": '40%',
  495. // textAlign: "center",
  496. // "textStyle": {
  497. // "fontWeight": 'normal',
  498. // "fontSize": 16,
  499. // "color": '#18f0ff',
  500. // },
  501. // "subtextStyle": {
  502. // "fontWeight": 'normal',
  503. // "fontSize": 22,
  504. // "color": 'white',
  505. // "lineHeight": 44
  506. // },
  507. // },
  508. grid: {
  509. top: '8%',
  510. left: '1%',
  511. right: '1%',
  512. bottom: '8%',
  513. containLabel: true,
  514. },
  515. legend: {
  516. orient: 'vertical',
  517. x: 'left',
  518. y: 'bottom',
  519. left:"23%",
  520. show:false,
  521. data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  522. textStyle: {
  523. color: 'white',
  524. borderColor: '#fff',
  525. fontSize:13,
  526. show:false
  527. },
  528. formatter: function(param) {
  529. },
  530. itemWidth:15,
  531. width:450,
  532. height:100,
  533. itemGap:20,
  534. },
  535. series: [
  536. {
  537. name:'访问来源',
  538. type:'pie',
  539. radius: ['35%', '60%'],
  540. center: ['50%', '50%'],
  541. avoidLabelOverlap: true,
  542. label: {
  543. align: 'left',
  544. normal: {
  545. show: true,
  546. position: 'outside',
  547. rich:"rich",
  548. formatter:function(param){
  549. // return param.name+'\n'+param.value+' '+param.percent+"%"
  550. return param.name+'\n'+param.percent+"%"
  551. },
  552. color:"rgba(255,255,255,0.6)"
  553. },
  554. // emphasis: {
  555. // show: false,
  556. // textStyle: {
  557. // fontSize: '30',
  558. // fontWeight: 'bold'
  559. // }
  560. // }
  561. },
  562. labelLine: {
  563. normal: {
  564. show: true
  565. }
  566. },
  567. data:[
  568. {value:335, name:'工作组1'},
  569. {value:310, name:'工作组2'},
  570. {value:234, name:'工作组3'},
  571. {value:135, name:'工作组4'},
  572. {value:1548, name:'工作组5'},
  573. {value:154, name:'工作组6'}
  574. ]
  575. }
  576. ],
  577. color:["#ecc625","#228ed7","#d0402f","#f98f3b","#118178","#c053d5"]
  578. };;
  579. // 获取当月事件来源占比数据
  580. // --开始
  581. function getSourceData(time){
  582. let y=nowYear;
  583. let m=nowMonthOnly;
  584. if(Number(m)-1==0){
  585. y--
  586. m=12
  587. time={
  588. "start":y+"-"+m+"-01",
  589. "end":y+"-"+m+"-30"
  590. }
  591. }
  592. api_hkreport.incidentreport(time, 'incident_source_pie').then(function(res) {
  593. option_source.legend.data=[];
  594. option_source.series[0].data=[];
  595. var allData=[];
  596. var allNum=0;
  597. for(var i=0;i<res.data[1].length;i++){
  598. if(res.data[1][i].count=="0"){
  599. delete res.data[1][i]
  600. }
  601. }
  602. for(var i=0;i<res.data[1].length;i++){
  603. if(res.data[1][i]){
  604. option_source.series[0].data.push({value:res.data[1][i].count,name:res.data[1][i].name});
  605. allNum+=Number(res.data[1][i].count)
  606. }
  607. }
  608. // option_source.title.subtext=allNum;
  609. myChart_source.setOption(option_source);
  610. myChart_source.hideLoading();
  611. })
  612. }
  613. getSourceData({
  614. // "startTime":nowMonth+"-01",
  615. // "endTime":nowDay
  616. "startTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  617. "endTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  618. });
  619. // --结束
  620. // 事件响应时长趋势
  621. var dom_response = document.getElementById("response");
  622. var myChart_response = echarts.init(dom_response);
  623. myChart_response.showLoading({  
  624. text: '数据加载中...',
  625. color: '#c23531',
  626. textColor: '#fff',
  627. maskColor: 'rgba(255,255,255,0)',
  628. zlevel: 0
  629. });
  630. var option_response = null;
  631. option_response={
  632. xAxis: {
  633. type: 'category',
  634. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  635. axisLine:{
  636. lineStyle:{
  637. color:"rgba(255,255,255,0.5)"
  638. }
  639. },
  640. axisTick:{
  641. show:false
  642. },
  643. axisLabel:{
  644. color:"rgba(255,255,255,0.8)"
  645. }
  646. },
  647. yAxis: {
  648. type: 'value',
  649. axisLabel:{
  650. color:"rgba(255,255,255,0.8)"
  651. },
  652. axisLine:{
  653. lineStyle:{
  654. color:"rgba(255,255,255,0.5)"
  655. }
  656. },
  657. axisTick:{
  658. show:false
  659. },
  660. splitLine:{
  661. show:true,
  662. lineStyle:{
  663. type:'dotted',
  664. color:"rgba(255,255,255,0.3)"
  665. }
  666. },
  667. },
  668. series: [{
  669. data: [40, 932, 901, 934, 1290, 1330, 1320],
  670. type: 'line',
  671. symbol:"circle",
  672. symbolSize:1,
  673. lineStyle:{
  674. color:"#0ca7a7"
  675. },
  676. label:{
  677. normal:{
  678. show:true,
  679. color:"#0ca7a7"
  680. }
  681. }
  682. }]
  683. }
  684. // 获取事件响应时长趋势
  685. // 开始
  686. function getResponseData(time){
  687. api_hkreport.incidentreport(time, 'incident_ops_efficiency_response').then(function(res) {
  688. option_response.xAxis.data=[];
  689. option_response.series[0].data=[];
  690. var pieData=res.graphlist;
  691. $scope.allResponseTime=0;
  692. for(var i=0;i<pieData.length;i++){
  693. option_response.xAxis.data.push(pieData[i].accdate.slice(5,pieData[i].accdate.length));
  694. option_response.series[0].data.push(pieData[i].responsetime);
  695. $scope.allResponseTime+=Number(pieData[i].responsetime)
  696. }
  697. $scope.allResponseAverageTime=Math.round($scope.allResponseTime/7);
  698. myChart_response.setOption(option_response);
  699. myChart_response.hideLoading();
  700. })
  701. }
  702. getResponseData({
  703. "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
  704. "end":nowDay
  705. });
  706. // 结束
  707. // 事件解决时长趋势
  708. var dom_woll = document.getElementById("woll");
  709. var myChart_woll = echarts.init(dom_woll);
  710. myChart_woll.showLoading({  
  711. text: '数据加载中...',
  712. color: '#c23531',
  713. textColor: '#fff',
  714. maskColor: 'rgba(255,255,255,0)',
  715. zlevel: 0
  716. });
  717. var option_woll = null;
  718. option_woll={
  719. xAxis: {
  720. type: 'category',
  721. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  722. axisLine:{
  723. lineStyle:{
  724. color:"rgba(255,255,255,0.5)"
  725. }
  726. },
  727. axisTick:{
  728. show:false
  729. },
  730. axisLabel:{
  731. color:"rgba(255,255,255,0.8)"
  732. }
  733. },
  734. yAxis: {
  735. type: 'value',
  736. axisLine:{
  737. lineStyle:{
  738. color:"rgba(255,255,255,0.5)"
  739. }
  740. },
  741. axisTick:{
  742. show:false
  743. },
  744. splitLine:{
  745. show:true,
  746. lineStyle:{
  747. type:'dotted',
  748. color:"rgba(255,255,255,0.3)"
  749. }
  750. },
  751. axisLabel:{
  752. color:"rgba(255,255,255,0.8)"
  753. },
  754. },
  755. series: [{
  756. data: [820, 932, 901, 934, 1290, 1330, 1320],
  757. type: 'line',
  758. symbol:"circle",
  759. symbolSize:1,
  760. lineStyle:{
  761. color:"#f98f3b"
  762. },
  763. label:{
  764. normal:{
  765. show:true,
  766. color:"#f98f3b"
  767. }
  768. }
  769. }]
  770. }
  771. // 获取事件解决时长趋势
  772. // 开始
  773. function getWollData(time){
  774. api_hkreport.incidentreport(time, 'incident_ops_efficiency_solve').then(function(res) {
  775. option_woll.xAxis.data=[];
  776. option_woll.series[0].data=[];
  777. var pieData=res.graphlist;
  778. $scope.allSolveAverageTime=0;
  779. $scope.chushu=0;
  780. for(var i=0;i<pieData.length;i++){
  781. option_woll.xAxis.data.push(pieData[i].accdate.slice(5,pieData[i].accdate.length));
  782. option_woll.series[0].data.push(pieData[i].responsetime);
  783. $scope.allSolveAverageTime+=Number(pieData[i].responsetime);
  784. $scope.chushu++
  785. };
  786. $scope.solveAverageTime=Math.round($scope.allSolveAverageTime/$scope.chushu);
  787. myChart_woll.setOption(option_woll);
  788. myChart_woll.hideLoading();
  789. })
  790. }
  791. getWollData({
  792. "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
  793. "end":nowDay
  794. });
  795. // 结束
  796. // 词云图开始
  797. TagCanvas.Start('myCanvas', 'tags', {
  798. textColour: '',
  799. // outlineColour: '#fff',
  800. weight:true,
  801. reverse: true,
  802. depth: 0.8,
  803. dragControl: true,
  804. decel:0.95,
  805. maxSpeed: 0.05,
  806. initial: [-0.2, 0]
  807. });
  808. // 词云图结束
  809. // 近五年事件统计
  810. 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)' ];
  811. 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)' ];
  812. var dom_incidentFiveAll = document.getElementById("incidentFiveAll");
  813. var myChart_incidentFiveAll = echarts.init(dom_incidentFiveAll);
  814. myChart_incidentFiveAll.showLoading({  
  815. text: '数据加载中...',
  816. color: '#c23531',
  817. textColor: '#fff',
  818. maskColor: 'rgba(255,255,255,0)',
  819. zlevel: 0
  820. });
  821. var app = {};
  822. var option_incidentFiveAll = null;
  823. option_incidentFiveAll = {
  824. grid: {
  825. left: '5%',
  826. top: '12%',
  827. right: '8%',
  828. bottom: '2%',
  829. containLabel: true
  830. },
  831. xAxis: [{
  832. axisLine:{
  833. lineStyle:{
  834. color:"rgba(255,255,255,0.5)"
  835. }
  836. },
  837. axisTick:{
  838. show:false
  839. },
  840. show :true,
  841. offset: '27',
  842. axisLabel: {
  843. textStyle: {
  844. color:"rgba(255,255,255,0.8)",
  845. fontSize: '16',
  846. }
  847. },
  848. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  849. type: 'category',
  850. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  851. }],
  852. yAxis: [{
  853. axisLine:{
  854. lineStyle:{
  855. color:"rgba(255,255,255,0.5)"
  856. }
  857. },
  858. axisTick:{
  859. show:false
  860. },
  861. splitLine:{
  862. show:true,
  863. lineStyle:{
  864. type:'dotted',
  865. color:"rgba(255,255,255,0.3)"
  866. }
  867. },
  868. axisLabel:{
  869. color:"rgba(255,255,255,0.8)",
  870. },
  871. type: 'value'
  872. },
  873. ],
  874. series: [{
  875. barWidth: 32,
  876. barMaxWidth:32,
  877. data: [120, 200, 150, 80, 70, 110, 130],
  878. markPoint: {
  879. data: [
  880. {type: 'max', name: '最大值'},
  881. {type: 'min', name: '最小值'}
  882. ],
  883. label:{
  884. show:true,
  885. fontWeight:"normal",
  886. fontSize:12,
  887. color:"white"
  888. }
  889. },
  890. type: 'bar',
  891. itemStyle: {
  892. normal: {
  893. color:function(params){
  894. var num = incidentFiveAll_myColor.length;
  895. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  896. offset: 0,
  897. color: incidentFiveAll_myColor[params.dataIndex % num]
  898. },
  899. {
  900. offset: 1,
  901. color: incidentFiveAll_myColor2[params.dataIndex % num]
  902. }
  903. ])
  904. }
  905. }
  906. },
  907. z: 2
  908. },
  909. ]
  910. };;
  911. // 获取近五年事件数据
  912. // --开始
  913. function getiIncidentFiveAllData(time){
  914. api_hkreport.incidentreport(time, 'incident_trend').then(function(res) {
  915. for(var i=0;i<res.quantityStatistics.length;i++){
  916. if(res.quantityStatistics[i].category=="统一认证及信息系统"){
  917. res.quantityStatistics[i].category="信息系统"
  918. }
  919. }
  920. $scope.fenlei=res.quantityStatistics;
  921. var pieData=res.quantityStatisticsList;
  922. // 近五年事件统计
  923. option_incidentFiveAll.xAxis[0].data=[];
  924. option_incidentFiveAll.series[0].data=[];
  925. $scope.incidentFiveNumAll=0;
  926. for(var i=0;i<pieData.length;i++){
  927. option_incidentFiveAll.xAxis[0].data.push(pieData[i].date);
  928. option_incidentFiveAll.series[0].data.push(pieData[i].sum);
  929. $scope.incidentFiveNumAll+=Number(pieData[i].sum)
  930. }
  931. myChart_incidentFiveAll.setOption(option_incidentFiveAll);
  932. myChart_incidentFiveAll.hideLoading();
  933. // 近五年事件分类占比雷达图
  934. option_classification.legend.data=[];
  935. option_classification.radar.indicator=[];
  936. option_classification.series[0].data=[];
  937. var all_category0=0;
  938. var all_category1=0;
  939. var all_category2=0;
  940. var all_category3=0;
  941. var all_category4=0;
  942. for(var i=0;i<pieData.length;i++){
  943. // all_category0+=Number(pieData[i].category0);
  944. // all_category1+=Number(pieData[i].category1);
  945. // all_category2+=Number(pieData[i].category2);
  946. // all_category3+=Number(pieData[i].category3);
  947. // all_category4+=Number(pieData[i].category4);
  948. if(all_category0 < Number(pieData[i].category0)){
  949. all_category0 = Number(pieData[i].category0)
  950. }
  951. if(all_category1 < Number(pieData[i].category1)){
  952. all_category1 = Number(pieData[i].category1)
  953. }
  954. if(all_category2 < Number(pieData[i].category2)){
  955. all_category2 = Number(pieData[i].category2)
  956. }
  957. if(all_category3 < Number(pieData[i].category3)){
  958. all_category3 = Number(pieData[i].category3)
  959. }
  960. if(all_category4 < Number(pieData[i].category4)){
  961. all_category4= Number(pieData[i].category4)
  962. }
  963. }
  964. console.log(all_category0);
  965. console.log(all_category1);
  966. console.log(all_category2);
  967. console.log(all_category3);
  968. console.log(all_category4);
  969. for(var i=0;i<pieData.length;i++){
  970. option_classification.legend.data.push(pieData[i].date)
  971. }
  972. option_classification.radar.indicator.push({"name":$scope.fenlei[0].category,"max":all_category0});
  973. option_classification.radar.indicator.push({"name":$scope.fenlei[1].category,"max":all_category1});
  974. option_classification.radar.indicator.push({"name":$scope.fenlei[2].category,"max":all_category2});
  975. option_classification.radar.indicator.push({"name":$scope.fenlei[3].category,"max":all_category3});
  976. option_classification.radar.indicator.push({"name":$scope.fenlei[4].category,"max":all_category4});
  977. for(var i=0;i<pieData.length;i++){
  978. 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})
  979. }
  980. myChart_classification.setOption(option_classification);
  981. myChart_classification.hideLoading();
  982. // // 近五年事件分类1
  983. // option_classification1.legend.data=[];
  984. // option_classification1.series[0].data=[];
  985. // var all_category0=0;
  986. // var all_category1=0;
  987. // var all_category2=0;
  988. // var all_category3=0;
  989. // var all_category4=0;
  990. // for(var i=0;i<pieData.length;i++){
  991. // all_category0+=Number(pieData[i].category0);
  992. // all_category1+=Number(pieData[i].category1);
  993. // all_category2+=Number(pieData[i].category2);
  994. // all_category3+=Number(pieData[i].category3);
  995. // all_category4+=Number(pieData[i].category4);
  996. // }
  997. // option_classification1.series[0].data.push({value:all_category0,name:$scope.fenlei[0].category});
  998. // option_classification1.series[0].data.push({value:all_category1,name:$scope.fenlei[1].category});
  999. // option_classification1.series[0].data.push({value:all_category2,name:$scope.fenlei[2].category});
  1000. // option_classification1.series[0].data.push({value:all_category3,name:$scope.fenlei[3].category});
  1001. // option_classification1.series[0].data.push({value:all_category4,name:$scope.fenlei[4].category});
  1002. // myChart_classification1.setOption(option_classification1);
  1003. // myChart_classification1.hideLoading();
  1004. // // 近五年事件分类2
  1005. // option_classification2.legend.data=[];
  1006. // option_classification2.series[0].data=[];
  1007. // option_classification2.series[0].data.push({value:pieData[4].category0,name:$scope.fenlei[0].category});
  1008. // option_classification2.series[0].data.push({value:pieData[4].category1,name:$scope.fenlei[1].category});
  1009. // option_classification2.series[0].data.push({value:pieData[4].category2,name:$scope.fenlei[2].category});
  1010. // option_classification2.series[0].data.push({value:pieData[4].category3,name:$scope.fenlei[3].category});
  1011. // option_classification2.series[0].data.push({value:pieData[4].category4,name:$scope.fenlei[4].category});
  1012. // myChart_classification2.setOption(option_classification2);
  1013. // myChart_classification2.hideLoading();
  1014. // // 近五年事件分类3
  1015. // option_classification3.legend.data=[];
  1016. // option_classification3.series[0].data=[];
  1017. // option_classification3.series[0].data.push({value:pieData[3].category0,name:$scope.fenlei[0].category});
  1018. // option_classification3.series[0].data.push({value:pieData[3].category1,name:$scope.fenlei[1].category});
  1019. // option_classification3.series[0].data.push({value:pieData[3].category2,name:$scope.fenlei[2].category});
  1020. // option_classification3.series[0].data.push({value:pieData[3].category3,name:$scope.fenlei[3].category});
  1021. // option_classification3.series[0].data.push({value:pieData[3].category4,name:$scope.fenlei[4].category});
  1022. // myChart_classification3.setOption(option_classification3);
  1023. // myChart_classification3.hideLoading();
  1024. // // 近五年事件分类4
  1025. // option_classification4.legend.data=[];
  1026. // option_classification4.series[0].data=[];
  1027. // option_classification4.series[0].data.push({value:pieData[2].category0,name:$scope.fenlei[0].category});
  1028. // option_classification4.series[0].data.push({value:pieData[2].category1,name:$scope.fenlei[1].category});
  1029. // option_classification4.series[0].data.push({value:pieData[2].category2,name:$scope.fenlei[2].category});
  1030. // option_classification4.series[0].data.push({value:pieData[2].category3,name:$scope.fenlei[3].category});
  1031. // option_classification4.series[0].data.push({value:pieData[2].category4,name:$scope.fenlei[4].category});
  1032. // myChart_classification4.setOption(option_classification4);
  1033. // myChart_classification4.hideLoading();
  1034. // // 近五年事件分类5
  1035. // option_classification5.legend.data=[];
  1036. // option_classification5.series[0].data=[];
  1037. // option_classification5.series[0].data.push({value:pieData[1].category0,name:$scope.fenlei[0].category});
  1038. // option_classification5.series[0].data.push({value:pieData[1].category1,name:$scope.fenlei[1].category});
  1039. // option_classification5.series[0].data.push({value:pieData[1].category2,name:$scope.fenlei[2].category});
  1040. // option_classification5.series[0].data.push({value:pieData[1].category3,name:$scope.fenlei[3].category});
  1041. // option_classification5.series[0].data.push({value:pieData[1].category4,name:$scope.fenlei[4].category});
  1042. // myChart_classification5.setOption(option_classification5);
  1043. // myChart_classification5.hideLoading();
  1044. // // 近五年事件分类6
  1045. // option_classification6.legend.data=[];
  1046. // option_classification6.series[0].data=[];
  1047. // option_classification6.series[0].data.push({value:pieData[0].category0,name:$scope.fenlei[0].category});
  1048. // option_classification6.series[0].data.push({value:pieData[0].category1,name:$scope.fenlei[1].category});
  1049. // option_classification6.series[0].data.push({value:pieData[0].category2,name:$scope.fenlei[2].category});
  1050. // option_classification6.series[0].data.push({value:pieData[0].category3,name:$scope.fenlei[3].category});
  1051. // option_classification6.series[0].data.push({value:pieData[0].category4,name:$scope.fenlei[4].category});
  1052. // myChart_classification6.setOption(option_classification6);
  1053. // myChart_classification6.hideLoading();
  1054. // // 近五年事件分类7
  1055. // option_classification7.legend.data=[];
  1056. // option_classification7.series[0].data=[];
  1057. // var all_category0_bf=0;
  1058. // var all_category1_bf=0;
  1059. // var all_category2_bf=0;
  1060. // var all_category3_bf=0;
  1061. // var all_category4_bf=0;
  1062. // for(var i=0;i<pieData.length;i++){
  1063. // all_category0_bf+=Number(pieData[i].category0);
  1064. // all_category1_bf+=Number(pieData[i].category1);
  1065. // all_category2_bf+=Number(pieData[i].category2);
  1066. // all_category3_bf+=Number(pieData[i].category3);
  1067. // all_category4_bf+=Number(pieData[i].category4);
  1068. // }
  1069. // option_classification7.series[0].data.push({value:all_category0_bf,name:$scope.fenlei[0].category});
  1070. // option_classification7.series[0].data.push({value:all_category1_bf,name:$scope.fenlei[1].category});
  1071. // option_classification7.series[0].data.push({value:all_category2_bf,name:$scope.fenlei[2].category});
  1072. // option_classification7.series[0].data.push({value:all_category3_bf,name:$scope.fenlei[3].category});
  1073. // option_classification7.series[0].data.push({value:all_category4_bf,name:$scope.fenlei[4].category});
  1074. // myChart_classification7.setOption(option_classification7);
  1075. // myChart_classification7.hideLoading();
  1076. // 近五年事件分类同比增幅1
  1077. // option_incidentFivePecent1.xAxis[0].data=[];
  1078. // option_incidentFivePecent1.series[0].data=[];
  1079. // var pieData=res.quantityStatisticsList;
  1080. // for(var i=0;i<pieData.length;i++){
  1081. // if(pieData[i].date=="2015"){
  1082. // pieData[i].allzzl="100"
  1083. // }
  1084. // if(pieData[i].allzzl=="-"){
  1085. // pieData[i].allzzl="0"
  1086. // }
  1087. // option_incidentFivePecent1.xAxis[0].data.push(pieData[i].date);
  1088. // option_incidentFivePecent1.series[0].data.push(pieData[i].allzzl)
  1089. // }
  1090. // myChart_incidentFivePecent1.setOption(option_incidentFivePecent1);
  1091. // myChart_incidentFivePecent1.hideLoading();
  1092. // 近五年事件分类同比增幅2
  1093. option_incidentFivePecent2.xAxis[0].data=[];
  1094. option_incidentFivePecent2.series[0].data=[];
  1095. var pieData=res.quantityStatisticsList;
  1096. for(var i=0;i<pieData.length;i++){
  1097. if(pieData[i].date=="2015"){
  1098. pieData[i].zzl0="100"
  1099. }
  1100. if(pieData[i].zzl0=="-"){
  1101. pieData[i].zzl0="0"
  1102. }
  1103. option_incidentFivePecent2.xAxis[0].data.push(pieData[i].date);
  1104. option_incidentFivePecent2.series[0].data.push(pieData[i].zzl0)
  1105. }
  1106. myChart_incidentFivePecent2.setOption(option_incidentFivePecent2);
  1107. myChart_incidentFivePecent2.hideLoading();
  1108. // 近五年事件分类同比增幅3
  1109. option_incidentFivePecent3.xAxis[0].data=[];
  1110. option_incidentFivePecent3.series[0].data=[];
  1111. var pieData=res.quantityStatisticsList;
  1112. for(var i=0;i<pieData.length;i++){
  1113. if(pieData[i].date=="2015"){
  1114. pieData[i].zzl1="100"
  1115. }
  1116. if(pieData[i].zzl1=="-"){
  1117. pieData[i].zzl1="0"
  1118. }
  1119. option_incidentFivePecent3.xAxis[0].data.push(pieData[i].date);
  1120. option_incidentFivePecent3.series[0].data.push(pieData[i].zzl1)
  1121. }
  1122. myChart_incidentFivePecent3.setOption(option_incidentFivePecent3);
  1123. myChart_incidentFivePecent3.hideLoading();
  1124. // 近五年事件分类同比增幅4
  1125. option_incidentFivePecent4.xAxis[0].data=[];
  1126. option_incidentFivePecent4.series[0].data=[];
  1127. var pieData=res.quantityStatisticsList;
  1128. for(var i=0;i<pieData.length;i++){
  1129. if(pieData[i].date=="2015"){
  1130. pieData[i].zzl2="100"
  1131. }
  1132. if(pieData[i].zzl2=="-"){
  1133. pieData[i].zzl2="0"
  1134. }
  1135. option_incidentFivePecent4.xAxis[0].data.push(pieData[i].date);
  1136. option_incidentFivePecent4.series[0].data.push(pieData[i].zzl2)
  1137. }
  1138. myChart_incidentFivePecent4.setOption(option_incidentFivePecent4);
  1139. myChart_incidentFivePecent4.hideLoading();
  1140. // 近五年事件分类同比增幅5
  1141. option_incidentFivePecent5.xAxis[0].data=[];
  1142. option_incidentFivePecent5.series[0].data=[];
  1143. var pieData=res.quantityStatisticsList;
  1144. for(var i=0;i<pieData.length;i++){
  1145. if(pieData[i].date=="2015"){
  1146. pieData[i].zzl3="100"
  1147. }
  1148. if(pieData[i].zzl3=="-"){
  1149. pieData[i].zzl3="0"
  1150. }
  1151. option_incidentFivePecent5.xAxis[0].data.push(pieData[i].date);
  1152. option_incidentFivePecent5.series[0].data.push(pieData[i].zzl3)
  1153. }
  1154. myChart_incidentFivePecent5.setOption(option_incidentFivePecent5);
  1155. myChart_incidentFivePecent5.hideLoading();
  1156. // 近五年事件分类同比增幅6
  1157. option_incidentFivePecent6.xAxis[0].data=[];
  1158. option_incidentFivePecent6.series[0].data=[];
  1159. var pieData=res.quantityStatisticsList;
  1160. for(var i=0;i<pieData.length;i++){
  1161. if(pieData[i].date=="2015"){
  1162. pieData[i].zzl4="100"
  1163. }
  1164. if(pieData[i].zzl4=="-"){
  1165. pieData[i].zzl4="0"
  1166. }
  1167. option_incidentFivePecent6.xAxis[0].data.push(pieData[i].date);
  1168. option_incidentFivePecent6.series[0].data.push(pieData[i].zzl4)
  1169. }
  1170. myChart_incidentFivePecent6.setOption(option_incidentFivePecent6);
  1171. myChart_incidentFivePecent6.hideLoading();
  1172. // 近五年事件分类同比增幅7
  1173. // option_incidentFivePecent7.xAxis[0].data=[];
  1174. // option_incidentFivePecent7.series[0].data=[];
  1175. // var pieData=res.quantityStatisticsList;
  1176. // for(var i=0;i<pieData.length;i++){
  1177. // if(pieData[i].date=="2015"){
  1178. // pieData[i].allzzl="100"
  1179. // }
  1180. // if(pieData[i].allzzl=="-"){
  1181. // pieData[i].allzzl="0"
  1182. // }
  1183. // option_incidentFivePecent7.xAxis[0].data.push(pieData[i].date);
  1184. // option_incidentFivePecent7.series[0].data.push(pieData[i].allzzl)
  1185. // }
  1186. // myChart_incidentFivePecent7.setOption(option_incidentFivePecent7);
  1187. // myChart_incidentFivePecent7.hideLoading();
  1188. option_incidentFivePecent7.xAxis[0].data=[];
  1189. option_incidentFivePecent7.series[0].data=[];
  1190. var pieData=res.quantityStatisticsList;
  1191. for(var i=0;i<pieData.length;i++){
  1192. if(pieData[i].date=="2015"){
  1193. pieData[i].zzl0="100"
  1194. }
  1195. if(pieData[i].zzl0=="-"){
  1196. pieData[i].zzl0="0"
  1197. }
  1198. option_incidentFivePecent7.xAxis[0].data.push(pieData[i].date);
  1199. option_incidentFivePecent7.series[0].data.push(pieData[i].zzl0)
  1200. }
  1201. myChart_incidentFivePecent7.setOption(option_incidentFivePecent7);
  1202. myChart_incidentFivePecent7.hideLoading();
  1203. })
  1204. }
  1205. getiIncidentFiveAllData({
  1206. "start":fiveYearAgo,
  1207. "end":nowYear
  1208. });
  1209. // --结束
  1210. // 近五年事件分类同比增幅
  1211. 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)' ];
  1212. 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)' ];
  1213. // 1
  1214. // var dom_incidentFivePecent1 = document.getElementById("incidentFivePecent1");
  1215. // var myChart_incidentFivePecent1 = echarts.init(dom_incidentFivePecent1);
  1216. // myChart_incidentFivePecent1.showLoading({  
  1217. // text: '数据加载中...',
  1218. // color: '#c23531',
  1219. // textColor: '#fff',
  1220. // maskColor: 'rgba(255,255,255,0)',
  1221. // zlevel: 0
  1222. // });
  1223. // var app = {};
  1224. // var option_incidentFivePecent1 = null;
  1225. // option_incidentFivePecent1 = {
  1226. // grid: {
  1227. // left: '6%',
  1228. // top: '7%',
  1229. // right: '6%',
  1230. // bottom: '2%',
  1231. // containLabel: true
  1232. // },
  1233. // xAxis: [{
  1234. // axisLine:{
  1235. // lineStyle:{
  1236. // color:"rgba(255,255,255,0.5)"
  1237. // }
  1238. // },
  1239. // axisTick:{
  1240. // show:false
  1241. // },
  1242. // show :true,
  1243. // offset: '27',
  1244. // axisLabel: {
  1245. // textStyle: {
  1246. // color:"rgba(255,255,255,0.8)",
  1247. // fontSize: '16',
  1248. // }
  1249. // },
  1250. // data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1251. // type: 'category',
  1252. // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1253. // }],
  1254. // yAxis: [{
  1255. // axisLine:{
  1256. // show:false,
  1257. // lineStyle:{
  1258. // color:"rgba(255,255,255,0.5)"
  1259. // }
  1260. // },
  1261. // axisTick:{
  1262. // show:false
  1263. // },
  1264. // splitLine:{
  1265. // show:true,
  1266. // lineStyle:{
  1267. // type:'dotted',
  1268. // color:"rgba(255,255,255,0.3)"
  1269. // }
  1270. // },
  1271. // axisLabel:{
  1272. // color:"rgba(255,255,255,0.8)",
  1273. // formatter:function(params){
  1274. // return params+"%"
  1275. // }
  1276. // },
  1277. // type: 'value'
  1278. // },
  1279. // ],
  1280. // series: [{
  1281. // barWidth: 32,
  1282. // barMaxWidth:32,
  1283. // data: [120, 200, 150, 80, 70, 110, 130],
  1284. // type: 'bar',
  1285. // // markPoint: {
  1286. // // data: [
  1287. // // {type: 'max', name: '最大值'},
  1288. // // {type: 'min', name: '最小值'}
  1289. // // ],
  1290. // // label:{
  1291. // // show:true,
  1292. // // fontWeight:"normal",
  1293. // // fontSize:12,
  1294. // // color:"white"
  1295. // // }
  1296. // // },
  1297. // itemStyle: {
  1298. // normal: {
  1299. // color:function(params){
  1300. // if(Number(params.data)<0){
  1301. // var num = incidentFivePecent_myColor.length;
  1302. // return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1303. // offset: 0,
  1304. // color: incidentFivePecent_myColor[params.dataIndex % num]
  1305. // },
  1306. // {
  1307. // offset: 1,
  1308. // color: incidentFivePecent_myColor2[params.dataIndex % num]
  1309. // }
  1310. // ])
  1311. // }else{
  1312. // var num = incidentFivePecent_myColor.length;
  1313. // return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1314. // offset: 0,
  1315. // color: incidentFivePecent_myColor[params.dataIndex % num]
  1316. // },
  1317. // {
  1318. // offset: 1,
  1319. // color: incidentFivePecent_myColor2[params.dataIndex % num]
  1320. // }
  1321. // ])
  1322. // }
  1323. // }
  1324. // }
  1325. // },
  1326. // z: 2
  1327. // },
  1328. // ]
  1329. // };
  1330. // 2
  1331. var dom_incidentFivePecent2 = document.getElementById("incidentFivePecent2");
  1332. var myChart_incidentFivePecent2 = echarts.init(dom_incidentFivePecent2);
  1333. myChart_incidentFivePecent2.showLoading({  
  1334. text: '数据加载中...',
  1335. color: '#c23531',
  1336. textColor: '#fff',
  1337. maskColor: 'rgba(255,255,255,0)',
  1338. zlevel: 0
  1339. });
  1340. var app = {};
  1341. var option_incidentFivePecent2 = null;
  1342. option_incidentFivePecent2 = {
  1343. grid: {
  1344. left: '6%',
  1345. top: '7%',
  1346. right: '6%',
  1347. bottom: '2%',
  1348. containLabel: true
  1349. },
  1350. xAxis: [{
  1351. axisLine:{
  1352. lineStyle:{
  1353. color:"rgba(255,255,255,0.5)"
  1354. }
  1355. },
  1356. axisTick:{
  1357. show:false
  1358. },
  1359. show :true,
  1360. offset: '27',
  1361. axisLabel: {
  1362. textStyle: {
  1363. color:"rgba(255,255,255,0.8)",
  1364. fontSize: '16',
  1365. }
  1366. },
  1367. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1368. type: 'category',
  1369. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1370. }],
  1371. yAxis: [{
  1372. axisLine:{
  1373. show:false,
  1374. lineStyle:{
  1375. color:"rgba(255,255,255,0.5)"
  1376. }
  1377. },
  1378. axisTick:{
  1379. show:false
  1380. },
  1381. splitLine:{
  1382. show:true,
  1383. lineStyle:{
  1384. type:'dotted',
  1385. color:"rgba(255,255,255,0.3)"
  1386. }
  1387. },
  1388. axisLabel:{
  1389. color:"rgba(255,255,255,0.8)",
  1390. formatter:function(params){
  1391. return params+"%"
  1392. }
  1393. },
  1394. type: 'value'
  1395. },
  1396. ],
  1397. series: [{
  1398. barWidth: 32,
  1399. barMaxWidth:32,
  1400. data: [120, 200, 150, 80, 70, 110, 130],
  1401. type: 'bar',
  1402. markPoint: {
  1403. data: [
  1404. {type: 'max', name: '最大值'},
  1405. {type: 'min', name: '最小值'}
  1406. ],
  1407. label:{
  1408. show:true,
  1409. fontWeight:"normal",
  1410. fontSize:12,
  1411. color:"white",
  1412. position:"insideBottom",
  1413. formatter:"{c}%"
  1414. }
  1415. },
  1416. itemStyle: {
  1417. normal: {
  1418. color:function(params){
  1419. if(Number(params.data)<0){
  1420. var num = incidentFivePecent_myColor.length;
  1421. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1422. offset: 0,
  1423. color: incidentFivePecent_myColor[params.dataIndex % num]
  1424. },
  1425. {
  1426. offset: 1,
  1427. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1428. }
  1429. ])
  1430. }else{
  1431. var num = incidentFivePecent_myColor.length;
  1432. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1433. offset: 0,
  1434. color: incidentFivePecent_myColor[params.dataIndex % num]
  1435. },
  1436. {
  1437. offset: 1,
  1438. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1439. }
  1440. ])
  1441. }
  1442. }
  1443. }
  1444. },
  1445. z: 2
  1446. },
  1447. ]
  1448. };
  1449. // 3
  1450. var dom_incidentFivePecent3 = document.getElementById("incidentFivePecent3");
  1451. var myChart_incidentFivePecent3 = echarts.init(dom_incidentFivePecent3);
  1452. myChart_incidentFivePecent3.showLoading({  
  1453. text: '数据加载中...',
  1454. color: '#c23531',
  1455. textColor: '#fff',
  1456. maskColor: 'rgba(255,255,255,0)',
  1457. zlevel: 0
  1458. });
  1459. var app = {};
  1460. var option_incidentFivePecent3 = null;
  1461. option_incidentFivePecent3 = {
  1462. grid: {
  1463. left: '6%',
  1464. top: '7%',
  1465. right: '6%',
  1466. bottom: '2%',
  1467. containLabel: true
  1468. },
  1469. xAxis: [{
  1470. axisLine:{
  1471. lineStyle:{
  1472. color:"rgba(255,255,255,0.5)"
  1473. }
  1474. },
  1475. axisTick:{
  1476. show:false
  1477. },
  1478. show :true,
  1479. offset: '27',
  1480. axisLabel: {
  1481. textStyle: {
  1482. color:"rgba(255,255,255,0.8)",
  1483. fontSize: '16',
  1484. }
  1485. },
  1486. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1487. type: 'category',
  1488. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1489. }],
  1490. yAxis: [{
  1491. axisLine:{
  1492. show:false,
  1493. lineStyle:{
  1494. color:"rgba(255,255,255,0.5)"
  1495. }
  1496. },
  1497. axisTick:{
  1498. show:false
  1499. },
  1500. splitLine:{
  1501. show:true,
  1502. lineStyle:{
  1503. type:'dotted',
  1504. color:"rgba(255,255,255,0.3)"
  1505. }
  1506. },
  1507. axisLabel:{
  1508. color:"rgba(255,255,255,0.8)",
  1509. formatter:function(params){
  1510. return params+"%"
  1511. }
  1512. },
  1513. type: 'value'
  1514. },
  1515. ],
  1516. series: [{
  1517. barWidth: 32,
  1518. barMaxWidth:32,
  1519. data: [120, 200, 150, 80, 70, 110, 130],
  1520. type: 'bar',
  1521. markPoint: {
  1522. data: [
  1523. {type: 'max', name: '最大值'},
  1524. {type: 'min', name: '最小值'}
  1525. ],
  1526. label:{
  1527. show:true,
  1528. fontWeight:"normal",
  1529. fontSize:12,
  1530. color:"white",
  1531. position:"insideBottom",
  1532. formatter:"{c}%"
  1533. }
  1534. },
  1535. itemStyle: {
  1536. normal: {
  1537. color:function(params){
  1538. if(Number(params.data)<0){
  1539. var num = incidentFivePecent_myColor.length;
  1540. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1541. offset: 0,
  1542. color: incidentFivePecent_myColor[params.dataIndex % num]
  1543. },
  1544. {
  1545. offset: 1,
  1546. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1547. }
  1548. ])
  1549. }else{
  1550. var num = incidentFivePecent_myColor.length;
  1551. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1552. offset: 0,
  1553. color: incidentFivePecent_myColor[params.dataIndex % num]
  1554. },
  1555. {
  1556. offset: 1,
  1557. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1558. }
  1559. ])
  1560. }
  1561. }
  1562. }
  1563. },
  1564. z: 2
  1565. },
  1566. ]
  1567. };
  1568. // 4
  1569. var dom_incidentFivePecent4 = document.getElementById("incidentFivePecent4");
  1570. var myChart_incidentFivePecent4 = echarts.init(dom_incidentFivePecent4);
  1571. myChart_incidentFivePecent4.showLoading({  
  1572. text: '数据加载中...',
  1573. color: '#c23531',
  1574. textColor: '#fff',
  1575. maskColor: 'rgba(255,255,255,0)',
  1576. zlevel: 0
  1577. });
  1578. var app = {};
  1579. var option_incidentFivePecent4 = null;
  1580. option_incidentFivePecent4 = {
  1581. grid: {
  1582. left: '6%',
  1583. top: '7%',
  1584. right: '6%',
  1585. bottom: '2%',
  1586. containLabel: true
  1587. },
  1588. xAxis: [{
  1589. axisLine:{
  1590. lineStyle:{
  1591. color:"rgba(255,255,255,0.5)"
  1592. }
  1593. },
  1594. axisTick:{
  1595. show:false
  1596. },
  1597. show :true,
  1598. offset: '27',
  1599. axisLabel: {
  1600. textStyle: {
  1601. color:"rgba(255,255,255,0.8)",
  1602. fontSize: '16',
  1603. }
  1604. },
  1605. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1606. type: 'category',
  1607. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1608. }],
  1609. yAxis: [{
  1610. axisLine:{
  1611. show:false,
  1612. lineStyle:{
  1613. color:"rgba(255,255,255,0.5)"
  1614. }
  1615. },
  1616. axisTick:{
  1617. show:false
  1618. },
  1619. splitLine:{
  1620. show:true,
  1621. lineStyle:{
  1622. type:'dotted',
  1623. color:"rgba(255,255,255,0.3)"
  1624. }
  1625. },
  1626. axisLabel:{
  1627. color:"rgba(255,255,255,0.8)",
  1628. formatter:function(params){
  1629. return params+"%"
  1630. }
  1631. },
  1632. type: 'value'
  1633. },
  1634. ],
  1635. series: [{
  1636. barWidth: 32,
  1637. barMaxWidth:32,
  1638. data: [120, 200, 150, 80, 70, 110, 130],
  1639. type: 'bar',
  1640. markPoint: {
  1641. data: [
  1642. {type: 'max', name: '最大值'},
  1643. {type: 'min', name: '最小值'}
  1644. ],
  1645. label:{
  1646. show:true,
  1647. fontWeight:"normal",
  1648. fontSize:12,
  1649. color:"white",
  1650. position:"insideBottom",
  1651. formatter:"{c}%"
  1652. }
  1653. },
  1654. itemStyle: {
  1655. normal: {
  1656. color:function(params){
  1657. if(Number(params.data)<0){
  1658. var num = incidentFivePecent_myColor.length;
  1659. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1660. offset: 0,
  1661. color: incidentFivePecent_myColor[params.dataIndex % num]
  1662. },
  1663. {
  1664. offset: 1,
  1665. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1666. }
  1667. ])
  1668. }else{
  1669. var num = incidentFivePecent_myColor.length;
  1670. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1671. offset: 0,
  1672. color: incidentFivePecent_myColor[params.dataIndex % num]
  1673. },
  1674. {
  1675. offset: 1,
  1676. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1677. }
  1678. ])
  1679. }
  1680. }
  1681. }
  1682. },
  1683. z: 2
  1684. },
  1685. ]
  1686. };
  1687. // 5
  1688. var dom_incidentFivePecent5 = document.getElementById("incidentFivePecent5");
  1689. var myChart_incidentFivePecent5 = echarts.init(dom_incidentFivePecent5);
  1690. myChart_incidentFivePecent5.showLoading({  
  1691. text: '数据加载中...',
  1692. color: '#c23531',
  1693. textColor: '#fff',
  1694. maskColor: 'rgba(255,255,255,0)',
  1695. zlevel: 0
  1696. });
  1697. var app = {};
  1698. var option_incidentFivePecent5 = null;
  1699. option_incidentFivePecent5 = {
  1700. grid: {
  1701. left: '6%',
  1702. top: '7%',
  1703. right: '6%',
  1704. bottom: '2%',
  1705. containLabel: true
  1706. },
  1707. xAxis: [{
  1708. axisLine:{
  1709. lineStyle:{
  1710. color:"rgba(255,255,255,0.5)"
  1711. }
  1712. },
  1713. axisTick:{
  1714. show:false
  1715. },
  1716. show :true,
  1717. offset: '27',
  1718. axisLabel: {
  1719. textStyle: {
  1720. color:"rgba(255,255,255,0.8)",
  1721. fontSize: '16',
  1722. }
  1723. },
  1724. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1725. type: 'category',
  1726. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1727. }],
  1728. yAxis: [{
  1729. axisLine:{
  1730. show:false,
  1731. lineStyle:{
  1732. color:"rgba(255,255,255,0.5)"
  1733. }
  1734. },
  1735. axisTick:{
  1736. show:false
  1737. },
  1738. splitLine:{
  1739. show:true,
  1740. lineStyle:{
  1741. type:'dotted',
  1742. color:"rgba(255,255,255,0.3)"
  1743. }
  1744. },
  1745. axisLabel:{
  1746. color:"rgba(255,255,255,0.8)",
  1747. formatter:function(params){
  1748. return params+"%"
  1749. }
  1750. },
  1751. type: 'value'
  1752. },
  1753. ],
  1754. series: [{
  1755. barWidth: 32,
  1756. barMaxWidth:32,
  1757. data: [120, 200, 150, 80, 70, 110, 130],
  1758. type: 'bar',
  1759. markPoint: {
  1760. symbol:'arrow',
  1761. symbolSize:1,
  1762. data: [
  1763. {type: 'max', name: '最大值'},
  1764. {type: 'min', name: '最小值'}
  1765. ],
  1766. label:{
  1767. show:true,
  1768. fontWeight:"normal",
  1769. fontSize:12,
  1770. color:"white",
  1771. position:"insideBottom",
  1772. formatter:"{c}%"
  1773. }
  1774. },
  1775. itemStyle: {
  1776. normal: {
  1777. color:function(params){
  1778. if(Number(params.data)<0){
  1779. var num = incidentFivePecent_myColor.length;
  1780. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1781. offset: 0,
  1782. color: incidentFivePecent_myColor[params.dataIndex % num]
  1783. },
  1784. {
  1785. offset: 1,
  1786. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1787. }
  1788. ])
  1789. }else{
  1790. var num = incidentFivePecent_myColor.length;
  1791. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1792. offset: 0,
  1793. color: incidentFivePecent_myColor[params.dataIndex % num]
  1794. },
  1795. {
  1796. offset: 1,
  1797. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1798. }
  1799. ])
  1800. }
  1801. }
  1802. }
  1803. },
  1804. z: 2
  1805. },
  1806. ]
  1807. };
  1808. // 6
  1809. var dom_incidentFivePecent6 = document.getElementById("incidentFivePecent6");
  1810. var myChart_incidentFivePecent6 = echarts.init(dom_incidentFivePecent6);
  1811. myChart_incidentFivePecent6.showLoading({  
  1812. text: '数据加载中...',
  1813. color: '#c23531',
  1814. textColor: '#fff',
  1815. maskColor: 'rgba(255,255,255,0)',
  1816. zlevel: 0
  1817. });
  1818. var app = {};
  1819. var option_incidentFivePecent6 = null;
  1820. option_incidentFivePecent6 = {
  1821. grid: {
  1822. left: '6%',
  1823. top: '7%',
  1824. right: '6%',
  1825. bottom: '2%',
  1826. containLabel: true
  1827. },
  1828. xAxis: [{
  1829. axisLine:{
  1830. lineStyle:{
  1831. color:"rgba(255,255,255,0.5)"
  1832. }
  1833. },
  1834. axisTick:{
  1835. show:false
  1836. },
  1837. show :true,
  1838. offset: '27',
  1839. axisLabel: {
  1840. textStyle: {
  1841. color:"rgba(255,255,255,0.8)",
  1842. fontSize: '16',
  1843. }
  1844. },
  1845. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1846. type: 'category',
  1847. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1848. }],
  1849. yAxis: [{
  1850. axisLine:{
  1851. show:false,
  1852. lineStyle:{
  1853. color:"rgba(255,255,255,0.5)"
  1854. }
  1855. },
  1856. axisTick:{
  1857. show:false
  1858. },
  1859. splitLine:{
  1860. show:true,
  1861. lineStyle:{
  1862. type:'dotted',
  1863. color:"rgba(255,255,255,0.3)"
  1864. }
  1865. },
  1866. axisLabel:{
  1867. color:"rgba(255,255,255,0.8)",
  1868. formatter:function(params){
  1869. return params+"%"
  1870. }
  1871. },
  1872. type: 'value'
  1873. },
  1874. ],
  1875. series: [{
  1876. barWidth: 32,
  1877. barMaxWidth:32,
  1878. data: [120, 200, 150, 80, 70, 110, 130],
  1879. type: 'bar',
  1880. markPoint: {
  1881. data: [
  1882. {type: 'max', name: '最大值'},
  1883. {type: 'min', name: '最小值'}
  1884. ],
  1885. label:{
  1886. show:true,
  1887. fontWeight:"normal",
  1888. fontSize:12,
  1889. color:"white",
  1890. position:"insideBottom",
  1891. // distance:10,
  1892. offset:[0,5],
  1893. formatter:"{c}%"
  1894. }
  1895. },
  1896. itemStyle: {
  1897. normal: {
  1898. color:function(params){
  1899. if(Number(params.data)<0){
  1900. var num = incidentFivePecent_myColor.length;
  1901. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  1902. offset: 0,
  1903. color: incidentFivePecent_myColor[params.dataIndex % num]
  1904. },
  1905. {
  1906. offset: 1,
  1907. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1908. }
  1909. ])
  1910. }else{
  1911. var num = incidentFivePecent_myColor.length;
  1912. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1913. offset: 0,
  1914. color: incidentFivePecent_myColor[params.dataIndex % num]
  1915. },
  1916. {
  1917. offset: 1,
  1918. color: incidentFivePecent_myColor2[params.dataIndex % num]
  1919. }
  1920. ])
  1921. }
  1922. }
  1923. }
  1924. },
  1925. z: 2
  1926. },
  1927. ]
  1928. };
  1929. // 7
  1930. var dom_incidentFivePecent7 = document.getElementById("incidentFivePecent7");
  1931. var myChart_incidentFivePecent7 = echarts.init(dom_incidentFivePecent7);
  1932. myChart_incidentFivePecent7.showLoading({  
  1933. text: '数据加载中...',
  1934. color: '#c23531',
  1935. textColor: '#fff',
  1936. maskColor: 'rgba(255,255,255,0)',
  1937. zlevel: 0
  1938. });
  1939. var app = {};
  1940. var option_incidentFivePecent7 = null;
  1941. option_incidentFivePecent7 = {
  1942. grid: {
  1943. left: '6%',
  1944. top: '12%',
  1945. right: '6%',
  1946. bottom: '2%',
  1947. containLabel: true
  1948. },
  1949. xAxis: [{
  1950. axisLine:{
  1951. lineStyle:{
  1952. color:"rgba(255,255,255,0.5)"
  1953. }
  1954. },
  1955. axisTick:{
  1956. show:false
  1957. },
  1958. show :true,
  1959. offset: '27',
  1960. axisLabel: {
  1961. textStyle: {
  1962. color:"rgba(255,255,255,0.8)",
  1963. fontSize: '16',
  1964. }
  1965. },
  1966. data: ['李丹', '林水', '东西', '德古拉', '古田', '杨云', '米勒', '莫妮卡', '土豆', '杨云'],
  1967. type: 'category',
  1968. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  1969. }],
  1970. yAxis: [{
  1971. axisLine:{
  1972. show:false,
  1973. lineStyle:{
  1974. color:"rgba(255,255,255,0.5)"
  1975. }
  1976. },
  1977. axisTick:{
  1978. show:false
  1979. },
  1980. splitLine:{
  1981. show:true,
  1982. lineStyle:{
  1983. type:'dotted',
  1984. color:"rgba(255,255,255,0.3)"
  1985. }
  1986. },
  1987. axisLabel:{
  1988. color:"rgba(255,255,255,0.8)",
  1989. formatter:function(params){
  1990. return params+"%"
  1991. }
  1992. },
  1993. type: 'value'
  1994. },
  1995. ],
  1996. series: [{
  1997. barWidth: 32,
  1998. barMaxWidth:32,
  1999. data: [120, 200, 150, 80, 70, 110, 130],
  2000. type: 'bar',
  2001. markPoint: {
  2002. data: [
  2003. {type: 'max', name: '最大值'},
  2004. {type: 'min', name: '最小值'}
  2005. ],
  2006. label:{
  2007. show:true,
  2008. fontWeight:"normal",
  2009. fontSize:12,
  2010. color:"white",
  2011. position:"insideBottom",
  2012. // position:[20,20],
  2013. formatter:"{c}%"
  2014. }
  2015. },
  2016. itemStyle: {
  2017. normal: {
  2018. color:function(params){
  2019. if(Number(params.data)<0){
  2020. var num = incidentFivePecent_myColor.length;
  2021. return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  2022. offset: 0,
  2023. color: incidentFivePecent_myColor[params.dataIndex % num]
  2024. },
  2025. {
  2026. offset: 1,
  2027. color: incidentFivePecent_myColor2[params.dataIndex % num]
  2028. }
  2029. ])
  2030. }else{
  2031. var num = incidentFivePecent_myColor.length;
  2032. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2033. offset: 0,
  2034. color: incidentFivePecent_myColor[params.dataIndex % num]
  2035. },
  2036. {
  2037. offset: 1,
  2038. color: incidentFivePecent_myColor2[params.dataIndex % num]
  2039. }
  2040. ])
  2041. }
  2042. }
  2043. }
  2044. },
  2045. z: 2
  2046. },
  2047. ]
  2048. };
  2049. // 近五年事件分类占比雷达图
  2050. var dom_classification = document.getElementById("classification");
  2051. var myChart_classification = echarts.init(dom_classification);
  2052. myChart_classification.showLoading({  
  2053. text: '数据加载中...',
  2054. color: '#c23531',
  2055. textColor: '#fff',
  2056. maskColor: 'rgba(255,255,255,0)',
  2057. zlevel: 0
  2058. });
  2059. var app = {};
  2060. var option_classification = null;
  2061. option_classification = {
  2062. tooltip: {},
  2063. legend: {
  2064. data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)'],
  2065. width:100,
  2066. right:10,
  2067. bottom:10,
  2068. textStyle:{
  2069. color:"white"
  2070. },
  2071. itemHeight:5
  2072. },
  2073. radar: {
  2074. // shape: 'circle',
  2075. name: {
  2076. textStyle: {
  2077. color: 'rgba(255,255,255,0.5)',
  2078. // backgroundColor: '#999',
  2079. borderRadius: 3,
  2080. padding: [3, 5]
  2081. }
  2082. },
  2083. splitLine:{
  2084. show:true,
  2085. lineStyle:{
  2086. color:'rgba(255,255,255,0.3)'
  2087. }
  2088. },
  2089. axisLine:{
  2090. lineStyle:{
  2091. color:'rgba(255,255,255,0.3)'
  2092. }
  2093. },
  2094. splitArea:{
  2095. show:false
  2096. },
  2097. center:['40%','50%'],
  2098. indicator: [
  2099. { name: '销售(sales)', max: 6500},
  2100. { name: '管理(Administration)', max: 16000},
  2101. { name: '信息技术(Information Techology)', max: 30000},
  2102. { name: '客服(Customer Support)', max: 38000},
  2103. { name: '研发(Development)', max: 52000},
  2104. { name: '市场(Marketing)', max: 25000}
  2105. ]
  2106. },
  2107. series: [{
  2108. name: '预算 vs 开销(Budget vs spending)',
  2109. type: 'radar',
  2110. symbol:'none',
  2111. data : [
  2112. {
  2113. value : [4300, 10000, 28000, 35000, 50000, 19000],
  2114. name : '预算分配(Allocated Budget)'
  2115. },
  2116. {
  2117. value : [5000, 14000, 28000, 31000, 42000, 21000],
  2118. name : '实际开销(Actual Spending)'
  2119. }
  2120. ]
  2121. }],
  2122. color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2123. };;
  2124. // // 近五年事件分类占比
  2125. // // 1
  2126. // var dom_classification1 = document.getElementById("classification1");
  2127. // var myChart_classification1 = echarts.init(dom_classification1);
  2128. // myChart_classification1.showLoading({  
  2129. // text: '数据加载中...',
  2130. // color: '#c23531',
  2131. // textColor: '#fff',
  2132. // maskColor: 'rgba(255,255,255,0)',
  2133. // zlevel: 0
  2134. // });
  2135. // var app = {};
  2136. // var option_classification1 = null;
  2137. // option_classification1 = {
  2138. // // title: {
  2139. // // subtext: '0',
  2140. // // text: "事件总数(件)",
  2141. // // itemGap: 3,
  2142. // // "x": '50%',
  2143. // // "y": '40%',
  2144. // // textAlign: "center",
  2145. // // "textStyle": {
  2146. // // "fontWeight": 'normal',
  2147. // // "fontSize": 16,
  2148. // // "color": '#18f0ff',
  2149. // // },
  2150. // // "subtextStyle": {
  2151. // // "fontWeight": 'normal',
  2152. // // "fontSize": 22,
  2153. // // "color": 'white',
  2154. // // "lineHeight": 44
  2155. // // },
  2156. // // },
  2157. // grid: {
  2158. // top: '13%',
  2159. // left: '1%',
  2160. // right: '1%',
  2161. // bottom: '8%',
  2162. // containLabel: true,
  2163. // },
  2164. // legend: {
  2165. // orient: 'vertical',
  2166. // x: 'left',
  2167. // y: 'bottom',
  2168. // left:"23%",
  2169. // show:false,
  2170. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2171. // textStyle: {
  2172. // color: 'white',
  2173. // borderColor: '#fff',
  2174. // fontSize:13,
  2175. // show:false
  2176. // },
  2177. // formatter: function(param) {
  2178. // },
  2179. // itemWidth:15,
  2180. // width:450,
  2181. // height:100,
  2182. // itemGap:20,
  2183. // },
  2184. // series: [
  2185. // {
  2186. // name:'访问来源',
  2187. // type:'pie',
  2188. // radius: ['40%', '70%'],
  2189. // center: ['50%', '50%'],
  2190. // avoidLabelOverlap: true,
  2191. // label: {
  2192. // align: 'left',
  2193. // normal: {
  2194. // show: true,
  2195. // position: 'outside',
  2196. // rich:"rich",
  2197. // formatter:function(param){
  2198. // // return param.name+'\n'+param.value+' '+param.percent+"%"
  2199. // return param.name+'\n'+param.percent+"%"
  2200. // },
  2201. // color:"rgba(255,255,255,0.6)"
  2202. // },
  2203. // // emphasis: {
  2204. // // show: false,
  2205. // // textStyle: {
  2206. // // fontSize: '30',
  2207. // // fontWeight: 'bold'
  2208. // // }
  2209. // // }
  2210. // },
  2211. // labelLine: {
  2212. // normal: {
  2213. // show: true
  2214. // }
  2215. // },
  2216. // data:[
  2217. // {value:335, name:'工作组1'},
  2218. // {value:310, name:'工作组2'},
  2219. // {value:234, name:'工作组3'},
  2220. // {value:135, name:'工作组4'},
  2221. // {value:1548, name:'工作组5'},
  2222. // {value:154, name:'工作组6'}
  2223. // ]
  2224. // }
  2225. // ],
  2226. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2227. // };;
  2228. // // 2
  2229. // var dom_classification2 = document.getElementById("classification2");
  2230. // var myChart_classification2 = echarts.init(dom_classification2);
  2231. // myChart_classification2.showLoading({  
  2232. // text: '数据加载中...',
  2233. // color: '#c23531',
  2234. // textColor: '#fff',
  2235. // maskColor: 'rgba(255,255,255,0)',
  2236. // zlevel: 0
  2237. // });
  2238. // var app = {};
  2239. // var option_classification2 = null;
  2240. // option_classification2 = {
  2241. // // title: {
  2242. // // subtext: '0',
  2243. // // text: "事件总数(件)",
  2244. // // itemGap: 3,
  2245. // // "x": '50%',
  2246. // // "y": '40%',
  2247. // // textAlign: "center",
  2248. // // "textStyle": {
  2249. // // "fontWeight": 'normal',
  2250. // // "fontSize": 16,
  2251. // // "color": '#18f0ff',
  2252. // // },
  2253. // // "subtextStyle": {
  2254. // // "fontWeight": 'normal',
  2255. // // "fontSize": 22,
  2256. // // "color": 'white',
  2257. // // "lineHeight": 44
  2258. // // },
  2259. // // },
  2260. // grid: {
  2261. // top: '13%',
  2262. // left: '1%',
  2263. // right: '1%',
  2264. // bottom: '8%',
  2265. // containLabel: true,
  2266. // },
  2267. // legend: {
  2268. // orient: 'vertical',
  2269. // x: 'left',
  2270. // y: 'bottom',
  2271. // left:"23%",
  2272. // show:false,
  2273. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2274. // textStyle: {
  2275. // color: 'white',
  2276. // borderColor: '#fff',
  2277. // fontSize:13,
  2278. // show:false
  2279. // },
  2280. // formatter: function(param) {
  2281. // },
  2282. // itemWidth:15,
  2283. // width:450,
  2284. // height:100,
  2285. // itemGap:20,
  2286. // },
  2287. // series: [
  2288. // {
  2289. // name:'访问来源',
  2290. // type:'pie',
  2291. // radius: ['40%', '70%'],
  2292. // center: ['50%', '50%'],
  2293. // avoidLabelOverlap: true,
  2294. // label: {
  2295. // align: 'left',
  2296. // normal: {
  2297. // show: true,
  2298. // position: 'outside',
  2299. // rich:"rich",
  2300. // formatter:function(param){
  2301. // // console.log(param)
  2302. // // return param.value+' '+param.percent+"%"
  2303. // return param.name+'\n'+param.percent+"%"
  2304. // },
  2305. // color:"rgba(255,255,255,0.6)"
  2306. // },
  2307. // // emphasis: {
  2308. // // show: false,
  2309. // // textStyle: {
  2310. // // fontSize: '30',
  2311. // // fontWeight: 'bold'
  2312. // // }
  2313. // // }
  2314. // },
  2315. // labelLine: {
  2316. // normal: {
  2317. // show: true
  2318. // }
  2319. // },
  2320. // data:[
  2321. // {value:335, name:'工作组1'},
  2322. // {value:310, name:'工作组2'},
  2323. // {value:234, name:'工作组3'},
  2324. // {value:135, name:'工作组4'},
  2325. // {value:1548, name:'工作组5'},
  2326. // {value:154, name:'工作组6'}
  2327. // ]
  2328. // }
  2329. // ],
  2330. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2331. // };;
  2332. // // 3
  2333. // var dom_classification3 = document.getElementById("classification3");
  2334. // var myChart_classification3 = echarts.init(dom_classification3);
  2335. // myChart_classification3.showLoading({  
  2336. // text: '数据加载中...',
  2337. // color: '#c23531',
  2338. // textColor: '#fff',
  2339. // maskColor: 'rgba(255,255,255,0)',
  2340. // zlevel: 0
  2341. // });
  2342. // var app = {};
  2343. // var option_classification3 = null;
  2344. // option_classification3 = {
  2345. // // title: {
  2346. // // subtext: '0',
  2347. // // text: "事件总数(件)",
  2348. // // itemGap: 3,
  2349. // // "x": '50%',
  2350. // // "y": '40%',
  2351. // // textAlign: "center",
  2352. // // "textStyle": {
  2353. // // "fontWeight": 'normal',
  2354. // // "fontSize": 16,
  2355. // // "color": '#18f0ff',
  2356. // // },
  2357. // // "subtextStyle": {
  2358. // // "fontWeight": 'normal',
  2359. // // "fontSize": 22,
  2360. // // "color": 'white',
  2361. // // "lineHeight": 44
  2362. // // },
  2363. // // },
  2364. // grid: {
  2365. // top: '13%',
  2366. // left: '1%',
  2367. // right: '1%',
  2368. // bottom: '8%',
  2369. // containLabel: true,
  2370. // },
  2371. // legend: {
  2372. // orient: 'vertical',
  2373. // x: 'left',
  2374. // y: 'bottom',
  2375. // left:"23%",
  2376. // show:false,
  2377. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2378. // textStyle: {
  2379. // color: 'white',
  2380. // borderColor: '#fff',
  2381. // fontSize:13,
  2382. // show:false
  2383. // },
  2384. // formatter: function(param) {
  2385. // },
  2386. // itemWidth:15,
  2387. // width:450,
  2388. // height:100,
  2389. // itemGap:20,
  2390. // },
  2391. // series: [
  2392. // {
  2393. // name:'访问来源',
  2394. // type:'pie',
  2395. // radius: ['40%', '70%'],
  2396. // center: ['50%', '50%'],
  2397. // avoidLabelOverlap: true,
  2398. // label: {
  2399. // align: 'left',
  2400. // normal: {
  2401. // show: true,
  2402. // position: 'outside',
  2403. // rich:"rich",
  2404. // formatter:function(param){
  2405. // // console.log(param)
  2406. // // return param.value+' '+param.percent+"%"
  2407. // return param.name+'\n'+param.percent+"%"
  2408. // },
  2409. // color:"rgba(255,255,255,0.6)"
  2410. // },
  2411. // // emphasis: {
  2412. // // show: false,
  2413. // // textStyle: {
  2414. // // fontSize: '30',
  2415. // // fontWeight: 'bold'
  2416. // // }
  2417. // // }
  2418. // },
  2419. // labelLine: {
  2420. // normal: {
  2421. // show: true
  2422. // }
  2423. // },
  2424. // data:[
  2425. // {value:335, name:'工作组1'},
  2426. // {value:310, name:'工作组2'},
  2427. // {value:234, name:'工作组3'},
  2428. // {value:135, name:'工作组4'},
  2429. // {value:1548, name:'工作组5'},
  2430. // {value:154, name:'工作组6'}
  2431. // ]
  2432. // }
  2433. // ],
  2434. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2435. // };;
  2436. // // 4
  2437. // var dom_classification4 = document.getElementById("classification4");
  2438. // var myChart_classification4 = echarts.init(dom_classification4);
  2439. // myChart_classification4.showLoading({  
  2440. // text: '数据加载中...',
  2441. // color: '#c23531',
  2442. // textColor: '#fff',
  2443. // maskColor: 'rgba(255,255,255,0)',
  2444. // zlevel: 0
  2445. // });
  2446. // var app = {};
  2447. // var option_classification4 = null;
  2448. // option_classification4 = {
  2449. // // title: {
  2450. // // subtext: '0',
  2451. // // text: "事件总数(件)",
  2452. // // itemGap: 3,
  2453. // // "x": '50%',
  2454. // // "y": '40%',
  2455. // // textAlign: "center",
  2456. // // "textStyle": {
  2457. // // "fontWeight": 'normal',
  2458. // // "fontSize": 16,
  2459. // // "color": '#18f0ff',
  2460. // // },
  2461. // // "subtextStyle": {
  2462. // // "fontWeight": 'normal',
  2463. // // "fontSize": 22,
  2464. // // "color": 'white',
  2465. // // "lineHeight": 44
  2466. // // },
  2467. // // },
  2468. // grid: {
  2469. // top: '13%',
  2470. // left: '1%',
  2471. // right: '1%',
  2472. // bottom: '8%',
  2473. // containLabel: true,
  2474. // },
  2475. // legend: {
  2476. // orient: 'vertical',
  2477. // x: 'left',
  2478. // y: 'bottom',
  2479. // left:"23%",
  2480. // show:false,
  2481. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2482. // textStyle: {
  2483. // color: 'white',
  2484. // borderColor: '#fff',
  2485. // fontSize:13,
  2486. // show:false
  2487. // },
  2488. // formatter: function(param) {
  2489. // },
  2490. // itemWidth:15,
  2491. // width:450,
  2492. // height:100,
  2493. // itemGap:20,
  2494. // },
  2495. // series: [
  2496. // {
  2497. // name:'访问来源',
  2498. // type:'pie',
  2499. // radius: ['40%', '70%'],
  2500. // center: ['50%', '50%'],
  2501. // avoidLabelOverlap: true,
  2502. // label: {
  2503. // align: 'left',
  2504. // normal: {
  2505. // show: true,
  2506. // position: 'outside',
  2507. // rich:"rich",
  2508. // formatter:function(param){
  2509. // // console.log(param)
  2510. // // return param.value+' '+param.percent+"%"
  2511. // return param.name+'\n'+param.percent+"%"
  2512. // },
  2513. // color:"rgba(255,255,255,0.6)"
  2514. // },
  2515. // // emphasis: {
  2516. // // show: false,
  2517. // // textStyle: {
  2518. // // fontSize: '30',
  2519. // // fontWeight: 'bold'
  2520. // // }
  2521. // // }
  2522. // },
  2523. // labelLine: {
  2524. // normal: {
  2525. // show: true
  2526. // }
  2527. // },
  2528. // data:[
  2529. // {value:335, name:'工作组1'},
  2530. // {value:310, name:'工作组2'},
  2531. // {value:234, name:'工作组3'},
  2532. // {value:135, name:'工作组4'},
  2533. // {value:1548, name:'工作组5'},
  2534. // {value:154, name:'工作组6'}
  2535. // ]
  2536. // }
  2537. // ],
  2538. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2539. // };;
  2540. // // 5
  2541. // var dom_classification5 = document.getElementById("classification5");
  2542. // var myChart_classification5 = echarts.init(dom_classification5);
  2543. // myChart_classification5.showLoading({  
  2544. // text: '数据加载中...',
  2545. // color: '#c23531',
  2546. // textColor: '#fff',
  2547. // maskColor: 'rgba(255,255,255,0)',
  2548. // zlevel: 0
  2549. // });
  2550. // var app = {};
  2551. // var option_classification5 = null;
  2552. // option_classification5 = {
  2553. // // title: {
  2554. // // subtext: '0',
  2555. // // text: "事件总数(件)",
  2556. // // itemGap: 3,
  2557. // // "x": '50%',
  2558. // // "y": '40%',
  2559. // // textAlign: "center",
  2560. // // "textStyle": {
  2561. // // "fontWeight": 'normal',
  2562. // // "fontSize": 16,
  2563. // // "color": '#18f0ff',
  2564. // // },
  2565. // // "subtextStyle": {
  2566. // // "fontWeight": 'normal',
  2567. // // "fontSize": 22,
  2568. // // "color": 'white',
  2569. // // "lineHeight": 44
  2570. // // },
  2571. // // },
  2572. // grid: {
  2573. // top: '13%',
  2574. // left: '1%',
  2575. // right: '1%',
  2576. // bottom: '8%',
  2577. // containLabel: true,
  2578. // },
  2579. // legend: {
  2580. // orient: 'vertical',
  2581. // x: 'left',
  2582. // y: 'bottom',
  2583. // left:"23%",
  2584. // show:false,
  2585. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2586. // textStyle: {
  2587. // color: 'white',
  2588. // borderColor: '#fff',
  2589. // fontSize:13,
  2590. // show:false
  2591. // },
  2592. // formatter: function(param) {
  2593. // },
  2594. // itemWidth:15,
  2595. // width:450,
  2596. // height:100,
  2597. // itemGap:20,
  2598. // },
  2599. // series: [
  2600. // {
  2601. // name:'访问来源',
  2602. // type:'pie',
  2603. // radius: ['40%', '70%'],
  2604. // center: ['50%', '50%'],
  2605. // avoidLabelOverlap: true,
  2606. // label: {
  2607. // align: 'left',
  2608. // normal: {
  2609. // show: true,
  2610. // position: 'outside',
  2611. // rich:"rich",
  2612. // formatter:function(param){
  2613. // // console.log(param)
  2614. // // return param.value+' '+param.percent+"%"
  2615. // return param.name+'\n'+param.percent+"%"
  2616. // },
  2617. // color:"rgba(255,255,255,0.6)"
  2618. // },
  2619. // // emphasis: {
  2620. // // show: false,
  2621. // // textStyle: {
  2622. // // fontSize: '30',
  2623. // // fontWeight: 'bold'
  2624. // // }
  2625. // // }
  2626. // },
  2627. // labelLine: {
  2628. // normal: {
  2629. // show: true
  2630. // }
  2631. // },
  2632. // data:[
  2633. // {value:335, name:'工作组1'},
  2634. // {value:310, name:'工作组2'},
  2635. // {value:234, name:'工作组3'},
  2636. // {value:135, name:'工作组4'},
  2637. // {value:1548, name:'工作组5'},
  2638. // {value:154, name:'工作组6'}
  2639. // ]
  2640. // }
  2641. // ],
  2642. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2643. // };;
  2644. // // 6
  2645. // var dom_classification6 = document.getElementById("classification6");
  2646. // var myChart_classification6 = echarts.init(dom_classification6);
  2647. // myChart_classification6.showLoading({  
  2648. // text: '数据加载中...',
  2649. // color: '#c23531',
  2650. // textColor: '#fff',
  2651. // maskColor: 'rgba(255,255,255,0)',
  2652. // zlevel: 0
  2653. // });
  2654. // var app = {};
  2655. // var option_classification6 = null;
  2656. // option_classification6 = {
  2657. // // title: {
  2658. // // subtext: '0',
  2659. // // text: "事件总数(件)",
  2660. // // itemGap: 3,
  2661. // // "x": '50%',
  2662. // // "y": '40%',
  2663. // // textAlign: "center",
  2664. // // "textStyle": {
  2665. // // "fontWeight": 'normal',
  2666. // // "fontSize": 16,
  2667. // // "color": '#18f0ff',
  2668. // // },
  2669. // // "subtextStyle": {
  2670. // // "fontWeight": 'normal',
  2671. // // "fontSize": 22,
  2672. // // "color": 'white',
  2673. // // "lineHeight": 44
  2674. // // },
  2675. // // },
  2676. // grid: {
  2677. // top: '13%',
  2678. // left: '1%',
  2679. // right: '1%',
  2680. // bottom: '8%',
  2681. // containLabel: true,
  2682. // },
  2683. // legend: {
  2684. // orient: 'vertical',
  2685. // x: 'left',
  2686. // y: 'bottom',
  2687. // left:"23%",
  2688. // show:false,
  2689. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2690. // textStyle: {
  2691. // color: 'white',
  2692. // borderColor: '#fff',
  2693. // fontSize:13,
  2694. // show:false
  2695. // },
  2696. // formatter: function(param) {
  2697. // },
  2698. // itemWidth:15,
  2699. // width:450,
  2700. // height:100,
  2701. // itemGap:20,
  2702. // },
  2703. // series: [
  2704. // {
  2705. // name:'访问来源',
  2706. // type:'pie',
  2707. // radius: ['40%', '70%'],
  2708. // center: ['50%', '50%'],
  2709. // avoidLabelOverlap: true,
  2710. // label: {
  2711. // align: 'left',
  2712. // normal: {
  2713. // show: true,
  2714. // position: 'outside',
  2715. // rich:"rich",
  2716. // formatter:function(param){
  2717. // // console.log(param)
  2718. // // return param.value+' '+param.percent+"%"
  2719. // return param.name+'\n'+param.percent+"%"
  2720. // },
  2721. // color:"rgba(255,255,255,0.6)"
  2722. // },
  2723. // // emphasis: {
  2724. // // show: false,
  2725. // // textStyle: {
  2726. // // fontSize: '30',
  2727. // // fontWeight: 'bold'
  2728. // // }
  2729. // // }
  2730. // },
  2731. // labelLine: {
  2732. // normal: {
  2733. // show: true
  2734. // }
  2735. // },
  2736. // data:[
  2737. // {value:335, name:'工作组1'},
  2738. // {value:310, name:'工作组2'},
  2739. // {value:234, name:'工作组3'},
  2740. // {value:135, name:'工作组4'},
  2741. // {value:1548, name:'工作组5'},
  2742. // {value:154, name:'工作组6'}
  2743. // ]
  2744. // }
  2745. // ],
  2746. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2747. // };;
  2748. // // 7
  2749. // var dom_classification7 = document.getElementById("classification7");
  2750. // var myChart_classification7 = echarts.init(dom_classification7);
  2751. // myChart_classification7.showLoading({  
  2752. // text: '数据加载中...',
  2753. // color: '#c23531',
  2754. // textColor: '#fff',
  2755. // maskColor: 'rgba(255,255,255,0)',
  2756. // zlevel: 0
  2757. // });
  2758. // var app = {};
  2759. // var option_classification7 = null;
  2760. // option_classification7 = {
  2761. // // title: {
  2762. // // subtext: '0',
  2763. // // text: "事件总数(件)",
  2764. // // itemGap: 3,
  2765. // // "x": '50%',
  2766. // // "y": '40%',
  2767. // // textAlign: "center",
  2768. // // "textStyle": {
  2769. // // "fontWeight": 'normal',
  2770. // // "fontSize": 16,
  2771. // // "color": '#18f0ff',
  2772. // // },
  2773. // // "subtextStyle": {
  2774. // // "fontWeight": 'normal',
  2775. // // "fontSize": 22,
  2776. // // "color": 'white',
  2777. // // "lineHeight": 44
  2778. // // },
  2779. // // },
  2780. // grid: {
  2781. // top: '13%',
  2782. // left: '1%',
  2783. // right: '1%',
  2784. // bottom: '8%',
  2785. // containLabel: true,
  2786. // },
  2787. // legend: {
  2788. // orient: 'vertical',
  2789. // x: 'left',
  2790. // y: 'bottom',
  2791. // left:"23%",
  2792. // show:false,
  2793. // data:['工作组1','工作组2','工作组3','工作组4','工作组5','工作组6'],
  2794. // textStyle: {
  2795. // color: 'white',
  2796. // borderColor: '#fff',
  2797. // fontSize:13,
  2798. // show:false
  2799. // },
  2800. // formatter: function(param) {
  2801. // },
  2802. // itemWidth:15,
  2803. // width:450,
  2804. // height:100,
  2805. // itemGap:20,
  2806. // },
  2807. // series: [
  2808. // {
  2809. // name:'访问来源',
  2810. // type:'pie',
  2811. // radius: ['40%', '70%'],
  2812. // center: ['50%', '50%'],
  2813. // avoidLabelOverlap: true,
  2814. // label: {
  2815. // align: 'left',
  2816. // normal: {
  2817. // show: true,
  2818. // position: 'outside',
  2819. // rich:"rich",
  2820. // formatter:function(param){
  2821. // // console.log(param)
  2822. // // return param.value+' '+param.percent+"%"
  2823. // return param.name+'\n'+param.percent+"%"
  2824. // },
  2825. // color:"rgba(255,255,255,0.6)"
  2826. // },
  2827. // // emphasis: {
  2828. // // show: false,
  2829. // // textStyle: {
  2830. // // fontSize: '30',
  2831. // // fontWeight: 'bold'
  2832. // // }
  2833. // // }
  2834. // },
  2835. // labelLine: {
  2836. // normal: {
  2837. // show: true
  2838. // }
  2839. // },
  2840. // data:[
  2841. // {value:335, name:'工作组1'},
  2842. // {value:310, name:'工作组2'},
  2843. // {value:234, name:'工作组3'},
  2844. // {value:135, name:'工作组4'},
  2845. // {value:1548, name:'工作组5'},
  2846. // {value:154, name:'工作组6'}
  2847. // ]
  2848. // }
  2849. // ],
  2850. // color:["#ecc625","#228ed7","#f98f3b","#d0402f","#118178","#c053d5"]
  2851. // };;
  2852. $scope.incidentFivePecentBoxTabList=0;
  2853. $scope.classificationBoxTabList=0;
  2854. $scope.incidentFivePecentBoxChartsList=1;
  2855. $scope.classificationBoxChartsList=1;
  2856. $scope.timerToChange=$interval(function(){
  2857. $scope.incidentFivePecentBoxTabList++;
  2858. $scope.classificationBoxTabList++;
  2859. if($scope.incidentFivePecentBoxTabList==5){
  2860. $scope.incidentFivePecentBoxTabList=0;
  2861. };
  2862. if($scope.classificationBoxTabList==6){
  2863. $scope.classificationBoxTabList=0;
  2864. };
  2865. var l="-"+920*$scope.incidentFivePecentBoxChartsList+"px";
  2866. $('.incidentFivePecentFlex:eq(0)').animate({left:l},0,function(){
  2867. if($scope.incidentFivePecentBoxChartsList==5){
  2868. $(this).css('left',0);
  2869. $scope.incidentFivePecentBoxChartsList=1;
  2870. }else{
  2871. $scope.incidentFivePecentBoxChartsList++;
  2872. }
  2873. });
  2874. var k="-"+464*$scope.classificationBoxChartsList+"px";
  2875. $('.classificationFlex:eq(0)').animate({left:k},0,function(){
  2876. if($scope.classificationBoxChartsList==6){
  2877. $(this).css('left',0);
  2878. $scope.classificationBoxChartsList=1;
  2879. }else{
  2880. $scope.classificationBoxChartsList++;
  2881. }
  2882. });
  2883. },3000);
  2884. $scope.timeToRefresh=$interval(function(){
  2885. // getSatisfiedData({
  2886. // // "start":nowMonth+"-01",
  2887. // // "end":nowDay
  2888. // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  2889. // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  2890. // });
  2891. // getPeopleOnTimeData({
  2892. // // "start":nowMonth+"-01",
  2893. // // "end":nowDay
  2894. // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  2895. // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  2896. // });
  2897. // getFaultData({
  2898. // // "start":nowMonth+"-01",
  2899. // // "end":nowDay
  2900. // "start":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  2901. // "end":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  2902. // });
  2903. // getSourceData({
  2904. // // "startTime":nowMonth+"-01",
  2905. // // "endTime":nowDay
  2906. // "startTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-01",
  2907. // "endTime":nowYear+"-"+"0"+String(Number(nowMonthOnly)-1)+"-30",
  2908. // });
  2909. getResponseData({
  2910. "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
  2911. "end":nowDay
  2912. });
  2913. getWollData({
  2914. "start":moment(new Date().getTime()-86400000*6).format("YYYY-MM-DD"),
  2915. "end":nowDay
  2916. });
  2917. getiIncidentFiveAllData({
  2918. "start":fiveYearAgo,
  2919. "end":nowYear
  2920. });
  2921. },300000);
  2922. $scope.$on('destroy',function(){
  2923. $interval.cancel($scope.timerToChange);
  2924. $interval.cancel($scope.timeToRefresh)
  2925. })
  2926. }]);