Aucune description

index.js 60KB

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