Brak opisu

second_index.js 81KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325
  1. // 关键词
  2. let keyidArr = [];
  3. let keyid = 0;
  4. let starKeyId = 0;
  5. let keyname = '';
  6. let keylegend = [];
  7. let nameK = ''
  8. let reg = /\w\d+$/;
  9. $('.backKey_icon').click(function () {
  10. for (let i = 0; i < keyidArr.length; i++) {
  11. if (keyidArr[i].id == keyid) {
  12. $('.keyWordTitle').text(keyidArr[i - 1].name + '问题分类')
  13. $('.head_title').text(keyidArr[i - 1].name + '关键字数据分析')
  14. keyWordTable(keyidArr[i - 1].id);
  15. keyidArr.pop(keyidArr[i].id)
  16. keyid = keyidArr[i - 1].id
  17. }
  18. }
  19. })
  20. $('.closeKey_icon').click(function () {
  21. $('#themeIdHidden').val('')
  22. $('.bulletFrame').hide();
  23. $('.bulletFrameT').hide();
  24. if ($('.bulletFrame').css('display') == 'none') {
  25. $('.body').css('opacity', '1')
  26. }
  27. if ($('.bulletFrameT').css('display') == 'none') {
  28. $('.body').css('opacity', '1')
  29. }
  30. keyidArr = [];
  31. keyid = 0
  32. })
  33. // 获取当月的开始和结束时间并转换为时分秒形式
  34. function getMonthTime(time) {
  35. const now = new Date(time);
  36. const year = now.getFullYear();
  37. const month = now.getMonth(); // 从0开始的月份索引
  38. // 当月开始时间
  39. const startOfMonth = formatDate(new Date(year, month, 1));
  40. // 当月结束时间
  41. const endOfMonth = formatDate(new Date(year, month + 1, 0));
  42. return {
  43. start: startOfMonth,
  44. end: endOfMonth
  45. };
  46. }
  47. function formatDate(date) {
  48. var year = date.getFullYear();
  49. var month = date.getMonth() + 1;
  50. var strDate = date.getDate();
  51. if (strDate >= 0 && strDate <= 9) {
  52. strDate = "0" + strDate;
  53. }
  54. return year + '-' + month + '-' + strDate;
  55. }
  56. function getKeyClass(id, classId, con) {
  57. $('.bulletFrame').show();
  58. $('.secondLevel_keyWord').show();
  59. $('.secondLevel_keyWord').siblings().hide()
  60. if ($('.bulletFrame').css('display') == 'block') {
  61. $('.body').css('opacity', '0.4')
  62. }
  63. var lastTime = $('#keyDate').val();
  64. if (!lastTime || lastTime == '' || lastTime.length > 10) {
  65. lastTime = getNowTime('', 3);
  66. }
  67. laydate.render({
  68. elem: '#keyDate',
  69. type: 'date',
  70. calendar: true,
  71. value: lastTime,
  72. done: function (value) {
  73. $('.keyWordTitle').text(keyidArr[0].name + '问题分类')
  74. $('.head_title').text(keyidArr[0].name + '关键字数据分析')
  75. $('.statisticsTime').html(value)
  76. keyWordTable(keyidArr[0].id, keyidArr[0].name, value);
  77. }
  78. });
  79. if (classId == '1' || classId == '0') {
  80. // 当月
  81. if ($('#gpsxDataAct').val() == '2') {
  82. //
  83. // workTable(id,null,null,null,null ,null,null,null,null,null,null,null, $('#keyDate').val());
  84. var currentTime = getMonthTime($('#keyDate').val());
  85. workTable(id,null,null,null,null ,null,null,null,null,null,null,null, null, null, null, currentTime.start, currentTime.end, classId == '0' ? 1: null);
  86. } else {
  87. // 当日
  88. workTable(id,null,null,null,null ,null,null,null,null,null,null,null, $('#keyDate').val(), null, null, null, null , classId == '0' ? 1: null);
  89. }
  90. } else {
  91. // getTimes('.statisticsTime', 1)
  92. $('.statisticsTime').html($('#keyDate').val())
  93. keyidArr.push({
  94. name: con,
  95. id: id
  96. })
  97. keyid = id
  98. $('.keyWordTitle').text(con + '问题分类')
  99. $('.head_title').text(con + '关键字数据分析')
  100. keyWordTable(id, con, $('#keyDate').val());
  101. }
  102. }
  103. function keyWordTable(id, con, value) {
  104. var $tableLeft = $('#keyWordlist');
  105. $tableLeft.bootstrapTable('destroy');
  106. //初始化表格,动态从服务器加载数据
  107. $tableLeft.bootstrapTable({
  108. method: "get", //使用get请求到服务器获取数据
  109. url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
  110. striped: false, //表格显示条纹
  111. pagination: false, //启动分页
  112. pageSize: 12, //每页显示的记录数
  113. pageNumber: 1, //当前第几页
  114. fixedColumns: false,
  115. fixedNumber: 3,
  116. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  117. search: false, //是否启用查询
  118. showColumns: false, //显示下拉框勾选要显示的列
  119. showRefresh: false, //显示刷新按钮
  120. sidePagination: "server", //表示服务端请求
  121. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  122. //设置为limit可以获取limit, offset, search, sort, order
  123. queryParamsType: "undefined",
  124. queryParams: function queryParams(params) { //设置查询参数
  125. var param = {
  126. pid: id,
  127. token: $.cookie("token"),
  128. timetype:keyCountDataType,
  129. date: value
  130. }
  131. return param
  132. },
  133. onLoadSuccess: function (data) { //加载成功时执行
  134. const newDataL = {};
  135. const piData = [];
  136. newDataL.state = data.state;
  137. newDataL.message = data.message;
  138. newDataL.rows = data.data.Date;
  139. data.data.Date.forEach(function (v, n) {
  140. piData.push({
  141. value: v.Count,
  142. name: v.KeyName.replace(reg, '')
  143. })
  144. })
  145. var nameArray = piData.map(item => {
  146. return item.name
  147. })
  148. keyword_chart('keywordPie', nameArray, piData, con);
  149. $('.total').text(data.data.Total)
  150. $('.classTotal').text(data.data.ClaseeCount)
  151. $('.prot').text(data.data.ClassTotal)
  152. $tableLeft.bootstrapTable('load', newDataL);
  153. },
  154. onLoadError: function () { //加载失败时执行
  155. layer.msg("加载数据失败", {
  156. time: 1500,
  157. icon: 2
  158. });
  159. }
  160. });
  161. }
  162. function keyword_chart(dom, nameArray, piData, con) {
  163. let keywordPieChart = echarts.init(document.getElementById(dom));
  164. let keywordNum = [];
  165. let keywordName = [];
  166. var rich = {
  167. percent: {
  168. color: "#FFF",
  169. align: 'right',
  170. fontSize: 15,
  171. fontWeight: '500',
  172. //padding: [0, 5]
  173. }
  174. }
  175. nameArray.forEach(function (v, n) {
  176. keywordNum.push({
  177. num: Number(v.substr(v.length - 2, 2)),
  178. value: v
  179. })
  180. })
  181. let max;
  182. for (let i = 0; i < keywordNum.length; i++) {
  183. for (let j = i; j < keywordNum.length; j++) {
  184. if (keywordNum[i].num < keywordNum[j].num) {
  185. max = keywordNum[j];
  186. keywordNum[j] = keywordNum[i];
  187. keywordNum[i] = max;
  188. }
  189. }
  190. }
  191. keywordNum.forEach(function (v, n) {
  192. keywordName.push(v.value.replace(reg, ''));
  193. })
  194. keywordName.forEach(function (v, n) {
  195. if (v.length > 20) {
  196. keylegend = [{
  197. 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`,
  198. orient: 'vertical',
  199. top: '610',
  200. // data: keywordName.slice(0, 6),
  201. data: keywordName.slice(0, 1),
  202. width: 28,
  203. height: 25,
  204. textStyle: {
  205. color: '#fff',
  206. padding: [0, 5],
  207. fontSize: 15
  208. },
  209. padding: [5, 10]
  210. }, {
  211. 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`,
  212. orient: 'vertical',
  213. top: '620',
  214. // data: keywordName.slice(6, 12),
  215. data: keywordName.slice(1, 2),
  216. width: 28,
  217. height: 25,
  218. itemGap: 20,
  219. textStyle: {
  220. color: '#fff',
  221. padding: [0, 5],
  222. fontSize: 15
  223. },
  224. padding: [10, 10]
  225. }, {
  226. 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`,
  227. orient: 'vertical',
  228. top: '630',
  229. // data: keywordName.slice(12, keywordName.length),
  230. data: keywordName.slice(2, 3),
  231. width: 28,
  232. height: 25,
  233. textStyle: {
  234. color: '#fff',
  235. padding: [0, 5],
  236. fontSize: 15
  237. },
  238. padding: [20, 10]
  239. },
  240. {
  241. 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`,
  242. orient: 'vertical',
  243. top: '630',
  244. // data: keywordName.slice(12, keywordName.length),
  245. data: keywordName.slice(3, 4),
  246. width: 28,
  247. height: 25,
  248. textStyle: {
  249. color: '#fff',
  250. padding: [0, 5],
  251. fontSize: 15
  252. },
  253. padding: [40, 10]
  254. }, {
  255. 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`,
  256. orient: 'vertical',
  257. top: '630',
  258. // data: keywordName.slice(12, keywordName.length),
  259. data: keywordName.slice(4, 5),
  260. width: 28,
  261. height: 25,
  262. textStyle: {
  263. color: '#fff',
  264. padding: [0, 5],
  265. fontSize: 15
  266. },
  267. padding: [60, 10]
  268. }, {
  269. 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`,
  270. orient: 'vertical',
  271. top: '630',
  272. // data: keywordName.slice(12, keywordName.length),
  273. data: keywordName.slice(5, 6),
  274. width: 28,
  275. height: 25,
  276. textStyle: {
  277. color: '#fff',
  278. padding: [0, 5],
  279. fontSize: 15
  280. },
  281. padding: [80, 10]
  282. }, {
  283. 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`,
  284. orient: 'vertical',
  285. top: '630',
  286. // data: keywordName.slice(12, keywordName.length),
  287. data: keywordName.slice(6, keywordName.length),
  288. width: 28,
  289. height: 25,
  290. textStyle: {
  291. color: '#fff',
  292. padding: [0, 5],
  293. fontSize: 15
  294. },
  295. padding: [100, 10]
  296. }]
  297. } else {
  298. if (con == '营商管理03') {
  299. keylegend = [{
  300. 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`,
  301. orient: 'vertical',
  302. top: '610',
  303. // data: keywordName.slice(0, 6),
  304. data: keywordName.slice(0, 6),
  305. width: 28,
  306. height: 25,
  307. textStyle: {
  308. color: '#fff',
  309. padding: [0, 5],
  310. fontSize: 15
  311. },
  312. padding: [15, 10]
  313. }, {
  314. 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`,
  315. orient: 'vertical',
  316. top: '620',
  317. // data: keywordName.slice(6, 12),
  318. data: keywordName.slice(6, 12),
  319. width: 28,
  320. height: 25,
  321. itemGap: 20,
  322. textStyle: {
  323. color: '#fff',
  324. padding: [0, 5],
  325. fontSize: 15
  326. },
  327. padding: [40, 10]
  328. }, {
  329. 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`,
  330. orient: 'vertical',
  331. top: '630',
  332. // data: keywordName.slice(12, keywordName.length),
  333. data: keywordName.slice(12, 18),
  334. width: 28,
  335. height: 25,
  336. textStyle: {
  337. color: '#fff',
  338. padding: [0, 5],
  339. fontSize: 15
  340. },
  341. padding: [65, 10]
  342. },
  343. {
  344. 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`,
  345. orient: 'vertical',
  346. top: '630',
  347. // data: keywordName.slice(12, keywordName.length),
  348. data: keywordName.slice(18, keywordName.length),
  349. width: 30,
  350. height: 25,
  351. textStyle: {
  352. color: '#fff',
  353. padding: [0, 5],
  354. fontSize: 15
  355. },
  356. padding: [90, 10]
  357. }
  358. ]
  359. } else {
  360. keylegend = [{
  361. 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`,
  362. orient: 'vertical',
  363. top: '610',
  364. // data: keywordName.slice(0, 6),
  365. data: keywordName.slice(0, 5),
  366. width: 28,
  367. height: 25,
  368. textStyle: {
  369. color: '#fff',
  370. padding: [0, 5],
  371. fontSize: 15
  372. },
  373. padding: [15, 10]
  374. }, {
  375. 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`,
  376. orient: 'vertical',
  377. top: '620',
  378. // data: keywordName.slice(6, 12),
  379. data: keywordName.slice(5, 10),
  380. width: 28,
  381. height: 25,
  382. itemGap: 20,
  383. textStyle: {
  384. color: '#fff',
  385. padding: [0, 5],
  386. fontSize: 15
  387. },
  388. padding: [40, 10]
  389. }, {
  390. 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`,
  391. orient: 'vertical',
  392. top: '630',
  393. // data: keywordName.slice(12, keywordName.length),
  394. data: keywordName.slice(10, 15),
  395. width: 28,
  396. height: 25,
  397. textStyle: {
  398. color: '#fff',
  399. padding: [0, 5],
  400. fontSize: 15
  401. },
  402. padding: [65, 10]
  403. },
  404. {
  405. 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`,
  406. orient: 'vertical',
  407. top: '630',
  408. // data: keywordName.slice(12, keywordName.length),
  409. data: keywordName.slice(15, keywordName.length),
  410. width: 30,
  411. height: 25,
  412. textStyle: {
  413. color: '#fff',
  414. padding: [0, 5],
  415. fontSize: 15
  416. },
  417. padding: [90, 10]
  418. }
  419. ]
  420. }
  421. }
  422. })
  423. keywordName.reverse();
  424. option = {
  425. legend: keylegend,
  426. color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76',
  427. '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff',
  428. '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722',
  429. '#00BFA5', "#EAEA26"
  430. ],
  431. series: [{
  432. name: '访问来源',
  433. type: 'pie',
  434. radius: '58%',
  435. data: piData,
  436. emphasis: {
  437. itemStyle: {
  438. shadowBlur: 10,
  439. shadowOffsetX: 0,
  440. shadowColor: 'rgba(0, 0, 0, 0.5)'
  441. }
  442. },
  443. label: {
  444. normal: {
  445. show: false,
  446. formatter: function (params) {
  447. if (params.name.length > 9 && params.name.length < 35) {
  448. return params.name.substring(0, 20) + '\n' + params.name.substring(20, params.name.length) + ':' + params.value;
  449. } else if (params.name.length > 35) {
  450. return params.name.substring(0, 18) + '\n' + params.name.substring(18, 36) + '\n' + params.name.substring(36, params.name.length) + ':' + params.value;
  451. } else {
  452. return params.name + ':' + params.value;
  453. }
  454. }
  455. },
  456. emphasis: {
  457. // position: 'left',
  458. show: true,
  459. textStyle: {
  460. color: '#fff',
  461. fontSize: '14',
  462. fontWeight: 'bold'
  463. },
  464. labelLine: {
  465. show: true
  466. },
  467. length: 1
  468. }
  469. }
  470. }]
  471. };
  472. keywordPieChart.setOption(option);
  473. }
  474. function Code(val, row, index) {
  475. let num = index + 1
  476. return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:50px;text-align: center;'>" +
  477. num + "</span>"
  478. // return index + 1;
  479. }
  480. function getKeyName(v, r) {
  481. for (let i = 0; i < keyidArr.length; i++) {
  482. if (keyidArr[i].id == keyid) {
  483. if (keyidArr[0].id == keyid) {
  484. $('.backKey_icon').css('display', 'none')
  485. } else {
  486. $('.backKey_icon').css('display', 'block')
  487. }
  488. }
  489. }
  490. return '<span class="workAct" onclick="getKeyClass(\'' + r.KeyId + '\',\'' + r.ClassCount + '\',\'' + r.KeyName +
  491. '\')">' + v + '</span>'
  492. }
  493. function getKeyBili(v) {
  494. return "<div style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:70px;margin:0 auto;'>" +
  495. v + "</div>"
  496. }
  497. function getKeyNum(v) {
  498. return "<div style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;margin:0 auto;'>" +
  499. v + "</div>"
  500. }
  501. //办理时长
  502. function timeSecTable(dom, type) {
  503. getTimes('.dataTT')
  504. var $tableLeft = $(dom);
  505. $tableLeft.bootstrapTable('destroy');
  506. //初始化表格,动态从服务器加载数据
  507. $tableLeft.bootstrapTable({
  508. method: "get", //使用get请求到服务器获取数据
  509. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
  510. striped: false, //表格显示条纹
  511. pagination: false, //启动分页
  512. pageSize: 12, //每页显示的记录数
  513. pageNumber: 1, //当前第几页
  514. fixedColumns: false,
  515. fixedNumber: 3,
  516. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  517. search: false, //是否启用查询
  518. showColumns: false, //显示下拉框勾选要显示的列
  519. showRefresh: false, //显示刷新按钮
  520. sidePagination: "server", //表示服务端请求
  521. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  522. //设置为limit可以获取limit, offset, search, sort, order
  523. queryParamsType: "undefined",
  524. queryParams: function queryParams(params) { //设置查询参数
  525. var param = {
  526. token: $.cookie("token"),
  527. type: type,
  528. data:$("#rankDate2").val()
  529. };
  530. return param;
  531. },
  532. onLoadSuccess: function (data) { //加载成功时执行
  533. // data.reverse();
  534. const newDataL = {};
  535. newDataL.state = "success";
  536. newDataL.message = "加载成功";
  537. newDataL.rows = data;
  538. $tableLeft.bootstrapTable('load', newDataL);
  539. },
  540. onLoadError: function () { //加载失败时执行
  541. layer.msg("加载数据失败", {
  542. time: 1500,
  543. icon: 2
  544. });
  545. }
  546. });
  547. }
  548. //办理时长表格操作
  549. function getCompanyName(v, r) {
  550. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + r.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
  551. + '\',\'' + '' + '\',\'' + 0 + '\')">' + v + '</span>'
  552. }
  553. function trend(val, row) {
  554. var str = '';
  555. if (row.trend.substring(0, 1) == '-' && row.trend.length > 1) {
  556. str = '<ul class="tool_downs">' +
  557. '<li><img src="./image/second/down_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  558. .trend.substring(1) + '<li>' +
  559. '</ul>';
  560. } else if (row.trend.substring(0, 1) != '-' && row.trend.length > 1) {
  561. str = '<ul class="tool_downs">' +
  562. '<li><img src="./image/second/up_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  563. .trend + '<li>' +
  564. '</ul>';
  565. } else {
  566. str = '<ul class="tool_downs">' +
  567. '<li>' + row.trend + '<li>' +
  568. '</ul>';
  569. }
  570. return str
  571. }
  572. var tableColumns = [
  573. // {
  574. // title: '序号',
  575. // align: 'center',
  576. // formatter: function(value, row, index) {
  577. // return index + 1
  578. // }
  579. // },
  580. {
  581. field: 'deptname',
  582. title: '联动单位',
  583. align: 'center'
  584. },
  585. {
  586. field: 'Undertakers',
  587. title: '承办件',
  588. align: 'center',
  589. formatter: function(value, row, index) {
  590. return handleOrderList(value, row, 0);
  591. }
  592. },
  593. {
  594. field: 'Undertakersrate',
  595. title: '承办率',
  596. align: 'center'
  597. },
  598. // {
  599. // field: 'Undertakersscore',
  600. // title: '得分(3分)',
  601. // align: 'center'
  602. // },
  603. {
  604. field: 'signfor',
  605. title: '及时签收件',
  606. align: 'center',
  607. formatter: function(value, row, index) {
  608. return handleOrderList(value, row, 1);
  609. }
  610. },
  611. // {
  612. // field: 'oversignfor',
  613. // title: '超时签收件 ',
  614. // align: 'center',
  615. // formatter: function(value, row, index) {
  616. // return handleOrderList(value, row, 2);
  617. // }
  618. // },
  619. {
  620. field: 'signforrate',
  621. title: '及时签收率',
  622. align: 'center'
  623. },
  624. // {
  625. // field: 'signforscore',
  626. // title: '得分(5分)',
  627. // align: 'center'
  628. // },
  629. {
  630. field: 'overdue',
  631. title: '按时反馈件',
  632. align: 'center',
  633. formatter: function(value, row, index) {
  634. return handleOrderList(value, row, 3);
  635. }
  636. },
  637. // {
  638. // field: 'overfeedback',
  639. // title: '超时反馈件',
  640. // align: 'center',
  641. // formatter: function(value, row, index) {
  642. // return handleOrderList(value, row, 4);
  643. // }
  644. // },
  645. // {
  646. // field: 'Processing',
  647. // title: '未到期工单',
  648. // align: 'center',
  649. // formatter: function(value, row, index) {
  650. // return handleOrderList(value, row, 13);
  651. // }
  652. // },
  653. {
  654. field: 'overduerate',
  655. title: '按时反馈率',
  656. align: 'center'
  657. },
  658. // {
  659. // field: 'overduescore',
  660. // title: '得分(15分)',
  661. // align: 'center'
  662. // },
  663. {
  664. field: 'conclude',
  665. title: '办结件',
  666. align: 'center',
  667. formatter: function(value, row, index) {
  668. return handleOrderList(value, row, 5);
  669. }
  670. },
  671. // {
  672. // field: 'noconclude',
  673. // title: '未办结件',
  674. // align: 'center',
  675. // formatter: function(value, row, index) {
  676. // return handleOrderList(value, row, 6);
  677. // }
  678. // },
  679. // {
  680. // field: 'completed',
  681. // title: '应办结数量',
  682. // align: 'center',
  683. // formatter: function(value, row, index) {
  684. // return handleOrderList(value, row, 14);
  685. // }
  686. // },
  687. {
  688. field: 'unsuccessfulrate',
  689. title: '办结率',
  690. align: 'center'
  691. },
  692. // {
  693. // field: 'unsuccessfulscore',
  694. // title: '办结得分(10分)',
  695. // align: 'center'
  696. // },
  697. {
  698. field: 'one',
  699. title: '一次办结件',
  700. align: 'center',
  701. formatter: function(value, row, index) {
  702. return handleOrderList(value, row, 7);
  703. }
  704. },
  705. // {
  706. // field: 'noone',
  707. // title: '非一次办结件',
  708. // align: 'center',
  709. // formatter: function(value, row, index) {
  710. // return handleOrderList(value, row, 8);
  711. // }
  712. // },
  713. // {
  714. // field: 'reply',
  715. // title: '回复工单量',
  716. // align: 'center',
  717. // formatter: function(value, row, index) {
  718. // return handleOrderList(value, row, 15);
  719. // }
  720. // },
  721. {
  722. field: 'onerate',
  723. title: '一次办结率',
  724. align: 'center'
  725. },
  726. // {
  727. // field: 'onescore',
  728. // title: '得分(12分)',
  729. // align: 'center'
  730. // },
  731. // {
  732. // field: 'noexamine',
  733. // title: '不计入考核件',
  734. // align: 'center',
  735. // formatter: function(value, row, index) {
  736. // return handleOrderList(value, row, 9);
  737. // }
  738. // },
  739. //
  740. {
  741. field: 'review',
  742. title: '评议件',
  743. align: 'center',
  744. formatter: function(value, row, index) {
  745. return handleOrderList(value, row, 10);
  746. }
  747. },
  748. {
  749. field: 'satisfied',
  750. title: '满意件',
  751. align: 'center',
  752. formatter: function(value, row, index) {
  753. return handleOrderList(value, row, 11);
  754. }
  755. },
  756. // {
  757. // field: 'nosatisfied',
  758. // title: '不满意件',
  759. // align: 'center',
  760. // formatter: function(value, row, index) {
  761. // return handleOrderList(value, row, 12);
  762. // }
  763. // },
  764. {
  765. field: 'satisfiedrates',
  766. title: '满意率',
  767. align: 'center'
  768. },
  769. // {
  770. // field: 'satisfiedscore',
  771. // title: '得分(55分)',
  772. // align: 'center'
  773. // },
  774. {
  775. field: 'total',
  776. title: '总分',
  777. align: 'center'
  778. },
  779. {
  780. title: '排名',
  781. align: 'center',
  782. formatter: function(value, row, index) {
  783. return index + 1
  784. }
  785. },
  786. ];
  787. function handleOrderList(val, row, tab) {
  788. if(row.deptname !== '合计' && row.deptname !== '总计') {
  789. if(!val) {
  790. val = 0
  791. }
  792. return '<div class="imgs" ><a class="" onclick="examineList(\'' + row.deptid + '\', \'' + tab + '\', \''+ $('#rankDate').val() +'\')" >' + val +
  793. '</a></div>'
  794. } else {
  795. return val
  796. }
  797. }
  798. function testSecTable(id, type, group, value) {
  799. $.ajax({
  800. url: huayi.config.callcenter_url + "/DataAssessment/GetEvaluation",
  801. type: 'get',
  802. data: {
  803. token: $.cookie("token"),
  804. // type: type,
  805. // starttime: value && value.split(' ~ ')[0],
  806. // endtime: value && value.split(' ~ ')[1]
  807. // category,
  808. date: value,
  809. },
  810. dataType: "json",
  811. async: true,
  812. success: function(returnValue) {
  813. //异步获取数据
  814. //debugger;
  815. var resultData = returnValue.rows;
  816. var resultData_1 = []
  817. var resultData_2 = []
  818. var resultData_3 = []
  819. var resultData_4 = []
  820. var resultData_5 = []
  821. var max;
  822. for (var i = 0; i < resultData.length; i++) {
  823. for (var j = i; j < resultData.length; j++) {
  824. if (resultData[i].total < resultData[j].total) {
  825. max = resultData[j];
  826. resultData[j] = resultData[i];
  827. resultData[i] = max;
  828. }
  829. }
  830. }
  831. resultData.forEach(function(v, i) {
  832. if(v.category === 1) {
  833. resultData_1.push(v)
  834. } else if(v.category === 2) {
  835. resultData_2.push(v)
  836. } else if(v.category === 3) {
  837. resultData_3.push(v)
  838. } else if(v.category === 4) {
  839. resultData_4.push(v)
  840. } else {
  841. resultData_5.push(v)
  842. }
  843. })
  844. $('#orderlist2').bootstrapTable('load', resultData_1);
  845. $('#orderlist4').bootstrapTable('load', resultData_2);
  846. $('#orderlist5').bootstrapTable('load', resultData_3);
  847. $('#orderlist6').bootstrapTable('load', resultData_4);
  848. //$('#workorderlist_5').bootstrapTable('load', resultData_5);
  849. }
  850. });
  851. $('#orderlist2').bootstrapTable('destroy').bootstrapTable({
  852. striped: true,
  853. pagination: false,
  854. columns: tableColumns
  855. });
  856. $('#orderlist4').bootstrapTable('destroy').bootstrapTable({
  857. striped: true,
  858. pagination: false,
  859. columns: tableColumns
  860. });
  861. $('#orderlist5').bootstrapTable('destroy').bootstrapTable({
  862. striped: true,
  863. pagination: false,
  864. columns: tableColumns
  865. });
  866. $('#orderlist6').bootstrapTable('destroy').bootstrapTable({
  867. striped: true,
  868. pagination: false,
  869. columns: tableColumns
  870. });
  871. }
  872. //绩效考核
  873. function testSecTableDel(id, type, group, value) {
  874. var $tableLeft = $(id);
  875. var category = 0;
  876. if (id === '#orderlist2') category = 1;
  877. if (id === '#orderlist4') category = 2;
  878. if (id === '#orderlist5') category = 3;
  879. if (id === '#orderlist6') category = 4;
  880. $tableLeft.bootstrapTable('destroy');
  881. //初始化表格,动态从服务器加载数据
  882. $tableLeft.bootstrapTable({
  883. method: "get", //使用get请求到服务器获取数据
  884. url: huayi.config.callcenter_url + "/DataAssessment/GetEvaluation",
  885. striped: false, //表格显示条纹
  886. pagination: false, //启动分页
  887. pageSize: 12, //每页显示的记录数
  888. pageNumber: 1, //当前第几页
  889. fixedColumns: false,
  890. fixedNumber: 3,
  891. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  892. search: false, //是否启用查询
  893. showColumns: false, //显示下拉框勾选要显示的列
  894. showRefresh: false, //显示刷新按钮
  895. sidePagination: "server", //表示服务端请求
  896. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  897. //设置为limit可以获取limit, offset, search, sort, order
  898. queryParamsType: "undefined",
  899. queryParams: function queryParams(params) { //设置查询参数
  900. return {
  901. token: $.cookie("token"),
  902. type: type,
  903. // starttime: value && value.split(' ~ ')[0],
  904. // endtime: value && value.split(' ~ ')[1]
  905. category,
  906. date: $('#rankDate').val(), //'2021-05',
  907. }
  908. },
  909. onLoadSuccess: function (data) { //加载成功时执行
  910. const newDataL = {};
  911. // const typeData1 = [];
  912. // const typeData2 = [];
  913. // var max;
  914. // for (var i = 0; i < data.length; i++) {
  915. // for (var j = i; j < data.length; j++) {
  916. // if (data[i].total < data[j].total) {
  917. // max = data[j];
  918. // data[j] = data[i];
  919. // data[i] = max;
  920. // }
  921. // }
  922. // }
  923. // if (type == 1) {
  924. // data.forEach(function (v, n) {
  925. // if (v.workordrcount <= 10) {
  926. // typeData1.push(v)
  927. // } else {
  928. // typeData2.push(v)
  929. // }
  930. // })
  931. // if (group == 0) {
  932. // newDataL.rows = typeData2;
  933. // } else if (group == 1) {
  934. // newDataL.rows = typeData1;
  935. // }
  936. //
  937. // } else {
  938. // newDataL.rows = data;
  939. // }
  940. newDataL.rows = data;
  941. newDataL.state = "success";
  942. newDataL.message = "加载成功";
  943. $tableLeft.bootstrapTable('load', newDataL);
  944. },
  945. onLoadError: function () { //加载失败时执行
  946. layer.msg("加载数据失败", {
  947. time: 1500,
  948. icon: 2
  949. });
  950. }
  951. });
  952. }
  953. //绩效考核表格操作
  954. function getRank(val, row, index) {
  955. return index + 1
  956. }
  957. //工单数量
  958. function getWorkOrders(val, row) {
  959. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
  960. + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 3 + '\')">' + val + '</span>'
  961. }
  962. //不满意数量
  963. function getDissatisfied(val, row) {
  964. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
  965. + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 4 + '\')">' + val + '</span>'
  966. }
  967. //超期数量
  968. function getOverdue(val, row) {
  969. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + row.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
  970. + '\',\'' + '' + '\',\'' + 0 + '\',\'' + '' + '\',\'' + '' + '\',\'' + 5 + '\')">' + val + '</span>'
  971. }
  972. function getBackWorkOrders(val, row) {
  973. return '<span class="workAct" onclick="backWorkTable(\'' + row.deptid + '\',\'' + 0 + '\')">' + val + '</span>'
  974. }
  975. function getBacCkWorkOrders(val, row) {
  976. return '<span class="workAct" onclick="backWorkTable(\'' + row.deptid + '\',\'' + 1 + '\')">' + val + '</span>'
  977. }
  978. //受理工单类型
  979. function getAcceptanceType() {
  980. var $tableLeft = $('#acceptancelist');
  981. $tableLeft.bootstrapTable('destroy');
  982. //初始化表格,动态从服务器加载数据
  983. $tableLeft.bootstrapTable({
  984. method: "get", //使用get请求到服务器获取数据
  985. url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount",
  986. striped: false, //表格显示条纹
  987. pagination: false, //启动分页
  988. pageSize: 12, //每页显示的记录数
  989. pageNumber: 1, //当前第几页
  990. fixedColumns: false,
  991. fixedNumber: 3,
  992. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  993. search: false, //是否启用查询
  994. showColumns: false, //显示下拉框勾选要显示的列
  995. showRefresh: false, //显示刷新按钮
  996. sidePagination: "server", //表示服务端请求
  997. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  998. //设置为limit可以获取limit, offset, search, sort, order
  999. queryParamsType: "undefined",
  1000. queryParams: function queryParams(params) { //设置查询参数
  1001. var param = {
  1002. token: $.cookie("token"),
  1003. timetype:1
  1004. }
  1005. return param
  1006. },
  1007. onLoadSuccess: function (data) { //加载成功时执行
  1008. const newDataL = {};
  1009. let handTotal = 0;
  1010. newDataL.state = data.state;
  1011. newDataL.message = data.message;
  1012. newDataL.rows = data.data;
  1013. $tableLeft.bootstrapTable('load', newDataL);
  1014. new doAjax({
  1015. url: huayi.config.callcenter_url + "/InfoNew/GetHandling",
  1016. data: {
  1017. token: $.cookie("token"),
  1018. timetype:1
  1019. },
  1020. callBack: function (res) {
  1021. let handingData = [{
  1022. value: res[0].db,
  1023. name: '督办'
  1024. }, {
  1025. value: res[0].zhib,
  1026. name: '直办'
  1027. }, {
  1028. value: res[0].zub,
  1029. name: '转办'
  1030. },
  1031. {
  1032. value: res[0].cb,
  1033. name: '催办'
  1034. }
  1035. ]
  1036. handTotal = res[0].db + res[0].zhib + res[0].zub + res[0].cb;
  1037. $('.acceptanceType_wrap .total').text(handTotal);
  1038. getTimes('.statisticsTime')
  1039. getHandling(handingData);
  1040. }
  1041. });
  1042. },
  1043. onLoadError: function () { //加载失败时执行
  1044. layer.msg("加载数据失败", {
  1045. time: 1500,
  1046. icon: 2
  1047. });
  1048. }
  1049. });
  1050. }
  1051. function getHandling(data) {
  1052. let sortPie = echarts.init(document.getElementById('acceptancePie'));
  1053. option = {
  1054. legend: [{
  1055. 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`,
  1056. orient: 'vertical',
  1057. data: ['督办', '直办', '转办', '催办'],
  1058. left: '80%',
  1059. top: 'center',
  1060. align: 'left',
  1061. textStyle: {
  1062. color: "#fff",
  1063. fontSize: 18
  1064. },
  1065. padding: [10, 60],
  1066. itemGap: 20
  1067. }],
  1068. color: ['#c046ff', '#00a8ff', '#00ffe4', '#f1b31e'],
  1069. series: [{
  1070. name: '访问来源',
  1071. type: 'pie',
  1072. radius: '76%',
  1073. data: data,
  1074. emphasis: {
  1075. itemStyle: {
  1076. shadowBlur: 10,
  1077. shadowOffsetX: 0,
  1078. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1079. }
  1080. },
  1081. label: {
  1082. normal: {
  1083. show: false,
  1084. formatter: function (params) {
  1085. return params.name + ':' + params.value
  1086. // return
  1087. },
  1088. },
  1089. emphasis: {
  1090. position: 'left',
  1091. show: true,
  1092. textStyle: {
  1093. color: '#fff',
  1094. fontSize: '18',
  1095. fontWeight: 'bold'
  1096. },
  1097. length: 1
  1098. }
  1099. },
  1100. }]
  1101. };
  1102. sortPie.setOption(option);
  1103. sortPie.on('click', function (params) {
  1104. if (params.name == '直办') {
  1105. workTable('', '', '', '', '', '', '', '', 0, 2)
  1106. } else if (params.name == '督办') {
  1107. workTable('', '', '', '', '', '', '', '', 0, 1)
  1108. } else if (params.name == '转办') {
  1109. workTable('', '', '', '', '', '', '', '', 0, 3)
  1110. } else {
  1111. workTable('', '', '', '', '', '', '', '', 0, 4)
  1112. }
  1113. })
  1114. }
  1115. function getAcceptanceName(val, row) {
  1116. if (row.type == '咨询') {
  1117. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 9 +
  1118. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1119. } else if (row.type == '投诉') {
  1120. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 11 +
  1121. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1122. } else if (row.type == '建议') {
  1123. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 12 +
  1124. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1125. } else if (row.type == '其他') {
  1126. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 90 +
  1127. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1128. } else if (row.type == '求助') {
  1129. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 10 +
  1130. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1131. } else if (row.type == '表扬') {
  1132. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 13 +
  1133. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1134. } else if (row.type == '举报') {
  1135. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 89 +
  1136. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1137. } else if (row.type == '大气污染有奖举报') {
  1138. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 4256 +
  1139. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  1140. }
  1141. }
  1142. //时段话务
  1143. function trafficMonthChart(hours, monthCount, dayCount) {
  1144. let traffic = echarts.init(document.getElementById('traffic2'));
  1145. option = {
  1146. tooltip: {
  1147. trigger: 'axis',
  1148. axisPointer: {
  1149. show: true,
  1150. type: 'line',
  1151. lineStyle: {
  1152. type: 'dashed'
  1153. }
  1154. },
  1155. textStyle: {
  1156. color: '#fff',
  1157. fontSize: 16,
  1158. fontWeight: '600',
  1159. },
  1160. position: ['75%', '55%'],
  1161. backgroundColor: 'rgba(250,250,250,0)',
  1162. formatter: function (params) {
  1163. let str = '<div style="position: absolute;top:-315px;left:-423px">接通率:' + ((params[1].value / params[0].value) * 100).toFixed(0) + '%</div>'
  1164. return str;
  1165. }
  1166. },
  1167. grid: {
  1168. top: '18%',
  1169. bottom: '12%'
  1170. },
  1171. xAxis: [{
  1172. type: "category",
  1173. boundaryGap: false,
  1174. scale: true,
  1175. axisLabel: {
  1176. formatter: '{value}',
  1177. fontSize: 13,
  1178. margin: 10,
  1179. textStyle: {
  1180. color: "#f4f4f8"
  1181. }
  1182. },
  1183. axisLine: {
  1184. show: true,
  1185. lineStyle: {
  1186. color: "#525fa6"
  1187. }
  1188. },
  1189. splitLine: {
  1190. show: false,
  1191. lineStyle: {
  1192. color: "#243753"
  1193. }
  1194. },
  1195. axisTick: {
  1196. show: false
  1197. },
  1198. data: hours
  1199. }],
  1200. yAxis: [{
  1201. boundaryGap: false,
  1202. type: "value",
  1203. // scale:true,
  1204. axisLabel: {
  1205. textStyle: {
  1206. color: "#f4f4f8"
  1207. }
  1208. },
  1209. nameTextStyle: {
  1210. color: "#fff",
  1211. fontSize: 12,
  1212. lineHeight: 40
  1213. },
  1214. splitLine: {
  1215. show: true,
  1216. lineStyle: {
  1217. color: "#516cb8",
  1218. type: "dashed"
  1219. }
  1220. },
  1221. axisLine: {
  1222. lineStyle: {
  1223. color: "#8393c8",
  1224. width: 1,
  1225. type: "solid"
  1226. },
  1227. show: true,
  1228. // "symbol":['none', 'arrow'],
  1229. symbol: ['none',
  1230. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1231. ],
  1232. symbolOffset: 5,
  1233. symbolSize: [35, 38],
  1234. },
  1235. name: "条"
  1236. }],
  1237. series: [{
  1238. name: "话务量",
  1239. type: "line",
  1240. smooth: true,
  1241. showSymbol: false,
  1242. symbol: 'circle',
  1243. symbolSize: 4,
  1244. zlevel: 3,
  1245. itemStyle: {
  1246. color: '#08fcff'
  1247. },
  1248. lineStyle: {
  1249. normal: {
  1250. width: 2,
  1251. color: "#08fcff",
  1252. }
  1253. },
  1254. label: {
  1255. show: true,
  1256. position: 'top',
  1257. color: '#fff',
  1258. fontSize: 14,
  1259. fontWeight: '600',
  1260. formatter: function (params) {
  1261. return params.seriesName + ':' + params.value
  1262. }
  1263. },
  1264. areaStyle: {
  1265. normal: {
  1266. color: new echarts.graphic.LinearGradient(
  1267. 0,
  1268. 0,
  1269. 0,
  1270. 1,
  1271. [{
  1272. offset: 0,
  1273. color: "#087caa"
  1274. },
  1275. {
  1276. offset: 0.8,
  1277. color: "#091576"
  1278. }
  1279. ],
  1280. false
  1281. ),
  1282. }
  1283. },
  1284. emphasis: {
  1285. itemStyle: {
  1286. color: '#fff',
  1287. shadowBlur: 10,
  1288. shadowOffsetX: 1,
  1289. shadowOffsetY: 1,
  1290. shadowColor: 'rgb(250,250, 250)'
  1291. }
  1292. },
  1293. data: monthCount
  1294. }, {
  1295. name: "接通量",
  1296. type: "line",
  1297. smooth: true,
  1298. showSymbol: false,
  1299. symbol: 'circle',
  1300. symbolSize: 4,
  1301. zlevel: 3,
  1302. itemStyle: {
  1303. color: '#ffe000'
  1304. },
  1305. label: {
  1306. show: true,
  1307. position: 'top',
  1308. color: '#fff',
  1309. fontSize: 14,
  1310. fontWeight: '600',
  1311. formatter: function (params) {
  1312. return params.seriesName + ':' + params.value
  1313. }
  1314. },
  1315. lineStyle: {
  1316. normal: {
  1317. width: 2,
  1318. color: "#ffe000",
  1319. }
  1320. },
  1321. areaStyle: {
  1322. normal: {
  1323. color: new echarts.graphic.LinearGradient(
  1324. 0,
  1325. 0,
  1326. 0,
  1327. 1,
  1328. [{
  1329. offset: 0,
  1330. color: "#739952"
  1331. },
  1332. {
  1333. offset: 0.8,
  1334. color: "#091576"
  1335. }
  1336. ],
  1337. false
  1338. ),
  1339. }
  1340. },
  1341. emphasis: {
  1342. itemStyle: {
  1343. color: '#fff',
  1344. shadowBlur: 10,
  1345. shadowOffsetX: 1,
  1346. shadowOffsetY: 1,
  1347. shadowColor: 'rgb(250,250, 250)'
  1348. }
  1349. },
  1350. data: dayCount
  1351. }]
  1352. };
  1353. traffic.setOption(option);
  1354. }
  1355. function trafficDayChart(dataArr) {
  1356. let traffic3 = echarts.init(document.getElementById('rexian'));
  1357. // 头部菱形
  1358. const diamondData = dataArr.result.reduce((pre, cur, index) => {
  1359. pre[index] = cur.data.map((el, id) => el + (pre[index - 1] ? pre[index - 1][id] : 0))
  1360. return pre
  1361. }, [])
  1362. // color
  1363. const color = [
  1364. [{ offset: 0, color: "#efff37", }, { offset: 0.5, color: "#efff37", }, { offset: 0.5, color: "#d5e700", }, { offset: 1, color: "#d5e700", }],
  1365. [{ offset: 0, color: "#f67c20", }, { offset: 0.5, color: "#f67c20", }, { offset: 0.5, color: "#cc681e", }, { offset: 1, color: "#cc681e", }],
  1366. [{ offset: 0, color: "#32ffee", }, { offset: 0.5, color: "#32ffee", }, { offset: 0.5, color: "#00e8d5", }, { offset: 1, color: "#00e8d5", }],
  1367. [{ offset: 0, color: "#dc0707", }, { offset: 0.5, color: "#dc0707", }, { offset: 0.5, color: "#af0808", }, { offset: 1, color: "#af0808", }],
  1368. ]
  1369. // series
  1370. let series = dataArr.result.reduce((p, c, i, array) => {
  1371. p.push({
  1372. z: i + 1,
  1373. stack: '总量',
  1374. type: 'bar',
  1375. name: c.name,
  1376. barGap: '-100%',
  1377. barWidth: 30,
  1378. data: c.data,
  1379. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
  1380. }, {
  1381. z: i + 10,
  1382. type: 'pictorialBar',
  1383. symbolPosition: 'end',
  1384. symbol: 'diamond',
  1385. symbolOffset: [0, '-50%'],
  1386. symbolSize: [30, 10],
  1387. data: diamondData[i],
  1388. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
  1389. tooltip: { show: false },
  1390. })
  1391. // 是否最后一个了?
  1392. if (p.length === (array.length) * 2) {
  1393. p.push({
  1394. z: array.length * 2,
  1395. type: "pictorialBar",
  1396. symbolPosition: "start",
  1397. data: dataArr.result[0].data,
  1398. symbol: "diamond",
  1399. symbolOffset: ["0%", "50%"],
  1400. symbolSize: [30, 10],
  1401. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[0] } },
  1402. tooltip: { show: false },
  1403. })
  1404. return p
  1405. }
  1406. return p
  1407. }, [])
  1408. // tooltip
  1409. const tooltip = {
  1410. trigger: 'axis',
  1411. axisPointer: {
  1412. show: true,
  1413. type: 'line',
  1414. lineStyle: {
  1415. type: 'dashed'
  1416. }
  1417. },
  1418. textStyle: {
  1419. color: '#ffe400',
  1420. fontSize: '14'
  1421. },
  1422. backgroundColor: 'rgba(250,250,250,0)',
  1423. formatter: function (params) {
  1424. 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;">'
  1425. params.forEach(function (v, n) {
  1426. if (v.seriesName != '上部1') {
  1427. str +=
  1428. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1429. v.seriesName +
  1430. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1431. v.value + '</span></div>'
  1432. }
  1433. })
  1434. return str;
  1435. }
  1436. }
  1437. const legend = {
  1438. data: dataArr.result.map(item => item.name),
  1439. textStyle: { fontSize: 14, color: '#fff' },
  1440. itemWidth: 25,
  1441. itemHeight: 15,
  1442. itemGap: 15,
  1443. // top: '5%',
  1444. // 禁止点击
  1445. selectedMode: false,
  1446. }
  1447. // grid
  1448. const grid = {
  1449. left: '3%',
  1450. right: '4%',
  1451. bottom: '3%',
  1452. containLabel: true,
  1453. tooltip: {
  1454. textStyle: {
  1455. color: '#fff'
  1456. }
  1457. }
  1458. }
  1459. // xAxis
  1460. const xAxis = {
  1461. axisTick: { show: true },
  1462. axisLine: {
  1463. show: true,
  1464. lineStyle: {
  1465. color: "#525fa6"
  1466. }
  1467. },
  1468. axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
  1469. data: dataArr.xdata
  1470. }
  1471. // yAxis
  1472. const yAxis = [{
  1473. boundaryGap: false,
  1474. type: "value",
  1475. // scale:true,
  1476. axisLabel: {
  1477. textStyle: {
  1478. color: "#f4f4f8"
  1479. }
  1480. },
  1481. nameTextStyle: {
  1482. color: "#fff",
  1483. fontSize: 12,
  1484. lineHeight: 40
  1485. },
  1486. splitLine: {
  1487. show: true,
  1488. lineStyle: {
  1489. color: "#516cb8",
  1490. type: "dashed"
  1491. }
  1492. }
  1493. }]
  1494. // 渲染
  1495. option = {
  1496. tooltip, xAxis, yAxis, series, grid, legend
  1497. }
  1498. traffic3.setOption(option)
  1499. }
  1500. function getS(dataArr) {
  1501. let traffic3 = echarts.init(document.getElementById('heji'));
  1502. // 头部菱形
  1503. const diamondData = dataArr.result.reduce((pre, cur, index) => {
  1504. pre[index] = cur.data.map((el, id) => el + (pre[index - 1] ? pre[index - 1][id] : 0))
  1505. return pre
  1506. }, [])
  1507. // color
  1508. const color = [
  1509. [{ offset: 0, color: "#efff37", }, { offset: 0.5, color: "#efff37", }, { offset: 0.5, color: "#d5e700", }, { offset: 1, color: "#d5e700", }],
  1510. [{ offset: 0, color: "#f67c20", }, { offset: 0.5, color: "#f67c20", }, { offset: 0.5, color: "#cc681e", }, { offset: 1, color: "#cc681e", }],
  1511. [{ offset: 0, color: "#32ffee", }, { offset: 0.5, color: "#32ffee", }, { offset: 0.5, color: "#00e8d5", }, { offset: 1, color: "#00e8d5", }],
  1512. [{ offset: 0, color: "#dc0707", }, { offset: 0.5, color: "#dc0707", }, { offset: 0.5, color: "#af0808", }, { offset: 1, color: "#af0808", }],
  1513. ]
  1514. // series
  1515. let series = dataArr.result.reduce((p, c, i, array) => {
  1516. p.push({
  1517. z: i + 1,
  1518. stack: '总量',
  1519. type: 'bar',
  1520. name: c.name,
  1521. barGap: '-100%',
  1522. barWidth: 30,
  1523. data: c.data,
  1524. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
  1525. }, {
  1526. z: i + 10,
  1527. type: 'pictorialBar',
  1528. symbolPosition: 'end',
  1529. symbol: 'diamond',
  1530. symbolOffset: [0, '-50%'],
  1531. symbolSize: [30, 10],
  1532. data: diamondData[i],
  1533. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[i] } },
  1534. tooltip: { show: false },
  1535. })
  1536. // 是否最后一个了?
  1537. if (p.length === (array.length) * 2) {
  1538. p.push({
  1539. z: array.length * 2,
  1540. type: "pictorialBar",
  1541. symbolPosition: "start",
  1542. data: dataArr.result[0].data,
  1543. symbol: "diamond",
  1544. symbolOffset: ["0%", "50%"],
  1545. symbolSize: [30, 10],
  1546. itemStyle: { color: { type: 'linear', x: 0, x2: 1, y: 0, y2: 0, colorStops: color[0] } },
  1547. tooltip: { show: false },
  1548. })
  1549. return p
  1550. }
  1551. return p
  1552. }, [])
  1553. // tooltip
  1554. const tooltip = {
  1555. trigger: 'axis',
  1556. axisPointer: {
  1557. show: true,
  1558. type: 'line',
  1559. lineStyle: {
  1560. type: 'dashed'
  1561. }
  1562. },
  1563. textStyle: {
  1564. color: '#ffe400',
  1565. fontSize: '14'
  1566. },
  1567. backgroundColor: 'rgba(250,250,250,0)',
  1568. formatter: function (params) {
  1569. 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;">'
  1570. params.forEach(function (v, n) {
  1571. if (v.seriesName != '上部1') {
  1572. str +=
  1573. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1574. v.seriesName +
  1575. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1576. v.value + '</span></div>'
  1577. }
  1578. })
  1579. return str;
  1580. }
  1581. }
  1582. // grid
  1583. const grid = {
  1584. left: '3%',
  1585. right: '4%',
  1586. bottom: '3%',
  1587. containLabel: true,
  1588. tooltip: {
  1589. textStyle: {
  1590. color: '#fff'
  1591. }
  1592. }
  1593. }
  1594. // xAxis
  1595. const xAxis = {
  1596. axisTick: { show: true },
  1597. axisLine: {
  1598. show: true,
  1599. lineStyle: {
  1600. color: "#525fa6"
  1601. }
  1602. },
  1603. axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
  1604. data: dataArr.xdata
  1605. }
  1606. // yAxis
  1607. const yAxis = [{
  1608. boundaryGap: false,
  1609. type: "value",
  1610. // scale:true,
  1611. axisLabel: {
  1612. textStyle: {
  1613. color: "#f4f4f8"
  1614. }
  1615. },
  1616. nameTextStyle: {
  1617. color: "#fff",
  1618. fontSize: 12,
  1619. lineHeight: 40
  1620. },
  1621. splitLine: {
  1622. show: true,
  1623. lineStyle: {
  1624. color: "#516cb8",
  1625. type: "dashed"
  1626. }
  1627. }
  1628. }]
  1629. // 渲染
  1630. option = {
  1631. tooltip, xAxis, yAxis, series, grid
  1632. }
  1633. traffic3.setOption(option)
  1634. }
  1635. //坐席监控
  1636. //实时话务统计
  1637. function getRealTimeTraffi(hours, hrCount, hcCount) {
  1638. let realTimeTraffi = echarts.init(document.getElementById('realTimeTraffi'));
  1639. option = {
  1640. grid: {
  1641. top: '20%',
  1642. bottom: '20%'
  1643. },
  1644. legend: {
  1645. data: ['呼入', '呼出'],
  1646. textStyle: {
  1647. color: '#fff',
  1648. fontSize: 14,
  1649. padding: [0, 5]
  1650. },
  1651. right: 25,
  1652. top: -5
  1653. },
  1654. tooltip: {
  1655. trigger: 'axis',
  1656. axisPointer: {
  1657. show: true,
  1658. type: 'line',
  1659. lineStyle: {
  1660. type: 'dashed'
  1661. }
  1662. },
  1663. textStyle: {
  1664. color: '#fff',
  1665. fontSize: 16,
  1666. fontWeight: '600',
  1667. },
  1668. backgroundColor: 'rgba(250,250,250,0)',
  1669. formatter: function (params) {
  1670. 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;">'
  1671. params.forEach(function (v, n) {
  1672. // if(v.seriesName!='上部1'){
  1673. str +=
  1674. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1675. v.seriesName +
  1676. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1677. v.value + '</span></div>'
  1678. // }
  1679. })
  1680. return str;
  1681. }
  1682. },
  1683. xAxis: [{
  1684. type: "category",
  1685. boundaryGap: false,
  1686. scale: true,
  1687. axisLabel: {
  1688. formatter: '{value}',
  1689. fontSize: 13,
  1690. margin: 10,
  1691. textStyle: {
  1692. color: "#f4f4f8"
  1693. }
  1694. },
  1695. axisLine: {
  1696. show: true,
  1697. lineStyle: {
  1698. color: "#849cc9"
  1699. }
  1700. },
  1701. splitLine: {
  1702. show: false,
  1703. lineStyle: {
  1704. color: "#849cc9"
  1705. }
  1706. },
  1707. axisTick: {
  1708. show: false
  1709. },
  1710. data: hours
  1711. }],
  1712. yAxis: [{
  1713. boundaryGap: false,
  1714. type: "value",
  1715. // scale:true,
  1716. axisLabel: {
  1717. textStyle: {
  1718. color: "#f4f4f8"
  1719. }
  1720. },
  1721. nameTextStyle: {
  1722. color: "#fff",
  1723. fontSize: 12,
  1724. lineHeight: 40
  1725. },
  1726. splitLine: {
  1727. show: true,
  1728. lineStyle: {
  1729. color: "#849cc9",
  1730. type: "dashed"
  1731. }
  1732. },
  1733. axisLine: {
  1734. lineStyle: {
  1735. color: "#849cc9",
  1736. width: 1,
  1737. type: "solid"
  1738. },
  1739. show: true,
  1740. // "symbol":['none', 'arrow'],
  1741. symbol: ['none',
  1742. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1743. ],
  1744. symbolOffset: 5,
  1745. symbolSize: [35, 38],
  1746. },
  1747. }],
  1748. series: [{
  1749. name: "呼入",
  1750. type: "line",
  1751. smooth: true,
  1752. showSymbol: false,
  1753. symbol: 'circle',
  1754. symbolSize: 4,
  1755. zlevel: 3,
  1756. itemStyle: {
  1757. color: '#08fcff'
  1758. },
  1759. lineStyle: {
  1760. normal: {
  1761. width: 2,
  1762. color: "#01cde6",
  1763. }
  1764. },
  1765. // label: {
  1766. // show: true,
  1767. // position: 'top',
  1768. // color: '#fff',
  1769. // fontSize: 14,
  1770. // fontWeight: '600',
  1771. // formatter: function (params) {
  1772. // return params.seriesName + ':' + params.value
  1773. // }
  1774. // },
  1775. areaStyle: {
  1776. normal: {
  1777. color: new echarts.graphic.LinearGradient(
  1778. 0,
  1779. 0,
  1780. 0,
  1781. 1,
  1782. [{
  1783. offset: 0,
  1784. color: "#0571ae"
  1785. },
  1786. {
  1787. offset: 0.8,
  1788. color: "#093085"
  1789. }
  1790. ],
  1791. false
  1792. ),
  1793. }
  1794. },
  1795. emphasis: {
  1796. itemStyle: {
  1797. color: '#fff',
  1798. shadowBlur: 10,
  1799. shadowOffsetX: 1,
  1800. shadowOffsetY: 1,
  1801. shadowColor: 'rgb(250,250, 250)'
  1802. }
  1803. },
  1804. data: hrCount
  1805. }, {
  1806. name: "呼出",
  1807. type: "line",
  1808. smooth: true,
  1809. showSymbol: false,
  1810. symbol: 'circle',
  1811. symbolSize: 4,
  1812. zlevel: 3,
  1813. itemStyle: {
  1814. color: '#ffe000'
  1815. },
  1816. // label: {
  1817. // show: true,
  1818. // position: 'top',
  1819. // color: '#fff',
  1820. // fontSize: 14,
  1821. // fontWeight: '600',
  1822. // formatter: function (params) {
  1823. // return params.seriesName + ':' + params.value
  1824. // }
  1825. // },
  1826. lineStyle: {
  1827. normal: {
  1828. width: 2,
  1829. color: "#ffd200",
  1830. }
  1831. },
  1832. areaStyle: {
  1833. normal: {
  1834. color: new echarts.graphic.LinearGradient(
  1835. 0,
  1836. 0,
  1837. 0,
  1838. 1,
  1839. [{
  1840. offset: 0,
  1841. color: "#626a55"
  1842. },
  1843. {
  1844. offset: 0.8,
  1845. color: "#093085"
  1846. }
  1847. ],
  1848. false
  1849. ),
  1850. }
  1851. },
  1852. emphasis: {
  1853. itemStyle: {
  1854. color: '#fff',
  1855. shadowBlur: 10,
  1856. shadowOffsetX: 1,
  1857. shadowOffsetY: 1,
  1858. shadowColor: 'rgb(250,250, 250)'
  1859. }
  1860. },
  1861. data: hcCount
  1862. }]
  1863. };
  1864. realTimeTraffi.setOption(option);
  1865. }
  1866. function getThemeStatics() {
  1867. $('#themeIdHidden').val('');
  1868. $('.bulletFrame').show();
  1869. $('.theme_wrap').show();
  1870. $('.theme_wrap').siblings().hide()
  1871. // if ($('.bulletFrame').css('display') == 'block') {
  1872. // $('.body').css('opacity', '0.4')
  1873. // }
  1874. //
  1875. new doAjax({
  1876. url: huayi.config.callcenter_url + '/InfoNew/GetThemeClassification1',
  1877. Type: 'get',
  1878. data: {
  1879. token: $.cookie("token"),
  1880. stime: '',
  1881. etime: '',
  1882. timetype: MajoreventsDataType,
  1883. id:themeDblId,
  1884. type:dispatTopicType
  1885. },
  1886. callBack: function(res) {
  1887. if(res.state === "notoken") {
  1888. window.location.href = "login.html";
  1889. }
  1890. if (res.data && res.data.length > 0) {
  1891. $('#themeIdHidden').val(res.data[0].Themeid)
  1892. }
  1893. var piData =[];
  1894. res.data.forEach(function (v, n) {
  1895. piData.push({
  1896. value: v.count,
  1897. name: v.F_Name,
  1898. dataId: v.F_ID,
  1899. themeId: v.Themeid,
  1900. })
  1901. })
  1902. var nameArray = piData.map(item => {
  1903. return item.name
  1904. })
  1905. theme_chart('themeByClass', nameArray, piData);
  1906. // hotThingsChart('hotThings', nameData, conNum, maxNum, -30)
  1907. }
  1908. });
  1909. new doAjax({
  1910. url: huayi.config.callcenter_url + "/InfoNew/GetThemeDept1",
  1911. Type: 'get',
  1912. data: {
  1913. token: $.cookie("token"),
  1914. stime: '',
  1915. etime: '',
  1916. timetype: MajoreventsDataType,
  1917. id:themeDblId,
  1918. type:dispatTopicType
  1919. },
  1920. callBack: function(res) {
  1921. if(res.state === "notoken") {
  1922. window.location.href = "login.html";
  1923. }
  1924. var piData =[];
  1925. res.data.forEach(function (v, n) {
  1926. piData.push({
  1927. value: v.count,
  1928. name: v.deptName || '其他',
  1929. themeId: v.Themeid,
  1930. dataId: v.F_MainDeptId || 0,
  1931. })
  1932. })
  1933. var nameArray = piData.map(item => {
  1934. return item.name
  1935. })
  1936. theme_chart('themeByDept', nameArray, piData);
  1937. // hotThingsChart('hotThings', nameData, conNum, maxNum, -30)
  1938. }
  1939. });
  1940. }
  1941. function theme_chart(dom, nameArray, piData) {
  1942. let keywordPieChart = echarts.init(document.getElementById(dom));
  1943. let keywordNum = [];
  1944. let keywordName = [];
  1945. var rich = {
  1946. percent: {
  1947. color: "#FFF",
  1948. align: 'right',
  1949. fontSize: 15,
  1950. fontWeight: '500',
  1951. //padding: [0, 5]
  1952. }
  1953. }
  1954. var allCount = 0;
  1955. nameArray.forEach(function (v, n) {
  1956. keywordNum.push({
  1957. num: Number(v.substr(v.length - 2, 2)),
  1958. value: v
  1959. })
  1960. })
  1961. piData.forEach(function (v, n) {
  1962. allCount += parseInt(v.value);
  1963. })
  1964. let max;
  1965. for (let i = 0; i < keywordNum.length; i++) {
  1966. for (let j = i; j < keywordNum.length; j++) {
  1967. if (keywordNum[i].num < keywordNum[j].num) {
  1968. max = keywordNum[j];
  1969. keywordNum[j] = keywordNum[i];
  1970. keywordNum[i] = max;
  1971. }
  1972. }
  1973. }
  1974. keywordNum.forEach(function (v, n) {
  1975. keywordName.push(v.value.replace(reg, ''));
  1976. })
  1977. keywordName.forEach(function (v, n) {
  1978. if (v.length > 20) {
  1979. keylegend = [{
  1980. 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`,
  1981. orient: 'vertical',
  1982. top: '610',
  1983. // data: keywordName.slice(0, 6),
  1984. data: keywordName.slice(0, 1),
  1985. width: 28,
  1986. height: 25,
  1987. textStyle: {
  1988. color: '#fff',
  1989. padding: [0, 5],
  1990. fontSize: 15
  1991. },
  1992. padding: [5, 10]
  1993. }, {
  1994. 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`,
  1995. orient: 'vertical',
  1996. top: '620',
  1997. // data: keywordName.slice(6, 12),
  1998. data: keywordName.slice(1, 2),
  1999. width: 28,
  2000. height: 25,
  2001. itemGap: 20,
  2002. textStyle: {
  2003. color: '#fff',
  2004. padding: [0, 5],
  2005. fontSize: 15
  2006. },
  2007. padding: [10, 10]
  2008. }, {
  2009. 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`,
  2010. orient: 'vertical',
  2011. top: '630',
  2012. // data: keywordName.slice(12, keywordName.length),
  2013. data: keywordName.slice(2, 3),
  2014. width: 28,
  2015. height: 25,
  2016. textStyle: {
  2017. color: '#fff',
  2018. padding: [0, 5],
  2019. fontSize: 15
  2020. },
  2021. padding: [20, 10]
  2022. },
  2023. {
  2024. 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`,
  2025. orient: 'vertical',
  2026. top: '630',
  2027. // data: keywordName.slice(12, keywordName.length),
  2028. data: keywordName.slice(3, 4),
  2029. width: 28,
  2030. height: 25,
  2031. textStyle: {
  2032. color: '#fff',
  2033. padding: [0, 5],
  2034. fontSize: 15
  2035. },
  2036. padding: [40, 10]
  2037. }, {
  2038. 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`,
  2039. orient: 'vertical',
  2040. top: '630',
  2041. // data: keywordName.slice(12, keywordName.length),
  2042. data: keywordName.slice(4, 5),
  2043. width: 28,
  2044. height: 25,
  2045. textStyle: {
  2046. color: '#fff',
  2047. padding: [0, 5],
  2048. fontSize: 15
  2049. },
  2050. padding: [60, 10]
  2051. }, {
  2052. 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`,
  2053. orient: 'vertical',
  2054. top: '630',
  2055. // data: keywordName.slice(12, keywordName.length),
  2056. data: keywordName.slice(5, 6),
  2057. width: 28,
  2058. height: 25,
  2059. textStyle: {
  2060. color: '#fff',
  2061. padding: [0, 5],
  2062. fontSize: 15
  2063. },
  2064. padding: [80, 10]
  2065. }, {
  2066. 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`,
  2067. orient: 'vertical',
  2068. top: '630',
  2069. // data: keywordName.slice(12, keywordName.length),
  2070. data: keywordName.slice(6, keywordName.length),
  2071. width: 28,
  2072. height: 25,
  2073. textStyle: {
  2074. color: '#fff',
  2075. padding: [0, 5],
  2076. fontSize: 15
  2077. },
  2078. padding: [100, 10]
  2079. }]
  2080. } else {
  2081. keylegend = [{
  2082. 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`,
  2083. orient: 'vertical',
  2084. // top: '610',
  2085. // data: keywordName.slice(0, 6),
  2086. data: keywordName.slice(0, 5),
  2087. width: 28,
  2088. height: 25,
  2089. textStyle: {
  2090. color: '#fff',
  2091. padding: [0, 5],
  2092. fontSize: 15
  2093. },
  2094. padding: [15, 10]
  2095. }, {
  2096. 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`,
  2097. orient: 'vertical',
  2098. // top: '620',
  2099. // data: keywordName.slice(6, 12),
  2100. data: keywordName.slice(5, 10),
  2101. width: 28,
  2102. height: 25,
  2103. itemGap: 20,
  2104. textStyle: {
  2105. color: '#fff',
  2106. padding: [0, 5],
  2107. fontSize: 15
  2108. },
  2109. padding: [40, 10]
  2110. }, {
  2111. 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`,
  2112. orient: 'vertical',
  2113. // top: '630',
  2114. // data: keywordName.slice(12, keywordName.length),
  2115. data: keywordName.slice(10, 15),
  2116. width: 28,
  2117. height: 25,
  2118. textStyle: {
  2119. color: '#fff',
  2120. padding: [0, 5],
  2121. fontSize: 15
  2122. },
  2123. padding: [65, 10]
  2124. },
  2125. {
  2126. 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`,
  2127. orient: 'vertical',
  2128. // top: '630',
  2129. // data: keywordName.slice(12, keywordName.length),
  2130. data: keywordName.slice(15, keywordName.length),
  2131. width: 28,
  2132. height: 25,
  2133. textStyle: {
  2134. color: '#fff',
  2135. padding: [0, 5],
  2136. fontSize: 15
  2137. },
  2138. padding: [90, 10]
  2139. }
  2140. ]
  2141. }
  2142. })
  2143. keywordName.reverse();
  2144. // 调度专题饼状图数据设置
  2145. option = {
  2146. // legend: keylegend,
  2147. color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76',
  2148. '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff',
  2149. '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722',
  2150. '#00BFA5', "#EAEA26"
  2151. ],
  2152. series: [{
  2153. name: '访问来源',
  2154. type: 'pie',
  2155. radius: '58%',
  2156. // center: ['50%', '43%'],
  2157. data: piData,
  2158. emphasis: {
  2159. itemStyle: {
  2160. shadowBlur: 10,
  2161. shadowOffsetX: 0,
  2162. shadowColor: 'rgba(0, 0, 0, 0.5)'
  2163. }
  2164. },
  2165. // 修改字体颜色的代码begin
  2166. itemStyle: {
  2167. normal: {
  2168. label: {
  2169. textStyle: {
  2170. color:'#fff',
  2171. fontSize: 14,
  2172. fontWeight:'bolder'
  2173. }
  2174. },
  2175. labelLine : {
  2176. lineStyle:{
  2177. color:'#fff'
  2178. }
  2179. }
  2180. }
  2181. },
  2182. // 修改字体颜色的代码end
  2183. label: {
  2184. normal: {
  2185. show: true,
  2186. formatter: function (params) {
  2187. // if (params.name.length > 9 && params.name.length < 35) {
  2188. // return params.name.substring(0, 20) + '\n' + params.name.substring(20, params.name.length) + ':' + (allCount > 0 ? (params.value.toString() + '(' + (params.value/allCount).toFixed(2) + '%)') : params.value.toString();
  2189. // } else if (params.name.length > 35) {
  2190. // return params.name.substring(0, 18) + '\n' + params.name.substring(18, 36) + '\n' + params.name.substring(36, params.name.length) + ':' + (allCount > 0 ? (params.value.toString() + '(' + (params.value/allCount).toFixed(2) + '%)') : params.value.toString();
  2191. // } else {
  2192. // return params.name + ':' + (allCount > 0 ? (params.value.toString() + '(' + (params.value/allCount).toFixed(2) + '%)') : params.value.toString();
  2193. //
  2194. // }
  2195. return params.name + ':' + (allCount > 0 ? (params.value.toString() + '(' + (params.value/allCount *100).toFixed(2) + '%)') : params.value.toString());
  2196. }
  2197. },
  2198. emphasis: {
  2199. // position: 'left',
  2200. show: true,
  2201. textStyle: {
  2202. color: '#fff',
  2203. fontSize: '14',
  2204. fontWeight: 'bold'
  2205. },
  2206. labelLine: {
  2207. show: true
  2208. },
  2209. length: 1
  2210. }
  2211. }
  2212. }]
  2213. };
  2214. keywordPieChart.setOption(option);
  2215. keywordPieChart.on('click', function (params) {
  2216. if (dom === 'themeByClass') {
  2217. workTable('','','','','' ,'','',null,null,null,null,null, null, null, null, null, null, null, params.data.dataId, 1)
  2218. } else if (dom === 'themeByDept') {
  2219. // workTable(KeyId,deptid,sourceId,PhoneType,keyword ,type,sourceArea,key,timetype,handling,source,dptype, date, Township, strworkid, stime, etime, isspecial, special, time = 0, monthlytheme)
  2220. workTable('',params.data.dataId,'','','' ,'',null,null,null,null,null,null, null, null, null, null, null, null, null, 1, params.data.themeId)
  2221. }
  2222. });
  2223. }
  2224. function getAllThemeOrders() {
  2225. var id = $('#themeIdHidden').val();
  2226. if (id != '') {
  2227. workTable('','','','','' ,'',null,null,null,null,null,null, null, null, null, null, null, null, null, 1)
  2228. }
  2229. }