12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744 |
- 'use strict';
- app.controller('incident_reportCtrl', ["$scope", "$rootScope", "$state", "$timeout", "$interval", "$http", "$cookieStore", "SweetAlert", "Restangular", "api_report", "api_statistic", "moment", 'api_user_data', 'api_bpm_data', 'api_report_data', function ($scope, $rootScope, $state, $timeout, $interval, $http, $cookieStore, SweetAlert, Restangular, api_report, api_statistic, moment, api_user_data, api_bpm_data, api_report_data) {
- // 选择日期:
- $scope.dateSelected = [{
- name: '近90天',
- id: 0
- }, {
- name: '近1年',
- id: 1
- }, {
- name: '近3年',
- id: 2
- }, {
- name: '近5年',
- id: 3
- }]
- $scope.tap = 'QSFX';
- $scope.tap1 = 'flqs';
- $scope.searchkeys = {}; //搜索条件
- $scope.area_place = {}; //搜索条件
- $scope.dateChoose = {}; //选择日期组件存储值
- $scope.BTdata
- $scope.nowdata = moment(new Date()).format('YYYY/MM/DD HH:ss:mm');
- var weeks = new Date().getDay();
- $scope.starttimes = moment(new Date().getTime() - 86400000 * (weeks + 6 - 1)).format('YYYY-MM-DD 00:00:00');
- $scope.endtimes = moment(new Date().getTime() - 86400000 * (weeks - 1)).format('YYYY-MM-DD 23:59:59');
- $scope.changeForm = function (paramDateFrom) {
- $scope.starttimes = moment(paramDateFrom).format('YYYY-MM-DD');
- }
- $scope.changeTo = function (paramDateTo) {
- $scope.endtimes = moment(paramDateTo).format('YYYY-MM-DD');
- }
- $scope.searchkeys.startTime = $scope.starttimes;
- $scope.searchkeys.endTime = $scope.endtimes;
- console.log($scope.searchkeys.startTime, $scope.searchkeys.endTime)
- // 运维报表搜索条件:
- $scope.YWBB_searchKeys = {
- 'startTime': $scope.searchkeys.startTime,
- 'endTime': $scope.searchkeys.endTime,
- }
- // n天前
- $scope.GetDateStr = function (AddDayCount) {
- var dd = new Date();
- dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
- var y = dd.getFullYear();
- var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期,不足10补0
- var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号,不足10补0
- return y + "-" + m + "-" + d;
- }
- //上周
- $scope.week = function () {
- $scope.searchstate = "week";
- var weeks = new Date().getDay();
- $scope.starttimes = moment(new Date().getTime() - 86400000 * (weeks + 6)).format('YYYY-MM-DD');
- $scope.endtimes = moment(new Date().getTime() - 86400000 * (weeks)).format('YYYY-MM-DD');
- $scope.searchkeys.startTime = $scope.starttimes;
- $scope.searchkeys.endTime = $scope.endtimes;
- }
- //上月
- $scope.month = function () {
- $scope.searchstate = "month";
- $scope.starttimes = moment((new Date(moment().startOf('month'))).setMonth((new Date()).getMonth() - 1)).format('YYYY-MM-DD');
- $scope.endtimes = moment((new Date(moment().startOf('month'))).setMonth((new Date()).getMonth()) - 86400000).format('YYYY-MM-DD');
- $scope.searchkeys.startTime = $scope.starttimes;
- $scope.searchkeys.endTime = $scope.endtimes;
- }
- //今年(1月1日-至今)
- $scope.year = function () {
- $scope.searchstate = "year";
- $scope.starttimes = moment().startOf('year').format('YYYY-MM-DD 00:00:00');
- $scope.endtimes = moment().format('YYYY-MM-DD 23:59:59');
- $scope.searchkeys.startTime = $scope.starttimes;
- $scope.searchkeys.endTime = $scope.endtimes;
- }
- // 近n年
- $scope.nearYear = function (n) {
- $scope.searchkeys.startTime = moment().subtract(n, "years").format("YYYY-MM-DD 00:00:00");
- $scope.searchkeys.endTime = $scope.endtimes;
- console.log($scope.searchkeys.startTime, $scope.searchkeys.endTime)
- }
- /**
- *日历
- */
- $scope.open = function ($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.opened = !$scope.opened;
- };
- $scope.endOpen = function ($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.startOpened = false;
- $scope.endOpened = !$scope.endOpened;
- };
- $scope.startOpen = function ($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.endOpened = false;
- $scope.startOpened = !$scope.startOpened;
- };
- //选择类型
- $scope.active = function (name) {
- console.log($scope.searchkeys)
- if($scope.searchkeys.placeId){
- delete($scope.searchkeys.placeId)
- }
- if($scope.searchkeys.areaId){
- delete($scope.searchkeys.areaId)
- }
- $scope.tap = name
- $scope.searchkeys.startTime = moment($scope.searchkeys.startTime).format("YYYY-MM-DD 00:00:00");
- $scope.searchkeys.endTime = moment($scope.searchkeys.endTime).format('YYYY-MM-DD 23:59:59');
- if ($scope.tap == 'QSFX') {
- $scope.tap1 = 'flqs'
- $scope.area_place = {};
- setTimeout(function () {
- $scope.SLQS_Data($scope.searchkeys)
- $scope.FLQS_Data1($scope.searchkeys)
- }, 500);
- } else if ($scope.tap == 'YWBB') {
- $scope.area_place = {};
- setTimeout(function () {
- // barechart2();
- barechart3();
- // barechart6()
- // barechart7()
- // barechart8()
- // barechart9();
- $scope.YWXL_Data()
- $scope.YWXQ_Data()
- $scope.YWMYD_Data()
- $scope.YWTop_Data()
- }, 500);
- } else if ($scope.tap == 'FLBB') {
- $scope.area_place = {};
- setTimeout(function () {
- $scope.FLTJ_Data($scope.searchkeys)
- $scope.FLQST_Data($scope.searchkeys)
- $scope.QYFL_Data($scope.searchkeys)
- }, 500);
- } else if ($scope.tap == 'LYBB') {
- $scope.area_place = {};
- setTimeout(function () {
- $scope.LYQS_Data($scope.searchkeys)
- $scope.LYTJ_Data($scope.searchkeys)
- }, 500);
- }
- }
- //选择类型1
- $scope.active1 = function (name) {
- $scope.tap1 = name
- if ($scope.tap1 == 'flxq') {
- setTimeout(function () {
- // barechart();
- $scope.FLQS_Data($scope.searchkeys)
- }, 500);
- } else if ($scope.tap1 == 'flqs') {
- setTimeout(function () {
- // barechart2();
- $scope.FLQS_Data1($scope.searchkeys)
- }, 500);
- }
- }
- // 请求人
- api_user_data.fetchDataList('requester', {
- "idx": 0,
- "sum": 10
- }).then(function (response) {
- if (response) {
- if (response.status = 200) {
- $scope.requester = response.list;
- }
- }
- })
- //区域地点过滤
- $scope.key = {};
- api_user_data.fetchDataList('area', {
- "idx": 0,
- "sum": 1000
- }).then(function (data) {
- if (data) {
- if (data.status = 200) {
- $scope.outarea = data.list;
- }
- }
- })
- //地点区域过滤
- $scope.onChangearea = function (data) {
- // delete $scope.searchkeys.place;
- // if ($scope.memoryfilterData.incident) {
- // delete $scope.memoryfilterData.incident.place;
- // }
- console.log(data)
- $scope.searchkeys['areaId'] = data.areaId.id
- var fildata = {
- "idx": 0,
- "sum": 1000,
- "place": {
- area: {
- id: data.areaId.id
- }
- }
- };
- api_user_data.fetchDataList('place', fildata).then(function (response) {
- if (response) {
- if (response.status = 200) {
- $scope.outplace = response.list;
- }
- }
- });
- console.log($scope.searchkeys)
- };
- // 地点筛选
- $scope.onChangeplace = function (key) {
- console.log(key)
- // $scope.searchkeys['areaId']=key.areaId.id
- if ($scope.searchkeys.areaId) {
- delete($scope.searchkeys.areaId)
- }
- $scope.searchkeys['placeId'] = key.placeId.id
- console.log($scope.searchkeys)
- }
- // 选择日期
- $scope.onChangeDate = function (s) {
- switch (s) {
- case 0:
- // 最近90天
- console.log('最近90天');
- $scope.searchkeys.startTime = $scope.GetDateStr(-90);
- break;
- case 1:
- // 最近一年
- console.log('最近一年');
- $scope.nearYear(1)
- break;
- case 2:
- // 最近三年
- console.log('最近三年');
- $scope.nearYear(3)
- break;
- case 3:
- // 最近五年
- console.log('最近五年');
- $scope.nearYear(5)
- break;
- }
- }
- //树形控件加载
- $scope.my_tree = {};
- $scope.try_async_load = function () {
- $scope.my_data = [];
- $scope.doing_async = true;
- api_bpm_data.fetchDataList('incidentcategory', {
- "idx": 0,
- "sum": 1000
- }).then(function (response) {
- if (response.status == 200) {
- var data = response.list;
- var objects = [];
- for (var i = 0; i < data.length; i++) {
- var object = {};
- object.id = data[i].id;
- if (data[i].parent && data[i].parent.id != 0) {
- object.parent = data[i].parent.id;
- }
- object.label = data[i].category;
- objects.push(object);
- }
- $scope.my_data = convertParentToChildList(objects);
- $scope.tree_data = angular.copy($scope.my_data);
- if ($scope.my_data.length > 0) {
- $scope.doing_async = false;
- }
- // return $scope.my_tree.expand_all()
- } else {
- SweetAlert.swal({
- title: "系统错误!",
- text: "请刷新重试!",
- type: "error"
- });
- }
- });
- };
- function convertListToTree(data, treeMap) {
- var idToNodeMap = {}; //Keeps track of nodes using id as key, for fast lookup
- var root = null; //Initially set our loop to null
- var parentNode = null;
- //loop over data
- for (var i = 0; i < data.length; i++) {
- var datum = data[i];
- //each node will have children, so let's give it a "children" poperty
- datum.children = [];
- //add an entry for this node to the map so that any future children can
- //lookup the parent
- idToNodeMap[datum.id] = datum;
- //Does this node have a parent?
- if (typeof datum.parent === "undefined" || datum.parent == null) {
- //Doesn't look like it, so this node is the root of the tree
- root = datum;
- treeMap[datum.id] = root;
- } else {
- //This node has a parent, so let's look it up using the id
- parentNode = idToNodeMap[datum.parent];
- //We don't need this property, so let's delete it.
- delete datum.parent;
- //Let's add the current node as a child of the parent node.
- parentNode.children.push(datum);
- }
- }
- return root;
- }
- function convertParentToChildList(data) {
- var treeMap = {};
- var list = [];
- convertListToTree(data, treeMap);
- angular.forEach(treeMap, function (item) {
- list.push(item);
- });
- return list;
- }
- // $scope.my_tree = tree = {};
- $scope.try_async_load1 = function () {
- $scope.my_data1 = [];
- $scope.select_treedata = [];
- $scope.doing_async = true;
- api_user_data.fetchDataList('group', {
- "idx": 0,
- "sum": 1000,
- group:{
- 'selectType':'nouser'
- }
- }).then(function (data) {
- $scope.select_treedata = $scope.my_data1
- //
- = convertParentToChildList(data['list']);
- $scope.doing_async = false;
- // tree.expand_all();
- //console.log(treelist);
- });
- };
- $scope.try_async_load();
- $scope.try_async_load1();
- // 一、运维报表:
- // 事件类型选择:
- $scope.onFilterCategary = function (item) {
- $scope.YWBB_searchKeys.categoryId = item.id;
- }
- $scope.onFilterGroup = function (item) {
- $scope.YWBB_searchKeys.groupId = item.id;
- }
- // 图表1、事件运维效率
- $scope.YWXL_Data = function () {
- api_report_data.reportsData('incident_operations_efficiency', $scope.YWBB_searchKeys).then(function (data) {
- $scope.YWXL_Datas = data;
- barechart2(data);
- })
- }
- // 图表2、事件运维详情
- $scope.YWXQ_Data = function () {
- api_report_data.reportsData('incident_operations_details', $scope.YWBB_searchKeys).then(function (data) {
- // $scope.YWXL_Datas = data;
- // 响应饼图
- barechart6(data.response);
- // 解决饼图
- barechart7(data.solve);
- // 柱状图
- barechart8(data.barGraph);
- })
- }
- //事件趋势分析报表
- //数量趋势分析 图1
- $scope.SLQS_Data = function (data) {
- api_report_data.reportsData('incident_trend', data).then(function (data) {
- console.log(data)
- if (data) {
- $scope.SLQS_Datas = data;
- // console.log($scope.LYQS_Datas)
- setTimeout(function () {
- barechart($scope.SLQS_Datas)
- }, 1000)
- }
- })
- }
- //分类趋势分析 图1
- $scope.FLQS_Data1 = function (data) {
- api_report_data.reportsData('incident_category_trend_time', data).then(function (data) {
- console.log(data)
- if (data) {
- $scope.FLQS_Datas = data;
- // console.log($scope.LYQS_Datas)
- setTimeout(function () {
- barechart1($scope.FLQS_Datas)
- }, 1000)
- }
- })
- }
- //分类趋势分析 图2
- $scope.FLQS_Data = function (data) {
- api_report_data.reportsData('incident_category_month', data).then(function (data) {
- console.log(data)
- var list1 = []
- var list2 = []
- if (data) {
- // for (var i = 0; i < data.data.length; i++) {
- // for (var j = 0; j < data.data[i].length; j++) {
- // // console.log(list1[i][j])
- // for (var l = 0; l < data.dates.length; l++) {
- // data.data[i][j]['time'] = data.dates[l]
- // }
- // }
- // console.log(data.data[i])
- // }
- $scope.BTdata = data;
- // console.log($scope.LYQS_Datas)
- setTimeout(function () {
- // barechart5($scope.BTdata)
- wt($scope.BTdata)
- }, 1000)
- }
- })
- }
- // 图表3、事件运维满意度
- $scope.YWMYD_Data = function () {
- api_report_data.reportsData('incident_operations_satisfaction', $scope.YWBB_searchKeys).then(function (data) {
- $scope.YWMYD_Datas = data.sum;
- barechart9(data.barGraph);
- })
- }
- // 表格1、事件运维解决TOP排名
- $scope.YWTop_Data = function (sort) {
- console.log(sort)
- var postData = $scope.YWBB_searchKeys;
- if (sort) {
- postData.sortKye = sort;
- }
- api_report_data.reportsData('incident_operations_top', postData).then(function (data) {
- $scope.YWBB_table_data = data.table;
- })
- }
- //事件来源报表数据获取
- //来源趋势数据 图1
- $scope.LYQS_Data = function (data) {
- api_report_data.reportsData('incident_source', data).then(function (data) {
- console.log(data)
- if (data.stats == 200) {
- $scope.LYQS_Datas = data.data;
- console.log($scope.LYQS_Datas)
- barechart13($scope.LYQS_Datas)
- }
- })
- }
- //来源统计数据 图2
- $scope.LYTJ_Data = function (data) {
- api_report_data.reportsData('incident_source_trend', data).then(function (data) {
- console.log(data)
- if (data.stats == 200) {
- $scope.LYTJ_Datas = data.data;
- console.log($scope.LYTJ_Datas)
- barechart14($scope.LYTJ_Datas)
- }
- })
- }
- //事件分类报表
- // 分类统计饼图
- $scope.FLTJ_Data = function (list) {
- api_report_data.reportsData('incident_category_proportion', list).then(function (data) {
- // $scope.YWMYD_Datas = data.sum;
- // barechart9(data.barGraph);
- console.log(data)
- barechart10(data)
- })
- }
- // 分类趋势线图
- $scope.FLQST_Data = function (list) {
- api_report_data.reportsData('incident_category_trend', list).then(function (data) {
- // $scope.YWMYD_Datas = data.sum;
- // barechart9(data.barGraph);
- console.log(data)
- barechart11(data)
- })
- }
- // 区域分类分析柱状图
- $scope.QYFL_Data = function (list) {
- api_report_data.reportsData('incident_category_area', list).then(function (data) {
- // $scope.YWMYD_Datas = data.sum;
- // barechart9(data.barGraph);
- console.log(data)
- barechart12(data)
- })
- }
- //搜索
- $scope.report_datas = function () {
- console.log($scope.searchkeys)
- var s = new Date($scope.searchkeys.startTime);
- var st=s.getFullYear() + '-' + (s.getMonth() + 1) + '-' + s.getDate() + ' ' + s.getHours() + ':' + s.getMinutes() + ':' + s.getSeconds();
-
- var e = new Date($scope.searchkeys.endTime);
- var en=e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate() + ' ' + e.getHours() + ':' + e.getMinutes() + ':' + e.getSeconds();
-
- $scope.searchkeys.startTime=st
- $scope.searchkeys.endTime=en
- if ($scope.tap == "YWBB") {
- $scope.YWBB_searchKeys.startTime = $scope.searchkeys.startTime;
- $scope.YWBB_searchKeys.endTime = $scope.searchkeys.endTime;
- $scope.YWXL_Data()
- $scope.YWXQ_Data()
- $scope.YWMYD_Data()
- $scope.YWTop_Data()
- }
- if ($scope.tap == 'LYBB') {
- $scope.LYQS_Data($scope.searchkeys)
- $scope.LYTJ_Data($scope.searchkeys)
- }
- if ($scope.tap == 'QSFX') {
- $scope.SLQS_Data($scope.searchkeys)
- $scope.FLQS_Data($scope.searchkeys)
- $scope.FLQS_Data1($scope.searchkeys)
- }
- if ($scope.tap == 'FLBB') {
- $scope.FLTJ_Data($scope.searchkeys)
- $scope.FLQST_Data($scope.searchkeys)
- $scope.QYFL_Data($scope.searchkeys)
- }
- }
- //重置
- $scope.report_Reset = function () {
- $scope.select_treedata = [];
- $scope.my_data = [];
- $scope.dateChoose.dateSelected = {};
- if($scope.searchkeys.placeId){
- delete($scope.searchkeys.placeId)
- }
- if($scope.searchkeys.areaId){
- delete($scope.searchkeys.areaId)
- }
- $scope.area_place = {};
- $scope.starttimes = moment(new Date().getTime() - 86400000 * (weeks + 6 - 1)).format('YYYY-MM-DD');
- $scope.endtimes = moment(new Date().getTime() - 86400000 * (weeks - 1)).format('YYYY-MM-DD');
- $scope.searchkeys.startTime = $scope.starttimes
- $scope.searchkeys.endTime = $scope.endtimes
- console.log($scope)
- if ($scope.tap == "YWBB") {
- $scope.YWBB_searchKeys.startTime = $scope.searchkeys.startTime;
- $scope.YWBB_searchKeys.endTime = $scope.searchkeys.endTime;
- $scope.YWXL_Data()
- $scope.YWXQ_Data()
- $scope.YWMYD_Data()
- $scope.YWTop_Data()
- }
- if ($scope.tap == 'LYBB') {
- $scope.LYQS_Data($scope.searchkeys)
- $scope.LYTJ_Data($scope.searchkeys)
- }
- if ($scope.tap == 'QSFX') {
- $scope.SLQS_Data($scope.searchkeys)
- $scope.FLQS_Data($scope.searchkeys)
- $scope.FLQS_Data1($scope.searchkeys)
- }
- if ($scope.tap == 'FLBB') {
- $scope.FLTJ_Data($scope.searchkeys)
- $scope.FLQST_Data($scope.searchkeys)
- $scope.QYFL_Data($scope.searchkeys)
- }
- }
- //图表 来电转换
- function barechart(datas) {
- console.log(datas)
- console.log(echarts)
- if (datas) {
- var dom = document.getElementById("ldzh");
- console.log(dom)
- var myChart = echarts.init(dom);
- var option = null;
- console.log(myChart)
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- data: ['事件总数', '环比增幅'],
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- top: '8%',
- left: '.5%',
- right: '0%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.dates
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- },
- {
- type: 'value',
- scale: true,
- name: '环比增幅 (%)',
- min: 0,
- max: 100,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- formatter: '{value} %',
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }
- ],
- series: [{
- name: '事件总数',
- type: 'bar',
- barMaxWidth: 30,
- itemStyle: {
- normal: {
- color: '#005395'
- }
- },
- data: datas.data
- },
- {
- name: '环比增幅',
- type: 'line',
- itemStyle: {
- normal: {
- color: '#1CA58F'
- }
- },
- lineStyle: {
- normal: {
- color: '#1CA58F'
- }
- },
- data: datas.per
- }
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- }
- //图表 事件分类趋势分析
- function barechart1(datas) {
- console.log(datas)
- if (datas) {
- var dom = document.getElementById("sjfx");
- // console.log(dom)
- var myChart1 = echarts.init(dom);
- var option1 = null;
- // console.log(myChart1)
- myChart1.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart1.hideLoading();
- var serie = []
- for (var i = 0; i < datas.data.length; i++) {
- // for (var j = 0; j < datas.title.length; j++) {
- // Series.name = datas.title[j]
- var Series = {
- name: datas.title[i],
- type: 'line',
- itemStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- lineStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- data: datas.data[i]
- }
- // }
- serie.push(Series)
- }
- option1 = {
- // color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- lineStyle: {
- color: '#49A9EE',
- type: 'dotted'
- },
- },
- formatter: function (params) {
- // console.log(params);
- // console.log($scope.FLQS_Datas);
- var retStr = "";
- for (var j = 0; j < $scope.FLQS_Datas.title.length; j++) {
- for (var i = 0; i < params.length; i++) {
- var dateIndex = $scope.FLQS_Datas.dates.indexOf(params[i].name);
- };
- // var str = $scope.FLQS_Datas.title[j] + ":" + $scope.FLQS_Datas.data[j][dateIndex] + " " + "环比增幅:" + $scope.FLQS_Datas.per[j][dateIndex] + "%" + "<br />"
- // $scope.FLQS_Datas.per[j][dateIndex]= $scope.FLQS_Datas.per[j][dateIndex].toString()
- // if($scope.FLQS_Datas.per[j][dateIndex].indexOf('-')<0){
- // $scope.FLQS_Datas.per[j][dateIndex]='+'+$scope.FLQS_Datas.per[j][dateIndex]
- // }else{
- // }
- // console.log('+'+$scope.FLQS_Datas.per[j][dateIndex])
- var str = "<div style='width: 105%;font-size: 12px;'><div style='float: left;width: 48%;'>" + $scope.FLQS_Datas.title[j] + ": " + $scope.FLQS_Datas.data[j][dateIndex] + "件</div>" + " " + "<div style='float: left;width: 46%;margin-left: 1%;'>" + "环比增幅: " + $scope.FLQS_Datas.per[j][dateIndex] + "%" + "</div></div>"
- retStr += str
- $scope.FLQS_Datas.dates[j] + '</br>' + retStr
- }
- // console.log($scope.FLQS_Datas)
- for (var k = 0; k < params.length; k++) {
- // return params[i].name+'</br>'+params[i].seriesName+' :'+params[i].value+' '+'环比增幅 :'+params[i].dataIndex+'%';
- return params[k].name + '</br>' + retStr
- }
- // return retStr
- }
- // formatter:'{a}{b} </br>事件数量: {c} 环比增幅: {c}%'
- // formatter: function (params, ticket, callback) {
- // console.log(params, ticket, callback)
- // // $.get('detail?name=' + params.name, function (content) {
- // // callback(ticket, toHTML(content));
- // // });
- // var list={
- // }
- // for(var i=0;i<params.length;i++){
- // return params[i].name+'</br>'+params[i].seriesName+' :'+params[i].value+' '+'环比增幅 :'+params[i].dataIndex+'%';
- // }
- // }
- },
- legend: {
- show: true,
- data: datas.title,
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0,
- // formatter: function (name) {
- // console.log(name)
- // return name;
- // }
- },
- grid: {
- top: '8%',
- left: '.5%',
- right: '0%',
- bottom: '10%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.dates
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }
- // , {
- // type: 'value',
- // scale: true,
- // name: '环比增幅 (%)',
- // min: 0,
- // max: 100,
- // boundaryGap: [0.2, 0.2],
- // axisLabel: {
- // formatter: '{value} %',
- // textStyle: {
- // color: '#7B7B7B',
- // // fontSize: '14',
- // }
- // },
- // axisLine: {
- // show: true,
- // lineStyle: {
- // color: '#7B7B7B',
- // // type: 'dotted'
- // },
- // },
- // }
- ],
- series: serie
- // [
- // {
- // name: '事件总数',
- // type: 'line',
- // show: false,
- // // itemStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // // lineStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // data: [10, 20, 5, 23, 12, 3, 63, 12, 23, 34, 76, 45]
- // }, {
- // name: '环比增幅',
- // type: 'line',
- // show: false,
- // // itemStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // // lineStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // data: [6, 45, 12, 4, 7, 43, 9, 32, 12, 21, 8, 10]
- // }, {
- // name: '通话时长2',
- // type: 'line',
- // // itemStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // // lineStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // data: [9, 41, 9, 12, 7, 34, 12, 54, 8, 9, 31, 12]
- // }, {
- // name: '通话时长3',
- // type: 'line',
- // // itemStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // // lineStyle: {
- // // normal: {
- // // color: '#005395'
- // // }
- // // },
- // data: [12, 24, 15, 22, 15, 31, 60, 16, 13, 24, 36, 55]
- // },
- // ]
- };
- if (option1 && typeof option1 === "object") {
- myChart1.setOption(option1);
- myChart1.hideLoading();
- }
- }
- // console.log(echarts)
- }
- //图表 事件运维效率
- function barechart2(datas) {
- var dom = document.getElementById("sjqs");
- var myChart = echarts.init(dom);
- var option = null;
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- lineStyle: {
- color: '#49A9EE',
- type: 'dotted'
- },
- }
- },
- legend: {
- data: ['响应平均时长', '解决平均时长'],
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- left: '1%',
- right: '0%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.keyList
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '平均时长',
- min: 0,
- boundaryGap: [0.2, 0.2],
- // axisLabel: {
- // formatter: '{value}'
- // }
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }, ],
- series: [{
- name: '响应平均时长',
- type: 'line',
- itemStyle: {
- normal: {
- color: '#49A9EE'
- }
- },
- lineStyle: {
- normal: {
- color: '#49A9EE'
- }
- },
- data: datas.responseDataList
- }, {
- name: '解决平均时长',
- type: 'line',
- itemStyle: {
- normal: {
- color: '#87C966'
- }
- },
- lineStyle: {
- normal: {
- color: '#87C966'
- }
- },
- data: datas.solveDataList2
- }]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- //图表 运维转派,协同,升级
- function barechart3() {
- // console.log(echarts)
- var dom = document.getElementById("sjpd");
- console.log(dom)
- var myChart = echarts.init(dom);
- var option = null;
- console.log(myChart)
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- data: ['转派', '升级', '协同'],
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- left: '.5%',
- right: '0%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: ['10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12']
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- formatter: '{value}',
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }],
- series: [{
- name: '转派',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#005395'
- }
- },
- data: [20, 12, 31, 23, 56, 78, 92, 12, 23]
- }, {
- name: '升级',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#87C966'
- }
- },
- data: [10, 20, 5, 5, 2, 32, 34, 56, 23]
- }, {
- name: '协同',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#79A3C4'
- }
- },
- data: [15, 26, 15, 25, 32, 36, 6, 43, 12]
- }]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- function wt(data) {
- console.log(data)
- // $scope.wt_data = ['1','2','3']
- setTimeout(function () {
- console.log(1)
- for (var i = 0; i < data.data.length; i++) {
- (function wt1() {
- var dom = document.getElementById("item" + i);
- console.log(dom)
- var myChart = echarts.init(dom);
- var datas1 = []
- for (var j = 0; j < data.data[i].length; j++) {
- var datas = {
- "name": data.data[i][j].category,
- "value": data.data[i][j].num
- }
- // {
- // "name": "上网账号",
- // "value": 10
- // }, {
- // "name": "邮箱问题",
- // "value": 10
- // }, {
- // "name": "用户资讯服务",
- // "value": 10
- // }, {
- // "name": "校园卡",
- // "value": 10
- // }, {
- // "name": "分类1",
- // "value": 20
- // }, {
- // "name": "分类2",
- // "value": 30
- // },
- datas1.push(datas)
- }
- // if(data.total[i]==0){
- // $scope.zero=i
- // }
- console.log(datas1)
- var option = {
- // color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // backgroundColor: '#000',
- title: {
- text: '总数',
- subtext: data.total[i] || '0',
- textStyle: {
- color: '#333',
- fontSize: 16,
- align: 'center',
- verticalAlign: 'middle'
- },
- subtextStyle: {
- fontSize: 14,
- color: ['#005395'],
- fontWeight: 'bolder',
- align: 'center',
- verticalAlign: 'middle'
- },
- x: '22%',
- y: '55%',
- },
- grid: {
- bottom: 150,
- left: 100,
- right: '10%'
- },
- legend: {
- orient: 'vertical',
- top: "middle",
- right: "5%",
- textStyle: {
- color: '#333',
- fontSize: 12,
- },
- itemWidth: 8,
- itemHeight: 8,
- icon: 'roundRect',
- data: datas1,
- },
- series: [
- // 主要展示层的
- {
- radius: ['35%', '50%'],
- center: ['25%', '65%'],
- type: 'pie',
- label: {
- normal: {
- show: true,
- formatter: "{c}%",
- textStyle: {
- fontSize: 14,
- },
- position: 'outside'
- },
- emphasis: {
- show: true
- }
- },
- labelLine: {
- normal: {
- show: true,
- length: 5,
- length2: 5
- },
- emphasis: {
- show: true
- }
- },
- hoverOffset: 5,
- name: "民警训练总量",
- data: datas1,
- },
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- })()
- // wt1()
- }
- }, 1000);
- // for (var i = 0; i < $scope.wt_data.length; i++) {
- // (function wt1() {
- // var dom = document.getElementById("item" + i);
- // console.log(dom)
- // var myChart = echarts.init(dom);
- // var data = [{
- // "name": "网络故障报修",
- // "value": 10
- // }, {
- // "name": "上网账号",
- // "value": 10
- // }, {
- // "name": "邮箱问题",
- // "value": 10
- // }, {
- // "name": "用户资讯服务",
- // "value": 10
- // }, {
- // "name": "校园卡",
- // "value": 10
- // }, {
- // "name": "分类1",
- // "value": 20
- // }, {
- // "name": "分类2",
- // "value": 30
- // }, ]
- // option = {
- // // color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // // backgroundColor: '#000',
- // title: {
- // text: '总数',
- // subtext: i + 1,
- // textStyle: {
- // color: '#333',
- // fontSize: 16,
- // // align: 'center'
- // },
- // subtextStyle: {
- // fontSize: 14,
- // color: ['#005395'],
- // fontWeight: 'bolder'
- // },
- // x: '22%',
- // y: '35%',
- // },
- // grid: {
- // bottom: 150,
- // left: 100,
- // right: '10%'
- // },
- // legend: {
- // orient: 'vertical',
- // top: "middle",
- // right: "5%",
- // textStyle: {
- // color: '#333',
- // fontSize: 12,
- // },
- // itemWidth: 8,
- // itemHeight: 8,
- // icon: 'roundRect',
- // data: data,
- // },
- // series: [
- // // 主要展示层的
- // {
- // radius: ['55%', '85%'],
- // center: ['25%', '50%'],
- // type: 'pie',
- // label: {
- // normal: {
- // show: true,
- // formatter: "{c}%",
- // textStyle: {
- // fontSize: 14,
- // },
- // position: 'outside'
- // },
- // emphasis: {
- // show: true
- // }
- // },
- // labelLine: {
- // normal: {
- // show: true,
- // length: 5,
- // length2: 25
- // },
- // emphasis: {
- // show: true
- // }
- // },
- // name: "民警训练总量",
- // data: data,
- // },
- // ]
- // };
- // if (option && typeof option === "object") {
- // myChart.setOption(option);
- // myChart.hideLoading();
- // }
- // })()
- // // wt1()
- // }
- }
- // wt()
- //图表 事件分类趋势分析饼图
- // function barechart5(datas) {
- // console.log(datas)
- // console.log(echarts)
- // // $scope.BTdata=datas
- // console.log($scope.BTdata)
- // var DATA = []
- // for (var i = 0; i < $scope.BTdata.data.length; i++) {
- // var dom = document.getElementById("item" + i);
- // console.log(dom)
- // var option = null;
- // var myChart = echarts.init(dom);
- // for (var j = 0; j < $scope.BTdata.data[i].length; j++) {
- // var data = {
- // "name": $scope.BTdata.data[i][j].category,
- // "value": $scope.BTdata.data[i][j].num
- // }
- // DATA.push(data)
- // }
- // var total = $scope.BTdata.total[i]
- // // if($scope.BTdata.total[i]==0){
- // // total=0
- // // }
- // option = {
- // // color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // // backgroundColor: '#000',
- // title: {
- // text: '总数',
- // subtext: total,
- // textStyle: {
- // color: '#333',
- // fontSize: 16,
- // // align: 'center'
- // },
- // subtextStyle: {
- // fontSize: 14,
- // color: ['#005395'],
- // fontWeight: 'bolder'
- // },
- // x: '22%',
- // y: '35%',
- // },
- // grid: {
- // bottom: 150,
- // left: 100,
- // right: '10%'
- // },
- // legend: {
- // orient: 'vertical',
- // top: "middle",
- // right: "5%",
- // textStyle: {
- // color: '#333',
- // fontSize: 12,
- // },
- // itemWidth: 8,
- // itemHeight: 8,
- // icon: 'roundRect',
- // data: DATA,
- // },
- // series: [
- // // 主要展示层的
- // {
- // radius: ['55%', '85%'],
- // center: ['25%', '50%'],
- // type: 'pie',
- // label: {
- // normal: {
- // show: true,
- // formatter: "{c}%",
- // textStyle: {
- // fontSize: 14,
- // },
- // position: 'outside'
- // },
- // emphasis: {
- // show: true
- // }
- // },
- // labelLine: {
- // normal: {
- // show: true,
- // length: 5,
- // length2: 25
- // },
- // emphasis: {
- // show: true
- // }
- // },
- // name: "民警训练总量",
- // data: DATA,
- // },
- // ]
- // };
- // if (option && typeof option === "object") {
- // myChart.setOption(option);
- // myChart.hideLoading();
- // }
- // }
- // }
- //图表 事件运维详情饼图1
- function barechart6(datas) {
- var dom = document.getElementById("XYSJ");
- var option = null;
- var myChart = echarts.init(dom);
- var data = datas.pieChart;
- option = {
- color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // backgroundColor: '#000',
- title: {
- text: '响应事件总数 (件)',
- subtext: datas.pieChartSum,
- textAlign: 'center',
- textStyle: {
- color: '#333',
- fontSize: 16,
- // align: 'center'
- },
- subtextStyle: {
- fontSize: 14,
- color: ['#005395'],
- fontWeight: 'bolder'
- // align: 'center'
- },
- x: '24.5%',
- y: '40%',
- },
- tooltip: {
- trigger: 'item',
- formatter: function (a) {
- return (
- a['data']['name'] + ":" + a['data']['value']
- )
- },
- position: ['50%', '30%']
- },
- grid: {
- bottom: 150,
- left: 100,
- right: '10%'
- },
- legend: {
- orient: 'vertical',
- top: "middle",
- right: "5%",
- textStyle: {
- color: '#333',
- fontSize: 12,
- },
- itemWidth: 8,
- itemHeight: 8,
- icon: 'roundRect',
- data: data,
- },
- series: [
- // 主要展示层的
- {
- radius: ['65%', '85%'],
- center: ['25%', '50%'],
- type: 'pie',
- label: {
- normal: {
- show: true,
- formatter: "{d}%",
- textStyle: {
- fontSize: 14,
- },
- position: 'outside'
- },
- emphasis: {
- show: true
- }
- },
- labelLine: {
- normal: {
- show: true,
- length: 5,
- length2: 25
- },
- emphasis: {
- show: true
- }
- },
- name: "",
- data: data,
- },
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- //图表 事件运维详情饼图2
- function barechart7(datas) {
- // for (var i = 0; i < $scope.BTdata.length; i++) {
- var dom = document.getElementById("JJSJ");
- var option = null;
- var myChart = echarts.init(dom);
- var data = datas.pieChart;
- option = {
- color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // backgroundColor: '#000',
- title: {
- text: '解决事件总数 (件)',
- subtext: datas.pieChartSum,
- textAlign: 'center',
- textStyle: {
- color: '#333',
- fontSize: 16,
- // align: 'center'
- },
- subtextStyle: {
- fontSize: 14,
- color: ['#005395'],
- fontWeight: 'bolder'
- // align: 'center'
- },
- x: '24.5%',
- y: '40%',
- },
- tooltip: {
- // show: false,
- trigger: 'item',
- formatter: function (a) {
- // console.log(a)
- return (
- a['data']['name'] + ":" + a['data']['value']
- )
- },
- position: ['50%', '30%']
- },
- grid: {
- bottom: 150,
- left: 100,
- right: '10%'
- },
- legend: {
- orient: 'vertical',
- top: "middle",
- right: "5%",
- textStyle: {
- color: '#333',
- fontSize: 12,
- },
- itemWidth: 8,
- itemHeight: 8,
- icon: 'roundRect',
- data: data,
- },
- series: [
- // 主要展示层的
- {
- radius: ['65%', '85%'],
- center: ['25%', '50%'],
- type: 'pie',
- label: {
- normal: {
- show: true,
- formatter: "{d}%",
- textStyle: {
- fontSize: 14,
- },
- position: 'outside'
- },
- emphasis: {
- show: true
- }
- },
- labelLine: {
- normal: {
- show: true,
- length: 5,
- length2: 25
- },
- emphasis: {
- show: true
- }
- },
- name: "",
- data: data,
- },
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- // }
- }
- //图表 事件运维详情柱状图
- function barechart8(datas) {
- // console.log(datas);
- var datas = datas;
- var dom = document.getElementById("JJSJZZ");
- var myChart = echarts.init(dom);
- var option = null;
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- data: ['按时响应', '逾期响应', '响应平均时间', '按时解决', '逾期解决', '解决平均时间'],
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- top: '10%',
- left: '1.5%',
- right: '1.5%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.name
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- formatter: '{value}',
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- },
- {
- type: 'value',
- scale: true,
- name: '按时解决率/逾期解决率',
- min: 0,
- max: 100,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- },
- formatter: '{value} %'
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }
- ],
- series: [{
- name: '逾期响应',
- type: 'bar',
- stack: '1',
- barWidth:30,
- itemStyle: {
- normal: {
- color: '#005395'
- }
- },
- data: datas.overtimeresponse
- }, {
- name: '按时响应',
- type: 'bar',
- barWidth:30,
- stack: '1',
- itemStyle: {
- normal: {
- color: '#E6EEF4'
- }
- },
- data: datas.ontimeresponse
- }, {
- name: '逾期解决',
- type: 'bar',
- barWidth:30,
- stack: '2',
- itemStyle: {
- normal: {
- color: '#1CA58F'
- }
- },
- data: datas.overtimesolve
- }, {
- name: '按时解决',
- type: 'bar',
- barWidth:30,
- stack: '2',
- itemStyle: {
- normal: {
- color: '#87C966'
- }
- },
- data: datas.ontimesolve
- }, {
- name: '解决平均时间',
- type: 'line',
- itemStyle: {
- normal: {
- color: '#EF665C'
- }
- },
- lineStyle: {
- normal: {
- color: '#EF665C'
- }
- },
- data: datas.solvetime
- },
- {
- name: '响应平均时间',
- type: 'line',
- itemStyle: {
- normal: {
- color: '#FFA35E'
- }
- },
- lineStyle: {
- normal: {
- color: '#FFA35E'
- }
- },
- data: datas.responsetime
- }
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- //图表 事件运维满意度柱状图
- function barechart9(datas) {
- var name = []
- var series = []
- for (var key in datas) {
- if (key !== 'name') {
- name.push(key);
- series.push({
- name: key,
- type: 'bar',
- stack: '1',
- barWidth:40,
- itemStyle: {
- normal: {}
- },
- data: datas[key]
- })
- }
- }
- var dom = document.getElementById("jjmyd");
- var myChart = echarts.init(dom);
- var option = null;
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- data: name,
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- top: '15%',
- left: '1.5%',
- right: '1.5%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.name
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- formatter: '{value}',
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }, ],
- series: series
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- //图表 事件分类统计饼图
- function barechart10(datas) {
- console.log(datas)
- if (datas) {
- var dom = document.getElementById("sjflqs");
- // console.log(dom)
- var option = null;
- var myChart = echarts.init(dom);
- var data = [];
- // var data1=[]
- var data2 = []
- for (var i = 0; i < datas.lsit.length; i++) {
- var list = {
- "name": datas.lsit[i].category,
- "value": datas.lsit[i].proportion
- }
- data.push(list)
- // data1.push(datas.lsit[i].proportion)
- data2.push(datas.lsit[i].category)
- }
- // var data = [
- // {
- // "name": "网络故障报修",
- // "value": 10
- // },
- // {
- // "name": "上网账号",
- // "value": 10
- // }, {
- // "name": "邮箱问题",
- // "value": 10
- // }, {
- // "name": "用户资讯服务",
- // "value": 10
- // }, {
- // "name": "校园卡",
- // "value": 10
- // }, {
- // "name": "分类1",
- // "value": 20
- // }, {
- // "name": "分类2",
- // "value": 30
- // },
- // ]
- option = {
- // color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // backgroundColor: '#000',
- title: {
- text: '事件总数 (件)',
- subtext: datas.sum,
- textAlign: 'center',
- textStyle: {
- color: '#333',
- fontSize: 20,
- // align: 'center'
- },
- subtextStyle: {
- fontSize: 18,
- color: ['#005395'],
- fontWeight: 'bolder'
- // align: 'center'
- },
- x: '25%',
- y: '50%',
- },
- grid: {
- top: '0%',
- bottom: 150,
- left: 100,
- right: '10%'
- },
- legend: {
- orient: 'vertical',
- top: "middle",
- left: "55%",
- itemGap: 20,
- textStyle: {
- color: '#333',
- fontSize: 16,
- },
- itemWidth: 15,
- itemHeight: 15,
- icon: 'roundRect',
- data: data2,
- },
- series: [
- // 主要展示层的
- {
- radius: ['45%', '65%'],
- center: ['25%', '60%'],
- type: 'pie',
- label: {
- normal: {
- show: true,
- formatter: "{c}%",
- textStyle: {
- fontSize: 14,
- },
- position: 'outside'
- },
- emphasis: {
- show: true
- }
- },
- labelLine: {
- normal: {
- show: true,
- length: 5,
- length2: 5,
- fontSize: 16
- },
- emphasis: {
- show: true
- }
- },
- name: "民警训练总量",
- data: data,
- },
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- // console.log(echarts)
- // for (var i = 0; i < $scope.BTdata.length; i++) {
- // }
- }
- //图表 事件分类趋势图
- function barechart11(datas) {
- console.log(datas)
- if (datas) {
- var dom = document.getElementById("sjfltj");
- // console.log(dom)
- var myChart = echarts.init(dom);
- var option = null;
- // console.log(myChart)
- var serie = []
- for (var i = 0; i < datas.data.length; i++) {
- // for (var j = 0; j < datas.title.length; j++) {
- // Series.name = datas.title[j]
- var Series = {
- name: datas.title[i],
- type: 'line',
- itemStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- lineStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- data: datas.data[i]
- }
- // }
- serie.push(Series)
- }
- console.log(serie)
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- lineStyle: {
- color: '#49A9EE',
- type: 'dotted'
- },
- }
- },
- legend: {
- data: datas.title,
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- left: '1%',
- right: '0%',
- bottom: '15%',
- top: '10%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- // data: ['10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12']
- data: datas.dates,
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- // axisLabel: {
- // formatter: '{value}'
- // }
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }, ],
- series: serie
- // [{
- // name: '分类1',
- // type: 'line',
- // itemStyle: {
- // normal: {
- // color: '#49A9EE'
- // }
- // },
- // lineStyle: {
- // normal: {
- // color: '#49A9EE'
- // }
- // },
- // data: [10, 20, 5, 43, 12, 34, 12, 56, 67]
- // }, {
- // name: '分类2',
- // type: 'line',
- // itemStyle: {
- // normal: {
- // color: '#87C966'
- // }
- // },
- // lineStyle: {
- // normal: {
- // color: '#87C966'
- // }
- // },
- // data: [12, 10, 15, 23, 19, 24, 18, 26, 57]
- // }]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- // console.log(echarts)
- }
- //图表 事件区域与事件分类分析图柱状图
- function barechart12(datas) {
- console.log(datas)
- if (datas) {
- var dom = document.getElementById("qysjfx");
- // console.log(dom)
- var myChart = echarts.init(dom);
- var option = null;
- // console.log(myChart)
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- var serie = []
- for (var i = 0; i < datas.data.length; i++) {
- // for(var j=0;datas.data[i].title;j++){
- var Series = {
- name: datas.data[i].title[i],
- type: 'bar',
- stack: '1',
- itemStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- data: datas.data[i].num
- }
- // }
- serie.push(Series)
- // }
- }
- console.log(serie)
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- legend: {
- data: datas.category,
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- },
- grid: {
- top: '15%',
- left: '1.5%',
- right: '1.5%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas.area
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- axisLabel: {
- formatter: '{value}',
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }, ],
- series: serie
- // [{
- // name: '分类1',
- // type: 'bar',
- // stack: '1',
- // itemStyle: {
- // normal: {
- // color: '#49A9EE'
- // }
- // },
- // data: [20, 12, 31, 23, 56, 78, 92, 12, 23, 14, 23, 54]
- // }, {
- // name: '分类2',
- // type: 'bar',
- // stack: '1',
- // itemStyle: {
- // normal: {
- // color: '#1EA58F'
- // }
- // },
- // data: [20, 12, 31, 23, 56, 78, 92, 12, 23, 14, 23, 54]
- // }, {
- // name: '分类3',
- // type: 'bar',
- // stack: '1',
- // itemStyle: {
- // normal: {
- // color: '#87C966'
- // }
- // },
- // data: [20, 12, 31, 23, 56, 78, 92, 12, 23, 14, 23, 54]
- // }, {
- // name: '分类4',
- // type: 'bar',
- // stack: '1',
- // itemStyle: {
- // normal: {
- // color: '#FFA35E'
- // }
- // },
- // data: [20, 12, 31, 23, 56, 78, 92, 12, 23, 14, 23, 54]
- // }, {
- // name: '分类5',
- // type: 'bar',
- // stack: '1',
- // itemStyle: {
- // normal: {
- // color: '#EF665C'
- // }
- // },
- // data: [12, 30, 15, 23, 32, 64, 17, 26, 87, 17, 63, 26]
- // }, ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- // console.log(echarts)
- }
- //图表 事件来源统计饼图
- function barechart13(datas) {
- // console.log(datas)
- // console.log(echarts)
- var dom = document.getElementById("sjlyqs");
- // console.log(dom)
- var option = null;
- var myChart = echarts.init(dom);
- var Data_LYTJ = []
- var Total = 0
- if (datas && datas.length > 0) {
- for (var j = 0; j < datas.length; j++) {
- console.log(datas[j])
- var data = {
- "name": datas[j]._name,
- "value": datas[j].percentage
- }
- Total = Total += datas[j]._count
- Data_LYTJ.push(data)
- }
- console.log(Total)
- option = {
- color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- // backgroundColor: '#000',
- title: {
- text: '事件总数 (件)',
- subtext: Total,
- textAlign: 'center',
- textStyle: {
- color: '#333',
- fontSize: 20,
- // align: 'center'
- },
- subtextStyle: {
- fontSize: 18,
- color: ['#005395'],
- fontWeight: 'bolder'
- // align: 'center'
- },
- x: '25%',
- y: '40%',
- },
- grid: {
- top: '0%',
- bottom: 150,
- left: 100,
- right: '10%'
- },
- legend: {
- orient: 'vertical',
- top: "middle",
- left: "55%",
- itemGap: 20,
- textStyle: {
- color: '#333',
- fontSize: 16,
- },
- itemWidth: 15,
- itemHeight: 15,
- icon: 'roundRect',
- data: Data_LYTJ,
- },
- series: [
- // 主要展示层的
- {
- radius: ['62%', '85%'],
- center: ['25%', '50%'],
- type: 'pie',
- label: {
- normal: {
- show: true,
- formatter: "{c}%",
- textStyle: {
- fontSize: 14,
- },
- position: 'outside'
- },
- emphasis: {
- show: true
- }
- },
- labelLine: {
- normal: {
- show: true,
- length: 10,
- length2: 35,
- fontSize: 16
- },
- emphasis: {
- show: true
- }
- },
- name: "民警训练总量",
- data: Data_LYTJ,
- },
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- }
- //图表 事件来源趋势图
- function barechart14(datas) {
- console.log(datas)
- var Series = []
- var legend = {
- data: [],
- align: 'left',
- // itemWidth:10,
- // itemHeight:10,
- bottom: 0
- }
- if (datas && datas.length > 0) {
- for (var j = 0; j < datas[1].length; j++) {
- console.log(datas[1][j])
- for (var key in datas[1][j]) {
- console.log(key)
- console.log(datas[1][j][key])
- var data = {
- name: key,
- type: 'line',
- itemStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- lineStyle: {
- normal: {
- // color: '#49A9EE'
- }
- },
- data: datas[1][j][key]
- }
- legend.data.push(key)
- Series.push(data)
- }
- }
- console.log(echarts)
- var dom = document.getElementById("sjlytj");
- console.log(dom)
- var myChart = echarts.init(dom);
- var option = null;
- console.log(myChart)
- myChart.showLoading({
- text: '数据加载中...',
- color: '#c23531',
- textColor: '#fff',
- maskColor: 'rgba(255,255,255,0)',
- zlevel: 0
- });
- myChart.hideLoading();
- option = {
- color: ['#005395', '#1EA58F', '#87C966', '#FFCD61', '#585247', '#49A9EE', '#009D85', "rgba(250,250,250,0.3)"],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- lineStyle: {
- color: '#49A9EE',
- type: 'dotted'
- },
- }
- },
- legend: legend,
- grid: {
- left: '1%',
- right: '0%',
- bottom: '15%',
- top: '10%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- // axisTick: {
- // alignWithLabel: true
- // },
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- data: datas[0]
- }],
- yAxis: [{
- type: 'value',
- scale: true,
- name: '事件数量 (件)',
- min: 0,
- boundaryGap: [0.2, 0.2],
- // axisLabel: {
- // formatter: '{value}'
- // }
- axisLabel: {
- textStyle: {
- color: '#7B7B7B',
- // fontSize: '14',
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: '#7B7B7B',
- // type: 'dotted'
- },
- },
- }, ],
- series: Series
- // [{
- // name: '分类1',
- // type: 'line',
- // itemStyle: {
- // normal: {
- // color: '#49A9EE'
- // }
- // },
- // lineStyle: {
- // normal: {
- // color: '#49A9EE'
- // }
- // },
- // data: [10, 20, 5, 43, 12, 34, 12, 56, 67]
- // }, {
- // name: '分类2',
- // type: 'line',
- // itemStyle: {
- // normal: {
- // color: '#87C966'
- // }
- // },
- // lineStyle: {
- // normal: {
- // color: '#87C966'
- // }
- // },
- // data: [12, 10, 15, 23, 19, 24, 18, 26, 57]
- // }]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option);
- myChart.hideLoading();
- }
- }
- }
- // setTimeout(function () {
- $scope.SLQS_Data($scope.searchkeys)
- $scope.FLQS_Data1($scope.searchkeys)
- // }, 1000);
- }])
|