Açıklama Yok

index.js 59KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129
  1. /*
  2. 一级大屏
  3. */
  4. var img = './image/frame.png';
  5. var numscroll = [];
  6. var numscroll1 = [];
  7. var trafficState = 0
  8. var trafficData = [];
  9. var sourceCountId = [],
  10. seatData = [],
  11. timeState = 1,
  12. hotlineDataType = 0,
  13. MajoreventsDataType=0,
  14. keyCountDataType=0,
  15. typeCountDataType=0
  16. //时段话务
  17. gettraffic() //话务量
  18. getHotline() //热线
  19. getHotThings() //重大事件
  20. getKeyWord(); //热搜词
  21. getworkOrder() //工单类型
  22. timeTable() //办理时限
  23. getHotlineAccept() //热线受理
  24. getNowFormatDate()//现在的时间
  25. //每个三十秒刷新一次
  26. setInterval(function () {
  27. gettraffic() //话务量
  28. getHotline() //热线
  29. getHotThings() //重大事件
  30. getKeyWord(); //热搜词
  31. getworkOrder() //工单类型
  32. timeTable() //办理时限
  33. getHotlineAccept() //热线受理
  34. }, 30000)
  35. $(document).ready(function(){
  36. //热线整合
  37. //$(".hotline").on("click","li",function(){
  38. // alert("段落被点击了");
  39. //});
  40. })
  41. //关闭按钮
  42. $('.close_icon').click(function () {
  43. console.log(11)
  44. $('.bulletFrame').hide();
  45. $('.bulletFrameT').hide();
  46. if ($('.bulletFrame').css('display') == 'none') {
  47. $('.body').css('opacity', '1')
  48. }
  49. if ($('.bulletFrameT').css('display') == 'none') {
  50. $('.body').css('opacity', '1')
  51. }
  52. })
  53. //关闭按钮退回工单列表
  54. $('.backProcedure').click(function () {
  55. $('.workDetails').show();
  56. $('.workDetails').siblings().hide()
  57. })
  58. //返回按钮
  59. $('.back_icon').click(function () {
  60. $('.bulletFrameT').hide();
  61. if ($('.bulletFrameT').css('display') == 'none') {
  62. $('.body').css('opacity', '1')
  63. }
  64. })
  65. //中间地图关闭按钮
  66. $('.closeMap_icon').click(function () {
  67. $('.bulletFrame').hide();
  68. $('.bulletFrameT').hide();
  69. if ($('.bulletFrame').css('display') == 'none') {
  70. $('.body').css('opacity', '1')
  71. }
  72. if ($('.bulletFrameT').css('display') == 'none') {
  73. $('.body').css('opacity', '1')
  74. }
  75. $('.type').css({
  76. 'background': 'url(./image/second/btn1.png)'
  77. })
  78. $('.classify').css({
  79. 'background': 'url(./image/second/btn2.png)'
  80. })
  81. $('.secondLevel_map .regionMap').html('');
  82. })
  83. //
  84. //热搜词移入,移入内容以外关闭出现页面
  85. //document.addEventListener('mousemove', (e) => {
  86. // let t = document.getElementById('keyword'); // 最外层元素
  87. // let l = document.getElementById('hotline3');
  88. // if (!e.path.includes(t)) {
  89. // $('.keyWrap').css('display', 'none')
  90. // }
  91. // if (!e.path.includes(l)) {
  92. // $('.lineB').css('display', 'none')
  93. // }
  94. //})
  95. $("#keyword").mouseleave(function(){
  96. $('.keyWrap').css('display', 'none')
  97. });
  98. $("#hotline3").mouseleave(function(){
  99. $('.lineB').css('display', 'none')
  100. });
  101. function getHotlineAccept() {
  102. new doAjax({
  103. url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountBy",
  104. data: {},
  105. callBack: function (res) {
  106. let str = ''
  107. Object.keys(res[0]).forEach((key, n) => {
  108. if (n == 0) {
  109. if ($('#slw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  110. $('#slw_num').text(parseInt(res[0][key] % 100000 / 10000))
  111. $('#slw_num').counterUp({
  112. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  113. time: 500//计数动画总的持续时间。
  114. });
  115. }
  116. if ($('#slq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  117. $('#slq_num').text(parseInt(res[0][key] % 10000 / 1000))
  118. $('#slq_num').counterUp({
  119. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  120. time: 500//计数动画总的持续时间。
  121. });
  122. }
  123. if ($('#slb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  124. $('#slb_num').text(parseInt(res[0][key] % 1000 / 100))
  125. $('#slb_num').counterUp({
  126. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  127. time: 500//计数动画总的持续时间。
  128. });
  129. }
  130. if ($('#sls_num').text() != parseInt((res[0][key] % 100) / 10)) {
  131. $('#sls_num').text(parseInt((res[0][key] % 100) / 10))
  132. $('#sls_num').counterUp({
  133. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  134. time: 500//计数动画总的持续时间。
  135. });
  136. }
  137. if ($('#slg_num').text() != parseInt(res[0][key] % 10)) {
  138. $('#slg_num').text(parseInt(res[0][key] % 10))
  139. $('#slg_num').counterUp({
  140. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  141. time: 500//计数动画总的持续时间。
  142. });
  143. }
  144. }
  145. else if (n == 3) {
  146. if ($('#dxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  147. $('#dxw_num').text(parseInt(res[0][key] % 100000 / 10000))
  148. $('#dxw_num').counterUp({
  149. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  150. time: 500//计数动画总的持续时间。
  151. });
  152. }
  153. if ($('#dxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  154. $('#dxq_num').text(parseInt(res[0][key] % 10000 / 1000))
  155. $('#dxq_num').counterUp({
  156. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  157. time: 500//计数动画总的持续时间。
  158. });
  159. }
  160. if ($('#dxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  161. $('#dxb_num').text(parseInt(res[0][key] % 1000 / 100))
  162. $('#dxb_num').counterUp({
  163. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  164. time: 500//计数动画总的持续时间。
  165. });
  166. }
  167. if ($('#dxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
  168. $('#dxs_num').text(parseInt((res[0][key] % 100) / 10))
  169. $('#dxs_num').counterUp({
  170. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  171. time: 500//计数动画总的持续时间。
  172. });
  173. }
  174. if ($('#dxg_num').text() != parseInt(res[0][key] % 10)) {
  175. $('#dxg_num').text(parseInt(res[0][key] % 10))
  176. $('#dxg_num').counterUp({
  177. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  178. time: 500//计数动画总的持续时间。
  179. });
  180. }
  181. } else if (n == 1) {
  182. if ($('#szw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  183. $('#szw_num').text(parseInt(res[0][key] % 100000 / 10000))
  184. $('#szw_num').counterUp({
  185. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  186. time: 500//计数动画总的持续时间。
  187. });
  188. }
  189. if ($('#szq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  190. $('#szq_num').text(parseInt(res[0][key] % 10000 / 1000))
  191. $('#szq_num').counterUp({
  192. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  193. time: 500//计数动画总的持续时间。
  194. });
  195. }
  196. if ($('#szb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  197. $('#szb_num').text(parseInt(res[0][key] % 1000 / 100))
  198. $('#szb_num').counterUp({
  199. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  200. time: 500//计数动画总的持续时间。
  201. });
  202. }
  203. if ($('#szs_num').text() != parseInt((res[0][key] % 100) / 10)) {
  204. $('#szs_num').text(parseInt((res[0][key] % 100) / 10))
  205. $('#szs_num').counterUp({
  206. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  207. time: 500//计数动画总的持续时间。
  208. });
  209. }
  210. if ($('#szg_num').text() != parseInt(res[0][key] % 10)) {
  211. $('#szg_num').text(parseInt(res[0][key] % 10))
  212. $('#szg_num').counterUp({
  213. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  214. time: 500//计数动画总的持续时间。
  215. });
  216. }
  217. } else if (n == 5) {
  218. if ($('#wxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  219. $('#wxw_num').text(parseInt(res[0][key] % 100000 / 10000))
  220. $('#wxw_num').counterUp({
  221. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  222. time: 500//计数动画总的持续时间。
  223. });
  224. }
  225. if ($('#wxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  226. $('#wxq_num').text(parseInt(res[0][key] % 10000 / 1000))
  227. $('#wxq_num').counterUp({
  228. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  229. time: 500//计数动画总的持续时间。
  230. });
  231. }
  232. if ($('#wxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  233. $('#wxb_num').text(parseInt(res[0][key] % 1000 / 100))
  234. $('#wxb_num').counterUp({
  235. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  236. time: 500//计数动画总的持续时间。
  237. });
  238. }
  239. if ($('#wxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
  240. $('#wxs_num').text(parseInt((res[0][key] % 100) / 10))
  241. $('#wxs_num').counterUp({
  242. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  243. time: 500//计数动画总的持续时间。
  244. });
  245. }
  246. if ($('#wxg_num').text() != parseInt(res[0][key] % 10)) {
  247. $('#wxg_num').text(parseInt(res[0][key] % 10))
  248. $('#wxg_num').counterUp({
  249. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  250. time: 500//计数动画总的持续时间。
  251. });
  252. }
  253. } else if (n == 2) {
  254. if ($('#xxw_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  255. $('#xxw_num').text(parseInt(res[0][key] % 100000 / 10000))
  256. $('#xxw_num').counterUp({
  257. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  258. time: 500//计数动画总的持续时间。
  259. });
  260. }
  261. if ($('#xxq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  262. $('#xxq_num').text(parseInt(res[0][key] % 10000 / 1000))
  263. $('#xxq_num').counterUp({
  264. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  265. time: 500//计数动画总的持续时间。
  266. });
  267. }
  268. if ($('#xxb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  269. $('#xxb_num').text(parseInt(res[0][key] % 1000 / 100))
  270. $('#xxb_num').counterUp({
  271. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  272. time: 500//计数动画总的持续时间。
  273. });
  274. }
  275. if ($('#xxs_num').text() != parseInt((res[0][key] % 100) / 10)) {
  276. $('#xxs_num').text(parseInt((res[0][key] % 100) / 10))
  277. $('#xxs_num').counterUp({
  278. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  279. time: 500//计数动画总的持续时间。
  280. });
  281. }
  282. if ($('#xxg_num').text() != parseInt(res[0][key] % 10)) {
  283. $('#xxg_num').text(parseInt(res[0][key] % 10))
  284. $('#xxg_num').counterUp({
  285. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  286. time: 500//计数动画总的持续时间。
  287. });
  288. }
  289. } else if (n == 4) {
  290. if ($('#zww_num').text() != parseInt(res[0][key] % 100000 / 10000)) {
  291. $('#zww_num').text(parseInt(res[0][key] % 100000 / 10000))
  292. $('#zww_num').counterUp({
  293. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  294. time: 500//计数动画总的持续时间。
  295. });
  296. }
  297. if ($('#zwq_num').text() != parseInt(res[0][key] % 10000 / 1000)) {
  298. $('#zwq_num').text(parseInt(res[0][key] % 10000 / 1000))
  299. $('#zwq_num').counterUp({
  300. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  301. time: 500//计数动画总的持续时间。
  302. });
  303. }
  304. if ($('#zwb_num').text() != parseInt(res[0][key] % 1000 / 100)) {
  305. $('#zwb_num').text(parseInt(res[0][key] % 1000 / 100))
  306. $('#zwb_num').counterUp({
  307. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  308. time: 500//计数动画总的持续时间。
  309. });
  310. }
  311. if ($('#zws_num').text() != parseInt((res[0][key] % 100) / 10)) {
  312. $('#zws_num').text(parseInt((res[0][key] % 100) / 10))
  313. $('#zws_num').counterUp({
  314. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  315. time: 500//计数动画总的持续时间。
  316. });
  317. }
  318. if ($('#zwg_num').text() != parseInt(res[0][key] % 10)) {
  319. $('#zwg_num').text(parseInt(res[0][key] % 10))
  320. $('#zwg_num').counterUp({
  321. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  322. time: 500//计数动画总的持续时间。
  323. });
  324. }
  325. }
  326. })
  327. },
  328. })
  329. new doAjax({
  330. url: huayi.config.callcenter_url + "/InfoNew/GetVisitCount",
  331. data: {},
  332. callBack: function (res) {
  333. let visitCount = [];
  334. let str = ''
  335. Object.keys(res[0]).forEach((key, n) => {
  336. if (key == 'DHCOUNT') {
  337. visitCount.push({
  338. name: '电话回访',
  339. value: res[0][key]
  340. })
  341. } else if (key == 'DXCOUNT') {
  342. visitCount.push({
  343. name: '短信回访',
  344. value: res[0][key]
  345. })
  346. } else {
  347. visitCount.unshift({
  348. name: '回访总数',
  349. value: res[0][key]
  350. })
  351. }
  352. })
  353. visitCount.forEach(function (v, n) {
  354. if (n == 0) {
  355. if (parseInt(v.value % 100000 / 10000) != $('#zsw_num').text()) {
  356. $('#zsw_num').text(parseInt(v.value % 100000 / 10000))
  357. $('#zsw_num').counterUp({
  358. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  359. time: 500//计数动画总的持续时间。
  360. });
  361. }
  362. if (parseInt(v.value % 10000 / 1000) != $('#zsq_num').text()) {
  363. $('#zsq_num').text(parseInt(v.value % 10000 / 1000))
  364. $('#zsq_num').counterUp({
  365. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  366. time: 500//计数动画总的持续时间。
  367. });
  368. }
  369. if (parseInt(v.value % 1000 / 100) != $('#zsb_num').text()) {
  370. $('#zsb_num').text(parseInt(v.value % 1000 / 100))
  371. $('#zsb_num').counterUp({
  372. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  373. time: 500//计数动画总的持续时间。
  374. });
  375. }
  376. if (parseInt((v.value % 100) / 10) != $('#zss_num').text()) {
  377. $('#zss_num').text(parseInt((v.value % 100) / 10))
  378. $('#zss_num').counterUp({
  379. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  380. time: 500//计数动画总的持续时间。
  381. });
  382. }
  383. if (parseInt(v.value % 10) != $('#zsg_num').text()) {
  384. $('#zsg_num').text(parseInt(v.value % 10))
  385. $('#zsg_num').counterUp({
  386. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  387. time: 500//计数动画总的持续时间。
  388. });
  389. }
  390. } else if (n == 1) {
  391. if (parseInt(v.value % 100000 / 10000) != $('#hfw_num').text()) {
  392. $('#hfw_num').text(parseInt(v.value % 100000 / 10000))
  393. $('#hfw_num').counterUp({
  394. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  395. time: 500//计数动画总的持续时间。
  396. });
  397. }
  398. if (parseInt(v.value % 10000 / 1000) != $('#hfq_num').text()) {
  399. $('#hfq_num').text(parseInt(v.value % 10000 / 1000))
  400. $('#hfq_num').counterUp({
  401. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  402. time: 500//计数动画总的持续时间。
  403. });
  404. }
  405. if (parseInt(v.value % 1000 / 100) != $('#hfb_num').text()) {
  406. $('#hfb_num').text(parseInt(v.value % 1000 / 100))
  407. $('#hfb_num').counterUp({
  408. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  409. time: 500//计数动画总的持续时间。
  410. });
  411. }
  412. if (parseInt((v.value % 100) / 10) != $('#hfs_num').text()) {
  413. $('#hfs_num').text(parseInt((v.value % 100) / 10))
  414. $('#hfs_num').counterUp({
  415. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  416. time: 500//计数动画总的持续时间。
  417. });
  418. }
  419. if (parseInt(v.value % 10) != $('#hfg_num').text()) {
  420. $('#hfg_num').text(parseInt(v.value % 10))
  421. $('#hfg_num').counterUp({
  422. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  423. time: 500//计数动画总的持续时间。
  424. });
  425. }
  426. } else if (n == 2) {
  427. if (parseInt(v.value % 100000 / 10000) != $('#dhw_num').text()) {
  428. $('#dhw_num').text(parseInt(v.value % 100000 / 10000))
  429. $('#dhw_num').counterUp({
  430. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  431. time: 500//计数动画总的持续时间。
  432. });
  433. }
  434. if (parseInt(v.value % 10000 / 1000) != $('#dhq_num').text()) {
  435. $('#dhq_num').text(parseInt(v.value % 10000 / 1000))
  436. $('#dhq_num').counterUp({
  437. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  438. time: 500//计数动画总的持续时间。
  439. });
  440. }
  441. if (parseInt(v.value % 1000 / 100) != $('#dhb_num').text()) {
  442. $('#dhb_num').text(parseInt(v.value % 1000 / 100))
  443. $('#dhb_num').counterUp({
  444. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  445. time: 500//计数动画总的持续时间。
  446. });
  447. }
  448. if (parseInt((v.value % 100) / 10) != $('#dhs_num').text()) {
  449. $('#dhs_num').text(parseInt((v.value % 100) / 10))
  450. $('#dhs_num').counterUp({
  451. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  452. time: 500//计数动画总的持续时间。
  453. });
  454. }
  455. if (parseInt(v.value % 10) != $('#dhg_num').text()) {
  456. $('#dhg_num').text(parseInt(v.value % 10))
  457. $('#dhg_num').counterUp({
  458. delay: 50,//每个数字动画的延迟时间,单位毫秒。
  459. time: 500//计数动画总的持续时间。
  460. });
  461. }
  462. }
  463. })
  464. }
  465. });
  466. }
  467. function getHotThings() {
  468. var nameData = [];
  469. var conNum = [];
  470. var maxNum = []
  471. var secData = [];
  472. new doAjax({
  473. url: huayi.config.callcenter_url + "/InfoNew/Majorevents",
  474. Type: 'get',
  475. data: {
  476. stime: '',
  477. etime: '',
  478. timetype:MajoreventsDataType
  479. },
  480. callBack: function (res) {
  481. res.forEach(function (v, n) {
  482. // if(v.name!='中毒'&&v.name!='地震'){ str.replace(/[0-9]+/g,"")
  483. nameData.push(v.name.replace(/[0-9]+/g,""));
  484. conNum.push(v.count)
  485. secData.push({
  486. level: v.name,
  487. landArea: v.count
  488. })
  489. // }
  490. })
  491. for (var i = 0; i < secData.length; i++) {
  492. maxNum.push(Math.max.apply(null, conNum) + 200);
  493. }
  494. hotThingsChart('hotThings', nameData, conNum, maxNum,-30)
  495. }
  496. });
  497. }
  498. function gettraffic() {
  499. $('.btn_time').click(function (e) {
  500. if (!e.isPropagationStopped()) {//确定stopPropagation是否被调用过
  501. if (e.target.tagName == 'SPAN') {
  502. if ($(e.target).attr('data-state') == '0') {
  503. $('.timeTraffic').css('display', 'none')
  504. $('.daySeat').css('display', 'inline-block')
  505. $('#traffic').css('display', 'block')
  506. $('#timeTraffic').css('display', 'none')
  507. $('.call_situation h2').text('话务数据统计')
  508. $(this).siblings(".act").children("label").attr("indexTitle","话务数据统计2")
  509. new doAjax({
  510. url: huayi.config.callcenter_url + "InfoNew/GetHWCount24ByNow",
  511. data: {},
  512. callBack: function (res) {
  513. trafficChart(res.data.hours, res.data.hwcount[0], res.data.jtcount[0])
  514. }
  515. });
  516. }
  517. }
  518. }
  519. e.stopPropagation();
  520. })
  521. }
  522. function getHotline() {
  523. let arr = [];
  524. let newArr = []
  525. new doAjax({
  526. url: huayi.config.callcenter_url + "/InfoNew/GetHotline",
  527. data: {
  528. timetype:hotlineDataType
  529. },
  530. callBack: function (res) {
  531. let str = '';
  532. res.data.forEach(function (v, n) {
  533. // arr.push(v.count)
  534. arr.push({
  535. name: v.value,
  536. count: v.count
  537. })
  538. })
  539. function compare(a, b) {
  540. return a.count - b.count; //如果a>b,返回值大于0,交换a b,升序排列
  541. }
  542. newArr = arr.sort(compare);
  543. newArr.reverse()
  544. console.log(newArr)
  545. res.data.forEach(function (val, num) {
  546. arr.forEach(function (v, n) {
  547. if (n === 0 && v.name === val.value) {
  548. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  549. } else if (n === 1 && v.name === val.value) {
  550. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  551. } else if (n === 2 && v.name === val.value) {
  552. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  553. } else if (n === 3 && v.name === val.value) {
  554. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  555. } else if (n === 4 && v.name === val.value) {
  556. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  557. } else if (n === 5 && v.name === val.value) {
  558. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  559. } else if (n === 6 && v.name === val.value) {
  560. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  561. } else if (n === 7 && v.name === val.value) {
  562. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  563. } else if (n === 8 && v.name === val.value) {
  564. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  565. } else if (n === 9 && v.name === val.value) {
  566. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  567. } else if (n === 10 && v.name === val.value) {
  568. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  569. } else if (n === 11 && v.name === val.value) {
  570. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  571. } else if (n === 12 && v.name === val.value) {
  572. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  573. } else if (n === 13 && v.name === val.value) {
  574. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  575. }else if (n === 14 && v.name === val.value) {
  576. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  577. }else if (n === 15 && v.name === val.value) {
  578. str += '<li onmouseover="getHotLineInfo(\'' + val.name + '\',\'' + val.bili + '\',\'' + n + '\')" style="background-image: url(./image/line/line' + n + '.png);"><div class="number">' + val.count + '</div><div class="hotCall">' + val.value + '</div></li>'
  579. }
  580. })
  581. })
  582. $('.hotline').html(str)
  583. }
  584. });
  585. }
  586. function getHotLineInfo(strName, bili, n) {
  587. $('.lineB').text(strName + ':' + bili);
  588. if (n == 8) {
  589. $('.lineB').css({
  590. 'display': 'block',
  591. 'top': '60px',
  592. 'left': '-24px'
  593. })
  594. } else if (n == 11) {
  595. $('.lineB').css({
  596. 'display': 'block',
  597. 'top': '-24px',
  598. 'left': '305px'
  599. })
  600. } else if (n == 4) {
  601. $('.lineB').css({
  602. 'display': 'block',
  603. 'top': '60px',
  604. 'left': '380px'
  605. })
  606. } else if (n == 10) {
  607. $('.lineB').css({
  608. 'display': 'block',
  609. 'top': '-24px',
  610. 'left': '380px'
  611. })
  612. } else if (n == 5) {
  613. $('.lineB').css({
  614. 'display': 'block',
  615. 'top': '144px',
  616. 'left': '60px'
  617. })
  618. } else if (n == 3) {
  619. $('.lineB').css({
  620. 'display': 'block',
  621. 'top': '57px',
  622. 'left': '306px'
  623. })
  624. } else if (n == 0) {
  625. $('.lineB').css({
  626. 'display': 'block',
  627. 'top': '57px',
  628. 'left': '146px'
  629. })
  630. } else if (n == 2) {
  631. $('.lineB').css({
  632. 'display': 'block',
  633. 'top': '60px',
  634. 'left': '60px'
  635. })
  636. } else if (n == 1) {
  637. $('.lineB').css({
  638. 'display': 'block',
  639. 'top': '57px',
  640. 'left': '226px'
  641. })
  642. } else if (n == 7) {
  643. $('.lineB').css({
  644. 'display': 'block',
  645. 'top': '144px',
  646. 'left': '225px'
  647. })
  648. } else if (n == 12) {
  649. $('.lineB').css({
  650. 'display': 'block',
  651. 'top': '-24px',
  652. 'left': '225px'
  653. })
  654. } else if (n == 6) {
  655. $('.lineB').css({
  656. 'display': 'block',
  657. 'top': '144px',
  658. 'left': '-24px'
  659. })
  660. } else if (n == 9) {
  661. $('.lineB').css({
  662. 'display': 'block',
  663. 'top': '144px',
  664. 'left': '140px'
  665. })
  666. } else if (n == 13) {
  667. $('.lineB').css({
  668. 'display': 'block',
  669. 'top': '-24px',
  670. 'left': '140px'
  671. })
  672. } else if (n == 15) {
  673. $('.lineB').css({
  674. 'display': 'block',
  675. 'top': '-24px',
  676. 'left': '-25px'
  677. })
  678. } else if (n == 14) {
  679. $('.lineB').css({
  680. 'display': 'block',
  681. 'top': '-24px',
  682. 'left': '60px'
  683. })
  684. }
  685. }
  686. function getKeyWord() {
  687. new doAjax({
  688. url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
  689. // url: "http://192.168.8.9:1042/InfoNew/GetKeyCountByNow",
  690. data: {
  691. timetype:keyCountDataType
  692. },
  693. callBack: function (res) {
  694. let str = '';
  695. let keyName;
  696. res.data.Date.forEach(function (v, n) {
  697. keyName = v.KeyName.substr(0, v.KeyName.length - 2)
  698. str += '<span onclick="getKeyClass(\'' + v.KeyId + '\',\'' + v.ClassCount + '\',\'' + v.KeyName + '\')" onmouseover="getKeyInfo(\'' + v.KeyId + '\',\'' + n + '\')">' +
  699. keyName + ':<label>' + v.Count + '</label></span>'
  700. })
  701. $('#keyword').html(str);
  702. }
  703. });
  704. }
  705. function getworkOrder() {
  706. let workOrderData = [];
  707. let workOrderName = []
  708. new doAjax({
  709. url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount",
  710. data: {
  711. timetype:typeCountDataType
  712. },
  713. callBack: function (res) {
  714. res.data.forEach(function (v, n) {
  715. workOrderData.push({
  716. name: v.type,
  717. value: v.count
  718. })
  719. workOrderName.push(v.type);
  720. })
  721. workOrderName.reverse();
  722. workOrderChart(workOrderData, workOrderName)
  723. }
  724. });
  725. }
  726. function hotThingsChart(dom, data, count, count1,rotate=0) {
  727. let hotThings = echarts.init(document.getElementById(dom));
  728. window.onresize = function () {
  729. hotThings.resize()
  730. }
  731. option = {
  732. textStyle: {
  733. color: "#c0c3cd",
  734. fontSize: 11
  735. },
  736. grid: {
  737. top: '25%',
  738. bottom: '30%'
  739. },
  740. xAxis: {
  741. nameTextStyle: {
  742. color: "#c0c3cd",
  743. padding: [0, 0, -10, 0],
  744. fontSize: 11
  745. },
  746. axisLabel: {
  747. color: "#c0c3cd",
  748. fontSize: 11,
  749. rotate: rotate,
  750. },
  751. axisTick: {
  752. lineStyle: {
  753. color: "#8398c4",
  754. width: 1
  755. },
  756. show: false
  757. },
  758. minorTick: {
  759. length: 8
  760. },
  761. splitLine: {
  762. show: false
  763. },
  764. axisLine: {
  765. lineStyle: {
  766. color: "#8398c4",
  767. width: 1,
  768. type: "solid"
  769. },
  770. show: true
  771. },
  772. data: data,
  773. type: "category"
  774. },
  775. yAxis: {
  776. nameTextStyle: {
  777. color: "#c0c3cd",
  778. padding: [0, 0, 10, -5],
  779. fontSize: 11
  780. },
  781. axisLabel: {
  782. color: "#c0c3cd",
  783. fontSize: 11
  784. },
  785. axisTick: {
  786. lineStyle: {
  787. color: "#8398c4",
  788. width: 1
  789. },
  790. show: true
  791. },
  792. splitLine: {
  793. show: true,
  794. lineStyle: {
  795. color: "#8398c4",
  796. type: "dashed"
  797. }
  798. },
  799. axisLine: {
  800. lineStyle: {
  801. color: "#8398c4",
  802. width: 1,
  803. type: "solid"
  804. },
  805. show: true,
  806. // "symbol":['none', 'arrow'],
  807. symbol: ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'],
  808. symbolOffset: 5,
  809. symbolSize: [35, 38],
  810. },
  811. name: "条"
  812. },
  813. series: [{
  814. data: count,
  815. type: "bar",
  816. barMaxWidth: "auto",
  817. barWidth: 15,
  818. itemStyle: {
  819. color: {
  820. x: 0,
  821. y: 0,
  822. x2: 0,
  823. y2: 1,
  824. type: "linear",
  825. global: false,
  826. colorStops: [{
  827. offset: 0,
  828. color: "#ff4519"
  829. }, {
  830. offset: 1,
  831. color: "#fff500"
  832. }]
  833. },
  834. barBorderRadius: [30, 30, 0, 0]
  835. },
  836. label: {
  837. show: true,
  838. position: "top",
  839. distance: 10,
  840. color: "#fff"
  841. },
  842. emphasis: {
  843. itemStyle: {
  844. color: new echarts.graphic.LinearGradient(
  845. 0, 0, 0, 1,
  846. [{
  847. offset: 0,
  848. color: '#fde301'
  849. },
  850. {
  851. offset: 1,
  852. color: '#0a2f3e'
  853. }
  854. ]
  855. )
  856. }
  857. },
  858. }, {
  859. data: [1, 1, 1, 1, 1, 1],
  860. type: "pictorialBar",
  861. barMaxWidth: "20",
  862. symbol: "none",
  863. },
  864. {
  865. // "data": [1500, 1148, 756, 1395, 1750, 1148],
  866. type: "pictorialBar",
  867. barMaxWidth: "20",
  868. symbolPosition: "end",
  869. symbol: "none",
  870. symbolOffset: [0, "-50%"],
  871. symbolSize: [30, 12],
  872. zlevel: 1
  873. },
  874. {
  875. data: count1,
  876. type: "bar",
  877. barMaxWidth: "auto",
  878. barWidth: 15,
  879. barGap: "-100%",
  880. itemStyle: {
  881. color: '#234caf'
  882. },
  883. zlevel: -1
  884. }, {
  885. data: [1, 1, 1, 1, 1, 1],
  886. type: "pictorialBar",
  887. barMaxWidth: "20",
  888. symbol: "none",
  889. symbolOffset: [0, "50%"],
  890. symbolSize: [30, 15],
  891. zlevel: -2
  892. }, {
  893. data: count1,
  894. type: "pictorialBar",
  895. barMaxWidth: "20",
  896. symbolPosition: "end",
  897. symbol: "circle",
  898. symbolOffset: [0, "-60%"],
  899. symbolSize: [15, 12],
  900. itemStyle: {
  901. color: '#234caf'
  902. },
  903. zlevel: -1
  904. },
  905. ]
  906. }
  907. hotThings.setOption(option);
  908. }
  909. function getKeyInfo(keyid, n) {
  910. $('.keyInfo').html('');
  911. new doAjax({
  912. url: huayi.config.callcenter_url + "/InfoNew/GetKeyArea",
  913. data: {
  914. pid: keyid,
  915. timetype:keyCountDataType
  916. },
  917. callBack: function (res) {
  918. let str = ''
  919. res.forEach(function (v, n) {
  920. if (n > 0) {
  921. str += '<li><label>' + v.area + '</label><span>' + v.count + '</span></li>'
  922. }
  923. })
  924. $('.keyInfo').html(str);
  925. }
  926. });
  927. if (n == 0) {
  928. $('.keyWrap').css({
  929. 'display': 'block',
  930. 'top': '95px',
  931. 'left': '-80px'
  932. })
  933. $('.bar').css('margin', '0 auto')
  934. } else if (n == 1) {
  935. $('.keyWrap').css({
  936. 'display': 'block',
  937. 'top': '95px',
  938. 'left': '100px'
  939. })
  940. $('.bar').css('margin', '0 auto')
  941. } else if (n == 2) {
  942. $('.keyWrap').css({
  943. 'display': 'block',
  944. 'top': '95px',
  945. 'left': '185px'
  946. })
  947. $('.bar').css('margin', '0 0 0 250px')
  948. } else if (n == 5) {
  949. $('.keyWrap').css({
  950. 'display': 'block',
  951. 'top': '130px',
  952. 'left': '185px'
  953. })
  954. $('.bar').css('margin', '0 0 0 250px')
  955. } else if (n == 4) {
  956. $('.keyWrap').css({
  957. 'display': 'block',
  958. 'top': '130px',
  959. 'left': '100px'
  960. })
  961. $('.bar').css('margin', '0 auto')
  962. } else if (n == 3) {
  963. $('.keyWrap').css({
  964. 'display': 'block',
  965. 'top': '130px',
  966. 'left': '-80px'
  967. })
  968. $('.bar').css('margin', '0 auto')
  969. } else if (n == 6) {
  970. $('.keyWrap').css({
  971. 'display': 'block',
  972. 'top': '170px',
  973. 'left': '-80px'
  974. })
  975. $('.bar').css('margin', '0 auto')
  976. } else if (n == 7) {
  977. $('.keyWrap').css({
  978. 'display': 'block',
  979. 'top': '170px',
  980. 'left': '100px'
  981. })
  982. $('.bar').css('margin', '0,auto')
  983. } else if (n == 10) {
  984. $('.keyWrap').css({
  985. 'display': 'block',
  986. 'top': '206px',
  987. 'left': '100px'
  988. })
  989. $('.bar').css('margin', '0 auto')
  990. } else if (n == 12) {
  991. $('.keyWrap').css({
  992. 'display': 'block',
  993. 'top': '243px',
  994. 'left': '-80px'
  995. })
  996. $('.bar').css('margin', '0 auto')
  997. } else if (n == 15) {
  998. $('.keyWrap').css({
  999. 'display': 'block',
  1000. 'top': '278px',
  1001. 'left': '-110px'
  1002. })
  1003. $('.bar').css('margin', '0 auto')
  1004. } else if (n == 8) {
  1005. $('.keyWrap').css({
  1006. 'display': 'block',
  1007. 'top': '170px',
  1008. 'left': '185px'
  1009. })
  1010. $('.bar').css('margin', '0 0 0 250px')
  1011. } else if (n == 9) {
  1012. $('.keyWrap').css({
  1013. 'display': 'block',
  1014. 'top': '206px',
  1015. 'left': '-80px'
  1016. })
  1017. $('.bar').css('margin', '0 auto')
  1018. } else if (n == 14) {
  1019. $('.keyWrap').css({
  1020. 'display': 'block',
  1021. 'top': '243px',
  1022. 'left': '185px'
  1023. })
  1024. $('.bar').css('margin', '0 0 0 250px')
  1025. } else if (n == 13) {
  1026. $('.keyWrap').css({
  1027. 'display': 'block',
  1028. 'top': '243px',
  1029. 'left': '100px'
  1030. })
  1031. $('.bar').css('margin', '0 auto')
  1032. } else if (n == 11) {
  1033. $('.keyWrap').css({
  1034. 'display': 'block',
  1035. 'top': '206px',
  1036. 'left': '185px'
  1037. })
  1038. $('.bar').css('margin', '0 0 0 250px')
  1039. } else if (n == 16) {
  1040. $('.keyWrap').css({
  1041. 'display': 'block',
  1042. 'top': '279px',
  1043. 'left': '100px'
  1044. })
  1045. $('.bar').css('margin', '0 auto')
  1046. }
  1047. }
  1048. function hotlineChart(datas) {
  1049. console.log(datas)
  1050. let hotline = echarts.init(document.getElementById('hotline'));
  1051. let colors = ['#ffe000', '#ff8a00', '#3cff9c', '#03d844', '#ff69c8', '#d668ff', '#43b2ff', '#05c9d1'];
  1052. let legendData = []
  1053. for (var j = 0; j < datas.length; j++) {
  1054. var data = {
  1055. name: datas[j].name,
  1056. icon: 'circle',
  1057. textStyle: {
  1058. fontSize: 18,
  1059. color: colors[j]
  1060. }
  1061. }
  1062. legendData.push(data)
  1063. }
  1064. let objData = array2obj(datas, 'name')
  1065. option = {
  1066. color: colors,
  1067. tooltip: {
  1068. trigger: 'item',
  1069. textStyle: {
  1070. color: '#fff',
  1071. fontSize: '18',
  1072. fontWeight: '500'
  1073. },
  1074. // itemStyle: {
  1075. // color: '#ffe400'
  1076. // },
  1077. position: 'top',
  1078. backgroundColor: 'rgba(250,250,250,0)',
  1079. transitionDuration: 0.4,
  1080. formatter: function (params) {
  1081. console.log(params.data)
  1082. console.log(params.data.name)
  1083. if (params.data.name2.length > 9) {
  1084. return '<div class="frame" style="background: url(image/hotline_pie.png) no-repeat;width:230px;height:100px;background-size: 100% 100%;text-align:center;top:20px;"><div class="frameC">' +
  1085. params.data.name2.substr(0, 10) + '<br>' + params.data.name.substr(10, params.data.name2
  1086. .length) + ':' + params.data.percent + '</div></div>';
  1087. } else {
  1088. return '<div class="frame" style="background: url(image/hotline_pie.png) no-repeat;width:220px;height:100px;background-size: 100% 100%;text-align:center;top:20px;"><div class="frameC">' +
  1089. params.data.name2 + '<br>' + params.data.percent + '</div></div>';
  1090. }
  1091. }
  1092. },
  1093. series: [{
  1094. name: '访问来源',
  1095. type: 'pie',
  1096. radius: '75%',
  1097. center: ['50%', '50%'],
  1098. label: {
  1099. show: true,
  1100. position: 'outside',
  1101. color: '#ddd',
  1102. fontSize: 16,
  1103. formatter: function (params) {
  1104. // console.log(params)
  1105. return params.name + ':' + params.value
  1106. },
  1107. padding: [0, -70, -20, -67]
  1108. },
  1109. labelLine: {
  1110. length: 13,
  1111. length2: 65,
  1112. show: true
  1113. },
  1114. data: datas,
  1115. // roseType: 'area'
  1116. // animationType: 'expansion',
  1117. // animationEasing: 'elasticOut',
  1118. // animationDelay: function(idx) {
  1119. // return 200
  1120. // }
  1121. }]
  1122. }
  1123. function array2obj(array, key) {
  1124. var resObj = {}
  1125. for (var i = 0; i < array.length; i++) {
  1126. resObj[array[i][key]] = array[i]
  1127. }
  1128. return resObj
  1129. }
  1130. hotline.setOption(option)
  1131. }
  1132. function trafficChart(hours, monthCount, dayCount) {
  1133. let traffic = echarts.init(document.getElementById('traffic'));
  1134. option = {
  1135. tooltip: {
  1136. trigger: 'axis',
  1137. axisPointer: {
  1138. show: true,
  1139. type: 'line',
  1140. lineStyle: {
  1141. type: 'dashed',
  1142. width: 2,
  1143. color: '#fff'
  1144. }
  1145. },
  1146. textStyle: {
  1147. color: '#fff',
  1148. fontSize: 15,
  1149. fontWeight: '600',
  1150. },
  1151. // position: ['75%', '55%'],
  1152. backgroundColor: 'rgba(250,250,250,0)',
  1153. formatter: function (params) {
  1154. let str = '<div style="background-image: url(image/key_frame.png);width:128px;height:90px;line-height:25px;background-size: 100% 100%;padding:7px 8px;">'
  1155. let jtcount = params[1].value / params[0].value;
  1156. if (isNaN(jtcount)) {
  1157. jtcount = 0;
  1158. str +=
  1159. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">接通率:</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1160. ((jtcount) * 100).toFixed(0) + '%</span></div>'
  1161. } else {
  1162. str +=
  1163. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">接通率:</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1164. ((jtcount) * 100).toFixed(0) + '%</span></div>'
  1165. }
  1166. params.forEach(function (v, n) {
  1167. // if(v.seriesName!='上部1'){
  1168. str +=
  1169. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1170. v.seriesName +
  1171. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1172. v.value + '</span></div>'
  1173. // }
  1174. })
  1175. return str;
  1176. }
  1177. },
  1178. grid: {
  1179. top: '18%',
  1180. bottom: '12%'
  1181. },
  1182. xAxis: [{
  1183. type: "category",
  1184. boundaryGap: false,
  1185. scale: true,
  1186. axisLabel: {
  1187. formatter: '{value}',
  1188. fontSize: 13,
  1189. margin: 10,
  1190. textStyle: {
  1191. color: "#f4f4f8"
  1192. }
  1193. },
  1194. axisLine: {
  1195. show: true,
  1196. lineStyle: {
  1197. color: "#525fa6"
  1198. }
  1199. },
  1200. splitLine: {
  1201. show: false,
  1202. lineStyle: {
  1203. color: "#243753"
  1204. }
  1205. },
  1206. axisTick: {
  1207. show: false
  1208. },
  1209. data: hours
  1210. }],
  1211. yAxis: [{
  1212. boundaryGap: false,
  1213. type: "value",
  1214. // scale:true,
  1215. axisLabel: {
  1216. textStyle: {
  1217. color: "#f4f4f8"
  1218. }
  1219. },
  1220. nameTextStyle: {
  1221. color: "#fff",
  1222. fontSize: 12,
  1223. lineHeight: 40
  1224. },
  1225. splitLine: {
  1226. show: true,
  1227. lineStyle: {
  1228. color: "#516cb8",
  1229. type: "dashed"
  1230. }
  1231. },
  1232. axisLine: {
  1233. lineStyle: {
  1234. color: "#8393c8",
  1235. width: 1,
  1236. type: "solid"
  1237. },
  1238. show: true,
  1239. // "symbol":['none', 'arrow'],
  1240. symbol: ['none',
  1241. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1242. ],
  1243. symbolOffset: 5,
  1244. symbolSize: [35, 38],
  1245. },
  1246. name: "条"
  1247. }],
  1248. series: [{
  1249. name: "话务量",
  1250. type: "line",
  1251. smooth: true,
  1252. showSymbol: false,
  1253. symbol: 'circle',
  1254. symbolSize: 4,
  1255. zlevel: 3,
  1256. itemStyle: {
  1257. color: '#06eff8'
  1258. },
  1259. lineStyle: {
  1260. normal: {
  1261. width: 2,
  1262. color: "#06eff8",
  1263. }
  1264. },
  1265. // label: {
  1266. // show: true,
  1267. // position: 'top',
  1268. // color: '#fff',
  1269. // fontSize: 14,
  1270. // fontWeight: '600',
  1271. // formatter: function (params) {
  1272. // return params.seriesName + ':' + params.value
  1273. // }
  1274. // },
  1275. areaStyle: {
  1276. normal: {
  1277. color: new echarts.graphic.LinearGradient(
  1278. 0,
  1279. 0,
  1280. 0,
  1281. 1,
  1282. [{
  1283. offset: 0,
  1284. color: "#35b1bb"
  1285. },
  1286. {
  1287. offset: 0.8,
  1288. color: "#073492"
  1289. }
  1290. ],
  1291. false
  1292. ),
  1293. }
  1294. },
  1295. emphasis: {
  1296. itemStyle: {
  1297. color: '#fff',
  1298. shadowBlur: 10,
  1299. shadowOffsetX: 1,
  1300. shadowOffsetY: 1,
  1301. shadowColor: 'rgb(250,250, 250)'
  1302. }
  1303. },
  1304. data: monthCount
  1305. }, {
  1306. name: "接通量",
  1307. type: "line",
  1308. smooth: true,
  1309. showSymbol: false,
  1310. symbol: 'circle',
  1311. symbolSize: 4,
  1312. zlevel: 3,
  1313. itemStyle: {
  1314. color: '#38a4fa'
  1315. },
  1316. // label: {
  1317. // show: true,
  1318. // position: 'top',
  1319. // color: '#fff',
  1320. // fontSize: 14,
  1321. // fontWeight: '600',
  1322. // formatter: function (params) {
  1323. // return params.seriesName + ':' + params.value
  1324. // }
  1325. // },
  1326. lineStyle: {
  1327. normal: {
  1328. width: 2,
  1329. color: "#38a4fa",
  1330. }
  1331. },
  1332. areaStyle: {
  1333. normal: {
  1334. color: new echarts.graphic.LinearGradient(
  1335. 0,
  1336. 0,
  1337. 0,
  1338. 1,
  1339. [{
  1340. offset: 0,
  1341. color: "#1682c4"
  1342. },
  1343. {
  1344. offset: 0.8,
  1345. color: "#1276aa"
  1346. }
  1347. ],
  1348. false
  1349. ),
  1350. }
  1351. },
  1352. emphasis: {
  1353. itemStyle: {
  1354. color: '#fff',
  1355. shadowBlur: 10,
  1356. shadowOffsetX: 1,
  1357. shadowOffsetY: 1,
  1358. shadowColor: 'rgb(250,250, 250)'
  1359. }
  1360. },
  1361. data: dayCount
  1362. }]
  1363. };
  1364. traffic.setOption(option);
  1365. }
  1366. function workOrderChart(workOrderData, workOrderName) {
  1367. let workOrder = echarts.init(document.getElementById('workOrder'));
  1368. option = {
  1369. color: ['#00f0ff', '#ff5a00', '#ffe000', '#fff59e', '#00ff78', '#ff00ff', '#ff97ff'],
  1370. tooltip: {
  1371. show: false
  1372. },
  1373. legend: {
  1374. icon: "rect",
  1375. orient: 'horizontal',
  1376. width: 150,
  1377. height: 15,
  1378. itemWidth: 15,
  1379. itemGap: 20,
  1380. data: workOrderName,
  1381. right: 70,
  1382. top: 50,
  1383. align: 'left',
  1384. textStyle: {
  1385. color: "#fff"
  1386. },
  1387. // itemGap: 10
  1388. },
  1389. toolbox: {
  1390. show: false
  1391. },
  1392. polar: {
  1393. radius: '65%'
  1394. },
  1395. angleAxis: {
  1396. interval: 5,
  1397. type: 'category',
  1398. data: [],
  1399. z: 20,
  1400. axisLine: {
  1401. show: true,
  1402. lineStyle: {
  1403. color: "#0556b8",
  1404. width: 5,
  1405. type: "solid"
  1406. },
  1407. },
  1408. axisLabel: {
  1409. interval: 0,
  1410. show: true,
  1411. color: "#0556b8",
  1412. margin: 8,
  1413. fontSize: 16
  1414. },
  1415. },
  1416. radiusAxis: {
  1417. min: 20,
  1418. max: 100,
  1419. interval: 20,
  1420. axisLine: {
  1421. show: false,
  1422. lineStyle: {
  1423. color: "#0B3E5E",
  1424. width: 1,
  1425. type: "solid"
  1426. },
  1427. },
  1428. axisLabel: {
  1429. formatter: '{value} %',
  1430. show: false,
  1431. padding: [0, 0, 20, 0],
  1432. color: "#0B3E5E",
  1433. fontSize: 16
  1434. },
  1435. splitLine: {
  1436. lineStyle: {
  1437. color: "#0556b8",
  1438. width: 2,
  1439. type: "solid"
  1440. }
  1441. }
  1442. },
  1443. calculable: true,
  1444. series: [{
  1445. type: 'pie',
  1446. radius: ["0", "5%"],
  1447. hoverAnimation: false,
  1448. labelLine: {
  1449. normal: {
  1450. show: false,
  1451. length: 30,
  1452. length2: 55
  1453. },
  1454. emphasis: {
  1455. show: false
  1456. }
  1457. },
  1458. data: [{
  1459. name: '',
  1460. value: 0,
  1461. itemStyle: {
  1462. normal: {
  1463. color: "#0B4A6B"
  1464. }
  1465. }
  1466. }]
  1467. }, {
  1468. stack: 'a',
  1469. type: 'pie',
  1470. radius: '55%',
  1471. roseType: 'area',
  1472. zlevel: 10,
  1473. itemStyle: {
  1474. normal: {
  1475. label: {
  1476. show: true,
  1477. position: 'outside',
  1478. color: '#ddd',
  1479. fontSize: 15,
  1480. formatter: function (params) {
  1481. var percent = 0;
  1482. var total = 0;
  1483. for (var i = 0; i < workOrderData.length; i++) {
  1484. total += workOrderData[i].value;
  1485. }
  1486. percent = ((params.value / total) * 100).toFixed(2);
  1487. if (params.name !== '') {
  1488. return params.name + ':' + percent + '%';
  1489. } else {
  1490. return '';
  1491. }
  1492. },
  1493. },
  1494. labelLine: {
  1495. // smooth:true,
  1496. length: 15,
  1497. length2: 25,
  1498. show: true,
  1499. color: '#00ffff'
  1500. }
  1501. }
  1502. },
  1503. data: workOrderData
  1504. }]
  1505. }
  1506. workOrder.setOption(option)
  1507. }
  1508. function timeTable() {
  1509. //绩效和平均时长来回切换
  1510. $('.btn_rank').unbind("click").click(function (e) {
  1511. if (e.target.tagName == 'SPAN') {
  1512. if ($(e.target).attr('data-state') == '0') {
  1513. $('.topRank_List .maquee ul').each(function (index, dom) {
  1514. //将每个 的所有子级都复制一遍
  1515. var rows = $(dom).children().clone();
  1516. //再将新的到的加入原来的
  1517. $(dom).append(rows);
  1518. });
  1519. $('.topRec_List').css('display', 'none')
  1520. $('.topRank_List').css('display', 'block')
  1521. $('.rank').css('display', 'none')
  1522. $('.timeLength').css('display', 'inline-block')
  1523. $('.responseLength').css('display', 'none')
  1524. $('.test_rank h2').text('绩效考核排名')
  1525. timeState = 1;
  1526. getRankSwitch()
  1527. e.stopPropagation()
  1528. } else if ($(e.target).attr('data-state') == '1') {
  1529. timeState = 2;
  1530. $('.test_rank h2').text('平均响应时长')
  1531. $('.topRec_List .qh').text('平均响应时长')
  1532. $('.topRec_List').css('display', 'block')
  1533. $('.topRank_List').css('display', 'none')
  1534. $('.responseLength').css('display', 'inline-block')
  1535. $('.rank').css('display', 'none')
  1536. $('.timeLength').css('display', 'none')
  1537. getTimeSwitch(1)
  1538. e.stopPropagation()
  1539. } else {
  1540. //数据获取
  1541. timeState = 0;
  1542. $('.test_rank h2').text('平均办理时长')
  1543. $('.topRec_List .qh').text('平均办理时长')
  1544. $('.topRec_List').css('display', 'block')
  1545. $('.topRank_List').css('display', 'none')
  1546. $('.rank').css('display', 'inline-block')
  1547. $('.timeLength').css('display', 'none')
  1548. $('.responseLength').css('display', 'none')
  1549. getTimeSwitch(0)
  1550. e.stopPropagation()
  1551. }
  1552. }
  1553. e.stopPropagation()
  1554. })
  1555. getRankSwitch()
  1556. // getTimeSwitch(0)
  1557. function getTimeSwitch(type) {
  1558. //表格滚动
  1559. $('.topRec_List .maquee ul').each(function (index, dom) {
  1560. //将每个 的所有子级都复制一遍
  1561. var rows = $(dom).children().clone();
  1562. //再将新的到的加入原来的
  1563. $(dom).append(rows);
  1564. });
  1565. new doAjax({
  1566. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
  1567. data: {
  1568. type: type
  1569. },
  1570. callBack: function (res) {
  1571. // res.reverse();
  1572. let testStr = ''
  1573. let num;
  1574. res.forEach(function (v, n) {
  1575. num = 1 + n
  1576. if (n == 0) {
  1577. testStr += '<li><div><img src="./image/No1.png" alt=""></div><div>' + v.deptname +
  1578. '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
  1579. } else if (n == 1) {
  1580. testStr += '<li><div><img src="./image/No2.png" alt=""></div><div>' + v.deptname +
  1581. '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
  1582. } else if (n == 2) {
  1583. testStr += '<li><div><img src="./image/No3.png" alt=""></div><div>' + v.deptname +
  1584. '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v.timeday + 'h</div></li>'
  1585. } else {
  1586. testStr += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v.maxtime + '</div><div>' + v.mintime + '</div><div>' + v
  1587. .timeday + 'h</div></li>'
  1588. }
  1589. })
  1590. $('.test_rank .topRec_List ul').html(testStr);
  1591. }
  1592. });
  1593. }
  1594. function getRankSwitch() {
  1595. new doAjax({
  1596. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDeptAchievements",
  1597. data: {},
  1598. callBack: function (data) {
  1599. var max;
  1600. for (var i = 0; i < data.length; i++) {
  1601. for (var j = i; j < data.length; j++) {
  1602. if (data[i].total < data[j].total) {
  1603. max = data[j];
  1604. data[j] = data[i];
  1605. data[i] = max;
  1606. }
  1607. }
  1608. }
  1609. let rankStr = ''
  1610. let num;
  1611. data.forEach(function (v, n) {
  1612. num = 1 + n
  1613. if (n == 0) {
  1614. rankStr += '<li><div><img src="./image/No1.png" alt=""></div><div>' + v.deptname +
  1615. '</div><div>' + v.total + '</div></li>'
  1616. } else if (n == 1) {
  1617. rankStr += '<li><div><img src="./image/No2.png" alt=""></div><div>' + v.deptname +
  1618. '</div><div>' + v.total + '</div></li>'
  1619. } else if (n == 2) {
  1620. rankStr += '<li><div><img src="./image/No3.png" alt=""></div><div>' + v.deptname +
  1621. '</div><div>' + v.total + '</div></li>'
  1622. } else {
  1623. rankStr += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v
  1624. .total + '</div></li>'
  1625. }
  1626. })
  1627. $('.test_rank .topRank_List ul').html(rankStr);
  1628. }
  1629. });
  1630. }
  1631. }
  1632. //时间
  1633. function getNowFormatDate() {
  1634. var date = new Date();
  1635. var year = date.getFullYear();
  1636. var month = date.getMonth() + 1;
  1637. var strDate = date.getDate();
  1638. var Hour = date.getHours(); // 获取当前小时数(0-23)
  1639. var Minute = date.getMinutes(); // 获取当前分钟数(0-59)
  1640. var Second = date.getSeconds(); // 获取当前秒数(0-59)
  1641. var show_day = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
  1642. var day = date.getDay();
  1643. if (Hour < 10) {
  1644. Hour = "0" + Hour;
  1645. }
  1646. if (Minute < 10) {
  1647. Minute = "0" + Minute;
  1648. }
  1649. if (Second < 10) {
  1650. Second = "0" + Second;
  1651. }
  1652. if (month >= 1 && month <= 9) {
  1653. month = "0" + month;
  1654. }
  1655. if (strDate >= 0 && strDate <= 9) {
  1656. strDate = "0" + strDate;
  1657. }
  1658. var HMS = Hour + ':' + Minute + ':' + Second;
  1659. var temp_time = year + '-' + month + '-' + strDate + ' ' + HMS;
  1660. $('.dataTime').text(temp_time);
  1661. $('.secondLevel_map .time').text(year + '-' + month + '-' + strDate)
  1662. setInterval(getNowFormatDate, 1000);
  1663. }
  1664. function getTimes(dom) {
  1665. function p(s) {
  1666. return s < 10 ? '0' + s : s;
  1667. }
  1668. var currentYear = new Date().getFullYear();
  1669. var currentMonth = new Date().getMonth() + 1;
  1670. var currentDate = new Date().getDate();
  1671. var prevCurrentYear = 0;
  1672. var prevCurrentMonth = 0;
  1673. if (currentMonth == 1) {
  1674. prevCurrentYear = currentYear - 1;
  1675. prevCurrentMonth = 12;
  1676. } else {
  1677. prevCurrentYear = currentYear;
  1678. prevCurrentMonth = currentMonth - 1;
  1679. }
  1680. let hh = new Date().getHours()
  1681. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  1682. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  1683. var data = currentYear + "-" + p(currentMonth) + "-" + '01';
  1684. var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate);
  1685. $(dom).text(data + " ~ " + current)
  1686. }
  1687. function getNowTime(dom) {
  1688. function p(s) {
  1689. return s < 10 ? '0' + s : s;
  1690. }
  1691. var currentYear = new Date().getFullYear();
  1692. var currentMonth = new Date().getMonth() + 1;
  1693. var currentDate = new Date().getDate();
  1694. var prevCurrentYear = 0;
  1695. var prevCurrentMonth = 0;
  1696. if (currentMonth == 1) {
  1697. prevCurrentYear = currentYear - 1;
  1698. prevCurrentMonth = 12;
  1699. } else {
  1700. prevCurrentYear = currentYear;
  1701. prevCurrentMonth = currentMonth - 1;
  1702. }
  1703. let hh = new Date().getHours()
  1704. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  1705. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  1706. var data = currentYear + "-" + p(currentMonth) + "-" + '01' + ' ' + '00' + ':' + '00' + ':' + '00';
  1707. var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate) + ' ' + hh + ':' + mf + ':' + ss;
  1708. $(dom).val(data + " ~ " + current)
  1709. $('#keyDate').val(current);
  1710. }
  1711. // getNowTime('.time')
  1712. //二级页面点击
  1713. //二级办理时长统计
  1714. $('.test_rank .count-share').click(function (e) {
  1715. $('.bulletFrame').show();
  1716. if ($('.bulletFrame').css('display') == 'block') {
  1717. $('.body').css('opacity', '0.4')
  1718. }
  1719. getNowTime('#rankDate')
  1720. laydate.render({
  1721. elem: '#rankDate',
  1722. range: '~',
  1723. type: 'datetime',
  1724. done: function (value) {
  1725. testSecTable('#orderlist2', 0, 8, value);
  1726. testSecTable('#orderlist4', 1, 0, value);
  1727. testSecTable('#orderlist5', 1, 1, value);
  1728. testSecTable('#orderlist6', 2, 8, value);
  1729. }
  1730. });
  1731. if (timeState == 0) {
  1732. $('#rankDate').hide()
  1733. $('.timeSta_wrap').show();
  1734. $('.timeSta_wrap').siblings().hide()
  1735. timeSecTable('#timeSecList', 0);
  1736. } else if (timeState == 1) {
  1737. $('#rankDate').show()
  1738. $('.rank_wrap').show();
  1739. $('.rank_wrap').siblings().hide()
  1740. testSecTable('#orderlist2', 0, 8, $('#rankDate').val());
  1741. testSecTable('#orderlist4', 1, 0, $('#rankDate').val());
  1742. testSecTable('#orderlist5', 1, 1, $('#rankDate').val());
  1743. testSecTable('#orderlist6', 2, 8, $('#rankDate').val());
  1744. } else {
  1745. $('#rankDate').hide()
  1746. $('.timeSta1_wrap').show();
  1747. $('.timeSta1_wrap').siblings().hide()
  1748. timeSecTable('#timeSecList1', 1);
  1749. }
  1750. e.stopPropagation()
  1751. })
  1752. $('.accept_statistics ul').click(function (e) {
  1753. $('.bulletFrame').show();
  1754. $('.hotline_wrap').show();
  1755. $('.hotline_wrap').siblings().hide()
  1756. if ($('.bulletFrame').css('display') == 'block') {
  1757. $('.body').css('opacity', '0.4')
  1758. }
  1759. getNowTime('#date')
  1760. initHoneline($('#date').val())
  1761. laydate.render({
  1762. elem: '#date',
  1763. range: '~',
  1764. type: 'datetime',
  1765. done: function (value) {
  1766. initHoneline(value)
  1767. }
  1768. });
  1769. function initHoneline(value) {
  1770. var secData = [];
  1771. new doAjax({
  1772. url: huayi.config.callcenter_url + '/InfoNew/GetHotline',
  1773. Type: 'get',
  1774. data: {
  1775. stime: value && value.split(' ~ ')[0],
  1776. etime: value && value.split(' ~ ')[1],
  1777. timetype:hotlineDataType
  1778. },
  1779. callBack: function (res) {
  1780. res.data.forEach(function (v, n) {
  1781. var obj = {}
  1782. obj.level = v.value
  1783. obj.landArea = v.count
  1784. console.log(obj)
  1785. secData.push(obj)
  1786. })
  1787. console.log(secData)
  1788. getHonelineChart2(secData, 'hotline2')
  1789. }
  1790. });
  1791. }
  1792. e.stopPropagation()
  1793. })
  1794. //重大事件
  1795. $('.accept_channel #hotThings').click(function (e) {
  1796. $('.bulletFrame').show();
  1797. $('.events_wrap').show();
  1798. $('.events_wrap').siblings().hide()
  1799. if ($('.bulletFrame').css('display') == 'block') {
  1800. $('.body').css('opacity', '0.4')
  1801. }
  1802. getNowTime('#date2')
  1803. laydate.render({
  1804. elem: '#date2',
  1805. range: '~',
  1806. type: 'datetime',
  1807. done: function (value) {
  1808. new doAjax({
  1809. url: huayi.config.callcenter_url + "/InfoNew/Majorevents",
  1810. Type: 'get',
  1811. data: {
  1812. stime: value && value.split(' ~ ')[0],
  1813. etime: value && value.split(' ~ ')[1],
  1814. timetype:MajoreventsDataType
  1815. },
  1816. callBack: function (res) {
  1817. channelData = [];
  1818. res.data.forEach(function (v, n) {
  1819. channelData.push({
  1820. level: v.TypeName,
  1821. landArea: v.Count
  1822. })
  1823. // }
  1824. })
  1825. getHonelineChart2(channelData, 'channel')
  1826. }
  1827. });
  1828. }
  1829. });
  1830. new doAjax({
  1831. url: huayi.config.callcenter_url + "/InfoNew/Majorevents",
  1832. Type: 'get',
  1833. data: {
  1834. stime: $('#date2').val() && $('#date2').val().split(' ~ ')[0],
  1835. etime: $('#date2').val() && $('#date2').val().split(' ~ ')[1]
  1836. },
  1837. callBack: function (res) {
  1838. let eventsData = []
  1839. res.forEach(function (v, n) {
  1840. eventsData.push({
  1841. level: v.name.replace(/[0-9]+/g,""),
  1842. key:v.F_Key,
  1843. landArea: v.count
  1844. })
  1845. })
  1846. getHonelineChart2(eventsData, 'events')
  1847. }
  1848. });
  1849. e.stopPropagation()
  1850. })
  1851. //受理工单类型
  1852. $('.time_statistics #workOrder').click(function (e) {
  1853. $('.bulletFrame').show();
  1854. $('.acceptanceType_wrap').show();
  1855. $('.acceptanceType_wrap').siblings().hide()
  1856. if ($('.bulletFrame').css('display') == 'block') {
  1857. $('.body').css('opacity', '0.4')
  1858. }
  1859. getAcceptanceType()
  1860. e.stopPropagation()
  1861. })
  1862. //受理渠道
  1863. $('.hotlineAccept').click(function (e) {
  1864. let channelData = []
  1865. $('.bulletFrame').show();
  1866. $('.channel_wrap').show();
  1867. $('.channel_wrap').siblings().hide()
  1868. if ($('.bulletFrame').css('display') == 'block') {
  1869. $('.body').css('opacity', '0.4')
  1870. }
  1871. getNowTime('#date3')
  1872. laydate.render({
  1873. elem: '#date3',
  1874. range: '~',
  1875. type: 'datetime',
  1876. done: function (value) {
  1877. new doAjax({
  1878. url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow",
  1879. // url: "http://192.168.8.9:1042/InfoNew/GetSourceCountByNow",
  1880. data: {
  1881. stime: value && value.split(' ~ ')[0],
  1882. etime: value && value.split(' ~ ')[1]
  1883. },
  1884. callBack: function (res) {
  1885. channelData = [];
  1886. res.data.forEach(function (v, n) {
  1887. channelData.push({
  1888. level: v.TypeName,
  1889. landArea: v.Count
  1890. })
  1891. // }
  1892. })
  1893. getHonelineChart2(channelData, 'channel')
  1894. }
  1895. });
  1896. }
  1897. });
  1898. new doAjax({
  1899. url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow",
  1900. // url: "http://192.168.8.9:1042/InfoNew/GetSourceCountByNow",
  1901. data: {
  1902. stime: $('#date3').val() && $('#date3').val().split(' ~ ')[0],
  1903. etime: $('#date3').val() && $('#date3').val().split(' ~ ')[1]
  1904. },
  1905. callBack: function (res) {
  1906. res.data.forEach(function (v, n) {
  1907. channelData.push({
  1908. level: v.TypeName,
  1909. landArea: v.Count
  1910. })
  1911. sourceCountId.push({
  1912. name: v.TypeName,
  1913. id: v.ValueId
  1914. })
  1915. })
  1916. getHonelineChart2(channelData, 'channel')
  1917. }
  1918. });
  1919. e.stopPropagation()
  1920. })
  1921. //时段话务
  1922. $('#traffic').click(function () {
  1923. $('.bulletFrame').show();
  1924. if ($('.bulletFrame').css('display') == 'block') {
  1925. $('.body').css('opacity', '0.4')
  1926. }
  1927. if (trafficState == 0) {
  1928. let qtphoneName = [];
  1929. let qtldcount = [];
  1930. let qtjtcount = [];
  1931. let qtwjcount = [];
  1932. let qtfqcount = [];
  1933. let sphoneName = [];
  1934. let sldcount = [];
  1935. let sjtcount = [];
  1936. let swjcount = [];
  1937. let sfqcount = [];
  1938. $('.traffic2_wrap').show();
  1939. $('.traffic2_wrap').siblings().hide()
  1940. new doAjax({
  1941. url: huayi.config.callcenter_url + "/InfoNew/GetDayparting",
  1942. // url: "http://192.168.8.9:1042/InfoNew/GetDayparting",
  1943. data: {},
  1944. callBack: function (res) {
  1945. res.splice(7, 0, res[1]);
  1946. res.splice(1, 1)
  1947. res.forEach(function (v, n) {
  1948. if (v.name != '12345' && v.name != "归并热线小计") {
  1949. qtphoneName.push(v.name)
  1950. qtldcount.push(v.ldcount)
  1951. qtjtcount.push(v.jtcount)
  1952. qtwjcount.push(v.wjtcount)
  1953. qtfqcount.push(v.zdfqcount);
  1954. } else {
  1955. sphoneName.push(v.name)
  1956. sldcount.push(v.ldcount)
  1957. sjtcount.push(v.jtcount)
  1958. swjcount.push(v.wjtcount)
  1959. sfqcount.push(v.zdfqcount);
  1960. }
  1961. })
  1962. const trafficDayArr = {
  1963. xdata: qtphoneName,
  1964. result: [
  1965. { name: '未接通', data: qtwjcount },
  1966. { name: '接通量', data: qtjtcount },
  1967. { name: '主动放弃', data: qtfqcount },
  1968. { name: '来电量', data: qtldcount }
  1969. ]
  1970. }
  1971. const dataArr = {
  1972. xdata: sphoneName,
  1973. result: [
  1974. { name: '未接通', data: swjcount },
  1975. { name: '接通量', data: sjtcount },
  1976. { name: '主动放弃', data: sfqcount },
  1977. { name: '来电量', data: sldcount },
  1978. ]
  1979. }
  1980. trafficDayChart(trafficDayArr);
  1981. getS(dataArr)
  1982. }
  1983. });
  1984. } else if (trafficState == 1) {
  1985. $('.traffic_wrap').show();
  1986. $('.traffic_wrap').siblings().hide()
  1987. new doAjax({
  1988. url: huayi.config.callcenter_url + "InfoNew/GetHWCountMonthByNow",
  1989. data: {},
  1990. callBack: function (res) {
  1991. trafficMonthChart(res.data.days, res.data.hwcount[0], res.data.jtcount[0])
  1992. }
  1993. });
  1994. }
  1995. })
  1996. //坐席
  1997. $('#timeTraffic').click(function (e) {
  1998. let zxNum = Math.floor(Math.random() * 10000 + 10000)
  1999. let user;
  2000. $('.bulletFrame').show();
  2001. if ($('.bulletFrame').css('display') == 'block') {
  2002. $('.body').css('opacity', '0.4')
  2003. }
  2004. $('.seatMonitor').show();
  2005. $('.seatMonitor').siblings().hide()
  2006. //坐席列表展示 GetSeatflagList
  2007. $.getJSON(huayi.config.callcenter_url + 'SeatMonitoring/GetSeatGroupList', {}, function (res) {
  2008. user = res.data
  2009. if (res.state.toLowerCase() == "success") {
  2010. let str = ''
  2011. res.data.forEach(function (v, n) {
  2012. if (v.F_WorkNumber != 8071 && v.F_WorkNumber != 8069 && v.F_WorkNumber != 8062) {
  2013. var objSeat = {}
  2014. objSeat.groupID =v.F_SeartGroupID
  2015. objSeat.agentID =v.F_WorkNumber
  2016. seatData.push(objSeat)
  2017. str += '<li class="people_list ' + v.F_WorkNumber +
  2018. ' "><div><div style="margin-right: 3px;"><span class="g-num">' + v.F_WorkNumber +
  2019. '</span></div><div ><div class="bg_person"></div><p><span class="g-name">' + v.F_UserName+
  2020. '</span> </p><i class="lx" zxGroup="'+v.F_SeartGroupID+'" zx_item="0" xl_item="0"></i></div></div></li>'
  2021. }
  2022. })
  2023. $('.zx_people').html(str)
  2024. }
  2025. })
  2026. //实时话务统计
  2027. new doAjax({
  2028. url: huayi.config.callcenter_url + "/InfoNew/GetHWTypeCount24ByNow",
  2029. data: {},
  2030. callBack: function (res) {
  2031. getRealTimeTraffi(res.data.hours, res.data.hrcount[0], res.data.hccount[0])
  2032. }
  2033. });
  2034. //开始坐席监控
  2035. $('.star_btn').click(function (e) {
  2036. obj.AgentID = zxNum;
  2037. // var a
  2038. $(user).each(function (i, n) {
  2039. obj.Type = "SubScribe";
  2040. obj.SubParmer = n.F_WorkNumber * 1;
  2041. obj.AgentExten = 1
  2042. obj.SubType = "0";//根据工号订阅坐席状态
  2043. Send();
  2044. obj.SubType = "1";//根据工号订阅线路状态
  2045. Send();
  2046. })
  2047. // obj.Type = "SubScribe";
  2048. // obj.SubParmer = 8002 * 1;
  2049. // obj.AgentExten = 1
  2050. // obj.SubType = "0";//根据工号订阅坐席状态
  2051. // Send();
  2052. //// obj.SubType = "1";//根据工号订阅线路状态
  2053. //// Send();
  2054. // obj.Type = "SubScribe";
  2055. // obj.SubParmer = 8003 * 1;
  2056. // obj.AgentExten = 1
  2057. // obj.SubType = "0";//根据工号订阅坐席状态
  2058. // Send();
  2059. // obj.SubType = "1";//根据工号订阅线路状态
  2060. // Send();
  2061. e.stopPropagation()
  2062. })
  2063. //关闭坐席监控
  2064. $('.stop_btn').click(function (e) {
  2065. $(user).each(function (i, n) {
  2066. top.obj.Type = "SubScribeCancel";
  2067. top.obj.SubParmer = "-1";
  2068. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  2069. top.Send();
  2070. top.obj.SubType = "1";//根据工号取消订阅线路状态
  2071. top.Send();
  2072. })
  2073. e.stopPropagation()
  2074. })
  2075. //关闭坐席页面时结束坐席监控
  2076. $('.close_zxicon').click(function (e) {
  2077. $('.bulletFrame').hide();
  2078. $('.bulletFrameT').hide();
  2079. if ($('.bulletFrame').css('display') == 'none') {
  2080. $('.body').css('opacity', '1')
  2081. }
  2082. if ($('.bulletFrameT').css('display') == 'none') {
  2083. $('.body').css('opacity', '1')
  2084. }
  2085. $(user).each(function (i, n) {
  2086. top.obj.Type = "SubScribeCancel";
  2087. top.obj.SubParmer = "-1";
  2088. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  2089. top.Send();
  2090. top.obj.SubType = "1";//根据工号取消订阅线路状态
  2091. top.Send();
  2092. })
  2093. e.stopPropagation()
  2094. })
  2095. e.stopPropagation()
  2096. })