data.js 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  1. import echarts from "echarts"
  2. const rowLimit = (params, max) => {
  3. let result = ''
  4. //一行显示几个字
  5. let rowMax = max
  6. let rowNumber = Math.ceil(params.length / rowMax)
  7. // 超过 3 个字换行
  8. if (params.length > 3) {
  9. for (let p = 0; p < rowNumber; p++) {
  10. let tempStr = ''
  11. let start = p * rowMax
  12. let end = start + rowMax
  13. if (p == rowNumber - 1) {
  14. tempStr = params.substring(start, params.length);
  15. } else {
  16. tempStr = params.substring(start, end) + '\n'
  17. }
  18. result += tempStr
  19. }
  20. } else {
  21. result = params
  22. }
  23. return result
  24. }
  25. export const acceptOption1 = {
  26. // 图表标题
  27. title: {
  28. show: true,
  29. text: '检测受理类型',
  30. textStyle: {
  31. color: '#fff',
  32. fontSize: 20,
  33. fontWeight: '600'
  34. },
  35. textAlign: 'center',
  36. left: '50%',
  37. top: '20px'
  38. },
  39. grid: {
  40. top: '80px'
  41. },
  42. xAxis: {
  43. type: 'category',
  44. data: ['理化', '微生物', '细胞活率', '残留检测', '细胞鉴别'],
  45. axisTick: {
  46. alignWithLabel: true
  47. },
  48. axisLabel: {
  49. style: {
  50. fill: '#fff'
  51. },
  52. formatter (params) {
  53. return rowLimit(params, 2)
  54. }
  55. },
  56. axisLine: {
  57. lineStyle: {
  58. color: '#fff'
  59. }
  60. }
  61. // axisLabel: {
  62. // inside: true,
  63. // color: "#000",
  64. // },
  65. // axisTick: {
  66. // show: true,
  67. // },
  68. // axisLine: {
  69. // show: true,
  70. // },
  71. // z: 10
  72. },
  73. yAxis: {
  74. type: 'value',
  75. name: '',
  76. nameTextStyle: {
  77. color: '#fff',
  78. fontSize: 14
  79. },
  80. splitLine: {
  81. show: false
  82. },
  83. axisLine: {
  84. lineStyle: {
  85. color: '#fff'
  86. }
  87. }
  88. },
  89. series: [{
  90. type: 'bar',
  91. name: '',
  92. data: [],
  93. barMaxWidth: '35px',
  94. itemStyle: {
  95. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  96. { offset: 0, color: "#83bff6" },
  97. { offset: 0.5, color: "#188df0" },
  98. { offset: 1, color: "#188df0" },
  99. ]),
  100. label: {
  101. show: true,
  102. position: 'top',
  103. textStyle: {
  104. color: '#fff',
  105. fontSize: 14
  106. },
  107. formatter (params) {
  108. return params.value ? params.value : ''
  109. }
  110. }
  111. },
  112. emphasis: {
  113. itemStyle: {
  114. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  115. { offset: 0, color: "#2378f7" },
  116. { offset: 0.7, color: "#2378f7" },
  117. { offset: 1, color: "#83bff6" },
  118. ])
  119. }
  120. }
  121. }],
  122. tooltip: {
  123. show: true,
  124. trigger: 'axis'
  125. }
  126. }
  127. export const colors = [
  128. '#d20962',
  129. '#f47721',
  130. '#7ac143',
  131. '#00a78e',
  132. '#00bce4',
  133. '#7d3f98',
  134. '#037ef3',
  135. '#f85a40',
  136. '#00c16e',
  137. '#12CBC4',
  138. '#b4a996',
  139. '#7552cc',
  140. '#67809f',
  141. '#f19066'
  142. ]
  143. export function* getRandomColor (shuffledColors) {
  144. let index = 0
  145. while (index < shuffledColors.length) {
  146. yield shuffledColors[index]
  147. index++
  148. }
  149. }
  150. let colorList = []
  151. export const acceptOption = {
  152. title: {
  153. show: true,
  154. text: '检测类型',
  155. textStyle: {
  156. color: '#fff',
  157. fontSize: 20,
  158. fontWeight: '600'
  159. },
  160. textAlign: 'center',
  161. left: '50%',
  162. top: '20px'
  163. },
  164. legend: {
  165. // type: 'scroll',
  166. orient: 'horizontal',
  167. show: true,
  168. left: 'center',
  169. bottom: 10,
  170. // right: 10,
  171. // top: 100,
  172. formatter (params) {
  173. let l = 7
  174. if (params.length > l) {
  175. return params.substring(0, l) + '\n' + params.substring(l)
  176. }
  177. return params
  178. },
  179. // formatter: ['{a|{name}}'].join('\n'),
  180. // textStyle: {
  181. // rich: {
  182. // a: {
  183. // width: 80,
  184. // overflow: 'break',
  185. // lineHeight: 12
  186. // }
  187. // }
  188. // },
  189. z: 3,
  190. itemWidth: 25,
  191. itemHeight: 14,
  192. itemGap: 10,
  193. data: []
  194. },
  195. series: [
  196. {
  197. name: '任务完成情况',
  198. type: 'pie',
  199. radius: '55%',
  200. center: ['50%', '50%'],
  201. data: [],
  202. itemStyle: {
  203. emphasis: {
  204. shadowBlur: 10,
  205. shadowOffsetX: 0,
  206. shadowColor: 'rgba(0, 0, 0, 0.5)'
  207. },
  208. normal: {
  209. label: {
  210. show: true,
  211. position: 'outer',
  212. // formatter: `占比:{d}%\n\n\r{b}:{c}`,
  213. formatter: `{b}:{d}%`,
  214. fontSize: 14
  215. },
  216. labelLine: {
  217. show: true
  218. }
  219. }
  220. }
  221. }
  222. ],
  223. color: colorList,
  224. tooltip: {
  225. show: true,
  226. trigger: 'item',
  227. formatter: '任务情况<br/>{b}:{c}<br/>占比:{d}%'
  228. }
  229. }
  230. export const taskOption = {
  231. // 图表标题
  232. title: {
  233. show: true,
  234. text: '检测任务情况',
  235. textStyle: {
  236. color: '#fff',
  237. fontSize: 20,
  238. fontWeight: '600'
  239. },
  240. textAlign: 'center',
  241. left: '50%',
  242. top: '20px'
  243. },
  244. grid: {
  245. top: '80px',
  246. bottom: '30px'
  247. },
  248. xAxis: {
  249. type: 'category',
  250. data: ['委托', '任务分配', '检测', '报告'],
  251. axisTick: {
  252. alignWithLabel: true
  253. },
  254. axisLabel: {
  255. style: {
  256. fill: '#fff'
  257. },
  258. formatter (params) {
  259. return rowLimit(params, 2)
  260. }
  261. },
  262. axisLine: {
  263. lineStyle: {
  264. color: '#fff'
  265. }
  266. }
  267. },
  268. yAxis: {
  269. type: 'value',
  270. name: '',
  271. nameTextStyle: {
  272. color: '#fff',
  273. fontSize: 14
  274. },
  275. splitLine: {
  276. show: false
  277. },
  278. axisLine: {
  279. lineStyle: {
  280. color: '#fff'
  281. }
  282. }
  283. },
  284. series: [{
  285. type: 'bar',
  286. name: '',
  287. data: [],
  288. barWidth: '24px',
  289. barGap: '20%',
  290. barMaxWidth: '35px',
  291. itemStyle: {
  292. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  293. { offset: 0, color: "#83bff6" },
  294. { offset: 0.5, color: "#188df0" },
  295. { offset: 1, color: "#188df0" },
  296. ])
  297. },
  298. emphasis: {
  299. itemStyle: {
  300. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  301. { offset: 0, color: "#2378f7" },
  302. { offset: 0.7, color: "#2378f7" },
  303. { offset: 1, color: "#83bff6" },
  304. ])
  305. }
  306. },
  307. label: {
  308. show: true,
  309. position: 'top',
  310. textStyle: {
  311. color: '#fff',
  312. fontSize: 14
  313. },
  314. formatter (params) {
  315. return params.value ? params.value : ''
  316. }
  317. }
  318. }],
  319. tooltip: {
  320. show: true,
  321. trigger: 'axis'
  322. }
  323. }
  324. export const trustOption = {
  325. legend: {
  326. data: [
  327. {
  328. name: '委托',
  329. itemStyle: {
  330. color: '#00baff'
  331. }
  332. },
  333. {
  334. name: '受理',
  335. itemStyle: {
  336. color: '#f5d94e'
  337. }
  338. }
  339. ],
  340. textStyle: {
  341. color: '#fff',
  342. },
  343. bottom: 10
  344. },
  345. title: {
  346. show: true,
  347. text: '检测委托受理量',
  348. textStyle: {
  349. color: '#fff',
  350. fontSize: 20,
  351. fontWeight: '600'
  352. },
  353. textAlign: 'center',
  354. left: '50%',
  355. top: '20px'
  356. },
  357. grid: {
  358. top: '80px'
  359. },
  360. xAxis: {
  361. type: 'category',
  362. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  363. axisTick: {
  364. alignWithLabel: true
  365. },
  366. axisLabel: {
  367. style: {
  368. fill: '#fff'
  369. }
  370. },
  371. axisLine: {
  372. lineStyle: {
  373. color: '#fff'
  374. }
  375. }
  376. },
  377. yAxis: {
  378. type: 'value',
  379. name: '',
  380. nameTextStyle: {
  381. color: '#fff',
  382. fontSize: 14
  383. },
  384. splitLine: {
  385. show: false
  386. },
  387. axisLabel: {
  388. style: {
  389. fill: '#fff'
  390. }
  391. },
  392. axisLine: {
  393. lineStyle: {
  394. color: '#fff'
  395. }
  396. }
  397. },
  398. series: [
  399. {
  400. type: 'bar',
  401. name: '委托',
  402. data: [],
  403. barMaxWidth: '35px',
  404. barStyle: {
  405. fill: 'rgba(0, 186, 255, 0.4)'
  406. },
  407. itemStyle: {
  408. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  409. { offset: 0, color: "#83bff6" },
  410. { offset: 0.5, color: "#188df0" },
  411. { offset: 1, color: "#188df0" },
  412. ])
  413. },
  414. emphasis: {
  415. itemStyle: {
  416. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  417. { offset: 0, color: "#2378f7" },
  418. { offset: 0.7, color: "#2378f7" },
  419. { offset: 1, color: "#83bff6" },
  420. ])
  421. }
  422. },
  423. label: {
  424. show: true,
  425. position: 'top',
  426. textStyle: {
  427. color: '#fff',
  428. fontSize: 14
  429. },
  430. formatter (params) {
  431. return params.value ? params.value : ''
  432. }
  433. }
  434. },
  435. {
  436. type: 'line',
  437. name: '受理',
  438. data: [],
  439. symbol: 'circle',
  440. symbolSize: 10,
  441. lineArea: {
  442. show: true,
  443. gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
  444. },
  445. itemStyle: {
  446. color: '#f5d94e'
  447. },
  448. label: {
  449. show: true,
  450. position: 'right',
  451. textStyle: {
  452. color: '#f5d94e',
  453. fontSize: 14
  454. },
  455. formatter (params) {
  456. return params.value ? params.value : ''
  457. }
  458. }
  459. }
  460. ],
  461. tooltip: {
  462. show: true,
  463. trigger: 'axis'
  464. }
  465. }
  466. export const reportOption = {
  467. title: {
  468. show: true,
  469. text: '检测报告月度发放量',
  470. textStyle: {
  471. color: '#fff',
  472. fontSize: 20,
  473. fontWeight: '600'
  474. },
  475. textAlign: 'center',
  476. left: '50%',
  477. top: '20px'
  478. },
  479. grid: {
  480. top: '80px'
  481. },
  482. xAxis: {
  483. type: 'category',
  484. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  485. axisTick: {
  486. alignWithLabel: true
  487. },
  488. axisLabel: {
  489. style: {
  490. fill: '#fff'
  491. }
  492. },
  493. axisLine: {
  494. lineStyle: {
  495. color: '#fff'
  496. }
  497. }
  498. },
  499. yAxis: {
  500. type: 'value',
  501. name: '',
  502. nameTextStyle: {
  503. color: '#fff',
  504. fontSize: 14
  505. },
  506. splitLine: {
  507. show: false
  508. },
  509. axisLine: {
  510. lineStyle: {
  511. color: '#fff'
  512. }
  513. }
  514. },
  515. series: [{
  516. type: 'bar',
  517. name: '',
  518. data: [],
  519. barMaxWidth: '35px',
  520. itemStyle: {
  521. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  522. { offset: 0, color: "#83bff6" },
  523. { offset: 0.5, color: "#188df0" },
  524. { offset: 1, color: "#188df0" },
  525. ])
  526. },
  527. emphasis: {
  528. itemStyle: {
  529. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  530. { offset: 0, color: "#2378f7" },
  531. { offset: 0.7, color: "#2378f7" },
  532. { offset: 1, color: "#83bff6" },
  533. ])
  534. }
  535. },
  536. label: {
  537. show: true,
  538. position: 'top',
  539. textStyle: {
  540. color: '#fff',
  541. fontSize: 14
  542. },
  543. formatter (params) {
  544. return params.value ? params.value : ''
  545. }
  546. }
  547. }],
  548. tooltip: {
  549. show: true,
  550. trigger: 'axis'
  551. }
  552. }
  553. export const sampleOption = {
  554. title: {
  555. show: true,
  556. text: '样品受理情况',
  557. textStyle: {
  558. color: '#fff',
  559. fontSize: 20,
  560. fontWeight: '600'
  561. },
  562. textAlign: 'center',
  563. left: '50%',
  564. top: '20px'
  565. },
  566. grid: {
  567. top: '80px'
  568. },
  569. xAxis: {
  570. type: 'category',
  571. data: ['已委托未收样', '已收样', '已收不合格', '留样'],
  572. axisTick: {
  573. alignWithLabel: true
  574. },
  575. axisLabel: {
  576. style: {
  577. fill: '#fff'
  578. },
  579. formatter (params) {
  580. return rowLimit(params, 3)
  581. }
  582. },
  583. axisLine: {
  584. lineStyle: {
  585. color: '#fff'
  586. }
  587. }
  588. },
  589. yAxis: {
  590. type: 'value',
  591. name: '',
  592. nameTextStyle: {
  593. color: '#fff',
  594. fontSize: 14
  595. },
  596. splitLine: {
  597. show: false
  598. },
  599. axisLine: {
  600. lineStyle: {
  601. color: '#fff'
  602. }
  603. }
  604. },
  605. series: [{
  606. type: 'bar',
  607. name: '',
  608. data: [],
  609. barMaxWidth: '35px',
  610. itemStyle: {
  611. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  612. { offset: 0, color: "#83bff6" },
  613. { offset: 0.5, color: "#188df0" },
  614. { offset: 1, color: "#188df0" },
  615. ])
  616. },
  617. emphasis: {
  618. itemStyle: {
  619. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  620. { offset: 0, color: "#2378f7" },
  621. { offset: 0.7, color: "#2378f7" },
  622. { offset: 1, color: "#83bff6" },
  623. ])
  624. }
  625. },
  626. label: {
  627. show: true,
  628. position: 'top',
  629. textStyle: {
  630. color: '#fff',
  631. fontSize: 14
  632. },
  633. formatter (params) {
  634. return params.value ? params.value : ''
  635. }
  636. }
  637. }],
  638. tooltip: {
  639. show: true,
  640. trigger: 'axis'
  641. }
  642. }
  643. export const monthOption = {
  644. legend: {
  645. data: [
  646. {
  647. name: '任务总数',
  648. itemStyle: {
  649. color: '#00baff'
  650. }
  651. },
  652. {
  653. name: '已完成',
  654. itemStyle: {
  655. color: '#f5d94e'
  656. }
  657. }
  658. ],
  659. textStyle: {
  660. color: '#fff',
  661. },
  662. bottom: 10
  663. },
  664. title: {
  665. show: true,
  666. text: '检测任务月度完成量',
  667. textStyle: {
  668. color: '#fff',
  669. fontSize: 20,
  670. fontWeight: '600'
  671. },
  672. textAlign: 'center',
  673. left: '50%',
  674. top: '20px'
  675. },
  676. grid: {
  677. top: '80px'
  678. },
  679. xAxis: {
  680. type: 'category',
  681. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  682. axisTick: {
  683. alignWithLabel: true
  684. },
  685. axisLabel: {
  686. style: {
  687. fill: '#fff'
  688. }
  689. },
  690. axisLine: {
  691. lineStyle: {
  692. color: '#fff'
  693. }
  694. }
  695. },
  696. yAxis: {
  697. type: 'value',
  698. name: '',
  699. nameTextStyle: {
  700. color: '#fff',
  701. fontSize: 14
  702. },
  703. splitLine: {
  704. show: false
  705. },
  706. axisLabel: {
  707. style: {
  708. fill: '#fff'
  709. }
  710. },
  711. axisLine: {
  712. lineStyle: {
  713. color: '#fff'
  714. }
  715. }
  716. },
  717. series: [
  718. {
  719. type: 'bar',
  720. name: '任务总数',
  721. data: [],
  722. barMaxWidth: '35px',
  723. barStyle: {
  724. fill: 'rgba(0, 186, 255, 0.4)'
  725. },
  726. itemStyle: {
  727. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  728. { offset: 0, color: "#83bff6" },
  729. { offset: 0.5, color: "#188df0" },
  730. { offset: 1, color: "#188df0" },
  731. ])
  732. },
  733. emphasis: {
  734. itemStyle: {
  735. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  736. { offset: 0, color: "#2378f7" },
  737. { offset: 0.7, color: "#2378f7" },
  738. { offset: 1, color: "#83bff6" },
  739. ])
  740. }
  741. },
  742. label: {
  743. show: true,
  744. position: 'top',
  745. textStyle: {
  746. color: '#fff',
  747. fontSize: 14
  748. },
  749. formatter (params) {
  750. return params.value ? params.value : ''
  751. }
  752. }
  753. },
  754. {
  755. type: 'line',
  756. name: '已完成',
  757. data: [],
  758. symbol: 'circle',
  759. symbolSize: 10,
  760. lineArea: {
  761. show: true,
  762. gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
  763. },
  764. itemStyle: {
  765. color: '#f5d94e'
  766. },
  767. label: {
  768. show: true,
  769. position: 'right',
  770. textStyle: {
  771. color: '#f5d94e',
  772. fontSize: 14
  773. },
  774. formatter (params) {
  775. return params.value ? params.value : ''
  776. }
  777. }
  778. }
  779. ],
  780. tooltip: {
  781. show: true,
  782. trigger: 'axis'
  783. }
  784. }
  785. export const yearOption = {
  786. title: {
  787. show: true,
  788. text: '检测任务年度完成量',
  789. textStyle: {
  790. color: '#fff',
  791. fontSize: 20,
  792. fontWeight: '600'
  793. },
  794. textAlign: 'center',
  795. left: '50%',
  796. top: '20px'
  797. },
  798. legend: {
  799. orient: 'horizontal',
  800. show: true,
  801. left: 'center',
  802. bottom: 10,
  803. z: 3,
  804. itemWidth: 25,
  805. itemHeight: 14,
  806. itemGap: 10,
  807. data: [
  808. {
  809. name: '未完成',
  810. textStyle: {
  811. color: '#ff6347'
  812. }
  813. },
  814. {
  815. name: '已完成',
  816. textStyle: {
  817. color: '#3f3'
  818. }
  819. }
  820. ]
  821. },
  822. series: [
  823. {
  824. name: '任务完成情况',
  825. type: 'pie',
  826. radius: '55%',
  827. center: ['50%', '50%'],
  828. data: [],
  829. itemStyle: {
  830. emphasis: {
  831. shadowBlur: 10,
  832. shadowOffsetX: 0,
  833. shadowColor: 'rgba(0, 0, 0, 0.5)'
  834. },
  835. normal: {
  836. label: {
  837. show: true,
  838. position: 'outer',
  839. formatter: `占比:{d}%\n\n\r{b}:{c}`,
  840. // formatter: `{b}:{c}\n\n\r占比:{d}%`,
  841. fontSize: 14
  842. },
  843. labelLine: {
  844. show: true
  845. }
  846. }
  847. }
  848. }
  849. ],
  850. color: ['#ff6347', '#3f3'],
  851. tooltip: {
  852. show: true,
  853. trigger: 'item',
  854. formatter: '任务情况<br/>{b}:{c}<br/>占比:{d}%'
  855. }
  856. }
  857. // 假数据
  858. export const satisfaction = {
  859. title: {
  860. show: true,
  861. text: '客户满意度',
  862. textStyle: {
  863. color: '#fff',
  864. fontSize: 20,
  865. fontWeight: '600'
  866. },
  867. textAlign: 'center',
  868. left: '50%',
  869. top: '20px'
  870. },
  871. legend: {
  872. orient: 'horizontal',
  873. show: true,
  874. left: 'center',
  875. bottom: 10,
  876. z: 3,
  877. itemWidth: 25,
  878. itemHeight: 14,
  879. itemGap: 10,
  880. data: [
  881. {
  882. name: '不满意',
  883. textStyle: {
  884. color: '#d20962'
  885. }
  886. },
  887. {
  888. name: '满意',
  889. textStyle: {
  890. color: '#188df0'
  891. }
  892. }
  893. ]
  894. },
  895. series: [
  896. {
  897. name: '满意度占比',
  898. type: 'pie',
  899. radius: '55%',
  900. center: ['50%', '50%'],
  901. data: [
  902. {
  903. name: '不满意',
  904. value: 5
  905. },
  906. {
  907. name: '满意',
  908. value: 995
  909. }
  910. ],
  911. itemStyle: {
  912. emphasis: {
  913. shadowBlur: 10,
  914. shadowOffsetX: 0,
  915. shadowColor: 'rgba(0, 0, 0, 0.5)'
  916. },
  917. normal: {
  918. label: {
  919. show: true,
  920. position: 'outer',
  921. formatter: `占比:{d}%`,
  922. fontSize: 14,
  923. color: '#fff'
  924. },
  925. labelLine: {
  926. show: true
  927. }
  928. }
  929. }
  930. }
  931. ],
  932. color: ['#d20962', new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  933. { offset: 0, color: "#83bff6" },
  934. { offset: 0.5, color: "#188df0" },
  935. { offset: 1, color: "#188df0" },
  936. ])],
  937. tooltip: {
  938. show: true,
  939. trigger: 'item',
  940. formatter: '统计情况<br/>{b}:{c}<br/>占比:{d}%'
  941. }
  942. }
  943. export const contract = {
  944. title: {
  945. show: true,
  946. text: '合同履约率',
  947. textStyle: {
  948. color: '#fff',
  949. fontSize: 20,
  950. fontWeight: '600'
  951. },
  952. textAlign: 'center',
  953. left: '50%',
  954. top: '20px'
  955. },
  956. legend: {
  957. orient: 'horizontal',
  958. show: true,
  959. left: 'center',
  960. bottom: 10,
  961. z: 3,
  962. itemWidth: 25,
  963. itemHeight: 14,
  964. itemGap: 10,
  965. data: [
  966. {
  967. name: '未履约',
  968. textStyle: {
  969. color: '#d20962'
  970. }
  971. },
  972. {
  973. name: '已履约',
  974. textStyle: {
  975. color: '#188df0'
  976. }
  977. }
  978. ]
  979. },
  980. series: [
  981. {
  982. name: '任务完成情况',
  983. type: 'pie',
  984. radius: '55%',
  985. center: ['50%', '50%'],
  986. data: [
  987. {
  988. name: '未履约',
  989. value: 0
  990. },
  991. {
  992. name: '已履约',
  993. value: 100
  994. }
  995. ],
  996. itemStyle: {
  997. emphasis: {
  998. shadowBlur: 10,
  999. shadowOffsetX: 0,
  1000. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1001. },
  1002. normal: {
  1003. label: {
  1004. show: true,
  1005. position: 'outer',
  1006. formatter: `占比:{d}%`,
  1007. fontSize: 14,
  1008. color: '#fff'
  1009. },
  1010. labelLine: {
  1011. show: true
  1012. }
  1013. }
  1014. }
  1015. }
  1016. ],
  1017. color: ['#d20962', new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1018. { offset: 0, color: "#83bff6" },
  1019. { offset: 0.5, color: "#188df0" },
  1020. { offset: 1, color: "#188df0" },
  1021. ])],
  1022. tooltip: {
  1023. show: true,
  1024. trigger: 'item',
  1025. formatter: '统计情况<br/>{b}:{c}<br/>占比:{d}%'
  1026. }
  1027. }