123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739 |
- '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
- }).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.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);
- }])
|