Geen omschrijving

index.js 62KB

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