| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229 |
- // 关键词
- let keyidArr = [];
- let keyid = 0;
- let starKeyId = 0;
- let keyname = '';
- let keylegend = [];
- let nameK = ''
- let reg = /\w\d+$/;
- $('.backKey_icon').click(function () {
- for (let i = 0; i < keyidArr.length; i++) {
- if (keyidArr[i].id == keyid) {
- console.log(keyidArr[i - 1].id)
- $('.keyWordTitle').text(keyidArr[i - 1].name + '问题分类')
- $('.head_title').text(keyidArr[i - 1].name + '关键字数据分析')
- keyWordTable(keyidArr[i - 1].id);
- keyidArr.pop(keyidArr[i].id)
- keyid = keyidArr[i - 1].id
- }
- }
- })
- $('.closeKey_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')
- }
- keyidArr = [];
- keyid = 0
- })
-
-
-
- // 获取当月的开始和结束时间并转换为时分秒形式
- function getMonthTime(time) {
- const now = new Date(time);
- const year = now.getFullYear();
- const month = now.getMonth(); // 从0开始的月份索引
-
- // 当月开始时间
- const startOfMonth = formatDate(new Date(year, month, 1));
-
- // 当月结束时间
- const endOfMonth = formatDate(new Date(year, month + 1, 0));
-
- return {
- start: startOfMonth,
- end: endOfMonth
- };
- }
-
- function formatDate(date) {
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
-
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
-
- return year + '-' + month + '-' + strDate;
- }
-
- function getKeyClass(id, classId, con) {
-
- $('.bulletFrame').show();
- $('.secondLevel_keyWord').show();
- $('.secondLevel_keyWord').siblings().hide()
- if ($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
-
- var lastTime = $('#keyDate').val();
- if (!lastTime || lastTime == '' || lastTime.length > 10) {
- lastTime = getNowTime('', 3);
- }
-
-
- laydate.render({
- elem: '#keyDate',
- type: 'date',
- calendar: true,
- value: lastTime,
- done: function (value) {
- $('.keyWordTitle').text(keyidArr[0].name + '问题分类')
- $('.head_title').text(keyidArr[0].name + '关键字数据分析')
- $('.statisticsTime').html(value)
- console.log(value, 'value')
-
- keyWordTable(keyidArr[0].id, keyidArr[0].name, value);
- }
- });
- console.log($('#gpsxDataAct').val(), 'dataact')
- if (classId == '1' || classId == '0') {
-
- // 当月
-
- if ($('#gpsxDataAct').val() == '2') {
- //
- // workTable(id,null,null,null,null ,null,null,null,null,null,null,null, $('#keyDate').val());
- var currentTime = getMonthTime($('#keyDate').val());
- workTable(id,null,null,null,null ,null,null,null,null,null,null,null, null, null, null, currentTime.start, currentTime.end, classId == '0' ? 1: null);
- } else {
- // 当日
- workTable(id,null,null,null,null ,null,null,null,null,null,null,null, $('#keyDate').val(), null, null, null, null , classId == '0' ? 1: null);
- }
-
-
- } else {
- // getTimes('.statisticsTime', 1)
- $('.statisticsTime').html($('#keyDate').val())
- keyidArr.push({
- name: con,
- id: id
- })
- keyid = id
- $('.keyWordTitle').text(con + '问题分类')
- $('.head_title').text(con + '关键字数据分析')
-
- keyWordTable(id, con, $('#keyDate').val());
-
- }
- }
-
- function keyWordTable(id, con, value) {
- console.log(value)
- var $tableLeft = $('#keyWordlist');
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
- striped: false, //表格显示条纹
- pagination: false, //启动分页
- pageSize: 12, //每页显示的记录数
- pageNumber: 1, //当前第几页
- fixedColumns: false,
- fixedNumber: 3,
- pageList: [5, 10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- pid: id,
- token: $.cookie("token"),
- timetype:keyCountDataType,
- date: value
- }
-
- return param
- },
- onLoadSuccess: function (data) { //加载成功时执行
- const newDataL = {};
- const piData = [];
- newDataL.state = data.state;
- newDataL.message = data.message;
- newDataL.rows = data.data.Date;
-
- data.data.Date.forEach(function (v, n) {
- piData.push({
- value: v.Count,
- name: v.KeyName.replace(reg, '')
- })
- })
- var nameArray = piData.map(item => {
- return item.name
- })
- keyword_chart('keywordPie', nameArray, piData, con);
- $('.total').text(data.data.Total)
- $('.classTotal').text(data.data.ClaseeCount)
- $('.prot').text(data.data.ClassTotal)
- $tableLeft.bootstrapTable('load', newDataL);
- },
- onLoadError: function () { //加载失败时执行
- layer.msg("加载数据失败", {
- time: 1500,
- icon: 2
- });
- }
- });
- }
-
- function keyword_chart(dom, nameArray, piData, con) {
- let keywordPieChart = echarts.init(document.getElementById(dom));
- let keywordNum = [];
- let keywordName = [];
- var rich = {
- percent: {
- color: "#FFF",
- align: 'right',
- fontSize: 15,
- fontWeight: '500',
- //padding: [0, 5]
- }
- }
- nameArray.forEach(function (v, n) {
- keywordNum.push({
- num: Number(v.substr(v.length - 2, 2)),
- value: v
- })
- })
- let max;
- for (let i = 0; i < keywordNum.length; i++) {
- for (let j = i; j < keywordNum.length; j++) {
- if (keywordNum[i].num < keywordNum[j].num) {
- max = keywordNum[j];
- keywordNum[j] = keywordNum[i];
- keywordNum[i] = max;
- }
- }
- }
- keywordNum.forEach(function (v, n) {
- keywordName.push(v.value.replace(reg, ''));
- })
- console.log(keywordName)
- keywordName.forEach(function (v, n) {
- if (v.length > 20) {
- keylegend = [{
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '610',
- // data: keywordName.slice(0, 6),
- data: keywordName.slice(0, 1),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [5, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '620',
- // data: keywordName.slice(6, 12),
- data: keywordName.slice(1, 2),
- width: 28,
- height: 25,
- itemGap: 20,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [10, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(2, 3),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [20, 10]
- },
- {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(3, 4),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [40, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(4, 5),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [60, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(5, 6),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [80, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(6, keywordName.length),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [100, 10]
- }]
- } else {
- if (con == '营商管理03') {
- keylegend = [{
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '610',
- // data: keywordName.slice(0, 6),
- data: keywordName.slice(0, 6),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [15, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '620',
- // data: keywordName.slice(6, 12),
- data: keywordName.slice(6, 12),
- width: 28,
- height: 25,
- itemGap: 20,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [40, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(12, 18),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [65, 10]
- },
- {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(18, keywordName.length),
- width: 30,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [90, 10]
- }
- ]
- } else {
- keylegend = [{
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '610',
- // data: keywordName.slice(0, 6),
- data: keywordName.slice(0, 5),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [15, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '620',
- // data: keywordName.slice(6, 12),
- data: keywordName.slice(5, 10),
- width: 28,
- height: 25,
- itemGap: 20,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [40, 10]
- }, {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(10, 15),
- width: 28,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [65, 10]
- },
- {
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- top: '630',
- // data: keywordName.slice(12, keywordName.length),
- data: keywordName.slice(15, keywordName.length),
- width: 30,
- height: 25,
- textStyle: {
- color: '#fff',
- padding: [0, 5],
- fontSize: 15
- },
- padding: [90, 10]
- }
- ]
- }
- }
- })
-
- keywordName.reverse();
- option = {
- legend: keylegend,
- color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76',
- '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff',
- '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722',
- '#00BFA5', "#EAEA26"
- ],
- series: [{
- name: '访问来源',
- type: 'pie',
- radius: '58%',
- data: piData,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- },
- label: {
- normal: {
- show: false,
- formatter: function (params) {
- if (params.name.length > 9 && params.name.length < 35) {
- return params.name.substring(0, 20) + '\n' + params.name.substring(20, params.name.length) + ':' + params.value;
- } else if (params.name.length > 35) {
- return params.name.substring(0, 18) + '\n' + params.name.substring(18, 36) + '\n' + params.name.substring(36, params.name.length) + ':' + params.value;
- } else {
- return params.name + ':' + params.value;
-
- }
- }
- },
- emphasis: {
- // position: 'left',
- show: true,
- textStyle: {
- color: '#fff',
- fontSize: '14',
- fontWeight: 'bold'
- },
- labelLine: {
- show: true
- },
- length: 1
- }
- }
- }]
- };
- keywordPieChart.setOption(option);
- }
-
- function Code(val, row, index) {
- let num = index + 1
- return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:50px;text-align: center;'>" +
- num + "</span>"
- // return index + 1;
- }
-
- function getKeyName(v, r) {
- for (let i = 0; i < keyidArr.length; i++) {
- if (keyidArr[i].id == keyid) {
- if (keyidArr[0].id == keyid) {
- console.log('1111', keyname)
- $('.backKey_icon').css('display', 'none')
- } else {
- $('.backKey_icon').css('display', 'block')
- }
- }
- }
- return '<span class="workAct" onclick="getKeyClass(\'' + r.KeyId + '\',\'' + r.ClassCount + '\',\'' + r.KeyName +
- '\')">' + v + '</span>'
- }
-
- function getKeyBili(v) {
- return "<div style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:70px;margin:0 auto;'>" +
- v + "</div>"
- }
-
- function getKeyNum(v) {
- return "<div style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;margin:0 auto;'>" +
- v + "</div>"
- }
- //办理时长
- function timeSecTable(dom, type) {
- getTimes('.dataTT')
- var $tableLeft = $(dom);
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
- striped: false, //表格显示条纹
- pagination: false, //启动分页
- pageSize: 12, //每页显示的记录数
- pageNumber: 1, //当前第几页
- fixedColumns: false,
- fixedNumber: 3,
- pageList: [5, 10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- token: $.cookie("token"),
- type: type
- };
- return param;
- },
- onLoadSuccess: function (data) { //加载成功时执行
- // data.reverse();
- const newDataL = {};
- newDataL.state = "success";
- newDataL.message = "加载成功";
- newDataL.rows = data;
- $tableLeft.bootstrapTable('load', newDataL);
- },
- onLoadError: function () { //加载失败时执行
- layer.msg("加载数据失败", {
- time: 1500,
- icon: 2
- });
- }
- });
- }
- //办理时长表格操作
- function getCompanyName(v, r) {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + r.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
- + '\',\'' + '' + '\',\'' + 0 + '\')">' + v + '</span>'
- }
- function trend(val, row) {
- var str = '';
- if (row.trend.substring(0, 1) == '-' && row.trend.length > 1) {
- str = '<ul class="tool_downs">' +
- '<li><img src="./image/second/down_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
- .trend.substring(1) + '<li>' +
- '</ul>';
- } else if (row.trend.substring(0, 1) != '-' && row.trend.length > 1) {
- str = '<ul class="tool_downs">' +
- '<li><img src="./image/second/up_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
- .trend + '<li>' +
- '</ul>';
- } else {
- str = '<ul class="tool_downs">' +
- '<li>' + row.trend + '<li>' +
- '</ul>';
- }
- return str
- }
-
- var tableColumns = [
- // {
- // title: '序号',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return index + 1
- // }
- // },
- {
- field: 'deptname',
- title: '联动单位',
- align: 'center'
-
- },
- {
- field: 'Undertakers',
- title: '承办件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 0);
- }
- },
- {
- field: 'Undertakersrate',
- title: '承办率',
- align: 'center'
- },
- // {
- // field: 'Undertakersscore',
- // title: '得分(3分)',
- // align: 'center'
- // },
- {
- field: 'signfor',
- title: '及时签收件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 1);
- }
- },
- // {
- // field: 'oversignfor',
- // title: '超时签收件 ',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 2);
- // }
- // },
- {
- field: 'signforrate',
- title: '及时签收率',
- align: 'center'
- },
- // {
- // field: 'signforscore',
- // title: '得分(5分)',
- // align: 'center'
- // },
- {
- field: 'overdue',
- title: '按时反馈件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 3);
- }
- },
- // {
- // field: 'overfeedback',
- // title: '超时反馈件',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 4);
- // }
- // },
- // {
- // field: 'Processing',
- // title: '未到期工单',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 13);
- // }
- // },
- {
- field: 'overduerate',
- title: '按时反馈率',
- align: 'center'
- },
- // {
- // field: 'overduescore',
- // title: '得分(15分)',
- // align: 'center'
- // },
- {
- field: 'conclude',
- title: '办结件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 5);
- }
- },
- // {
- // field: 'noconclude',
- // title: '未办结件',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 6);
- // }
- // },
- // {
- // field: 'completed',
- // title: '应办结数量',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 14);
- // }
- // },
- {
- field: 'unsuccessfulrate',
- title: '办结率',
- align: 'center'
- },
- // {
- // field: 'unsuccessfulscore',
- // title: '办结得分(10分)',
- // align: 'center'
- // },
- {
- field: 'one',
- title: '一次办结件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 7);
- }
- },
- // {
- // field: 'noone',
- // title: '非一次办结件',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 8);
- // }
- // },
- // {
- // field: 'reply',
- // title: '回复工单量',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 15);
- // }
- // },
- {
- field: 'onerate',
- title: '一次办结率',
- align: 'center'
- },
- // {
- // field: 'onescore',
- // title: '得分(12分)',
- // align: 'center'
- // },
- // {
- // field: 'noexamine',
- // title: '不计入考核件',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 9);
- // }
- // },
- //
- {
- field: 'review',
- title: '评议件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 10);
- }
- },
- {
- field: 'satisfied',
- title: '满意件',
- align: 'center',
- formatter: function(value, row, index) {
- return handleOrderList(value, row, 11);
- }
- },
- // {
- // field: 'nosatisfied',
- // title: '不满意件',
- // align: 'center',
- // formatter: function(value, row, index) {
- // return handleOrderList(value, row, 12);
- // }
- // },
- {
- field: 'satisfiedrates',
- title: '满意率',
- align: 'center'
- },
- // {
- // field: 'satisfiedscore',
- // title: '得分(55分)',
- // align: 'center'
- // },
- {
- field: 'total',
- title: '总分',
- align: 'center'
- },
- {
- title: '排名',
- align: 'center',
- formatter: function(value, row, index) {
- return index + 1
- }
- },
-
- ];
-
- function handleOrderList(val, row, tab) {
- if(row.deptname !== '合计' && row.deptname !== '总计') {
- if(!val) {
- val = 0
- }
-
- console.log($('#rankDate').val(), 'asfasdf')
-
- return '<div class="imgs" ><a class="" onclick="examineList(\'' + row.deptid + '\', \'' + tab + '\', \''+ $('#rankDate').val() +'\')" >' + val +
- '</a></div>'
- } else {
-
- return val
- }
-
- }
-
- function testSecTable(id, type, group, value) {
- $.ajax({
- url: huayi.config.callcenter_url + "/DataAssessment/GetEvaluation",
- type: 'get',
- data: {
- token: $.cookie("token"),
- // type: type,
- // starttime: value && value.split(' ~ ')[0],
- // endtime: value && value.split(' ~ ')[1]
- // category,
- date: value,
- },
- dataType: "json",
- async: true,
- success: function(returnValue) {
- //异步获取数据
- //debugger;
- var resultData = returnValue.rows;
- var resultData_1 = []
- var resultData_2 = []
- var resultData_3 = []
- var resultData_4 = []
- var resultData_5 = []
-
- var max;
- for (var i = 0; i < resultData.length; i++) {
- for (var j = i; j < resultData.length; j++) {
- if (resultData[i].total < resultData[j].total) {
- max = resultData[j];
- resultData[j] = resultData[i];
- resultData[i] = max;
- }
- }
- }
-
-
- resultData.forEach(function(v, i) {
- if(v.category === 1) {
- resultData_1.push(v)
- } else if(v.category === 2) {
- resultData_2.push(v)
- } else if(v.category === 3) {
- resultData_3.push(v)
- } else if(v.category === 4) {
- resultData_4.push(v)
- } else {
- resultData_5.push(v)
- }
- })
-
-
- $('#orderlist2').bootstrapTable('load', resultData_1);
- $('#orderlist4').bootstrapTable('load', resultData_2);
- $('#orderlist5').bootstrapTable('load', resultData_3);
- $('#orderlist6').bootstrapTable('load', resultData_4);
-
- //$('#workorderlist_5').bootstrapTable('load', resultData_5);
-
- }
- });
-
- $('#orderlist2').bootstrapTable('destroy').bootstrapTable({
- striped: true,
- pagination: false,
- columns: tableColumns
- });
- $('#orderlist4').bootstrapTable('destroy').bootstrapTable({
- striped: true,
- pagination: false,
- columns: tableColumns
- });
- $('#orderlist5').bootstrapTable('destroy').bootstrapTable({
- striped: true,
- pagination: false,
- columns: tableColumns
- });
- $('#orderlist6').bootstrapTable('destroy').bootstrapTable({
- striped: true,
- pagination: false,
- columns: tableColumns
- });
-
- }
- //绩效考核
- function testSecTableDel(id, type, group, value) {
- var $tableLeft = $(id);
-
- var category = 0;
- if (id === '#orderlist2') category = 1;
- if (id === '#orderlist4') category = 2;
- if (id === '#orderlist5') category = 3;
- if (id === '#orderlist6') category = 4;
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "/DataAssessment/GetEvaluation",
- striped: false, //表格显示条纹
- pagination: false, //启动分页
- pageSize: 12, //每页显示的记录数
- pageNumber: 1, //当前第几页
- fixedColumns: false,
- fixedNumber: 3,
- pageList: [5, 10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- return {
- token: $.cookie("token"),
- type: type,
- // starttime: value && value.split(' ~ ')[0],
- // endtime: value && value.split(' ~ ')[1]
- category,
- date: $('#rankDate').val(), //'2021-05',
- }
- },
- onLoadSuccess: function (data) { //加载成功时执行
- const newDataL = {};
- // const typeData1 = [];
- // const typeData2 = [];
- // 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;
- // }
- // }
- // }
- // if (type == 1) {
- // data.forEach(function (v, n) {
- // if (v.workordrcount <= 10) {
- // typeData1.push(v)
- // } else {
- // typeData2.push(v)
- // }
- // })
- // if (group == 0) {
- // newDataL.rows = typeData2;
- // } else if (group == 1) {
- // newDataL.rows = typeData1;
- // }
- //
- // } else {
- // newDataL.rows = data;
- // }
-
- newDataL.rows = data;
-
- newDataL.state = "success";
- newDataL.message = "加载成功";
- console.log(newDataL)
- $tableLeft.bootstrapTable('load', newDataL);
- },
- onLoadError: function () { //加载失败时执行
- layer.msg("加载数据失败", {
- time: 1500,
- icon: 2
- });
- }
- });
- }
- //绩效考核表格操作
- function getRank(val, row, index) {
- return index + 1
- }
- //工单数量
- function getWorkOrders(val, row) {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
- + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 3 + '\')">' + val + '</span>'
- }
- //不满意数量
- function getDissatisfied(val, row) {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
- + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 4 + '\')">' + val + '</span>'
- }
- //超期数量
- function getOverdue(val, row) {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
- + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 5 + '\')">' + val + '</span>'
- }
- function getBackWorkOrders(val, row) {
- return '<span class="workAct" onclick="backWorkTable(\'' + row.deptid + '\',\'' + 0 + '\')">' + val + '</span>'
- }
- function getBacCkWorkOrders(val, row) {
- return '<span class="workAct" onclick="backWorkTable(\'' + row.deptid + '\',\'' + 1 + '\')">' + val + '</span>'
- }
-
- function awaySort(objArr, key) {
- let result = objArr.slice(0);
- return result.sort((a, b) => b[key] -a[key] );
- }
- //热线整合受理情况&重大事件
- function getHonelineChart2(data, dom) {
- data = awaySort(data,"landArea")
- data.length = 10
- let hotline2 = echarts.init(document.getElementById(dom));
- const CubeLeft = echarts.graphic.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function (ctx, shape) {
- const xAxisPoint = shape.xAxisPoint
- const c0 = [shape.x, shape.y]
- const c1 = [shape.x - 20, shape.y - 4]
- const c2 = [xAxisPoint[0] - 20, xAxisPoint[1] - 4]
- const c3 = [xAxisPoint[0], xAxisPoint[1]]
- ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1])
- .closePath()
- }
- })
- const CubeRight = echarts.graphic.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function (ctx, shape) {
- const xAxisPoint = shape.xAxisPoint
- const c1 = [shape.x, shape.y]
- const c2 = [xAxisPoint[0], xAxisPoint[1]]
- const c3 = [xAxisPoint[0] + 8, xAxisPoint[1] - 4]
- const c4 = [shape.x + 8, shape.y - 4]
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
- .closePath()
- }
- })
- const CubeTop = echarts.graphic.extendShape({
- shape: {
- x: 0,
- y: 0
- },
- buildPath: function (ctx, shape) {
- // 逆时针 角 y 负数向上 X 负数向左
- const c1 = [shape.x, shape.y]
- const c2 = [shape.x + 8, shape.y - 4]
- const c3 = [shape.x - 11, shape.y - 8]
- const c4 = [shape.x - 20, shape.y - 4]
- ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
- .closePath()
- }
- })
- echarts.graphic.registerShape('CubeLeft', CubeLeft)
- echarts.graphic.registerShape('CubeRight', CubeRight)
- echarts.graphic.registerShape('CubeTop', CubeTop)
- let MAX = []
- let VALUE = []
- let LEV = []
- let chartData = [].concat(data)
- chartData.forEach(item => {
- VALUE.push(item.landArea)
- LEV.push(item.level)
- })
- let maxItem = [].concat(VALUE).sort((a, b) => b - a)[0]
-
- let SUM = 0
- for (let item of VALUE) {
- SUM += item
- MAX.push(maxItem)
- }
- option = {
- tooltip: {
- trigger: 'item',
- textStyle: {
- color: '#ffe400',
- fontSize: '16',
- fontWeight: '500'
- },
- position: 'top',
- backgroundColor: 'rgba(250,250,250,0)',
- transitionDuration: 0.4,
- formatter: function (params) {
- return '<div style="background-image: url(image/second/reminder_box2.png);width:50px;height:33px;line-height:30px;background-size: 100% 100%;text-align:center;">' +
- VALUE[params.dataIndex] + '</div>';
- }
- },
-
- grid: {
- right: "5%",
- top: "20%",
- left: "5%",
- bottom: "5%",
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: LEV,
- axisLine: {
- show: true,
- lineStyle: {
- color: '#687e89'
- }
- },
- offset: 10,
- axisTick: {
- show: false
- },
- axisLabel: {
- fontSize: 14,
- rotate: -45,
- color: '#fff'
- }
- },
- yAxis: [{
- nameTextStyle: {
- color: "#f4f5f5",
- padding: [0, 0, 10, -5],
- fontSize: 16
- },
- axisLabel: {
- color: "#f4f5f5",
- fontSize: 16
- },
- axisTick: {
- lineStyle: {
- color: "#687f8a",
- width: 1
- },
- show: true
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: "#687f8a",
- type: "dashed"
- }
- },
- axisLine: {
- lineStyle: {
- color: "#687f8a",
- 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: [{
- type: 'custom',
- renderItem: (params, api) => {
- const location = api.coord([api.value(0), api.value(1)])
- return {
- type: 'group',
- children: [{
- type: 'CubeLeft',
- shape: {
- api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#3fffea'
- }, {
- offset: 1,
- color: '#007eff'
- }])
- },
-
- },
- {
- type: 'CubeRight',
- shape: {
- api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#2fbeaf' // 顶部
- }, {
- offset: 1,
- color: '#015fbf' // 底部
- }])
- }
- }, {
- type: 'CubeTop',
- shape: {
- api,
- xValue: api.value(0),
- yValue: api.value(1),
- x: location[0],
- y: location[1],
- xAxisPoint: api.coord([api.value(0), 0])
- },
- style: {
- fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#9ffff5'
- }, {
- offset: 1,
- color: '#9ffff5'
- }])
- },
- }
- ]
- }
- },
- data: VALUE
- }, {
- type: 'bar',
- itemStyle: {
- color: 'rgba(255,255,255,0)'
- },
- emphasis: {
- itemStyle: {
- opacity: 0.2,
- color: 'rgb(60,118,77)'
- }
- },
- data: MAX
- },]
- }
- hotline2.setOption(option);
- if (dom == 'hotline2') {
- hotline2.on('click', function (params) {
- console.log(params, 'hotline2')
- workTable('', '', '', params.name, '', '', '', '', 0)
- })
- } else if (dom == 'events') {
- hotline2.on('click', function (params) {
- console.log(params, 'events')
- var keyValue = getKey(data,'level',params.name,'key')
- // TODO:缺少时间范围timetype,handling,source,dptype, date, Township, strworkid, stime, etime
- // workTable('', '', '', '', "", '', '', keyValue, 0)
- workTable('','','','','' ,'','',keyValue,null,null,null,null, null, null, null, $('#date2').val() && $('#date2').val().split(' ~ ')[0], $('#date2').val() && $('#date2').val().split(' ~ ')[1])
- })
- } else if (dom == 'channel') {
- hotline2.on('click', function (params) {
-
- var time = $('#date3').val().split(' ~ ');
-
- var sourceInfo = sourceCountId.find(function(o) {
- return o.name == params.name;
- })
-
- console.log(sourceInfo, 'sourceInfo')
-
- if (sourceInfo) {
- if (sourceInfo.strworkid) {
- //KeyId,deptid,sourceId,PhoneType,keyword ,type,sourceArea,key,timetype,handling,source,dptype, date, Township, strworkid
- workTable('', '', '', '', '', '', '', '', 0,'','','', '', '', sourceInfo.strworkid, time[0], time[1])
- } else {
- workTable('', '', '', '', '', '', '', '', 0, '', sourceInfo.id,'', '', '', '', time[0], time[1])
- }
- }
-
- })
- }
-
- }
- function getKey(data,key1,value,key2){
- var dataValue
- data.forEach(function (ele) {
- if (ele[key1]===value) {
- dataValue =ele[key2]
-
- }
- })
- return dataValue
- }
- //受理工单类型
- function getAcceptanceType() {
- var $tableLeft = $('#acceptancelist');
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount",
- striped: false, //表格显示条纹
- pagination: false, //启动分页
- pageSize: 12, //每页显示的记录数
- pageNumber: 1, //当前第几页
- fixedColumns: false,
- fixedNumber: 3,
- pageList: [5, 10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- token: $.cookie("token"),
- timetype:typeCountDataType
- }
- return param
- },
- onLoadSuccess: function (data) { //加载成功时执行
- const newDataL = {};
- let handTotal = 0;
- newDataL.state = data.state;
- newDataL.message = data.message;
- newDataL.rows = data.data;
- $tableLeft.bootstrapTable('load', newDataL);
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetHandling",
- data: {
- token: $.cookie("token"),
- timetype:typeCountDataType
- },
- callBack: function (res) {
- let handingData = [{
- value: res[0].db,
- name: '督办'
- }, {
- value: res[0].zhib,
- name: '直办'
- }, {
- value: res[0].zub,
- name: '转办'
- },
- {
- value: res[0].cb,
- name: '催办'
- }
- ]
- handTotal = res[0].db + res[0].zhib + res[0].zub + res[0].cb;
- $('.acceptanceType_wrap .total').text(handTotal);
- getTimes('.statisticsTime')
- getHandling(handingData);
- }
- });
- },
- onLoadError: function () { //加载失败时执行
- layer.msg("加载数据失败", {
- time: 1500,
- icon: 2
- });
- }
- });
- }
- function getHandling(data) {
- let sortPie = echarts.init(document.getElementById('acceptancePie'));
- option = {
- legend: [{
- icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
- orient: 'vertical',
- data: ['督办', '直办', '转办', '催办'],
- left: '80%',
- top: 'center',
- align: 'left',
- textStyle: {
- color: "#fff",
- fontSize: 18
- },
- padding: [10, 60],
- itemGap: 20
- }],
- color: ['#c046ff', '#00a8ff', '#00ffe4', '#f1b31e'],
- series: [{
- name: '访问来源',
- type: 'pie',
- radius: '76%',
- data: data,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- },
- label: {
- normal: {
- show: false,
- formatter: function (params) {
- return params.name + ':' + params.value
- // return
- },
- },
- emphasis: {
- position: 'left',
- show: true,
- textStyle: {
- color: '#fff',
- fontSize: '18',
- fontWeight: 'bold'
- },
- length: 1
- }
- },
- }]
- };
- sortPie.setOption(option);
- sortPie.on('click', function (params) {
- console.log(params.name)
- if (params.name == '直办') {
- workTable('', '', '', '', '', '', '', '', 0, 2)
- } else if (params.name == '督办') {
- workTable('', '', '', '', '', '', '', '', 0, 1)
- } else if (params.name == '转办') {
- workTable('', '', '', '', '', '', '', '', 0, 3)
- } else {
- workTable('', '', '', '', '', '', '', '', 0, 4)
- }
- })
- }
- function getAcceptanceName(val, row) {
- if (row.type == '咨询') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 9 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '投诉') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 11 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '建议') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 12 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '其他') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 90 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '求助') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 10 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '表扬') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 13 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- } else if (row.type == '举报') {
- return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 89 +
- '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
- }
-
- }
- //时段话务
- function trafficMonthChart(hours, monthCount, dayCount) {
- let traffic = echarts.init(document.getElementById('traffic2'));
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- show: true,
- type: 'line',
- lineStyle: {
- type: 'dashed'
- }
- },
- textStyle: {
- color: '#fff',
- fontSize: 16,
- fontWeight: '600',
- },
- position: ['75%', '55%'],
- backgroundColor: 'rgba(250,250,250,0)',
- formatter: function (params) {
- console.log()
- let str = '<div style="position: absolute;top:-315px;left:-423px">接通率:' + ((params[1].value / params[0].value) * 100).toFixed(0) + '%</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: '#08fcff'
- },
- lineStyle: {
- normal: {
- width: 2,
- color: "#08fcff",
- }
- },
- label: {
- show: true,
- position: 'top',
- color: '#fff',
- fontSize: 14,
- fontWeight: '600',
- formatter: function (params) {
- console.log(params)
- return params.seriesName + ':' + params.value
- }
- },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [{
- offset: 0,
- color: "#087caa"
- },
- {
- offset: 0.8,
- color: "#091576"
- }
- ],
- 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: '#ffe000'
- },
- label: {
- show: true,
- position: 'top',
- color: '#fff',
- fontSize: 14,
- fontWeight: '600',
- formatter: function (params) {
- return params.seriesName + ':' + params.value
- }
- },
- lineStyle: {
- normal: {
- width: 2,
- color: "#ffe000",
- }
- },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [{
- offset: 0,
- color: "#739952"
- },
- {
- offset: 0.8,
- color: "#091576"
- }
- ],
- false
- ),
- }
- },
- emphasis: {
- itemStyle: {
- color: '#fff',
- shadowBlur: 10,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: 'rgb(250,250, 250)'
- }
- },
- data: dayCount
- }]
- };
- traffic.setOption(option);
- }
- function trafficDayChart(dataArr) {
- let traffic3 = echarts.init(document.getElementById('rexian'));
- // 头部菱形
- const diamondData = dataArr.result.reduce((pre, cur, index) => {
- pre[index] = cur.data.map((el, id) => el + (pre[index - 1] ? pre[index - 1][id] : 0))
- return pre
- }, [])
-
- // color
- const color = [
- [{ offset: 0, color: "#efff37", }, { offset: 0.5, color: "#efff37", }, { offset: 0.5, color: "#d5e700", }, { offset: 1, color: "#d5e700", }],
- [{ offset: 0, color: "#f67c20", }, { offset: 0.5, color: "#f67c20", }, { offset: 0.5, color: "#cc681e", }, { offset: 1, color: "#cc681e", }],
- [{ offset: 0, color: "#32ffee", }, { offset: 0.5, color: "#32ffee", }, { offset: 0.5, color: "#00e8d5", }, { offset: 1, color: "#00e8d5", }],
- [{ offset: 0, color: "#dc0707", }, { offset: 0.5, color: "#dc0707", }, { offset: 0.5, color: "#af0808", }, { offset: 1, color: "#af0808", }],
- ]
- // series
- let series = dataArr.result.reduce((p, c, i, array) => {
- p.push({
- z: i + 1,
- stack: '总量',
- type: 'bar',
- name: c.name,
- barGap: '-100%',
- barWidth: 30,
- data: c.data,
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
- }, {
- z: i + 10,
- type: 'pictorialBar',
- symbolPosition: 'end',
- symbol: 'diamond',
- symbolOffset: [0, '-50%'],
- symbolSize: [30, 10],
- data: diamondData[i],
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
- tooltip: { show: false },
- })
-
- // 是否最后一个了?
- if (p.length === (array.length) * 2) {
- p.push({
- z: array.length * 2,
- type: "pictorialBar",
- symbolPosition: "start",
- data: dataArr.result[0].data,
- symbol: "diamond",
- symbolOffset: ["0%", "50%"],
- symbolSize: [30, 10],
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[0] } },
- tooltip: { show: false },
- })
- return p
- }
-
- return p
- }, [])
-
- // tooltip
- const tooltip = {
- trigger: 'axis',
- axisPointer: {
- show: true,
- type: 'line',
- lineStyle: {
- type: 'dashed'
- }
- },
- textStyle: {
- color: '#ffe400',
- fontSize: '14'
- },
- backgroundColor: 'rgba(250,250,250,0)',
- formatter: function (params) {
- let str = '<div style="background-image: url(image/key_frame.png);width:134px;height:130px;line-height:25px;background-size: 100% 100%;padding:13px 10px;">'
- 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;
- }
- }
- const legend = {
- data: dataArr.result.map(item => item.name),
- textStyle: { fontSize: 14, color: '#fff' },
- itemWidth: 25,
- itemHeight: 15,
- itemGap: 15,
- // top: '5%',
- // 禁止点击
- selectedMode: false,
- }
- // grid
- const grid = {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true,
- tooltip: {
- textStyle: {
- color: '#fff'
- }
- }
- }
-
- // xAxis
- const xAxis = {
- axisTick: { show: true },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#525fa6"
- }
- },
- axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
- data: dataArr.xdata
- }
- // yAxis
- const 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"
- }
- }
- }]
- // 渲染
- option = {
- tooltip, xAxis, yAxis, series, grid, legend
- }
- traffic3.setOption(option)
- }
- function getS(dataArr) {
- let traffic3 = echarts.init(document.getElementById('heji'));
- // 头部菱形
- const diamondData = dataArr.result.reduce((pre, cur, index) => {
- pre[index] = cur.data.map((el, id) => el + (pre[index - 1] ? pre[index - 1][id] : 0))
- return pre
- }, [])
-
- // color
- const color = [
- [{ offset: 0, color: "#efff37", }, { offset: 0.5, color: "#efff37", }, { offset: 0.5, color: "#d5e700", }, { offset: 1, color: "#d5e700", }],
- [{ offset: 0, color: "#f67c20", }, { offset: 0.5, color: "#f67c20", }, { offset: 0.5, color: "#cc681e", }, { offset: 1, color: "#cc681e", }],
- [{ offset: 0, color: "#32ffee", }, { offset: 0.5, color: "#32ffee", }, { offset: 0.5, color: "#00e8d5", }, { offset: 1, color: "#00e8d5", }],
- [{ offset: 0, color: "#dc0707", }, { offset: 0.5, color: "#dc0707", }, { offset: 0.5, color: "#af0808", }, { offset: 1, color: "#af0808", }],
- ]
-
- // series
- let series = dataArr.result.reduce((p, c, i, array) => {
- p.push({
- z: i + 1,
- stack: '总量',
- type: 'bar',
- name: c.name,
- barGap: '-100%',
- barWidth: 30,
- data: c.data,
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
- }, {
- z: i + 10,
- type: 'pictorialBar',
- symbolPosition: 'end',
- symbol: 'diamond',
- symbolOffset: [0, '-50%'],
- symbolSize: [30, 10],
- data: diamondData[i],
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
- tooltip: { show: false },
- })
-
- // 是否最后一个了?
- if (p.length === (array.length) * 2) {
- p.push({
- z: array.length * 2,
- type: "pictorialBar",
- symbolPosition: "start",
- data: dataArr.result[0].data,
- symbol: "diamond",
- symbolOffset: ["0%", "50%"],
- symbolSize: [30, 10],
- itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[0] } },
- tooltip: { show: false },
- })
- return p
- }
-
- return p
- }, [])
-
- // tooltip
- const tooltip = {
- trigger: 'axis',
- axisPointer: {
- show: true,
- type: 'line',
- lineStyle: {
- type: 'dashed'
- }
- },
- textStyle: {
- color: '#ffe400',
- fontSize: '14'
- },
- backgroundColor: 'rgba(250,250,250,0)',
- formatter: function (params) {
- let str = '<div style="background-image: url(image/key_frame.png);width:134px;height:130px;line-height:25px;background-size: 100% 100%;padding:13px 10px;">'
- 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
- const grid = {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true,
- tooltip: {
- textStyle: {
- color: '#fff'
- }
- }
- }
-
- // xAxis
- const xAxis = {
- axisTick: { show: true },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#525fa6"
- }
- },
- axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
- data: dataArr.xdata
- }
- // yAxis
- const 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"
- }
- }
- }]
- // 渲染
- option = {
- tooltip, xAxis, yAxis, series, grid
- }
- traffic3.setOption(option)
- }
- //坐席监控
- //实时话务统计
- function getRealTimeTraffi(hours, hrCount, hcCount) {
- let realTimeTraffi = echarts.init(document.getElementById('realTimeTraffi'));
- option = {
- grid: {
- top: '20%',
- bottom: '20%'
- },
- legend: {
- data: ['呼入', '呼出'],
- textStyle: {
- color: '#fff',
- fontSize: 14,
- padding: [0, 5]
- },
- right: 25,
- top: -5
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- show: true,
- type: 'line',
- lineStyle: {
- type: 'dashed'
- }
- },
- textStyle: {
- color: '#fff',
- fontSize: 16,
- fontWeight: '600',
- },
- backgroundColor: 'rgba(250,250,250,0)',
- formatter: function (params) {
- let str = '<div style="background-image: url(image/key_frame.png);width:128px;height:70px;line-height:25px;background-size: 100% 100%;padding:7px 8px;">'
- 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;
- }
- },
- xAxis: [{
- type: "category",
- boundaryGap: false,
- scale: true,
- axisLabel: {
- formatter: '{value}',
- fontSize: 13,
- margin: 10,
- textStyle: {
- color: "#f4f4f8"
- }
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#849cc9"
- }
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: "#849cc9"
- }
- },
- 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: "#849cc9",
- type: "dashed"
- }
- },
- axisLine: {
- lineStyle: {
- color: "#849cc9",
- 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],
- },
- }],
- series: [{
- name: "呼入",
- type: "line",
- smooth: true,
- showSymbol: false,
- symbol: 'circle',
- symbolSize: 4,
- zlevel: 3,
- itemStyle: {
- color: '#08fcff'
- },
- lineStyle: {
- normal: {
- width: 2,
- color: "#01cde6",
- }
- },
- // label: {
- // show: true,
- // position: 'top',
- // color: '#fff',
- // fontSize: 14,
- // fontWeight: '600',
- // formatter: function (params) {
- // console.log(params)
- // return params.seriesName + ':' + params.value
- // }
- // },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [{
- offset: 0,
- color: "#0571ae"
- },
- {
- offset: 0.8,
- color: "#093085"
- }
- ],
- false
- ),
- }
- },
- emphasis: {
- itemStyle: {
- color: '#fff',
- shadowBlur: 10,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: 'rgb(250,250, 250)'
- }
- },
- data: hrCount
- }, {
- name: "呼出",
- type: "line",
- smooth: true,
- showSymbol: false,
- symbol: 'circle',
- symbolSize: 4,
- zlevel: 3,
- itemStyle: {
- color: '#ffe000'
- },
- // label: {
- // show: true,
- // position: 'top',
- // color: '#fff',
- // fontSize: 14,
- // fontWeight: '600',
- // formatter: function (params) {
- // return params.seriesName + ':' + params.value
- // }
- // },
- lineStyle: {
- normal: {
- width: 2,
- color: "#ffd200",
- }
- },
- areaStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [{
- offset: 0,
- color: "#626a55"
- },
- {
- offset: 0.8,
- color: "#093085"
- }
- ],
- false
- ),
- }
- },
- emphasis: {
- itemStyle: {
- color: '#fff',
- shadowBlur: 10,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: 'rgb(250,250, 250)'
- }
- },
- data: hcCount
- }]
- };
- realTimeTraffi.setOption(option);
- }
-
|