Brak opisu

liuzhtu.js 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854
  1. var container1 = echarts.init(document.getElementById('part1'));
  2. var container2 = echarts.init(document.getElementById('part2'));
  3. var container3 = echarts.init(document.getElementById('part3'));
  4. var container4 = echarts.init(document.getElementById('patt1'));
  5. var container5 = echarts.init(document.getElementById('patt2'));
  6. var container6 = echarts.init(document.getElementById('patt3'));
  7. var container7 = echarts.init(document.getElementById('patt4'));
  8. var container8 = echarts.init(document.getElementById('patt5'));
  9. function partOne() {
  10. $.ajax({
  11. type: "get",
  12. url: huayi.config.callcenter_url + "WOReport/GetChannel",
  13. async: true,
  14. dataType: "json",
  15. data: {},
  16. success: function(data) {
  17. if(data.state.toLowerCase() == "success") {
  18. var con = data.rows;
  19. container1.setOption({
  20. title: {
  21. text: '来源渠道数据分析',
  22. textStyle: {
  23. //文字颜色
  24. color: '#00e9ff',
  25. //字体大小
  26. fontSize: 18
  27. },
  28. x: 'center'
  29. },
  30. tooltip: {
  31. trigger: 'axis',
  32. axisPointer: {
  33. type: 'cross',
  34. label: {
  35. show: true,
  36. backgroundColor: '#030917'
  37. }
  38. }
  39. },
  40. legend: {
  41. show: false
  42. },
  43. xAxis: {
  44. name: '时间',
  45. data: [
  46. con[0].channel,
  47. con[1].channel,
  48. con[2].channel,
  49. con[3].channel,
  50. con[4].channel
  51. ],
  52. axisLine: {
  53. lineStyle: {
  54. color: '#ccc'
  55. }
  56. }
  57. },
  58. yAxis: {
  59. name: '数量',
  60. splitLine: {
  61. show: false
  62. },
  63. axisLine: {
  64. lineStyle: {
  65. color: '#fff'
  66. }
  67. }
  68. },
  69. series: [{
  70. name: '电话',
  71. type: 'line',
  72. data: [
  73. con[0].Telephone,
  74. con[1].Telephone,
  75. con[2].Telephone,
  76. con[3].Telephone,
  77. con[4].Telephone
  78. ]
  79. },
  80. {
  81. name: '微信',
  82. type: 'line',
  83. data: [
  84. con[0].WeChat,
  85. con[1].WeChat,
  86. con[2].WeChat,
  87. con[3].WeChat,
  88. con[4].WeChat
  89. ]
  90. }
  91. ],
  92. color: ['#61a0a9', '#cb885d']
  93. });
  94. }
  95. }
  96. });
  97. }
  98. function partTwo() {
  99. $.ajax({
  100. type: "get",
  101. url: huayi.config.callcenter_url + "WOReport/GetChannel",
  102. async: true,
  103. dataType: "json",
  104. data: {
  105. // date:
  106. },
  107. success: function(data) {
  108. if(data.state.toLowerCase() == "success") {
  109. var con = data.rows;
  110. container2.setOption({
  111. title: {
  112. text: '工单即时办结',
  113. textStyle: {
  114. //文字颜色
  115. color: '#00e9ff',
  116. //字体大小
  117. fontSize: 18
  118. },
  119. x: 'center'
  120. },
  121. color: ['#3398DB'],
  122. tooltip: {
  123. trigger: 'axis',
  124. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  125. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  126. }
  127. },
  128. grid: {
  129. left: '3%',
  130. right: '4%',
  131. bottom: '3%',
  132. containLabel: true
  133. },
  134. xAxis: [{
  135. type: 'category',
  136. data: [
  137. con[0].channel,
  138. con[1].channel,
  139. con[2].channel,
  140. con[3].channel,
  141. con[4].channel
  142. ],
  143. axisTick: {
  144. alignWithLabel: true
  145. },
  146. axisLine: {
  147. lineStyle: {
  148. color: '#ccc'
  149. }
  150. }
  151. }],
  152. yAxis: [{
  153. type: 'value',
  154. axisLine: {
  155. lineStyle: {
  156. color: '#ccc'
  157. }
  158. }
  159. }],
  160. series: [{
  161. name: '即时办结',
  162. type: 'bar',
  163. barWidth: '60%',
  164. data: [
  165. con[0].Immediate,
  166. con[1].Immediate,
  167. con[2].Immediate,
  168. con[3].Immediate,
  169. con[4].Immediate
  170. ]
  171. }]
  172. });
  173. }
  174. }
  175. });
  176. }
  177. function partThree() {
  178. $.ajax({
  179. type: "get",
  180. url: huayi.config.callcenter_url + "WOReport/GetChannel",
  181. async: true,
  182. dataType: "json",
  183. data: {
  184. // date:
  185. },
  186. success: function(data) {
  187. if(data.state.toLowerCase() == "success") {
  188. var con = data.rows;
  189. container3.setOption({
  190. title: {
  191. text: '转接率图表',
  192. textStyle: {
  193. //文字颜色
  194. color: '#00e9ff',
  195. //字体大小
  196.     fontSize: 18
  197. },
  198. x: 'center'
  199. },
  200. tooltip: {
  201. trigger: 'item',
  202. formatter: "{a} <br/>{b} : {c} ({d}%)"
  203. },
  204. legend: {
  205. orient: 'vertical',
  206. left: 'left'
  207. },
  208. series: [{
  209. name: '访问来源',
  210. type: 'pie',
  211. radius: '55%',
  212. center: ['50%', '60%'],
  213. data: [{
  214. value: con[0].Transfer,
  215. name: con[0].channel
  216. },
  217. {
  218. value: con[1].Transfer,
  219. name: con[1].channel
  220. },
  221. {
  222. value: con[2].Transfer,
  223. name: con[2].channel
  224. },
  225. {
  226. value: con[3].Transfer,
  227. name: con[3].channel
  228. },
  229. {
  230. value: con[4].Transfer,
  231. name: con[4].channel
  232. }
  233. ],
  234. itemStyle: {
  235. normal: {
  236. color: '#159FE9',
  237. opacity: 0.5,
  238. },
  239. emphasis: {
  240. shadowBlur: 10,
  241. shadowOffsetX: 0,
  242. shadowColor: 'rgba(0, 0, 0, 0.5)'
  243. }
  244. }
  245. }]
  246. });
  247. }
  248. }
  249. });
  250. }
  251. function partFour() {
  252. $.ajax({
  253. type: "get",
  254. url: huayi.config.callcenter_url + "WOReport/GetChannel",
  255. async: true,
  256. dataType: "json",
  257. data: {
  258. channel:$(".channelSel").val()
  259. },
  260. success: function(data) {
  261. if(data.state.toLowerCase() == "success") {
  262. var con = data.rows;
  263. var option={
  264. title: {
  265. text: '渠道来源满意度',
  266. x: 'left',
  267. textStyle: {
  268. //文字颜色
  269. color: '#00e9ff',
  270. //字体大小
  271.     fontSize: 18
  272. }
  273. },
  274. tooltip: {
  275. trigger: 'item',
  276. formatter: "{a} <br/>{b} : {c} ({d}%)"
  277. },
  278. legend: {
  279. orient: 'vertical',
  280. left: 'left'
  281. },
  282. series: [{
  283. name: '访问来源',
  284. type: 'pie',
  285. radius: '55%',
  286. center: ['50%', '60%'],
  287. data: [{
  288. value: con[0].Verysatisfied,
  289. name: '非常满意'
  290. },
  291. {
  292. value: con[0].Satisfaction,
  293. name: '满意'
  294. },
  295. {
  296. value: con[0].Commonly,
  297. name: '一般'
  298. },
  299. {
  300. value: con[0].Unsatisfactory,
  301. name: '不满意'
  302. }
  303. ],
  304. itemStyle: {
  305. normal: {
  306. color: '#159FE9',
  307. opacity: 0.5,
  308. },
  309. emphasis: {
  310. shadowBlur: 10,
  311. shadowOffsetX: 0,
  312. shadowColor: 'rgba(0, 0, 0, 0.5)'
  313. }
  314. }
  315. }]
  316. }
  317. echartsPie = echarts.init(document.getElementById('part4'));
  318. echartsPie.setOption(option);
  319. //var container4 = echarts.init(document.getElementById('part4'));
  320. }
  321. }
  322. });
  323. }
  324. // 第四屏
  325. var typeSelc;
  326. var oneType;
  327. // function partThaa(sd,ed) {
  328. // if (oneType) {
  329. // typeSelc=oneType;
  330. // }else{
  331. // typeSelc=5;
  332. // }
  333. // $.ajax({
  334. // type: "get",
  335. // url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
  336. // async: true,
  337. // dataType: "json",
  338. // data: {
  339. // // date:
  340. // start: sd,
  341. // end: ed,
  342. // type: typeSelc
  343. // },
  344. // success: function(data) {
  345. // if(data.state.toLowerCase() == "success") {
  346. // var con = data.rows;
  347. // container4.setOption({
  348. // title: {
  349. // text: '区域',
  350. // textStyle: {
  351. // //文字颜色
  352. // color: '#00e9ff',
  353. // //字体大小
  354. //     fontSize: 18
  355. // },
  356. // x: 'left'
  357. // },
  358. // tooltip: {
  359. // trigger: 'item',
  360. // formatter: "{a} <br/>{b} : {c} ({d}%)"
  361. // },
  362. // legend: {
  363. // orient: 'vertical',
  364. // left: 'left'
  365. // },
  366. //
  367. // series: [{
  368. // name: '区域',
  369. // type: 'pie',
  370. // radius: '70%',
  371. // center: ['50%', '50%'],
  372. // data: [{
  373. // value: con[0].number,
  374. // name: con[0].name
  375. // },
  376. // {
  377. // value: con[1].number,
  378. // name: con[1].name
  379. // },
  380. // {
  381. // value:con[2].number,
  382. // name: con[2].name
  383. // },
  384. // {
  385. // value:con[3].number,
  386. // name: con[3].name
  387. // },
  388. //
  389. // ],
  390. // itemStyle: {
  391. // // normal: {
  392. // // color: '#2973E4',
  393. // // opacity: 0.8,
  394. // // },
  395. // emphasis: {
  396. // shadowBlur: 10,
  397. // shadowOffsetX: 0,
  398. // shadowColor: 'rgba(255, 198, 0, 0.5)'
  399. // }
  400. // }
  401. // }]
  402. // });
  403. // }
  404. // }
  405. // });
  406. // }
  407. function partThaace() {
  408. $.ajax({
  409. type: "get",
  410. url: huayi.config.callcenter_url + "WOReport/GetChanelList",
  411. async: true,
  412. dataType: "json",
  413. data: {
  414. // date:
  415. },
  416. success: function(data) {
  417. if(data.state.toLowerCase() == "success") {
  418. var con = data.rows;
  419. container5.setOption({
  420. title: {
  421. text: '渠道类别',
  422. textStyle: {
  423. //文字颜色
  424. color: '#00e9ff',
  425. //字体大小
  426.     fontSize: 18
  427. },
  428. x: 'left'
  429. },
  430. tooltip: {
  431. trigger: 'item',
  432. formatter: "{a} <br/>{b} : {c} ({d}%)"
  433. },
  434. legend: {
  435. orient: 'vertical',
  436. left: 'left'
  437. },
  438. series: [{
  439. name: '渠道类别',
  440. type: 'pie',
  441. radius: '70%',
  442. center: ['52%', '50%'],
  443. data: [{
  444. value: con.Distribution,
  445. name: '总经销',
  446. itemStyle:{normal: {
  447. color: '#113388',
  448. }
  449. }
  450. },
  451. {
  452. value: con.Quotient,
  453. name: '二级商',
  454. itemStyle:{normal: {
  455. color: '#532478',
  456. }
  457. }
  458. },
  459. {
  460. value: con.Bigfarmer,
  461. name: '种田大户',
  462. itemStyle:{normal: {
  463. color: '#487565',
  464. }
  465. }
  466. },
  467. {
  468. value: con.Peasant,
  469. name: '农户',
  470. itemStyle:{normal: {
  471. color: '#336699',
  472. }
  473. }
  474. },
  475. {
  476. value: con.Customers,
  477. name: '化工客户',
  478. itemStyle:{normal: {
  479. color: '#FFFEEE',
  480. }
  481. }
  482. },
  483. {
  484. value:con.Companystaf,
  485. name: '公司员工',
  486. itemStyle:{normal: {
  487. color: '#256EEE',
  488. }
  489. }
  490. },
  491. {
  492. value: con.Other,
  493. name: '其他',
  494. itemStyle:{normal: {
  495. color: '#369FFE',
  496. }
  497. }
  498. }
  499. ],
  500. // itemStyle: {
  501. // normal: {
  502. // color: '#159FE9',
  503. // opacity: 0.5,
  504. // },
  505. // emphasis: {
  506. // shadowBlur: 10,
  507. // shadowOffsetX: 0,
  508. // shadowColor: 'rgba(0, 0, 0, 0.5)'
  509. // }
  510. // }
  511. }]
  512. });
  513. }
  514. }
  515. });
  516. }
  517. function partTccea() {
  518. $.ajax({
  519. type: "get",
  520. url: huayi.config.callcenter_url + "WOReport/GetbrandList",
  521. async: true,
  522. dataType: "json",
  523. data: {
  524. // date:
  525. },
  526. success: function(data) {
  527. if(data.state.toLowerCase() == "success") {
  528. var con = data.rows;
  529. container6.setOption({
  530. title: {
  531. text: '品牌',
  532. textStyle: {
  533. //文字颜色
  534. color: '#00e9ff',
  535. //字体大小
  536.     fontSize: 18
  537. },
  538. x: 'left'
  539. },
  540. tooltip: {
  541. trigger: 'item',
  542. formatter: "{a} <br/>{b} : {c} ({d}%)"
  543. },
  544. legend: {
  545. orient: 'vertical',
  546. left: 'left'
  547. },
  548. series: [{
  549. name: '品牌',
  550. type: 'pie',
  551. radius: '60%',
  552. center: ['50%', '50%'],
  553. data: [{
  554. value: con[0].number,
  555. name: con[0].name
  556. },
  557. {
  558. value: con[1].number,
  559. name: con[1].name
  560. },
  561. {
  562. value: con[2].number,
  563. name: con[2].name
  564. },
  565. {
  566. value: con[3].number,
  567. name: con[3].name
  568. },
  569. {
  570. value: con[4].number,
  571. name: con[4].name
  572. },
  573. {
  574. value: con[5].number,
  575. name: con[5].name
  576. },
  577. {
  578. value: con[6].number,
  579. name: con[6].name
  580. },
  581. {
  582. value: con[7].number,
  583. name: con[7].name
  584. },
  585. {
  586. value: con[8].number,
  587. name: con[8].name
  588. },
  589. {
  590. value: con[9].number,
  591. name: con[9].name
  592. },
  593. {
  594. value: con[10].number,
  595. name: con[10].name
  596. },
  597. {
  598. value: con[11].number,
  599. name: con[11].name
  600. },
  601. ],
  602. // itemStyle: {
  603. // normal: {
  604. // color: '#159FE9',
  605. // opacity: 0.5,
  606. // },
  607. // emphasis: {
  608. // shadowBlur: 10,
  609. // shadowOffsetX: 0,
  610. // shadowColor: 'rgba(0, 0, 0, 0.5)'
  611. // }
  612. // }
  613. }]
  614. });
  615. }
  616. }
  617. });
  618. }
  619. function partTaipa() {
  620. $.ajax({
  621. type: "get",
  622. url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
  623. async: true,
  624. dataType: "json",
  625. data: {
  626. // date:
  627. },
  628. success: function(data) {
  629. if(data.state.toLowerCase() == "success") {
  630. var con = data.rows;
  631. container7.setOption({
  632. title: {
  633. text: '反馈类型',
  634. textStyle: {
  635. //文字颜色
  636. color: '#00e9ff',
  637. //字体大小
  638. fontSize: 18
  639. },
  640. x: 'center'
  641. },
  642. tooltip: {
  643. trigger: 'axis',
  644. axisPointer: {
  645. type: 'cross',
  646. label: {
  647. show: true,
  648. backgroundColor: '#030917'
  649. }
  650. }
  651. },
  652. legend: {
  653. show: false
  654. },
  655. xAxis: {
  656. name: '产品',
  657. data: [
  658. con[0].name,
  659. con[1].name,
  660. con[2].name,
  661. con[3].name,
  662. con[4].name
  663. // {
  664. // value: '尿素',
  665. // },
  666. // {
  667. // value: '复合肥',
  668. // },
  669. // {
  670. // value: '水溶肥',
  671. // },
  672. // {
  673. // value: '车用尿素',
  674. // },
  675. // {
  676. // value: '三聚氰胺',
  677. // },
  678. // {
  679. // value: '甲醇',
  680. // },
  681. // {
  682. // value: '糖醇',
  683. // },
  684. // {
  685. // value: '腐植酸',
  686. // },
  687. // {
  688. // value: '二甲醚',
  689. // },
  690. // {
  691. // value: '糖醛',
  692. // },
  693. // {
  694. // value: '液氨',
  695. // },
  696. ],
  697. axisLine: {
  698. lineStyle: {
  699. color: '#ccc'
  700. }
  701. }
  702. },
  703. yAxis: {
  704. name: '数量',
  705. splitLine: {
  706. show: false
  707. },
  708. axisLine: {
  709. lineStyle: {
  710. color: '#fff'
  711. }
  712. }
  713. },
  714. series: [
  715. // {
  716. // // name: '电话',
  717. // type: 'line',
  718. // data: [
  719. // con[0].name,
  720. // con[1].name,
  721. // con[2].name,
  722. // con[3].name,
  723. // con[4].name
  724. // ]
  725. // },
  726. {
  727. name: '数量',
  728. type: 'line',
  729. data: [
  730. con[0].number,
  731. con[1].number,
  732. con[2].number,
  733. con[3].number,
  734. con[4].number
  735. ]
  736. }
  737. ],
  738. });
  739. }
  740. }
  741. });
  742. }
  743. // function parthtmc() {
  744. // $.ajax({
  745. // type: "get",
  746. // url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
  747. // async: true,
  748. // dataType: "json",
  749. // data: {
  750. // // date:
  751. // },
  752. // success: function(data) {
  753. // if(data.state.toLowerCase() == "success") {
  754. // var con = data.rows;
  755. // container8.setOption({
  756. // title: {
  757. // text: '反馈类型',
  758. // textStyle: {
  759. // //文字颜色
  760. // color: '#00e9ff',
  761. // //字体大小
  762. // fontSize: 18
  763. // },
  764. // x: 'center'
  765. // },
  766. // color: ['#3398DB'],
  767. // tooltip: {
  768. // trigger: 'axis',
  769. // axisPointer: { // 坐标轴指示器,坐标轴触发有效
  770. // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  771. // }
  772. // },
  773. // grid: {
  774. // left: '3%',
  775. // right: '4%',
  776. // bottom: '13%',
  777. // containLabel: true
  778. // },
  779. // xAxis: [{
  780. // type: 'category',
  781. // data: [
  782. // con[0].name,
  783. // con[1].name,
  784. // con[2].name,
  785. // con[3].name,
  786. // con[4].name
  787. // // {
  788. // // value: '咨询',
  789. // // },
  790. // // {
  791. // // value: '投诉',
  792. // // },
  793. // // {
  794. // // value: '抽检',
  795. // // },
  796. // // {
  797. // // value: '建议及其他',
  798. // // },
  799. //
  800. // ],
  801. // axisTick: {
  802. // alignWithLabel: true
  803. // },
  804. // axisLine: {
  805. // lineStyle: {
  806. // color: '#ccc'
  807. // }
  808. // }
  809. // }],
  810. // yAxis: [{
  811. // type: 'value',
  812. // axisLine: {
  813. // lineStyle: {
  814. // color: '#fff'
  815. // }
  816. // }
  817. // }],
  818. // series: [{
  819. // name: '数量',
  820. // type: 'bar',
  821. // barWidth: '60%',
  822. // data: [
  823. // con[0].number,
  824. // con[1].number,
  825. // con[2].number,
  826. // con[3].number,
  827. // con[4].number
  828. // ]
  829. // }]
  830. // });
  831. // }
  832. // }
  833. // });
  834. // }