Nav apraksta

index.js 61KB

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