Нет описания

second_index.js 81KB

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