Ei kuvausta

second_index.js 58KB

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