| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295 |
- /*
- 一级大屏
- */
- var img = './image/frame.png';
- var numscroll = [];
- var numscroll1 = [];
- var trafficState = 0
- var trafficData = [];
- var sourceCountId = [],
- seatData = [],
- timeState = 1,
- telCountByNowType = 0,
- hotlineDataType = 0,
- MajoreventsDataType = 0,
- keyCountDataType = 0,
- typeCountDataType = 0
- // https://blog.csdn.net/weixin_44057991/article/details/125385206
- function dateFormat(fmt, date) {
- let ret;
- const opt = {
- "y+": date.getFullYear().toString(), // 年
- "m+": (date.getMonth() + 1).toString(), // 月
- "d+": date.getDate().toString(), // 日
- "H+": date.getHours().toString(), // 时
- "M+": date.getMinutes().toString(), // 分
- "S+": date.getSeconds().toString(), // 秒
- "N+": (date.getMonth()).toString(), // 前一个月月份
- "D+": "01", // 当月一号
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- };
- for(let k in opt) {
- ret = new RegExp("(" + k + ")").exec(fmt);
- if(ret) {
- fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
- };
- };
- return fmt;
- }
- //关闭按钮
- $('.close_icon').click(function() {
- // console.log(11)
- $('.bulletFrame').hide();
- $('.bulletFrameT').hide();
- if($('.bulletFrame').css('display') == 'none') {
- $('.body').css('opacity', '1')
- }
- if($('.bulletFrameT').css('display') == 'none') {
- $('.body').css('opacity', '1')
- }
- $('#themeIdHidden').val('')
- })
- //关闭按钮退回工单列表
- $('.backProcedure').click(function() {
- $('.workDetails').show();
- $('.workDetails').siblings().hide()
- })
- //返回按钮
- $('.back_icon').click(function() {
- $('.bulletFrameT').hide();
- if($('.bulletFrameT').css('display') == 'none') {
- $('.body').css('opacity', '1')
- }
- })
- //中间地图关闭按钮
- $('.closeMap_icon').click(function() {
- $('.bulletFrame').hide();
- $('.bulletFrameT').hide();
- if($('.bulletFrame').css('display') == 'none') {
- $('.body').css('opacity', '1')
- }
- if($('.bulletFrameT').css('display') == 'none') {
- $('.body').css('opacity', '1')
- }
- $('.type').css({
- 'background': 'url(./image/second/btn1.png)'
- })
- $('.classify').css({
- 'background': 'url(./image/second/btn2.png)'
- })
- $('.secondLevel_map .regionMap').html('');
- })
- $("#keyword").mouseleave(function() {
- $('.keyWrap').css('display', 'none')
- });
- $("#hotline3").mouseleave(function() {
- $('.lineB').css('display', 'none')
- });
- function getHotlineAccept() {
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountBy",
- data: {
- token: $.cookie("token"),
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- let str = ''
- Object.keys(res[0]).forEach((key, n) => {
- // console.log(key, n, 'keyn')
- if(key == 'count') {
- if($('#slw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#slw_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#slw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#slq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#slq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#slq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#slb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#slb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#slb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#sls_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#sls_num').text(parseInt((res[0][key] % 100) / 10))
- $('#sls_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#slg_num').text() != parseInt(res[0][key] % 10)) {
- $('#slg_num').text(parseInt(res[0][key] % 10))
- $('#slg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(key == 'dxcount') {
- if($('#dxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#dxw_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#dxw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#dxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#dxq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#dxq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#dxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#dxb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#dxb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#dxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#dxs_num').text(parseInt((res[0][key] % 100) / 10))
- $('#dxs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#dxg_num').text() != parseInt(res[0][key] % 10)) {
- $('#dxg_num').text(parseInt(res[0][key] % 10))
- $('#dxg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(key == 'ldcount') {
- if($('#szw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#szw_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#szw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#szq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#szq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#szq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#szb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#szb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#szb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#szs_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#szs_num').text(parseInt((res[0][key] % 100) / 10))
- $('#szs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#szg_num').text() != parseInt(res[0][key] % 10)) {
- $('#szg_num').text(parseInt(res[0][key] % 10))
- $('#szg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(key == 'clycount') {
- if($('#wxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#wxw_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#wxw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#wxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#wxq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#wxq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#wxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#wxb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#wxb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#wxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#wxs_num').text(parseInt((res[0][key] % 100) / 10))
- $('#wxs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#wxg_num').text() != parseInt(res[0][key] % 10)) {
- $('#wxg_num').text(parseInt(res[0][key] % 10))
- $('#wxg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(key == 'plycount') {
- if($('#xxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#xxw_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#xxw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#xxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#xxq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#xxq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#xxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#xxb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#xxb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#xxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#xxs_num').text(parseInt((res[0][key] % 100) / 10))
- $('#xxs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#xxg_num').text() != parseInt(res[0][key] % 10)) {
- $('#xxg_num').text(parseInt(res[0][key] % 10))
- $('#xxg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(key == 'hlycount') {
- if($('#zww_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
- $('#zww_num').text(parseInt(res[0][key] % 100000 / 10000))
- $('#zww_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#zwq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
- $('#zwq_num').text(parseInt(res[0][key] % 10000 / 1000))
- $('#zwq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#zwb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
- $('#zwb_num').text(parseInt(res[0][key] % 1000 / 100))
- $('#zwb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#zws_num').text() != parseInt((res[0][key] % 100) / 10)) {
- $('#zws_num').text(parseInt((res[0][key] % 100) / 10))
- $('#zws_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if($('#zwg_num').text() != parseInt(res[0][key] % 10)) {
- $('#zwg_num').text(parseInt(res[0][key] % 10))
- $('#zwg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- }
- })
- },
- })
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetVisitCount",
- data: {
- token: $.cookie("token"),
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- let visitCount = [];
- let str = ''
- Object.keys(res[0]).forEach((key, n) => {
- if(key == 'DHCOUNT') {
- visitCount.push({
- name: '电话回访',
- value: res[0][key]
- })
- } else if(key == 'DXCOUNT') {
- visitCount.push({
- name: '短信回访',
- value: res[0][key]
- })
- } else {
- visitCount.unshift({
- name: '回访总数',
- value: res[0][key]
- })
- }
- })
- visitCount.forEach(function(v, n) {
- if(n == 0) {
- if(parseInt(v.value % 100000 / 10000) != $('#zsw_num').text()) {
- $('#zsw_num').text(parseInt(v.value % 100000 / 10000))
- $('#zsw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10000 / 1000) != $('#zsq_num').text()) {
- $('#zsq_num').text(parseInt(v.value % 10000 / 1000))
- $('#zsq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 1000 / 100) != $('#zsb_num').text()) {
- $('#zsb_num').text(parseInt(v.value % 1000 / 100))
- $('#zsb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt((v.value % 100) / 10) != $('#zss_num').text()) {
- $('#zss_num').text(parseInt((v.value % 100) / 10))
- $('#zss_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10) != $('#zsg_num').text()) {
- $('#zsg_num').text(parseInt(v.value % 10))
- $('#zsg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- } else if(n == 1) {
- if(parseInt(v.value % 100000 / 10000) != $('#dhw_num').text()) {
- $('#dhw_num').text(parseInt(v.value % 100000 / 10000))
- $('#dhw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10000 / 1000) != $('#dhq_num').text()) {
- $('#dhq_num').text(parseInt(v.value % 10000 / 1000))
- $('#dhq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 1000 / 100) != $('#dhb_num').text()) {
- $('#dhb_num').text(parseInt(v.value % 1000 / 100))
- $('#dhb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt((v.value % 100) / 10) != $('#dhs_num').text()) {
- $('#dhs_num').text(parseInt((v.value % 100) / 10))
- $('#dhs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10) != $('#dhg_num').text()) {
- $('#dhg_num').text(parseInt(v.value % 10))
- $('#dhg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
-
- } else if(n == 2) {
- if(parseInt(v.value % 100000 / 10000) != $('#hfw_num').text()) {
- $('#hfw_num').text(parseInt(v.value % 100000 / 10000))
- $('#hfw_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10000 / 1000) != $('#hfq_num').text()) {
- $('#hfq_num').text(parseInt(v.value % 10000 / 1000))
- $('#hfq_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 1000 / 100) != $('#hfb_num').text()) {
- $('#hfb_num').text(parseInt(v.value % 1000 / 100))
- $('#hfb_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt((v.value % 100) / 10) != $('#hfs_num').text()) {
- $('#hfs_num').text(parseInt((v.value % 100) / 10))
- $('#hfs_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- if(parseInt(v.value % 10) != $('#hfg_num').text()) {
- $('#hfg_num').text(parseInt(v.value % 10))
- $('#hfg_num').counterUp({
- delay: 50, //每个数字动画的延迟时间,单位毫秒。
- time: 500 //计数动画总的持续时间。
- });
- }
- }
- })
- }
- });
- }
- function getHotThings() {
- var nameData = [];
- var conNum = [];
- var maxNum = []
- var secData = [];
- var type = $('#themeClassType').val();
- var url = '/InfoNew/GetThemeClassification1';
- console.log(themeDblId)
- if (type == '1') url = '/InfoNew/GetThemeDept1';
- new doAjax({
- url: huayi.config.callcenter_url + url,
- Type: 'get',
- data: {
- token: $.cookie("token"),
- stime: '',
- etime: '',
- timetype: MajoreventsDataType,
- id:themeDblId,
- type:dispatTopicType
-
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
-
- res.data.forEach(function(v, n) {
- // if(v.name!='中毒'&&v.name!='地震'){ str.replace(/[0-9]+/g,"")
- // nameData.push(v.F_Name ? v.F_Name.replace(/[0-9]+/g, "") : '其他');
-
- var name = '';
- if (type == '1') {
- name = v.deptName ? v.deptName.replace(/[0-9]+/g, "") : '其他'
- } else {
- name = v.F_Name ? v.F_Name.replace(/[0-9]+/g, "") : '其他'
- }
-
- nameData.push(name)
-
-
-
-
- var objCount = {}
- objCount.count = v.count
- objCount.id = v.F_ID
-
- conNum.push(objCount)
- secData.push({
- level: name,
- landArea: v.count
- })
- // }
-
- })
- console.log(conNum)
- if (res.data &&res.data.length > 0) {
- $('#themeRate').text(res.data[0].Proportion);
- }
- for(var i = 0; i < secData.length; i++) {
- maxNum.push(Math.max.apply(null, conNum) + 200);
- }
- hotThingsChart('hotThings', nameData, conNum, maxNum, -30)
- }
- });
-
-
-
- }
- function gettraffic() {
- $('.btn_time').click(function(e) {
- if(!e.isPropagationStopped()) { //确定stopPropagation是否被调用过
- if(e.target.tagName == 'SPAN') {
- if($(e.target).attr('data-state') == '0') {
- $(".hwsjtj").show()
- $('.timeTraffic').css('display', 'none')
- $('.daySeat').css('display', 'inline-block')
- $('#traffic').css('display', 'block')
- $('#timeTraffic').css('display', 'none')
- $('.call_situation h2').text('话务数据统计')
- $(this).siblings(".act").children("label").attr("indexTitle", "话务数据统计2")
- new doAjax({
- url: huayi.config.callcenter_url + "InfoNew/GetHWCount24ByNow",
- data: {
- token: $.cookie("token"),
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- trafficChart(res.data.hours, res.data.hwcount[0], res.data.jtcount[0])
- }
- });
- }
- }
- }
- e.stopPropagation();
- })
- }
- function getHotline() {
- let arr = [];
- let newArr = []
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetHotline",
- data: {
- token: $.cookie("token"),
- timetype: hotlineDataType
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- let str = '';
- res.data.forEach(function(v, n) {
- // arr.push(v.count)
- arr.push({
- name: v.value,
- count: v.count
- })
- })
- function compare(a, b) {
- return a.count - b.count; //如果a>b,返回值大于0,交换a b,升序排列
- }
- newArr = arr.sort(compare);
- newArr.reverse()
- res.data.forEach(function(val, num) {
- // str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + num + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- arr.forEach(function(v, n) {
- if(n === 0 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 1 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 2 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 3 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 4 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 5 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 6 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 7 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 8 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 9 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 10 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 11 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 12 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 13 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 14 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- } else if(n === 15 && v.name === val.value) {
- str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + num + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
- }
- })
- })
- $('.hotline').html(str)
- }
- });
- }
- function getHotLineInfo(strName, bili, n) {
- $('.lineB').text(strName + ':' + bili);
- switch (Number(n)){
- case 0:
- getLineBcss('-24px','-20px')
- break;
- case 1:
- getLineBcss('-24px','60px')
- break;
- case 2:
- getLineBcss('-24px','140px')
- break;
- case 3:
- getLineBcss('-24px','220px')
- break;
- case 4:
- getLineBcss('-24px','300px')
- break;
- case 5:
- getLineBcss('-24px','380px')
- break;
- case 6:
- getLineBcss('57px','-20px')
- break;
- case 7:
- getLineBcss('57px','60px')
- break;
- case 8:
- getLineBcss('57px','140px')
- break;
- case 9:
- getLineBcss('57px','220px')
- break;
- case 10:
- getLineBcss('57px','300px')
- break;
- case 11:
- getLineBcss('57px','380px')
- break;
- case 12:
- getLineBcss('144px','-20px')
- break;
- case 13:
- getLineBcss('144px','60px')
- break;
- case 14:
- getLineBcss('144px','140px')
- break;
- }
-
- }
- function getLineBcss(top,left){
- $('.lineB').css({
- 'display': 'block',
- 'top': top,
- 'left': left
- })
- }
- function getKeyWord() {
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
- // url: "http://192.168.8.9:1042/InfoNew/GetKeyCountByNow",
- data: {
- token: $.cookie("token"),
- timetype: keyCountDataType
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- let str = '';
- let keyName;
- res.data.Date.forEach(function(v, n) {
- keyName = v.KeyName.substr(0, v.KeyName.length - 2)
- str += '<span onclick="getKeyClass(\'' + v.KeyId + '\',\'' + v.ClassCount + '\',\'' + v.KeyName + '\')" onmouseover="getKeyInfo(\'' + v.KeyId + '\',\'' + n + '\')">' +
- v.KeyName + ':<label>' + v.Count + '</label></span>'
- })
- $('#keyword').html(str);
- }
- });
- }
- function getworkOrderType() {
-
- let workOrderData = [];
- let workOrderName = []
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount",
- data: {
- token: $.cookie("token"),
- timetype: typeCountDataType
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- res.data.forEach(function(v, n) {
- workOrderData.push({
- name: v.type,
- value: v.count
- })
- workOrderName.push(v.type);
- })
- workOrderName.reverse();
- workOrderChart(workOrderData, workOrderName)
- }
- });
- }
- function hotThingsChart(dom, data, count, count1, rotate = 0,conNumData) {
- window.onresize = function() {
- hotThings.resize()
- }
- option = {
- textStyle: {
- color: "#c0c3cd",
- fontSize: 11
- },
- grid: {
- top: '25%',
- bottom: '30%'
- },
- xAxis: {
- nameTextStyle: {
- color: "#c0c3cd",
- padding: [0, 0, -10, 0],
- fontSize: 11
- },
- axisLabel: {
- color: "#c0c3cd",
- fontSize: 11,
- rotate: rotate,
- },
- axisTick: {
- lineStyle: {
- color: "#8398c4",
- width: 1
- },
- show: false
- },
- minorTick: {
- length: 8
- },
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: "#8398c4",
- width: 1,
- type: "solid"
- },
- show: true
- },
- data: data,
- type: "category"
- },
- yAxis: {
- nameTextStyle: {
- color: "#c0c3cd",
- padding: [0, 0, 10, -5],
- fontSize: 11
- },
- axisLabel: {
- color: "#c0c3cd",
- fontSize: 11
- },
- axisTick: {
- lineStyle: {
- color: "#8398c4",
- width: 1
- },
- show: true
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: "#8398c4",
- type: "dashed"
- }
- },
- axisLine: {
- lineStyle: {
- color: "#8398c4",
- width: 1,
- type: "solid"
- },
- show: true,
- // "symbol":['none', 'arrow'],
- symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'],
- symbolOffset: 5,
- symbolSize: [35, 38],
- },
- name: "条"
- },
- series: [{
- data: count,
- type: "bar",
- barMaxWidth: "auto",
- barWidth: 15,
- itemStyle: {
- color: {
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- type: "linear",
- global: false,
- colorStops: [{
- offset: 0,
- color: "#ff4519"
- }, {
- offset: 1,
- color: "#fff500"
- }]
- },
- barBorderRadius: [30, 30, 0, 0]
- },
- label: {
- show: true,
- position: "top",
- distance: 10,
- color: "#fff"
- },
- emphasis: {
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, [{
- offset: 0,
- color: '#fde301'
- },
- {
- offset: 1,
- color: '#0a2f3e'
- }
- ]
- )
- }
- },
- },
- {
- data: conNumData,
- type: "line",
- symbolSize: 0, // symbol的大小设置为0
- showSymbol: false, // 不显示symbol
- lineStyle: {
- width: 0, // 线宽是0
- color: 'rgba(0, 0, 0, 0)' // 线的颜色是透明的
- }
- },
- {
- data: [1, 1, 1, 1, 1, 1],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbol: "none",
- },
- {
- // "data": [1500, 1148, 756, 1395, 1750, 1148],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbolPosition: "end",
- symbol: "none",
- symbolOffset: [0, "-50%"],
- symbolSize: [30, 12],
- zlevel: 1
- },
- {
- data: count1,
- type: "bar",
- barMaxWidth: "auto",
- barWidth: 15,
- barGap: "-100%",
- itemStyle: {
- color: '#234caf'
- },
- zlevel: -1
- }, {
- data: [1, 1, 1, 1, 1, 1],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbol: "none",
- symbolOffset: [0, "50%"],
- symbolSize: [30, 15],
- zlevel: -2
- }, {
- data: count1,
- type: "pictorialBar",
- barMaxWidth: "20",
- symbolPosition: "end",
- symbol: "circle",
- symbolOffset: [0, "-60%"],
- symbolSize: [15, 12],
- itemStyle: {
- color: '#234caf'
- },
- zlevel: -1
- },
- ]
- }
-
- if (domM === 'themeBarDownEle') {
- themeBarDownEcharts.setOption(option);
- } else{
- domM = ''
- hotThings.setOption(option);
- }
-
- }
- function hotThingsChartMain(dom, data, count, count1, rotate = 0,conNumData) {
- window.onresize = function() {
- hotThings.resize()
- }
- option = {
- textStyle: {
- color: "#c0c3cd",
- fontSize: 11
- },
- grid: {
- top: '25%',
- bottom: '30%'
- },
- xAxis: {
- nameTextStyle: {
- color: "#c0c3cd",
- padding: [0, 0, -10, 0],
- fontSize: 11
- },
- axisLabel: {
- color: "#c0c3cd",
- fontSize: 11,
- rotate: rotate,
- },
- axisTick: {
- lineStyle: {
- color: "#8398c4",
- width: 1
- },
- show: false
- },
- minorTick: {
- length: 8
- },
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: "#8398c4",
- width: 1,
- type: "solid"
- },
- show: true
- },
- data: data,
- type: "category"
- },
- yAxis: {
- nameTextStyle: {
- color: "#c0c3cd",
- padding: [0, 0, 10, -5],
- fontSize: 11
- },
- axisLabel: {
- color: "#c0c3cd",
- fontSize: 11
- },
- axisTick: {
- lineStyle: {
- color: "#8398c4",
- width: 1
- },
- show: true
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: "#8398c4",
- type: "dashed"
- }
- },
- axisLine: {
- lineStyle: {
- color: "#8398c4",
- width: 1,
- type: "solid"
- },
- show: true,
- // "symbol":['none', 'arrow'],
- symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'],
- symbolOffset: 5,
- symbolSize: [35, 38],
- },
- name: "条"
- },
- series: [{
- data: count,
- type: "bar",
- barMaxWidth: "auto",
- barWidth: 15,
- itemStyle: {
- color: {
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- type: "linear",
- global: false,
- colorStops: [{
- offset: 0,
- color: "#ff4519"
- }, {
- offset: 1,
- color: "#fff500"
- }]
- },
- barBorderRadius: [30, 30, 0, 0]
- },
- label: {
- show: true,
- position: "top",
- distance: 10,
- color: "#fff"
- },
- emphasis: {
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, [{
- offset: 0,
- color: '#fde301'
- },
- {
- offset: 1,
- color: '#0a2f3e'
- }
- ]
- )
- }
- },
- },
- {
- data: conNumData,
- type: "line",
- symbolSize: 0, // symbol的大小设置为0
- showSymbol: false, // 不显示symbol
- lineStyle: {
- width: 0, // 线宽是0
- color: 'rgba(0, 0, 0, 0)' // 线的颜色是透明的
- }
- },
- {
- data: [1, 1, 1, 1, 1, 1],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbol: "none",
- },
- {
- // "data": [1500, 1148, 756, 1395, 1750, 1148],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbolPosition: "end",
- symbol: "none",
- symbolOffset: [0, "-50%"],
- symbolSize: [30, 12],
- zlevel: 1
- },
- {
- data: count1,
- type: "bar",
- barMaxWidth: "auto",
- barWidth: 15,
- barGap: "-100%",
- itemStyle: {
- color: '#234caf'
- },
- zlevel: -1
- }, {
- data: [1, 1, 1, 1, 1, 1],
- type: "pictorialBar",
- barMaxWidth: "20",
- symbol: "none",
- symbolOffset: [0, "50%"],
- symbolSize: [30, 15],
- zlevel: -2
- }, {
- data: count1,
- type: "pictorialBar",
- barMaxWidth: "20",
- symbolPosition: "end",
- symbol: "circle",
- symbolOffset: [0, "-60%"],
- symbolSize: [15, 12],
- itemStyle: {
- color: '#234caf'
- },
- zlevel: -1
- },
- ]
- }
-
- callSeatState.setOption(option);
-
- }
- function getKeyInfo(keyid, n) {
- $('.keyInfo').html('');
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetKeyArea",
- data: {
- token: $.cookie("token"),
- pid: keyid,
- timetype: keyCountDataType
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- let str = ''
- res.forEach(function(v, n) {
- if(n > 0) {
- str += '<li><label>' + v.area + '</label><span>' + v.count + '</span></li>'
- }
- })
- $('.keyInfo').html(str);
- }
- });
- if(n == 0) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '95px',
- 'left': '-80px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 1) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '95px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 2) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '95px',
- 'left': '185px'
- })
- $('.bar').css('margin', '0 0 0 250px')
- } else if(n == 5) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '130px',
- 'left': '185px'
- })
- $('.bar').css('margin', '0 0 0 250px')
- } else if(n == 4) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '130px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 3) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '130px',
- 'left': '-80px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 6) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '170px',
- 'left': '-80px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 7) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '170px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0,auto')
- } else if(n == 10) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '206px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 12) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '243px',
- 'left': '-80px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 15) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '278px',
- 'left': '-110px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 8) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '170px',
- 'left': '185px'
- })
- $('.bar').css('margin', '0 0 0 250px')
- } else if(n == 9) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '206px',
- 'left': '-80px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 14) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '243px',
- 'left': '185px'
- })
- $('.bar').css('margin', '0 0 0 250px')
- } else if(n == 13) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '243px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0 auto')
- } else if(n == 11) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '206px',
- 'left': '185px'
- })
- $('.bar').css('margin', '0 0 0 250px')
- } else if(n == 16) {
- $('.keyWrap').css({
- 'display': 'block',
- 'top': '279px',
- 'left': '100px'
- })
- $('.bar').css('margin', '0 auto')
- }
- }
- function hotlineChart(datas) {
- // console.log(datas)
- let hotline = echarts.init(document.getElementById('hotline'));
- let colors = ['#ffe000', '#ff8a00', '#3cff9c', '#03d844', '#ff69c8', '#d668ff', '#43b2ff', '#05c9d1'];
- let legendData = []
- for(var j = 0; j < datas.length; j++) {
- var data = {
- name: datas[j].name,
- icon: 'circle',
- textStyle: {
- fontSize: 18,
- color: colors[j]
- }
- }
- legendData.push(data)
- }
- let objData = array2obj(datas, 'name')
- option = {
- color: colors,
- tooltip: {
- trigger: 'item',
- textStyle: {
- color: '#fff',
- fontSize: '18',
- fontWeight: '500'
- },
- // itemStyle: {
- // color: '#ffe400'
- // },
- position: 'top',
- backgroundColor: 'rgba(250,250,250,0)',
- transitionDuration: 0.4,
- formatter: function(params) {
- console.log(params.data)
- console.log(params.data.name)
- if(params.data.name2.length > 9) {
- return '<div class="frame" style="background: url(image/hotline_pie.png) no-repeat;width:230px;height:100px;background-size: 100% 100%;text-align:center;top:20px;"><div class="frameC">' +
- params.data.name2.substr(0, 10) + '<br>' + params.data.name.substr(10, params.data.name2
- .length) + ':' + params.data.percent + '</div></div>';
- } else {
- return '<div class="frame" style="background: url(image/hotline_pie.png) no-repeat;width:220px;height:100px;background-size: 100% 100%;text-align:center;top:20px;"><div class="frameC">' +
- params.data.name2 + '<br>' + params.data.percent + '</div></div>';
- }
- }
- },
- series: [{
- name: '访问来源',
- type: 'pie',
- radius: '75%',
- center: ['50%', '50%'],
- label: {
- show: true,
- position: 'outside',
- color: '#ddd',
- fontSize: 16,
- formatter: function(params) {
- // console.log(params)
- return params.name + ':' + params.value
- },
- padding: [0, -70, -20, -67]
- },
- labelLine: {
- length: 13,
- length2: 65,
- show: true
- },
- data: datas,
- // roseType: 'area'
- // animationType: 'expansion',
- // animationEasing: 'elasticOut',
- // animationDelay: function(idx) {
- // return 200
- // }
- }]
- }
- function array2obj(array, key) {
- var resObj = {}
- for(var i = 0; i < array.length; i++) {
- resObj[array[i][key]] = array[i]
- }
- return resObj
- }
- hotline.setOption(option)
- }
- function trafficChart(hours, monthCount, dayCount) {
- let traffic = echarts.init(document.getElementById('traffic'));
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- show: true,
- type: 'line',
- lineStyle: {
- type: 'dashed',
- width: 2,
- color: '#fff'
- }
- },
- textStyle: {
- color: '#fff',
- fontSize: 15,
- fontWeight: '600',
- },
- // position: ['75%', '55%'],
- backgroundColor: 'rgba(250,250,250,0)',
- formatter: function(params) {
- let str = '<div style="background-image: url(image/key_frame.png);width:128px;height:90px;line-height:25px;background-size: 100% 100%;padding:7px 8px;">'
- let jtcount = params[1].value / params[0].value;
- if(isNaN(jtcount)) {
- jtcount = 0;
- str +=
- '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">接通率:</span><span style:"width:55px;text-align: center;display: inline-block;">' +
- ((jtcount) * 100).toFixed(0) + '%</span></div>'
- } else {
- str +=
- '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">接通率:</span><span style:"width:55px;text-align: center;display: inline-block;">' +
- ((jtcount) * 100).toFixed(0) + '%</span></div>'
- }
- params.forEach(function(v, n) {
- // if(v.seriesName!='上部1'){
- str +=
- '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
- v.seriesName +
- ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
- v.value + '</span></div>'
- // }
- })
- return str;
- }
- },
- grid: {
- top: '18%',
- bottom: '12%'
- },
- xAxis: [{
- type: "category",
- boundaryGap: false,
- scale: true,
- axisLabel: {
- formatter: '{value}',
- fontSize: 13,
- margin: 10,
- textStyle: {
- color: "#f4f4f8"
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#525fa6"
- }
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: "#243753"
- }
- },
- axisTick: {
- show: false
- },
- data: hours
- }],
- yAxis: [{
- boundaryGap: false,
- type: "value",
- // scale:true,
- axisLabel: {
- textStyle: {
- color: "#f4f4f8"
- }
- },
- nameTextStyle: {
- color: "#fff",
- fontSize: 12,
- lineHeight: 40
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: "#516cb8",
- type: "dashed"
- }
- },
- axisLine: {
- lineStyle: {
- color: "#8393c8",
- width: 1,
- type: "solid"
- },
- show: true,
- // "symbol":['none', 'arrow'],
- symbol: ['none',
- 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
- ],
- symbolOffset: 5,
- symbolSize: [35, 38],
- },
- name: "条"
- }],
- series: [{
- name: "话务量",
- type: "line",
- smooth: true,
- showSymbol: false,
- symbol: 'circle',
- symbolSize: 4,
- zlevel: 3,
- itemStyle: {
- color: '#06eff8'
- },
- lineStyle: {
- normal: {
- width: 2,
- color: "#06eff8",
- }
- },
- // label: {
- // show: true,
- // position: 'top',
- // color: '#fff',
- // fontSize: 14,
- // fontWeight: '600',
- // formatter: function (params) {
- // return params.seriesName + ':' + params.value
- // }
- // },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1, [{
- offset: 0,
- color: "#35b1bb"
- },
- {
- offset: 0.8,
- color: "#073492"
- }
- ],
- false
- ),
- }
- },
- emphasis: {
- itemStyle: {
- color: '#fff',
- shadowBlur: 10,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: 'rgb(250,250, 250)'
- }
- },
- data: monthCount
- }, {
- name: "接通量",
- type: "line",
- smooth: true,
- showSymbol: false,
- symbol: 'circle',
- symbolSize: 4,
- zlevel: 3,
- itemStyle: {
- color: '#38a4fa'
- },
- // label: {
- // show: true,
- // position: 'top',
- // color: '#fff',
- // fontSize: 14,
- // fontWeight: '600',
- // formatter: function (params) {
- // return params.seriesName + ':' + params.value
- // }
- // },
- lineStyle: {
- normal: {
- width: 2,
- color: "#38a4fa",
- }
- },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1, [{
- offset: 0,
- color: "#1682c4"
- },
- {
- offset: 0.8,
- color: "#1276aa"
- }
- ],
- false
- ),
- }
- },
- emphasis: {
- itemStyle: {
- color: '#fff',
- shadowBlur: 10,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: 'rgb(250,250, 250)'
- }
- },
- data: dayCount
- }]
- };
- traffic.setOption(option);
- }
- function workOrderChart(workOrderData, workOrderName) {
- let workOrder = echarts.init(document.getElementById('workOrder'));
- option = {
- color: ['#00f0ff', '#ff5a00', '#ffe000', '#fff59e', '#00ff78', '#ff00ff', '#ff97ff'],
- tooltip: {
- show: false
- },
- legend: {
- icon: "rect",
- orient: 'horizontal',
- width: 150,
- height: 15,
- itemWidth: 15,
- itemGap: 20,
- data: workOrderName,
- right: 70,
- top: 50,
- align: 'left',
- textStyle: {
- color: "#fff"
- },
- // itemGap: 10
- },
- toolbox: {
- show: false
- },
- polar: {
- radius: '65%'
- },
- angleAxis: {
- interval: 5,
- type: 'category',
- data: [],
- z: 20,
- axisLine: {
- show: true,
- lineStyle: {
- color: "#0556b8",
- width: 5,
- type: "solid"
- },
- },
- axisLabel: {
- interval: 0,
- show: true,
- color: "#0556b8",
- margin: 8,
- fontSize: 16
- },
- },
- radiusAxis: {
- min: 20,
- max: 100,
- interval: 20,
- axisLine: {
- show: false,
- lineStyle: {
- color: "#0B3E5E",
- width: 1,
- type: "solid"
- },
- },
- axisLabel: {
- formatter: '{value} %',
- show: false,
- padding: [0, 0, 20, 0],
- color: "#0B3E5E",
- fontSize: 16
- },
- splitLine: {
- lineStyle: {
- color: "#0556b8",
- width: 2,
- type: "solid"
- }
- }
- },
- calculable: true,
- series: [{
- type: 'pie',
- radius: ["0", "5%"],
- hoverAnimation: false,
- labelLine: {
- normal: {
- show: false,
- length: 30,
- length2: 55
- },
- emphasis: {
- show: false
- }
- },
- data: [{
- name: '',
- value: 0,
- itemStyle: {
- normal: {
- color: "#0B4A6B"
- }
- }
- }]
- }, {
- stack: 'a',
- type: 'pie',
- radius: '55%',
- roseType: 'area',
- zlevel: 10,
- itemStyle: {
- normal: {
- label: {
- show: true,
- position: 'outside',
- color: '#ddd',
- fontSize: 15,
- formatter: function(params) {
- var percent = 0;
- var total = 0;
- for(var i = 0; i < workOrderData.length; i++) {
- total += workOrderData[i].value;
- }
- percent = ((params.value / total) * 100).toFixed(2);
- if(params.name !== '') {
- return params.name + ':' + percent + '%';
- } else {
- return '';
- }
- },
- },
- labelLine: {
- // smooth:true,
- length: 15,
- length2: 25,
- show: true,
- color: '#00ffff'
- }
- }
- },
- data: workOrderData
- }]
- }
- workOrder.setOption(option)
- }
- function timeTable() {
- //绩效和平均时长来回切换
- $('.btn_rank').unbind("click").click(function(e) {
- if(e.target.tagName == 'SPAN') {
- if($(e.target).attr('data-state') == '0') {
- // $('.topRank_List .maquee ul').each(function(index, dom) {
- // //将每个 的所有子级都复制一遍
- // var rows = $(dom).children().clone();
- // //再将新的到的加入原来的
- // $(dom).append(rows);
- // });
- $('.topRec_List').css('display', 'none')
- $('.topRank_List').css('display', 'block')
- $('.rank').css('display', 'none')
- $('.timeLength').css('display', 'inline-block')
- $('.responseLength').css('display', 'none')
- $('.test_rank h2').text('绩效考核排名')
- timeState = 1;
- getRankSwitch()
- e.stopPropagation()
- } else if($(e.target).attr('data-state') == '1') {
- timeState = 2;
- $('.test_rank h2').text('平均响应时长')
- $('.topRec_List .qh').text('平均响应时长')
- $('.topRec_List').css('display', 'block')
- $('.topRank_List').css('display', 'none')
- $('.responseLength').css('display', 'inline-block')
- $('.rank').css('display', 'none')
- $('.timeLength').css('display', 'none')
- getTimeSwitch(1)
- e.stopPropagation()
- } else {
- //数据获取
- timeState = 0;
- $('.test_rank h2').text('平均办理时长')
- $('.topRec_List .qh').text('平均办理时长')
- $('.topRec_List').css('display', 'block')
- $('.topRank_List').css('display', 'none')
- $('.rank').css('display', 'inline-block')
- $('.timeLength').css('display', 'none')
- $('.responseLength').css('display', 'none')
- getTimeSwitch(0)
- e.stopPropagation()
- }
- }
- e.stopPropagation()
- })
- getRankSwitch()
- // getTimeSwitch(0)
- function getTimeSwitch(type) {
- //表格滚动
- // $('.topRec_List .maquee ul').each(function(index, dom) {
- // //将每个 的所有子级都复制一遍
- // var rows = $(dom).children().clone();
- // //再将新的到的加入原来的
- // $(dom).append(rows);
- // });
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
- data: {
- token: $.cookie("token"),
- type: type
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- // res.reverse();
- let testStr = ''
- let num;
- res.forEach(function(v, n) {
- num = 1 + n
- if(n == 0) {
- testStr += '<li><div><img src="./image/No1.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
- } else if(n == 1) {
- testStr += '<li><div><img src="./image/No2.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
- } else if(n == 2) {
- testStr += '<li><div><img src="./image/No3.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
- } else {
- testStr += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v
- .timeday + 'h</div></li>'
- }
- })
- $('.test_rank .topRec_List ul').html(testStr);
- }
- });
- }
- function getRankSwitch() {
- new doAjax({
- url: huayi.config.callcenter_url + "/DataAssessment/GetEvaluation",
- data: {
- token: $.cookie("token"),
- date: dateFormat("yy-NN", new Date()),
- category: 1,
- },
- callBack: function(data) {
- if(data.state === "notoken") {
- window.location.href = "login.html";
- }
- // var max;
- // for(var i = 0; i < data.length; i++) {
- // for(var j = i; j < data.length; j++) {
- // if(data[i].total < data[j].total) {
- // max = data[j];
- // data[j] = data[i];
- // data[i] = max;
- // }
- // }
- // }
- let rankStr = ''
- let num = 0;
- data.rows.forEach(function(v, n) {
- if(v.deptname == '合计') {} else {
- num++
- if(n == 0) {
- rankStr += '<li><div><img src="./image/No1.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.total + '</div></li>'
- } else if(n == 1) {
- rankStr += '<li><div><img src="./image/No2.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.total + '</div></li>'
- } else if(n == 2) {
- rankStr += '<li><div><img src="./image/No3.png" alt=""></div><div>' + v.deptname +
- '</div><div>' + v.total + '</div></li>'
- } else {
- rankStr += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v
- .total + '</div></li>'
- }
- }
- })
- $('.test_rank .topRank_List ul').html(rankStr);
- }
- });
- }
- }
- //时间
- function getNowFormatDateMap() {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- var Hour = date.getHours(); // 获取当前小时数(0-23)
- var Minute = date.getMinutes(); // 获取当前分钟数(0-59)
- var Second = date.getSeconds(); // 获取当前秒数(0-59)
- var show_day = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
- var day = date.getDay();
- if(Hour < 10) {
- Hour = "0" + Hour;
- }
- if(Minute < 10) {
- Minute = "0" + Minute;
- }
- if(Second < 10) {
- Second = "0" + Second;
- }
- if(month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if(strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var HMS = Hour + ':' + Minute + ':' + Second;
- var temp_time = year + '-' + month + '-' + strDate + ' ' + HMS;
- $('.dataTime').text(temp_time);
- $('.secondLevel_map .time').text(year + '-' + month + '-' + strDate)
- formatDateParam = setTimeout(function() {
- getNowFormatDateMap()
- }, 1000);
- }
- function getTimes(dom, type = 0) {
- function p(s) {
- return s < 10 ? '0' + s : s;
- }
- var currentYear = new Date().getFullYear();
- var currentMonth = new Date().getMonth() + 1;
- var currentDate = new Date().getDate();
- var prevCurrentYear = 0;
- var prevCurrentMonth = 0;
- if(currentMonth == 1) {
- prevCurrentYear = currentYear - 1;
- prevCurrentMonth = 12;
- } else {
- prevCurrentYear = currentYear;
- prevCurrentMonth = currentMonth - 1;
- }
- let hh = new Date().getHours()
- let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
- let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
- var data = currentYear + "-" + p(currentMonth) + "-" + '01';
- var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate);
- console.log(type, 'type')
- if(type === 1) {
- $(dom).text(data)
- } else {
- $(dom).text(data + " ~ " + current)
- }
- }
- function getNowTime(dom, type = 0) {
- function p(s) {
- return s < 10 ? '0' + s : s;
- }
- var currentYear = new Date().getFullYear();
- var currentMonth = new Date().getMonth() + 1;
- var currentDate = new Date().getDate();
- var prevCurrentYear = 0;
- var prevCurrentMonth = 0;
- if(currentMonth == 1) {
- prevCurrentYear = currentYear - 1;
- prevCurrentMonth = 12;
- } else {
- prevCurrentYear = currentYear;
- prevCurrentMonth = currentMonth - 1;
- }
- let hh = new Date().getHours()
- let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
- let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
- var data = currentYear + "-" + p(currentMonth) + "-" + '01' + ' ' + '00' + ':' + '00' + ':' + '00';
- var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate) + ' ' + hh + ':' + mf + ':' + ss;
- if(type === 1) {
- $(dom).val(currentYear + "-" + p(currentMonth) + "-" + p(currentDate))
- }
- if(type === 3) {
- return currentYear + "-" + p(currentMonth) + "-" + p(currentDate)
- } else if( type === 4) {
- data4 = currentYear + "-" + p(currentMonth) + "-" + '01' + ' ' + '00' + ':' + '00' + ':' + '00';
- $(dom).val(data + " ~ " + current)
- $('#keyDate').val(current);
- } else {
- data = currentYear + "-" + p(currentMonth)+ "-" + p(currentDate) + ' ' + '00' + ':' + '00' + ':' + '00';
- $(dom).val(data + " ~ " + current)
- $('#keyDate').val(current);
- }
- }
- // getNowTime('.time')
- //二级页面点击
- //二级办理时长统计
- $('.test_rank .count-share').click(function(e) {
- $('.bulletFrame').show();
- if($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
- // getNowTime('#rankDate')
- laydate.render({
- elem: '#rankDate',
- // range: '~',
- type: 'month',
- value: dateFormat("yy-NN", new Date()),
- done: function(value) {
- testSecTable('#orderlist2', 0, 8, value);
- // testSecTable('#orderlist6', 2, 8, value);
- // testSecTable('#orderlist4', 1, 0, value);
- // testSecTable('#orderlist5', 1, 1, value);
- }
- });
- laydate.render({
- elem: '#rankDate2',
- type: 'month',
- value: dateFormat("yy-NN", new Date()),
- done: function(value) {
- timeSecTable('#timeSecList', 0);
- }
- });
- if(timeState == 0) {
- $('#rankDate').hide()
- $('.timeSta_wrap').show();
- $('.timeSta_wrap').siblings().hide()
- timeSecTable('#timeSecList', 0);
- } else if(timeState == 1) {
- $('#rankDate').show()
- $('.rank_wrap').show();
- $('.rank_wrap').siblings().hide()
- testSecTable('#orderlist2', 0, 8, $('#rankDate').val());
- // testSecTable('#orderlist4', 1, 0, $('#rankDate').val());
- // testSecTable('#orderlist5', 1, 1, $('#rankDate').val());
- // testSecTable('#orderlist6', 2, 8, $('#rankDate').val());
- } else {
- $('#rankDate').hide()
- $('.timeSta1_wrap').show();
- $('.timeSta1_wrap').siblings().hide()
- timeSecTable('#timeSecList1', 1);
- }
- e.stopPropagation()
- })
- //受理工单类型
- $('.time_statistics #workOrder').click(function(e) {
- $('.bulletFrame').show();
- $('.acceptanceType_wrap').show();
- $('.acceptanceType_wrap').siblings().hide()
- if($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
- getAcceptanceType()
- e.stopPropagation()
- })
- var provinceLabel = {
- ZG: {
- label: '中国政府网(省)',
- },
- GJ: {
- label: '国家政务平台',
- },
- HC: {
- label: '好差评',
- },
- AP: {
- label: '豫事办',
- }
- }
- //受理渠道
- $('.hotlineAccept').click(function(e) {
- // console.log('hotlineAccept')
- let channelData = []
- $('.bulletFrame').show();
- $('.channel_wrap').show();
- $('.channel_wrap').siblings().hide()
- if($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
- getNowTime('#date3')
- laydate.render({
- elem: '#date3',
- range: '~',
- type: 'datetime',
- done: function(value) {
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow",
- // url: "http://192.168.8.9:1042/InfoNew/GetSourceCountByNow",
- data: {
- token: $.cookie("token"),
- stime: value && value.split(' ~ ')[0],
- etime: value && value.split(' ~ ')[1]
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- channelData = [];
- res.rows.forEach(function(v, n) {
- channelData.push({
- level: v.TypeName,
- landArea: v.Count
- })
- // }
- })
- if(res.province && res.province[0]) {
- Object.keys(res.province[0]).forEach(function(k) {
- channelData.push({
- value: k,
- level: provinceLabel[k].label,
- landArea: res.province[0][k],
- })
- })
- }
- domM = 'channel'
- getHonelineChart2(channelData)
- }
- });
- }
- });
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow",
- // url: "http://192.168.8.9:1042/InfoNew/GetSourceCountByNow",
- data: {
- token: $.cookie("token"),
- stime: $('#date3').val() && $('#date3').val().split(' ~ ')[0],
- etime: $('#date3').val() && $('#date3').val().split(' ~ ')[1]
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- res.rows.forEach(function(v, n) {
- channelData.push({
- level: v.TypeName,
- landArea: v.Count
- })
- sourceCountId.push({
- name: v.TypeName,
- strworkid: '',
- id: v.ValueId
- })
- })
- if(res.province && res.province[0]) {
- Object.keys(res.province[0]).forEach(function(k) {
- channelData.push({
- value: k,
- level: provinceLabel[k].label,
- landArea: res.province[0][k],
- })
- sourceCountId.push({
- name: provinceLabel[k].label,
- strworkid: k,
- id: k
- })
- })
- }
- domM = 'channel'
- getHonelineChart2(channelData)
- }
- });
- e.stopPropagation()
- })
- //时段话务
- $('#traffic').click(function() {
- $('.bulletFrame').show();
- if($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
- if(trafficState == 0) {
- let qtphoneName = [];
- let qtldcount = [];
- let qtjtcount = [];
- let qtwjcount = [];
- let qtfqcount = [];
- let sphoneName = [];
- let sldcount = [];
- let sjtcount = [];
- let swjcount = [];
- let sfqcount = [];
- $('.traffic2_wrap').show();
- $('.traffic2_wrap').siblings().hide()
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetDayparting",
- // url: "http://192.168.8.9:1042/InfoNew/GetDayparting",
- data: {
- token: $.cookie("token"),
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- res.splice(7, 0, res[1]);
- res.splice(1, 1)
- res.forEach(function(v, n) {
- if(v.name != '12345' && v.name != "归并热线小计") {
- qtphoneName.push(v.name)
- qtldcount.push(v.ldcount)
- qtjtcount.push(v.jtcount)
- qtwjcount.push(v.wjtcount)
- qtfqcount.push(v.zdfqcount);
- } else {
- sphoneName.push(v.name)
- sldcount.push(v.ldcount)
- sjtcount.push(v.jtcount)
- swjcount.push(v.wjtcount)
- sfqcount.push(v.zdfqcount);
- }
- })
- const trafficDayArr = {
- xdata: qtphoneName,
- result: [{
- name: '未接通',
- data: qtwjcount
- },
- {
- name: '接通量',
- data: qtjtcount
- },
- {
- name: '主动放弃',
- data: qtfqcount
- },
- {
- name: '来电量',
- data: qtldcount
- }
- ]
- }
- const dataArr = {
- xdata: sphoneName,
- result: [{
- name: '未接通',
- data: swjcount
- },
- {
- name: '接通量',
- data: sjtcount
- },
- {
- name: '主动放弃',
- data: sfqcount
- },
- {
- name: '来电量',
- data: sldcount
- },
- ]
- }
- trafficDayChart(trafficDayArr);
- getS(dataArr)
- }
- });
- } else if(trafficState == 1) {
- $('.traffic_wrap').show();
- $('.traffic_wrap').siblings().hide()
- new doAjax({
- url: huayi.config.callcenter_url + "InfoNew/GetHWCountMonthByNow",
- data: {
- token: $.cookie("token"),
- },
- callBack: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- trafficMonthChart(res.data.days, res.data.hwcount[0], res.data.jtcount[0])
- }
- });
- }
- })
|