charts4.js 100 KB

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