cost.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. // function getQuerys(e) {
  2. // if (!e) return "";
  3. // var t = {},
  4. // r = [],
  5. // n = "",
  6. // a = "";
  7. // try {
  8. // var i = [];
  9. // if (e.indexOf("?") >= 0 && (i = e.substring(e.indexOf("?") + 1, e.length).split("&")), i.length > 0) for (var o in i) n = (r = i[o].split("="))[0],
  10. // a = r[1],
  11. // t[n] = a
  12. // } catch(s) {
  13. // t = {}
  14. // }
  15. // return t
  16. // }
  17. // let datetime = getQuerys(window.location.href).today;
  18. // console.log(datetime,window.location.href,getQuerys(window.location.href),getQuerys(window.location.href).today,1)
  19. // if(!datetime){
  20. // datetime = 2024;
  21. // }
  22. // console.log(datetime,2)
  23. function echarts_1(data) {
  24. const myChart = echarts.init(document.getElementById('main1'))
  25. const option = {
  26. xAxis: {
  27. axisLine: {
  28. show: false // 隐藏轴线
  29. },
  30. axisTick: {
  31. show: false // 隐藏分隔线
  32. },
  33. boundaryGap: false, // 坐标轴两边不留白
  34. // 标签文字样式修改
  35. axisLabel: {
  36. color: '#9DA5AF',
  37. margin: 12,
  38. rich: {
  39. a: {
  40. padding: [0, 0, 0, 10] // 左边距 40
  41. },
  42. b: {
  43. padding: [0, 10, 0, 0] // 右边距 40
  44. }
  45. }
  46. },
  47. type: 'category',
  48. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  49. },
  50. yAxis: {
  51. type: 'value',
  52. //背景线
  53. splitLine: {
  54. lineStyle: {
  55. type: 'dashed',
  56. color: ['#EDEEF1']
  57. }
  58. },
  59. axisLabel: {
  60. color: '#9DA5AF',
  61. margin: 20
  62. }
  63. },
  64. tooltip: {
  65. trigger: 'axis',
  66. formatter: params => {
  67. const title = `<div style="font-weight: bold; margin-bottom: 10px">${params[0].axisValue}</div>`
  68. let content = ''
  69. params.forEach(item => {
  70. content += `
  71. <div style="margin-bottom: 6px">
  72. <span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: #187FDD;"></span>
  73. <span>${item.seriesName}:${item.value}</span>
  74. </div>
  75. `
  76. })
  77. return title + content
  78. }
  79. },
  80. grid: {
  81. left: '3%',
  82. right: '4%',
  83. top: '10%',
  84. bottom: '15%',
  85. containLabel: true
  86. },
  87. // legend: {
  88. // orient: 'horizontal', //设置图例朝向
  89. // bottom: 'bottom',
  90. // color:'red',
  91. // },
  92. series: [
  93. {
  94. name: '项目数量',
  95. type: 'line',
  96. smooth: true,
  97. symbol: 'circle',
  98. symbolSize: 8,
  99. itemStyle: {
  100. color: '#187FDD',
  101. normal: {
  102. color: '#fff',
  103. borderColor: '#187FDD',
  104. }
  105. },
  106. lineStyle: {
  107. // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  108. color: {
  109. type: 'linear',
  110. x: 0,
  111. y: 0,
  112. x2: 1,
  113. y2: 0,
  114. colorStops: [{
  115. offset: 0, color: 'rgb(72,177,203)' // 0% 处的颜色
  116. }, {
  117. offset: 1, color: 'rgb(72,116,203)' // 100% 处的颜色
  118. }],
  119. globalCoord: false // 缺省为 false
  120. },
  121. width: 4,
  122. },
  123. itemStyle: {
  124. color: '#FFFFFF',
  125. borderColor: {
  126. type: 'linear',
  127. x: 0,
  128. y: 0,
  129. x2: 0,
  130. y2: 1,
  131. colorStops: [
  132. {
  133. offset: 0,
  134. color: 'rgb(72,177,203)', //0%处的颜色
  135. },
  136. {
  137. offset: 1,
  138. color: 'rgb(72,177,203)', //100%处的颜色
  139. },
  140. ],
  141. global: false,
  142. borderWidth: 4,
  143. },
  144. },
  145. areaStyle: {
  146. normal: {
  147. //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
  148. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  149. offset: 0,
  150. color: 'rgba(72,177,203,0.39)'
  151. }, {
  152. offset: .34,
  153. color: 'rgba(56,155,255,0.25)'
  154. }, {
  155. offset: 1,
  156. color: 'rgba(38,197,254,0.00)'
  157. }])
  158. }
  159. },//区域颜色渐变
  160. // color: '#4bc8db',
  161. data: [data['all_sent_review_cost']['1']['project_number'],
  162. data['all_sent_review_cost']['2']['project_number'],
  163. data['all_sent_review_cost']['3']['project_number'],
  164. data['all_sent_review_cost']['4']['project_number'],
  165. data['all_sent_review_cost']['5']['project_number'],
  166. data['all_sent_review_cost']['6']['project_number'],
  167. data['all_sent_review_cost']['7']['project_number'],
  168. data['all_sent_review_cost']['8']['project_number'],
  169. data['all_sent_review_cost']['9']['project_number'],
  170. data['all_sent_review_cost']['10']['project_number'],
  171. data['all_sent_review_cost']['11']['project_number'],
  172. data['all_sent_review_cost']['12']['project_number'],]
  173. }
  174. ]
  175. }
  176. myChart.setOption(option);
  177. //响应式布局
  178. // const resize = _.throttle(() => {
  179. // myChart.resize()
  180. // }, 1000)
  181. // window.addEventListener('resize', resize)
  182. }
  183. function echarts_2(data) {
  184. const myChart = echarts.init(document.getElementById('main2'))
  185. const option = {
  186. legend: {
  187. orient: 'horizontal', //设置图例朝向
  188. bottom: 'bottom',
  189. },
  190. tooltip: {},
  191. grid: {
  192. left: '3%',
  193. right: '4%',
  194. top: '10%',
  195. bottom: '15%',
  196. containLabel: true
  197. },
  198. dataset: {
  199. source: [
  200. ['product', '送审金额', '审定金额'],
  201. ['1月', data['all_sent_review_cost']['1']['all_sent_amount'], data['all_sent_review_cost']['1']['all_authorize_amount']],
  202. ['2月', data['all_sent_review_cost']['2']['all_sent_amount'], data['all_sent_review_cost']['2']['all_authorize_amount']],
  203. ['3月', data['all_sent_review_cost']['3']['all_sent_amount'], data['all_sent_review_cost']['3']['all_authorize_amount']],
  204. ['4月', data['all_sent_review_cost']['4']['all_sent_amount'], data['all_sent_review_cost']['4']['all_authorize_amount']],
  205. ['5月', data['all_sent_review_cost']['5']['all_sent_amount'], data['all_sent_review_cost']['5']['all_authorize_amount']],
  206. ['6月', data['all_sent_review_cost']['6']['all_sent_amount'], data['all_sent_review_cost']['6']['all_authorize_amount']],
  207. ['7月', data['all_sent_review_cost']['7']['all_sent_amount'], data['all_sent_review_cost']['7']['all_authorize_amount']],
  208. ['8月', data['all_sent_review_cost']['8']['all_sent_amount'], data['all_sent_review_cost']['8']['all_authorize_amount']],
  209. ['9月', data['all_sent_review_cost']['9']['all_sent_amount'], data['all_sent_review_cost']['9']['all_authorize_amount']],
  210. ['10月', data['all_sent_review_cost']['10']['all_sent_amount'], data['all_sent_review_cost']['10']['all_authorize_amount']],
  211. ['11月', data['all_sent_review_cost']['11']['all_sent_amount'], data['all_sent_review_cost']['11']['all_authorize_amount']],
  212. ['12月', data['all_sent_review_cost']['12']['all_sent_amount'], data['all_sent_review_cost']['12']['all_authorize_amount']],
  213. ]
  214. },
  215. xAxis: {
  216. type: 'category',
  217. axisLine: {
  218. show: false // 隐藏轴线
  219. },
  220. axisTick: {
  221. show: false // 隐藏分隔线
  222. },
  223. },
  224. yAxis: {},
  225. // Declare several bar series, each will be mapped
  226. // to a column of dataset.source by default.
  227. series: [
  228. {
  229. type: 'bar',
  230. itemStyle: {
  231. barBorderRadius: [7, 7, 0, 0],
  232. },
  233. color: {
  234. type: 'linear',
  235. x: 0,
  236. y: 0,
  237. x2: 0,
  238. y2: 1,
  239. colorStops: [{
  240. offset: 0, color: '#18c1f6' // 0% 处的颜色
  241. }, {
  242. offset: 1, color: '#5199f4' // 100% 处的颜色
  243. }],
  244. global: false // 缺省为 false
  245. },
  246. }, {
  247. type: 'bar',
  248. itemStyle: {
  249. barBorderRadius: [7, 7, 0, 0],
  250. },
  251. color: {
  252. type: 'linear',
  253. x: 0,
  254. y: 0,
  255. x2: 0,
  256. y2: 1,
  257. colorStops: [{
  258. offset: 0, color: 'rgb(251,189,108)' // 0% 处的颜色
  259. }, {
  260. offset: 1, color: 'rgb(251,163,99)' // 100% 处的颜色
  261. }],
  262. global: false // 缺省为 false
  263. },
  264. }
  265. ]
  266. }
  267. myChart.setOption(option);
  268. }
  269. function echarts_3(data) {
  270. const myChart = echarts.init(document.getElementById('main3'))
  271. const option = {
  272. xAxis: {
  273. axisLine: {
  274. show: false // 隐藏轴线
  275. },
  276. axisTick: {
  277. show: false // 隐藏分隔线
  278. },
  279. type: 'category',
  280. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  281. },
  282. yAxis: {
  283. type: 'value'
  284. },
  285. legend: {
  286. orient: 'horizontal', //设置图例朝向
  287. bottom: 'bottom'
  288. },
  289. tooltip: {},
  290. grid: {
  291. left: '3%',
  292. right: '4%',
  293. top: '10%',
  294. bottom: '15%',
  295. containLabel: true
  296. },
  297. series: [
  298. {
  299. name: '送审服务费',
  300. data: [data['all_sent_review_cost']['1']['all_sent_review_cost'],
  301. data['all_sent_review_cost']['2']['all_sent_review_cost'],
  302. data['all_sent_review_cost']['3']['all_sent_review_cost'],
  303. data['all_sent_review_cost']['4']['all_sent_review_cost'],
  304. data['all_sent_review_cost']['5']['all_sent_review_cost'],
  305. data['all_sent_review_cost']['6']['all_sent_review_cost'],
  306. data['all_sent_review_cost']['7']['all_sent_review_cost'],
  307. data['all_sent_review_cost']['8']['all_sent_review_cost'],
  308. data['all_sent_review_cost']['9']['all_sent_review_cost'],
  309. data['all_sent_review_cost']['10']['all_sent_review_cost'],
  310. data['all_sent_review_cost']['11']['all_sent_review_cost'],
  311. data['all_sent_review_cost']['12']['all_sent_review_cost']],
  312. type: 'bar',
  313. // color:'#2452b2',
  314. itemStyle: { // 使用方法二的写法
  315. barBorderRadius: [7, 7, 0, 0],
  316. color: {
  317. type: 'linear',
  318. x: 0, //右
  319. y: 0, //下
  320. x2: 0, //左
  321. y2: 1, //上
  322. colorStops: [
  323. {
  324. offset: 0,
  325. color: 'rgb(73,119,193)' // 0% 处的颜色
  326. },
  327. {
  328. offset: 1,
  329. color: 'rgb(159,175,209)' // 100% 处的颜色
  330. }
  331. ]
  332. },
  333. },
  334. }
  335. ]
  336. }
  337. myChart.setOption(option);
  338. }
  339. function echarts_4(data) {
  340. const myChart = echarts.init(document.getElementById('main4'))
  341. const option = {
  342. tooltip: {
  343. trigger: 'item'
  344. },
  345. legend: {
  346. orient: 'horizontal', //设置图例朝向
  347. bottom: 'bottom'
  348. },
  349. grid: {
  350. left: '3%',
  351. right: '4%',
  352. top: '10%',
  353. bottom: '15%',
  354. containLabel: true
  355. },
  356. series: [
  357. {
  358. name: '送审总额占比分布图',
  359. type: 'pie',
  360. radius: '50%',
  361. data: [
  362. {
  363. value: data['sentAndaAuthorize']['0']['all_amount'],
  364. name: '预算总额',
  365. itemStyle: {
  366. color: 'rgb(116,195,225)'
  367. }
  368. },
  369. {
  370. value: data['sentAndaAuthorize']['1']['all_amount'],
  371. name: '结算总额',
  372. itemStyle: {
  373. color: 'rgb(241,103,106)'
  374. }
  375. },
  376. ],
  377. emphasis: {
  378. itemStyle: {
  379. shadowBlur: 10,
  380. shadowOffsetX: 0,
  381. shadowColor: 'rgba(0, 0, 0, 0.5)'
  382. }
  383. }
  384. }
  385. ]
  386. }
  387. myChart.setOption(option);
  388. }
  389. function echarts_5(data) {
  390. const myChart = echarts.init(document.getElementById('main5'))
  391. let review = data['review_poportion'];
  392. let name = [];
  393. let set = [];
  394. for (let i = 0; i < review.length; i++) {
  395. if (review[i]['project_number'] != 0) {
  396. name.push(review[i]['review_unit_name'])
  397. set.push(review[i]['project_number'])
  398. }
  399. }
  400. const option = {
  401. tooltip: {
  402. trigger: 'axis',
  403. axisPointer: {
  404. type: 'shadow'
  405. }
  406. },
  407. legend: {
  408. orient: 'horizontal', //设置图例朝向
  409. bottom: 'bottom',
  410. },
  411. grid: {
  412. left: '3%',
  413. right: '4%',
  414. top: '10%',
  415. bottom: '15%',
  416. containLabel: true
  417. },
  418. xAxis: {
  419. type: 'value',
  420. boundaryGap: [0, 0.01]
  421. },
  422. yAxis: {
  423. axisLine: {
  424. show: false // 隐藏轴线
  425. },
  426. axisTick: {
  427. show: false // 隐藏分隔线
  428. },
  429. type: 'category',
  430. data: name
  431. },
  432. series: [
  433. {
  434. name: '项目数量',
  435. type: 'bar',
  436. data: set,
  437. itemStyle: { // 使用方法二的写法
  438. color: {
  439. type: 'linear',
  440. x: 0, //右
  441. y: 0, //下
  442. x2: 1, //左
  443. y2: 0, //上
  444. colorStops: [
  445. {
  446. offset: 0,
  447. color: 'rgb(254,221,148)' // 0% 处的颜色
  448. },
  449. {
  450. offset: 1,
  451. color: 'rgb(209,230,165)' // 100% 处的颜色
  452. }
  453. ]
  454. },
  455. },
  456. },
  457. ]
  458. };
  459. myChart.setOption(option);
  460. }
  461. function echarts_6(data) {
  462. const myChart = echarts.init(document.getElementById('main6'))
  463. let review = data['sent_review_amount_top'];
  464. let name = [];
  465. let set = [];
  466. for (let i = 0; i < review.length; i++) {
  467. if (review[i]['all_sent_amount'] != 0) {
  468. name.push(review[i]['review_unit_name'])
  469. set.push(review[i]['all_sent_amount'])
  470. }
  471. }
  472. const option = {
  473. tooltip: {
  474. trigger: 'axis',
  475. axisPointer: {
  476. type: 'shadow'
  477. }
  478. },
  479. legend: {
  480. orient: 'horizontal', //设置图例朝向
  481. bottom: 'bottom',
  482. },
  483. grid: {
  484. left: '3%',
  485. right: '4%',
  486. top: '10%',
  487. bottom: '15%',
  488. containLabel: true
  489. },
  490. xAxis: {
  491. type: 'value',
  492. boundaryGap: [0, 0.01]
  493. },
  494. yAxis: {
  495. axisLine: {
  496. show: false // 隐藏轴线
  497. },
  498. axisTick: {
  499. show: false // 隐藏分隔线
  500. },
  501. type: 'category',
  502. data: name
  503. },
  504. series: [
  505. {
  506. name: '送审总额',
  507. type: 'bar',
  508. data: set,
  509. itemStyle: { // 使用方法二的写法
  510. color: {
  511. type: 'linear',
  512. x: 0, //右
  513. y: 0, //下
  514. x2: 1, //左
  515. y2: 0, //上
  516. colorStops: [
  517. {
  518. offset: 0,
  519. color: 'rgb(229,221,233)' // 0% 处的颜色
  520. },
  521. {
  522. offset: 1,
  523. color: 'rgb(189,194,232)' // 100% 处的颜色
  524. }
  525. ]
  526. },
  527. },
  528. },
  529. ]
  530. };
  531. myChart.setOption(option);
  532. }
  533. function echarts_7(data) {
  534. const myChart = echarts.init(document.getElementById('main7'))
  535. let review = data['authorize_amount_top'];
  536. let name = [];
  537. let set = [];
  538. for (let i = 0; i < review.length; i++) {
  539. if (review[i]['all_authorize_amount'] != 0) {
  540. name.push(review[i]['review_unit_name'])
  541. set.push(review[i]['all_authorize_amount'])
  542. }
  543. }
  544. const option = {
  545. tooltip: {
  546. trigger: 'axis',
  547. axisPointer: {
  548. type: 'shadow'
  549. }
  550. },
  551. legend: {
  552. orient: 'horizontal', //设置图例朝向
  553. bottom: 'bottom',
  554. },
  555. grid: {
  556. left: '3%',
  557. right: '4%',
  558. top: '10%',
  559. bottom: '15%',
  560. containLabel: true
  561. },
  562. xAxis: {
  563. type: 'value',
  564. boundaryGap: [0, 0.01]
  565. },
  566. yAxis: {
  567. axisLine: {
  568. show: false // 隐藏轴线
  569. },
  570. axisTick: {
  571. show: false // 隐藏分隔线
  572. },
  573. type: 'category',
  574. data: name
  575. },
  576. series: [
  577. {
  578. name: '审定总额',
  579. type: 'bar',
  580. data: set,
  581. itemStyle: { // 使用方法二的写法
  582. color: {
  583. type: 'linear',
  584. x: 0, //右
  585. y: 0, //下
  586. x2: 1, //左
  587. y2: 0, //上
  588. colorStops: [
  589. {
  590. offset: 0,
  591. color: 'rgb(229,221,233)' // 0% 处的颜色
  592. },
  593. {
  594. offset: 1,
  595. color: 'rgb(189,194,232)' // 100% 处的颜色
  596. }
  597. ]
  598. },
  599. },
  600. },
  601. ]
  602. };
  603. myChart.setOption(option);
  604. }
  605. function echarts_8(data) {
  606. const myChart = echarts.init(document.getElementById('main8'))
  607. let review = data['sent_number_top'];
  608. let name = [];
  609. let set = [];
  610. for (let i = 0; i < review.length; i++) {
  611. if (review[i]['project_number'] != 0) {
  612. name.push(review[i]['sent_review_unit_name'])
  613. set.push(review[i]['project_number'])
  614. }
  615. }
  616. const option = {
  617. tooltip: {
  618. trigger: 'axis',
  619. axisPointer: {
  620. type: 'shadow'
  621. }
  622. },
  623. legend: {
  624. orient: 'horizontal', //设置图例朝向
  625. bottom: 'bottom',
  626. },
  627. grid: {
  628. left: '3%',
  629. right: '4%',
  630. top: '10%',
  631. bottom: '15%',
  632. containLabel: true
  633. },
  634. xAxis: {
  635. type: 'value',
  636. boundaryGap: [0, 0.01]
  637. },
  638. yAxis: {
  639. axisLine: {
  640. show: false // 隐藏轴线
  641. },
  642. axisTick: {
  643. show: false // 隐藏分隔线
  644. },
  645. type: 'category',
  646. data: name
  647. },
  648. series: [
  649. {
  650. name: '项目数量',
  651. type: 'bar',
  652. data: set,
  653. itemStyle: { // 使用方法二的写法
  654. color: {
  655. type: 'linear',
  656. x: 0, //右
  657. y: 0, //下
  658. x2: 1, //左
  659. y2: 0, //上
  660. colorStops: [
  661. {
  662. offset: 0,
  663. color: 'rgb(254,221,148)' // 0% 处的颜色
  664. },
  665. {
  666. offset: 1,
  667. color: 'rgb(209,230,165)' // 100% 处的颜色
  668. }
  669. ]
  670. },
  671. },
  672. },
  673. ]
  674. };
  675. myChart.setOption(option);
  676. }
  677. function echarts_9(data) {
  678. const myChart = echarts.init(document.getElementById('main9'))
  679. let review = data['sent_poportion'];
  680. let name = [];
  681. let set = [];
  682. for (let i = 0; i < review.length; i++) {
  683. if (review[i]['all_sent_amount'] != '') {
  684. name.push(review[i]['sent_review_unit_name'])
  685. set.push(review[i]['all_sent_amount'])
  686. }
  687. }
  688. const option = {
  689. tooltip: {
  690. trigger: 'axis',
  691. axisPointer: {
  692. type: 'shadow'
  693. }
  694. },
  695. legend: {
  696. orient: 'horizontal', //设置图例朝向
  697. bottom: 'bottom',
  698. },
  699. grid: {
  700. left: '3%',
  701. right: '4%',
  702. top: '10%',
  703. bottom: '15%',
  704. containLabel: true
  705. },
  706. xAxis: {
  707. type: 'value',
  708. boundaryGap: [0, 0.01]
  709. },
  710. yAxis: {
  711. axisLine: {
  712. show: false // 隐藏轴线
  713. },
  714. axisTick: {
  715. show: false // 隐藏分隔线
  716. },
  717. type: 'category',
  718. data: name
  719. },
  720. series: [
  721. {
  722. name: '送审总额',
  723. type: 'bar',
  724. data: set,
  725. itemStyle: { // 使用方法二的写法
  726. color: {
  727. type: 'linear',
  728. x: 0, //右
  729. y: 0, //下
  730. x2: 1, //左
  731. y2: 0, //上
  732. colorStops: [
  733. {
  734. offset: 0,
  735. color: 'rgb(72,177,203)' // 0% 处的颜色
  736. },
  737. {
  738. offset: 1,
  739. color: 'rgb(72,116,203)' // 100% 处的颜色
  740. }
  741. ]
  742. },
  743. },
  744. },
  745. ]
  746. };
  747. myChart.setOption(option);
  748. }
  749. function echarts_10(data) {
  750. const myChart = echarts.init(document.getElementById('main10'))
  751. let review = data['sent_poportion'];
  752. let set = [];
  753. for (let i = 0; i < review.length; i++) {
  754. if (review[i]['all_sent_amount'] != '') {
  755. set.push({
  756. value: review[i]['all_sent_amount'],
  757. name: review[i]['sent_review_unit_name']
  758. })
  759. }
  760. }
  761. const option = {
  762. tooltip: {
  763. trigger: 'item'
  764. },
  765. legend: {
  766. orient: 'horizontal', //设置图例朝向
  767. bottom: 'bottom'
  768. },
  769. grid: {
  770. left: '3%',
  771. right: '4%',
  772. top: '10%',
  773. bottom: '15%',
  774. containLabel: true
  775. },
  776. series: [
  777. {
  778. name: '送审单位送审总额占比图',
  779. type: 'pie',
  780. radius: '50%',
  781. data: set,
  782. emphasis: {
  783. itemStyle: {
  784. shadowBlur: 10,
  785. shadowOffsetX: 0,
  786. shadowColor: 'rgba(0, 0, 0, 0.5)'
  787. }
  788. }
  789. }
  790. ]
  791. }
  792. myChart.setOption(option);
  793. }