Aucune description

index.js 60KB

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