商丘12345 前端

index.js 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. var index="2";
  2. var key_index="";
  3. var startTime="2019-07-01"
  4. var endTime="2019-07-31"
  5. $(function () {
  6. var mySwiper = new Swiper('.swiper-container', {
  7. loop: true,
  8. autoplay: {
  9. delay: 3000,
  10. },
  11. pagination: { /* 分页器*/
  12. el: '.swiper-pagination',
  13. clickable: true,
  14. },
  15. navigation: {
  16. nextEl: '.swiper-button-next',
  17. prevEl: '.swiper-button-prev',
  18. },
  19. // followFinger : false,
  20. // speed:800,
  21. on: {
  22. init: function() {
  23. swiperAnimateCache(this); //隐藏动画元素
  24. swiperAnimate(this); //初始化完成开始动画
  25. },
  26. transitionEnd: function() {
  27. swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
  28. },
  29. }
  30. })
  31. $(".ssgd").Scroll({
  32. line: 1,
  33. speed: 500,
  34. timer: 3000
  35. });
  36. $(".ssgdtj").Scroll({
  37. line: 1,
  38. speed: 500,
  39. timer: 3000
  40. });
  41. $(".scroll_table").Scroll({
  42. line: 1,
  43. speed: 500,
  44. timer: 3000
  45. });
  46. $(".area_l").Scroll({
  47. line: 1,
  48. speed: 500,
  49. timer: 3000
  50. });
  51. $(".area_r").Scroll({
  52. line: 1,
  53. speed: 500,
  54. timer: 3000
  55. });
  56. })
  57. //按钮点击事件
  58. $('.channel_btn').click(function() {
  59. $(this).addClass('active').siblings().removeClass('active');
  60. index=$(this).attr("index")
  61. if (index=="1") {
  62. startTime="2019-05-23"
  63. endTime="2019-05-23"
  64. ajax1();
  65. dataAjax(startTime,endTime);
  66. }else if (index=="2") {
  67. startTime="2019-05-01"
  68. endTime="2019-05-31"
  69. ajax2();
  70. dataAjax(startTime,endTime);
  71. }else if(index=="3"){
  72. startTime="2018-05-23"
  73. endTime="2019-05-31"
  74. ajax3();
  75. dataAjax(startTime,endTime);
  76. }
  77. });
  78. $('.key_top ul li').click(function() {
  79. $(".active1").hide();
  80. $(this).children(".active1").show();
  81. key_index=$(this).attr("index");
  82. });
  83. function ajax1(){
  84. $("#syqText").text("睢阳区");
  85. $("#syqRate").text("29%");
  86. $("#lyqText").text("梁园区");
  87. $("#lyqRate").text("26%");
  88. $("#ycqText").text("民权县");
  89. $("#ycqRate").text("8%");
  90. $("#ycsText").text("虞城县");
  91. $("#ycsRate").text("9%");
  92. $("#sfqText").text("示范区");
  93. $("#sfqRate").text("19%");
  94. $("#zcxText").text("柘城县");
  95. $("#zcxRate").text("7");
  96. $(".SYQ_num").html("56");
  97. $(".LYQ_num").html("51")
  98. $(".MQ_num").html("16")
  99. $(".SX_num").html("3")
  100. $(".NL_num").html("2")
  101. $(".ZC_num").html("7")
  102. $(".YCX_num").html("17")
  103. $(".XYX_num").html("1")
  104. $(".yc_num").html("4")
  105. $(".KFQ_num").html("36")
  106. // 地图下方
  107. $("#allJARate").text("99.12%");
  108. $("#allMYRate").text("98.07%");
  109. $("#allPJRate").text("193");
  110. $("#allSLCount").text("193");
  111. $("#allJACount").text("192");
  112. // 满意度
  113. // 商丘
  114. $(".keyWord1").text("市城市管理局");
  115. $(".sq_sl").text("12");
  116. $(".sq_wj").text("11");
  117. $(".sq_my").text("100%");
  118. //郑州
  119. $(".keyWord2").text("市工商局");
  120. $(".zz_sl").text("19");
  121. $(".zz_wj").text("19");
  122. $(".zz_my").text("100%");
  123. //南阳
  124. $(".keyWord3").text("市住建局");
  125. $(".ny_sl").text("15");
  126. $(".ny_wj").text("14");
  127. $(".ny_my").text("100%");
  128. //开封
  129. $(".keyWord4").text("睢阳区区政府");
  130. $(".kf_sl").text("11");
  131. $(".kf_wj").text("10");
  132. $(".kf_my").text("100%");
  133. //洛阳
  134. $(".keyWord5").text("城乡一体化示范区管委会");
  135. $(".ly_sl").text("10");
  136. $(".ly_wj").text("9");
  137. $(".ly_my").text("100%");
  138. //平顶山
  139. $(".keyWord6").text("中国移动商丘市分公司");
  140. $(".pds_sl").text("4");
  141. $(".pds_wj").text("4");
  142. $(".pds_my").text("100%");
  143. //安阳
  144. $(".keyWord7").text("市环保局");
  145. $(".ay_sl").text("4");
  146. $(".ay_wj").text("3");
  147. $(".ay_my").text("100%");
  148. //鹤壁
  149. $(".keyWord8").text("市卫生健康委员会");
  150. $(".hb_sl").text("2");
  151. $(".hb_wj").text("2");
  152. $(".hb_my").text("100%");
  153. }
  154. function ajax2(){
  155. $("#syqText").text("睢阳区");
  156. $("#syqRate").text("36%");
  157. $("#lyqText").text("梁园区");
  158. $("#lyqRate").text("31%");
  159. $("#ycqText").text("民权县");
  160. $("#ycqRate").text("6%");
  161. $("#ycsText").text("虞城县");
  162. $("#ycsRate").text("4%");
  163. $("#sfqText").text("示范区");
  164. $("#sfqRate").text("14%");
  165. $("#zcxText").text("柘城县");
  166. $("#zcxRate").text("3%");
  167. $(".SYQ_num").html("1768");
  168. $(".LYQ_num").html("1543")
  169. $(".MQ_num").html("307")
  170. $(".SX_num").html("103")
  171. $(".NL_num").html("35")
  172. $(".ZC_num").html("139")
  173. $(".YCX_num").html("205")
  174. $(".XYX_num").html("18")
  175. $(".yc_num").html("103")
  176. $(".KFQ_num").html("692")
  177. // 地图下方
  178. $("#allJARate").text("98.75%");
  179. $("#allMYRate").text("98.63%");
  180. $("#allPJRate").text("163");
  181. $("#allSLCount").text("4909");
  182. $("#allJACount").text("4904");
  183. // 满意度
  184. // 商丘
  185. $(".keyWord1").text("市人力资源和社会保障局");
  186. $(".sq_sl").text("38");
  187. $(".sq_wj").text("36");
  188. $(".sq_my").text("100%");
  189. //郑州
  190. $(".keyWord2").text("柘城县县政府");
  191. $(".zz_sl").text("55");
  192. $(".zz_wj").text("53");
  193. $(".zz_my").text("100%");
  194. //南阳
  195. $(".keyWord3").text("市环保局");
  196. $(".ny_sl").text("127");
  197. $(".ny_wj").text("123");
  198. $(".ny_my").text("100%");
  199. //开封
  200. $(".keyWord4").text("市教育体育局");
  201. $(".kf_sl").text("35");
  202. $(".kf_wj").text("34");
  203. $(".kf_my").text("100%");
  204. //洛阳
  205. $(".keyWord5").text("市工商局");
  206. $(".ly_sl").text("76");
  207. $(".ly_wj").text("73");
  208. $(".ly_my").text("98.65%");
  209. //平顶山
  210. $(".keyWord6").text("商丘市水务集团");
  211. $(".pds_sl").text("151");
  212. $(".pds_wj").text("149");
  213. $(".pds_my").text("96.13%");
  214. //安阳
  215. $(".keyWord7").text("梁园区区政府");
  216. $(".ay_sl").text("650");
  217. $(".ay_wj").text("653");
  218. $(".ay_my").text("95.47%");
  219. //鹤壁
  220. $(".keyWord8").text("商丘供电公司");
  221. $(".hb_sl").text("95");
  222. $(".hb_wj").text("99");
  223. $(".hb_my").text("93.4%");
  224. }
  225. function ajax3(){
  226. $("#syqText").text("睢阳区");
  227. $("#syqRate").text("36%");
  228. $("#lyqText").text("梁园区");
  229. $("#lyqRate").text("28%");
  230. $("#ycqText").text("民权县");
  231. $("#ycqRate").text("7%");
  232. $("#ycsText").text("永城市");
  233. $("#ycsRate").text("3%");
  234. $("#sfqText").text("示范区");
  235. $("#sfqRate").text("18%");
  236. $("#zcxText").text("柘城县");
  237. $("#zcxRate").text("3%");
  238. $(".SYQ_num").html("19423");
  239. $(".LYQ_num").html("15485")
  240. $(".MQ_num").html("3721")
  241. $(".SX_num").html("1363")
  242. $(".NL_num").html("367")
  243. $(".ZC_num").html("1884")
  244. $(".YCX_num").html("855")
  245. $(".XYX_num").html("148")
  246. $(".yc_num").html("1436")
  247. $(".KFQ_num").html("9634")
  248. // 地图下方
  249. $("#allJARate").text("98.66%");
  250. $("#allMYRate").text("98.59%");
  251. $("#allPJRate").text("149");
  252. $("#allSLCount").text("54424");
  253. $("#allJACount").text("54419");
  254. // 满意度
  255. // 商丘
  256. $(".keyWord1").text("商丘公共交通有限公司");
  257. $(".sq_sl").text("398");
  258. $(".sq_wj").text("397");
  259. $(".sq_my").text("98.67%");
  260. //郑州
  261. $(".keyWord2").text("市环保局");
  262. $(".zz_sl").text("929");
  263. $(".zz_wj").text("929");
  264. $(".zz_my").text("97.95%");
  265. //南阳
  266. $(".keyWord3").text("虞城县县政府");
  267. $(".ny_sl").text("264");
  268. $(".ny_wj").text("262");
  269. $(".ny_my").text("95.48%");
  270. //开封
  271. $(".keyWord4").text("商丘市水务集团");
  272. $(".kf_sl").text("881");
  273. $(".kf_wj").text("879");
  274. $(".kf_my").text("94.99%");
  275. //洛阳
  276. $(".keyWord5").text("梁园区区政府");
  277. $(".ly_sl").text("3882");
  278. $(".ly_wj").text("3884");
  279. $(".ly_my").text("94.23%");
  280. //平顶山
  281. $(".keyWord6").text("市工商局");
  282. $(".pds_sl").text("345");
  283. $(".pds_wj").text("348");
  284. $(".pds_my").text("93.97%");
  285. //安阳
  286. $(".keyWord7").text("市公安局");
  287. $(".ay_sl").text("2397");
  288. $(".ay_wj").text("2396");
  289. $(".ay_my").text("92.7%");
  290. //鹤壁
  291. $(".keyWord8").text("商丘供电公司");
  292. $(".hb_sl").text("465");
  293. $(".hb_wj").text("467");
  294. $(".hb_my").text("91.43%");
  295. }
  296. //渠道来源
  297. function SourceFrom(startTime,endTime) {
  298. $.ajax({
  299. type: "get",
  300. url: huayi.config.callcenter_url + "info/GetSourcePercentByDate",
  301. async: true,
  302. dataType: 'json',
  303. data: {
  304. start: startTime,
  305. end: endTime
  306. },
  307. success: function(data) {
  308. if(data.state.toLowerCase() == 'success') {
  309. var con = data.data;
  310. var allNum=con[0].Count
  311. +con[1].Count
  312. +con[2].Count
  313. +con[3].Count
  314. +con[4].Count
  315. +con[5].Count
  316. +con[6].Count
  317. +con[7].Count
  318. if(con.length > 0) {
  319. $(con).each(function(i, n) {
  320. if(n.Source.indexOf('12345信箱') != -1) {
  321. $(".yx_num").html(n.Count);
  322. // 邮箱
  323. $("#zxRate").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  324. $(".yx_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  325. $(".yx_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  326. }
  327. if(n.Source.indexOf('电话') != -1) {
  328. $(".tel_num").html(n.Count);
  329. $(".tel_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%")
  330. $(".tel_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  331. }
  332. if(n.Source.indexOf('市县转单') != -1) {
  333. $(".sxzd_num").html(n.Count);
  334. // 市县转单
  335. $(".sxzd_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  336. $(".sxzd_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  337. }
  338. if(n.Source.indexOf('手机APP') != -1) {
  339. $(".APP_num").html(n.Count);
  340. // app
  341. $(".APP_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  342. $(".APP_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  343. }
  344. if(n.Source.indexOf('网站') != -1) {
  345. $(".wz_num").html(n.Count);
  346. // 网站
  347. $(".wz_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  348. $(".wz_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  349. }
  350. if(n.Source.indexOf('微博') != -1) {
  351. $(".wb_num").html(n.Count);
  352. // 微博
  353. $(".wb_num").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  354. $(".wb_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  355. }
  356. if(n.Source.indexOf('微信') != -1) {
  357. $(".wx_num").html(n.Count);
  358. // 微信
  359. $(".wx_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%")
  360. $(".wx_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  361. }
  362. if(n.Source.indexOf('政务服务网') != -1) {
  363. $(".zww_num").html(n.Count);
  364. // 政务网
  365. $(".zww_zb").text(Math.round((n.Count/allNum)*100)/100*100+"%");
  366. $(".zww_lg").css("width",Math.round((n.Count/allNum)*100)/100*100+"%");
  367. }
  368. })
  369. } else {
  370. $('.tagcloud').html('');
  371. }
  372. }
  373. }
  374. });
  375. }
  376. //工单类型统计
  377. function TypeFrom(startTime,endTime) {
  378. $.ajax({
  379. type: "get",
  380. url: huayi.config.callcenter_url + "info/GetTypeCountByDate",
  381. async: true,
  382. dataType: 'json',
  383. data: {
  384. start: startTime,
  385. end: endTime
  386. },
  387. success: function(data) {
  388. if(data.state.toLowerCase() == 'success') {
  389. debugger
  390. var con = data.data;
  391. $(con).each(function(j, n) {
  392. if(n.TypeName.indexOf('咨询') != -1) {
  393. $(".zxNum").text(n.Count)
  394. }
  395. if(n.TypeName.indexOf('投诉') != -1) {
  396. $(".tsNum").text(n.Count)
  397. }
  398. if(n.TypeName.indexOf('表扬') != -1) {
  399. $(".byNum").text(n.Count)
  400. }
  401. if(n.TypeName.indexOf('求助') != -1) {
  402. $(".qzNum").text(n.Count)
  403. }
  404. if(n.TypeName.indexOf('其他') != -1) {
  405. $(".tNum").text(n.Count)
  406. }
  407. if(n.TypeName.indexOf('建议') != -1) {
  408. $(".jyNum").text(n.Count)
  409. }
  410. })
  411. }
  412. }
  413. });
  414. }
  415. //事发区域统计
  416. function AreaFrom(startTime,endTime) {
  417. $.ajax({
  418. type: "get",
  419. url: huayi.config.callcenter_url + "/info/GetAreaCountByDateNew",
  420. async: true,
  421. dataType: 'json',
  422. data: {
  423. start: startTime,
  424. end: endTime
  425. },
  426. success: function(data) {
  427. if(data.state.toLowerCase() == 'success') {
  428. var con = data.data;
  429. var allNum=con[0].SLCount
  430. +con[1].SLCount
  431. +con[2].SLCount
  432. +con[3].SLCount
  433. +con[4].SLCount
  434. +con[5].SLCount
  435. +con[6].SLCount
  436. +con[7].SLCount
  437. +con[8].SLCount
  438. +con[9].SLCount;
  439. $(con).each(function(i, n) {
  440. if(i<7){
  441. if (i==0) {
  442. $("#zxText").text(n.AreaName);
  443. //$("#zxRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  444. }else if (i==1) {
  445. $("#tsText").text(n.AreaName);
  446. //$("#tsRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  447. }else if (i==2) {
  448. $("#byText").text(n.AreaName);
  449. //$("#byRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  450. }else if (i==3) {
  451. $("#qzText").text(n.AreaName);
  452. //$("#qzRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  453. }else if (i==4) {
  454. $("#qtText").text(n.AreaName);
  455. //$("#qtRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  456. }else if (i==5) {
  457. $("#jyText").text(n.AreaName);
  458. //$("#jyRate").text(Math.round((n.SLCount/allNum)*100)/100*100+"%");
  459. }
  460. }
  461. if(n.AreaName.indexOf('睢阳区') != -1) {
  462. $(".SYQ_num").html(n.SLCount)
  463. }
  464. if(n.AreaName.indexOf('梁园区') != -1) {
  465. $(".SYQ_num").html(n.SLCount)
  466. $(".LYQ_num").html(n.SLCount)
  467. }
  468. if(n.AreaName.indexOf('民权县') != -1) {
  469. $(".SYQ_num").html(n.SLCount)
  470. $(".LYQ_num").html(n.SLCount)
  471. $(".MQ_num").html(n.SLCount)
  472. }
  473. if(n.AreaName.indexOf('睢县') != -1) {
  474. $(".SYQ_num").html(n.SLCount)
  475. $(".LYQ_num").html(n.SLCount)
  476. $(".MQ_num").html(n.SLCount)
  477. $(".SX_num").html(n.SLCount)
  478. }
  479. if(n.AreaName.indexOf('宁陵县') != -1) {
  480. $(".SYQ_num").html(n.SLCount)
  481. $(".LYQ_num").html(n.SLCount)
  482. $(".MQ_num").html(n.SLCount)
  483. $(".SX_num").html(n.SLCount)
  484. $(".NL_num").html(n.SLCount)
  485. }
  486. if(n.AreaName.indexOf('柘城县') != -1) {
  487. $(".SYQ_num").html(n.SLCount)
  488. $(".LYQ_num").html(n.SLCount)
  489. $(".MQ_num").html(n.SLCount)
  490. $(".SX_num").html(n.SLCount)
  491. $(".NL_num").html(n.SLCount)
  492. $(".ZC_num").html(n.SLCount)
  493. }
  494. if(n.AreaName.indexOf('虞城县') != -1) {
  495. $(".SYQ_num").html(n.SLCount)
  496. $(".LYQ_num").html(n.SLCount)
  497. $(".MQ_num").html(n.SLCount)
  498. $(".SX_num").html(n.SLCount)
  499. $(".NL_num").html(n.SLCount)
  500. $(".ZC_num").html(n.SLCount)
  501. $(".YCX_num").html(n.SLCount)
  502. }
  503. if(n.AreaName.indexOf('夏邑县') != -1) {
  504. $(".SYQ_num").html(n.SLCount)
  505. $(".LYQ_num").html(n.SLCount)
  506. $(".MQ_num").html(n.SLCount)
  507. $(".SX_num").html(n.SLCount)
  508. $(".NL_num").html(n.SLCount)
  509. $(".ZC_num").html(n.SLCount)
  510. $(".YCX_num").html(n.SLCount)
  511. $(".XYX_num").html(n.SLCount)
  512. }
  513. if(n.AreaName.indexOf('永城市') != -1) {
  514. $(".SYQ_num").html(n.SLCount)
  515. $(".LYQ_num").html(n.SLCount)
  516. $(".MQ_num").html(n.SLCount)
  517. $(".SX_num").html(n.SLCount)
  518. $(".NL_num").html(n.SLCount)
  519. $(".ZC_num").html(n.SLCount)
  520. $(".YCX_num").html(n.SLCount)
  521. $(".XYX_num").html(n.SLCount)
  522. $(".yc_num").html(n.SLCount)
  523. }
  524. if(n.AreaName.indexOf('城乡一体化示范区') != -1) {
  525. $(".SYQ_num").html(n.SLCount)
  526. $(".LYQ_num").html(n.SLCount)
  527. $(".MQ_num").html(n.SLCount)
  528. $(".SX_num").html(n.SLCount)
  529. $(".NL_num").html(n.SLCount)
  530. $(".ZC_num").html(n.SLCount)
  531. $(".YCX_num").html(n.SLCount)
  532. $(".XYX_num").html(n.SLCount)
  533. $(".yc_num").html(n.SLCount)
  534. $(".KFQ_num").html(n.SLCount)
  535. }
  536. // if(n.AreaName.indexOf('总计') != -1) {
  537. // $("#allSLCount").html(n.SLCount); //受理量
  538. // $("#allJACount").html(n.JACount); //结案量
  539. // $("#allJARate").html(n.JARate); //结案率
  540. // $("#allMYRate").html(n.MYRate); //满意度
  541. // }
  542. })
  543. }
  544. }
  545. });
  546. }
  547. // 左侧关键词
  548. function keyWord(startTime,endTime) {
  549. $.ajax({
  550. type: "get",
  551. url: huayi.config.callcenter_url + "info/GetKeyCountRankByDate",
  552. async: false,
  553. dataType: 'json',
  554. data: {
  555. start: startTime,
  556. end: endTime
  557. },
  558. success: function(data) {
  559. if(data.state.toLowerCase() == 'success') {
  560. //劳动社保
  561. var con = data.data;
  562. if(con.length > 0) {
  563. //$(".keyW_t").text(con[0].TypeName)
  564. $('.tagcloud').html('');
  565. $(con).each(function(k, j) {
  566. if(k==0){
  567. $(".key_word1").text(j.TypeName);
  568. $(".key_top1").text(j.Count);
  569. $(".key_top ul li").eq(0).attr("index",j.Id)
  570. }
  571. if(k==1){
  572. $(".key_word2").text(j.TypeName);
  573. $(".key_top2").text(j.Count);
  574. $(".key_top ul li").eq(1).attr("index",j.Id)
  575. }
  576. if(k==2){
  577. $(".key_word3").text(j.TypeName);
  578. $(".key_top3").text(j.Count);
  579. $(".key_top ul li").eq(2).attr("index",j.Id)
  580. }
  581. })
  582. //$(".key_top ul li:first-child").removeClass("tagcloud_bjShine");
  583. $(".key_top ul li:first-child").addClass("tagcloud_bjShine");
  584. keyWordDetail(startTime,endTime);
  585. } else {
  586. $('.tagcloud').html('');
  587. }
  588. }
  589. }
  590. });
  591. }
  592. // 右侧部门
  593. function keyWordDetail(startTime,endTime) {
  594. $.ajax({
  595. type: "get",
  596. url: huayi.config.callcenter_url + "info/GetDeptKeyCountByDateNew",
  597. async: true,
  598. dataType: 'json',
  599. data: {
  600. start: startTime,
  601. end: endTime,
  602. keyid: $(".tagcloud_bjShine").eq(0).attr("index")
  603. },
  604. success: function(data) {
  605. if(data.state.toLowerCase() == 'success') {
  606. $('.scroll_table tbody').html('');
  607. var con = data.data;
  608. $(con).each(function(j, n) {
  609. var rate = '';
  610. if (j<11) {
  611. if(n.rate) {
  612. rate = n.rate;
  613. }
  614. var ph=j+1
  615. var str = '<tr><td style="width: 25%; color: #00e1ff;">'
  616. + n.deptname + '</td><td style="width: 25%; color: #00e1ff;">'
  617. + n.acceptcount + '</td><td style="width: 25%; color: #00c725;">'
  618. + rate + '</td><td style="width: 25%; color: #b50105;">'
  619. + ph + '</td></tr>'
  620. $('.scroll_table tbody').append(str);
  621. }
  622. })
  623. $(".scroll_table").Scroll({
  624. line: 1,
  625. speed: 500,
  626. timer: 2000
  627. });
  628. }
  629. }
  630. });
  631. }
  632. $(".key_top ul li").on("click", function() {
  633. $(".key_top ul li").removeClass("tagcloud_bjShine");
  634. $(this).addClass("tagcloud_bjShine");
  635. keyWordDetail(startTime,endTime);
  636. });