Nessuna descrizione

index.js 36KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795
  1. //一级
  2. var myChart = echarts.init(document.getElementById('main'));
  3. var myChart1 = echarts.init(document.getElementById('main1'));
  4. var myChart3 = echarts.init(document.getElementById('main3'));
  5. var img = './images/frame.png'
  6. chart1(); //话务坐席情况
  7. chart2(); //受理渠道统计
  8. chart3(); //今日受理量统计
  9. chart4(); //受理关键词热度分析
  10. areaMap(); //地图
  11. traffic_chart()
  12. acceptance_chart()
  13. channel_chart()
  14. keyword_chart()
  15. function chart1() {
  16. option = {
  17. legend: {
  18. top: "20",
  19. x: "center",
  20. textStyle: {
  21. fontSize: 12,
  22. color: "rgba(101, 213, 255, 1)"
  23. },
  24. icon: "path://M512 881.777778 512 881.777778C716.222629 881.777778 881.777778 716.222629 881.777778 512 881.777778 307.777371 716.222629 142.222222 512 142.222222 307.777373 142.222222 142.222222 307.777371 142.222222 512 142.222222 716.222629 307.777373 881.777778 512 881.777778L512 881.777778ZM512 1024 512 1024C229.230208 1024 0 794.769789 0 512 0 229.230211 229.230208 0 512 0 794.769789 0 1024 229.230211 1024 512 1024 794.769789 794.769789 1024 512 1024L512 1024Z",
  25. itemWidth: 8, // 设置宽度
  26. itemHeight: 8, // 设置高度、
  27. itemGap: 12 // 设置间距
  28. },
  29. tooltip: {
  30. trigger: 'item',
  31. axisPointer: {
  32. show: true,
  33. type: 'line',
  34. lineStyle: {
  35. type: 'dashed'
  36. }
  37. },
  38. textStyle: {
  39. color: '#ffe400',
  40. fontSize: '20',
  41. fontWeight: '500'
  42. },
  43. position: 'top',
  44. backgroundColor: 'rgba(250,250,250,0)',
  45. transitionDuration: 0.4,
  46. formatter: function(params) {
  47. return '<div style="background-image: url(images/reminder_box2.png);width:80px;height:43px;line-height:40px;background-size: 100% 100%;text-align:center;">' +
  48. params.value + '</div>';
  49. }
  50. },
  51. grid: {
  52. right: "5%",
  53. top: "20%",
  54. left: "5%",
  55. bottom: "5%",
  56. containLabel: true
  57. },
  58. xAxis: {
  59. type: "category",
  60. boundaryGap: true,
  61. data: ['坐席数量', '签入', '通话中', '话后处理', '置忙', '置闲', '离线'],
  62. axisLabel: {
  63. //坐标轴刻度标签的相关设置。
  64. interval: 0, //设置为 1,表示『隔一个标签显示一个标签』
  65. // margin:15,
  66. textStyle: {
  67. color: "#fff",
  68. fontStyle: "normal",
  69. fontSize: 10
  70. }
  71. },
  72. axisTick: {
  73. //坐标轴刻度相关设置。
  74. show: false
  75. },
  76. axisLine: {
  77. //坐标轴轴线相关设置
  78. lineStyle: {
  79. color: "#036376"
  80. }
  81. },
  82. splitLine: {
  83. //坐标轴在 grid 区域中的分隔线。
  84. show: false,
  85. lineStyle: {
  86. color: "rgba(77, 128, 254, 0.2)"
  87. }
  88. }
  89. },
  90. yAxis: [{
  91. type: "value",
  92. splitNumber: 3,
  93. axisLabel: {
  94. textStyle: {
  95. color: "#fff",
  96. fontStyle: "normal",
  97. fontSize: 12
  98. },
  99. formatter: function() {
  100. return "";
  101. }
  102. },
  103. axisLine: {
  104. show: false
  105. },
  106. axisTick: {
  107. show: false
  108. },
  109. splitLine: {
  110. show: false,
  111. lineStyle: {
  112. color: "rgba(77, 128, 254, 0.2)"
  113. }
  114. }
  115. }],
  116. series: [{
  117. type: "pictorialBar",
  118. barWidth: "75%",
  119. stack: "总量",
  120. label: {
  121. normal: {
  122. show: false
  123. }
  124. },
  125. itemStyle: {
  126. normal: {
  127. color: {
  128. type: "linear",
  129. x: 0,
  130. y: 0,
  131. x2: 0,
  132. y2: 1,
  133. colorStops: [{
  134. offset: 0,
  135. color: "#00edfc" // 0% 处的颜色
  136. },
  137. {
  138. offset: 1,
  139. color: "#05293d" // 100% 处的颜色
  140. }
  141. ],
  142. globalCoord: false // 缺省为 false
  143. } //渐变颜色
  144. }
  145. },
  146. emphasis: {
  147. itemStyle: {
  148. color: new echarts.graphic.LinearGradient(
  149. 0, 0, 0, 1,
  150. [{
  151. offset: 0,
  152. color: '#fde301'
  153. },
  154. {
  155. offset: 1,
  156. color: '#0a2f3e'
  157. }
  158. ]
  159. )
  160. }
  161. },
  162. symbol: "path://M12.000,-0.000 C12.000,-0.000 16.074,60.121 22.731,60.121 C26.173,60.121 -3.234,60.121 0.511,60.121 C7.072,60.121 12.000,-0.000 12.000,-0.000 Z",
  163. data: [901, 845, 750, 875, 654, 832, 600]
  164. }],
  165. };
  166. myChart.setOption(option);
  167. }
  168. function chart2() {
  169. option = {
  170. // backgroundColor: '#031d33',
  171. "textStyle": {
  172. "color": "#c0c3cd",
  173. "fontSize": 10
  174. },
  175. "toolbox": {
  176. "show": false,
  177. "feature": {
  178. "saveAsImage": {
  179. "backgroundColor": "#031245"
  180. },
  181. "restore": {}
  182. },
  183. "iconStyle": {
  184. "borderColor": "#c0c3cd"
  185. }
  186. },
  187. "legend": {
  188. "top": 10,
  189. "itemWidth": 8,
  190. "itemHeight": 8,
  191. "icon": "circle",
  192. "left": "center",
  193. "padding": 0,
  194. "textStyle": {
  195. "color": "#c0c3cd",
  196. "fontSize": 10,
  197. "padding": [2, 0, 0, 0]
  198. }
  199. },
  200. "color": ["#63caff", "#49beff", "#395568", "#395568", "#395568", "#6c93ee", "#a9abff", "#f7a23f", "#27bae7",
  201. "#ff6d9d", "#cb79ff", "#f95b5a", "#ccaf27", "#38b99c", "#93d0ff", "#bd74e0", "#fd77da", "#dea700"
  202. ],
  203. "grid": {
  204. "containLabel": true,
  205. "left": 20,
  206. "right": 20,
  207. "bottom": 10,
  208. "top": 40
  209. },
  210. "xAxis": {
  211. "nameTextStyle": {
  212. "color": "#c0c3cd",
  213. "padding": [0, 0, -10, 0],
  214. "fontSize": 10
  215. },
  216. "axisLabel": {
  217. "color": "#c0c3cd",
  218. "fontSize": 10,
  219. "interval": 0
  220. },
  221. "axisTick": {
  222. "lineStyle": {
  223. "color": "#384267",
  224. "width": 1
  225. },
  226. "show": true
  227. },
  228. "splitLine": {
  229. "show": false
  230. },
  231. "axisLine": {
  232. "lineStyle": {
  233. "color": "#384267",
  234. "width": 1,
  235. "type": "solid"
  236. },
  237. "show": true
  238. },
  239. "data": ["电话", "市长信箱", "人名网", "连线政府", "省政务网", "微信"],
  240. "type": "category"
  241. },
  242. "yAxis": {
  243. "nameTextStyle": {
  244. "color": "#c0c3cd",
  245. "padding": [0, 0, 10, -5],
  246. "fontSize": 10
  247. },
  248. "axisLabel": {
  249. "color": "#c0c3cd",
  250. "fontSize": 10
  251. },
  252. "axisTick": {
  253. "lineStyle": {
  254. "color": "#384267",
  255. "width": 1
  256. },
  257. "show": true
  258. },
  259. "splitLine": {
  260. "show": true,
  261. "lineStyle": {
  262. "color": "#384267",
  263. "type": "dashed"
  264. }
  265. },
  266. "axisLine": {
  267. "lineStyle": {
  268. "color": "#384267",
  269. "width": 1,
  270. "type": "solid"
  271. },
  272. "show": true,
  273. // "symbol":['none', 'arrow'],
  274. "symbol": ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'],
  275. 'symbolOffset': 5,
  276. 'symbolSize': [35, 38],
  277. },
  278. "name": "条"
  279. },
  280. "series": [{
  281. "data": [1500, 1148, 756, 1395, 1750, 1148],
  282. "type": "bar",
  283. "barMaxWidth": "auto",
  284. "barWidth": 15,
  285. "itemStyle": {
  286. "color": {
  287. "x": 0,
  288. "y": 0,
  289. "x2": 0,
  290. "y2": 1,
  291. "type": "linear",
  292. "global": false,
  293. "colorStops": [{
  294. "offset": 0,
  295. "color": "#3ffeea"
  296. }, {
  297. "offset": 1,
  298. "color": "#0181ff"
  299. }]
  300. },
  301. barBorderRadius: [30, 30, 0, 0]
  302. },
  303. "label": {
  304. "show": false,
  305. "position": "top",
  306. "distance": 10,
  307. "color": "#fff",
  308. "position": [30, 10],
  309. }
  310. }, {
  311. "data": [1, 1, 1, 1, 1, 1],
  312. "type": "pictorialBar",
  313. "barMaxWidth": "20",
  314. "symbol": "none",
  315. },
  316. {
  317. // "data": [1500, 1148, 756, 1395, 1750, 1148],
  318. "type": "pictorialBar",
  319. "barMaxWidth": "20",
  320. "symbolPosition": "end",
  321. "symbol": "none",
  322. "symbolOffset": [0, "-50%"],
  323. "symbolSize": [30, 12],
  324. "zlevel": 1
  325. },
  326. {
  327. "data": [2000, 2000, 2000, 2000, 2000, 2000],
  328. "type": "bar",
  329. "barMaxWidth": "auto",
  330. "barWidth": 15,
  331. "barGap": "-100%",
  332. "zlevel": -1
  333. }, {
  334. "data": [1, 1, 1, 1, 1, 1],
  335. "type": "pictorialBar",
  336. "barMaxWidth": "20",
  337. "symbol": "none",
  338. "symbolOffset": [0, "50%"],
  339. "symbolSize": [30, 15],
  340. "zlevel": -2
  341. }, {
  342. "data": [2000, 2000, 2000, 2000, 2000, 2000],
  343. "type": "pictorialBar",
  344. "barMaxWidth": "20",
  345. "symbolPosition": "end",
  346. "symbol": "circle",
  347. "symbolOffset": [0, "-60%"],
  348. "symbolSize": [15, 12],
  349. "zlevel": -1
  350. },
  351. ],
  352. "tooltip": {
  353. "trigger": "axis",
  354. "show": false
  355. }
  356. }
  357. myChart1.setOption(option);
  358. }
  359. function chart3() {
  360. var traffic = [{
  361. name: '呼出',
  362. value: 304
  363. }, {
  364. name: '呼入',
  365. value: 600
  366. }, {
  367. name: '接通',
  368. value: 296
  369. }];
  370. var workOrder = [{
  371. name: '处理',
  372. value: 304
  373. }, {
  374. name: '录入',
  375. value: 600
  376. }, {
  377. name: '完结',
  378. value: 296
  379. }];
  380. acceptStatistics('main2', traffic)
  381. acceptStatistics('main5', workOrder)
  382. }
  383. function acceptStatistics(dom, dataList) {
  384. let myChart = echarts.init(document.getElementById(dom));
  385. var data = [];
  386. var color = ['#00ffff', '#ffe000', '#006ced']
  387. for (var i = 0; i < dataList.length; i++) {
  388. data.push({
  389. value: dataList[i].value,
  390. name: dataList[i].name,
  391. itemStyle: {
  392. normal: {
  393. borderWidth: 3,
  394. shadowBlur: 10,
  395. borderColor: color[i],
  396. shadowColor: color[i]
  397. }
  398. }
  399. });
  400. }
  401. var seriesOption = [{
  402. name: '',
  403. type: 'pie',
  404. clockWise: false,
  405. radius: [35, 37],
  406. hoverAnimation: false,
  407. itemStyle: {
  408. normal: {
  409. label: {
  410. show: true,
  411. position: 'outside',
  412. color: '#ddd',
  413. formatter: function(params) {
  414. if (params.name !== '') {
  415. return params.name + ':' + params.value;
  416. } else {
  417. return '';
  418. }
  419. },
  420. padding: [0, -50, 25, -30]
  421. },
  422. labelLine: {
  423. length: 0,
  424. length2: 40,
  425. show: true,
  426. color: '#00ffff',
  427. lineStyle: {
  428. width: 2,
  429. join: 'bevel'
  430. },
  431. minTurnAngle: 180
  432. },
  433. borderWidth: 1,
  434. }
  435. },
  436. data: data
  437. }];
  438. option = {
  439. color: color,
  440. title: {
  441. text: '',
  442. top: '48%',
  443. textAlign: "center",
  444. left: "49%",
  445. textStyle: {
  446. color: '#fff',
  447. fontSize: 22,
  448. fontWeight: '400'
  449. }
  450. },
  451. graphic: {
  452. elements: [{
  453. type: "image",
  454. z: 3,
  455. style: {
  456. image: img,
  457. width: 59,
  458. height: 59
  459. },
  460. left: 'center',
  461. top: 'center',
  462. position: [100, 100]
  463. }]
  464. },
  465. tooltip: {
  466. show: false
  467. },
  468. toolbox: {
  469. show: false
  470. },
  471. series: seriesOption
  472. }
  473. myChart.setOption(option);
  474. }
  475. function chart4() {
  476. var reslult = [{
  477. name: "劳动和社会保障",
  478. value: 90,
  479. color: "#d1c00d",
  480. position: [0, 50],
  481. fontSize: "14",
  482. number: "4",
  483. },
  484. {
  485. name: "公共安全",
  486. value: 70,
  487. color: "#d1c00d",
  488. position: [22, 40],
  489. fontSize: "14",
  490. number: "4",
  491. },
  492. {
  493. name: "环境保护",
  494. value: 65,
  495. color: "#d1c00d",
  496. position: [25, 65],
  497. number: "4",
  498. fontSize: "14",
  499. },
  500. {
  501. name: "公共服务",
  502. value: 95,
  503. color: "#064d60",
  504. position: [45, 50],
  505. number: "4",
  506. fontSize: "16"
  507. },
  508. {
  509. name: "文体教育",
  510. value: 75,
  511. color: "#03d1d3",
  512. position: [95, 66],
  513. fontSize: "14",
  514. number: "4",
  515. },
  516. {
  517. name: "营商管理",
  518. value: 65,
  519. color: "#03d1d3",
  520. position: [70, 58],
  521. fontSize: "14",
  522. number: "4",
  523. },
  524. {
  525. name: "卫生健康",
  526. value: 65,
  527. color: "#00FFFF",
  528. position: [70, 38],
  529. number: "4",
  530. fontSize: "14",
  531. },
  532. {
  533. name: "交通管理",
  534. value: 75,
  535. color: "#00FFFF",
  536. position: [90, 47],
  537. fontSize: "14",
  538. number: "4",
  539. },
  540. ];
  541. var data = [];
  542. // 渲染数据,并写入chart
  543. reslult.map((item) => {
  544. data.push({
  545. name: item.name,
  546. value: item.position,
  547. symbolSize: item.value,
  548. label: {
  549. normal: {
  550. formatter: function(param) {
  551. var newParamsName = ""; //返回文字格式
  552. var paramsNameNumber = param.name.length; //获取显示文字长度
  553. var number = parseInt(item.number); //超过多少字换行
  554. var rowNumber = Math.ceil(paramsNameNumber / number); //最多能显示几行
  555. if (paramsNameNumber > number) {
  556. //如果长度大于每行最多显示的字数
  557. for (var p = 0; p < rowNumber; p++) {
  558. //循环次数就是行数
  559. var tempStr = ""; //每次截取的字符
  560. var start = p * number; //截取的起点
  561. var end = start + number; //截取的终点
  562. if (p == rowNumber - 1) {
  563. //最后一行就不换行了
  564. tempStr = param.name.substring(start);
  565. } else {
  566. tempStr = param.name.substring(start, end) + "\n";
  567. }
  568. newParamsName += tempStr; //拼接字符串
  569. }
  570. } else {
  571. newParamsName = param.name; //如果小于每行最多显示的字数就返回原来的字符串
  572. }
  573. return newParamsName;
  574. },
  575. show: true,
  576. textStyle: {
  577. fontSize: item.fontSize,
  578. fontFamily: "Microsoft YaHei",
  579. color: "#FFFFFF",
  580. fontWeight: "bold",
  581. opacity: 1,
  582. },
  583. },
  584. },
  585. itemStyle: {
  586. normal: { //右 下 左
  587. color: new echarts.graphic.RadialGradient(0, 0, 1, [{
  588. offset: 0.2,
  589. color: "#2a413b",
  590. },
  591. {
  592. offset: 1,
  593. color: item.color,
  594. },
  595. ]),
  596. opacity: 1,
  597. borderWidth: 1,
  598. borderColor: item.color,
  599. },
  600. },
  601. });
  602. });
  603. option = {
  604. // backgroundColor:'#092844',
  605. grid: {
  606. show: false,
  607. top: 10,
  608. bottom: 10,
  609. },
  610. xAxis: [{
  611. gridIndex: 0,
  612. type: "value",
  613. show: false,
  614. min: 0,
  615. max: 100,
  616. nameLocation: "middle",
  617. nameGap: 5,
  618. }, ],
  619. yAxis: [{
  620. gridIndex: 0,
  621. min: 0,
  622. show: false,
  623. max: 100,
  624. nameLocation: "middle",
  625. nameGap: 30,
  626. }, ],
  627. series: [{
  628. type: "scatter",
  629. symbol: "circle",
  630. symbolSize: 120,
  631. label: {
  632. normal: {
  633. show: true,
  634. formatter: "{b}",
  635. color: "#fff",
  636. textStyle: {
  637. fontSize: "20",
  638. },
  639. },
  640. },
  641. animationDurationUpdate: 500,
  642. animationEasingUpdate: 500,
  643. animationDelay: function(idx) {
  644. // 越往后的数据延迟越大
  645. return idx * 100;
  646. },
  647. data: data,
  648. }, ],
  649. }
  650. myChart3.setOption(option)
  651. }
  652. function areaMap() {
  653. $('.lzmap,.aymap,.lamap,.bgmap,.gxmap,.ydmap,.wfmap,.tymap,.nhmap,.hxmap').mouseleave(function(e) {
  654. $('.wrap').css({
  655. 'display': 'none'
  656. })
  657. })
  658. $('.map').mouseover(function(e) {
  659. if (e.target.tagName != 'LI') {
  660. return;
  661. }
  662. if ($(e.target).text() == '林州市') {
  663. $('.wrap').css({
  664. 'display': 'block',
  665. 'top': '30px',
  666. 'left': '35px'
  667. })
  668. }
  669. if ($(e.target).text() == '安阳县') {
  670. $('.wrap').css({
  671. 'display': 'block',
  672. 'top': '-59px',
  673. 'left': '161px'
  674. })
  675. }
  676. if ($(e.target).text() == '滑县') {
  677. $('.wrap').css({
  678. 'display': 'block',
  679. 'top': '343px',
  680. 'left': '439px'
  681. })
  682. }
  683. if ($(e.target).text() == '龙安区') {
  684. $('.wrap').css({
  685. 'display': 'block',
  686. 'top': '-53px',
  687. 'left': '240px'
  688. })
  689. }
  690. if ($(e.target).text() == '北关区') {
  691. $('.wrap').css({
  692. 'display': 'block',
  693. 'top': '-58px',
  694. 'left': '279px'
  695. })
  696. }
  697. if ($(e.target).text() == '高新区') {
  698. $('.wrap').css({
  699. 'display': 'block',
  700. 'top': '-26px',
  701. 'left': '270px'
  702. })
  703. }
  704. if ($(e.target).text() == '殷都区') {
  705. $('.wrap').css({
  706. 'display': 'block',
  707. 'top': '-13px',
  708. 'left': '228px'
  709. })
  710. }
  711. if ($(e.target).text() == '文峰区') {
  712. $('.wrap').css({
  713. 'display': 'block',
  714. 'top': '-13px',
  715. 'left': '300px'
  716. })
  717. }
  718. if ($(e.target).text() == '汤阴县') {
  719. $('.wrap').css({
  720. 'display': 'block',
  721. 'top': '90px',
  722. 'left': '327px'
  723. })
  724. }
  725. if ($(e.target).text() == '内黄县') {
  726. $('.wrap').css({
  727. 'display': 'block',
  728. 'top': '76px',
  729. 'left': '501px'
  730. })
  731. }
  732. })
  733. }
  734. //二级大屏数据
  735. $('.call_situation').click(function() {
  736. $('.bulletFrame').show();
  737. $('.traffic_wrap').show();
  738. $('.traffic_wrap').siblings().hide()
  739. })
  740. $('.accept_statistics').click(function() {
  741. $('.bulletFrame').show();
  742. $('.acceptance_wrap').show();
  743. $('.acceptance_wrap').siblings().hide()
  744. })
  745. $('.accept_channel').click(function() {
  746. $('.bulletFrame').show();
  747. $('.channel_wrap').show();
  748. $('.channel_wrap').siblings().hide()
  749. })
  750. $('.key_word').click(function() {
  751. $('.bulletFrame').show();
  752. $('.keyword_wrap').show();
  753. $('.keyword_wrap').siblings().hide()
  754. })
  755. $('.time_statistics').click(function() {
  756. $('.bulletFrame').show();
  757. $('.timeSta_wrap').show();
  758. $('.timeSta_wrap').siblings().hide()
  759. })
  760. $('.close_icon').click(function() {
  761. $('.bulletFrame').hide();
  762. })
  763. function traffic_chart() {
  764. let trafficChart = echarts.init(document.getElementById('traffic'));
  765. trafficChart.resize();
  766. let option = {
  767. // color: ['#8effad', '#2ddffe', '#39a5fc', '#ff9126', '#fa0084'],
  768. tooltip: {
  769. trigger: 'axis',
  770. axisPointer: {
  771. show: true,
  772. type: 'line',
  773. lineStyle: {
  774. type: 'dashed'
  775. }
  776. },
  777. textStyle: {
  778. color: '#ffe400',
  779. fontSize: '12'
  780. },
  781. // position:'top',
  782. backgroundColor: 'rgba(250,250,250,0)',
  783. // transitionDuration: 0.4,
  784. formatter: function(params) {
  785. let str =
  786. '<div style="background-image: url(images/secondary_img/reminder_box3.png);width:124px;height:135px;line-height:22px;background-size: 100% 100%;text-align:center;padding-top:8px;">'
  787. params.forEach(function(v, n) {
  788. str += '<div class="contNum" style="">' + v.seriesName + ': ' + v.value + '</div>'
  789. })
  790. str += '</div>';
  791. return str;
  792. }
  793. },
  794. legend: {
  795. data: ['总数', '咨询', '求助', '建议', '投诉']
  796. },
  797. toolbox: {
  798. feature: {
  799. saveAsImage: {}
  800. }
  801. },
  802. grid: {
  803. left: '3%',
  804. right: '4%',
  805. bottom: '3%',
  806. containLabel: true
  807. },
  808. xAxis: [{
  809. type: 'category',
  810. boundaryGap: false,
  811. axisLabel: {
  812. color: "#f4f5f5",
  813. fontSize: 14
  814. },
  815. data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00',
  816. '10:00', '11:00',
  817. '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00',
  818. '21:00', '22:00', '23:00', '24:00'
  819. ]
  820. }],
  821. yAxis: [{
  822. nameTextStyle: {
  823. color: "#f4f5f5",
  824. padding: [0, 0, 10, -5],
  825. fontSize: 10
  826. },
  827. axisLabel: {
  828. color: "#f4f5f5",
  829. fontSize: 10
  830. },
  831. axisTick: {
  832. lineStyle: {
  833. color: "#687f8a",
  834. width: 1
  835. },
  836. show: true
  837. },
  838. splitLine: {
  839. show: true,
  840. lineStyle: {
  841. color: "#687f8a",
  842. type: "dashed"
  843. }
  844. },
  845. axisLine: {
  846. lineStyle: {
  847. color: "#687f8a",
  848. width: 1,
  849. type: "solid"
  850. },
  851. show: true,
  852. // "symbol":['none', 'arrow'],
  853. symbol: ['none',
  854. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  855. ],
  856. symbolOffset: 5,
  857. symbolSize: [35, 38],
  858. },
  859. name: "条"
  860. }],
  861. series: [{
  862. name: '总数',
  863. type: 'line',
  864. stack: '总量',
  865. smooth: true,
  866. showSymbol: false,
  867. lineStyle: {
  868. width: 0
  869. },
  870. areaStyle: {
  871. opacity: 0.8,
  872. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  873. offset: 0,
  874. color: 'rgba(128, 255, 165)'
  875. }, {
  876. offset: 1,
  877. color: 'rgba(1, 191, 236)'
  878. }])
  879. },
  880. emphasis: {
  881. focus: 'series'
  882. },
  883. itemStyle: {
  884. normal: {
  885. color: 'rgb(128, 255, 165)',
  886. borderWidth: 0
  887. }
  888. },
  889. data: [540, 632, 401, 864, 500, 640, 750, 540, 632, 301, 464, 560, 640, 750, 440, 632, 401, 564,
  890. 690, 340, 850, 740, 632, 401, 600
  891. ]
  892. },
  893. {
  894. name: '咨询',
  895. type: 'line',
  896. stack: '总量',
  897. smooth: true,
  898. lineStyle: {
  899. width: 0
  900. },
  901. showSymbol: false,
  902. areaStyle: {
  903. opacity: 0.8,
  904. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  905. offset: 0,
  906. color: 'rgba(0, 221, 255)'
  907. }, {
  908. offset: 1,
  909. color: 'rgba(77, 119, 255)'
  910. }])
  911. },
  912. itemStyle: {
  913. normal: {
  914. color: 'rgb(0, 221, 255)',
  915. borderWidth: 2
  916. }
  917. },
  918. emphasis: {
  919. focus: 'series'
  920. },
  921. data: [120, 282, 111, 234, 220, 340, 310, 120, 282, 111, 234, 220, 340, 310, 120, 282, 111, 234,
  922. 220, 340, 310, 120, 282, 111, 125
  923. ]
  924. },
  925. {
  926. name: '求助',
  927. type: 'line',
  928. stack: '总量',
  929. smooth: true,
  930. lineStyle: {
  931. width: 0
  932. },
  933. showSymbol: false,
  934. areaStyle: {
  935. opacity: 0.8,
  936. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  937. offset: 0,
  938. color: 'rgba(55, 162, 255)'
  939. }, {
  940. offset: 1,
  941. color: 'rgba(116, 21, 219)'
  942. }])
  943. },
  944. itemStyle: {
  945. normal: {
  946. color: 'rgb(55, 162, 255)',
  947. borderWidth: 2
  948. }
  949. },
  950. emphasis: {
  951. focus: 'series'
  952. },
  953. data: [320, 132, 201, 334, 190, 130, 220, 320, 132, 201, 334, 190, 130, 220, 320, 132, 201, 334,
  954. 190, 130, 220, 320, 132, 201, 210
  955. ]
  956. },
  957. {
  958. name: '建议',
  959. type: 'line',
  960. stack: '总量',
  961. smooth: true,
  962. lineStyle: {
  963. width: 0
  964. },
  965. showSymbol: false,
  966. areaStyle: {
  967. opacity: 0.8,
  968. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  969. offset: 0,
  970. color: 'rgba(255, 0, 135)'
  971. }, {
  972. offset: 1,
  973. color: 'rgba(135, 0, 157)'
  974. }])
  975. },
  976. itemStyle: {
  977. normal: {
  978. color: 'rgb(255, 0, 135)',
  979. borderWidth: 2
  980. }
  981. },
  982. emphasis: {
  983. focus: 'series'
  984. },
  985. data: [220, 402, 231, 134, 190, 230, 120, 270, 402, 231, 134, 190, 230, 120, 220, 402, 231, 134,
  986. 190, 230, 120, 220, 402, 231, 156
  987. ]
  988. },
  989. {
  990. name: '投诉',
  991. type: 'line',
  992. stack: '总量',
  993. smooth: true,
  994. lineStyle: {
  995. width: 0
  996. },
  997. showSymbol: false,
  998. label: {
  999. show: true,
  1000. position: 'top'
  1001. },
  1002. areaStyle: {
  1003. opacity: 0.8,
  1004. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1005. offset: 0,
  1006. color: 'rgba(255, 191, 0)'
  1007. }, {
  1008. offset: 1,
  1009. color: 'rgba(224, 62, 76)'
  1010. }])
  1011. },
  1012. itemStyle: {
  1013. normal: {
  1014. color: 'rgb(255, 191, 0)',
  1015. borderWidth: 2
  1016. }
  1017. },
  1018. emphasis: {
  1019. focus: 'series'
  1020. },
  1021. data: [220, 302, 181, 234, 210, 290, 150, 220, 302, 181, 234, 210, 290, 150, 220, 302, 181, 234,
  1022. 210, 290, 150, 220, 302, 181, 106
  1023. ]
  1024. }
  1025. ]
  1026. };
  1027. trafficChart.setOption(option);
  1028. }
  1029. function acceptance_chart() {
  1030. let acceptanceChart = echarts.init(document.getElementById('acceptance'));
  1031. option = {
  1032. tooltip: {
  1033. trigger: 'axis',
  1034. axisPointer: {
  1035. show: true,
  1036. type: 'line',
  1037. lineStyle: {
  1038. type: 'dashed'
  1039. }
  1040. },
  1041. textStyle: {
  1042. color: '#ffe400',
  1043. fontSize: '12'
  1044. },
  1045. // position:'top',
  1046. backgroundColor: 'rgba(250,250,250,0)',
  1047. // transitionDuration: 0.4,
  1048. formatter: function(params) {
  1049. let str =
  1050. '<div style="background-image: url(images/secondary_img/reminder_box3.png);width:124px;height:150px;line-height:22px;background-size: 100% 100%;text-align:center;padding-top:8px;">'
  1051. let connectionRate = (params[1].value / params[0].value).toFixed(1) * 100 + '%';
  1052. let workorderRate = (params[3].value / params[2].value).toFixed(1) * 100 + '%';
  1053. params.splice(2, 0, {
  1054. seriesName: '电话接通率',
  1055. value: connectionRate
  1056. })
  1057. params.splice(5, 0, {
  1058. seriesName: '工单直办率',
  1059. value: workorderRate
  1060. })
  1061. params.forEach(function(v, n) {
  1062. str += '<div class="contNum" style="">' + v.seriesName + ': ' + v.value + '</div>'
  1063. })
  1064. str += '</div>';
  1065. return str;
  1066. }
  1067. },
  1068. legend: {
  1069. data: ['电话呼入量', '电话接通量', '工单录入量', '工单直办量']
  1070. },
  1071. toolbox: {
  1072. feature: {
  1073. saveAsImage: {}
  1074. }
  1075. },
  1076. grid: {
  1077. left: '3%',
  1078. right: '4%',
  1079. bottom: '3%',
  1080. containLabel: true
  1081. },
  1082. xAxis: [{
  1083. type: 'category',
  1084. boundaryGap: false,
  1085. axisLabel: {
  1086. color: "#f4f5f5",
  1087. fontSize: 14
  1088. },
  1089. data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00',
  1090. '10:00', '11:00',
  1091. '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00',
  1092. '21:00', '22:00', '23:00', '24:00'
  1093. ]
  1094. }],
  1095. yAxis: [{
  1096. nameTextStyle: {
  1097. color: "#f4f5f5",
  1098. padding: [0, 0, 10, -5],
  1099. fontSize: 14
  1100. },
  1101. axisLabel: {
  1102. color: "#f4f5f5",
  1103. fontSize: 14
  1104. },
  1105. axisTick: {
  1106. lineStyle: {
  1107. color: "#687f8a",
  1108. width: 1
  1109. },
  1110. show: true
  1111. },
  1112. splitLine: {
  1113. show: true,
  1114. lineStyle: {
  1115. color: "#687f8a",
  1116. type: "dashed"
  1117. }
  1118. },
  1119. axisLine: {
  1120. lineStyle: {
  1121. color: "#687f8a",
  1122. width: 1,
  1123. type: "solid"
  1124. },
  1125. show: true,
  1126. // "symbol":['none', 'arrow'],
  1127. symbol: ['none',
  1128. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1129. ],
  1130. symbolOffset: 5,
  1131. symbolSize: [35, 38],
  1132. },
  1133. name: "条"
  1134. }],
  1135. series: [{
  1136. name: '电话呼入量',
  1137. type: 'line',
  1138. smooth: true,
  1139. // symbol: 'circle',
  1140. symbolSize: 5,
  1141. showSymbol: false,
  1142. lineStyle: {
  1143. normal: {
  1144. width: 1
  1145. }
  1146. },
  1147. areaStyle: {
  1148. normal: {
  1149. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1150. offset: 0,
  1151. color: '#399d85'
  1152. }, {
  1153. offset: 0.8,
  1154. color: '#257f76'
  1155. }], false),
  1156. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1157. shadowBlur: 10
  1158. }
  1159. },
  1160. itemStyle: {
  1161. normal: {
  1162. color: '#74e4a0',
  1163. borderColor: '#74e4a0',
  1164. borderWidth: 2
  1165. }
  1166. },
  1167. data: [50, 72, 81, 94, 100, 102, 110, 125, 145, 152, 165, 172, 150, 142, 131, 130, 120, 115,
  1168. 110, 105, 95, 82, 65, 52, 44
  1169. ]
  1170. }, {
  1171. name: '电话接通量',
  1172. type: 'line',
  1173. smooth: true,
  1174. // symbol: 'circle',
  1175. symbolSize: 5,
  1176. showSymbol: false,
  1177. lineStyle: {
  1178. normal: {
  1179. width: 1
  1180. }
  1181. },
  1182. areaStyle: {
  1183. normal: {
  1184. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1185. offset: 0,
  1186. color: '#2fb2b3'
  1187. }, {
  1188. offset: 0.8,
  1189. color: '#0b4856'
  1190. }], false),
  1191. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1192. shadowBlur: 10
  1193. }
  1194. },
  1195. itemStyle: {
  1196. normal: {
  1197. color: '#2ddffe',
  1198. borderColor: '#2ddffe',
  1199. borderWidth: 2
  1200. }
  1201. },
  1202. data: [40, 50, 55, 65, 72, 85, 92, 100, 115, 121, 134, 145, 140, 133, 125, 115, 102, 95, 82, 70,
  1203. 62, 51, 44, 30, 22
  1204. ]
  1205. }, {
  1206. name: '工单录入量',
  1207. type: 'line',
  1208. smooth: true,
  1209. // symbol: 'circle',
  1210. symbolSize: 5,
  1211. showSymbol: false,
  1212. lineStyle: {
  1213. normal: {
  1214. width: 1
  1215. }
  1216. },
  1217. areaStyle: {
  1218. normal: {
  1219. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1220. offset: 0,
  1221. color: '#157cb8'
  1222. }, {
  1223. offset: 0.8,
  1224. color: '#09354c'
  1225. }], false),
  1226. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1227. shadowBlur: 10
  1228. }
  1229. },
  1230. itemStyle: {
  1231. normal: {
  1232. color: '#39a5fc',
  1233. borderColor: '#39a5fc',
  1234. borderWidth: 2
  1235. }
  1236. },
  1237. data: [20, 32, 45, 55, 62, 71, 84, 90, 98, 110, 115, 120, 118, 112, 105, 95, 82, 71, 64, 50, 50,
  1238. 40, 35, 22, 11
  1239. ]
  1240. }, {
  1241. name: '工单直办量',
  1242. type: 'line',
  1243. smooth: true,
  1244. // symbol: 'circle',
  1245. symbolSize: 5,
  1246. showSymbol: false,
  1247. lineStyle: {
  1248. normal: {
  1249. width: 1
  1250. }
  1251. },
  1252. areaStyle: {
  1253. normal: {
  1254. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1255. offset: 0,
  1256. color: '#dd8d38'
  1257. }, {
  1258. offset: 0.8,
  1259. color: '#225f67'
  1260. }], false),
  1261. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1262. shadowBlur: 10
  1263. }
  1264. },
  1265. itemStyle: {
  1266. normal: {
  1267. color: '#dd8d38',
  1268. borderColor: '#dd8d38',
  1269. borderWidth: 2
  1270. }
  1271. },
  1272. data: [10, 15, 18, 24, 28, 32, 36, 50, 55, 66, 75, 72, 63, 56, 50, 46, 35, 30, 26, 20, 18, 15,
  1273. 12, 10, 5
  1274. ]
  1275. }]
  1276. };
  1277. acceptanceChart.setOption(option);
  1278. }
  1279. function channel_chart() {
  1280. let channelChart = echarts.init(document.getElementById('channel'));
  1281. let data = [{
  1282. level: '电话',
  1283. landArea: 1526
  1284. },
  1285. {
  1286. level: '市长信箱',
  1287. landArea: 890
  1288. },
  1289. {
  1290. level: '人名网',
  1291. landArea: 856
  1292. },
  1293. {
  1294. level: '连线政府',
  1295. landArea: 926
  1296. },
  1297. {
  1298. level: '省政务网',
  1299. landArea: 1756
  1300. },
  1301. {
  1302. level: '微信',
  1303. landArea: 1621
  1304. },
  1305. {
  1306. level: '微博',
  1307. landArea: 1821
  1308. },
  1309. {
  1310. level: '短信平台',
  1311. landArea: 700
  1312. },
  1313. {
  1314. level: '中国政府网',
  1315. landArea: 560
  1316. },
  1317. {
  1318. level: '营商接诉即办',
  1319. landArea: 810
  1320. },
  1321. ]
  1322. const CubeLeft = echarts.graphic.extendShape({
  1323. shape: {
  1324. x: 0,
  1325. y: 0
  1326. },
  1327. buildPath: function(ctx, shape) {
  1328. const xAxisPoint = shape.xAxisPoint
  1329. const c0 = [shape.x, shape.y]
  1330. const c1 = [shape.x - 20, shape.y - 4]
  1331. const c2 = [xAxisPoint[0] - 20, xAxisPoint[1] - 4]
  1332. const c3 = [xAxisPoint[0], xAxisPoint[1]]
  1333. ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1])
  1334. .closePath()
  1335. }
  1336. })
  1337. const CubeRight = echarts.graphic.extendShape({
  1338. shape: {
  1339. x: 0,
  1340. y: 0
  1341. },
  1342. buildPath: function(ctx, shape) {
  1343. const xAxisPoint = shape.xAxisPoint
  1344. const c1 = [shape.x, shape.y]
  1345. const c2 = [xAxisPoint[0], xAxisPoint[1]]
  1346. const c3 = [xAxisPoint[0] + 8, xAxisPoint[1] - 4]
  1347. const c4 = [shape.x + 8, shape.y - 4]
  1348. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  1349. .closePath()
  1350. }
  1351. })
  1352. const CubeTop = echarts.graphic.extendShape({
  1353. shape: {
  1354. x: 0,
  1355. y: 0
  1356. },
  1357. buildPath: function(ctx, shape) {
  1358. // 逆时针 角 y 负数向上 X 负数向左
  1359. const c1 = [shape.x, shape.y]
  1360. const c2 = [shape.x + 8, shape.y - 4]
  1361. const c3 = [shape.x - 11, shape.y - 8]
  1362. const c4 = [shape.x - 20, shape.y - 4]
  1363. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  1364. .closePath()
  1365. }
  1366. })
  1367. echarts.graphic.registerShape('CubeLeft', CubeLeft)
  1368. echarts.graphic.registerShape('CubeRight', CubeRight)
  1369. echarts.graphic.registerShape('CubeTop', CubeTop)
  1370. let MAX = []
  1371. let VALUE = []
  1372. let LEV = []
  1373. let chartData = [].concat(data)
  1374. chartData.forEach(item => {
  1375. VALUE.push(item.landArea)
  1376. LEV.push(item.level)
  1377. })
  1378. let maxItem = [].concat(VALUE).sort((a, b) => b - a)[0]
  1379. let SUM = 0
  1380. for (let item of VALUE) {
  1381. SUM += item
  1382. MAX.push(maxItem)
  1383. }
  1384. option = {
  1385. tooltip: {
  1386. trigger: 'item',
  1387. textStyle: {
  1388. color: '#ffe400',
  1389. fontSize: '14',
  1390. fontWeight: '500'
  1391. },
  1392. position: 'top',
  1393. backgroundColor: 'rgba(250,250,250,0)',
  1394. transitionDuration: 0.4,
  1395. formatter: function(params) {
  1396. return '<div style="background-image: url(images/reminder_box2.png);width:50px;height:33px;line-height:30px;background-size: 100% 100%;text-align:center;">' +
  1397. VALUE[params.dataIndex] + '</div>';
  1398. }
  1399. },
  1400. grid: {
  1401. right: "5%",
  1402. top: "20%",
  1403. left: "5%",
  1404. bottom: "5%",
  1405. containLabel: true
  1406. },
  1407. // grid: {
  1408. // show: false,
  1409. // left: 0,
  1410. // right: 10,
  1411. // bottom: 150,
  1412. // top: 50,
  1413. // containLabel: true
  1414. // },
  1415. xAxis: {
  1416. type: 'category',
  1417. data: LEV,
  1418. axisLine: {
  1419. show: true,
  1420. lineStyle: {
  1421. color: '#687e89'
  1422. }
  1423. },
  1424. offset: 10,
  1425. axisTick: {
  1426. show: false
  1427. },
  1428. axisLabel: {
  1429. fontSize: 12,
  1430. color: '#00FFFE'
  1431. }
  1432. },
  1433. yAxis: [{
  1434. nameTextStyle: {
  1435. color: "#f4f5f5",
  1436. padding: [0, 0, 10, -5],
  1437. fontSize: 14
  1438. },
  1439. axisLabel: {
  1440. color: "#f4f5f5",
  1441. fontSize: 14
  1442. },
  1443. axisTick: {
  1444. lineStyle: {
  1445. color: "#687f8a",
  1446. width: 1
  1447. },
  1448. show: true
  1449. },
  1450. splitLine: {
  1451. show: true,
  1452. lineStyle: {
  1453. color: "#687f8a",
  1454. type: "dashed"
  1455. }
  1456. },
  1457. axisLine: {
  1458. lineStyle: {
  1459. color: "#687f8a",
  1460. width: 1,
  1461. type: "solid"
  1462. },
  1463. show: true,
  1464. // "symbol":['none', 'arrow'],
  1465. symbol: ['none',
  1466. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1467. ],
  1468. symbolOffset: 5,
  1469. symbolSize: [35, 38],
  1470. },
  1471. name: "条"
  1472. }],
  1473. series: [{
  1474. type: 'custom',
  1475. renderItem: (params, api) => {
  1476. const location = api.coord([api.value(0), api.value(1)])
  1477. return {
  1478. type: 'group',
  1479. children: [{
  1480. type: 'CubeLeft',
  1481. shape: {
  1482. api,
  1483. xValue: api.value(0),
  1484. yValue: api.value(1),
  1485. x: location[0],
  1486. y: location[1],
  1487. xAxisPoint: api.coord([api.value(0), 0])
  1488. },
  1489. style: {
  1490. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1491. offset: 0,
  1492. color: '#3fffea'
  1493. }, {
  1494. offset: 1,
  1495. color: '#007eff'
  1496. }])
  1497. }
  1498. }, {
  1499. type: 'CubeRight',
  1500. shape: {
  1501. api,
  1502. xValue: api.value(0),
  1503. yValue: api.value(1),
  1504. x: location[0],
  1505. y: location[1],
  1506. xAxisPoint: api.coord([api.value(0), 0])
  1507. },
  1508. style: {
  1509. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1510. offset: 0,
  1511. color: '#2fbeaf' // 顶部
  1512. }, {
  1513. offset: 1,
  1514. color: '#015fbf' // 底部
  1515. }])
  1516. }
  1517. }, {
  1518. type: 'CubeTop',
  1519. shape: {
  1520. api,
  1521. xValue: api.value(0),
  1522. yValue: api.value(1),
  1523. x: location[0],
  1524. y: location[1],
  1525. xAxisPoint: api.coord([api.value(0), 0])
  1526. },
  1527. style: {
  1528. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1529. offset: 0,
  1530. color: '#9ffff5'
  1531. }, {
  1532. offset: 1,
  1533. color: '#9ffff5'
  1534. }])
  1535. }
  1536. }]
  1537. }
  1538. },
  1539. data: VALUE
  1540. }, {
  1541. type: 'bar',
  1542. label: {
  1543. normal: {
  1544. show: false,
  1545. position: 'top',
  1546. formatter: (e) => {
  1547. switch (e.name) {
  1548. case '6等':
  1549. return VALUE[0]
  1550. case '7等':
  1551. return VALUE[1]
  1552. case '8等':
  1553. return VALUE[2]
  1554. case '9等':
  1555. return VALUE[3]
  1556. case '10等':
  1557. return VALUE[4]
  1558. case '11等':
  1559. return VALUE[5]
  1560. case '12等':
  1561. return VALUE[6]
  1562. }
  1563. },
  1564. fontSize: 10,
  1565. color: '#fff',
  1566. offset: [0, -5]
  1567. }
  1568. },
  1569. itemStyle: {
  1570. color: 'transparent'
  1571. },
  1572. data: MAX
  1573. }]
  1574. }
  1575. channelChart.setOption(option);
  1576. }
  1577. function keyword_chart() {
  1578. let keywordPieChart = echarts.init(document.getElementById('keywordPie'));
  1579. option = {
  1580. legend: [{
  1581. top: '670',
  1582. data: [{
  1583. icon: 'image://./images/secondary_img/1.png',
  1584. name: '人力资源'
  1585. },
  1586. {
  1587. icon: 'image://./images/secondary_img/1.png',
  1588. name: '人力资源1'
  1589. },
  1590. {
  1591. icon: 'image://./images/secondary_img/2.png',
  1592. name: '人力资源2'
  1593. },
  1594. {
  1595. icon: 'image://./images/secondary_img/3.png',
  1596. name: '人力资源3'
  1597. },
  1598. {
  1599. icon: 'image://./images/secondary_img/4.png',
  1600. name: '人力资源4'
  1601. }
  1602. ],
  1603. itemWidth: 30,
  1604. itemHeight: 30
  1605. },
  1606. {
  1607. top: '680',
  1608. data: [{
  1609. icon: 'image://./images/secondary_img/5.png',
  1610. name: '人力资源5'
  1611. },
  1612. {
  1613. icon: 'image://./images/secondary_img/6.png',
  1614. name: '人力资源6'
  1615. },
  1616. {
  1617. icon: 'image://./images/secondary_img/7.png',
  1618. name: '人力资源7'
  1619. },
  1620. {
  1621. icon: 'image://./images/secondary_img/8.png',
  1622. name: '人力资源8'
  1623. },
  1624. {
  1625. icon: 'image://./images/secondary_img/9.png',
  1626. name: '人力资源9'
  1627. }
  1628. ],
  1629. itemWidth: 30,
  1630. itemHeight: 30,
  1631. padding: [40, 0]
  1632. }
  1633. ],
  1634. color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76', '#ff0000', '#e5a0ff', '#9b56ff', '#9b56ff',
  1635. '#68f6ff'
  1636. ],
  1637. series: [{
  1638. name: '访问来源',
  1639. type: 'pie',
  1640. radius: '58%',
  1641. // label: {
  1642. // normal: {
  1643. // position: 'inner',
  1644. // show : false,
  1645. // }
  1646. // },
  1647. data: [{
  1648. value: 1048,
  1649. name: '人力资源'
  1650. },
  1651. {
  1652. value: 735,
  1653. name: '人力资源1'
  1654. },
  1655. {
  1656. value: 580,
  1657. name: '人力资源2'
  1658. },
  1659. {
  1660. value: 484,
  1661. name: '人力资源3'
  1662. },
  1663. {
  1664. value: 300,
  1665. name: '人力资源4'
  1666. },
  1667. {
  1668. value: 1048,
  1669. name: '人力资源5'
  1670. },
  1671. {
  1672. value: 735,
  1673. name: '人力资源6'
  1674. },
  1675. {
  1676. value: 580,
  1677. name: '人力资源7'
  1678. },
  1679. {
  1680. value: 484,
  1681. name: '人力资源8'
  1682. },
  1683. {
  1684. value: 300,
  1685. name: '人力资源9'
  1686. }
  1687. ],
  1688. emphasis: {
  1689. itemStyle: {
  1690. shadowBlur: 10,
  1691. shadowOffsetX: 0,
  1692. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1693. }
  1694. },
  1695. label: {
  1696. normal: {
  1697. show: false,
  1698. formatter: function(params){
  1699. return params.name+':'+params.value
  1700. // return
  1701. },
  1702. },
  1703. emphasis: {
  1704. position: 'left',
  1705. show: true,
  1706. textStyle: {
  1707. fontSize: '14',
  1708. fontWeight: 'bold'
  1709. },
  1710. length: 1
  1711. }
  1712. },
  1713. }]
  1714. };
  1715. keywordPieChart.setOption(option);
  1716. }
  1717. initTable();
  1718. function initTable() {
  1719. var $tableLeft = $('#table_all');
  1720. $tableLeft.bootstrapTable('destroy');
  1721. //先销毁表格
  1722. $tableLeft.bootstrapTable({
  1723. method: "get", //使用get请求到服务器获取数据
  1724. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/Getpatient",
  1725. contentType: "application/x-www-form-urlencoded",
  1726. striped: true, //表格显示条纹
  1727. pagination: true, //启动分页
  1728. pageSize: 10, //每页显示的记录数
  1729. pageNumber: 1, //当前第几页
  1730. fixedColumns: true,
  1731. fixedNumber: 3,
  1732. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  1733. search: false, //是否启用查询
  1734. showColumns: false, //显示下拉框勾选要显示的列
  1735. showRefresh: false, //显示刷新按钮
  1736. sidePagination: "server", //表示服务端请求
  1737. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  1738. //设置为limit可以获取limit, offset, search, sort, order
  1739. queryParamsType: "undefined",
  1740. queryParams: function queryParams(params) { //设置查询参数
  1741. console.log(params)
  1742. var param = {
  1743. PageIndex: params.pageNumber,
  1744. PageSize: params.pageSize,
  1745. };
  1746. return param;
  1747. },
  1748. onLoadSuccess: function(data) { //加载成功时执行
  1749. var newDataL = {};
  1750. newDataL.state = data.state;
  1751. newDataL.message = data.message;
  1752. newDataL.rows = data.data.rows;
  1753. newDataL.total = data.data.total;
  1754. $tableLeft.bootstrapTable('load', newDataL);
  1755. // $('.tool_downs').authorizeOperateButton();
  1756. },
  1757. onLoadError: function() { //加载失败时执行
  1758. layer.msg("加载数据失败", {
  1759. time: 1500,
  1760. icon: 2
  1761. });
  1762. }
  1763. });
  1764. }