charts4.js 99 KB

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