Brak opisu

second_index.js 56KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869
  1. // 关键词
  2. let keyidArr = [];
  3. let keyid = 0;
  4. let keyname = '';
  5. let keylegend = [];
  6. let nameK = ''
  7. let reg = /\w\d+$/;
  8. $('.closeKey_icon').click(function () {
  9. $('.bulletFrame').hide();
  10. $('.bulletFrameT').hide();
  11. if ($('.bulletFrame').css('display') == 'none') {
  12. $('.body').css('opacity', '1')
  13. }
  14. if ($('.bulletFrameT').css('display') == 'none') {
  15. $('.body').css('opacity', '1')
  16. }
  17. keyidArr = [];
  18. keyid = 0
  19. })
  20. function getKeyClass(id, classId, con) {
  21. // keyidArr.push(id);
  22. $('.bulletFrame').show();
  23. $('.secondLevel_keyWord').show();
  24. $('.secondLevel_keyWord').siblings().hide()
  25. if ($('.bulletFrame').css('display') == 'block') {
  26. $('.body').css('opacity', '0.4')
  27. }
  28. if (classId == '1') {
  29. workTable(id);
  30. } else {
  31. getTimes('.statisticsTime')
  32. keyidArr.push({
  33. name: con,
  34. id: id
  35. })
  36. keyid = id
  37. $('.keyWordTitle').text(con + '问题分类')
  38. $('.head_title').text(con + '关键字数据分析')
  39. keyWordTable(id,con);
  40. }
  41. }
  42. $('.backKey_icon').click(function () {
  43. for (let i = 0; i < keyidArr.length; i++) {
  44. if (keyidArr[i].id == keyid) {
  45. console.log(keyidArr[i - 1].id)
  46. $('.keyWordTitle').text(keyidArr[i - 1].name + '问题分类')
  47. $('.head_title').text(keyidArr[i - 1].name + '关键字数据分析')
  48. keyWordTable(keyidArr[i - 1].id);
  49. keyidArr.pop(keyidArr[i].id)
  50. keyid = keyidArr[i - 1].id
  51. }
  52. }
  53. console.log(keyidArr)
  54. console.log(keyid)
  55. })
  56. function keyWordTable(id,con) {
  57. var $tableLeft = $('#keyWordlist');
  58. $tableLeft.bootstrapTable('destroy');
  59. //初始化表格,动态从服务器加载数据
  60. $tableLeft.bootstrapTable({
  61. method: "get", //使用get请求到服务器获取数据
  62. url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
  63. striped: false, //表格显示条纹
  64. pagination: false, //启动分页
  65. pageSize: 12, //每页显示的记录数
  66. pageNumber: 1, //当前第几页
  67. fixedColumns: false,
  68. fixedNumber: 3,
  69. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  70. search: false, //是否启用查询
  71. showColumns: false, //显示下拉框勾选要显示的列
  72. showRefresh: false, //显示刷新按钮
  73. sidePagination: "server", //表示服务端请求
  74. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  75. //设置为limit可以获取limit, offset, search, sort, order
  76. queryParamsType: "undefined",
  77. queryParams: function queryParams(params) { //设置查询参数
  78. var param = {
  79. pid: id
  80. }
  81. return param
  82. },
  83. onLoadSuccess: function (data) { //加载成功时执行
  84. const newDataL = {};
  85. const piData = [];
  86. newDataL.state = data.state;
  87. newDataL.message = data.message;
  88. newDataL.rows = data.data.Date;
  89. data.data.Date.forEach(function (v, n) {
  90. piData.push({
  91. value: v.Count,
  92. name: v.KeyName.replace(reg, '')
  93. })
  94. })
  95. var nameArray = piData.map(item => {
  96. return item.name
  97. })
  98. keyword_chart('keywordPie', nameArray, piData,con);
  99. $('.total').text(data.data.Total)
  100. $('.classTotal').text(data.data.ClaseeCount)
  101. $('.prot').text(data.data.ClassTotal)
  102. $tableLeft.bootstrapTable('load', newDataL);
  103. },
  104. onLoadError: function () { //加载失败时执行
  105. layer.msg("加载数据失败", {
  106. time: 1500,
  107. icon: 2
  108. });
  109. }
  110. });
  111. }
  112. function keyword_chart(dom, nameArray, piData,con) {
  113. let keywordPieChart = echarts.init(document.getElementById(dom));
  114. let keywordNum = [];
  115. let keywordName = [];
  116. var rich = {
  117. percent: {
  118. color: "#FFF",
  119. align: 'right',
  120. fontSize: 15,
  121. fontWeight: '500',
  122. //padding: [0, 5]
  123. }
  124. }
  125. nameArray.forEach(function (v, n) {
  126. keywordNum.push({
  127. num: Number(v.substr(v.length - 2, 2)),
  128. value: v
  129. })
  130. })
  131. let max;
  132. for (let i = 0; i < keywordNum.length; i++) {
  133. for (let j = i; j < keywordNum.length; j++) {
  134. if (keywordNum[i].num < keywordNum[j].num) {
  135. max = keywordNum[j];
  136. keywordNum[j] = keywordNum[i];
  137. keywordNum[i] = max;
  138. }
  139. }
  140. }
  141. keywordNum.forEach(function (v, n) {
  142. keywordName.push(v.value.replace(reg, ''));
  143. })
  144. console.log(keywordName)
  145. keywordName.forEach(function (v, n) {
  146. if (v.length > 20) {
  147. keylegend = [{
  148. 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`,
  149. orient: 'vertical',
  150. top: '610',
  151. // data: keywordName.slice(0, 6),
  152. data: keywordName.slice(0, 1),
  153. width: 28,
  154. height: 25,
  155. textStyle: {
  156. color: '#fff',
  157. padding: [0, 5],
  158. fontSize: 15
  159. },
  160. padding: [5, 10]
  161. }, {
  162. 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`,
  163. orient: 'vertical',
  164. top: '620',
  165. // data: keywordName.slice(6, 12),
  166. data: keywordName.slice(1, 2),
  167. width: 28,
  168. height: 25,
  169. itemGap: 20,
  170. textStyle: {
  171. color: '#fff',
  172. padding: [0, 5],
  173. fontSize: 15
  174. },
  175. padding: [10, 10]
  176. }, {
  177. 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`,
  178. orient: 'vertical',
  179. top: '630',
  180. // data: keywordName.slice(12, keywordName.length),
  181. data: keywordName.slice(2, 3),
  182. width: 28,
  183. height: 25,
  184. textStyle: {
  185. color: '#fff',
  186. padding: [0, 5],
  187. fontSize: 15
  188. },
  189. padding: [20, 10]
  190. },
  191. {
  192. 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`,
  193. orient: 'vertical',
  194. top: '630',
  195. // data: keywordName.slice(12, keywordName.length),
  196. data: keywordName.slice(3, 4),
  197. width: 28,
  198. height: 25,
  199. textStyle: {
  200. color: '#fff',
  201. padding: [0, 5],
  202. fontSize: 15
  203. },
  204. padding: [40, 10]
  205. }, {
  206. 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`,
  207. orient: 'vertical',
  208. top: '630',
  209. // data: keywordName.slice(12, keywordName.length),
  210. data: keywordName.slice(4, 5),
  211. width: 28,
  212. height: 25,
  213. textStyle: {
  214. color: '#fff',
  215. padding: [0, 5],
  216. fontSize: 15
  217. },
  218. padding: [60, 10]
  219. }, {
  220. 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`,
  221. orient: 'vertical',
  222. top: '630',
  223. // data: keywordName.slice(12, keywordName.length),
  224. data: keywordName.slice(5, 6),
  225. width: 28,
  226. height: 25,
  227. textStyle: {
  228. color: '#fff',
  229. padding: [0, 5],
  230. fontSize: 15
  231. },
  232. padding: [80, 10]
  233. }, {
  234. 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`,
  235. orient: 'vertical',
  236. top: '630',
  237. // data: keywordName.slice(12, keywordName.length),
  238. data: keywordName.slice(6, keywordName.length),
  239. width: 28,
  240. height: 25,
  241. textStyle: {
  242. color: '#fff',
  243. padding: [0, 5],
  244. fontSize: 15
  245. },
  246. padding: [100, 10]
  247. }]
  248. }else{
  249. if (con == '营商管理03') {
  250. keylegend = [{
  251. 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`,
  252. orient: 'vertical',
  253. top: '610',
  254. // data: keywordName.slice(0, 6),
  255. data: keywordName.slice(0, 6),
  256. width: 28,
  257. height: 25,
  258. textStyle: {
  259. color: '#fff',
  260. padding: [0, 5],
  261. fontSize: 15
  262. },
  263. padding: [15, 10]
  264. }, {
  265. 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`,
  266. orient: 'vertical',
  267. top: '620',
  268. // data: keywordName.slice(6, 12),
  269. data: keywordName.slice(6, 12),
  270. width: 28,
  271. height: 25,
  272. itemGap: 20,
  273. textStyle: {
  274. color: '#fff',
  275. padding: [0, 5],
  276. fontSize: 15
  277. },
  278. padding: [40, 10]
  279. }, {
  280. 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`,
  281. orient: 'vertical',
  282. top: '630',
  283. // data: keywordName.slice(12, keywordName.length),
  284. data: keywordName.slice(12, 18),
  285. width: 28,
  286. height: 25,
  287. textStyle: {
  288. color: '#fff',
  289. padding: [0, 5],
  290. fontSize: 15
  291. },
  292. padding: [65, 10]
  293. },
  294. {
  295. 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`,
  296. orient: 'vertical',
  297. top: '630',
  298. // data: keywordName.slice(12, keywordName.length),
  299. data: keywordName.slice(18, keywordName.length),
  300. width: 30,
  301. height: 25,
  302. textStyle: {
  303. color: '#fff',
  304. padding: [0, 5],
  305. fontSize: 15
  306. },
  307. padding: [90, 10]
  308. }
  309. ]
  310. } else {
  311. keylegend = [{
  312. 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`,
  313. orient: 'vertical',
  314. top: '610',
  315. // data: keywordName.slice(0, 6),
  316. data: keywordName.slice(0, 5),
  317. width: 28,
  318. height: 25,
  319. textStyle: {
  320. color: '#fff',
  321. padding: [0, 5],
  322. fontSize: 15
  323. },
  324. padding: [15, 10]
  325. }, {
  326. 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`,
  327. orient: 'vertical',
  328. top: '620',
  329. // data: keywordName.slice(6, 12),
  330. data: keywordName.slice(5, 10),
  331. width: 28,
  332. height: 25,
  333. itemGap: 20,
  334. textStyle: {
  335. color: '#fff',
  336. padding: [0, 5],
  337. fontSize: 15
  338. },
  339. padding: [40, 10]
  340. }, {
  341. 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`,
  342. orient: 'vertical',
  343. top: '630',
  344. // data: keywordName.slice(12, keywordName.length),
  345. data: keywordName.slice(10, 15),
  346. width: 28,
  347. height: 25,
  348. textStyle: {
  349. color: '#fff',
  350. padding: [0, 5],
  351. fontSize: 15
  352. },
  353. padding: [65, 10]
  354. },
  355. {
  356. 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`,
  357. orient: 'vertical',
  358. top: '630',
  359. // data: keywordName.slice(12, keywordName.length),
  360. data: keywordName.slice(15, keywordName.length),
  361. width: 30,
  362. height: 25,
  363. textStyle: {
  364. color: '#fff',
  365. padding: [0, 5],
  366. fontSize: 15
  367. },
  368. padding: [90, 10]
  369. }
  370. ]
  371. }
  372. }
  373. })
  374. keywordName.reverse();
  375. option = {
  376. legend: keylegend,
  377. color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76',
  378. '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff',
  379. '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722',
  380. '#00BFA5', "#EAEA26"
  381. ],
  382. series: [{
  383. name: '访问来源',
  384. type: 'pie',
  385. radius: '58%',
  386. data: piData,
  387. emphasis: {
  388. itemStyle: {
  389. shadowBlur: 10,
  390. shadowOffsetX: 0,
  391. shadowColor: 'rgba(0, 0, 0, 0.5)'
  392. }
  393. },
  394. label: {
  395. normal: {
  396. show: false,
  397. position: 'inner',
  398. formatter: params => {
  399. return (
  400. '{percent|' + params.percent.toFixed(0) + '%}'
  401. );
  402. },
  403. rich: rich,
  404. }
  405. },
  406. label: {
  407. normal: {
  408. show: false,
  409. formatter: function (params) {
  410. if (params.name.length > 9 && params.name.length < 35) {
  411. return params.name.substring(0, 20) + '\n' + params.name.substring(20, params.name.length) + ':' + params.value;
  412. } else if (params.name.length > 35) {
  413. return params.name.substring(0, 18) + '\n' + params.name.substring(18, 36) + '\n' + params.name.substring(36, params.name.length) + ':' + params.value;
  414. } else {
  415. return params.name + ':' + params.value;
  416. }
  417. },
  418. },
  419. emphasis: {
  420. position: 'left',
  421. show: true,
  422. textStyle: {
  423. color: '#fff',
  424. fontSize: '14',
  425. fontWeight: 'bold'
  426. },
  427. length: 1
  428. }
  429. },
  430. }]
  431. };
  432. keywordPieChart.setOption(option);
  433. }
  434. function Code(val, row, index) {
  435. let num = index + 1
  436. return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:50px;text-align: center;'>" +
  437. num + "</span>"
  438. // return index + 1;
  439. }
  440. function getKeyName(v, r) {
  441. for (let i = 0; i < keyidArr.length; i++) {
  442. if (keyidArr[i].id == keyid) {
  443. if (keyidArr[0].id == keyid) {
  444. console.log('1111', keyname)
  445. // $('.head_title').text(keyname+'关键字数据分析')
  446. $('.backKey_icon').css('display', 'none')
  447. } else {
  448. $('.backKey_icon').css('display', 'block')
  449. }
  450. }
  451. }
  452. return '<span class="workAct" onclick="getKeyClass(\'' + r.KeyId + '\',\'' + r.ClassCount + '\',\'' + r.KeyName +
  453. '\')">' + v + '</span>'
  454. }
  455. function getcodeNum(v) {
  456. }
  457. //办理时长
  458. function timeSecTable() {
  459. function p(s) {
  460. return s < 10 ? '0' + s : s;
  461. }
  462. var currentYear = new Date().getFullYear();
  463. var currentMonth = new Date().getMonth() + 1;
  464. var currentDate = new Date().getDate();
  465. var prevCurrentYear = 0;
  466. var prevCurrentMonth = 0;
  467. if (currentMonth == 1) {
  468. prevCurrentYear = currentYear - 1;
  469. prevCurrentMonth = 12;
  470. } else {
  471. prevCurrentYear = currentYear;
  472. prevCurrentMonth = currentMonth - 1;
  473. }
  474. let hh = new Date().getHours()
  475. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  476. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  477. var data = currentYear + "-" + p(currentMonth) + "-" + 01
  478. var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate)
  479. $('.dataTT').text(data + " ~ " + current)
  480. var $tableLeft = $('#timeSecList');
  481. $tableLeft.bootstrapTable('destroy');
  482. //初始化表格,动态从服务器加载数据
  483. $tableLeft.bootstrapTable({
  484. method: "get", //使用get请求到服务器获取数据
  485. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
  486. striped: false, //表格显示条纹
  487. pagination: false, //启动分页
  488. pageSize: 12, //每页显示的记录数
  489. pageNumber: 1, //当前第几页
  490. fixedColumns: false,
  491. fixedNumber: 3,
  492. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  493. search: false, //是否启用查询
  494. showColumns: false, //显示下拉框勾选要显示的列
  495. showRefresh: false, //显示刷新按钮
  496. sidePagination: "server", //表示服务端请求
  497. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  498. //设置为limit可以获取limit, offset, search, sort, order
  499. queryParamsType: "undefined",
  500. queryParams: function queryParams(params) { //设置查询参数
  501. },
  502. onLoadSuccess: function (data) { //加载成功时执行
  503. // data.reverse();
  504. const newDataL = {};
  505. newDataL.state = "success";
  506. newDataL.message = "加载成功";
  507. newDataL.rows = data;
  508. $tableLeft.bootstrapTable('load', newDataL);
  509. },
  510. onLoadError: function () { //加载失败时执行
  511. layer.msg("加载数据失败", {
  512. time: 1500,
  513. icon: 2
  514. });
  515. }
  516. });
  517. }
  518. //操作
  519. function getCompanyName(v, r) {
  520. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + r.deptid + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + ''
  521. + '\',\'' + '' + '\',\'' + 0 + '\')">' + v + '</span>'
  522. }
  523. function trend(val, row) {
  524. var str = '';
  525. if (row.trend.substring(0, 1) == '-' && row.trend.length > 1) {
  526. str = '<ul class="tool_downs">' +
  527. '<li><img src="./image/second/down_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  528. .trend.substring(1) + '<li>' +
  529. '</ul>';
  530. } else if (row.trend.substring(0, 1) != '-' && row.trend.length > 1) {
  531. str = '<ul class="tool_downs">' +
  532. '<li><img src="./image/second/up_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  533. .trend + '<li>' +
  534. '</ul>';
  535. } else {
  536. str = '<ul class="tool_downs">' +
  537. '<li>' + row.trend + '<li>' +
  538. '</ul>';
  539. }
  540. return str
  541. }
  542. //热线整合受理情况&重大事件
  543. function getHonelineChart2(data, dom) {
  544. let hotline2 = echarts.init(document.getElementById(dom));
  545. const CubeLeft = echarts.graphic.extendShape({
  546. shape: {
  547. x: 0,
  548. y: 0
  549. },
  550. buildPath: function (ctx, shape) {
  551. const xAxisPoint = shape.xAxisPoint
  552. const c0 = [shape.x, shape.y]
  553. const c1 = [shape.x - 20, shape.y - 4]
  554. const c2 = [xAxisPoint[0] - 20, xAxisPoint[1] - 4]
  555. const c3 = [xAxisPoint[0], xAxisPoint[1]]
  556. ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1])
  557. .closePath()
  558. }
  559. })
  560. const CubeRight = echarts.graphic.extendShape({
  561. shape: {
  562. x: 0,
  563. y: 0
  564. },
  565. buildPath: function (ctx, shape) {
  566. const xAxisPoint = shape.xAxisPoint
  567. const c1 = [shape.x, shape.y]
  568. const c2 = [xAxisPoint[0], xAxisPoint[1]]
  569. const c3 = [xAxisPoint[0] + 8, xAxisPoint[1] - 4]
  570. const c4 = [shape.x + 8, shape.y - 4]
  571. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  572. .closePath()
  573. }
  574. })
  575. const CubeTop = echarts.graphic.extendShape({
  576. shape: {
  577. x: 0,
  578. y: 0
  579. },
  580. buildPath: function (ctx, shape) {
  581. // 逆时针 角 y 负数向上 X 负数向左
  582. const c1 = [shape.x, shape.y]
  583. const c2 = [shape.x + 8, shape.y - 4]
  584. const c3 = [shape.x - 11, shape.y - 8]
  585. const c4 = [shape.x - 20, shape.y - 4]
  586. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  587. .closePath()
  588. }
  589. })
  590. echarts.graphic.registerShape('CubeLeft', CubeLeft)
  591. echarts.graphic.registerShape('CubeRight', CubeRight)
  592. echarts.graphic.registerShape('CubeTop', CubeTop)
  593. let MAX = []
  594. let VALUE = []
  595. let LEV = []
  596. let chartData = [].concat(data)
  597. chartData.forEach(item => {
  598. VALUE.push(item.landArea)
  599. LEV.push(item.level)
  600. })
  601. let maxItem = [].concat(VALUE).sort((a, b) => b - a)[0]
  602. let SUM = 0
  603. for (let item of VALUE) {
  604. SUM += item
  605. MAX.push(maxItem)
  606. }
  607. option = {
  608. tooltip: {
  609. trigger: 'item',
  610. textStyle: {
  611. color: '#ffe400',
  612. fontSize: '16',
  613. fontWeight: '500'
  614. },
  615. position: 'top',
  616. backgroundColor: 'rgba(250,250,250,0)',
  617. transitionDuration: 0.4,
  618. formatter: function (params) {
  619. return '<div style="background-image: url(image/second/reminder_box2.png);width:50px;height:33px;line-height:30px;background-size: 100% 100%;text-align:center;">' +
  620. VALUE[params.dataIndex] + '</div>';
  621. }
  622. },
  623. grid: {
  624. right: "5%",
  625. top: "20%",
  626. left: "5%",
  627. bottom: "5%",
  628. containLabel: true
  629. },
  630. xAxis: {
  631. type: 'category',
  632. data: LEV,
  633. axisLine: {
  634. show: true,
  635. lineStyle: {
  636. color: '#687e89'
  637. }
  638. },
  639. offset: 10,
  640. axisTick: {
  641. show: false
  642. },
  643. axisLabel: {
  644. fontSize: 14,
  645. color: '#fff'
  646. }
  647. },
  648. yAxis: [{
  649. nameTextStyle: {
  650. color: "#f4f5f5",
  651. padding: [0, 0, 10, -5],
  652. fontSize: 16
  653. },
  654. axisLabel: {
  655. color: "#f4f5f5",
  656. fontSize: 16
  657. },
  658. axisTick: {
  659. lineStyle: {
  660. color: "#687f8a",
  661. width: 1
  662. },
  663. show: true
  664. },
  665. splitLine: {
  666. show: true,
  667. lineStyle: {
  668. color: "#687f8a",
  669. type: "dashed"
  670. }
  671. },
  672. axisLine: {
  673. lineStyle: {
  674. color: "#687f8a",
  675. width: 1,
  676. type: "solid"
  677. },
  678. show: true,
  679. // "symbol":['none', 'arrow'],
  680. symbol: ['none',
  681. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  682. ],
  683. symbolOffset: 5,
  684. symbolSize: [35, 38],
  685. },
  686. name: "条"
  687. }],
  688. series: [{
  689. type: 'custom',
  690. renderItem: (params, api) => {
  691. const location = api.coord([api.value(0), api.value(1)])
  692. return {
  693. type: 'group',
  694. children: [{
  695. type: 'CubeLeft',
  696. shape: {
  697. api,
  698. xValue: api.value(0),
  699. yValue: api.value(1),
  700. x: location[0],
  701. y: location[1],
  702. xAxisPoint: api.coord([api.value(0), 0])
  703. },
  704. style: {
  705. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  706. offset: 0,
  707. color: '#3fffea'
  708. }, {
  709. offset: 1,
  710. color: '#007eff'
  711. }])
  712. },
  713. },
  714. {
  715. type: 'CubeRight',
  716. shape: {
  717. api,
  718. xValue: api.value(0),
  719. yValue: api.value(1),
  720. x: location[0],
  721. y: location[1],
  722. xAxisPoint: api.coord([api.value(0), 0])
  723. },
  724. style: {
  725. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  726. offset: 0,
  727. color: '#2fbeaf' // 顶部
  728. }, {
  729. offset: 1,
  730. color: '#015fbf' // 底部
  731. }])
  732. }
  733. }, {
  734. type: 'CubeTop',
  735. shape: {
  736. api,
  737. xValue: api.value(0),
  738. yValue: api.value(1),
  739. x: location[0],
  740. y: location[1],
  741. xAxisPoint: api.coord([api.value(0), 0])
  742. },
  743. style: {
  744. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  745. offset: 0,
  746. color: '#9ffff5'
  747. }, {
  748. offset: 1,
  749. color: '#9ffff5'
  750. }])
  751. },
  752. }
  753. ]
  754. }
  755. },
  756. data: VALUE
  757. }, {
  758. type: 'bar',
  759. itemStyle: {
  760. color: 'rgba(255,255,255,0)'
  761. },
  762. emphasis: {
  763. itemStyle: {
  764. opacity: 0.2,
  765. color: 'rgb(60,118,77)'
  766. }
  767. },
  768. data: MAX
  769. },]
  770. }
  771. hotline2.setOption(option);
  772. if (dom == 'hotline2') {
  773. hotline2.on('click', function (params) {
  774. workTable('', '', '', params.name, '', '', '', '', 0)
  775. })
  776. } else if (dom == 'events') {
  777. hotline2.on('click', function (params) {
  778. // console.log(params)
  779. workTable('', '', '', '', params.name, '', '', '', 0)
  780. })
  781. }
  782. }
  783. //受理工单类型
  784. function getAcceptanceType() {
  785. var $tableLeft = $('#acceptancelist');
  786. $tableLeft.bootstrapTable('destroy');
  787. //初始化表格,动态从服务器加载数据
  788. $tableLeft.bootstrapTable({
  789. method: "get", //使用get请求到服务器获取数据
  790. url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount",
  791. striped: false, //表格显示条纹
  792. pagination: false, //启动分页
  793. pageSize: 12, //每页显示的记录数
  794. pageNumber: 1, //当前第几页
  795. fixedColumns: false,
  796. fixedNumber: 3,
  797. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  798. search: false, //是否启用查询
  799. showColumns: false, //显示下拉框勾选要显示的列
  800. showRefresh: false, //显示刷新按钮
  801. sidePagination: "server", //表示服务端请求
  802. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  803. //设置为limit可以获取limit, offset, search, sort, order
  804. queryParamsType: "undefined",
  805. queryParams: function queryParams(params) { //设置查询参数
  806. // var param = {
  807. // }
  808. // return param
  809. },
  810. onLoadSuccess: function (data) { //加载成功时执行
  811. const newDataL = {};
  812. let handTotal = 0;
  813. newDataL.state = data.state;
  814. newDataL.message = data.message;
  815. newDataL.rows = data.data;
  816. $tableLeft.bootstrapTable('load', newDataL);
  817. new doAjax({
  818. url: huayi.config.callcenter_url + "/InfoNew/GetHandling",
  819. data: {},
  820. callBack: function (res) {
  821. let handingData = [{
  822. value: res[0].db,
  823. name: '督办'
  824. }, {
  825. value: res[0].zhib,
  826. name: '直办'
  827. }, {
  828. value: res[0].zub,
  829. name: '转办'
  830. },
  831. {
  832. value: res[0].cb,
  833. name: '催办'
  834. }
  835. ]
  836. handTotal = res[0].db + res[0].zhib + res[0].zub + res[0].cb;
  837. $('.acceptanceType_wrap .total').text(handTotal);
  838. getTimes('.statisticsTime')
  839. getHandling(handingData);
  840. }
  841. });
  842. },
  843. onLoadError: function () { //加载失败时执行
  844. layer.msg("加载数据失败", {
  845. time: 1500,
  846. icon: 2
  847. });
  848. }
  849. });
  850. }
  851. function getHandling(data) {
  852. let sortPie = echarts.init(document.getElementById('acceptancePie'));
  853. option = {
  854. legend: [{
  855. 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`,
  856. orient: 'vertical',
  857. data: ['督办', '直办', '转办', '催办'],
  858. left: '80%',
  859. top: 'center',
  860. align: 'left',
  861. textStyle: {
  862. color: "#fff",
  863. fontSize: 18
  864. },
  865. padding: [10, 60],
  866. itemGap: 20
  867. }],
  868. color: ['#c046ff', '#00a8ff', '#00ffe4', '#f1b31e'],
  869. series: [{
  870. name: '访问来源',
  871. type: 'pie',
  872. radius: '76%',
  873. data: data,
  874. emphasis: {
  875. itemStyle: {
  876. shadowBlur: 10,
  877. shadowOffsetX: 0,
  878. shadowColor: 'rgba(0, 0, 0, 0.5)'
  879. }
  880. },
  881. label: {
  882. normal: {
  883. show: false,
  884. formatter: function (params) {
  885. return params.name + ':' + params.value
  886. // return
  887. },
  888. },
  889. emphasis: {
  890. position: 'left',
  891. show: true,
  892. textStyle: {
  893. color: '#fff',
  894. fontSize: '18',
  895. fontWeight: 'bold'
  896. },
  897. length: 1
  898. }
  899. },
  900. }]
  901. };
  902. sortPie.setOption(option);
  903. sortPie.on('click', function (params) {
  904. console.log(params.name)
  905. if (params.name == '直办') {
  906. workTable('', '', '', '', '', '', '', '', 0, 2)
  907. } else if (params.name == '督办') {
  908. workTable('', '', '', '', '', '', '', '', 0, 1)
  909. } else if (params.name == '转办') {
  910. workTable('', '', '', '', '', '', '', '', 0, 3)
  911. } else {
  912. workTable('', '', '', '', '', '', '', '', 0, 4)
  913. }
  914. })
  915. }
  916. function getAcceptanceName(val, row) {
  917. if (row.type == '咨询') {
  918. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 9 +
  919. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  920. } else if (row.type == '投诉') {
  921. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 11 +
  922. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  923. } else if (row.type == '建议') {
  924. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 12 +
  925. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  926. } else if (row.type == '其他') {
  927. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 90 +
  928. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  929. } else if (row.type == '求助') {
  930. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 10 +
  931. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  932. } else if (row.type == '表扬') {
  933. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 13 +
  934. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  935. } else if (row.type == '举报') {
  936. return '<span class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + 89 +
  937. '\',\'' + '' + '\',\'' + '' + '\',\'' + 0 + '\')">' + val + '</span>'
  938. }
  939. }
  940. //时段话务
  941. function trafficMonthChart(hours, monthCount, dayCount) {
  942. let traffic = echarts.init(document.getElementById('traffic2'));
  943. option = {
  944. tooltip: {
  945. trigger: 'axis',
  946. axisPointer: {
  947. show: true,
  948. type: 'line',
  949. lineStyle: {
  950. type: 'dashed'
  951. }
  952. },
  953. textStyle: {
  954. color: '#fff',
  955. fontSize: 16,
  956. fontWeight: '600',
  957. },
  958. position: ['75%', '55%'],
  959. backgroundColor: 'rgba(250,250,250,0)',
  960. formatter: function (params) {
  961. console.log()
  962. let str = '<div style="position: absolute;top:-315px;left:-423px">接通率:' + ((params[1].value / params[0].value) * 100).toFixed(0) + '%</div>'
  963. return str;
  964. }
  965. },
  966. grid: {
  967. top: '18%',
  968. bottom: '12%'
  969. },
  970. xAxis: [{
  971. type: "category",
  972. boundaryGap: false,
  973. scale: true,
  974. axisLabel: {
  975. formatter: '{value}',
  976. fontSize: 13,
  977. margin: 10,
  978. textStyle: {
  979. color: "#f4f4f8"
  980. }
  981. },
  982. axisLine: {
  983. show: true,
  984. lineStyle: {
  985. color: "#525fa6"
  986. }
  987. },
  988. splitLine: {
  989. show: false,
  990. lineStyle: {
  991. color: "#243753"
  992. }
  993. },
  994. axisTick: {
  995. show: false
  996. },
  997. data: hours
  998. }],
  999. yAxis: [{
  1000. boundaryGap: false,
  1001. type: "value",
  1002. // scale:true,
  1003. axisLabel: {
  1004. textStyle: {
  1005. color: "#f4f4f8"
  1006. }
  1007. },
  1008. nameTextStyle: {
  1009. color: "#fff",
  1010. fontSize: 12,
  1011. lineHeight: 40
  1012. },
  1013. splitLine: {
  1014. show: true,
  1015. lineStyle: {
  1016. color: "#516cb8",
  1017. type: "dashed"
  1018. }
  1019. },
  1020. axisLine: {
  1021. lineStyle: {
  1022. color: "#8393c8",
  1023. width: 1,
  1024. type: "solid"
  1025. },
  1026. show: true,
  1027. // "symbol":['none', 'arrow'],
  1028. symbol: ['none',
  1029. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1030. ],
  1031. symbolOffset: 5,
  1032. symbolSize: [35, 38],
  1033. },
  1034. name: "条"
  1035. }],
  1036. series: [{
  1037. name: "话务量",
  1038. type: "line",
  1039. smooth: true,
  1040. showSymbol: false,
  1041. symbol: 'circle',
  1042. symbolSize: 4,
  1043. zlevel: 3,
  1044. itemStyle: {
  1045. color: '#08fcff'
  1046. },
  1047. lineStyle: {
  1048. normal: {
  1049. width: 2,
  1050. color: "#08fcff",
  1051. }
  1052. },
  1053. label: {
  1054. show: true,
  1055. position: 'top',
  1056. color: '#fff',
  1057. fontSize: 14,
  1058. fontWeight: '600',
  1059. formatter: function (params) {
  1060. console.log(params)
  1061. return params.seriesName + ':' + params.value
  1062. }
  1063. },
  1064. areaStyle: {
  1065. normal: {
  1066. color: new echarts.graphic.LinearGradient(
  1067. 0,
  1068. 0,
  1069. 0,
  1070. 1,
  1071. [{
  1072. offset: 0,
  1073. color: "#087caa"
  1074. },
  1075. {
  1076. offset: 0.8,
  1077. color: "#091576"
  1078. }
  1079. ],
  1080. false
  1081. ),
  1082. }
  1083. },
  1084. emphasis: {
  1085. itemStyle: {
  1086. color: '#fff',
  1087. shadowBlur: 10,
  1088. shadowOffsetX: 1,
  1089. shadowOffsetY: 1,
  1090. shadowColor: 'rgb(250,250, 250)'
  1091. }
  1092. },
  1093. data: monthCount
  1094. }, {
  1095. name: "接通量",
  1096. type: "line",
  1097. smooth: true,
  1098. showSymbol: false,
  1099. symbol: 'circle',
  1100. symbolSize: 4,
  1101. zlevel: 3,
  1102. itemStyle: {
  1103. color: '#ffe000'
  1104. },
  1105. label: {
  1106. show: true,
  1107. position: 'top',
  1108. color: '#fff',
  1109. fontSize: 14,
  1110. fontWeight: '600',
  1111. formatter: function (params) {
  1112. return params.seriesName + ':' + params.value
  1113. }
  1114. },
  1115. lineStyle: {
  1116. normal: {
  1117. width: 2,
  1118. color: "#ffe000",
  1119. }
  1120. },
  1121. areaStyle: {
  1122. normal: {
  1123. color: new echarts.graphic.LinearGradient(
  1124. 0,
  1125. 0,
  1126. 0,
  1127. 1,
  1128. [{
  1129. offset: 0,
  1130. color: "#739952"
  1131. },
  1132. {
  1133. offset: 0.8,
  1134. color: "#091576"
  1135. }
  1136. ],
  1137. false
  1138. ),
  1139. }
  1140. },
  1141. emphasis: {
  1142. itemStyle: {
  1143. color: '#fff',
  1144. shadowBlur: 10,
  1145. shadowOffsetX: 1,
  1146. shadowOffsetY: 1,
  1147. shadowColor: 'rgb(250,250, 250)'
  1148. }
  1149. },
  1150. data: dayCount
  1151. }]
  1152. };
  1153. traffic.setOption(option);
  1154. }
  1155. function trafficDayChart(phoneName, ldcount, jtcount, wjcount, fqcount) {
  1156. let traffic3 = echarts.init(document.getElementById('rexian'));
  1157. option = {
  1158. tooltip: {
  1159. trigger: 'axis',
  1160. axisPointer: {
  1161. show: true,
  1162. type: 'line',
  1163. lineStyle: {
  1164. type: 'dashed'
  1165. }
  1166. },
  1167. textStyle: {
  1168. color: '#ffe400',
  1169. fontSize: '14'
  1170. },
  1171. backgroundColor: 'rgba(250,250,250,0)',
  1172. formatter: function (params) {
  1173. 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;">'
  1174. params.forEach(function (v, n) {
  1175. if (v.seriesName != '上部1') {
  1176. str +=
  1177. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1178. v.seriesName +
  1179. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1180. v.value + '</span></div>'
  1181. }
  1182. })
  1183. return str;
  1184. }
  1185. },
  1186. legend: {
  1187. type: 'plain',
  1188. data: ['来电量', '接通量', '未接通', '主动放弃'],
  1189. textStyle: { fontSize: 14, color: '#fff' },
  1190. itemWidth: 25,
  1191. itemHeight: 15,
  1192. itemGap: 15,
  1193. icon: 'rect',
  1194. selectedMode: false
  1195. // top: '5%',
  1196. },
  1197. grid: {
  1198. left: '3%',
  1199. right: '4%',
  1200. bottom: '3%',
  1201. containLabel: true,
  1202. tooltip: {
  1203. textStyle: {
  1204. color: '#fff'
  1205. }
  1206. }
  1207. },
  1208. xAxis: {
  1209. axisTick: { show: true },
  1210. axisLine: {
  1211. show: true,
  1212. lineStyle: {
  1213. color: "#525fa6"
  1214. }
  1215. },
  1216. axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
  1217. data: phoneName
  1218. },
  1219. yAxis: [{
  1220. boundaryGap: false,
  1221. type: "value",
  1222. // scale:true,
  1223. axisLabel: {
  1224. textStyle: {
  1225. color: "#f4f4f8",
  1226. fontSize: 16
  1227. }
  1228. },
  1229. nameTextStyle: {
  1230. color: "#fff",
  1231. fontSize: 12,
  1232. lineHeight: 40
  1233. },
  1234. splitLine: {
  1235. show: true,
  1236. lineStyle: {
  1237. color: "#516cb8",
  1238. type: "dashed"
  1239. }
  1240. },
  1241. axisLine: {
  1242. lineStyle: {
  1243. color: "#8393c8",
  1244. width: 1,
  1245. type: "solid"
  1246. },
  1247. show: true,
  1248. // "symbol":['none', 'arrow'],
  1249. symbol: ['none',
  1250. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1251. ],
  1252. symbolOffset: 5,
  1253. symbolSize: [35, 38],
  1254. },
  1255. name: "个"
  1256. }],
  1257. series: [{
  1258. z: 1,
  1259. name: '上部1',
  1260. type: 'pictorialBar',
  1261. symbolPosition: 'end',
  1262. data: ldcount,
  1263. symbol: 'diamond',
  1264. symbolOffset: ['-75%', '-50%'],
  1265. symbolSize: [29, 19],
  1266. itemStyle: {
  1267. borderColor: '#2fffa4',
  1268. color: '#2fffa4'
  1269. },
  1270. }, {
  1271. z: 1,
  1272. type: 'bar',
  1273. name: '来电量',
  1274. barWidth: 30,
  1275. barGap: '-50%',
  1276. data: ldcount,
  1277. itemStyle: {
  1278. color: {
  1279. type: 'linear',
  1280. x: 0, x2: 1, y: 0, y2: 0,
  1281. colorStops: [
  1282. { offset: 0, color: 'rgba(29, 245, 160, .7)' },
  1283. { offset: 0.5, color: 'rgba(29, 245, 160, .7)' },
  1284. { offset: 0.5, color: 'rgba(29, 245, 160, .3)' },
  1285. { offset: 1, color: 'rgba(29, 245, 160, .3)' }
  1286. ]
  1287. }
  1288. },
  1289. }, {
  1290. z: 2,
  1291. name: '上部1',
  1292. type: 'pictorialBar',
  1293. symbolPosition: 'end',
  1294. data: jtcount,
  1295. symbol: 'diamond',
  1296. symbolOffset: ['-25%', '-50%'],
  1297. symbolSize: [29, 19],
  1298. itemStyle: {
  1299. borderColor: '#32ffee',
  1300. color: '#32ffee'
  1301. },
  1302. }, {
  1303. z: 2,
  1304. type: 'bar',
  1305. name: '接通量',
  1306. barWidth: 30,
  1307. data: jtcount,
  1308. itemStyle: {
  1309. color: {
  1310. type: 'linear',
  1311. x: 0, x2: 1, y: 0, y2: 0,
  1312. colorStops: [
  1313. { offset: 0, color: 'rgba(50, 255, 238, .7)' },
  1314. { offset: 0.5, color: 'rgba(50, 255, 238, .7)' },
  1315. { offset: 0.5, color: 'rgba(50, 255, 238, .3)' },
  1316. { offset: 1, color: 'rgba(50, 255, 238, .3)' }
  1317. ]
  1318. }
  1319. },
  1320. }, {
  1321. z: 3,
  1322. name: '上部1',
  1323. type: 'pictorialBar',
  1324. symbolPosition: 'end',
  1325. data: wjcount,
  1326. symbol: 'diamond',
  1327. symbolOffset: ['25%', '-50%'],
  1328. symbolSize: [29, 19],
  1329. itemStyle: {
  1330. borderColor: '#ffd11a',
  1331. color: '#ffd11a'
  1332. },
  1333. }, {
  1334. z: 3,
  1335. type: 'bar',
  1336. name: '未接通',
  1337. barWidth: 30,
  1338. data: wjcount,
  1339. itemStyle: {
  1340. color: {
  1341. type: 'linear',
  1342. x: 0, x2: 1, y: 0, y2: 0,
  1343. colorStops: [
  1344. { offset: 0, color: 'rgba(255, 209, 26, .7)' },
  1345. { offset: 0.5, color: 'rgba(255, 209, 26, .7)' },
  1346. { offset: 0.5, color: 'rgba(255, 209, 26, .3)' },
  1347. { offset: 1, color: 'rgba(255, 209, 26, .3)' }
  1348. ]
  1349. }
  1350. },
  1351. },
  1352. {
  1353. z: 4,
  1354. name: '上部1',
  1355. type: 'pictorialBar',
  1356. symbolPosition: 'end',
  1357. data: fqcount,
  1358. symbol: 'diamond',
  1359. symbolOffset: ['75%', '-50%'],
  1360. symbolSize: [29, 19],
  1361. itemStyle: {
  1362. borderColor: 'rgb(176,121,121)',
  1363. color: 'rgb(176,121,121)'
  1364. },
  1365. }, {
  1366. z: 4,
  1367. type: 'bar',
  1368. name: '主动放弃',
  1369. barWidth: 30,
  1370. data: fqcount,
  1371. itemStyle: {
  1372. color: {
  1373. type: 'linear',
  1374. x: 0, x2: 1, y: 0, y2: 0,
  1375. colorStops: [
  1376. { offset: 0, color: 'rgb(176,121,121)' },
  1377. { offset: 0.5, color: 'rgb(176,121,121)' },
  1378. { offset: 0.5, color: 'rgba(176,121,121, .3)' },
  1379. { offset: 1, color: 'rgba(176,121,121, .3)' }
  1380. ]
  1381. }
  1382. },
  1383. }
  1384. ],
  1385. }
  1386. traffic3.setOption(option)
  1387. }
  1388. function getS(phoneName, ldcount, jtcount, wjcount, fqcount) {
  1389. let traffic3 = echarts.init(document.getElementById('heji'));
  1390. option = {
  1391. tooltip: {
  1392. trigger: 'axis',
  1393. axisPointer: {
  1394. show: true,
  1395. type: 'line',
  1396. lineStyle: {
  1397. type: 'dashed'
  1398. }
  1399. },
  1400. textStyle: {
  1401. color: '#ffe400',
  1402. fontSize: '14'
  1403. },
  1404. backgroundColor: 'rgba(250,250,250,0)',
  1405. formatter: function (params) {
  1406. 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;">'
  1407. params.forEach(function (v, n) {
  1408. if (v.seriesName != '上部1') {
  1409. str +=
  1410. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1411. v.seriesName +
  1412. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1413. v.value + '</span></div>'
  1414. }
  1415. })
  1416. return str;
  1417. }
  1418. },
  1419. legend: {
  1420. type: 'plain',
  1421. data: ['来电量', '接通量', '未接通', '主动放弃'],
  1422. textStyle: { fontSize: 14, color: '#fff' },
  1423. itemWidth: 25,
  1424. itemHeight: 15,
  1425. itemGap: 15,
  1426. icon: 'rect',
  1427. selectedMode: false
  1428. // top: '5%',
  1429. },
  1430. grid: {
  1431. left: '3%',
  1432. right: '4%',
  1433. bottom: '3%',
  1434. containLabel: true,
  1435. tooltip: {
  1436. textStyle: {
  1437. color: '#fff'
  1438. }
  1439. }
  1440. },
  1441. xAxis: {
  1442. axisTick: { show: true },
  1443. axisLine: {
  1444. show: true,
  1445. lineStyle: {
  1446. color: "#525fa6"
  1447. }
  1448. },
  1449. axisLabel: { textStyle: { fontSize: 16, color: '#fff' }, },
  1450. data: phoneName
  1451. },
  1452. yAxis: [{
  1453. boundaryGap: false,
  1454. type: "value",
  1455. // scale:true,
  1456. axisLabel: {
  1457. textStyle: {
  1458. color: "#f4f4f8",
  1459. fontSize: 16
  1460. }
  1461. },
  1462. nameTextStyle: {
  1463. color: "#fff",
  1464. fontSize: 12,
  1465. lineHeight: 40
  1466. },
  1467. splitLine: {
  1468. show: true,
  1469. lineStyle: {
  1470. color: "#516cb8",
  1471. type: "dashed"
  1472. }
  1473. },
  1474. axisLine: {
  1475. lineStyle: {
  1476. color: "#8393c8",
  1477. width: 1,
  1478. type: "solid"
  1479. },
  1480. show: true,
  1481. // "symbol":['none', 'arrow'],
  1482. symbol: ['none',
  1483. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1484. ],
  1485. symbolOffset: 5,
  1486. symbolSize: [35, 38],
  1487. },
  1488. name: "个"
  1489. }],
  1490. series: [{
  1491. z: 1,
  1492. name: '上部1',
  1493. type: 'pictorialBar',
  1494. symbolPosition: 'end',
  1495. data: ldcount,
  1496. symbol: 'diamond',
  1497. symbolOffset: ['-75%', '-50%'],
  1498. symbolSize: [29, 19],
  1499. itemStyle: {
  1500. borderColor: '#2fffa4',
  1501. color: '#2fffa4'
  1502. },
  1503. }, {
  1504. z: 1,
  1505. type: 'bar',
  1506. name: '来电量',
  1507. barWidth: 30,
  1508. barGap: '-50%',
  1509. data: ldcount,
  1510. itemStyle: {
  1511. color: {
  1512. type: 'linear',
  1513. x: 0, x2: 1, y: 0, y2: 0,
  1514. colorStops: [
  1515. { offset: 0, color: 'rgba(29, 245, 160, .7)' },
  1516. { offset: 0.5, color: 'rgba(29, 245, 160, .7)' },
  1517. { offset: 0.5, color: 'rgba(29, 245, 160, .3)' },
  1518. { offset: 1, color: 'rgba(29, 245, 160, .3)' }
  1519. ]
  1520. }
  1521. },
  1522. }, {
  1523. z: 2,
  1524. name: '上部1',
  1525. type: 'pictorialBar',
  1526. symbolPosition: 'end',
  1527. data: jtcount,
  1528. symbol: 'diamond',
  1529. symbolOffset: ['-25%', '-50%'],
  1530. symbolSize: [29, 19],
  1531. itemStyle: {
  1532. borderColor: '#32ffee',
  1533. color: '#32ffee'
  1534. },
  1535. }, {
  1536. z: 2,
  1537. type: 'bar',
  1538. name: '接通量',
  1539. barWidth: 30,
  1540. data: jtcount,
  1541. itemStyle: {
  1542. color: {
  1543. type: 'linear',
  1544. x: 0, x2: 1, y: 0, y2: 0,
  1545. colorStops: [
  1546. { offset: 0, color: 'rgba(50, 255, 238, .7)' },
  1547. { offset: 0.5, color: 'rgba(50, 255, 238, .7)' },
  1548. { offset: 0.5, color: 'rgba(50, 255, 238, .3)' },
  1549. { offset: 1, color: 'rgba(50, 255, 238, .3)' }
  1550. ]
  1551. }
  1552. },
  1553. }, {
  1554. z: 3,
  1555. name: '上部1',
  1556. type: 'pictorialBar',
  1557. symbolPosition: 'end',
  1558. data: wjcount,
  1559. symbol: 'diamond',
  1560. symbolOffset: ['25%', '-50%'],
  1561. symbolSize: [29, 19],
  1562. itemStyle: {
  1563. borderColor: '#ffd11a',
  1564. color: '#ffd11a'
  1565. },
  1566. }, {
  1567. z: 3,
  1568. type: 'bar',
  1569. name: '未接通',
  1570. barWidth: 30,
  1571. data: wjcount,
  1572. itemStyle: {
  1573. color: {
  1574. type: 'linear',
  1575. x: 0, x2: 1, y: 0, y2: 0,
  1576. colorStops: [
  1577. { offset: 0, color: 'rgba(255, 209, 26, .7)' },
  1578. { offset: 0.5, color: 'rgba(255, 209, 26, .7)' },
  1579. { offset: 0.5, color: 'rgba(255, 209, 26, .3)' },
  1580. { offset: 1, color: 'rgba(255, 209, 26, .3)' }
  1581. ]
  1582. }
  1583. },
  1584. },
  1585. {
  1586. z: 4,
  1587. name: '上部1',
  1588. type: 'pictorialBar',
  1589. symbolPosition: 'end',
  1590. data: fqcount,
  1591. symbol: 'diamond',
  1592. symbolOffset: ['75%', '-50%'],
  1593. symbolSize: [29, 19],
  1594. itemStyle: {
  1595. borderColor: 'rgb(176,121,121)',
  1596. color: 'rgb(176,121,121)'
  1597. },
  1598. }, {
  1599. z: 4,
  1600. type: 'bar',
  1601. name: '主动放弃',
  1602. barWidth: 30,
  1603. data: fqcount,
  1604. itemStyle: {
  1605. color: {
  1606. type: 'linear',
  1607. x: 0, x2: 1, y: 0, y2: 0,
  1608. colorStops: [
  1609. { offset: 0, color: 'rgb(176,121,121)' },
  1610. { offset: 0.5, color: 'rgb(176,121,121)' },
  1611. { offset: 0.5, color: 'rgba(176,121,121, .3)' },
  1612. { offset: 1, color: 'rgba(176,121,121, .3)' }
  1613. ]
  1614. }
  1615. },
  1616. }
  1617. ],
  1618. }
  1619. traffic3.setOption(option)
  1620. }
  1621. //坐席监控
  1622. //实时话务统计
  1623. function getRealTimeTraffi(hours, hrCount, hcCount) {
  1624. let realTimeTraffi = echarts.init(document.getElementById('realTimeTraffi'));
  1625. option = {
  1626. grid: {
  1627. top: '20%',
  1628. bottom: '20%'
  1629. },
  1630. legend: {
  1631. data: ['呼入', '呼出'],
  1632. textStyle: {
  1633. color: '#fff',
  1634. fontSize: 14,
  1635. padding: [0, 5]
  1636. },
  1637. right: 25,
  1638. top: -5
  1639. },
  1640. tooltip: {
  1641. trigger: 'axis',
  1642. axisPointer: {
  1643. show: true,
  1644. type: 'line',
  1645. lineStyle: {
  1646. type: 'dashed'
  1647. }
  1648. },
  1649. textStyle: {
  1650. color: '#fff',
  1651. fontSize: 16,
  1652. fontWeight: '600',
  1653. },
  1654. backgroundColor: 'rgba(250,250,250,0)',
  1655. formatter: function (params) {
  1656. 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;">'
  1657. params.forEach(function (v, n) {
  1658. // if(v.seriesName!='上部1'){
  1659. str +=
  1660. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1661. v.seriesName +
  1662. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1663. v.value + '</span></div>'
  1664. // }
  1665. })
  1666. return str;
  1667. }
  1668. },
  1669. xAxis: [{
  1670. type: "category",
  1671. boundaryGap: false,
  1672. scale: true,
  1673. axisLabel: {
  1674. formatter: '{value}',
  1675. fontSize: 13,
  1676. margin: 10,
  1677. textStyle: {
  1678. color: "#f4f4f8"
  1679. }
  1680. },
  1681. axisLine: {
  1682. show: true,
  1683. lineStyle: {
  1684. color: "#849cc9"
  1685. }
  1686. },
  1687. splitLine: {
  1688. show: false,
  1689. lineStyle: {
  1690. color: "#849cc9"
  1691. }
  1692. },
  1693. axisTick: {
  1694. show: false
  1695. },
  1696. data: hours
  1697. }],
  1698. yAxis: [{
  1699. boundaryGap: false,
  1700. type: "value",
  1701. // scale:true,
  1702. axisLabel: {
  1703. textStyle: {
  1704. color: "#f4f4f8"
  1705. }
  1706. },
  1707. nameTextStyle: {
  1708. color: "#fff",
  1709. fontSize: 12,
  1710. lineHeight: 40
  1711. },
  1712. splitLine: {
  1713. show: true,
  1714. lineStyle: {
  1715. color: "#849cc9",
  1716. type: "dashed"
  1717. }
  1718. },
  1719. axisLine: {
  1720. lineStyle: {
  1721. color: "#849cc9",
  1722. width: 1,
  1723. type: "solid"
  1724. },
  1725. show: true,
  1726. // "symbol":['none', 'arrow'],
  1727. symbol: ['none',
  1728. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1729. ],
  1730. symbolOffset: 5,
  1731. symbolSize: [35, 38],
  1732. },
  1733. }],
  1734. series: [{
  1735. name: "呼入",
  1736. type: "line",
  1737. smooth: true,
  1738. showSymbol: false,
  1739. symbol: 'circle',
  1740. symbolSize: 4,
  1741. zlevel: 3,
  1742. itemStyle: {
  1743. color: '#08fcff'
  1744. },
  1745. lineStyle: {
  1746. normal: {
  1747. width: 2,
  1748. color: "#01cde6",
  1749. }
  1750. },
  1751. // label: {
  1752. // show: true,
  1753. // position: 'top',
  1754. // color: '#fff',
  1755. // fontSize: 14,
  1756. // fontWeight: '600',
  1757. // formatter: function (params) {
  1758. // console.log(params)
  1759. // return params.seriesName + ':' + params.value
  1760. // }
  1761. // },
  1762. areaStyle: {
  1763. normal: {
  1764. color: new echarts.graphic.LinearGradient(
  1765. 0,
  1766. 0,
  1767. 0,
  1768. 1,
  1769. [{
  1770. offset: 0,
  1771. color: "#0571ae"
  1772. },
  1773. {
  1774. offset: 0.8,
  1775. color: "#093085"
  1776. }
  1777. ],
  1778. false
  1779. ),
  1780. }
  1781. },
  1782. emphasis: {
  1783. itemStyle: {
  1784. color: '#fff',
  1785. shadowBlur: 10,
  1786. shadowOffsetX: 1,
  1787. shadowOffsetY: 1,
  1788. shadowColor: 'rgb(250,250, 250)'
  1789. }
  1790. },
  1791. data: hrCount
  1792. }, {
  1793. name: "呼出",
  1794. type: "line",
  1795. smooth: true,
  1796. showSymbol: false,
  1797. symbol: 'circle',
  1798. symbolSize: 4,
  1799. zlevel: 3,
  1800. itemStyle: {
  1801. color: '#ffe000'
  1802. },
  1803. // label: {
  1804. // show: true,
  1805. // position: 'top',
  1806. // color: '#fff',
  1807. // fontSize: 14,
  1808. // fontWeight: '600',
  1809. // formatter: function (params) {
  1810. // return params.seriesName + ':' + params.value
  1811. // }
  1812. // },
  1813. lineStyle: {
  1814. normal: {
  1815. width: 2,
  1816. color: "#ffd200",
  1817. }
  1818. },
  1819. areaStyle: {
  1820. normal: {
  1821. color: new echarts.graphic.LinearGradient(
  1822. 0,
  1823. 0,
  1824. 0,
  1825. 1,
  1826. [{
  1827. offset: 0,
  1828. color: "#626a55"
  1829. },
  1830. {
  1831. offset: 0.8,
  1832. color: "#093085"
  1833. }
  1834. ],
  1835. false
  1836. ),
  1837. }
  1838. },
  1839. emphasis: {
  1840. itemStyle: {
  1841. color: '#fff',
  1842. shadowBlur: 10,
  1843. shadowOffsetX: 1,
  1844. shadowOffsetY: 1,
  1845. shadowColor: 'rgb(250,250, 250)'
  1846. }
  1847. },
  1848. data: hcCount
  1849. }]
  1850. };
  1851. realTimeTraffi.setOption(option);
  1852. }